agentplane 0.3.12 → 0.3.14

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 (376) hide show
  1. package/assets/RUNNER.md +1 -1
  2. package/assets/agents/ORCHESTRATOR.json +1 -1
  3. package/assets/agents/SKILL_EXTRACTOR.json +31 -0
  4. package/assets/codex-plugin/assets/header.png +0 -0
  5. package/assets/codex-plugin/assets/icon.svg +1 -0
  6. package/assets/codex-plugin/assets/logo.svg +1 -0
  7. package/assets/codex-plugin/skills/agentplane/SKILL.md +35 -0
  8. package/assets/framework.manifest.json +7 -0
  9. package/assets/policy/governance.md +4 -2
  10. package/assets/policy/incidents.md +4 -19
  11. package/assets/policy/workflow.branch_pr.md +10 -5
  12. package/assets/policy/workflow.release.md +5 -2
  13. package/dist/.build-manifest.json +409 -219
  14. package/dist/cli/exit-codes.d.ts.map +1 -1
  15. package/dist/cli/exit-codes.js +1 -0
  16. package/dist/cli/output.d.ts +29 -0
  17. package/dist/cli/output.d.ts.map +1 -1
  18. package/dist/cli/output.js +33 -0
  19. package/dist/cli/reason-codes.d.ts +1 -1
  20. package/dist/cli/reason-codes.d.ts.map +1 -1
  21. package/dist/cli/reason-codes.js +12 -0
  22. package/dist/cli/run-cli/command-catalog/core.d.ts +1 -1
  23. package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
  24. package/dist/cli/run-cli/command-catalog/core.js +36 -78
  25. package/dist/cli/run-cli/command-catalog/lifecycle.d.ts.map +1 -1
  26. package/dist/cli/run-cli/command-catalog/lifecycle.js +4 -12
  27. package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
  28. package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
  29. package/dist/cli/run-cli/command-catalog/project.js +27 -31
  30. package/dist/cli/run-cli/command-catalog/shared.d.ts +9 -6
  31. package/dist/cli/run-cli/command-catalog/shared.d.ts.map +1 -1
  32. package/dist/cli/run-cli/command-catalog/shared.js +23 -6
  33. package/dist/cli/run-cli/command-catalog/task.d.ts.map +1 -1
  34. package/dist/cli/run-cli/command-catalog/task.js +6 -18
  35. package/dist/cli/run-cli/command-catalog.d.ts +1 -1
  36. package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
  37. package/dist/cli/run-cli/commands/codex.d.ts +14 -0
  38. package/dist/cli/run-cli/commands/codex.d.ts.map +1 -0
  39. package/dist/cli/run-cli/commands/codex.js +100 -0
  40. package/dist/cli/run-cli/commands/core.d.ts +1 -0
  41. package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
  42. package/dist/cli/run-cli/commands/core.js +1 -0
  43. package/dist/cli/run-cli/commands/init/recipes.d.ts +9 -1
  44. package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -1
  45. package/dist/cli/run-cli/commands/init/recipes.js +33 -22
  46. package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
  47. package/dist/cli/run-cli/commands/init.js +26 -21
  48. package/dist/cli/run-cli/error-guidance.js +20 -0
  49. package/dist/cli/run-cli.js +1 -1
  50. package/dist/cli/run-cli.test-helpers.d.ts +1 -74
  51. package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
  52. package/dist/cli/run-cli.test-helpers.js +1 -766
  53. package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
  54. package/dist/commands/branch/cleanup-merged.js +5 -9
  55. package/dist/commands/branch/work-start.command.d.ts.map +1 -1
  56. package/dist/commands/branch/work-start.command.js +1 -0
  57. package/dist/commands/codex/plugin-install.d.ts +26 -0
  58. package/dist/commands/codex/plugin-install.d.ts.map +1 -0
  59. package/dist/commands/codex/plugin-install.js +209 -0
  60. package/dist/commands/commit.spec.d.ts.map +1 -1
  61. package/dist/commands/commit.spec.js +2 -0
  62. package/dist/commands/doctor/branch-pr.d.ts +1 -1
  63. package/dist/commands/doctor/branch-pr.d.ts.map +1 -1
  64. package/dist/commands/doctor/branch-pr.js +5 -2
  65. package/dist/commands/guard/impl/commands.d.ts.map +1 -1
  66. package/dist/commands/guard/impl/commands.js +4 -1
  67. package/dist/commands/guard/impl/comment-commit.d.ts.map +1 -1
  68. package/dist/commands/guard/impl/comment-commit.js +2 -1
  69. package/dist/commands/guard/impl/env.d.ts +6 -0
  70. package/dist/commands/guard/impl/env.d.ts.map +1 -1
  71. package/dist/commands/guard/impl/env.js +41 -0
  72. package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
  73. package/dist/commands/pr/integrate/cmd.js +81 -5
  74. package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
  75. package/dist/commands/pr/integrate/internal/prepare.js +38 -7
  76. package/dist/commands/pr/internal/auto-commit.d.ts.map +1 -1
  77. package/dist/commands/pr/internal/auto-commit.js +13 -7
  78. package/dist/commands/pr/internal/sync-branch.d.ts +36 -0
  79. package/dist/commands/pr/internal/sync-branch.d.ts.map +1 -0
  80. package/dist/commands/pr/internal/sync-branch.js +113 -0
  81. package/dist/commands/pr/internal/sync-github.d.ts +28 -0
  82. package/dist/commands/pr/internal/sync-github.d.ts.map +1 -0
  83. package/dist/commands/pr/internal/sync-github.js +178 -0
  84. package/dist/commands/pr/internal/sync-model.d.ts +36 -0
  85. package/dist/commands/pr/internal/sync-model.d.ts.map +1 -0
  86. package/dist/commands/pr/internal/sync-model.js +1 -0
  87. package/dist/commands/pr/internal/sync-open-step.d.ts +10 -0
  88. package/dist/commands/pr/internal/sync-open-step.d.ts.map +1 -0
  89. package/dist/commands/pr/internal/sync-open-step.js +128 -0
  90. package/dist/commands/pr/internal/sync-support.d.ts +7 -0
  91. package/dist/commands/pr/internal/sync-support.d.ts.map +1 -0
  92. package/dist/commands/pr/internal/sync-support.js +29 -0
  93. package/dist/commands/pr/internal/sync-update-step.d.ts +6 -0
  94. package/dist/commands/pr/internal/sync-update-step.d.ts.map +1 -0
  95. package/dist/commands/pr/internal/sync-update-step.js +68 -0
  96. package/dist/commands/pr/internal/sync.d.ts +2 -6
  97. package/dist/commands/pr/internal/sync.d.ts.map +1 -1
  98. package/dist/commands/pr/internal/sync.js +83 -525
  99. package/dist/commands/pr/open.d.ts.map +1 -1
  100. package/dist/commands/pr/open.js +62 -7
  101. package/dist/commands/pr/pr.command.d.ts.map +1 -1
  102. package/dist/commands/pr/pr.command.js +7 -2
  103. package/dist/commands/recipes/active.command.d.ts +7 -0
  104. package/dist/commands/recipes/active.command.d.ts.map +1 -0
  105. package/dist/commands/recipes/active.command.js +12 -0
  106. package/dist/commands/recipes/add.command.d.ts +8 -0
  107. package/dist/commands/recipes/add.command.d.ts.map +1 -0
  108. package/dist/commands/recipes/add.command.js +33 -0
  109. package/dist/commands/recipes/detach.command.d.ts +7 -0
  110. package/dist/commands/recipes/detach.command.d.ts.map +1 -0
  111. package/dist/commands/recipes/detach.command.js +19 -0
  112. package/dist/commands/recipes/disable.command.d.ts +7 -0
  113. package/dist/commands/recipes/disable.command.d.ts.map +1 -0
  114. package/dist/commands/recipes/disable.command.js +10 -0
  115. package/dist/commands/recipes/enable.command.d.ts +7 -0
  116. package/dist/commands/recipes/enable.command.d.ts.map +1 -0
  117. package/dist/commands/recipes/enable.command.js +10 -0
  118. package/dist/commands/recipes/explain-active.command.d.ts +5 -0
  119. package/dist/commands/recipes/explain-active.command.d.ts.map +1 -0
  120. package/dist/commands/recipes/explain-active.command.js +11 -0
  121. package/dist/commands/recipes/explain.command.d.ts.map +1 -1
  122. package/dist/commands/recipes/explain.command.js +4 -2
  123. package/dist/commands/recipes/impl/apply.d.ts +1 -1
  124. package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
  125. package/dist/commands/recipes/impl/apply.js +34 -16
  126. package/dist/commands/recipes/impl/commands/active.d.ts +6 -0
  127. package/dist/commands/recipes/impl/commands/active.d.ts.map +1 -0
  128. package/dist/commands/recipes/impl/commands/active.js +47 -0
  129. package/dist/commands/recipes/impl/commands/add.d.ts +8 -0
  130. package/dist/commands/recipes/impl/commands/add.d.ts.map +1 -0
  131. package/dist/commands/recipes/impl/commands/add.js +105 -0
  132. package/dist/commands/recipes/impl/commands/detach.d.ts +6 -0
  133. package/dist/commands/recipes/impl/commands/detach.d.ts.map +1 -0
  134. package/dist/commands/recipes/impl/commands/detach.js +99 -0
  135. package/dist/commands/recipes/impl/commands/disable.d.ts +6 -0
  136. package/dist/commands/recipes/impl/commands/disable.d.ts.map +1 -0
  137. package/dist/commands/recipes/impl/commands/disable.js +23 -0
  138. package/dist/commands/recipes/impl/commands/enable.d.ts +6 -0
  139. package/dist/commands/recipes/impl/commands/enable.d.ts.map +1 -0
  140. package/dist/commands/recipes/impl/commands/enable.js +41 -0
  141. package/dist/commands/recipes/impl/commands/explain-active.d.ts +5 -0
  142. package/dist/commands/recipes/impl/commands/explain-active.d.ts.map +1 -0
  143. package/dist/commands/recipes/impl/commands/explain-active.js +20 -0
  144. package/dist/commands/recipes/impl/commands/explain.d.ts.map +1 -1
  145. package/dist/commands/recipes/impl/commands/explain.js +83 -36
  146. package/dist/commands/recipes/impl/commands/info.d.ts.map +1 -1
  147. package/dist/commands/recipes/impl/commands/info.js +39 -22
  148. package/dist/commands/recipes/impl/commands/install.d.ts +1 -1
  149. package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
  150. package/dist/commands/recipes/impl/commands/install.js +35 -42
  151. package/dist/commands/recipes/impl/commands/list-remote.d.ts.map +1 -1
  152. package/dist/commands/recipes/impl/commands/list-remote.js +2 -3
  153. package/dist/commands/recipes/impl/commands/list.d.ts.map +1 -1
  154. package/dist/commands/recipes/impl/commands/list.js +13 -12
  155. package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -1
  156. package/dist/commands/recipes/impl/commands/remove.js +12 -2
  157. package/dist/commands/recipes/impl/commands/update.d.ts +7 -0
  158. package/dist/commands/recipes/impl/commands/update.d.ts.map +1 -0
  159. package/dist/commands/recipes/impl/commands/update.js +107 -0
  160. package/dist/commands/recipes/impl/commands.d.ts +7 -0
  161. package/dist/commands/recipes/impl/commands.d.ts.map +1 -1
  162. package/dist/commands/recipes/impl/commands.js +7 -0
  163. package/dist/commands/recipes/impl/constants.d.ts +1 -14
  164. package/dist/commands/recipes/impl/constants.d.ts.map +1 -1
  165. package/dist/commands/recipes/impl/constants.js +1 -18
  166. package/dist/commands/recipes/impl/index.d.ts +1 -1
  167. package/dist/commands/recipes/impl/index.d.ts.map +1 -1
  168. package/dist/commands/recipes/impl/installed-recipes.d.ts +1 -1
  169. package/dist/commands/recipes/impl/installed-recipes.d.ts.map +1 -1
  170. package/dist/commands/recipes/impl/installed-recipes.js +1 -2
  171. package/dist/commands/recipes/impl/mutation-transaction.d.ts +7 -0
  172. package/dist/commands/recipes/impl/mutation-transaction.d.ts.map +1 -0
  173. package/dist/commands/recipes/impl/mutation-transaction.js +47 -0
  174. package/dist/commands/recipes/impl/overlay-project.d.ts +48 -0
  175. package/dist/commands/recipes/impl/overlay-project.d.ts.map +1 -0
  176. package/dist/commands/recipes/impl/overlay-project.js +320 -0
  177. package/dist/commands/recipes/impl/paths.d.ts +17 -2
  178. package/dist/commands/recipes/impl/paths.d.ts.map +1 -1
  179. package/dist/commands/recipes/impl/paths.js +20 -5
  180. package/dist/commands/recipes/impl/project-installed-recipes.d.ts +5 -4
  181. package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
  182. package/dist/commands/recipes/impl/project-installed-recipes.js +34 -76
  183. package/dist/commands/recipes/impl/project-recipe-state.d.ts +18 -0
  184. package/dist/commands/recipes/impl/project-recipe-state.d.ts.map +1 -0
  185. package/dist/commands/recipes/impl/project-recipe-state.js +94 -0
  186. package/dist/commands/recipes/impl/project-registry.d.ts +24 -0
  187. package/dist/commands/recipes/impl/project-registry.d.ts.map +1 -0
  188. package/dist/commands/recipes/impl/project-registry.js +124 -0
  189. package/dist/commands/recipes/impl/resolver.d.ts +1 -1
  190. package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
  191. package/dist/commands/recipes/impl/resolver.js +6 -4
  192. package/dist/commands/recipes/impl/types.d.ts +1 -240
  193. package/dist/commands/recipes/impl/types.d.ts.map +1 -1
  194. package/dist/commands/recipes/impl/version.d.ts +5 -0
  195. package/dist/commands/recipes/impl/version.d.ts.map +1 -0
  196. package/dist/commands/recipes/impl/version.js +9 -0
  197. package/dist/commands/recipes/info.command.js +2 -2
  198. package/dist/commands/recipes/install.spec.js +4 -4
  199. package/dist/commands/recipes/list.command.js +4 -4
  200. package/dist/commands/recipes/remove.command.js +2 -2
  201. package/dist/commands/recipes/update.command.d.ts +8 -0
  202. package/dist/commands/recipes/update.command.d.ts.map +1 -0
  203. package/dist/commands/recipes/update.command.js +35 -0
  204. package/dist/commands/recipes.d.ts +10 -6
  205. package/dist/commands/recipes.d.ts.map +1 -1
  206. package/dist/commands/recipes.js +8 -5
  207. package/dist/commands/recipes.test-helpers.d.ts +3 -3
  208. package/dist/commands/recipes.test-helpers.d.ts.map +1 -1
  209. package/dist/commands/recipes.test-helpers.js +105 -15
  210. package/dist/commands/release/apply.command.d.ts +1 -1
  211. package/dist/commands/release/apply.command.d.ts.map +1 -1
  212. package/dist/commands/release/apply.command.js +15 -379
  213. package/dist/commands/release/apply.mutation.d.ts +1 -0
  214. package/dist/commands/release/apply.mutation.d.ts.map +1 -1
  215. package/dist/commands/release/apply.mutation.js +24 -1
  216. package/dist/commands/release/apply.pipeline.d.ts +22 -0
  217. package/dist/commands/release/apply.pipeline.d.ts.map +1 -0
  218. package/dist/commands/release/apply.pipeline.js +371 -0
  219. package/dist/commands/release/apply.preflight.d.ts +2 -0
  220. package/dist/commands/release/apply.preflight.d.ts.map +1 -1
  221. package/dist/commands/release/apply.preflight.js +13 -4
  222. package/dist/commands/release/apply.types.d.ts +27 -0
  223. package/dist/commands/release/apply.types.d.ts.map +1 -1
  224. package/dist/commands/release.test-helpers.d.ts +4 -0
  225. package/dist/commands/release.test-helpers.d.ts.map +1 -1
  226. package/dist/commands/release.test-helpers.js +7 -0
  227. package/dist/commands/scenario/execute.command.js +4 -4
  228. package/dist/commands/scenario/impl/commands.js +4 -4
  229. package/dist/commands/scenario/info.command.js +4 -4
  230. package/dist/commands/scenario/list.command.js +3 -3
  231. package/dist/commands/scenario/run.command.js +5 -5
  232. package/dist/commands/scenario/scenario.command.js +7 -7
  233. package/dist/commands/shared/reconcile-check.d.ts.map +1 -1
  234. package/dist/commands/shared/reconcile-check.js +2 -2
  235. package/dist/commands/shared/task-backend.d.ts +6 -1
  236. package/dist/commands/shared/task-backend.d.ts.map +1 -1
  237. package/dist/commands/shared/task-backend.js +34 -2
  238. package/dist/commands/shared/task-handoff.d.ts +2 -1
  239. package/dist/commands/shared/task-handoff.d.ts.map +1 -1
  240. package/dist/commands/shared/task-handoff.js +15 -0
  241. package/dist/commands/shared/task-mutation.d.ts.map +1 -1
  242. package/dist/commands/shared/task-mutation.js +4 -4
  243. package/dist/commands/shared/task-store/intents.d.ts +34 -0
  244. package/dist/commands/shared/task-store/intents.d.ts.map +1 -0
  245. package/dist/commands/shared/task-store/intents.js +265 -0
  246. package/dist/commands/shared/task-store/readme.d.ts +28 -0
  247. package/dist/commands/shared/task-store/readme.d.ts.map +1 -0
  248. package/dist/commands/shared/task-store/readme.js +125 -0
  249. package/dist/commands/shared/task-store/store.d.ts +26 -0
  250. package/dist/commands/shared/task-store/store.d.ts.map +1 -0
  251. package/dist/commands/shared/task-store/store.js +105 -0
  252. package/dist/commands/shared/task-store/types.d.ts +94 -0
  253. package/dist/commands/shared/task-store/types.d.ts.map +1 -0
  254. package/dist/commands/shared/task-store/types.js +1 -0
  255. package/dist/commands/shared/task-store.d.ts +3 -109
  256. package/dist/commands/shared/task-store.d.ts.map +1 -1
  257. package/dist/commands/shared/task-store.js +2 -493
  258. package/dist/commands/task/block.d.ts.map +1 -1
  259. package/dist/commands/task/block.js +7 -2
  260. package/dist/commands/task/comment.d.ts.map +1 -1
  261. package/dist/commands/task/comment.js +7 -2
  262. package/dist/commands/task/finish-shared.d.ts.map +1 -1
  263. package/dist/commands/task/finish-shared.js +3 -3
  264. package/dist/commands/task/finish.d.ts.map +1 -1
  265. package/dist/commands/task/finish.js +102 -15
  266. package/dist/commands/task/handoff-show.command.d.ts.map +1 -1
  267. package/dist/commands/task/handoff-show.command.js +24 -0
  268. package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -1
  269. package/dist/commands/task/hosted-merge-sync.js +9 -4
  270. package/dist/commands/task/list.run.d.ts.map +1 -1
  271. package/dist/commands/task/list.run.js +14 -4
  272. package/dist/commands/task/new.command.d.ts.map +1 -1
  273. package/dist/commands/task/new.command.js +16 -2
  274. package/dist/commands/task/new.js +2 -2
  275. package/dist/commands/task/show.d.ts.map +1 -1
  276. package/dist/commands/task/show.js +3 -3
  277. package/dist/commands/task/update.d.ts.map +1 -1
  278. package/dist/commands/task/update.js +11 -3
  279. package/dist/runner/adapters/codex.d.ts.map +1 -1
  280. package/dist/runner/adapters/codex.js +3 -33
  281. package/dist/runner/adapters/custom.d.ts.map +1 -1
  282. package/dist/runner/adapters/custom.js +3 -30
  283. package/dist/runner/adapters/runtime-shared.d.ts +14 -0
  284. package/dist/runner/adapters/runtime-shared.d.ts.map +1 -0
  285. package/dist/runner/adapters/runtime-shared.js +36 -0
  286. package/dist/runner/context/base-prompt-sources.d.ts +30 -0
  287. package/dist/runner/context/base-prompt-sources.d.ts.map +1 -0
  288. package/dist/runner/context/base-prompt-sources.js +144 -0
  289. package/dist/runner/context/base-prompts.d.ts +5 -23
  290. package/dist/runner/context/base-prompts.d.ts.map +1 -1
  291. package/dist/runner/context/base-prompts.js +10 -358
  292. package/dist/runner/context/overlay-prompt-blocks.d.ts +7 -0
  293. package/dist/runner/context/overlay-prompt-blocks.d.ts.map +1 -0
  294. package/dist/runner/context/overlay-prompt-blocks.js +72 -0
  295. package/dist/runner/context/prompt-block-shared.d.ts +54 -0
  296. package/dist/runner/context/prompt-block-shared.d.ts.map +1 -0
  297. package/dist/runner/context/prompt-block-shared.js +106 -0
  298. package/dist/runner/context/recipe-context.d.ts +2 -1
  299. package/dist/runner/context/recipe-context.d.ts.map +1 -1
  300. package/dist/runner/context/recipe-context.js +41 -8
  301. package/dist/runner/context/recipe-prompt-blocks.d.ts +6 -0
  302. package/dist/runner/context/recipe-prompt-blocks.d.ts.map +1 -0
  303. package/dist/runner/context/recipe-prompt-blocks.js +143 -0
  304. package/dist/runner/types.d.ts +4 -0
  305. package/dist/runner/types.d.ts.map +1 -1
  306. package/dist/runner/usecases/scenario-materialize-task.js +2 -2
  307. package/dist/runner/usecases/task-run-inspect.js +2 -2
  308. package/dist/runner/usecases/task-run-lifecycle-shared.js +2 -2
  309. package/dist/runner/usecases/task-run.d.ts.map +1 -1
  310. package/dist/runner/usecases/task-run.js +6 -3
  311. package/dist/runtime/behavior/resolve.d.ts +2 -1
  312. package/dist/runtime/behavior/resolve.d.ts.map +1 -1
  313. package/dist/runtime/behavior/resolve.js +25 -5
  314. package/dist/runtime/behavior/types.d.ts +1 -0
  315. package/dist/runtime/behavior/types.d.ts.map +1 -1
  316. package/dist/runtime/capabilities/recipe.d.ts +2 -1
  317. package/dist/runtime/capabilities/recipe.d.ts.map +1 -1
  318. package/dist/runtime/capabilities/recipe.js +88 -28
  319. package/dist/runtime/execution-context.d.ts +63 -0
  320. package/dist/runtime/execution-context.d.ts.map +1 -0
  321. package/dist/{usecases/context/resolve-context.js → runtime/execution-context.js} +23 -26
  322. package/dist/runtime/incidents/advice-strategy.d.ts +15 -0
  323. package/dist/runtime/incidents/advice-strategy.d.ts.map +1 -0
  324. package/dist/runtime/incidents/advice-strategy.js +54 -0
  325. package/dist/runtime/incidents/plan-strategy.d.ts +9 -0
  326. package/dist/runtime/incidents/plan-strategy.d.ts.map +1 -0
  327. package/dist/runtime/incidents/plan-strategy.js +205 -0
  328. package/dist/runtime/incidents/registry-strategy.d.ts +6 -0
  329. package/dist/runtime/incidents/registry-strategy.d.ts.map +1 -0
  330. package/dist/runtime/incidents/registry-strategy.js +280 -0
  331. package/dist/runtime/incidents/resolve.d.ts +3 -25
  332. package/dist/runtime/incidents/resolve.d.ts.map +1 -1
  333. package/dist/runtime/incidents/resolve.js +3 -683
  334. package/dist/runtime/incidents/shared.d.ts +34 -0
  335. package/dist/runtime/incidents/shared.d.ts.map +1 -0
  336. package/dist/runtime/incidents/shared.js +171 -0
  337. package/dist/shared/errors.d.ts +1 -1
  338. package/dist/shared/errors.d.ts.map +1 -1
  339. package/dist/shared/runtime-source.d.ts.map +1 -1
  340. package/dist/shared/runtime-source.js +8 -3
  341. package/dist/testing/cli-harness/recipe-archives.d.ts +28 -0
  342. package/dist/testing/cli-harness/recipe-archives.d.ts.map +1 -0
  343. package/dist/testing/cli-harness/recipe-archives.js +374 -0
  344. package/dist/testing/cli-harness/stdio.d.ts +26 -0
  345. package/dist/testing/cli-harness/stdio.d.ts.map +1 -0
  346. package/dist/testing/cli-harness/stdio.js +84 -0
  347. package/dist/testing/cli-harness.d.ts +25 -0
  348. package/dist/testing/cli-harness.d.ts.map +1 -0
  349. package/dist/testing/cli-harness.js +313 -0
  350. package/dist/testing/index.d.ts +2 -0
  351. package/dist/testing/index.d.ts.map +1 -0
  352. package/dist/testing/index.js +1 -0
  353. package/package.json +7 -3
  354. package/dist/cli/recipes-bundled.d.ts +0 -10
  355. package/dist/cli/recipes-bundled.d.ts.map +0 -1
  356. package/dist/cli/recipes-bundled.js +0 -36
  357. package/dist/commands/recipes/impl/manifest.d.ts +0 -4
  358. package/dist/commands/recipes/impl/manifest.d.ts.map +0 -1
  359. package/dist/commands/recipes/impl/manifest.js +0 -229
  360. package/dist/commands/recipes/impl/normalize.d.ts +0 -8
  361. package/dist/commands/recipes/impl/normalize.d.ts.map +0 -1
  362. package/dist/commands/recipes/impl/normalize.js +0 -54
  363. package/dist/commands/recipes/impl/scenario.d.ts +0 -16
  364. package/dist/commands/recipes/impl/scenario.d.ts.map +0 -1
  365. package/dist/commands/recipes/impl/scenario.js +0 -262
  366. package/dist/recipes/bundled-recipes.d.ts +0 -17
  367. package/dist/recipes/bundled-recipes.d.ts.map +0 -1
  368. package/dist/recipes/bundled-recipes.js +0 -15
  369. package/dist/usecases/context/resolve-context.d.ts +0 -68
  370. package/dist/usecases/context/resolve-context.d.ts.map +0 -1
  371. package/dist/usecases/task/task-list-usecase.d.ts +0 -9
  372. package/dist/usecases/task/task-list-usecase.d.ts.map +0 -1
  373. package/dist/usecases/task/task-list-usecase.js +0 -17
  374. package/dist/usecases/task/task-new-usecase.d.ts +0 -9
  375. package/dist/usecases/task/task-new-usecase.d.ts.map +0 -1
  376. package/dist/usecases/task/task-new-usecase.js +0 -17
@@ -0,0 +1,105 @@
1
+ import { cp, mkdir, rm, symlink } from "node:fs/promises";
2
+ import { normalizeRecipeTags } from "@agentplaneorg/recipes";
3
+ import { loadConfig, resolveProject } from "@agentplaneorg/core";
4
+ import { mapCoreError } from "../../../../cli/error-map.js";
5
+ import { exitCodeForError } from "../../../../cli/exit-codes.js";
6
+ import { CliError } from "../../../../shared/errors.js";
7
+ import { runVendoredRecipeMutation } from "../mutation-transaction.js";
8
+ import { publishProjectRecipesState } from "../overlay-project.js";
9
+ import { readInstalledRecipesFile } from "../installed-recipes.js";
10
+ import { hashRecipeTree } from "../project-recipe-state.js";
11
+ import { readProjectRecipesRegistry, replaceProjectRecipeRegistryEntry, } from "../project-registry.js";
12
+ import { pickLatestRecipeVersion } from "../version.js";
13
+ import { resolveInstalledRecipeDir, resolveInstalledRecipesPath, resolveProjectRecipesPackagesDir, resolveProjectVendoredRecipeDir, } from "../paths.js";
14
+ function parseRecipeRef(raw) {
15
+ const value = raw.trim();
16
+ if (!value) {
17
+ throw new CliError({
18
+ exitCode: 3,
19
+ code: "E_VALIDATION",
20
+ message: "Recipe id must not be empty",
21
+ });
22
+ }
23
+ const atIndex = value.lastIndexOf("@");
24
+ if (atIndex <= 0)
25
+ return { id: value };
26
+ return { id: value.slice(0, atIndex), version: value.slice(atIndex + 1) || undefined };
27
+ }
28
+ export async function cmdRecipeAddParsed(opts) {
29
+ try {
30
+ const project = await resolveProject({
31
+ cwd: opts.cwd,
32
+ rootOverride: opts.rootOverride ?? null,
33
+ });
34
+ const loaded = await loadConfig(project.agentplaneDir);
35
+ const requested = parseRecipeRef(opts.recipeRef);
36
+ const cache = await readInstalledRecipesFile(resolveInstalledRecipesPath());
37
+ const cachedEntries = cache.recipes.filter((entry) => entry.id === requested.id);
38
+ const cached = requested.version
39
+ ? cachedEntries.find((entry) => entry.version === requested.version)
40
+ : pickLatestRecipeVersion(cachedEntries);
41
+ if (!cached) {
42
+ throw new CliError({
43
+ exitCode: exitCodeForError("E_IO"),
44
+ code: "E_IO",
45
+ message: requested.version
46
+ ? `Recipe not found in global cache: ${requested.id}@${requested.version}. Run agentplane recipes install ${requested.id}@${requested.version}`
47
+ : `Recipe not found in global cache: ${requested.id}. Run agentplane recipes install ${requested.id}`,
48
+ });
49
+ }
50
+ const materialization = opts.mode ?? (loaded.config.recipes?.storage_default === "link" ? "link" : "copy");
51
+ const sourceDir = resolveInstalledRecipeDir({ id: cached.id, version: cached.version });
52
+ const targetDir = resolveProjectVendoredRecipeDir(project, cached.id);
53
+ const registry = await readProjectRecipesRegistry(project);
54
+ const existing = registry.recipes.find((entry) => entry.id === cached.id);
55
+ if (existing) {
56
+ throw new CliError({
57
+ exitCode: exitCodeForError("E_USAGE"),
58
+ code: "E_USAGE",
59
+ message: existing.version === cached.version
60
+ ? `Recipe already vendored: ${cached.id}@${cached.version}. Use agentplane recipes update ${cached.id} to resync it from cache.`
61
+ : `Recipe already vendored: ${cached.id}@${existing.version}. Remove it first or use a dedicated update flow instead of overwriting it with recipes add.`,
62
+ });
63
+ }
64
+ const installedAt = new Date().toISOString();
65
+ const tags = normalizeRecipeTags(cached.tags ?? cached.manifest.tags ?? []);
66
+ const sourceSha256 = await hashRecipeTree(sourceDir);
67
+ await mkdir(resolveProjectRecipesPackagesDir(project), { recursive: true });
68
+ await runVendoredRecipeMutation({
69
+ targetDir,
70
+ mode: "create",
71
+ materialize: async (nextTargetDir) => {
72
+ await rm(nextTargetDir, { recursive: true, force: true });
73
+ await (materialization === "link"
74
+ ? symlink(sourceDir, nextTargetDir, "dir")
75
+ : cp(sourceDir, nextTargetDir, { recursive: true }));
76
+ },
77
+ commit: async () => {
78
+ const vendoredSha256 = await hashRecipeTree(targetDir);
79
+ const nextRegistry = replaceProjectRecipeRegistryEntry(registry, {
80
+ id: cached.id,
81
+ version: cached.version,
82
+ path: `packages/${cached.id}`,
83
+ active: opts.activate === true,
84
+ materialization,
85
+ source_ref: `${cached.id}@${cached.version}`,
86
+ source_sha256: sourceSha256,
87
+ vendored_sha256: vendoredSha256,
88
+ installed_at: installedAt,
89
+ tags,
90
+ });
91
+ await publishProjectRecipesState({ project, registry: nextRegistry });
92
+ },
93
+ });
94
+ process.stdout.write(`Vendored recipe ${cached.id}@${cached.version} into project (${materialization})\n`);
95
+ if (materialization === "link") {
96
+ process.stdout.write("Warning: link mode is not portable; use `agentplane recipes detach` before sharing the repo.\n");
97
+ }
98
+ return 0;
99
+ }
100
+ catch (err) {
101
+ if (err instanceof CliError)
102
+ throw err;
103
+ throw mapCoreError(err, { command: "recipes add", root: opts.rootOverride ?? null });
104
+ }
105
+ }
@@ -0,0 +1,6 @@
1
+ export declare function cmdRecipeDetachParsed(opts: {
2
+ cwd: string;
3
+ rootOverride?: string;
4
+ id: string;
5
+ }): Promise<number>;
6
+ //# sourceMappingURL=detach.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detach.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/detach.ts"],"names":[],"mappings":"AAoBA,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,MAAM,CAAC,CA2FlB"}
@@ -0,0 +1,99 @@
1
+ import { cp } from "node:fs/promises";
2
+ import { normalizeRecipeTags } from "@agentplaneorg/recipes";
3
+ import { loadConfig, resolveProject } from "@agentplaneorg/core";
4
+ import { mapCoreError } from "../../../../cli/error-map.js";
5
+ import { exitCodeForError } from "../../../../cli/exit-codes.js";
6
+ import { CliError } from "../../../../shared/errors.js";
7
+ import { ensureActionApproved } from "../../../shared/approval-requirements.js";
8
+ import { readInstalledRecipesFile } from "../installed-recipes.js";
9
+ import { runVendoredRecipeMutation } from "../mutation-transaction.js";
10
+ import { publishProjectRecipesState } from "../overlay-project.js";
11
+ import { hashRecipeTree, inspectProjectRecipe } from "../project-recipe-state.js";
12
+ import { readProjectRecipesRegistry, replaceProjectRecipeRegistryEntry, } from "../project-registry.js";
13
+ import { resolveInstalledRecipesPath, resolveProjectVendoredRecipeDir } from "../paths.js";
14
+ export async function cmdRecipeDetachParsed(opts) {
15
+ try {
16
+ const project = await resolveProject({
17
+ cwd: opts.cwd,
18
+ rootOverride: opts.rootOverride ?? null,
19
+ });
20
+ const loaded = await loadConfig(project.agentplaneDir);
21
+ const inspection = await inspectProjectRecipe({ project, recipeId: opts.id });
22
+ if (inspection.entry.materialization !== "link") {
23
+ throw new CliError({
24
+ exitCode: exitCodeForError("E_USAGE"),
25
+ code: "E_USAGE",
26
+ message: `Recipe ${inspection.entry.id} is already materialized as copy.`,
27
+ });
28
+ }
29
+ if (!inspection.cache_present || !inspection.current_source_sha256) {
30
+ throw new CliError({
31
+ exitCode: exitCodeForError("E_IO"),
32
+ code: "E_IO",
33
+ message: `Cached source is missing for ${inspection.entry.id}@${inspection.entry.version}. Re-install it before detaching.`,
34
+ });
35
+ }
36
+ const currentSourceSha256 = inspection.current_source_sha256;
37
+ if (!currentSourceSha256) {
38
+ throw new CliError({
39
+ exitCode: exitCodeForError("E_IO"),
40
+ code: "E_IO",
41
+ message: `Cached source hash is missing for ${inspection.entry.id}@${inspection.entry.version}`,
42
+ });
43
+ }
44
+ if (inspection.state === "modified") {
45
+ throw new CliError({
46
+ exitCode: exitCodeForError("E_USAGE"),
47
+ code: "E_USAGE",
48
+ message: `Recipe ${inspection.entry.id} is no longer a clean project link. Restore it with agentplane recipes update ${inspection.entry.id} --force before detaching.`,
49
+ });
50
+ }
51
+ const cache = await readInstalledRecipesFile(resolveInstalledRecipesPath());
52
+ const registry = await readProjectRecipesRegistry(project);
53
+ const cached = cache.recipes.find((entry) => entry.id === inspection.entry.id && entry.version === inspection.entry.version);
54
+ if (!cached) {
55
+ throw new CliError({
56
+ exitCode: exitCodeForError("E_IO"),
57
+ code: "E_IO",
58
+ message: `Recipe not found in global cache: ${inspection.entry.id}@${inspection.entry.version}`,
59
+ });
60
+ }
61
+ await ensureActionApproved({
62
+ action: "dangerous_fs",
63
+ config: loaded.config,
64
+ yes: false,
65
+ reason: `recipes detach ${inspection.entry.id}@${inspection.entry.version}`,
66
+ });
67
+ const targetDir = resolveProjectVendoredRecipeDir(project, inspection.entry.id);
68
+ await runVendoredRecipeMutation({
69
+ targetDir,
70
+ mode: "replace",
71
+ materialize: async (nextTargetDir) => {
72
+ await cp(inspection.source_dir, nextTargetDir, { recursive: true });
73
+ },
74
+ commit: async () => {
75
+ const vendoredSha256 = await hashRecipeTree(targetDir);
76
+ const nextRegistry = replaceProjectRecipeRegistryEntry(registry, {
77
+ id: inspection.entry.id,
78
+ version: inspection.entry.version,
79
+ path: inspection.entry.project_path,
80
+ active: registry.recipes.find((entry) => entry.id === inspection.entry.id)?.active === true,
81
+ materialization: "copy",
82
+ source_ref: inspection.entry.source_ref,
83
+ source_sha256: currentSourceSha256,
84
+ vendored_sha256: vendoredSha256,
85
+ installed_at: inspection.entry.installed_at,
86
+ tags: normalizeRecipeTags(cached.tags ?? cached.manifest.tags ?? []),
87
+ });
88
+ await publishProjectRecipesState({ project, registry: nextRegistry });
89
+ },
90
+ });
91
+ process.stdout.write(`Detached recipe ${inspection.entry.id}@${inspection.entry.version} into a project-local copy.\n`);
92
+ return 0;
93
+ }
94
+ catch (err) {
95
+ if (err instanceof CliError)
96
+ throw err;
97
+ throw mapCoreError(err, { command: "recipes detach", root: opts.rootOverride ?? null });
98
+ }
99
+ }
@@ -0,0 +1,6 @@
1
+ export declare function cmdRecipeDisableParsed(opts: {
2
+ cwd: string;
3
+ rootOverride?: string;
4
+ id: string;
5
+ }): Promise<number>;
6
+ //# sourceMappingURL=disable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disable.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/disable.ts"],"names":[],"mappings":"AAQA,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,MAAM,CAAC,CAelB"}
@@ -0,0 +1,23 @@
1
+ import { resolveProject } from "@agentplaneorg/core";
2
+ import { mapCoreError } from "../../../../cli/error-map.js";
3
+ import { CliError } from "../../../../shared/errors.js";
4
+ import { publishProjectRecipesState } from "../overlay-project.js";
5
+ import { readProjectRecipesRegistry, setProjectRecipeActiveInFile } from "../project-registry.js";
6
+ export async function cmdRecipeDisableParsed(opts) {
7
+ try {
8
+ const project = await resolveProject({
9
+ cwd: opts.cwd,
10
+ rootOverride: opts.rootOverride ?? null,
11
+ });
12
+ const registry = await readProjectRecipesRegistry(project);
13
+ const nextRegistry = setProjectRecipeActiveInFile(registry, opts.id, false);
14
+ const { bundle } = await publishProjectRecipesState({ project, registry: nextRegistry });
15
+ process.stdout.write(`Disabled overlay ${opts.id} (${bundle.active.length} active)\n`);
16
+ return 0;
17
+ }
18
+ catch (err) {
19
+ if (err instanceof CliError)
20
+ throw err;
21
+ throw mapCoreError(err, { command: "recipes disable", root: opts.rootOverride ?? null });
22
+ }
23
+ }
@@ -0,0 +1,6 @@
1
+ export declare function cmdRecipeEnableParsed(opts: {
2
+ cwd: string;
3
+ rootOverride?: string;
4
+ id: string;
5
+ }): Promise<number>;
6
+ //# sourceMappingURL=enable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enable.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/enable.ts"],"names":[],"mappings":"AAUA,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,MAAM,CAAC,CA+BlB"}
@@ -0,0 +1,41 @@
1
+ import { resolveProject } from "@agentplaneorg/core";
2
+ import { mapCoreError } from "../../../../cli/error-map.js";
3
+ import { exitCodeForError } from "../../../../cli/exit-codes.js";
4
+ import { CliError } from "../../../../shared/errors.js";
5
+ import { publishProjectRecipesState } from "../overlay-project.js";
6
+ import { readProjectInstalledRecipes } from "../project-installed-recipes.js";
7
+ import { readProjectRecipesRegistry, setProjectRecipeActiveInFile } from "../project-registry.js";
8
+ export async function cmdRecipeEnableParsed(opts) {
9
+ try {
10
+ const project = await resolveProject({
11
+ cwd: opts.cwd,
12
+ rootOverride: opts.rootOverride ?? null,
13
+ });
14
+ const installed = await readProjectInstalledRecipes(project);
15
+ const entry = installed.recipes.find((recipe) => recipe.id === opts.id);
16
+ if (!entry) {
17
+ throw new CliError({
18
+ exitCode: exitCodeForError("E_IO"),
19
+ code: "E_IO",
20
+ message: `Recipe not installed: ${opts.id}`,
21
+ });
22
+ }
23
+ if (entry.manifest.kind !== "project_overlay") {
24
+ throw new CliError({
25
+ exitCode: 3,
26
+ code: "E_VALIDATION",
27
+ message: `Recipe ${opts.id} is not a project overlay`,
28
+ });
29
+ }
30
+ const registry = await readProjectRecipesRegistry(project);
31
+ const nextRegistry = setProjectRecipeActiveInFile(registry, opts.id, true);
32
+ const { bundle } = await publishProjectRecipesState({ project, registry: nextRegistry });
33
+ process.stdout.write(`Enabled overlay ${opts.id} (${bundle.active.length} active)\n`);
34
+ return 0;
35
+ }
36
+ catch (err) {
37
+ if (err instanceof CliError)
38
+ throw err;
39
+ throw mapCoreError(err, { command: "recipes enable", root: opts.rootOverride ?? null });
40
+ }
41
+ }
@@ -0,0 +1,5 @@
1
+ export declare function cmdRecipeExplainActiveParsed(opts: {
2
+ cwd: string;
3
+ rootOverride?: string;
4
+ }): Promise<number>;
5
+ //# sourceMappingURL=explain-active.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"explain-active.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/explain-active.ts"],"names":[],"mappings":"AAOA,wBAAsB,4BAA4B,CAAC,IAAI,EAAE;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,MAAM,CAAC,CAalB"}
@@ -0,0 +1,20 @@
1
+ import { resolveProject } from "@agentplaneorg/core";
2
+ import { mapCoreError } from "../../../../cli/error-map.js";
3
+ import { CliError } from "../../../../shared/errors.js";
4
+ import { readProjectOverlayBundle } from "../overlay-project.js";
5
+ export async function cmdRecipeExplainActiveParsed(opts) {
6
+ try {
7
+ const project = await resolveProject({
8
+ cwd: opts.cwd,
9
+ rootOverride: opts.rootOverride ?? null,
10
+ });
11
+ const bundle = await readProjectOverlayBundle(project);
12
+ process.stdout.write(`${JSON.stringify(bundle ?? null, null, 2)}\n`);
13
+ return 0;
14
+ }
15
+ catch (err) {
16
+ if (err instanceof CliError)
17
+ throw err;
18
+ throw mapCoreError(err, { command: "recipes explain-active", root: opts.rootOverride ?? null });
19
+ }
20
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"explain.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/explain.ts"],"names":[],"mappings":"AAWA,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,MAAM,CAAC,CAqIlB"}
1
+ {"version":3,"file":"explain.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/explain.ts"],"names":[],"mappings":"AAkBA,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,MAAM,CAAC,CA0LlB"}
@@ -1,18 +1,26 @@
1
+ import path from "node:path";
2
+ import { collectRecipeScenarioDetails } from "@agentplaneorg/recipes";
1
3
  import { resolveProject } from "@agentplaneorg/core";
2
4
  import { mapCoreError } from "../../../../cli/error-map.js";
5
+ import { createCliEmitter } from "../../../../cli/output.js";
3
6
  import { exitCodeForError } from "../../../../cli/exit-codes.js";
4
7
  import { CliError } from "../../../../shared/errors.js";
5
8
  import { formatJsonBlock } from "../format.js";
9
+ import { readActiveRecipeIds } from "../overlay-project.js";
6
10
  import { readProjectInstalledRecipes } from "../project-installed-recipes.js";
7
- import { resolveProjectInstalledRecipeDir } from "../paths.js";
8
- import { collectRecipeScenarioDetails } from "../scenario.js";
11
+ import { inspectProjectRecipe } from "../project-recipe-state.js";
12
+ import { resolveProjectRecipesDir, resolveProjectInstalledRecipeDir } from "../paths.js";
13
+ const output = createCliEmitter();
9
14
  export async function cmdRecipeExplainParsed(opts) {
10
15
  try {
11
16
  const resolved = await resolveProject({
12
17
  cwd: opts.cwd,
13
18
  rootOverride: opts.rootOverride ?? null,
14
19
  });
15
- const installed = await readProjectInstalledRecipes(resolved);
20
+ const [installed, activeIds] = await Promise.all([
21
+ readProjectInstalledRecipes(resolved),
22
+ readActiveRecipeIds(resolved),
23
+ ]);
16
24
  const entry = installed.recipes.find((recipe) => recipe.id === opts.id);
17
25
  if (!entry) {
18
26
  throw new CliError({
@@ -21,120 +29,159 @@ export async function cmdRecipeExplainParsed(opts) {
21
29
  message: `Recipe not installed: ${opts.id}`,
22
30
  });
23
31
  }
32
+ const inspection = await inspectProjectRecipe({ project: resolved, recipeId: opts.id });
24
33
  const manifest = entry.manifest;
25
- const recipeDir = resolveProjectInstalledRecipeDir(resolved, entry.id);
34
+ const recipeDir = entry.project_path
35
+ ? path.join(resolveProjectRecipesDir(resolved), entry.project_path)
36
+ : resolveProjectInstalledRecipeDir(resolved, entry.id);
26
37
  const scenarioDetails = await collectRecipeScenarioDetails(recipeDir, manifest);
27
- process.stdout.write(`Recipe: ${manifest.id}@${manifest.version}\n`);
28
- process.stdout.write(`Name: ${manifest.name}\n`);
29
- process.stdout.write(`Summary: ${manifest.summary}\n`);
30
- process.stdout.write(`Description: ${manifest.description}\n`);
38
+ output.lines([
39
+ `Recipe: ${manifest.id}@${manifest.version}`,
40
+ `Kind: ${manifest.kind}`,
41
+ `Schema: ${manifest.schema_version}`,
42
+ `Active: ${activeIds.includes(entry.id) ? "yes" : "no"}`,
43
+ `Materialization: ${entry.materialization}`,
44
+ `State: ${inspection.state}`,
45
+ `Source ref: ${entry.source_ref}`,
46
+ `Cache source: ${inspection.cache_present ? "present" : "missing"}`,
47
+ `Source sha256: ${entry.source_sha256}`,
48
+ `Vendored sha256: ${inspection.current_vendored_sha256}`,
49
+ `Name: ${manifest.name}`,
50
+ `Summary: ${manifest.summary}`,
51
+ `Description: ${manifest.description}`,
52
+ ]);
31
53
  if (manifest.tags && manifest.tags.length > 0) {
32
- process.stdout.write(`Tags: ${manifest.tags.join(", ")}\n`);
54
+ output.line(`Tags: ${manifest.tags.join(", ")}`);
33
55
  }
34
56
  if (manifest.compatibility) {
35
57
  const payload = formatJsonBlock(manifest.compatibility, " ");
36
58
  if (payload)
37
- process.stdout.write(`Compatibility:\n${payload}\n`);
59
+ output.jsonSection("Compatibility", manifest.compatibility);
38
60
  }
39
61
  const skills = manifest.skills ?? [];
40
62
  const agents = manifest.agents ?? [];
41
63
  const tools = manifest.tools ?? [];
42
64
  if (skills.length > 0) {
43
- process.stdout.write("Skills:\n");
65
+ output.line("Skills:");
44
66
  for (const skill of skills) {
45
- process.stdout.write(` - ${skill.id} - ${skill.summary}\n`);
67
+ output.line(` - ${skill.id} - ${skill.summary}`);
46
68
  }
47
69
  }
48
70
  if (agents.length > 0) {
49
- process.stdout.write("Agents:\n");
71
+ output.line("Agents:");
50
72
  for (const agent of agents) {
51
- process.stdout.write(` - ${agent.display_name} (${agent.id}) - ${agent.summary} [role=${agent.role}]\n`);
73
+ output.line(` - ${agent.display_name} (${agent.id}) - ${agent.summary} [role=${agent.role}]`);
52
74
  }
53
75
  }
54
76
  if (tools.length > 0) {
55
- process.stdout.write("Tools:\n");
77
+ output.line("Tools:");
56
78
  for (const tool of tools) {
57
- process.stdout.write(` - ${tool.id} - ${tool.summary}\n`);
79
+ output.line(` - ${tool.id} - ${tool.summary}`);
58
80
  }
59
81
  }
82
+ const prompts = manifest.prompts ?? [];
83
+ const validators = manifest.validators ?? [];
84
+ if (prompts.length > 0) {
85
+ output.line("Overlay prompts:");
86
+ for (const prompt of prompts) {
87
+ output.line(` - ${prompt.id} [surface=${prompt.surface}, strength=${prompt.strength ?? "default"}, file=${prompt.file}]`);
88
+ }
89
+ }
90
+ if (validators.length > 0) {
91
+ output.line("Overlay validators:");
92
+ for (const validator of validators) {
93
+ output.line(` - ${validator.id} [kind=${validator.kind}, phase=${validator.phase}]`);
94
+ }
95
+ }
96
+ if (manifest.templates && Object.keys(manifest.templates).length > 0) {
97
+ const payload = formatJsonBlock(manifest.templates, " ");
98
+ if (payload)
99
+ output.jsonSection("Templates", manifest.templates);
100
+ }
60
101
  if (scenarioDetails.length > 0) {
61
- process.stdout.write("Scenarios:\n");
102
+ output.line("Scenarios:");
62
103
  for (const scenario of scenarioDetails) {
63
104
  const title = scenario.name ? `${scenario.name} (${scenario.id})` : scenario.id;
64
105
  const summary = scenario.summary ? ` - ${scenario.summary}` : "";
65
- process.stdout.write(` - ${title}${summary}\n`);
106
+ output.line(` - ${title}${summary}`);
66
107
  if (scenario.description) {
67
- process.stdout.write(` Description: ${scenario.description}\n`);
108
+ output.line(` Description: ${scenario.description}`);
68
109
  }
69
110
  if (scenario.goal) {
70
- process.stdout.write(` Goal: ${scenario.goal}\n`);
111
+ output.line(` Goal: ${scenario.goal}`);
71
112
  }
72
113
  if (scenario.use_when && scenario.use_when.length > 0) {
73
114
  const payload = formatJsonBlock(scenario.use_when, " ");
74
115
  if (payload)
75
- process.stdout.write(` Use when:\n${payload}\n`);
116
+ output.jsonSection(" Use when", scenario.use_when, { indent: " " });
76
117
  }
77
118
  if (scenario.avoid_when && scenario.avoid_when.length > 0) {
78
119
  const payload = formatJsonBlock(scenario.avoid_when, " ");
79
120
  if (payload)
80
- process.stdout.write(` Avoid when:\n${payload}\n`);
121
+ output.jsonSection(" Avoid when", scenario.avoid_when, { indent: " " });
81
122
  }
82
123
  if (scenario.required_inputs && scenario.required_inputs.length > 0) {
83
124
  const payload = formatJsonBlock(scenario.required_inputs, " ");
84
- if (payload)
85
- process.stdout.write(` Required inputs:\n${payload}\n`);
125
+ if (payload) {
126
+ output.jsonSection(" Required inputs", scenario.required_inputs, {
127
+ indent: " ",
128
+ });
129
+ }
86
130
  }
87
131
  if (scenario.inputs !== undefined) {
88
132
  const payload = formatJsonBlock(scenario.inputs, " ");
89
133
  if (payload)
90
- process.stdout.write(` Inputs:\n${payload}\n`);
134
+ output.jsonSection(" Inputs", scenario.inputs, { indent: " " });
91
135
  }
92
136
  if (scenario.outputs !== undefined) {
93
137
  const payload = formatJsonBlock(scenario.outputs, " ");
94
138
  if (payload)
95
- process.stdout.write(` Outputs:\n${payload}\n`);
139
+ output.jsonSection(" Outputs", scenario.outputs, { indent: " " });
96
140
  }
97
141
  if (scenario.permissions && scenario.permissions.length > 0) {
98
142
  const payload = formatJsonBlock(scenario.permissions, " ");
99
143
  if (payload)
100
- process.stdout.write(` Permissions:\n${payload}\n`);
144
+ output.jsonSection(" Permissions", scenario.permissions, { indent: " " });
101
145
  }
102
146
  if (scenario.artifacts && scenario.artifacts.length > 0) {
103
147
  const payload = formatJsonBlock(scenario.artifacts, " ");
104
148
  if (payload)
105
- process.stdout.write(` Artifacts:\n${payload}\n`);
149
+ output.jsonSection(" Artifacts", scenario.artifacts, { indent: " " });
106
150
  }
107
151
  if (scenario.agents_involved && scenario.agents_involved.length > 0) {
108
152
  const payload = formatJsonBlock(scenario.agents_involved, " ");
109
- if (payload)
110
- process.stdout.write(` Agents involved:\n${payload}\n`);
153
+ if (payload) {
154
+ output.jsonSection(" Agents involved", scenario.agents_involved, {
155
+ indent: " ",
156
+ });
157
+ }
111
158
  }
112
159
  if (scenario.skills_used && scenario.skills_used.length > 0) {
113
160
  const payload = formatJsonBlock(scenario.skills_used, " ");
114
161
  if (payload)
115
- process.stdout.write(` Skills used:\n${payload}\n`);
162
+ output.jsonSection(" Skills used", scenario.skills_used, { indent: " " });
116
163
  }
117
164
  if (scenario.tools_used && scenario.tools_used.length > 0) {
118
165
  const payload = formatJsonBlock(scenario.tools_used, " ");
119
166
  if (payload)
120
- process.stdout.write(` Tools used:\n${payload}\n`);
167
+ output.jsonSection(" Tools used", scenario.tools_used, { indent: " " });
121
168
  }
122
169
  if (scenario.run_profile) {
123
170
  const payload = formatJsonBlock(scenario.run_profile, " ");
124
171
  if (payload)
125
- process.stdout.write(` Run profile:\n${payload}\n`);
172
+ output.jsonSection(" Run profile", scenario.run_profile, { indent: " " });
126
173
  }
127
174
  if (scenario.steps && scenario.steps.length > 0) {
128
- process.stdout.write(" Steps:\n");
175
+ output.line(" Steps:");
129
176
  let stepIndex = 1;
130
177
  for (const step of scenario.steps) {
131
- process.stdout.write(` ${stepIndex}. ${JSON.stringify(step)}\n`);
178
+ output.line(` ${stepIndex}. ${JSON.stringify(step)}`);
132
179
  stepIndex += 1;
133
180
  }
134
181
  continue;
135
182
  }
136
183
  if (scenario.source !== "definition") {
137
- process.stdout.write(" Details: Scenario definition not found in recipe.\n");
184
+ output.line(" Details: Scenario definition not found in recipe.");
138
185
  }
139
186
  }
140
187
  }
@@ -1 +1 @@
1
- {"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/info.ts"],"names":[],"mappings":"AASA,wBAAsB,mBAAmB,CAAC,IAAI,EAAE;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,MAAM,CAAC,CAkElB"}
1
+ {"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/info.ts"],"names":[],"mappings":"AAWA,wBAAsB,mBAAmB,CAAC,IAAI,EAAE;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,MAAM,CAAC,CAmFlB"}