agentplane 0.3.13 → 0.3.15

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 (278) 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/framework.manifest.json +7 -0
  5. package/assets/policy/incidents.md +5 -3
  6. package/assets/policy/workflow.branch_pr.md +10 -5
  7. package/dist/.build-manifest.json +280 -180
  8. package/dist/cli/output.d.ts +29 -0
  9. package/dist/cli/output.d.ts.map +1 -1
  10. package/dist/cli/output.js +33 -0
  11. package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
  12. package/dist/cli/run-cli/command-catalog/core.js +29 -87
  13. package/dist/cli/run-cli/command-catalog/lifecycle.d.ts.map +1 -1
  14. package/dist/cli/run-cli/command-catalog/lifecycle.js +4 -12
  15. package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
  16. package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
  17. package/dist/cli/run-cli/command-catalog/project.js +16 -38
  18. package/dist/cli/run-cli/command-catalog/shared.d.ts +9 -6
  19. package/dist/cli/run-cli/command-catalog/shared.d.ts.map +1 -1
  20. package/dist/cli/run-cli/command-catalog/shared.js +23 -6
  21. package/dist/cli/run-cli/command-catalog/task.d.ts.map +1 -1
  22. package/dist/cli/run-cli/command-catalog/task.js +6 -18
  23. package/dist/cli/run-cli/command-catalog.d.ts +1 -1
  24. package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
  25. package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -1
  26. package/dist/cli/run-cli/commands/init/recipes.js +1 -0
  27. package/dist/cli/run-cli.js +1 -1
  28. package/dist/cli/run-cli.test-helpers.d.ts +1 -74
  29. package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
  30. package/dist/cli/run-cli.test-helpers.js +1 -769
  31. package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
  32. package/dist/commands/branch/cleanup-merged.js +5 -9
  33. package/dist/commands/branch/work-start.command.d.ts.map +1 -1
  34. package/dist/commands/branch/work-start.command.js +1 -0
  35. package/dist/commands/commit.spec.d.ts.map +1 -1
  36. package/dist/commands/commit.spec.js +2 -0
  37. package/dist/commands/doctor/branch-pr.d.ts +1 -1
  38. package/dist/commands/doctor/branch-pr.d.ts.map +1 -1
  39. package/dist/commands/doctor/branch-pr.js +5 -2
  40. package/dist/commands/guard/impl/commands.d.ts.map +1 -1
  41. package/dist/commands/guard/impl/commands.js +4 -1
  42. package/dist/commands/guard/impl/comment-commit.d.ts.map +1 -1
  43. package/dist/commands/guard/impl/comment-commit.js +2 -1
  44. package/dist/commands/guard/impl/env.d.ts +6 -0
  45. package/dist/commands/guard/impl/env.d.ts.map +1 -1
  46. package/dist/commands/guard/impl/env.js +41 -0
  47. package/dist/commands/pr/internal/auto-commit.d.ts.map +1 -1
  48. package/dist/commands/pr/internal/auto-commit.js +2 -1
  49. package/dist/commands/pr/internal/sync-branch.d.ts +36 -0
  50. package/dist/commands/pr/internal/sync-branch.d.ts.map +1 -0
  51. package/dist/commands/pr/internal/sync-branch.js +113 -0
  52. package/dist/commands/pr/internal/sync-github.d.ts +28 -0
  53. package/dist/commands/pr/internal/sync-github.d.ts.map +1 -0
  54. package/dist/commands/pr/internal/sync-github.js +178 -0
  55. package/dist/commands/pr/internal/sync-model.d.ts +36 -0
  56. package/dist/commands/pr/internal/sync-model.d.ts.map +1 -0
  57. package/dist/commands/pr/internal/sync-model.js +1 -0
  58. package/dist/commands/pr/internal/sync-open-step.d.ts +10 -0
  59. package/dist/commands/pr/internal/sync-open-step.d.ts.map +1 -0
  60. package/dist/commands/pr/internal/sync-open-step.js +128 -0
  61. package/dist/commands/pr/internal/sync-support.d.ts +7 -0
  62. package/dist/commands/pr/internal/sync-support.d.ts.map +1 -0
  63. package/dist/commands/pr/internal/sync-support.js +29 -0
  64. package/dist/commands/pr/internal/sync-update-step.d.ts +6 -0
  65. package/dist/commands/pr/internal/sync-update-step.d.ts.map +1 -0
  66. package/dist/commands/pr/internal/sync-update-step.js +68 -0
  67. package/dist/commands/pr/internal/sync.d.ts +2 -6
  68. package/dist/commands/pr/internal/sync.d.ts.map +1 -1
  69. package/dist/commands/pr/internal/sync.js +83 -529
  70. package/dist/commands/pr/open.d.ts.map +1 -1
  71. package/dist/commands/pr/open.js +25 -8
  72. package/dist/commands/pr/pr.command.d.ts.map +1 -1
  73. package/dist/commands/pr/pr.command.js +7 -2
  74. package/dist/commands/recipes/impl/apply.d.ts +1 -1
  75. package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
  76. package/dist/commands/recipes/impl/apply.js +1 -2
  77. package/dist/commands/recipes/impl/commands/active.d.ts.map +1 -1
  78. package/dist/commands/recipes/impl/commands/active.js +6 -5
  79. package/dist/commands/recipes/impl/commands/add.d.ts +1 -0
  80. package/dist/commands/recipes/impl/commands/add.d.ts.map +1 -1
  81. package/dist/commands/recipes/impl/commands/add.js +32 -27
  82. package/dist/commands/recipes/impl/commands/detach.d.ts.map +1 -1
  83. package/dist/commands/recipes/impl/commands/detach.js +35 -21
  84. package/dist/commands/recipes/impl/commands/disable.d.ts.map +1 -1
  85. package/dist/commands/recipes/impl/commands/disable.js +5 -3
  86. package/dist/commands/recipes/impl/commands/enable.d.ts.map +1 -1
  87. package/dist/commands/recipes/impl/commands/enable.js +5 -3
  88. package/dist/commands/recipes/impl/commands/explain.d.ts.map +1 -1
  89. package/dist/commands/recipes/impl/commands/explain.js +57 -47
  90. package/dist/commands/recipes/impl/commands/info.d.ts.map +1 -1
  91. package/dist/commands/recipes/impl/commands/info.js +25 -21
  92. package/dist/commands/recipes/impl/commands/install.d.ts +1 -1
  93. package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
  94. package/dist/commands/recipes/impl/commands/install.js +3 -13
  95. package/dist/commands/recipes/impl/commands/list-remote.d.ts.map +1 -1
  96. package/dist/commands/recipes/impl/commands/list-remote.js +2 -3
  97. package/dist/commands/recipes/impl/commands/list.d.ts.map +1 -1
  98. package/dist/commands/recipes/impl/commands/list.js +7 -6
  99. package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -1
  100. package/dist/commands/recipes/impl/commands/remove.js +12 -7
  101. package/dist/commands/recipes/impl/commands/update.d.ts.map +1 -1
  102. package/dist/commands/recipes/impl/commands/update.js +38 -24
  103. package/dist/commands/recipes/impl/index.d.ts +1 -1
  104. package/dist/commands/recipes/impl/index.d.ts.map +1 -1
  105. package/dist/commands/recipes/impl/installed-recipes.d.ts +1 -1
  106. package/dist/commands/recipes/impl/installed-recipes.d.ts.map +1 -1
  107. package/dist/commands/recipes/impl/installed-recipes.js +1 -2
  108. package/dist/commands/recipes/impl/mutation-transaction.d.ts +7 -0
  109. package/dist/commands/recipes/impl/mutation-transaction.d.ts.map +1 -0
  110. package/dist/commands/recipes/impl/mutation-transaction.js +47 -0
  111. package/dist/commands/recipes/impl/overlay-project.d.ts +19 -3
  112. package/dist/commands/recipes/impl/overlay-project.d.ts.map +1 -1
  113. package/dist/commands/recipes/impl/overlay-project.js +76 -38
  114. package/dist/commands/recipes/impl/paths.d.ts +0 -3
  115. package/dist/commands/recipes/impl/paths.d.ts.map +1 -1
  116. package/dist/commands/recipes/impl/paths.js +0 -3
  117. package/dist/commands/recipes/impl/project-installed-recipes.d.ts +4 -1
  118. package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
  119. package/dist/commands/recipes/impl/project-installed-recipes.js +6 -4
  120. package/dist/commands/recipes/impl/project-recipe-state.d.ts +1 -1
  121. package/dist/commands/recipes/impl/project-recipe-state.d.ts.map +1 -1
  122. package/dist/commands/recipes/impl/project-registry.d.ts +5 -1
  123. package/dist/commands/recipes/impl/project-registry.d.ts.map +1 -1
  124. package/dist/commands/recipes/impl/project-registry.js +34 -14
  125. package/dist/commands/recipes/impl/resolver.d.ts +1 -1
  126. package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
  127. package/dist/commands/recipes/impl/resolver.js +1 -1
  128. package/dist/commands/recipes/impl/types.d.ts +1 -1
  129. package/dist/commands/recipes/impl/types.d.ts.map +1 -1
  130. package/dist/commands/recipes/impl/version.d.ts +5 -0
  131. package/dist/commands/recipes/impl/version.d.ts.map +1 -0
  132. package/dist/commands/recipes/impl/version.js +9 -0
  133. package/dist/commands/recipes.d.ts +5 -4
  134. package/dist/commands/recipes.d.ts.map +1 -1
  135. package/dist/commands/recipes.js +3 -3
  136. package/dist/commands/release/apply.command.d.ts +1 -1
  137. package/dist/commands/release/apply.command.d.ts.map +1 -1
  138. package/dist/commands/release/apply.command.js +15 -379
  139. package/dist/commands/release/apply.mutation.d.ts +1 -0
  140. package/dist/commands/release/apply.mutation.d.ts.map +1 -1
  141. package/dist/commands/release/apply.mutation.js +24 -1
  142. package/dist/commands/release/apply.pipeline.d.ts +22 -0
  143. package/dist/commands/release/apply.pipeline.d.ts.map +1 -0
  144. package/dist/commands/release/apply.pipeline.js +371 -0
  145. package/dist/commands/release/apply.preflight.d.ts +2 -0
  146. package/dist/commands/release/apply.preflight.d.ts.map +1 -1
  147. package/dist/commands/release/apply.preflight.js +13 -4
  148. package/dist/commands/release/apply.types.d.ts +27 -0
  149. package/dist/commands/release/apply.types.d.ts.map +1 -1
  150. package/dist/commands/release.test-helpers.d.ts +4 -0
  151. package/dist/commands/release.test-helpers.d.ts.map +1 -1
  152. package/dist/commands/release.test-helpers.js +7 -0
  153. package/dist/commands/shared/reconcile-check.d.ts.map +1 -1
  154. package/dist/commands/shared/reconcile-check.js +2 -2
  155. package/dist/commands/shared/task-backend.d.ts +6 -1
  156. package/dist/commands/shared/task-backend.d.ts.map +1 -1
  157. package/dist/commands/shared/task-backend.js +34 -2
  158. package/dist/commands/shared/task-mutation.d.ts.map +1 -1
  159. package/dist/commands/shared/task-mutation.js +4 -4
  160. package/dist/commands/shared/task-store/intents.d.ts +34 -0
  161. package/dist/commands/shared/task-store/intents.d.ts.map +1 -0
  162. package/dist/commands/shared/task-store/intents.js +265 -0
  163. package/dist/commands/shared/task-store/readme.d.ts +28 -0
  164. package/dist/commands/shared/task-store/readme.d.ts.map +1 -0
  165. package/dist/commands/shared/task-store/readme.js +125 -0
  166. package/dist/commands/shared/task-store/store.d.ts +26 -0
  167. package/dist/commands/shared/task-store/store.d.ts.map +1 -0
  168. package/dist/commands/shared/task-store/store.js +105 -0
  169. package/dist/commands/shared/task-store/types.d.ts +94 -0
  170. package/dist/commands/shared/task-store/types.d.ts.map +1 -0
  171. package/dist/commands/shared/task-store/types.js +1 -0
  172. package/dist/commands/shared/task-store.d.ts +3 -109
  173. package/dist/commands/shared/task-store.d.ts.map +1 -1
  174. package/dist/commands/shared/task-store.js +2 -493
  175. package/dist/commands/task/block.d.ts.map +1 -1
  176. package/dist/commands/task/block.js +7 -2
  177. package/dist/commands/task/comment.d.ts.map +1 -1
  178. package/dist/commands/task/comment.js +7 -2
  179. package/dist/commands/task/finish-shared.d.ts.map +1 -1
  180. package/dist/commands/task/finish-shared.js +3 -3
  181. package/dist/commands/task/finish.d.ts.map +1 -1
  182. package/dist/commands/task/finish.js +102 -15
  183. package/dist/commands/task/hosted-close.command.d.ts.map +1 -1
  184. package/dist/commands/task/hosted-close.command.js +23 -2
  185. package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -1
  186. package/dist/commands/task/hosted-merge-sync.js +9 -4
  187. package/dist/commands/task/list.run.d.ts.map +1 -1
  188. package/dist/commands/task/list.run.js +14 -4
  189. package/dist/commands/task/new.command.d.ts.map +1 -1
  190. package/dist/commands/task/new.command.js +16 -2
  191. package/dist/commands/task/new.js +2 -2
  192. package/dist/commands/task/show.d.ts.map +1 -1
  193. package/dist/commands/task/show.js +3 -3
  194. package/dist/commands/task/update.d.ts.map +1 -1
  195. package/dist/commands/task/update.js +11 -3
  196. package/dist/runner/adapters/codex.d.ts.map +1 -1
  197. package/dist/runner/adapters/codex.js +3 -33
  198. package/dist/runner/adapters/custom.d.ts.map +1 -1
  199. package/dist/runner/adapters/custom.js +3 -30
  200. package/dist/runner/adapters/runtime-shared.d.ts +14 -0
  201. package/dist/runner/adapters/runtime-shared.d.ts.map +1 -0
  202. package/dist/runner/adapters/runtime-shared.js +36 -0
  203. package/dist/runner/context/base-prompt-sources.d.ts +30 -0
  204. package/dist/runner/context/base-prompt-sources.d.ts.map +1 -0
  205. package/dist/runner/context/base-prompt-sources.js +144 -0
  206. package/dist/runner/context/base-prompts.d.ts +3 -22
  207. package/dist/runner/context/base-prompts.d.ts.map +1 -1
  208. package/dist/runner/context/base-prompts.js +6 -450
  209. package/dist/runner/context/overlay-prompt-blocks.d.ts +7 -0
  210. package/dist/runner/context/overlay-prompt-blocks.d.ts.map +1 -0
  211. package/dist/runner/context/overlay-prompt-blocks.js +72 -0
  212. package/dist/runner/context/prompt-block-shared.d.ts +54 -0
  213. package/dist/runner/context/prompt-block-shared.d.ts.map +1 -0
  214. package/dist/runner/context/prompt-block-shared.js +106 -0
  215. package/dist/runner/context/recipe-context.d.ts +2 -1
  216. package/dist/runner/context/recipe-context.d.ts.map +1 -1
  217. package/dist/runner/context/recipe-context.js +2 -1
  218. package/dist/runner/context/recipe-prompt-blocks.d.ts +6 -0
  219. package/dist/runner/context/recipe-prompt-blocks.d.ts.map +1 -0
  220. package/dist/runner/context/recipe-prompt-blocks.js +143 -0
  221. package/dist/runner/usecases/scenario-materialize-task.js +2 -2
  222. package/dist/runner/usecases/task-run-inspect.js +2 -2
  223. package/dist/runner/usecases/task-run-lifecycle-shared.js +2 -2
  224. package/dist/runner/usecases/task-run.d.ts.map +1 -1
  225. package/dist/runner/usecases/task-run.js +4 -2
  226. package/dist/runtime/capabilities/recipe.d.ts +1 -1
  227. package/dist/runtime/capabilities/recipe.d.ts.map +1 -1
  228. package/dist/runtime/execution-context.d.ts +63 -0
  229. package/dist/runtime/execution-context.d.ts.map +1 -0
  230. package/dist/{usecases/context/resolve-context.js → runtime/execution-context.js} +23 -26
  231. package/dist/runtime/incidents/advice-strategy.d.ts +15 -0
  232. package/dist/runtime/incidents/advice-strategy.d.ts.map +1 -0
  233. package/dist/runtime/incidents/advice-strategy.js +54 -0
  234. package/dist/runtime/incidents/plan-strategy.d.ts +9 -0
  235. package/dist/runtime/incidents/plan-strategy.d.ts.map +1 -0
  236. package/dist/runtime/incidents/plan-strategy.js +205 -0
  237. package/dist/runtime/incidents/registry-strategy.d.ts +6 -0
  238. package/dist/runtime/incidents/registry-strategy.d.ts.map +1 -0
  239. package/dist/runtime/incidents/registry-strategy.js +280 -0
  240. package/dist/runtime/incidents/resolve.d.ts +3 -25
  241. package/dist/runtime/incidents/resolve.d.ts.map +1 -1
  242. package/dist/runtime/incidents/resolve.js +3 -683
  243. package/dist/runtime/incidents/shared.d.ts +34 -0
  244. package/dist/runtime/incidents/shared.d.ts.map +1 -0
  245. package/dist/runtime/incidents/shared.js +171 -0
  246. package/dist/testing/cli-harness/recipe-archives.d.ts +28 -0
  247. package/dist/testing/cli-harness/recipe-archives.d.ts.map +1 -0
  248. package/dist/testing/cli-harness/recipe-archives.js +374 -0
  249. package/dist/testing/cli-harness/stdio.d.ts +26 -0
  250. package/dist/testing/cli-harness/stdio.d.ts.map +1 -0
  251. package/dist/testing/cli-harness/stdio.js +84 -0
  252. package/dist/testing/cli-harness.d.ts +25 -0
  253. package/dist/testing/cli-harness.d.ts.map +1 -0
  254. package/dist/testing/cli-harness.js +313 -0
  255. package/dist/testing/index.d.ts +2 -0
  256. package/dist/testing/index.d.ts.map +1 -0
  257. package/dist/testing/index.js +1 -0
  258. package/package.json +7 -4
  259. package/dist/commands/recipes/impl/manifest.d.ts +0 -4
  260. package/dist/commands/recipes/impl/manifest.d.ts.map +0 -1
  261. package/dist/commands/recipes/impl/manifest.js +0 -7
  262. package/dist/commands/recipes/impl/normalize.d.ts +0 -8
  263. package/dist/commands/recipes/impl/normalize.d.ts.map +0 -1
  264. package/dist/commands/recipes/impl/normalize.js +0 -54
  265. package/dist/commands/recipes/impl/scenario.d.ts +0 -16
  266. package/dist/commands/recipes/impl/scenario.d.ts.map +0 -1
  267. package/dist/commands/recipes/impl/scenario.js +0 -262
  268. package/dist/recipes/bundled-recipes.d.ts +0 -17
  269. package/dist/recipes/bundled-recipes.d.ts.map +0 -1
  270. package/dist/recipes/bundled-recipes.js +0 -15
  271. package/dist/usecases/context/resolve-context.d.ts +0 -68
  272. package/dist/usecases/context/resolve-context.d.ts.map +0 -1
  273. package/dist/usecases/task/task-list-usecase.d.ts +0 -9
  274. package/dist/usecases/task/task-list-usecase.d.ts.map +0 -1
  275. package/dist/usecases/task/task-list-usecase.js +0 -17
  276. package/dist/usecases/task/task-new-usecase.d.ts +0 -9
  277. package/dist/usecases/task/task-new-usecase.d.ts.map +0 -1
  278. package/dist/usecases/task/task-new-usecase.js +0 -17
@@ -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":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAC/F,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,oCAAoC,CAAC;AAE5C,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACnE,YAAY,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAC3C,IAAI,EAAE,2BAA2B,CAAC;IAClC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IACjC,OAAO,EAAE,wBAAwB,CAAC;IAClC,OAAO,EAAE,uBAAuB,CAAC;IACjC,YAAY,EAAE,4BAA4B,CAAC;IAC3C,SAAS,EAAE,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAChD,gBAAgB,EAAE,+BAA+B,CAAC;IAClD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,iBAAiB,EAAE,wBAAwB,CAAC;IAC5C,SAAS,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC;IAC1D,MAAM,EAAE,YAAY,CAAC;IACrB,eAAe,EAAE,eAAe,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,sBAAsB,GAAG;IACpD,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,sBAAsB,CAAC;AAExE,MAAM,MAAM,0BAA0B,GAAG,cAAc,CAAC;AAKxD,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B,GAAG,OAAO,CAAC,cAAc,CAAC,CAO1B;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAGlC;AAED,eAAO,MAAM,+BAA+B,uBAAiB,CAAC;AAE9D,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAClD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAGtC;AAED,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,sBAAsB,CAAC,CAOjC;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAOzF;AAED,eAAO,MAAM,4BAA4B,mCAA6B,CAAC;AAEvE,eAAO,MAAM,oBAAoB,2BAAqB,CAAC"}
@@ -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
- }