@agentxm/client-core 0.5.0 → 0.5.1

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 (613) hide show
  1. package/dist/src/unstable/agents/augment/service.d.ts.map +1 -1
  2. package/dist/src/unstable/agents/augment/service.js +12 -8
  3. package/dist/src/unstable/agents/augment/service.js.map +1 -1
  4. package/dist/src/unstable/agents/coding-agent.d.ts +1 -1
  5. package/dist/src/unstable/agents/coding-agent.d.ts.map +1 -1
  6. package/dist/src/unstable/agents/coding-agent.js +1 -1
  7. package/dist/src/unstable/agents/coding-agent.js.map +1 -1
  8. package/dist/src/unstable/agents/command-sync.d.ts +2 -2
  9. package/dist/src/unstable/agents/command-sync.d.ts.map +1 -1
  10. package/dist/src/unstable/agents/command-sync.js +44 -23
  11. package/dist/src/unstable/agents/command-sync.js.map +1 -1
  12. package/dist/src/unstable/agents/detection.js +3 -3
  13. package/dist/src/unstable/agents/detection.js.map +1 -1
  14. package/dist/src/unstable/agents/index.d.ts +1 -1
  15. package/dist/src/unstable/agents/index.d.ts.map +1 -1
  16. package/dist/src/unstable/agents/index.js +1 -1
  17. package/dist/src/unstable/agents/index.js.map +1 -1
  18. package/dist/src/unstable/agents/mcp-sync.d.ts.map +1 -1
  19. package/dist/src/unstable/agents/mcp-sync.js +14 -20
  20. package/dist/src/unstable/agents/mcp-sync.js.map +1 -1
  21. package/dist/src/unstable/agents/repository.js +2 -2
  22. package/dist/src/unstable/agents/repository.js.map +1 -1
  23. package/dist/src/unstable/agents/subagent-sync.js +14 -14
  24. package/dist/src/unstable/agents/subagent-sync.js.map +1 -1
  25. package/dist/src/unstable/app-error/app-error.d.ts +10 -9
  26. package/dist/src/unstable/app-error/app-error.d.ts.map +1 -1
  27. package/dist/src/unstable/app-error/app-error.js +37 -4
  28. package/dist/src/unstable/app-error/app-error.js.map +1 -1
  29. package/dist/src/unstable/app-error/builders.d.ts +21 -0
  30. package/dist/src/unstable/app-error/builders.d.ts.map +1 -0
  31. package/dist/src/unstable/app-error/builders.js +46 -0
  32. package/dist/src/unstable/app-error/builders.js.map +1 -0
  33. package/dist/src/unstable/app-error/index.d.ts +2 -1
  34. package/dist/src/unstable/app-error/index.d.ts.map +1 -1
  35. package/dist/src/unstable/app-error/index.js +2 -1
  36. package/dist/src/unstable/app-error/index.js.map +1 -1
  37. package/dist/src/unstable/app-error/render.d.ts.map +1 -1
  38. package/dist/src/unstable/app-error/render.js +6 -24
  39. package/dist/src/unstable/app-error/render.js.map +1 -1
  40. package/dist/src/unstable/auth/auth-client.d.ts +1 -1
  41. package/dist/src/unstable/auth/auth-client.d.ts.map +1 -1
  42. package/dist/src/unstable/auth/auth-client.js +76 -42
  43. package/dist/src/unstable/auth/auth-client.js.map +1 -1
  44. package/dist/src/unstable/auth/credential-store.d.ts +1 -1
  45. package/dist/src/unstable/auth/credential-store.d.ts.map +1 -1
  46. package/dist/src/unstable/auth/credential-store.js +22 -24
  47. package/dist/src/unstable/auth/credential-store.js.map +1 -1
  48. package/dist/src/unstable/auth/device-login.d.ts +1 -1
  49. package/dist/src/unstable/auth/device-login.d.ts.map +1 -1
  50. package/dist/src/unstable/auth/device-login.js +1 -1
  51. package/dist/src/unstable/auth/device-login.js.map +1 -1
  52. package/dist/src/unstable/auth/guard-interaction.d.ts +1 -1
  53. package/dist/src/unstable/auth/guard-interaction.d.ts.map +1 -1
  54. package/dist/src/unstable/auth/guard-interaction.js +1 -1
  55. package/dist/src/unstable/auth/guard-interaction.js.map +1 -1
  56. package/dist/src/unstable/auth/guard.d.ts.map +1 -1
  57. package/dist/src/unstable/auth/guard.js +5 -9
  58. package/dist/src/unstable/auth/guard.js.map +1 -1
  59. package/dist/src/unstable/auth/login-interaction.d.ts +1 -1
  60. package/dist/src/unstable/auth/login-interaction.d.ts.map +1 -1
  61. package/dist/src/unstable/auth/login-interaction.js +1 -1
  62. package/dist/src/unstable/auth/login-interaction.js.map +1 -1
  63. package/dist/src/unstable/auth/registry-url.d.ts +1 -1
  64. package/dist/src/unstable/auth/registry-url.js +1 -1
  65. package/dist/src/unstable/auth/registry-url.js.map +1 -1
  66. package/dist/src/unstable/auth/token-resolution.d.ts +1 -1
  67. package/dist/src/unstable/auth/token-resolution.d.ts.map +1 -1
  68. package/dist/src/unstable/auth/token-resolution.js +6 -10
  69. package/dist/src/unstable/auth/token-resolution.js.map +1 -1
  70. package/dist/src/unstable/cli/prompt/helpers.d.ts +1 -1
  71. package/dist/src/unstable/cli/prompt/helpers.js +3 -3
  72. package/dist/src/unstable/cli/prompt/helpers.js.map +1 -1
  73. package/dist/src/unstable/cli-flags/verbosity.d.ts +1 -1
  74. package/dist/src/unstable/cli-flags/verbosity.d.ts.map +1 -1
  75. package/dist/src/unstable/cli-flags/verbosity.js +1 -1
  76. package/dist/src/unstable/cli-flags/verbosity.js.map +1 -1
  77. package/dist/src/unstable/cli-renderer/cli-renderer-interactive.d.ts.map +1 -1
  78. package/dist/src/unstable/cli-renderer/cli-renderer-interactive.js +128 -9
  79. package/dist/src/unstable/cli-renderer/cli-renderer-interactive.js.map +1 -1
  80. package/dist/src/unstable/cli-renderer/cli-renderer-machine.d.ts.map +1 -1
  81. package/dist/src/unstable/cli-renderer/cli-renderer-machine.js +45 -10
  82. package/dist/src/unstable/cli-renderer/cli-renderer-machine.js.map +1 -1
  83. package/dist/src/unstable/cli-renderer/cli-renderer-test.d.ts +2 -0
  84. package/dist/src/unstable/cli-renderer/cli-renderer-test.d.ts.map +1 -1
  85. package/dist/src/unstable/cli-renderer/cli-renderer-test.js +80 -21
  86. package/dist/src/unstable/cli-renderer/cli-renderer-test.js.map +1 -1
  87. package/dist/src/unstable/cli-renderer/cli-renderer.d.ts +32 -7
  88. package/dist/src/unstable/cli-renderer/cli-renderer.d.ts.map +1 -1
  89. package/dist/src/unstable/cli-renderer/cli-renderer.js +1 -1
  90. package/dist/src/unstable/cli-renderer/cli-renderer.js.map +1 -1
  91. package/dist/src/unstable/cli-renderer/entity-registry.d.ts +15 -0
  92. package/dist/src/unstable/cli-renderer/entity-registry.d.ts.map +1 -0
  93. package/dist/src/unstable/cli-renderer/entity-registry.js +17 -0
  94. package/dist/src/unstable/cli-renderer/entity-registry.js.map +1 -0
  95. package/dist/src/unstable/cli-renderer/index.d.ts +2 -1
  96. package/dist/src/unstable/cli-renderer/index.d.ts.map +1 -1
  97. package/dist/src/unstable/cli-renderer/index.js +1 -0
  98. package/dist/src/unstable/cli-renderer/index.js.map +1 -1
  99. package/dist/src/unstable/cli-runtime/breadcrumb.d.ts +9 -0
  100. package/dist/src/unstable/cli-runtime/breadcrumb.d.ts.map +1 -0
  101. package/dist/src/unstable/cli-runtime/breadcrumb.js +12 -0
  102. package/dist/src/unstable/cli-runtime/breadcrumb.js.map +1 -0
  103. package/dist/src/unstable/cli-runtime/command-argv.d.ts +1 -1
  104. package/dist/src/unstable/cli-runtime/command-argv.js +1 -1
  105. package/dist/src/unstable/cli-runtime/command-argv.js.map +1 -1
  106. package/dist/src/unstable/cli-runtime/graceful-shutdown.d.ts.map +1 -1
  107. package/dist/src/unstable/cli-runtime/graceful-shutdown.js +3 -1
  108. package/dist/src/unstable/cli-runtime/graceful-shutdown.js.map +1 -1
  109. package/dist/src/unstable/cli-runtime/handle-error.d.ts +2 -0
  110. package/dist/src/unstable/cli-runtime/handle-error.d.ts.map +1 -1
  111. package/dist/src/unstable/cli-runtime/handle-error.js +42 -3
  112. package/dist/src/unstable/cli-runtime/handle-error.js.map +1 -1
  113. package/dist/src/unstable/cli-runtime/index.d.ts +4 -4
  114. package/dist/src/unstable/cli-runtime/index.d.ts.map +1 -1
  115. package/dist/src/unstable/cli-runtime/index.js +3 -3
  116. package/dist/src/unstable/cli-runtime/index.js.map +1 -1
  117. package/dist/src/unstable/cli-runtime/json-envelope.d.ts +50 -11
  118. package/dist/src/unstable/cli-runtime/json-envelope.d.ts.map +1 -1
  119. package/dist/src/unstable/cli-runtime/json-envelope.js +57 -15
  120. package/dist/src/unstable/cli-runtime/json-envelope.js.map +1 -1
  121. package/dist/src/unstable/cli-runtime/output-mode.d.ts +9 -8
  122. package/dist/src/unstable/cli-runtime/output-mode.d.ts.map +1 -1
  123. package/dist/src/unstable/cli-runtime/output-mode.js +11 -7
  124. package/dist/src/unstable/cli-runtime/output-mode.js.map +1 -1
  125. package/dist/src/unstable/cli-runtime/runtime-envelope.d.ts.map +1 -1
  126. package/dist/src/unstable/cli-runtime/runtime-envelope.js +52 -5
  127. package/dist/src/unstable/cli-runtime/runtime-envelope.js.map +1 -1
  128. package/dist/src/unstable/cli-runtime/telemetry.d.ts +2 -1
  129. package/dist/src/unstable/cli-runtime/telemetry.d.ts.map +1 -1
  130. package/dist/src/unstable/cli-runtime/telemetry.js +4 -4
  131. package/dist/src/unstable/cli-runtime/telemetry.js.map +1 -1
  132. package/dist/src/unstable/commands/command-argument.d.ts +2 -2
  133. package/dist/src/unstable/commands/command-argument.js +2 -2
  134. package/dist/src/unstable/commands/command-content.d.ts +11 -24
  135. package/dist/src/unstable/commands/command-content.d.ts.map +1 -1
  136. package/dist/src/unstable/commands/command-content.js +34 -36
  137. package/dist/src/unstable/commands/command-content.js.map +1 -1
  138. package/dist/src/unstable/commands/index.d.ts +2 -1
  139. package/dist/src/unstable/commands/index.d.ts.map +1 -1
  140. package/dist/src/unstable/commands/index.js +1 -0
  141. package/dist/src/unstable/commands/index.js.map +1 -1
  142. package/dist/src/unstable/commands/manager.d.ts +3 -2
  143. package/dist/src/unstable/commands/manager.d.ts.map +1 -1
  144. package/dist/src/unstable/commands/manager.js +62 -40
  145. package/dist/src/unstable/commands/manager.js.map +1 -1
  146. package/dist/src/unstable/commands/manifest-schema.d.ts +0 -1
  147. package/dist/src/unstable/commands/manifest-schema.d.ts.map +1 -1
  148. package/dist/src/unstable/commands/manifest-schema.js +0 -1
  149. package/dist/src/unstable/commands/manifest-schema.js.map +1 -1
  150. package/dist/src/unstable/commands/operations/disable.js +2 -2
  151. package/dist/src/unstable/commands/operations/disable.js.map +1 -1
  152. package/dist/src/unstable/commands/operations/enable.d.ts +1 -1
  153. package/dist/src/unstable/commands/operations/enable.d.ts.map +1 -1
  154. package/dist/src/unstable/commands/operations/enable.js +21 -11
  155. package/dist/src/unstable/commands/operations/enable.js.map +1 -1
  156. package/dist/src/unstable/commands/operations/install.d.ts +4 -4
  157. package/dist/src/unstable/commands/operations/install.d.ts.map +1 -1
  158. package/dist/src/unstable/commands/operations/install.js +37 -36
  159. package/dist/src/unstable/commands/operations/install.js.map +1 -1
  160. package/dist/src/unstable/commands/operations/new-command.d.ts +8 -3
  161. package/dist/src/unstable/commands/operations/new-command.d.ts.map +1 -1
  162. package/dist/src/unstable/commands/operations/new-command.js +67 -18
  163. package/dist/src/unstable/commands/operations/new-command.js.map +1 -1
  164. package/dist/src/unstable/commands/operations/publish.d.ts.map +1 -1
  165. package/dist/src/unstable/commands/operations/publish.js +23 -15
  166. package/dist/src/unstable/commands/operations/publish.js.map +1 -1
  167. package/dist/src/unstable/commands/operations/shared-command-helpers.d.ts +10 -14
  168. package/dist/src/unstable/commands/operations/shared-command-helpers.d.ts.map +1 -1
  169. package/dist/src/unstable/commands/operations/shared-command-helpers.js +27 -37
  170. package/dist/src/unstable/commands/operations/shared-command-helpers.js.map +1 -1
  171. package/dist/src/unstable/commands/operations/uninstall.js +2 -2
  172. package/dist/src/unstable/commands/operations/uninstall.js.map +1 -1
  173. package/dist/src/unstable/commands/paths.d.ts +64 -0
  174. package/dist/src/unstable/commands/paths.d.ts.map +1 -0
  175. package/dist/src/unstable/commands/paths.js +41 -0
  176. package/dist/src/unstable/commands/paths.js.map +1 -0
  177. package/dist/src/unstable/commands/reconciliation-adapter.d.ts.map +1 -1
  178. package/dist/src/unstable/commands/reconciliation-adapter.js +4 -5
  179. package/dist/src/unstable/commands/reconciliation-adapter.js.map +1 -1
  180. package/dist/src/unstable/commands/renderers/index.d.ts +6 -5
  181. package/dist/src/unstable/commands/renderers/index.d.ts.map +1 -1
  182. package/dist/src/unstable/commands/renderers/index.js +3 -2
  183. package/dist/src/unstable/commands/renderers/index.js.map +1 -1
  184. package/dist/src/unstable/commands/renderers/render-markdown-only.d.ts +2 -2
  185. package/dist/src/unstable/commands/renderers/render-markdown-only.d.ts.map +1 -1
  186. package/dist/src/unstable/commands/renderers/render-markdown-only.js +3 -28
  187. package/dist/src/unstable/commands/renderers/render-markdown-only.js.map +1 -1
  188. package/dist/src/unstable/commands/renderers/render-markdown-with-frontmatter.d.ts +2 -2
  189. package/dist/src/unstable/commands/renderers/render-markdown-with-frontmatter.d.ts.map +1 -1
  190. package/dist/src/unstable/commands/renderers/render-markdown-with-frontmatter.js +5 -42
  191. package/dist/src/unstable/commands/renderers/render-markdown-with-frontmatter.js.map +1 -1
  192. package/dist/src/unstable/commands/renderers/render-plain-text.d.ts +2 -2
  193. package/dist/src/unstable/commands/renderers/render-plain-text.d.ts.map +1 -1
  194. package/dist/src/unstable/commands/renderers/render-plain-text.js +8 -31
  195. package/dist/src/unstable/commands/renderers/render-plain-text.js.map +1 -1
  196. package/dist/src/unstable/commands/renderers/render-prompt-md.d.ts +2 -2
  197. package/dist/src/unstable/commands/renderers/render-prompt-md.d.ts.map +1 -1
  198. package/dist/src/unstable/commands/renderers/render-prompt-md.js +5 -33
  199. package/dist/src/unstable/commands/renderers/render-prompt-md.js.map +1 -1
  200. package/dist/src/unstable/commands/renderers/render-toml.d.ts +4 -5
  201. package/dist/src/unstable/commands/renderers/render-toml.d.ts.map +1 -1
  202. package/dist/src/unstable/commands/renderers/render-toml.js +36 -51
  203. package/dist/src/unstable/commands/renderers/render-toml.js.map +1 -1
  204. package/dist/src/unstable/commands/renderers/types.d.ts +45 -39
  205. package/dist/src/unstable/commands/renderers/types.d.ts.map +1 -1
  206. package/dist/src/unstable/commands/renderers/types.js +19 -1
  207. package/dist/src/unstable/commands/renderers/types.js.map +1 -1
  208. package/dist/src/unstable/extensions/agent-overrides.d.ts +45 -0
  209. package/dist/src/unstable/extensions/agent-overrides.d.ts.map +1 -0
  210. package/dist/src/unstable/extensions/agent-overrides.js +66 -0
  211. package/dist/src/unstable/extensions/agent-overrides.js.map +1 -0
  212. package/dist/src/unstable/extensions/common.js +2 -2
  213. package/dist/src/unstable/extensions/common.js.map +1 -1
  214. package/dist/src/unstable/extensions/fqn.d.ts +1 -1
  215. package/dist/src/unstable/extensions/fqn.d.ts.map +1 -1
  216. package/dist/src/unstable/extensions/fqn.js +8 -4
  217. package/dist/src/unstable/extensions/fqn.js.map +1 -1
  218. package/dist/src/unstable/extensions/frontmatter.d.ts.map +1 -1
  219. package/dist/src/unstable/extensions/frontmatter.js +8 -4
  220. package/dist/src/unstable/extensions/frontmatter.js.map +1 -1
  221. package/dist/src/unstable/extensions/index.d.ts +2 -0
  222. package/dist/src/unstable/extensions/index.d.ts.map +1 -1
  223. package/dist/src/unstable/extensions/index.js +2 -0
  224. package/dist/src/unstable/extensions/index.js.map +1 -1
  225. package/dist/src/unstable/extensions/materializable-from-disk.d.ts +24 -0
  226. package/dist/src/unstable/extensions/materializable-from-disk.d.ts.map +1 -0
  227. package/dist/src/unstable/extensions/materializable-from-disk.js +235 -0
  228. package/dist/src/unstable/extensions/materializable-from-disk.js.map +1 -0
  229. package/dist/src/unstable/extensions/reconciliation-utils.js +2 -2
  230. package/dist/src/unstable/extensions/reconciliation-utils.js.map +1 -1
  231. package/dist/src/unstable/extensions/ref-base.d.ts +1 -1
  232. package/dist/src/unstable/extensions/ref-base.d.ts.map +1 -1
  233. package/dist/src/unstable/extensions/utils.d.ts +1 -1
  234. package/dist/src/unstable/extensions/utils.d.ts.map +1 -1
  235. package/dist/src/unstable/extensions/utils.js +3 -3
  236. package/dist/src/unstable/extensions/utils.js.map +1 -1
  237. package/dist/src/unstable/git/operations.d.ts.map +1 -1
  238. package/dist/src/unstable/git/operations.js +2 -8
  239. package/dist/src/unstable/git/operations.js.map +1 -1
  240. package/dist/src/unstable/install-meta/install-meta.d.ts +1 -1
  241. package/dist/src/unstable/install-meta/install-meta.js +1 -1
  242. package/dist/src/unstable/install-meta/install-meta.js.map +1 -1
  243. package/dist/src/unstable/install-method/install-method.d.ts +1 -1
  244. package/dist/src/unstable/install-method/install-method.js +1 -1
  245. package/dist/src/unstable/install-method/install-method.js.map +1 -1
  246. package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.d.ts +4 -0
  247. package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.d.ts.map +1 -0
  248. package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.js +78 -0
  249. package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.js.map +1 -0
  250. package/dist/src/unstable/lint/catalog/workspace.d.ts.map +1 -1
  251. package/dist/src/unstable/lint/catalog/workspace.js +2 -0
  252. package/dist/src/unstable/lint/catalog/workspace.js.map +1 -1
  253. package/dist/src/unstable/lockfile/lockfile.js +10 -10
  254. package/dist/src/unstable/lockfile/lockfile.js.map +1 -1
  255. package/dist/src/unstable/lockfile/resolved-version.js +7 -7
  256. package/dist/src/unstable/lockfile/resolved-version.js.map +1 -1
  257. package/dist/src/unstable/mcp-servers/manager.d.ts +1 -1
  258. package/dist/src/unstable/mcp-servers/manager.d.ts.map +1 -1
  259. package/dist/src/unstable/mcp-servers/manager.js +18 -23
  260. package/dist/src/unstable/mcp-servers/manager.js.map +1 -1
  261. package/dist/src/unstable/mcp-servers/operations/install.d.ts.map +1 -1
  262. package/dist/src/unstable/mcp-servers/operations/install.js +23 -31
  263. package/dist/src/unstable/mcp-servers/operations/install.js.map +1 -1
  264. package/dist/src/unstable/mcp-servers/operations/publish.d.ts.map +1 -1
  265. package/dist/src/unstable/mcp-servers/operations/publish.js +14 -15
  266. package/dist/src/unstable/mcp-servers/operations/publish.js.map +1 -1
  267. package/dist/src/unstable/mcp-servers/operations/uninstall.d.ts.map +1 -1
  268. package/dist/src/unstable/mcp-servers/operations/uninstall.js +10 -17
  269. package/dist/src/unstable/mcp-servers/operations/uninstall.js.map +1 -1
  270. package/dist/src/unstable/mcp-servers/reconciliation-adapter.js +2 -2
  271. package/dist/src/unstable/mcp-servers/reconciliation-adapter.js.map +1 -1
  272. package/dist/src/unstable/packs/dependency-resolution.d.ts.map +1 -1
  273. package/dist/src/unstable/packs/dependency-resolution.js +6 -7
  274. package/dist/src/unstable/packs/dependency-resolution.js.map +1 -1
  275. package/dist/src/unstable/packs/expansion.js +3 -3
  276. package/dist/src/unstable/packs/expansion.js.map +1 -1
  277. package/dist/src/unstable/packs/manager.d.ts +1 -1
  278. package/dist/src/unstable/packs/manager.d.ts.map +1 -1
  279. package/dist/src/unstable/packs/manager.js +8 -10
  280. package/dist/src/unstable/packs/manager.js.map +1 -1
  281. package/dist/src/unstable/packs/operations/add-to-pack.d.ts.map +1 -1
  282. package/dist/src/unstable/packs/operations/add-to-pack.js +16 -12
  283. package/dist/src/unstable/packs/operations/add-to-pack.js.map +1 -1
  284. package/dist/src/unstable/packs/operations/install.d.ts.map +1 -1
  285. package/dist/src/unstable/packs/operations/install.js +19 -15
  286. package/dist/src/unstable/packs/operations/install.js.map +1 -1
  287. package/dist/src/unstable/packs/operations/new-pack.d.ts.map +1 -1
  288. package/dist/src/unstable/packs/operations/new-pack.js +14 -9
  289. package/dist/src/unstable/packs/operations/new-pack.js.map +1 -1
  290. package/dist/src/unstable/packs/operations/publish.d.ts.map +1 -1
  291. package/dist/src/unstable/packs/operations/publish.js +14 -15
  292. package/dist/src/unstable/packs/operations/publish.js.map +1 -1
  293. package/dist/src/unstable/packs/operations/remove-from-pack.d.ts.map +1 -1
  294. package/dist/src/unstable/packs/operations/remove-from-pack.js +16 -12
  295. package/dist/src/unstable/packs/operations/remove-from-pack.js.map +1 -1
  296. package/dist/src/unstable/packs/operations/uninstall.js +3 -3
  297. package/dist/src/unstable/packs/operations/uninstall.js.map +1 -1
  298. package/dist/src/unstable/packs/operations/unpack.d.ts.map +1 -1
  299. package/dist/src/unstable/packs/operations/unpack.js +10 -5
  300. package/dist/src/unstable/packs/operations/unpack.js.map +1 -1
  301. package/dist/src/unstable/plan/apply-plan.d.ts.map +1 -1
  302. package/dist/src/unstable/plan/apply-plan.js +5 -6
  303. package/dist/src/unstable/plan/apply-plan.js.map +1 -1
  304. package/dist/src/unstable/plan/resolve-plan.d.ts.map +1 -1
  305. package/dist/src/unstable/plan/resolve-plan.js +13 -9
  306. package/dist/src/unstable/plan/resolve-plan.js.map +1 -1
  307. package/dist/src/unstable/publish/manifest-policy.d.ts +9 -14
  308. package/dist/src/unstable/publish/manifest-policy.d.ts.map +1 -1
  309. package/dist/src/unstable/publish/manifest-policy.js +13 -0
  310. package/dist/src/unstable/publish/manifest-policy.js.map +1 -1
  311. package/dist/src/unstable/registry/__generated__/registry-client.d.ts +1271 -51
  312. package/dist/src/unstable/registry/__generated__/registry-client.d.ts.map +1 -1
  313. package/dist/src/unstable/registry/__generated__/registry-client.js +403 -47
  314. package/dist/src/unstable/registry/__generated__/registry-client.js.map +1 -1
  315. package/dist/src/unstable/registry/error-mapping.d.ts +7 -6
  316. package/dist/src/unstable/registry/error-mapping.d.ts.map +1 -1
  317. package/dist/src/unstable/registry/error-mapping.js +44 -31
  318. package/dist/src/unstable/registry/error-mapping.js.map +1 -1
  319. package/dist/src/unstable/registry/index.d.ts +1 -1
  320. package/dist/src/unstable/registry/index.d.ts.map +1 -1
  321. package/dist/src/unstable/registry/index.js +1 -1
  322. package/dist/src/unstable/registry/index.js.map +1 -1
  323. package/dist/src/unstable/registry/local-client.d.ts.map +1 -1
  324. package/dist/src/unstable/registry/local-client.js +44 -36
  325. package/dist/src/unstable/registry/local-client.js.map +1 -1
  326. package/dist/src/unstable/registry/remote-client.d.ts.map +1 -1
  327. package/dist/src/unstable/registry/remote-client.js +86 -103
  328. package/dist/src/unstable/registry/remote-client.js.map +1 -1
  329. package/dist/src/unstable/registry/utils.js +8 -8
  330. package/dist/src/unstable/registry/utils.js.map +1 -1
  331. package/dist/src/unstable/settings/ignored-patterns.d.ts.map +1 -1
  332. package/dist/src/unstable/settings/ignored-patterns.js +13 -7
  333. package/dist/src/unstable/settings/ignored-patterns.js.map +1 -1
  334. package/dist/src/unstable/settings/schema.d.ts +1 -1
  335. package/dist/src/unstable/settings/schema.js +1 -1
  336. package/dist/src/unstable/settings/settings.js +6 -6
  337. package/dist/src/unstable/settings/settings.js.map +1 -1
  338. package/dist/src/unstable/skills/index.d.ts +0 -2
  339. package/dist/src/unstable/skills/index.d.ts.map +1 -1
  340. package/dist/src/unstable/skills/index.js +0 -1
  341. package/dist/src/unstable/skills/index.js.map +1 -1
  342. package/dist/src/unstable/skills/manager.d.ts +1 -1
  343. package/dist/src/unstable/skills/manager.d.ts.map +1 -1
  344. package/dist/src/unstable/skills/manager.js +7 -14
  345. package/dist/src/unstable/skills/manager.js.map +1 -1
  346. package/dist/src/unstable/skills/manifest-schema.d.ts +0 -1
  347. package/dist/src/unstable/skills/manifest-schema.d.ts.map +1 -1
  348. package/dist/src/unstable/skills/manifest-schema.js +0 -1
  349. package/dist/src/unstable/skills/manifest-schema.js.map +1 -1
  350. package/dist/src/unstable/skills/materialization.d.ts.map +1 -1
  351. package/dist/src/unstable/skills/materialization.js +11 -12
  352. package/dist/src/unstable/skills/materialization.js.map +1 -1
  353. package/dist/src/unstable/skills/operations/copy.js +6 -6
  354. package/dist/src/unstable/skills/operations/copy.js.map +1 -1
  355. package/dist/src/unstable/skills/operations/disable.d.ts.map +1 -1
  356. package/dist/src/unstable/skills/operations/disable.js +7 -5
  357. package/dist/src/unstable/skills/operations/disable.js.map +1 -1
  358. package/dist/src/unstable/skills/operations/enable.d.ts.map +1 -1
  359. package/dist/src/unstable/skills/operations/enable.js +5 -3
  360. package/dist/src/unstable/skills/operations/enable.js.map +1 -1
  361. package/dist/src/unstable/skills/operations/install.d.ts.map +1 -1
  362. package/dist/src/unstable/skills/operations/install.js +19 -28
  363. package/dist/src/unstable/skills/operations/install.js.map +1 -1
  364. package/dist/src/unstable/skills/operations/new-skill.d.ts.map +1 -1
  365. package/dist/src/unstable/skills/operations/new-skill.js +14 -9
  366. package/dist/src/unstable/skills/operations/new-skill.js.map +1 -1
  367. package/dist/src/unstable/skills/operations/publish.d.ts.map +1 -1
  368. package/dist/src/unstable/skills/operations/publish.js +26 -24
  369. package/dist/src/unstable/skills/operations/publish.js.map +1 -1
  370. package/dist/src/unstable/skills/operations/uninstall.js +4 -4
  371. package/dist/src/unstable/skills/operations/uninstall.js.map +1 -1
  372. package/dist/src/unstable/source-resolution/index.d.ts +1 -0
  373. package/dist/src/unstable/source-resolution/index.d.ts.map +1 -1
  374. package/dist/src/unstable/source-resolution/index.js +1 -0
  375. package/dist/src/unstable/source-resolution/index.js.map +1 -1
  376. package/dist/src/unstable/source-resolution/providers/azurerepos/repo-exists.d.ts.map +1 -1
  377. package/dist/src/unstable/source-resolution/providers/azurerepos/repo-exists.js +4 -6
  378. package/dist/src/unstable/source-resolution/providers/azurerepos/repo-exists.js.map +1 -1
  379. package/dist/src/unstable/source-resolution/providers/azurerepos/scp.d.ts.map +1 -1
  380. package/dist/src/unstable/source-resolution/providers/azurerepos/scp.js +4 -6
  381. package/dist/src/unstable/source-resolution/providers/azurerepos/scp.js.map +1 -1
  382. package/dist/src/unstable/source-resolution/providers/azurerepos/url.d.ts.map +1 -1
  383. package/dist/src/unstable/source-resolution/providers/azurerepos/url.js +6 -9
  384. package/dist/src/unstable/source-resolution/providers/azurerepos/url.js.map +1 -1
  385. package/dist/src/unstable/source-resolution/providers/bitbucket/resolve-repo.d.ts.map +1 -1
  386. package/dist/src/unstable/source-resolution/providers/bitbucket/resolve-repo.js +3 -4
  387. package/dist/src/unstable/source-resolution/providers/bitbucket/resolve-repo.js.map +1 -1
  388. package/dist/src/unstable/source-resolution/providers/bitbucket/scp.d.ts.map +1 -1
  389. package/dist/src/unstable/source-resolution/providers/bitbucket/scp.js +4 -6
  390. package/dist/src/unstable/source-resolution/providers/bitbucket/scp.js.map +1 -1
  391. package/dist/src/unstable/source-resolution/providers/bitbucket/url.d.ts.map +1 -1
  392. package/dist/src/unstable/source-resolution/providers/bitbucket/url.js +6 -9
  393. package/dist/src/unstable/source-resolution/providers/bitbucket/url.js.map +1 -1
  394. package/dist/src/unstable/source-resolution/providers/git-hosting.d.ts.map +1 -1
  395. package/dist/src/unstable/source-resolution/providers/git-hosting.js +6 -8
  396. package/dist/src/unstable/source-resolution/providers/git-hosting.js.map +1 -1
  397. package/dist/src/unstable/source-resolution/providers/git.js +4 -4
  398. package/dist/src/unstable/source-resolution/providers/git.js.map +1 -1
  399. package/dist/src/unstable/source-resolution/providers/github/resolve-repo.d.ts.map +1 -1
  400. package/dist/src/unstable/source-resolution/providers/github/resolve-repo.js +3 -4
  401. package/dist/src/unstable/source-resolution/providers/github/resolve-repo.js.map +1 -1
  402. package/dist/src/unstable/source-resolution/providers/github/scp.d.ts.map +1 -1
  403. package/dist/src/unstable/source-resolution/providers/github/scp.js +4 -6
  404. package/dist/src/unstable/source-resolution/providers/github/scp.js.map +1 -1
  405. package/dist/src/unstable/source-resolution/providers/github/url.d.ts.map +1 -1
  406. package/dist/src/unstable/source-resolution/providers/github/url.js +6 -9
  407. package/dist/src/unstable/source-resolution/providers/github/url.js.map +1 -1
  408. package/dist/src/unstable/source-resolution/providers/gitlab/resolve-repo.d.ts.map +1 -1
  409. package/dist/src/unstable/source-resolution/providers/gitlab/resolve-repo.js +3 -4
  410. package/dist/src/unstable/source-resolution/providers/gitlab/resolve-repo.js.map +1 -1
  411. package/dist/src/unstable/source-resolution/providers/gitlab/scp.d.ts.map +1 -1
  412. package/dist/src/unstable/source-resolution/providers/gitlab/scp.js +4 -6
  413. package/dist/src/unstable/source-resolution/providers/gitlab/scp.js.map +1 -1
  414. package/dist/src/unstable/source-resolution/providers/gitlab/url.d.ts.map +1 -1
  415. package/dist/src/unstable/source-resolution/providers/gitlab/url.js +6 -9
  416. package/dist/src/unstable/source-resolution/providers/gitlab/url.js.map +1 -1
  417. package/dist/src/unstable/source-resolution/providers/local.d.ts.map +1 -1
  418. package/dist/src/unstable/source-resolution/providers/local.js +4 -5
  419. package/dist/src/unstable/source-resolution/providers/local.js.map +1 -1
  420. package/dist/src/unstable/source-resolution/providers/parse-provider-shorthand.d.ts +1 -1
  421. package/dist/src/unstable/source-resolution/providers/parse-provider-shorthand.d.ts.map +1 -1
  422. package/dist/src/unstable/source-resolution/providers/parse-provider-shorthand.js +5 -7
  423. package/dist/src/unstable/source-resolution/providers/parse-provider-shorthand.js.map +1 -1
  424. package/dist/src/unstable/source-resolution/providers/registry/host-provider.d.ts.map +1 -1
  425. package/dist/src/unstable/source-resolution/providers/registry/host-provider.js +6 -7
  426. package/dist/src/unstable/source-resolution/providers/registry/host-provider.js.map +1 -1
  427. package/dist/src/unstable/source-resolution/resolve-identifier.d.ts +61 -0
  428. package/dist/src/unstable/source-resolution/resolve-identifier.d.ts.map +1 -0
  429. package/dist/src/unstable/source-resolution/resolve-identifier.js +322 -0
  430. package/dist/src/unstable/source-resolution/resolve-identifier.js.map +1 -0
  431. package/dist/src/unstable/source-resolution/resolve-source-pattern.d.ts.map +1 -1
  432. package/dist/src/unstable/source-resolution/resolve-source-pattern.js +10 -6
  433. package/dist/src/unstable/source-resolution/resolve-source-pattern.js.map +1 -1
  434. package/dist/src/unstable/source-resolution/resolve-source.d.ts +2 -2
  435. package/dist/src/unstable/source-resolution/resolve-source.d.ts.map +1 -1
  436. package/dist/src/unstable/source-resolution/resolve-source.js +50 -73
  437. package/dist/src/unstable/source-resolution/resolve-source.js.map +1 -1
  438. package/dist/src/unstable/source-resolution/service.d.ts +1 -1
  439. package/dist/src/unstable/source-resolution/service.d.ts.map +1 -1
  440. package/dist/src/unstable/source-resolution/service.js +1 -1
  441. package/dist/src/unstable/source-resolution/service.js.map +1 -1
  442. package/dist/src/unstable/sources/lock-entry-to-ref.js +8 -8
  443. package/dist/src/unstable/sources/lock-entry-to-ref.js.map +1 -1
  444. package/dist/src/unstable/subagents/index.d.ts +3 -4
  445. package/dist/src/unstable/subagents/index.d.ts.map +1 -1
  446. package/dist/src/unstable/subagents/index.js +3 -5
  447. package/dist/src/unstable/subagents/index.js.map +1 -1
  448. package/dist/src/unstable/subagents/manager.d.ts +1 -1
  449. package/dist/src/unstable/subagents/manager.d.ts.map +1 -1
  450. package/dist/src/unstable/subagents/manager.js +51 -65
  451. package/dist/src/unstable/subagents/manager.js.map +1 -1
  452. package/dist/src/unstable/subagents/manifest-schema.d.ts +4 -7
  453. package/dist/src/unstable/subagents/manifest-schema.d.ts.map +1 -1
  454. package/dist/src/unstable/subagents/manifest-schema.js +5 -10
  455. package/dist/src/unstable/subagents/manifest-schema.js.map +1 -1
  456. package/dist/src/unstable/subagents/operations/disable.d.ts.map +1 -1
  457. package/dist/src/unstable/subagents/operations/disable.js +7 -5
  458. package/dist/src/unstable/subagents/operations/disable.js.map +1 -1
  459. package/dist/src/unstable/subagents/operations/enable.d.ts +1 -1
  460. package/dist/src/unstable/subagents/operations/enable.d.ts.map +1 -1
  461. package/dist/src/unstable/subagents/operations/enable.js +39 -16
  462. package/dist/src/unstable/subagents/operations/enable.js.map +1 -1
  463. package/dist/src/unstable/subagents/operations/publish.d.ts +1 -1
  464. package/dist/src/unstable/subagents/operations/publish.d.ts.map +1 -1
  465. package/dist/src/unstable/subagents/operations/publish.js +53 -52
  466. package/dist/src/unstable/subagents/operations/publish.js.map +1 -1
  467. package/dist/src/unstable/subagents/paths.d.ts +7 -1
  468. package/dist/src/unstable/subagents/paths.d.ts.map +1 -1
  469. package/dist/src/unstable/subagents/paths.js +7 -1
  470. package/dist/src/unstable/subagents/paths.js.map +1 -1
  471. package/dist/src/unstable/subagents/rendering/adapters/json.d.ts +2 -1
  472. package/dist/src/unstable/subagents/rendering/adapters/json.d.ts.map +1 -1
  473. package/dist/src/unstable/subagents/rendering/adapters/json.js +7 -39
  474. package/dist/src/unstable/subagents/rendering/adapters/json.js.map +1 -1
  475. package/dist/src/unstable/subagents/rendering/adapters/markdown-yaml.d.ts +2 -1
  476. package/dist/src/unstable/subagents/rendering/adapters/markdown-yaml.d.ts.map +1 -1
  477. package/dist/src/unstable/subagents/rendering/adapters/markdown-yaml.js +17 -101
  478. package/dist/src/unstable/subagents/rendering/adapters/markdown-yaml.js.map +1 -1
  479. package/dist/src/unstable/subagents/rendering/adapters/roo.d.ts +5 -1
  480. package/dist/src/unstable/subagents/rendering/adapters/roo.d.ts.map +1 -1
  481. package/dist/src/unstable/subagents/rendering/adapters/roo.js +18 -36
  482. package/dist/src/unstable/subagents/rendering/adapters/roo.js.map +1 -1
  483. package/dist/src/unstable/subagents/rendering/adapters/toml.d.ts +3 -2
  484. package/dist/src/unstable/subagents/rendering/adapters/toml.d.ts.map +1 -1
  485. package/dist/src/unstable/subagents/rendering/adapters/toml.js +24 -54
  486. package/dist/src/unstable/subagents/rendering/adapters/toml.js.map +1 -1
  487. package/dist/src/unstable/subagents/rendering/index.d.ts +1 -4
  488. package/dist/src/unstable/subagents/rendering/index.d.ts.map +1 -1
  489. package/dist/src/unstable/subagents/rendering/index.js +1 -2
  490. package/dist/src/unstable/subagents/rendering/index.js.map +1 -1
  491. package/dist/src/unstable/subagents/rendering/overrides.d.ts +2 -0
  492. package/dist/src/unstable/subagents/rendering/overrides.d.ts.map +1 -0
  493. package/dist/src/unstable/subagents/rendering/overrides.js +2 -0
  494. package/dist/src/unstable/subagents/rendering/overrides.js.map +1 -0
  495. package/dist/src/unstable/subagents/rendering/types.d.ts +9 -16
  496. package/dist/src/unstable/subagents/rendering/types.d.ts.map +1 -1
  497. package/dist/src/unstable/subagents/rendering/types.js +3 -2
  498. package/dist/src/unstable/subagents/rendering/types.js.map +1 -1
  499. package/dist/src/unstable/subagents/subagent-content.d.ts +16 -56
  500. package/dist/src/unstable/subagents/subagent-content.d.ts.map +1 -1
  501. package/dist/src/unstable/subagents/subagent-content.js +69 -60
  502. package/dist/src/unstable/subagents/subagent-content.js.map +1 -1
  503. package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts +10 -10
  504. package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts.map +1 -1
  505. package/dist/src/unstable/telemetry/__generated__/telemetry-client.js +8 -5
  506. package/dist/src/unstable/telemetry/__generated__/telemetry-client.js.map +1 -1
  507. package/dist/src/unstable/telemetry/client.d.ts +2 -2
  508. package/dist/src/unstable/telemetry/client.d.ts.map +1 -1
  509. package/dist/src/unstable/telemetry/client.js +5 -2
  510. package/dist/src/unstable/telemetry/client.js.map +1 -1
  511. package/dist/src/unstable/update-check/update-check.d.ts +1 -1
  512. package/dist/src/unstable/update-check/update-check.js +1 -1
  513. package/dist/src/unstable/update-check/update-check.js.map +1 -1
  514. package/dist/src/unstable/utils/build-zip-archive.d.ts.map +1 -1
  515. package/dist/src/unstable/utils/build-zip-archive.js +11 -6
  516. package/dist/src/unstable/utils/build-zip-archive.js.map +1 -1
  517. package/dist/src/unstable/utils/create-symlink.js +8 -8
  518. package/dist/src/unstable/utils/create-symlink.js.map +1 -1
  519. package/dist/src/unstable/version-resolution/version-resolution.d.ts.map +1 -1
  520. package/dist/src/unstable/version-resolution/version-resolution.js +38 -21
  521. package/dist/src/unstable/version-resolution/version-resolution.js.map +1 -1
  522. package/dist/src/unstable/workspace/configured-entry-resolution/resolve.d.ts.map +1 -1
  523. package/dist/src/unstable/workspace/configured-entry-resolution/resolve.js +101 -67
  524. package/dist/src/unstable/workspace/configured-entry-resolution/resolve.js.map +1 -1
  525. package/dist/src/unstable/workspace/configured-entry-resolution/timeout.d.ts +1 -1
  526. package/dist/src/unstable/workspace/configured-entry-resolution/timeout.d.ts.map +1 -1
  527. package/dist/src/unstable/workspace/configured-entry-resolution/timeout.js +3 -4
  528. package/dist/src/unstable/workspace/configured-entry-resolution/timeout.js.map +1 -1
  529. package/dist/src/unstable/workspace/configured-entry-resolution/types.d.ts.map +1 -1
  530. package/dist/src/unstable/workspace/configured-entry-resolution/types.js +5 -8
  531. package/dist/src/unstable/workspace/configured-entry-resolution/types.js.map +1 -1
  532. package/dist/src/unstable/workspace/index.d.ts +1 -0
  533. package/dist/src/unstable/workspace/index.d.ts.map +1 -1
  534. package/dist/src/unstable/workspace/index.js +1 -0
  535. package/dist/src/unstable/workspace/index.js.map +1 -1
  536. package/dist/src/unstable/workspace/initialization-interaction.d.ts +1 -1
  537. package/dist/src/unstable/workspace/initialization-interaction.d.ts.map +1 -1
  538. package/dist/src/unstable/workspace/initialization-interaction.js +1 -1
  539. package/dist/src/unstable/workspace/initialization-interaction.js.map +1 -1
  540. package/dist/src/unstable/workspace/initialization.d.ts +24 -24
  541. package/dist/src/unstable/workspace/initialization.d.ts.map +1 -1
  542. package/dist/src/unstable/workspace/initialization.js +13 -11
  543. package/dist/src/unstable/workspace/initialization.js.map +1 -1
  544. package/dist/src/unstable/workspace/read-model/__fixtures__/occurrences.d.ts.map +1 -1
  545. package/dist/src/unstable/workspace/read-model/__fixtures__/occurrences.js +8 -9
  546. package/dist/src/unstable/workspace/read-model/__fixtures__/occurrences.js.map +1 -1
  547. package/dist/src/unstable/workspace/read-model/agent-root-resolver.d.ts +1 -1
  548. package/dist/src/unstable/workspace/read-model/agent-root-resolver.d.ts.map +1 -1
  549. package/dist/src/unstable/workspace/read-model/agent-root-resolver.js +1 -1
  550. package/dist/src/unstable/workspace/read-model/agent-root-resolver.js.map +1 -1
  551. package/dist/src/unstable/workspace/read-model/discovery/skills.js +4 -4
  552. package/dist/src/unstable/workspace/read-model/discovery/skills.js.map +1 -1
  553. package/dist/src/unstable/workspace/read-model/discovery/subagents.js +2 -2
  554. package/dist/src/unstable/workspace/read-model/discovery/subagents.js.map +1 -1
  555. package/dist/src/unstable/workspace/read-model/extensions/subagent.js +1 -1
  556. package/dist/src/unstable/workspace/read-model/extensions/subagent.js.map +1 -1
  557. package/dist/src/unstable/workspace/read-model/scanners/agent-dir.js +11 -7
  558. package/dist/src/unstable/workspace/read-model/scanners/agent-dir.js.map +1 -1
  559. package/dist/src/unstable/workspace/read-model/scanners/canonical-extensions.js +12 -8
  560. package/dist/src/unstable/workspace/read-model/scanners/canonical-extensions.js.map +1 -1
  561. package/dist/src/unstable/workspace/read-model/scanners/types.d.ts +2 -2
  562. package/dist/src/unstable/workspace/read-model/service.d.ts +1 -1
  563. package/dist/src/unstable/workspace/read-model/service.d.ts.map +1 -1
  564. package/dist/src/unstable/workspace/read-model/service.js +1 -1
  565. package/dist/src/unstable/workspace/read-model/service.js.map +1 -1
  566. package/dist/src/unstable/workspace/reconciliation.d.ts +1 -1
  567. package/dist/src/unstable/workspace/reconciliation.d.ts.map +1 -1
  568. package/dist/src/unstable/workspace/reconciliation.js +13 -15
  569. package/dist/src/unstable/workspace/reconciliation.js.map +1 -1
  570. package/dist/src/unstable/workspace/rendered-file-cleanup.d.ts +15 -0
  571. package/dist/src/unstable/workspace/rendered-file-cleanup.d.ts.map +1 -0
  572. package/dist/src/unstable/workspace/rendered-file-cleanup.js +58 -0
  573. package/dist/src/unstable/workspace/rendered-file-cleanup.js.map +1 -0
  574. package/dist/src/unstable/workspace/resolve-plan-interaction.d.ts +1 -1
  575. package/dist/src/unstable/workspace/resolve-plan-interaction.d.ts.map +1 -1
  576. package/dist/src/unstable/workspace/resolve-plan-interaction.js +1 -1
  577. package/dist/src/unstable/workspace/resolve-plan-interaction.js.map +1 -1
  578. package/dist/src/unstable/workspace/service-interface.d.ts +1 -3
  579. package/dist/src/unstable/workspace/service-interface.d.ts.map +1 -1
  580. package/dist/src/unstable/workspace/service-interface.js +1 -1
  581. package/dist/src/unstable/workspace/service-interface.js.map +1 -1
  582. package/dist/src/unstable/workspace/service.d.ts +46 -47
  583. package/dist/src/unstable/workspace/service.d.ts.map +1 -1
  584. package/dist/src/unstable/workspace/service.js +24 -43
  585. package/dist/src/unstable/workspace/service.js.map +1 -1
  586. package/dist/src/unstable/workspace/skill-snapshot.js +1 -1
  587. package/dist/src/unstable/workspace/skill-snapshot.js.map +1 -1
  588. package/dist/src/unstable/workspace/test-stubs.d.ts.map +1 -1
  589. package/dist/src/unstable/workspace/test-stubs.js +0 -1
  590. package/dist/src/unstable/workspace/test-stubs.js.map +1 -1
  591. package/package.json +11 -11
  592. package/site-content/__generated__/schemas/command.schema.json +0 -6
  593. package/site-content/__generated__/schemas/skill.schema.json +1 -7
  594. package/dist/src/unstable/cli-runtime/command-document.d.ts +0 -12
  595. package/dist/src/unstable/cli-runtime/command-document.d.ts.map +0 -1
  596. package/dist/src/unstable/cli-runtime/command-document.js +0 -13
  597. package/dist/src/unstable/cli-runtime/command-document.js.map +0 -1
  598. package/dist/src/unstable/skills/operations/rename.d.ts +0 -34
  599. package/dist/src/unstable/skills/operations/rename.d.ts.map +0 -1
  600. package/dist/src/unstable/skills/operations/rename.js +0 -117
  601. package/dist/src/unstable/skills/operations/rename.js.map +0 -1
  602. package/dist/src/unstable/subagents/rendering/model-mapping.d.ts +0 -31
  603. package/dist/src/unstable/subagents/rendering/model-mapping.d.ts.map +0 -1
  604. package/dist/src/unstable/subagents/rendering/model-mapping.js +0 -127
  605. package/dist/src/unstable/subagents/rendering/model-mapping.js.map +0 -1
  606. package/dist/src/unstable/subagents/rendering/tool-access-mapping.d.ts +0 -31
  607. package/dist/src/unstable/subagents/rendering/tool-access-mapping.d.ts.map +0 -1
  608. package/dist/src/unstable/subagents/rendering/tool-access-mapping.js +0 -169
  609. package/dist/src/unstable/subagents/rendering/tool-access-mapping.js.map +0 -1
  610. package/dist/src/unstable/subagents/tool-access.d.ts +0 -11
  611. package/dist/src/unstable/subagents/tool-access.d.ts.map +0 -1
  612. package/dist/src/unstable/subagents/tool-access.js +0 -15
  613. package/dist/src/unstable/subagents/tool-access.js.map +0 -1
@@ -11,6 +11,7 @@ import * as FileSystem from "effect/FileSystem";
11
11
  import * as Path from "effect/Path";
12
12
  import * as Effect from "effect/Effect";
13
13
  import * as Option from "effect/Option";
14
+ import * as Result from "effect/Result";
14
15
  import * as Schema from "effect/Schema";
15
16
  import { REGISTRY_EXTENSIONS_DIR, parseFqn } from "../../extensions/index.js";
16
17
  import { SubagentManifestSchema, MANIFEST_FILENAME, } from "../manifest-schema.js";
@@ -18,7 +19,9 @@ import { createRegistryClient } from "../../registry/index.js";
18
19
  import { buildZipArchive, computeIntegrity } from "../../utils/index.js";
19
20
  import { makeAppError } from "../../app-error/index.js";
20
21
  import { WorkspaceMutations } from "../../workspace/service-interface.js";
21
- import { parseSubagentMd, projectFrontmatterToManifest } from "../subagent-content.js";
22
+ import { validateManifestHasNoAgentsField } from "../../publish/manifest-policy.js";
23
+ import { parseSubagentMd } from "../subagent-content.js";
24
+ import { subagentContentFilename, subagentContentPath } from "../paths.js";
22
25
  // -----------------------------------------------------------------------------
23
26
  // Public API
24
27
  // -----------------------------------------------------------------------------
@@ -26,7 +29,7 @@ import { parseSubagentMd, projectFrontmatterToManifest } from "../subagent-conte
26
29
  * Publish-subagent operation handler.
27
30
  *
28
31
  * 1. Read and validate `subagent.json` manifest
29
- * 2. Sync frontmatter fields from SUBAGENT.md to manifest
32
+ * 2. Validate the content file exists and its frontmatter `name` matches the manifest
30
33
  * 3. Build zip archive of extension directory
31
34
  * 4. Compute SRI integrity hash
32
35
  * 5. Resolve target registry provider by source name
@@ -45,15 +48,15 @@ export const publishSubagent = (op) => Effect.gen(function* () {
45
48
  .pipe(Effect.orElseSucceed(() => false));
46
49
  if (!extensionDirExists) {
47
50
  return yield* makeAppError({
48
- code: "PUBLISH_SUBAGENT_NOT_FOUND",
49
- what: `Managed subagent not found: ${extensionDir}`,
51
+ code: "not_found",
52
+ message: `Managed subagent not found: ${extensionDir}`,
50
53
  });
51
54
  }
52
55
  // Read and validate manifest
53
56
  const manifestPath = path.join(extensionDir, MANIFEST_FILENAME);
54
57
  const manifestContent = yield* fs.readFileString(manifestPath).pipe(Effect.mapError((e) => makeAppError({
55
- code: "PUBLISH_SUBAGENT_MANIFEST_READ_FAILED",
56
- what: `Failed to read manifest: ${manifestPath}`,
58
+ code: "internal",
59
+ message: `Failed to read manifest: ${manifestPath}`,
57
60
  cause: e,
58
61
  })));
59
62
  const manifestJson = yield* Effect.try({
@@ -62,64 +65,69 @@ export const publishSubagent = (op) => Effect.gen(function* () {
62
65
  return parsed;
63
66
  },
64
67
  catch: (e) => makeAppError({
65
- code: "PUBLISH_SUBAGENT_MANIFEST_PARSE_FAILED",
66
- what: `Invalid JSON in manifest: ${manifestPath}`,
68
+ code: "validation",
69
+ message: `Invalid JSON in manifest: ${manifestPath}`,
67
70
  cause: e,
68
71
  }),
69
72
  });
70
- let manifest = yield* Schema.decodeUnknownEffect(SubagentManifestSchema)(manifestJson).pipe(Effect.mapError((e) => makeAppError({
71
- code: "PUBLISH_SUBAGENT_MANIFEST_SCHEMA_INVALID",
72
- what: `Invalid manifest schema: ${manifestPath}`,
73
+ const agentsFieldValidation = validateManifestHasNoAgentsField(MANIFEST_FILENAME, manifestJson);
74
+ if (Result.isFailure(agentsFieldValidation)) {
75
+ return yield* makeAppError({
76
+ code: "validation",
77
+ message: agentsFieldValidation.failure.detail,
78
+ });
79
+ }
80
+ const manifest = yield* Schema.decodeUnknownEffect(SubagentManifestSchema)(manifestJson).pipe(Effect.mapError((e) => makeAppError({
81
+ code: "validation",
82
+ message: `Invalid manifest schema: ${manifestPath}`,
73
83
  cause: e,
74
84
  })));
75
- // Sync frontmatter fields from SUBAGENT.md to manifest
76
- const contentPath = path.join(extensionDir, "src", "SUBAGENT.md");
85
+ // Validate that the content file exists at the expected path and that its
86
+ // frontmatter `name` matches the manifest. The manifest is the source of
87
+ // truth for portable fields; this check just guards against drift.
88
+ const contentRoot = path.join(extensionDir, "src");
89
+ const expectedFilename = subagentContentFilename(manifest.name);
90
+ const contentPath = subagentContentPath(path.join, contentRoot, manifest.name);
77
91
  const contentExists = yield* fs.exists(contentPath).pipe(Effect.orElseSucceed(() => false));
78
- if (contentExists) {
79
- const rawContent = yield* fs.readFileString(contentPath).pipe(Effect.mapError((e) => makeAppError({
80
- code: "PUBLISH_SUBAGENT_CONTENT_READ_FAILED",
81
- what: `Failed to read SUBAGENT.md: ${contentPath}`,
82
- cause: e,
83
- })));
84
- const parsed = yield* parseSubagentMd(rawContent);
85
- if (Option.isSome(parsed.frontmatter)) {
86
- const projected = projectFrontmatterToManifest(parsed.frontmatter.value);
87
- manifest = {
88
- ...manifest,
89
- ...(projected.description !== undefined && { description: projected.description }),
90
- ...(projected.model !== undefined && { model: projected.model }),
91
- ...(projected.toolAccess !== undefined && { toolAccess: projected.toolAccess }),
92
- ...(projected.background !== undefined && { background: projected.background }),
93
- };
94
- // Write synced manifest back to disk
95
- yield* fs.writeFileString(manifestPath, JSON.stringify(manifest, null, 2) + "\n").pipe(Effect.mapError((e) => makeAppError({
96
- code: "PUBLISH_SUBAGENT_MANIFEST_WRITE_FAILED",
97
- what: `Failed to write synced manifest: ${manifestPath}`,
98
- cause: e,
99
- })));
100
- }
92
+ if (!contentExists) {
93
+ return yield* makeAppError({
94
+ code: "not_found",
95
+ message: `Missing subagent content file: expected ${expectedFilename}`,
96
+ breadcrumbs: [
97
+ {
98
+ task: "Recover",
99
+ description: `Rename the subagent content file to ${expectedFilename} and ensure its frontmatter name is ${manifest.name}.`,
100
+ },
101
+ ],
102
+ });
101
103
  }
104
+ const rawContent = yield* fs.readFileString(contentPath).pipe(Effect.mapError((e) => makeAppError({
105
+ code: "internal",
106
+ message: `Failed to read ${expectedFilename}: ${contentPath}`,
107
+ cause: e,
108
+ })));
109
+ yield* parseSubagentMd(rawContent, manifest.name);
102
110
  // Build zip archive from extension directory (includes manifest + src/)
103
111
  const archive = yield* buildZipArchive(extensionDir, "PUBLISH_SUBAGENT_ARCHIVE_FAILED");
104
112
  // Compute integrity
105
113
  const integrity = yield* computeIntegrity(archive);
106
114
  // Resolve target registry source
107
115
  const registrySource = yield* ws.getConfiguredSourceByName(op.args.registryName).pipe(Effect.mapError((e) => makeAppError({
108
- code: "PUBLISH_SUBAGENT_REGISTRY_LOOKUP_FAILED",
109
- what: `Failed to lookup registry source "${op.args.registryName}"`,
116
+ code: "internal",
117
+ message: `Failed to lookup registry source "${op.args.registryName}"`,
110
118
  cause: e,
111
119
  })));
112
120
  if (Option.isNone(registrySource)) {
113
121
  return yield* makeAppError({
114
- code: "PUBLISH_SUBAGENT_REGISTRY_NOT_FOUND",
115
- what: `Registry source "${op.args.registryName}" not found or not a registry source`,
122
+ code: "not_found",
123
+ message: `Registry source "${op.args.registryName}" not found or not a registry source`,
116
124
  });
117
125
  }
118
126
  const source = registrySource.value;
119
127
  if (source.type !== "registry") {
120
128
  return yield* makeAppError({
121
- code: "PUBLISH_SUBAGENT_REGISTRY_NOT_FOUND",
122
- what: `Registry source "${op.args.registryName}" not found or not a registry source`,
129
+ code: "not_found",
130
+ message: `Registry source "${op.args.registryName}" not found or not a registry source`,
123
131
  });
124
132
  }
125
133
  const registryUrl = source.location.href;
@@ -144,16 +152,9 @@ export const publishSubagent = (op) => Effect.gen(function* () {
144
152
  metadata: versionEntry,
145
153
  })
146
154
  .pipe(Effect.mapError((e) => makeAppError({
147
- code: "PUBLISH_SUBAGENT_PUBLISH_FAILED",
148
- what: `Failed to publish to registry "${op.args.registryName}"`,
149
- details: [
150
- `Registry source: ${op.args.registryName}`,
151
- `Registry URL: ${registryUrl}`,
152
- `Extension: ${op.args.name}@${manifest.version}`,
153
- `Registry error: ${e.what} (${e.code})`,
154
- ...e.details,
155
- ],
156
- ...(Option.isSome(e.howToFix) && { howToFix: e.howToFix.value }),
155
+ code: "network",
156
+ message: `Registry publish did not complete "${op.args.registryName}"`,
157
+ breadcrumbs: e.breadcrumbs ?? [],
157
158
  cause: e,
158
159
  })));
159
160
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../../src/unstable/subagents/operations/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,Q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C,KAAK,CAAC,CAAC,MAAM;SACV,gBAAgB,CAAC;QAChB,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,OAAO;QACP,QAAQ,EAAE,YAAY;KACvB,CAAC;SACD,IAAI,CACH,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CACpB,YAAY,CAAC;QACX,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,sCAAsC,EAAE,CAAC,IAAI,CAAC,YAAY,GAAG;QACtE,WAAW,EAAE,CAAC,CAAC,WAAW,IAAI,EAAE;QAChC,KAAK,EAAE,CAAC;KACT,CAAC,CACH,CACF,CAAC;IAEJ,OAAO;QACL,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,aAAa,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,OAAO,EAAE;KACjC,CAAC;AAC5B,CAAC,CAAC,CAAC"}
@@ -42,7 +42,13 @@ export interface SubagentDirPaths {
42
42
  *
43
43
  * @experimental This API is unstable and may change without notice.
44
44
  */
45
- export declare const SUBAGENT_CONTENT_FILENAME = "SUBAGENT.md";
45
+ export declare const subagentContentFilename: (name: string) => string;
46
+ /**
47
+ * Content path for subagent instructions.
48
+ *
49
+ * @experimental This API is unstable and may change without notice.
50
+ */
51
+ export declare const subagentContentPath: (join: (...paths: string[]) => string, root: string, name: string) => string;
46
52
  /**
47
53
  * Pure function to compute subagent directory paths.
48
54
  *
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../../src/unstable/subagents/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,OAAO,EAA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,MAAM,MAAM,EACZ,MAAM,MAAM,KACX,MAAmD,CAAC;AAEvD;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,GAC/B,MAAM,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,EACpC,MAAM,MAAM,EACZ,QAAQ,kBAAkB,EAC1B,eAAe,MAAM,KACpB,gBAaF,CAAC"}
@@ -12,7 +12,13 @@ import { EXTERNAL_EXTENSIONS_DIR, REGISTRY_EXTENSIONS_DIR } from "../extensions/
12
12
  *
13
13
  * @experimental This API is unstable and may change without notice.
14
14
  */
15
- export const SUBAGENT_CONTENT_FILENAME = "SUBAGENT.md";
15
+ export const subagentContentFilename = (name) => `${name}.md`;
16
+ /**
17
+ * Content path for subagent instructions.
18
+ *
19
+ * @experimental This API is unstable and may change without notice.
20
+ */
21
+ export const subagentContentPath = (join, root, name) => join(root, subagentContentFilename(name));
16
22
  /**
17
23
  * Pure function to compute subagent directory paths.
18
24
  *
@@ -1 +1 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../../src/unstable/subagents/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAgC1F;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,aAAa,CAAC;AAEvD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,IAAoC,EACpC,IAAY,EACZ,MAA0B,EAC1B,aAAqB,EACH,EAAE;IACpB,IAAI,MAAM,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;QAClC,MAAM,aAAa,GAAG,IAAI,CACxB,IAAI,EACJ,uBAAuB,EACvB,MAAM,CAAC,KAAK,EACZ,WAAW,EACX,aAAa,CACd,CAAC;QACF,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IACxE,CAAC;IACD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,EAAE,uBAAuB,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;IACtF,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;AAC3D,CAAC,CAAC"}
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../../src/unstable/subagents/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAgC1F;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,GAAG,IAAI,KAAK,CAAC;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,IAAoC,EACpC,IAAY,EACZ,IAAY,EACJ,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC;AAEvD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,IAAoC,EACpC,IAAY,EACZ,MAA0B,EAC1B,aAAqB,EACH,EAAE;IACpB,IAAI,MAAM,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;QAClC,MAAM,aAAa,GAAG,IAAI,CACxB,IAAI,EACJ,uBAAuB,EACvB,MAAM,CAAC,KAAK,EACZ,WAAW,EACX,aAAa,CACd,CAAC;QACF,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IACxE,CAAC;IACD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,EAAE,uBAAuB,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;IACtF,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;AAC3D,CAAC,CAAC"}
@@ -2,7 +2,8 @@
2
2
  * JSON adapter for subagent rendering.
3
3
  *
4
4
  * For: Kiro CLI.
5
- * Produces `.json` with `name`, `description`, `prompt` (from body), and `model`.
5
+ * Emits the user's frontmatter keys as a JSON object and the body as the
6
+ * `prompt` field. `agentOverrides[kiro]` is merged on top.
6
7
  *
7
8
  * @experimental This API is unstable and may change without notice.
8
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/json.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,EAAY,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAM7F;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,mBAAmB,KAAG,qBA6CvD,CAAC"}
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/json.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAY,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAM7F;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,mBAAmB,KAAG,qBAOvD,CAAC"}
@@ -2,13 +2,13 @@
2
2
  * JSON adapter for subagent rendering.
3
3
  *
4
4
  * For: Kiro CLI.
5
- * Produces `.json` with `name`, `description`, `prompt` (from body), and `model`.
5
+ * Emits the user's frontmatter keys as a JSON object and the body as the
6
+ * `prompt` field. `agentOverrides[kiro]` is merged on top.
6
7
  *
7
8
  * @experimental This API is unstable and may change without notice.
8
9
  */
9
10
  import * as Schema from "effect/Schema";
10
- import { mapModelTier } from "../model-mapping.js";
11
- import { mapToolAccess } from "../tool-access-mapping.js";
11
+ import { applyOverrides } from "../overrides.js";
12
12
  import { rendered } from "../types.js";
13
13
  const decodeRenderedFilePath = Schema.decodeUnknownSync(Schema.String.pipe(Schema.brand("RenderedFilePath")));
14
14
  /**
@@ -17,42 +17,10 @@ const decodeRenderedFilePath = Schema.decodeUnknownSync(Schema.String.pipe(Schem
17
17
  * @experimental This API is unstable and may change without notice.
18
18
  */
19
19
  export const renderJson = (input) => {
20
- const warnings = [];
21
- const obj = {
22
- name: input.name,
23
- description: input.description,
24
- prompt: input.body,
25
- };
26
- // Model mapping
27
- const modelResult = mapModelTier(input.model, "kiro");
28
- if (modelResult.value !== undefined) {
29
- obj["model"] = modelResult.value;
30
- }
31
- if (modelResult.warning !== undefined) {
32
- warnings.push(modelResult.warning);
33
- }
34
- // Tool access mapping
35
- const toolResult = mapToolAccess(input.toolAccess, "kiro");
36
- for (const [key, value] of Object.entries(toolResult.fields)) {
37
- obj[key] = value;
38
- }
39
- warnings.push(...toolResult.warnings);
40
- // Background — Kiro does not support background mode
41
- if (input.background === true) {
42
- warnings.push({
43
- agent: "kiro",
44
- feature: "background",
45
- message: "Kiro CLI does not support background mode; background: true will be ignored",
46
- });
47
- }
48
- // Apply agent-specific overrides on top
49
- if (input.agentOverrides !== undefined) {
50
- for (const [key, value] of Object.entries(input.agentOverrides)) {
51
- obj[key] = value;
52
- }
53
- }
54
- const content = JSON.stringify(obj, null, 2);
20
+ const base = { ...input.frontmatter, prompt: input.body };
21
+ const merged = applyOverrides(base, input.agentOverrides);
22
+ const content = JSON.stringify(merged, null, 2);
55
23
  const path = decodeRenderedFilePath(`.kiro/agents/${input.name}.json`);
56
- return rendered([{ content, path }], warnings);
24
+ return rendered([{ content, path }], []);
57
25
  };
58
26
  //# sourceMappingURL=json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"json.js","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/json.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAwD,MAAM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IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC1D,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAChD,MAAM,IAAI,GAAG,sBAAsB,CAAC,gBAAgB,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC;IAEvE,OAAO,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAC3C,CAAC,CAAC"}
@@ -4,7 +4,8 @@
4
4
  * For: Claude Code, Copilot, Cursor, Gemini CLI, OpenCode, Augment,
5
5
  * Junie, Kilo Code, Kiro IDE.
6
6
  *
7
- * Produces `.md` with YAML frontmatter and body.
7
+ * Produces `.md` with YAML frontmatter and body. The user's frontmatter
8
+ * passes through verbatim; `agentOverrides[<agent-id>]` is merged on top.
8
9
  *
9
10
  * @experimental This API is unstable and may change without notice.
10
11
  */
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-yaml.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/markdown-yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,EAAY,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAkI7F;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,mBAAmB,KAAG,qBAmB/D,CAAC"}
1
+ {"version":3,"file":"markdown-yaml.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/markdown-yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,EAAY,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAoB7F;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,mBAAmB,KAAG,qBAa/D,CAAC"}
@@ -4,125 +4,41 @@
4
4
  * For: Claude Code, Copilot, Cursor, Gemini CLI, OpenCode, Augment,
5
5
  * Junie, Kilo Code, Kiro IDE.
6
6
  *
7
- * Produces `.md` with YAML frontmatter and body.
7
+ * Produces `.md` with YAML frontmatter and body. The user's frontmatter
8
+ * passes through verbatim; `agentOverrides[<agent-id>]` is merged on top.
8
9
  *
9
10
  * @experimental This API is unstable and may change without notice.
10
11
  */
11
12
  import * as Schema from "effect/Schema";
12
13
  import YAML from "yaml";
13
- import { mapModelTier } from "../model-mapping.js";
14
- import { mapToolAccess } from "../tool-access-mapping.js";
14
+ import { applyOverrides } from "../overrides.js";
15
15
  import { rendered } from "../types.js";
16
16
  const decodeRenderedFilePath = Schema.decodeUnknownSync(Schema.String.pipe(Schema.brand("RenderedFilePath")));
17
- const DEFAULT_CONFIG = {
18
- agentsDir: "",
19
- fileExtension: ".md",
20
- supportsBackground: false,
21
- supportsModel: true,
22
- nameField: "name",
23
- descriptionField: "description",
24
- };
25
- const AGENT_CONFIGS = {
26
- "claude-code": {
27
- ...DEFAULT_CONFIG,
28
- agentsDir: ".claude/agents",
29
- supportsBackground: true,
30
- },
31
- "github-copilot": {
32
- ...DEFAULT_CONFIG,
33
- agentsDir: ".github/agents",
34
- },
35
- cursor: {
36
- ...DEFAULT_CONFIG,
37
- agentsDir: ".cursor/agents",
38
- supportsBackground: true,
39
- },
40
- "gemini-cli": {
41
- ...DEFAULT_CONFIG,
42
- agentsDir: ".gemini/agents",
43
- },
44
- opencode: {
45
- ...DEFAULT_CONFIG,
46
- agentsDir: ".opencode/agents",
47
- },
48
- augment: {
49
- ...DEFAULT_CONFIG,
50
- agentsDir: ".augment/agents",
51
- },
52
- junie: {
53
- ...DEFAULT_CONFIG,
54
- agentsDir: ".junie/agents",
55
- },
56
- "kilo-code": {
57
- ...DEFAULT_CONFIG,
58
- agentsDir: ".kilo/agents",
59
- },
60
- kiro: {
61
- ...DEFAULT_CONFIG,
62
- agentsDir: ".kiro/agents",
63
- },
64
- };
65
- /**
66
- * Build the YAML frontmatter object from subagent input and agent config.
67
- */
68
- const buildFrontmatterObject = (input, config, warnings) => {
69
- const fm = {};
70
- fm[config.descriptionField] = input.description;
71
- // Model mapping
72
- if (config.supportsModel) {
73
- const modelResult = mapModelTier(input.model, input.agentId);
74
- if (modelResult.value !== undefined) {
75
- fm["model"] = modelResult.value;
76
- }
77
- if (modelResult.warning !== undefined) {
78
- warnings.push(modelResult.warning);
79
- }
80
- }
81
- // Tool access mapping
82
- const toolResult = mapToolAccess(input.toolAccess, input.agentId);
83
- for (const [key, value] of Object.entries(toolResult.fields)) {
84
- fm[key] = value;
85
- }
86
- warnings.push(...toolResult.warnings);
87
- // Background
88
- if (input.background === true) {
89
- if (config.supportsBackground) {
90
- fm["background"] = true;
91
- }
92
- else {
93
- warnings.push({
94
- agent: input.agentId,
95
- feature: "background",
96
- message: `${input.agentId} does not support background mode; "background: true" will be ignored`,
97
- });
98
- }
99
- }
100
- // Apply agent-specific overrides on top of computed frontmatter
101
- if (input.agentOverrides !== undefined) {
102
- for (const [key, value] of Object.entries(input.agentOverrides)) {
103
- fm[key] = value;
104
- }
105
- }
106
- return fm;
17
+ const AGENT_DIRS = {
18
+ "claude-code": ".claude/agents",
19
+ "github-copilot": ".github/agents",
20
+ cursor: ".cursor/agents",
21
+ "gemini-cli": ".gemini/agents",
22
+ opencode: ".opencode/agents",
23
+ augment: ".augment/agents",
24
+ junie: ".junie/agents",
25
+ "kilo-code": ".kilo/agents",
26
+ kiro: ".kiro/agents",
107
27
  };
28
+ const resolveAgentsDir = (agentId) => AGENT_DIRS[agentId] ?? `.${agentId}/agents`;
108
29
  /**
109
30
  * Render a subagent as Markdown with YAML frontmatter.
110
31
  *
111
32
  * @experimental This API is unstable and may change without notice.
112
33
  */
113
34
  export const renderMarkdownYaml = (input) => {
114
- const config = AGENT_CONFIGS[input.agentId] ?? {
115
- ...DEFAULT_CONFIG,
116
- agentsDir: `.${input.agentId}/agents`,
117
- };
118
- const warnings = [];
119
- const fmObject = buildFrontmatterObject(input, config, warnings);
35
+ const fmObject = applyOverrides(input.frontmatter, input.agentOverrides);
120
36
  const yamlStr = YAML.stringify(fmObject, { lineWidth: 0 }).trim();
121
37
  const parts = [`---\n${yamlStr}\n---`];
122
38
  if (input.body.length > 0) {
123
39
  parts.push(input.body);
124
40
  }
125
- const path = decodeRenderedFilePath(`${config.agentsDir}/${input.name}.md`);
126
- return rendered([{ content: parts.join("\n"), path }], warnings);
41
+ const path = decodeRenderedFilePath(`${resolveAgentsDir(input.agentId)}/${input.name}.md`);
42
+ return rendered([{ content: parts.join("\n"), path }], []);
127
43
  };
128
44
  //# sourceMappingURL=markdown-yaml.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-yaml.js","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/markdown-yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAwD,MAAM,aAAa,CAAC;AAE7F,MAAM,sBAAsB,GAAG,MAAM,CAAC,iBAAiB,CACrD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CACrD,CAAC;AAuBF,MAAM,cAAc,GAAwB;IAC1C,SAAS,EAAE,EAAE;IACb,aAAa,EAAE,KAAK;IACpB,kBAAkB,EAAE,KAAK;IACzB,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,MAAM;IACjB,gBAAgB,EAAE,aAAa;CAChC,CAAC;AAEF,MAAM,aAAa,GAAkD;IACnE,aAAa,EAAE;QACb,GAAG,cAAc;QACjB,SAAS,EAAE,gBAAgB;QAC3B,kBAAkB,EAAE,IAAI;KACzB;IACD,gBAAgB,E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AAE,gBAAgB;IAC9B,QAAQ,EAAE,kBAAkB;IAC5B,OAAO,EAAE,iBAAiB;IAC1B,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,cAAc;IAC3B,IAAI,EAAE,cAAc;CACrB,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAU,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,SAAS,CAAC;AAElG;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAA0B,EAAyB,EAAE;IACtF,MAAM,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAEzE,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAClE,MAAM,KAAK,GAAkB,CAAC,QAAQ,OAAO,OAAO,CAAC,CAAC;IAEtD,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAED,MAAM,IAAI,GAAG,sBAAsB,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC;IAE3F,OAAO,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7D,CAAC,CAAC"}
@@ -6,7 +6,11 @@
6
6
  * `settings/custom_modes.yaml` (user scope).
7
7
  *
8
8
  * The mode entry is a data structure — the actual file read-modify-write
9
- * is handled separately.
9
+ * is handled separately. The user's frontmatter passes through verbatim,
10
+ * with structural Roo fields layered on top: `slug` is always
11
+ * `input.name`, the body splits into `roleDefinition` / `customInstructions`,
12
+ * and `groups` falls back to a sane default when not provided. Then
13
+ * `agentOverrides[roo-code]` is merged on top.
10
14
  *
11
15
  * @experimental This API is unstable and may change without notice.
12
16
  */
@@ -1 +1 @@
1
- {"version":3,"file":"roo.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/roo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAGrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAgBvD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CACzD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,KAAG;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAS5F,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,mBAAmB,KAAG,aAoC9D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GACxB,eAAe,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACrD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AG,aAsB9D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GACxB,eAAe,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACrD,cAAc,YAAY,KACzB,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAkBvC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,eAAe,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACrD,MAAM,MAAM,KACX,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAA0D,CAAC"}
@@ -6,24 +6,17 @@
6
6
  * `settings/custom_modes.yaml` (user scope).
7
7
  *
8
8
  * The mode entry is a data structure — the actual file read-modify-write
9
- * is handled separately.
9
+ * is handled separately. The user's frontmatter passes through verbatim,
10
+ * with structural Roo fields layered on top: `slug` is always
11
+ * `input.name`, the body splits into `roleDefinition` / `customInstructions`,
12
+ * and `groups` falls back to a sane default when not provided. Then
13
+ * `agentOverrides[roo-code]` is merged on top.
10
14
  *
11
15
  * @experimental This API is unstable and may change without notice.
12
16
  */
13
- import { mapModelTier } from "../model-mapping.js";
14
- import { mapToolAccess } from "../tool-access-mapping.js";
15
- /** Default groups when tool access mapping returns no groups. */
17
+ import { applyOverrides } from "../overrides.js";
18
+ /** Default groups when the user does not specify any. */
16
19
  const DEFAULT_GROUPS = ["read", "edit", "command", "mcp"];
17
- /**
18
- * Extract groups from tool access fields, falling back to default.
19
- */
20
- const extractGroups = (fields) => {
21
- const groups = fields["groups"];
22
- if (Array.isArray(groups)) {
23
- return groups.filter((g) => typeof g === "string");
24
- }
25
- return DEFAULT_GROUPS;
26
- };
27
20
  /**
28
21
  * Split a body into roleDefinition (first paragraph) and customInstructions (rest).
29
22
  *
@@ -43,6 +36,7 @@ export const splitBody = (body) => {
43
36
  customInstructions: body.slice(blankLineIndex + 2).trim(),
44
37
  };
45
38
  };
39
+ const isStringArray = (value) => Array.isArray(value) && value.every((g) => typeof g === "string");
46
40
  /**
47
41
  * Build a Roo Code mode entry from a subagent render input.
48
42
  *
@@ -53,35 +47,23 @@ export const splitBody = (body) => {
53
47
  * @experimental This API is unstable and may change without notice.
54
48
  */
55
49
  export const buildRooModeEntry = (input) => {
56
- const warnings = [];
57
50
  const { roleDefinition, customInstructions } = splitBody(input.body);
58
- // Model Roo has no model field
59
- const modelResult = mapModelTier(input.model, "roo-code");
60
- if (modelResult.warning !== undefined) {
61
- warnings.push(modelResult.warning);
62
- }
63
- // Tool access → groups
64
- const toolResult = mapToolAccess(input.toolAccess, "roo-code");
65
- warnings.push(...toolResult.warnings);
66
- const groups = extractGroups(toolResult.fields);
67
- // Background — Roo does not support background mode
68
- if (input.background === true) {
69
- warnings.push({
70
- agent: "roo-code",
71
- feature: "background",
72
- message: "Roo Code does not support background mode; background: true will be ignored",
73
- });
74
- }
75
- const entry = {
51
+ const fmGroups = input.frontmatter["groups"];
52
+ const groups = isStringArray(fmGroups) ? fmGroups : DEFAULT_GROUPS;
53
+ const baseEntry = {
54
+ ...input.frontmatter,
76
55
  slug: input.name,
77
56
  name: input.name,
78
57
  roleDefinition,
79
58
  ...(customInstructions.length > 0 ? { customInstructions } : {}),
80
59
  groups,
81
- description: input.description,
82
- ...input.agentOverrides,
83
60
  };
84
- return { entry, warnings };
61
+ // Assertion needed: overrides may intentionally delete fields the
62
+ // RooModeEntry interface marks as required; mirrors the merge semantics
63
+ // applied uniformly across all subagent adapters.
64
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
65
+ const entry = applyOverrides(baseEntry, input.agentOverrides);
66
+ return { entry, warnings: [] };
85
67
  };
86
68
  /**
87
69
  * Merge a mode entry into an existing modes array by slug.