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
@@ -1,54 +0,0 @@
1
- import { invalidPathMessage, requiredFieldMessage, invalidFieldMessage, } from "../../../cli/output.js";
2
- import { dedupeStrings } from "../../../shared/strings.js";
3
- function normalizeScopedId(field, value) {
4
- const trimmed = value.trim();
5
- if (!trimmed)
6
- throw new Error(requiredFieldMessage(field));
7
- if (trimmed.includes("/") || trimmed.includes("\\")) {
8
- throw new Error(invalidPathMessage(field, "must not contain path separators"));
9
- }
10
- if (trimmed === "." || trimmed === "..") {
11
- throw new Error(invalidPathMessage(field, "must not be '.' or '..'"));
12
- }
13
- return trimmed;
14
- }
15
- export function normalizeRecipeId(value) {
16
- return normalizeScopedId("manifest.id", value);
17
- }
18
- export function normalizeAgentId(value) {
19
- return normalizeScopedId("agent.id", value);
20
- }
21
- export function normalizeSkillId(value) {
22
- return normalizeScopedId("skill.id", value);
23
- }
24
- export function normalizeToolId(value) {
25
- return normalizeScopedId("tool.id", value);
26
- }
27
- export function normalizeScenarioId(value) {
28
- return normalizeScopedId("scenario.id", value);
29
- }
30
- export function normalizeRecipeTags(value) {
31
- if (value === undefined)
32
- return [];
33
- if (!Array.isArray(value))
34
- throw new Error(invalidFieldMessage("manifest.tags", "string[]"));
35
- const tags = value.map((tag) => {
36
- if (typeof tag !== "string")
37
- throw new Error(invalidFieldMessage("manifest.tags", "string[]"));
38
- return tag.trim();
39
- });
40
- return dedupeStrings(tags);
41
- }
42
- export function normalizeRecipeRelativePath(field, value) {
43
- const trimmed = value.trim().replaceAll("\\", "/");
44
- if (!trimmed)
45
- throw new Error(requiredFieldMessage(field));
46
- if (trimmed.startsWith("/")) {
47
- throw new Error(invalidPathMessage(field, "must be relative"));
48
- }
49
- const segments = trimmed.split("/");
50
- if (segments.some((segment) => !segment || segment === "." || segment === "..")) {
51
- throw new Error(invalidPathMessage(field, "must stay within the recipe root"));
52
- }
53
- return trimmed;
54
- }
@@ -1,16 +0,0 @@
1
- import type { RecipeManifest, RecipeScenarioDetail, ScenarioDefinition } from "./types.js";
2
- export declare function readScenarioDefinition(filePath: string): Promise<ScenarioDefinition>;
3
- export declare function readScenarioIndex(filePath: string): Promise<{
4
- schema_version: 1;
5
- scenarios: {
6
- id: string;
7
- summary?: string;
8
- }[];
9
- }>;
10
- export declare function collectRecipeScenarioDetails(recipeDir: string, manifest: RecipeManifest): Promise<RecipeScenarioDetail[]>;
11
- export declare function normalizeScenarioToolStep(raw: unknown, sourcePath: string): {
12
- tool: string;
13
- args: string[];
14
- env: Record<string, string>;
15
- };
16
- //# sourceMappingURL=scenario.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scenario.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/scenario.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EAGpB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAqKpB,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAG1F;AAED,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACjE,cAAc,EAAE,CAAC,CAAC;IAClB,SAAS,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C,CAAC,CAeD;AAED,wBAAsB,4BAA4B,CAChD,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,oBAAoB,EAAE,CAAC,CA+EjC;AAED,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,OAAO,EACZ,UAAU,EAAE,MAAM,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAyB/D"}
@@ -1,262 +0,0 @@
1
- import { readdir, readFile } from "node:fs/promises";
2
- import path from "node:path";
3
- import { fileExists, getPathKind } from "../../../cli/fs-utils.js";
4
- import { invalidFieldMessage, requiredFieldMessage } from "../../../cli/output.js";
5
- import { isRecord } from "../../../shared/guards.js";
6
- import { dedupeStrings } from "../../../shared/strings.js";
7
- import { RECIPES_SCENARIOS_DIR_NAME, RECIPES_SCENARIOS_INDEX_NAME } from "./constants.js";
8
- import { normalizeScenarioId } from "./normalize.js";
9
- function normalizeRequiredString(raw, field, sourcePath) {
10
- if (typeof raw !== "string")
11
- throw new Error(invalidFieldMessage(field, "string", sourcePath));
12
- const value = raw.trim();
13
- if (!value)
14
- throw new Error(requiredFieldMessage(field, sourcePath));
15
- return value;
16
- }
17
- function normalizeOptionalString(raw, field, sourcePath) {
18
- if (raw === undefined)
19
- return undefined;
20
- if (typeof raw !== "string")
21
- throw new Error(invalidFieldMessage(field, "string", sourcePath));
22
- const value = raw.trim();
23
- return value || undefined;
24
- }
25
- function normalizeOptionalStringList(raw, field, sourcePath) {
26
- if (raw === undefined)
27
- return undefined;
28
- if (!Array.isArray(raw))
29
- throw new Error(invalidFieldMessage(field, "string[]", sourcePath));
30
- const values = raw.map((value) => {
31
- if (typeof value !== "string")
32
- throw new Error(invalidFieldMessage(field, "string[]", sourcePath));
33
- const trimmed = value.trim();
34
- if (!trimmed)
35
- throw new Error(invalidFieldMessage(field, "string[]", sourcePath));
36
- return trimmed;
37
- });
38
- const deduped = dedupeStrings(values).toSorted();
39
- return deduped.length > 0 ? deduped : undefined;
40
- }
41
- function normalizeTaskTemplateDoc(raw, sourcePath) {
42
- if (raw === undefined)
43
- return undefined;
44
- if (!isRecord(raw)) {
45
- throw new Error(invalidFieldMessage("scenario.task_template.doc", "object", sourcePath));
46
- }
47
- const doc = {
48
- summary: normalizeOptionalString(raw.summary, "scenario.task_template.doc.summary", sourcePath),
49
- scope: normalizeOptionalString(raw.scope, "scenario.task_template.doc.scope", sourcePath),
50
- plan: normalizeOptionalString(raw.plan, "scenario.task_template.doc.plan", sourcePath),
51
- verify_steps: normalizeOptionalString(raw.verify_steps, "scenario.task_template.doc.verify_steps", sourcePath),
52
- rollback_plan: normalizeOptionalString(raw.rollback_plan, "scenario.task_template.doc.rollback_plan", sourcePath),
53
- findings: normalizeOptionalString(raw.findings, "scenario.task_template.doc.findings", sourcePath),
54
- };
55
- return Object.values(doc).some((value) => value !== undefined) ? doc : undefined;
56
- }
57
- function normalizeTaskTemplate(raw, sourcePath) {
58
- if (!isRecord(raw)) {
59
- throw new Error(invalidFieldMessage("scenario.task_template", "object", sourcePath));
60
- }
61
- const rawPriority = raw.priority;
62
- let priority;
63
- if (rawPriority !== undefined) {
64
- if (rawPriority !== "low" &&
65
- rawPriority !== "normal" &&
66
- rawPriority !== "med" &&
67
- rawPriority !== "high") {
68
- throw new Error(invalidFieldMessage("scenario.task_template.priority", '"low" | "normal" | "med" | "high"', sourcePath));
69
- }
70
- priority = rawPriority;
71
- }
72
- return {
73
- title: normalizeRequiredString(raw.title, "scenario.task_template.title", sourcePath),
74
- description: normalizeRequiredString(raw.description, "scenario.task_template.description", sourcePath),
75
- owner: normalizeRequiredString(raw.owner, "scenario.task_template.owner", sourcePath),
76
- priority,
77
- tags: normalizeOptionalStringList(raw.tags, "scenario.task_template.tags", sourcePath),
78
- verify: normalizeOptionalStringList(raw.verify, "scenario.task_template.verify", sourcePath),
79
- doc: normalizeTaskTemplateDoc(raw.doc, sourcePath),
80
- };
81
- }
82
- function normalizeScenarioEvidence(raw, sourcePath) {
83
- if (raw === undefined)
84
- return undefined;
85
- if (!isRecord(raw)) {
86
- throw new Error(invalidFieldMessage("scenario.evidence", "object", sourcePath));
87
- }
88
- const required = raw.required === true;
89
- let files = [];
90
- if (raw.files !== undefined) {
91
- if (!Array.isArray(raw.files)) {
92
- throw new Error(invalidFieldMessage("scenario.evidence.files", "string[]", sourcePath));
93
- }
94
- files = raw.files
95
- .map((value) => (typeof value === "string" ? value.trim() : ""))
96
- .filter(Boolean);
97
- if (files.length !== raw.files.length) {
98
- throw new Error(invalidFieldMessage("scenario.evidence.files", "string[]", sourcePath));
99
- }
100
- }
101
- if (required && files.length === 0) {
102
- files = ["evidence.json"];
103
- }
104
- return { required, files };
105
- }
106
- function validateScenarioDefinition(raw, sourcePath) {
107
- if (!isRecord(raw))
108
- throw new Error(invalidFieldMessage("scenario", "object", sourcePath));
109
- if (raw.schema_version !== undefined && raw.schema_version !== "1") {
110
- throw new Error(invalidFieldMessage("scenario.schema_version", '"1"', sourcePath));
111
- }
112
- const rawId = typeof raw.id === "string" ? raw.id : "";
113
- const id = normalizeScenarioId(rawId);
114
- const goal = typeof raw.goal === "string" ? raw.goal.trim() : "";
115
- if (!goal)
116
- throw new Error(requiredFieldMessage("scenario.goal", sourcePath));
117
- if (!("task_template" in raw)) {
118
- throw new Error(requiredFieldMessage("scenario.task_template", sourcePath));
119
- }
120
- if (!("inputs" in raw))
121
- throw new Error(requiredFieldMessage("scenario.inputs", sourcePath));
122
- if (!("outputs" in raw))
123
- throw new Error(requiredFieldMessage("scenario.outputs", sourcePath));
124
- if (!Array.isArray(raw.steps)) {
125
- throw new Error(invalidFieldMessage("scenario.steps", "array", sourcePath));
126
- }
127
- return {
128
- schema_version: "1",
129
- id,
130
- summary: typeof raw.summary === "string" ? raw.summary.trim() : undefined,
131
- description: typeof raw.description === "string" ? raw.description.trim() : undefined,
132
- goal,
133
- task_template: normalizeTaskTemplate(raw.task_template, sourcePath),
134
- inputs: raw.inputs,
135
- outputs: raw.outputs,
136
- evidence: normalizeScenarioEvidence(raw.evidence, sourcePath),
137
- steps: raw.steps,
138
- };
139
- }
140
- export async function readScenarioDefinition(filePath) {
141
- const raw = JSON.parse(await readFile(filePath, "utf8"));
142
- return validateScenarioDefinition(raw, filePath);
143
- }
144
- export async function readScenarioIndex(filePath) {
145
- const raw = JSON.parse(await readFile(filePath, "utf8"));
146
- if (!isRecord(raw))
147
- throw new Error(invalidFieldMessage("scenarios index", "object"));
148
- if (raw.schema_version !== 1)
149
- throw new Error(invalidFieldMessage("scenarios index.schema_version", "1"));
150
- if (!Array.isArray(raw.scenarios))
151
- throw new Error(invalidFieldMessage("scenarios index.scenarios", "array"));
152
- const scenarios = raw.scenarios
153
- .filter((entry) => isRecord(entry))
154
- .map((entry) => ({
155
- id: typeof entry.id === "string" ? entry.id : "",
156
- summary: typeof entry.summary === "string" ? entry.summary : undefined,
157
- }))
158
- .filter((entry) => entry.id);
159
- return { schema_version: 1, scenarios };
160
- }
161
- export async function collectRecipeScenarioDetails(recipeDir, manifest) {
162
- const manifestScenarios = manifest.scenarios ?? [];
163
- const scenariosDir = path.join(recipeDir, RECIPES_SCENARIOS_DIR_NAME);
164
- if (manifestScenarios.length > 0) {
165
- const details = manifestScenarios.map((scenario) => ({
166
- id: scenario.id,
167
- name: scenario.name,
168
- summary: scenario.summary,
169
- description: scenario.description,
170
- use_when: scenario.use_when,
171
- avoid_when: scenario.avoid_when,
172
- required_inputs: scenario.required_inputs,
173
- outputs: scenario.outputs,
174
- permissions: scenario.permissions,
175
- artifacts: scenario.artifacts,
176
- agents_involved: scenario.agents_involved,
177
- skills_used: scenario.skills_used,
178
- tools_used: scenario.tools_used,
179
- run_profile: scenario.run_profile,
180
- file: scenario.file,
181
- source: "manifest",
182
- }));
183
- if ((await getPathKind(scenariosDir)) === "dir") {
184
- const files = await readdir(scenariosDir);
185
- const jsonFiles = files.filter((file) => file.toLowerCase().endsWith(".json")).toSorted();
186
- for (const file of jsonFiles) {
187
- const scenario = await readScenarioDefinition(path.join(scenariosDir, file));
188
- const detail = details.find((entry) => entry.id === scenario.id);
189
- if (!detail)
190
- continue;
191
- detail.description ??= scenario.description;
192
- detail.goal = scenario.goal;
193
- detail.task_template = scenario.task_template;
194
- detail.inputs = scenario.inputs;
195
- detail.steps = scenario.steps;
196
- detail.outputs = detail.outputs ?? scenario.outputs;
197
- detail.evidence = scenario.evidence;
198
- detail.source = "definition";
199
- }
200
- }
201
- return details.toSorted((a, b) => a.id.localeCompare(b.id));
202
- }
203
- if ((await getPathKind(scenariosDir)) === "dir") {
204
- const files = await readdir(scenariosDir);
205
- const jsonFiles = files.filter((file) => file.toLowerCase().endsWith(".json")).toSorted();
206
- const details = [];
207
- for (const file of jsonFiles) {
208
- const scenario = await readScenarioDefinition(path.join(scenariosDir, file));
209
- details.push({
210
- id: scenario.id,
211
- summary: scenario.summary,
212
- description: scenario.description,
213
- goal: scenario.goal,
214
- task_template: scenario.task_template,
215
- inputs: scenario.inputs,
216
- outputs: scenario.outputs,
217
- evidence: scenario.evidence,
218
- steps: scenario.steps,
219
- source: "definition",
220
- });
221
- }
222
- return details.toSorted((a, b) => a.id.localeCompare(b.id));
223
- }
224
- const scenariosIndexPath = path.join(recipeDir, RECIPES_SCENARIOS_INDEX_NAME);
225
- if (await fileExists(scenariosIndexPath)) {
226
- const index = await readScenarioIndex(scenariosIndexPath);
227
- return index.scenarios
228
- .map((scenario) => ({
229
- id: scenario.id,
230
- summary: scenario.summary,
231
- source: "index",
232
- }))
233
- .toSorted((a, b) => a.id.localeCompare(b.id));
234
- }
235
- return [];
236
- }
237
- export function normalizeScenarioToolStep(raw, sourcePath) {
238
- if (!isRecord(raw)) {
239
- throw new Error(invalidFieldMessage("scenario step", "object", sourcePath));
240
- }
241
- const tool = typeof raw.tool === "string" ? raw.tool.trim() : "";
242
- if (!tool) {
243
- throw new Error(requiredFieldMessage("scenario step.tool", sourcePath));
244
- }
245
- const args = Array.isArray(raw.args) ? raw.args.filter((arg) => typeof arg === "string") : [];
246
- if (Array.isArray(raw.args) && args.length !== raw.args.length) {
247
- throw new Error(invalidFieldMessage("scenario step.args", "string[]", sourcePath));
248
- }
249
- const env = {};
250
- if (raw.env !== undefined) {
251
- if (!isRecord(raw.env)) {
252
- throw new Error(invalidFieldMessage("scenario step.env", "object", sourcePath));
253
- }
254
- for (const [key, value] of Object.entries(raw.env)) {
255
- if (typeof value !== "string") {
256
- throw new Error(invalidFieldMessage("scenario step.env", "string map", sourcePath));
257
- }
258
- env[key] = value;
259
- }
260
- }
261
- return { tool, args, env };
262
- }
@@ -1,17 +0,0 @@
1
- export type BundledRecipesCatalog = {
2
- schema_version: 1;
3
- recipes: {
4
- id: string;
5
- summary: string;
6
- description?: string;
7
- source_path?: string;
8
- versions: {
9
- version: string;
10
- }[];
11
- }[];
12
- };
13
- export type BundledRecipeEntry = BundledRecipesCatalog["recipes"][number];
14
- export declare const BUNDLED_RECIPES_CATALOG: BundledRecipesCatalog;
15
- export declare function resolveBundledRecipeSourcePath(recipeId: string): string | null;
16
- export declare function getBundledRecipeEntry(recipeId: string): BundledRecipeEntry | null;
17
- //# sourceMappingURL=bundled-recipes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundled-recipes.d.ts","sourceRoot":"","sources":["../../src/recipes/bundled-recipes.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,qBAAqB,GAAG;IAClC,cAAc,EAAE,CAAC,CAAC;IAClB,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KACjC,EAAE,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,eAAO,MAAM,uBAAuB,EAAE,qBAGrC,CAAC;AAEF,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK9E;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAEjF"}
@@ -1,15 +0,0 @@
1
- import { fileURLToPath } from "node:url";
2
- export const BUNDLED_RECIPES_CATALOG = {
3
- schema_version: 1,
4
- recipes: [],
5
- };
6
- export function resolveBundledRecipeSourcePath(recipeId) {
7
- const entry = getBundledRecipeEntry(recipeId);
8
- const sourcePath = entry?.source_path?.trim();
9
- if (!sourcePath)
10
- return null;
11
- return fileURLToPath(new URL(`../../assets/${sourcePath.replace(/^\/+/, "")}`, import.meta.url));
12
- }
13
- export function getBundledRecipeEntry(recipeId) {
14
- return BUNDLED_RECIPES_CATALOG.recipes.find((recipe) => recipe.id === recipeId) ?? null;
15
- }
@@ -1,68 +0,0 @@
1
- import type { AgentplaneConfig, ResolvedProject } from "@agentplaneorg/core";
2
- import type { Adapters } from "../../adapters/index.js";
3
- import { type CommandContext } from "../../commands/shared/task-backend.js";
4
- import { PolicyEngine } from "../../policy/engine.js";
5
- import { type ApprovalRuntime } from "../../runtime/approvals/index.js";
6
- import { type AgentplaneCapabilityRegistry } from "../../runtime/capabilities/index.js";
7
- import { type ResolvedExecutionProfileRuntime } from "../../runtime/execution-profile/index.js";
8
- import { type FrameworkExplainPayload } from "../../runtime/explain/index.js";
9
- import { type ResolvedHarnessContract } from "../../runtime/harness/index.js";
10
- import { type FrameworkProtocolSurface } from "../../runtime/protocol/index.js";
11
- import { type TaskIntakeRuntime } from "../../runtime/task-intake/index.js";
12
- export type AgentplaneRepositoryContext = {
13
- git_root: string;
14
- agentplane_dir: string;
15
- workflow_dir: string;
16
- };
17
- export type AgentplaneBackendContext = {
18
- id: string;
19
- config_path: string;
20
- capabilities: CommandContext["taskBackend"]["capabilities"] | null;
21
- task_backend: CommandContext["taskBackend"];
22
- };
23
- export type ReadOnlyUsecaseContext = {
24
- command: CommandContext;
25
- project: CommandContext["resolvedProject"];
26
- repo: AgentplaneRepositoryContext;
27
- config: CommandContext["config"];
28
- backend: AgentplaneBackendContext;
29
- harness: ResolvedHarnessContract;
30
- capabilities: AgentplaneCapabilityRegistry;
31
- execution: ResolvedHarnessContract["execution"];
32
- executionProfile: ResolvedExecutionProfileRuntime;
33
- taskIntake: TaskIntakeRuntime;
34
- frameworkExplain: FrameworkExplainPayload;
35
- frameworkProtocol: FrameworkProtocolSurface;
36
- approvals: ResolvedHarnessContract["policy"]["approvals"];
37
- policy: PolicyEngine;
38
- approvalRuntime: ApprovalRuntime;
39
- };
40
- export type UsecaseContext = ReadOnlyUsecaseContext & {
41
- adapters: Adapters;
42
- };
43
- export type AgentplaneReadOnlyExecutionContext = ReadOnlyUsecaseContext;
44
- export type AgentplaneExecutionContext = UsecaseContext;
45
- export declare function resolveCommandContext(opts: {
46
- cwd: string;
47
- rootOverride?: string | null;
48
- resolvedProject?: ResolvedProject;
49
- config?: AgentplaneConfig;
50
- }): Promise<CommandContext>;
51
- export declare function resolveContext(opts: {
52
- cwd: string;
53
- rootOverride?: string | null;
54
- resolvedProject?: ResolvedProject;
55
- config?: AgentplaneConfig;
56
- }): Promise<ReadOnlyUsecaseContext>;
57
- export declare const resolveReadOnlyExecutionContext: typeof resolveContext;
58
- export declare function resolveExecutionContext(opts: {
59
- cwd: string;
60
- rootOverride?: string | null;
61
- resolvedProject?: ResolvedProject;
62
- config?: AgentplaneConfig;
63
- }): Promise<AgentplaneExecutionContext>;
64
- export declare function makeReadOnlyUsecaseContext(command: CommandContext): Promise<ReadOnlyUsecaseContext>;
65
- export declare function makeUsecaseContext(command: CommandContext): Promise<UsecaseContext>;
66
- export declare const makeReadOnlyExecutionContext: typeof makeReadOnlyUsecaseContext;
67
- export declare const makeExecutionContext: typeof makeUsecaseContext;
68
- //# sourceMappingURL=resolve-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-context.d.ts","sourceRoot":"","sources":["../../../src/usecases/context/resolve-context.ts"],"names":[],"mappings":"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"}
@@ -1,9 +0,0 @@
1
- import type { CommandCtx } from "../../cli/spec/spec.js";
2
- import type { CommandContext } from "../../commands/shared/task-backend.js";
3
- import { cmdTaskList } from "../../commands/task/list.js";
4
- export declare function taskListUsecase(opts: {
5
- cli: CommandCtx;
6
- command: CommandContext;
7
- filters: Parameters<typeof cmdTaskList>[0]["filters"];
8
- }): Promise<number>;
9
- //# sourceMappingURL=task-list-usecase.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"task-list-usecase.d.ts","sourceRoot":"","sources":["../../../src/usecases/task/task-list-usecase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI1D,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,EAAE,UAAU,CAAC;IAChB,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CACvD,GAAG,OAAO,CAAC,MAAM,CAAC,CAelB"}
@@ -1,17 +0,0 @@
1
- import { cmdTaskList } from "../../commands/task/list.js";
2
- import { makeReadOnlyUsecaseContext } from "../context/resolve-context.js";
3
- export async function taskListUsecase(opts) {
4
- const execution = await makeReadOnlyUsecaseContext(opts.command);
5
- void execution.policy.evaluate({
6
- action: "task_list",
7
- config: execution.config,
8
- taskId: "",
9
- git: { stagedPaths: [] },
10
- });
11
- return await cmdTaskList({
12
- ctx: execution.command,
13
- cwd: opts.cli.cwd,
14
- rootOverride: opts.cli.rootOverride,
15
- filters: opts.filters,
16
- });
17
- }
@@ -1,9 +0,0 @@
1
- import type { CommandCtx } from "../../cli/spec/spec.js";
2
- import type { CommandContext } from "../../commands/shared/task-backend.js";
3
- import type { TaskNewParsed } from "../../commands/task/new.js";
4
- export declare function taskNewUsecase(opts: {
5
- cli: CommandCtx;
6
- command: CommandContext;
7
- parsed: TaskNewParsed;
8
- }): Promise<number>;
9
- //# sourceMappingURL=task-new-usecase.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"task-new-usecase.d.ts","sourceRoot":"","sources":["../../../src/usecases/task/task-new-usecase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAKhE,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,GAAG,EAAE,UAAU,CAAC;IAChB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,aAAa,CAAC;CACvB,GAAG,OAAO,CAAC,MAAM,CAAC,CAelB"}
@@ -1,17 +0,0 @@
1
- import { runTaskNewParsed } from "../../commands/task/new.js";
2
- import { makeUsecaseContext } from "../context/resolve-context.js";
3
- export async function taskNewUsecase(opts) {
4
- const execution = await makeUsecaseContext(opts.command);
5
- void execution.policy.evaluate({
6
- action: "task_new",
7
- config: execution.config,
8
- taskId: "",
9
- git: { stagedPaths: [] },
10
- });
11
- return await runTaskNewParsed({
12
- ctx: execution.command,
13
- cwd: opts.cli.cwd,
14
- rootOverride: opts.cli.rootOverride,
15
- parsed: opts.parsed,
16
- });
17
- }