agentplane 0.3.17 → 0.3.18

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 (639) hide show
  1. package/assets/policy/incidents.md +1 -0
  2. package/dist/.build-manifest.json +683 -593
  3. package/dist/adapters/git/git-context-adapter.d.ts +1 -1
  4. package/dist/adapters/git/git-context-adapter.d.ts.map +1 -1
  5. package/dist/agents/agents-template.d.ts.map +1 -1
  6. package/dist/agents/agents-template.js +23 -9
  7. package/dist/backends/task-backend/load.d.ts +2 -1
  8. package/dist/backends/task-backend/load.d.ts.map +1 -1
  9. package/dist/backends/task-backend/load.js +2 -1
  10. package/dist/backends/task-backend/local-backend-doc.d.ts.map +1 -1
  11. package/dist/backends/task-backend/local-backend-doc.js +2 -1
  12. package/dist/backends/task-backend/local-backend-read.d.ts.map +1 -1
  13. package/dist/backends/task-backend/local-backend-read.js +2 -1
  14. package/dist/backends/task-backend/local-backend-state.d.ts +1 -1
  15. package/dist/backends/task-backend/local-backend-state.d.ts.map +1 -1
  16. package/dist/backends/task-backend/local-backend-write.d.ts.map +1 -1
  17. package/dist/backends/task-backend/local-backend-write.js +2 -1
  18. package/dist/backends/task-backend/redmine/backend-cache-doc.js +1 -1
  19. package/dist/backends/task-backend/redmine/backend-report.js +1 -1
  20. package/dist/backends/task-backend/redmine/backend-sync/migration.js +1 -1
  21. package/dist/backends/task-backend/redmine/backend-sync/status.d.ts.map +1 -1
  22. package/dist/backends/task-backend/redmine/backend-sync/status.js +2 -1
  23. package/dist/backends/task-backend/redmine/backend-sync/write.js +1 -1
  24. package/dist/backends/task-backend/redmine/mapping.d.ts +1 -1
  25. package/dist/backends/task-backend/redmine/mapping.d.ts.map +1 -1
  26. package/dist/backends/task-backend/redmine/mapping.js +2 -2
  27. package/dist/backends/task-backend/redmine/parse.d.ts +1 -1
  28. package/dist/backends/task-backend/redmine/parse.d.ts.map +1 -1
  29. package/dist/backends/task-backend/redmine/state.js +1 -1
  30. package/dist/backends/task-backend/shared/constants.d.ts +1 -1
  31. package/dist/backends/task-backend/shared/constants.d.ts.map +1 -1
  32. package/dist/backends/task-backend/shared/constants.js +1 -1
  33. package/dist/backends/task-backend/shared/doc.js +1 -1
  34. package/dist/backends/task-backend/shared/export.d.ts +1 -1
  35. package/dist/backends/task-backend/shared/export.d.ts.map +1 -1
  36. package/dist/backends/task-backend/shared/export.js +3 -14
  37. package/dist/backends/task-backend/shared/id.js +1 -1
  38. package/dist/backends/task-backend/shared/record.d.ts +1 -1
  39. package/dist/backends/task-backend/shared/record.d.ts.map +1 -1
  40. package/dist/backends/task-backend/shared/record.js +2 -3
  41. package/dist/backends/task-backend/shared/types.d.ts +2 -2
  42. package/dist/backends/task-backend/shared/types.d.ts.map +1 -1
  43. package/dist/cli/archive.d.ts.map +1 -1
  44. package/dist/cli/archive.js +1 -1
  45. package/dist/cli/group-command.d.ts +1 -0
  46. package/dist/cli/group-command.d.ts.map +1 -1
  47. package/dist/cli/group-command.js +7 -3
  48. package/dist/cli/output.d.ts +1 -1
  49. package/dist/cli/output.d.ts.map +1 -1
  50. package/dist/cli/output.js +1 -1
  51. package/dist/cli/prompts.d.ts.map +1 -1
  52. package/dist/cli/prompts.js +8 -6
  53. package/dist/cli/run-cli/command-catalog/core.d.ts +1 -1
  54. package/dist/cli/run-cli/command-catalog/core.js +8 -8
  55. package/dist/cli/run-cli/command-catalog/{shared.d.ts → kernel.d.ts} +3 -2
  56. package/dist/cli/run-cli/command-catalog/kernel.d.ts.map +1 -0
  57. package/dist/cli/run-cli/command-catalog/lifecycle.d.ts +1 -1
  58. package/dist/cli/run-cli/command-catalog/lifecycle.js +3 -3
  59. package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
  60. package/dist/cli/run-cli/command-catalog/project.js +4 -4
  61. package/dist/cli/run-cli/command-catalog/task.d.ts +1 -1
  62. package/dist/cli/run-cli/command-catalog/task.js +3 -3
  63. package/dist/cli/run-cli/command-catalog.d.ts +2 -2
  64. package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
  65. package/dist/cli/run-cli/command-catalog.js +2 -0
  66. package/dist/cli/run-cli/command-loaders/core.d.ts +55 -0
  67. package/dist/cli/run-cli/command-loaders/core.d.ts.map +1 -0
  68. package/dist/cli/run-cli/command-loaders/core.js +27 -0
  69. package/dist/cli/run-cli/command-loaders/lifecycle.d.ts +19 -0
  70. package/dist/cli/run-cli/command-loaders/lifecycle.d.ts.map +1 -0
  71. package/dist/cli/run-cli/command-loaders/lifecycle.js +18 -0
  72. package/dist/cli/run-cli/command-loaders/project.d.ts +37 -0
  73. package/dist/cli/run-cli/command-loaders/project.d.ts.map +1 -0
  74. package/dist/cli/run-cli/command-loaders/project.js +36 -0
  75. package/dist/cli/run-cli/command-loaders/task.d.ts +65 -0
  76. package/dist/cli/run-cli/command-loaders/task.d.ts.map +1 -0
  77. package/dist/cli/run-cli/command-loaders/task.js +50 -0
  78. package/dist/cli/run-cli/commands/codex.d.ts +1 -1
  79. package/dist/cli/run-cli/commands/codex.d.ts.map +1 -1
  80. package/dist/cli/run-cli/commands/config.d.ts +1 -1
  81. package/dist/cli/run-cli/commands/config.d.ts.map +1 -1
  82. package/dist/cli/run-cli/commands/config.js +1 -1
  83. package/dist/cli/run-cli/commands/core/agent-profiles.js +1 -1
  84. package/dist/cli/run-cli/commands/core/agents.d.ts +1 -1
  85. package/dist/cli/run-cli/commands/core/agents.d.ts.map +1 -1
  86. package/dist/cli/run-cli/commands/core/preflight.d.ts.map +1 -1
  87. package/dist/cli/run-cli/commands/core/preflight.js +3 -2
  88. package/dist/cli/run-cli/commands/ide.d.ts +1 -1
  89. package/dist/cli/run-cli/commands/ide.d.ts.map +1 -1
  90. package/dist/cli/run-cli/commands/init/model.d.ts +2 -1
  91. package/dist/cli/run-cli/commands/init/model.d.ts.map +1 -1
  92. package/dist/cli/run-cli/commands/init/orchestrate-v2.d.ts +9 -0
  93. package/dist/cli/run-cli/commands/init/orchestrate-v2.d.ts.map +1 -0
  94. package/dist/cli/run-cli/commands/init/orchestrate-v2.js +265 -0
  95. package/dist/cli/run-cli/commands/init/orchestrate.d.ts.map +1 -1
  96. package/dist/cli/run-cli/commands/init/orchestrate.js +19 -23
  97. package/dist/cli/run-cli/commands/init/prompts-v2.d.ts +10 -0
  98. package/dist/cli/run-cli/commands/init/prompts-v2.d.ts.map +1 -0
  99. package/dist/cli/run-cli/commands/init/prompts-v2.js +26 -0
  100. package/dist/cli/run-cli/commands/init/recipes.d.ts +2 -1
  101. package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -1
  102. package/dist/cli/run-cli/commands/init/recipes.js +3 -1
  103. package/dist/cli/run-cli/commands/init/spec.d.ts.map +1 -1
  104. package/dist/cli/run-cli/commands/init/spec.js +14 -0
  105. package/dist/cli/run-cli/commands/init/steps/advanced-settings.d.ts +9 -0
  106. package/dist/cli/run-cli/commands/init/steps/advanced-settings.d.ts.map +1 -0
  107. package/dist/cli/run-cli/commands/init/steps/advanced-settings.js +48 -0
  108. package/dist/cli/run-cli/commands/init/steps/apply.d.ts +30 -0
  109. package/dist/cli/run-cli/commands/init/steps/apply.d.ts.map +1 -0
  110. package/dist/cli/run-cli/commands/init/steps/apply.js +96 -0
  111. package/dist/cli/run-cli/commands/init/steps/backend.d.ts +8 -0
  112. package/dist/cli/run-cli/commands/init/steps/backend.d.ts.map +1 -0
  113. package/dist/cli/run-cli/commands/init/steps/backend.js +17 -0
  114. package/dist/cli/run-cli/commands/init/steps/conflict-resolver.d.ts +10 -0
  115. package/dist/cli/run-cli/commands/init/steps/conflict-resolver.d.ts.map +1 -0
  116. package/dist/cli/run-cli/commands/init/steps/conflict-resolver.js +41 -0
  117. package/dist/cli/run-cli/commands/init/steps/contracts.d.ts +57 -0
  118. package/dist/cli/run-cli/commands/init/steps/contracts.d.ts.map +1 -0
  119. package/dist/cli/run-cli/commands/init/steps/contracts.js +1 -0
  120. package/dist/cli/run-cli/commands/init/steps/ide.d.ts +8 -0
  121. package/dist/cli/run-cli/commands/init/steps/ide.d.ts.map +1 -0
  122. package/dist/cli/run-cli/commands/init/steps/ide.js +18 -0
  123. package/dist/cli/run-cli/commands/init/steps/index.d.ts +10 -0
  124. package/dist/cli/run-cli/commands/init/steps/index.d.ts.map +1 -0
  125. package/dist/cli/run-cli/commands/init/steps/index.js +9 -0
  126. package/dist/cli/run-cli/commands/init/steps/policy-gateway.d.ts +8 -0
  127. package/dist/cli/run-cli/commands/init/steps/policy-gateway.d.ts.map +1 -0
  128. package/dist/cli/run-cli/commands/init/steps/policy-gateway.js +17 -0
  129. package/dist/cli/run-cli/commands/init/steps/prompt-utils.d.ts +21 -0
  130. package/dist/cli/run-cli/commands/init/steps/prompt-utils.d.ts.map +1 -0
  131. package/dist/cli/run-cli/commands/init/steps/prompt-utils.js +36 -0
  132. package/dist/cli/run-cli/commands/init/steps/recipe-selection.d.ts +15 -0
  133. package/dist/cli/run-cli/commands/init/steps/recipe-selection.d.ts.map +1 -0
  134. package/dist/cli/run-cli/commands/init/steps/recipe-selection.js +35 -0
  135. package/dist/cli/run-cli/commands/init/steps/setup-profile.d.ts +8 -0
  136. package/dist/cli/run-cli/commands/init/steps/setup-profile.d.ts.map +1 -0
  137. package/dist/cli/run-cli/commands/init/steps/setup-profile.js +32 -0
  138. package/dist/cli/run-cli/commands/init/steps/workflow.d.ts +9 -0
  139. package/dist/cli/run-cli/commands/init/steps/workflow.d.ts.map +1 -0
  140. package/dist/cli/run-cli/commands/init/steps/workflow.js +48 -0
  141. package/dist/cli/run-cli/commands/init/ui-v2.d.ts +17 -0
  142. package/dist/cli/run-cli/commands/init/ui-v2.d.ts.map +1 -0
  143. package/dist/cli/run-cli/commands/init/ui-v2.js +39 -0
  144. package/dist/cli/run-cli/commands/init/write-agents.d.ts.map +1 -1
  145. package/dist/cli/run-cli/commands/init/write-agents.js +1 -1
  146. package/dist/cli/run-cli/commands/init/write-config.d.ts +2 -1
  147. package/dist/cli/run-cli/commands/init/write-config.d.ts.map +1 -1
  148. package/dist/cli/run-cli/commands/init/write-config.js +1 -1
  149. package/dist/cli/run-cli/registry.run.d.ts +1 -1
  150. package/dist/cli/run-cli/registry.run.d.ts.map +1 -1
  151. package/dist/cli/run-cli.d.ts.map +1 -1
  152. package/dist/cli/run-cli.js +2 -1
  153. package/dist/cli.js +677 -4
  154. package/dist/commands/branch/base.js +3 -1
  155. package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
  156. package/dist/commands/branch/cleanup-merged.js +4 -5
  157. package/dist/commands/branch/remove.d.ts.map +1 -1
  158. package/dist/commands/branch/remove.js +4 -2
  159. package/dist/commands/branch/status.d.ts.map +1 -1
  160. package/dist/commands/branch/status.js +3 -3
  161. package/dist/commands/branch/work-start.d.ts.map +1 -1
  162. package/dist/commands/branch/work-start.direct.d.ts.map +1 -1
  163. package/dist/commands/branch/work-start.direct.js +2 -1
  164. package/dist/commands/branch/work-start.git.d.ts +1 -1
  165. package/dist/commands/branch/work-start.git.d.ts.map +1 -1
  166. package/dist/commands/branch/work-start.git.js +2 -2
  167. package/dist/commands/branch/work-start.js +2 -1
  168. package/dist/commands/branch/work-start.materialize.d.ts.map +1 -1
  169. package/dist/commands/branch/work-start.materialize.js +2 -0
  170. package/dist/commands/codex/plugin-install.d.ts.map +1 -1
  171. package/dist/commands/codex/plugin-install.js +2 -1
  172. package/dist/commands/commit.command.js +1 -1
  173. package/dist/commands/doctor/archive.d.ts.map +1 -1
  174. package/dist/commands/doctor/archive.js +4 -3
  175. package/dist/commands/doctor/runtime.d.ts +1 -1
  176. package/dist/commands/doctor/runtime.d.ts.map +1 -1
  177. package/dist/commands/doctor/workflow.js +1 -1
  178. package/dist/commands/doctor/workspace.d.ts.map +1 -1
  179. package/dist/commands/doctor/workspace.js +7 -9
  180. package/dist/commands/doctor.run.d.ts.map +1 -1
  181. package/dist/commands/doctor.run.js +2 -1
  182. package/dist/commands/finish.run.js +1 -1
  183. package/dist/commands/guard/commit.command.d.ts +3 -16
  184. package/dist/commands/guard/commit.command.d.ts.map +1 -1
  185. package/dist/commands/guard/commit.command.js +1 -132
  186. package/dist/commands/guard/commit.spec.d.ts +17 -0
  187. package/dist/commands/guard/commit.spec.d.ts.map +1 -0
  188. package/dist/commands/guard/commit.spec.js +132 -0
  189. package/dist/commands/guard/impl/allow.js +2 -2
  190. package/dist/commands/guard/impl/close-dirt.d.ts.map +1 -1
  191. package/dist/commands/guard/impl/close-dirt.js +2 -3
  192. package/dist/commands/guard/impl/close-message.d.ts.map +1 -1
  193. package/dist/commands/guard/impl/close-message.js +5 -3
  194. package/dist/commands/guard/impl/comment-commit.d.ts +1 -1
  195. package/dist/commands/guard/impl/comment-commit.d.ts.map +1 -1
  196. package/dist/commands/guard/impl/comment-commit.js +1 -1
  197. package/dist/commands/guard/impl/commit.d.ts.map +1 -1
  198. package/dist/commands/guard/impl/commit.js +3 -2
  199. package/dist/commands/guard/impl/env.js +1 -1
  200. package/dist/commands/guard/impl/policy.js +1 -1
  201. package/dist/commands/guard/index.d.ts +3 -2
  202. package/dist/commands/guard/index.d.ts.map +1 -1
  203. package/dist/commands/guard/index.js +3 -2
  204. package/dist/commands/hooks/index.d.ts +1 -1
  205. package/dist/commands/hooks/index.d.ts.map +1 -1
  206. package/dist/commands/hooks/install.js +1 -1
  207. package/dist/commands/hooks/run.commit-msg.d.ts.map +1 -1
  208. package/dist/commands/hooks/run.commit-msg.js +3 -2
  209. package/dist/commands/hooks/run.post-merge.js +1 -1
  210. package/dist/commands/hooks/run.pre-commit.d.ts.map +1 -1
  211. package/dist/commands/hooks/run.pre-commit.js +3 -2
  212. package/dist/commands/hooks/run.pre-push.d.ts.map +1 -1
  213. package/dist/commands/hooks/run.pre-push.js +4 -3
  214. package/dist/commands/incidents/shared.d.ts +1 -2
  215. package/dist/commands/incidents/shared.d.ts.map +1 -1
  216. package/dist/commands/incidents/shared.js +2 -2
  217. package/dist/commands/integrate.command.d.ts +2 -11
  218. package/dist/commands/integrate.command.d.ts.map +1 -1
  219. package/dist/commands/integrate.command.js +1 -45
  220. package/dist/commands/integrate.spec.d.ts +12 -0
  221. package/dist/commands/integrate.spec.d.ts.map +1 -0
  222. package/dist/commands/integrate.spec.js +44 -0
  223. package/dist/commands/pr/check.js +1 -1
  224. package/dist/commands/pr/integrate/artifacts.js +1 -1
  225. package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
  226. package/dist/commands/pr/integrate/cmd.js +2 -1
  227. package/dist/commands/pr/integrate/internal/cleanup.d.ts +1 -1
  228. package/dist/commands/pr/integrate/internal/cleanup.d.ts.map +1 -1
  229. package/dist/commands/pr/integrate/internal/cleanup.js +1 -1
  230. package/dist/commands/pr/integrate/internal/finalize.d.ts.map +1 -1
  231. package/dist/commands/pr/integrate/internal/finalize.js +3 -2
  232. package/dist/commands/pr/integrate/internal/merge.js +3 -2
  233. package/dist/commands/pr/integrate/internal/post-integrate-bootstrap.d.ts +2 -1
  234. package/dist/commands/pr/integrate/internal/post-integrate-bootstrap.d.ts.map +1 -1
  235. package/dist/commands/pr/integrate/internal/post-integrate-bootstrap.js +1 -1
  236. package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.d.ts +2 -1
  237. package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.d.ts.map +1 -1
  238. package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.js +1 -1
  239. package/dist/commands/pr/integrate/internal/prepare.d.ts +2 -1
  240. package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
  241. package/dist/commands/pr/integrate/internal/prepare.js +1 -3
  242. package/dist/commands/pr/integrate/internal/worktree.d.ts +2 -1
  243. package/dist/commands/pr/integrate/internal/worktree.d.ts.map +1 -1
  244. package/dist/commands/pr/integrate/internal/worktree.js +2 -2
  245. package/dist/commands/pr/internal/auto-commit.js +3 -3
  246. package/dist/commands/pr/internal/gh-api.js +2 -2
  247. package/dist/commands/pr/internal/pr-paths.d.ts +1 -1
  248. package/dist/commands/pr/internal/pr-paths.d.ts.map +1 -1
  249. package/dist/commands/pr/internal/pr-paths.js +3 -2
  250. package/dist/commands/pr/internal/review-template.js +1 -1
  251. package/dist/commands/pr/internal/sync-branch.d.ts.map +1 -1
  252. package/dist/commands/pr/internal/sync-branch.js +3 -4
  253. package/dist/commands/pr/internal/sync-github.js +1 -1
  254. package/dist/commands/pr/internal/sync-support.js +1 -1
  255. package/dist/commands/pr/internal/sync.d.ts.map +1 -1
  256. package/dist/commands/pr/internal/sync.js +2 -2
  257. package/dist/commands/pr/note.d.ts.map +1 -1
  258. package/dist/commands/pr/note.js +1 -1
  259. package/dist/commands/pr/open.d.ts.map +1 -1
  260. package/dist/commands/pr/open.js +2 -1
  261. package/dist/commands/pr/pr.command.d.ts +3 -37
  262. package/dist/commands/pr/pr.command.d.ts.map +1 -1
  263. package/dist/commands/pr/pr.command.js +9 -211
  264. package/dist/commands/pr/pr.spec.d.ts +38 -0
  265. package/dist/commands/pr/pr.spec.d.ts.map +1 -0
  266. package/dist/commands/pr/pr.spec.js +210 -0
  267. package/dist/commands/recipes/active.command.js +1 -1
  268. package/dist/commands/recipes/add.command.js +1 -1
  269. package/dist/commands/recipes/cache-prune.command.d.ts +1 -1
  270. package/dist/commands/recipes/cache-prune.command.d.ts.map +1 -1
  271. package/dist/commands/recipes/cache-prune.command.js +1 -1
  272. package/dist/commands/recipes/detach.command.js +1 -1
  273. package/dist/commands/recipes/disable.command.js +1 -1
  274. package/dist/commands/recipes/enable.command.js +1 -1
  275. package/dist/commands/recipes/explain-active.command.js +1 -1
  276. package/dist/commands/recipes/explain.command.js +1 -1
  277. package/dist/commands/recipes/impl/commands/active.js +1 -1
  278. package/dist/commands/recipes/impl/commands/add.d.ts.map +1 -1
  279. package/dist/commands/recipes/impl/commands/add.js +2 -1
  280. package/dist/commands/recipes/impl/commands/cache-prune.js +1 -1
  281. package/dist/commands/recipes/impl/commands/detach.d.ts.map +1 -1
  282. package/dist/commands/recipes/impl/commands/detach.js +2 -1
  283. package/dist/commands/recipes/impl/commands/disable.js +1 -1
  284. package/dist/commands/recipes/impl/commands/enable.js +1 -1
  285. package/dist/commands/recipes/impl/commands/explain-active.js +1 -1
  286. package/dist/commands/recipes/impl/commands/explain.js +1 -1
  287. package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
  288. package/dist/commands/recipes/impl/commands/install.js +2 -1
  289. package/dist/commands/recipes/impl/commands/list-remote.js +1 -1
  290. package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -1
  291. package/dist/commands/recipes/impl/commands/remove.js +2 -1
  292. package/dist/commands/recipes/impl/commands/update.d.ts.map +1 -1
  293. package/dist/commands/recipes/impl/commands/update.js +2 -1
  294. package/dist/commands/recipes/impl/overlay-project.d.ts.map +1 -1
  295. package/dist/commands/recipes/impl/overlay-project.js +2 -1
  296. package/dist/commands/recipes/impl/project.js +1 -1
  297. package/dist/commands/recipes/impl/resolver.d.ts +1 -1
  298. package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
  299. package/dist/commands/recipes/info.command.js +1 -1
  300. package/dist/commands/recipes/install.run.js +1 -1
  301. package/dist/commands/recipes/install.spec.d.ts +1 -1
  302. package/dist/commands/recipes/install.spec.d.ts.map +1 -1
  303. package/dist/commands/recipes/list-remote.command.d.ts +1 -1
  304. package/dist/commands/recipes/list-remote.command.d.ts.map +1 -1
  305. package/dist/commands/recipes/list-remote.command.js +1 -1
  306. package/dist/commands/recipes/list.command.d.ts +1 -1
  307. package/dist/commands/recipes/list.command.d.ts.map +1 -1
  308. package/dist/commands/recipes/list.command.js +1 -1
  309. package/dist/commands/recipes/remove.command.js +1 -1
  310. package/dist/commands/recipes/update.command.js +1 -1
  311. package/dist/commands/release/apply.command.d.ts +2 -3
  312. package/dist/commands/release/apply.command.d.ts.map +1 -1
  313. package/dist/commands/release/apply.command.js +4 -137
  314. package/dist/commands/release/apply.mutation.js +4 -3
  315. package/dist/commands/release/apply.pipeline/finalize.d.ts.map +1 -1
  316. package/dist/commands/release/apply.pipeline/finalize.js +2 -1
  317. package/dist/commands/release/apply.pipeline/mutation.d.ts +1 -1
  318. package/dist/commands/release/apply.pipeline/mutation.d.ts.map +1 -1
  319. package/dist/commands/release/apply.pipeline/mutation.js +3 -4
  320. package/dist/commands/release/apply.pipeline/preflight.js +1 -1
  321. package/dist/commands/release/apply.pipeline/state.d.ts.map +1 -1
  322. package/dist/commands/release/apply.pipeline/state.js +2 -1
  323. package/dist/commands/release/apply.pipeline.d.ts +5 -1
  324. package/dist/commands/release/apply.pipeline.d.ts.map +1 -1
  325. package/dist/commands/release/apply.pipeline.js +4 -0
  326. package/dist/commands/release/apply.preflight.d.ts.map +1 -1
  327. package/dist/commands/release/apply.preflight.js +2 -1
  328. package/dist/commands/release/apply.reporting.d.ts.map +1 -1
  329. package/dist/commands/release/apply.reporting.js +2 -1
  330. package/dist/commands/release/apply.spec.d.ts +5 -0
  331. package/dist/commands/release/apply.spec.d.ts.map +1 -0
  332. package/dist/commands/release/apply.spec.js +136 -0
  333. package/dist/commands/release/apply.types.d.ts +1 -1
  334. package/dist/commands/release/apply.types.d.ts.map +1 -1
  335. package/dist/commands/release/plan.command.d.ts +3 -10
  336. package/dist/commands/release/plan.command.d.ts.map +1 -1
  337. package/dist/commands/release/plan.command.js +4 -78
  338. package/dist/commands/release/plan.spec.d.ts +10 -0
  339. package/dist/commands/release/plan.spec.d.ts.map +1 -0
  340. package/dist/commands/release/plan.spec.js +76 -0
  341. package/dist/commands/runtime.command.d.ts +3 -6
  342. package/dist/commands/runtime.command.d.ts.map +1 -1
  343. package/dist/commands/runtime.command.js +5 -32
  344. package/dist/commands/runtime.spec.d.ts +8 -0
  345. package/dist/commands/runtime.spec.d.ts.map +1 -0
  346. package/dist/commands/runtime.spec.js +31 -0
  347. package/dist/commands/scenario/impl/commands.d.ts +1 -1
  348. package/dist/commands/scenario/impl/commands.d.ts.map +1 -1
  349. package/dist/commands/scenario/impl/commands.js +2 -1
  350. package/dist/commands/shared/approval-requirements.d.ts +1 -1
  351. package/dist/commands/shared/approval-requirements.d.ts.map +1 -1
  352. package/dist/commands/shared/comment-format.d.ts +1 -1
  353. package/dist/commands/shared/comment-format.d.ts.map +1 -1
  354. package/dist/commands/shared/git-ops.d.ts +1 -1
  355. package/dist/commands/shared/git-ops.d.ts.map +1 -1
  356. package/dist/commands/shared/git-ops.js +3 -2
  357. package/dist/commands/shared/merged-branch-cleanup.js +2 -2
  358. package/dist/commands/shared/network-approval.d.ts +1 -1
  359. package/dist/commands/shared/network-approval.d.ts.map +1 -1
  360. package/dist/commands/shared/post-commit-pr-artifacts.d.ts.map +1 -1
  361. package/dist/commands/shared/post-commit-pr-artifacts.js +2 -1
  362. package/dist/commands/shared/pr-meta.d.ts +1 -1
  363. package/dist/commands/shared/pr-meta.d.ts.map +1 -1
  364. package/dist/commands/shared/pr-meta.js +2 -2
  365. package/dist/commands/shared/task-backend.d.ts +3 -2
  366. package/dist/commands/shared/task-backend.d.ts.map +1 -1
  367. package/dist/commands/shared/task-backend.js +3 -4
  368. package/dist/commands/shared/task-handoff.d.ts +1 -1
  369. package/dist/commands/shared/task-handoff.d.ts.map +1 -1
  370. package/dist/commands/shared/task-handoff.js +3 -2
  371. package/dist/commands/shared/task-local-freshness.js +1 -1
  372. package/dist/commands/shared/task-store/intents.js +1 -1
  373. package/dist/commands/shared/task-store/readme.d.ts.map +1 -1
  374. package/dist/commands/shared/task-store/readme.js +1 -1
  375. package/dist/commands/shared/task-store/types.d.ts +1 -1
  376. package/dist/commands/shared/task-store/types.d.ts.map +1 -1
  377. package/dist/commands/task/add.command.d.ts +2 -1
  378. package/dist/commands/task/add.command.d.ts.map +1 -1
  379. package/dist/commands/task/add.command.js +2 -1
  380. package/dist/commands/task/close-duplicate.d.ts.map +1 -1
  381. package/dist/commands/task/close-duplicate.js +2 -2
  382. package/dist/commands/task/close-shared.d.ts.map +1 -1
  383. package/dist/commands/task/close-shared.js +2 -1
  384. package/dist/commands/task/close-tail-state.d.ts.map +1 -1
  385. package/dist/commands/task/close-tail-state.js +3 -2
  386. package/dist/commands/task/derive.js +1 -1
  387. package/dist/commands/task/doc-template.js +1 -1
  388. package/dist/commands/task/doc.d.ts.map +1 -1
  389. package/dist/commands/task/doc.js +4 -2
  390. package/dist/commands/task/findings.d.ts +1 -1
  391. package/dist/commands/task/findings.d.ts.map +1 -1
  392. package/dist/commands/task/findings.js +1 -1
  393. package/dist/commands/task/finish-close.js +2 -2
  394. package/dist/commands/task/finish-shared.d.ts.map +1 -1
  395. package/dist/commands/task/finish-shared.js +6 -8
  396. package/dist/commands/task/handoff.shared.d.ts.map +1 -1
  397. package/dist/commands/task/handoff.shared.js +4 -5
  398. package/dist/commands/task/hosted-close-pr.command.d.ts +4 -0
  399. package/dist/commands/task/hosted-close-pr.command.d.ts.map +1 -1
  400. package/dist/commands/task/hosted-close-pr.command.js +4 -0
  401. package/dist/commands/task/hosted-close-pr.precheck.d.ts.map +1 -1
  402. package/dist/commands/task/hosted-close-pr.precheck.js +4 -4
  403. package/dist/commands/task/hosted-close.command.d.ts +3 -6
  404. package/dist/commands/task/hosted-close.command.d.ts.map +1 -1
  405. package/dist/commands/task/hosted-close.command.js +4 -41
  406. package/dist/commands/task/hosted-close.spec.d.ts +7 -0
  407. package/dist/commands/task/hosted-close.spec.d.ts.map +1 -0
  408. package/dist/commands/task/hosted-close.spec.js +39 -0
  409. package/dist/commands/task/hosted-merge-sync/builders.d.ts +1 -1
  410. package/dist/commands/task/hosted-merge-sync/builders.d.ts.map +1 -1
  411. package/dist/commands/task/hosted-merge-sync/builders.js +6 -6
  412. package/dist/commands/task/hosted-merge-sync/github.js +2 -2
  413. package/dist/commands/task/hosted-merge-sync/local-branch.d.ts.map +1 -1
  414. package/dist/commands/task/hosted-merge-sync/local-branch.js +5 -5
  415. package/dist/commands/task/hosted-merge-sync/model.d.ts +1 -1
  416. package/dist/commands/task/hosted-merge-sync/model.d.ts.map +1 -1
  417. package/dist/commands/task/hosted-merge-sync/pr-meta.d.ts +1 -1
  418. package/dist/commands/task/hosted-merge-sync/pr-meta.d.ts.map +1 -1
  419. package/dist/commands/task/index.d.ts +1 -1
  420. package/dist/commands/task/index.d.ts.map +1 -1
  421. package/dist/commands/task/index.js +1 -1
  422. package/dist/commands/task/lint.js +1 -1
  423. package/dist/commands/task/list.d.ts.map +1 -1
  424. package/dist/commands/task/list.js +2 -1
  425. package/dist/commands/task/migrate-doc.d.ts +2 -1
  426. package/dist/commands/task/migrate-doc.d.ts.map +1 -1
  427. package/dist/commands/task/migrate-doc.js +6 -2
  428. package/dist/commands/task/new.d.ts.map +1 -1
  429. package/dist/commands/task/new.js +6 -21
  430. package/dist/commands/task/normalize.d.ts.map +1 -1
  431. package/dist/commands/task/normalize.js +2 -1
  432. package/dist/commands/task/plan.d.ts.map +1 -1
  433. package/dist/commands/task/plan.js +1 -1
  434. package/dist/commands/task/ready.d.ts.map +1 -1
  435. package/dist/commands/task/ready.js +2 -1
  436. package/dist/commands/task/scaffold.d.ts.map +1 -1
  437. package/dist/commands/task/scaffold.js +1 -1
  438. package/dist/commands/task/shared/dependencies.d.ts.map +1 -1
  439. package/dist/commands/task/shared/dependencies.js +4 -3
  440. package/dist/commands/task/shared/docs.d.ts +1 -1
  441. package/dist/commands/task/shared/docs.d.ts.map +1 -1
  442. package/dist/commands/task/shared/docs.js +1 -1
  443. package/dist/commands/task/shared/listing.d.ts.map +1 -1
  444. package/dist/commands/task/shared/listing.js +3 -2
  445. package/dist/commands/task/shared/tags.d.ts +1 -1
  446. package/dist/commands/task/shared/tags.d.ts.map +1 -1
  447. package/dist/commands/task/shared/tags.js +4 -4
  448. package/dist/commands/task/shared/transition-rules.d.ts +28 -0
  449. package/dist/commands/task/shared/transition-rules.d.ts.map +1 -0
  450. package/dist/commands/task/shared/transition-rules.js +96 -0
  451. package/dist/commands/task/shared/transitions.d.ts +2 -27
  452. package/dist/commands/task/shared/transitions.d.ts.map +1 -1
  453. package/dist/commands/task/shared/transitions.js +5 -98
  454. package/dist/commands/task/shared/workflow-transition-service.d.ts +1 -1
  455. package/dist/commands/task/shared/workflow-transition-service.d.ts.map +1 -1
  456. package/dist/commands/task/shared/workflow-transition-service.js +6 -6
  457. package/dist/commands/task/shared.d.ts +2 -1
  458. package/dist/commands/task/shared.d.ts.map +1 -1
  459. package/dist/commands/task/shared.js +2 -1
  460. package/dist/commands/task/show.d.ts.map +1 -1
  461. package/dist/commands/task/show.js +1 -1
  462. package/dist/commands/upgrade/apply.js +3 -2
  463. package/dist/commands/upgrade/materialize.d.ts.map +1 -1
  464. package/dist/commands/upgrade/materialize.js +1 -1
  465. package/dist/commands/upgrade.command.d.ts +3 -4
  466. package/dist/commands/upgrade.command.d.ts.map +1 -1
  467. package/dist/commands/upgrade.command.js +1 -179
  468. package/dist/commands/upgrade.d.ts.map +1 -1
  469. package/dist/commands/upgrade.js +4 -2
  470. package/dist/commands/upgrade.spec.d.ts +5 -0
  471. package/dist/commands/upgrade.spec.d.ts.map +1 -0
  472. package/dist/commands/upgrade.spec.js +179 -0
  473. package/dist/commands/workflow-build.command.d.ts.map +1 -1
  474. package/dist/commands/workflow-build.command.js +2 -1
  475. package/dist/commands/workflow-playbook.command.d.ts +3 -6
  476. package/dist/commands/workflow-playbook.command.d.ts.map +1 -1
  477. package/dist/commands/workflow-playbook.command.js +6 -24
  478. package/dist/commands/workflow-playbook.spec.d.ts +6 -0
  479. package/dist/commands/workflow-playbook.spec.d.ts.map +1 -0
  480. package/dist/commands/workflow-playbook.spec.js +21 -0
  481. package/dist/commands/workflow-restore.command.js +1 -1
  482. package/dist/commands/workflow.d.ts +4 -5
  483. package/dist/commands/workflow.d.ts.map +1 -1
  484. package/dist/commands/workflow.js +4 -5
  485. package/dist/harness/hooks-lifecycle.js +1 -1
  486. package/dist/meta/release.d.ts.map +1 -1
  487. package/dist/meta/release.js +3 -5
  488. package/dist/meta/version.d.ts.map +1 -1
  489. package/dist/meta/version.js +2 -2
  490. package/dist/policy/engine.d.ts +1 -1
  491. package/dist/policy/engine.d.ts.map +1 -1
  492. package/dist/policy/model.d.ts +1 -1
  493. package/dist/policy/model.d.ts.map +1 -1
  494. package/dist/policy/rules/commit-subject.js +1 -1
  495. package/dist/runner/adapters/base.d.ts +1 -1
  496. package/dist/runner/adapters/base.d.ts.map +1 -1
  497. package/dist/runner/adapters/codex.d.ts.map +1 -1
  498. package/dist/runner/adapters/codex.js +35 -113
  499. package/dist/runner/adapters/custom-preparation.d.ts +1 -1
  500. package/dist/runner/adapters/custom-preparation.d.ts.map +1 -1
  501. package/dist/runner/adapters/custom.d.ts +1 -1
  502. package/dist/runner/adapters/custom.d.ts.map +1 -1
  503. package/dist/runner/adapters/custom.js +34 -115
  504. package/dist/runner/adapters/execute-supervised.d.ts +41 -0
  505. package/dist/runner/adapters/execute-supervised.d.ts.map +1 -0
  506. package/dist/runner/adapters/execute-supervised.js +108 -0
  507. package/dist/runner/adapters/index.d.ts +1 -1
  508. package/dist/runner/adapters/index.d.ts.map +1 -1
  509. package/dist/runner/adapters/shared.d.ts +1 -1
  510. package/dist/runner/adapters/shared.d.ts.map +1 -1
  511. package/dist/runner/artifacts.d.ts.map +1 -1
  512. package/dist/runner/artifacts.js +1 -1
  513. package/dist/runner/config.d.ts +1 -1
  514. package/dist/runner/config.d.ts.map +1 -1
  515. package/dist/runner/context/base-prompt-sources.d.ts.map +1 -1
  516. package/dist/runner/context/base-prompt-sources.js +26 -4
  517. package/dist/runner/context/prompt-block-shared.d.ts +1 -1
  518. package/dist/runner/context/prompt-block-shared.d.ts.map +1 -1
  519. package/dist/runner/context/prompt-block-shared.js +8 -2
  520. package/dist/runner/context/recipe-context.d.ts +1 -1
  521. package/dist/runner/context/recipe-context.d.ts.map +1 -1
  522. package/dist/runner/context/task-context.d.ts.map +1 -1
  523. package/dist/runner/context/task-context.js +1 -1
  524. package/dist/runner/process-supervision/buffered-file-writer.d.ts +10 -0
  525. package/dist/runner/process-supervision/buffered-file-writer.d.ts.map +1 -0
  526. package/dist/runner/process-supervision/buffered-file-writer.js +70 -0
  527. package/dist/runner/process-supervision/run.d.ts.map +1 -1
  528. package/dist/runner/process-supervision/run.js +22 -9
  529. package/dist/runner/process-supervision/signals.js +1 -1
  530. package/dist/runner/result-manifest.d.ts.map +1 -1
  531. package/dist/runner/result-manifest.js +1 -1
  532. package/dist/runner/task-state.js +1 -1
  533. package/dist/runner/trace-artifacts.d.ts.map +1 -1
  534. package/dist/runner/trace-artifacts.js +1 -1
  535. package/dist/runner/types.d.ts +2 -2
  536. package/dist/runner/types.d.ts.map +1 -1
  537. package/dist/runner/usecases/scenario-materialize-task.d.ts.map +1 -1
  538. package/dist/runner/usecases/scenario-materialize-task.js +1 -1
  539. package/dist/runner/usecases/task-run-lifecycle-cancel.d.ts.map +1 -1
  540. package/dist/runner/usecases/task-run-lifecycle-cancel.js +2 -1
  541. package/dist/runner/usecases/task-run-lifecycle-shared.d.ts.map +1 -1
  542. package/dist/runner/usecases/task-run-lifecycle-shared.js +3 -7
  543. package/dist/runner/usecases/task-run.d.ts.map +1 -1
  544. package/dist/runner/usecases/task-run.js +2 -3
  545. package/dist/runtime/approvals/model.d.ts +1 -1
  546. package/dist/runtime/approvals/model.d.ts.map +1 -1
  547. package/dist/runtime/approvals/runtime.d.ts +1 -1
  548. package/dist/runtime/approvals/runtime.d.ts.map +1 -1
  549. package/dist/runtime/execution-context.d.ts +2 -1
  550. package/dist/runtime/execution-context.d.ts.map +1 -1
  551. package/dist/runtime/execution-profile/model.d.ts +1 -1
  552. package/dist/runtime/execution-profile/model.d.ts.map +1 -1
  553. package/dist/runtime/execution-profile/resolve.d.ts +1 -1
  554. package/dist/runtime/execution-profile/resolve.d.ts.map +1 -1
  555. package/dist/runtime/execution-profile/resolve.js +1 -1
  556. package/dist/runtime/harness/resolve.d.ts +2 -1
  557. package/dist/runtime/harness/resolve.d.ts.map +1 -1
  558. package/dist/runtime/harness/resolve.js +1 -1
  559. package/dist/runtime/harness/types.d.ts +2 -1
  560. package/dist/runtime/harness/types.d.ts.map +1 -1
  561. package/dist/runtime/incidents/paths.d.ts +3 -0
  562. package/dist/runtime/incidents/paths.d.ts.map +1 -0
  563. package/dist/runtime/incidents/paths.js +2 -0
  564. package/dist/runtime/shared/repo-cli-version.d.ts +1 -1
  565. package/dist/runtime/shared/repo-cli-version.d.ts.map +1 -1
  566. package/dist/runtime/task-intake/types.d.ts +2 -1
  567. package/dist/runtime/task-intake/types.d.ts.map +1 -1
  568. package/dist/shared/package-paths.d.ts +8 -0
  569. package/dist/shared/package-paths.d.ts.map +1 -0
  570. package/dist/shared/package-paths.js +80 -0
  571. package/dist/shared/trace-events.d.ts +1 -1
  572. package/dist/shared/trace-events.d.ts.map +1 -1
  573. package/dist/shared/trace-events.js +1 -1
  574. package/dist/shared/write-if-changed.js +2 -1
  575. package/dist/task-doc/conflicts.js +1 -1
  576. package/dist/task-doc/state.d.ts +2 -2
  577. package/dist/task-doc/state.d.ts.map +1 -1
  578. package/dist/task-doc/state.js +1 -1
  579. package/dist/workflow-runtime/file-ops.js +1 -1
  580. package/dist/workflow-runtime/markdown.js +1 -1
  581. package/dist/workflow-runtime/validate.d.ts +1 -1
  582. package/dist/workflow-runtime/validate.d.ts.map +1 -1
  583. package/package.json +6 -4
  584. package/dist/cli/cli-error.d.ts +0 -9
  585. package/dist/cli/cli-error.d.ts.map +0 -1
  586. package/dist/cli/cli-error.js +0 -13
  587. package/dist/cli/run-cli/command-catalog/shared.d.ts.map +0 -1
  588. package/dist/cli/run-cli/command-loaders.d.ts +0 -170
  589. package/dist/cli/run-cli/command-loaders.d.ts.map +0 -1
  590. package/dist/cli/run-cli/command-loaders.js +0 -128
  591. package/dist/cli/run-cli/commands/init/ui.d.ts +0 -3
  592. package/dist/cli/run-cli/commands/init/ui.d.ts.map +0 -1
  593. package/dist/cli/run-cli/commands/init/ui.js +0 -58
  594. package/dist/cli/run-cli/commands/init.d.ts +0 -2
  595. package/dist/cli/run-cli/commands/init.d.ts.map +0 -1
  596. package/dist/cli/run-cli/commands/init.js +0 -1
  597. package/dist/commands/guard/impl/commands.d.ts +0 -5
  598. package/dist/commands/guard/impl/commands.d.ts.map +0 -1
  599. package/dist/commands/guard/impl/commands.js +0 -4
  600. package/dist/commands/pr/index.d.ts +0 -8
  601. package/dist/commands/pr/index.d.ts.map +0 -1
  602. package/dist/commands/pr/index.js +0 -7
  603. package/dist/commands/pr/integrate.d.ts +0 -2
  604. package/dist/commands/pr/integrate.d.ts.map +0 -1
  605. package/dist/commands/pr/integrate.js +0 -1
  606. package/dist/commands/scenario/execute.command.d.ts +0 -8
  607. package/dist/commands/scenario/execute.command.d.ts.map +0 -1
  608. package/dist/commands/scenario/execute.command.js +0 -117
  609. package/dist/commands/scenario/impl/report.d.ts +0 -38
  610. package/dist/commands/scenario/impl/report.d.ts.map +0 -1
  611. package/dist/commands/scenario/impl/report.js +0 -97
  612. package/dist/commands/scenario/scenario.command.d.ts +0 -5
  613. package/dist/commands/scenario/scenario.command.d.ts.map +0 -1
  614. package/dist/commands/scenario/scenario.command.js +0 -19
  615. package/dist/commands/shared/git-context.d.ts +0 -2
  616. package/dist/commands/shared/git-context.d.ts.map +0 -1
  617. package/dist/commands/shared/git-context.js +0 -1
  618. package/dist/commands/shared/git-diff.d.ts +0 -2
  619. package/dist/commands/shared/git-diff.d.ts.map +0 -1
  620. package/dist/commands/shared/git-diff.js +0 -1
  621. package/dist/commands/shared/git-worktree.d.ts +0 -2
  622. package/dist/commands/shared/git-worktree.d.ts.map +0 -1
  623. package/dist/commands/shared/git-worktree.js +0 -1
  624. package/dist/commands/shared/git.d.ts +0 -2
  625. package/dist/commands/shared/git.d.ts.map +0 -1
  626. package/dist/commands/shared/git.js +0 -1
  627. package/dist/commands/task/finish.d.ts +0 -2
  628. package/dist/commands/task/finish.d.ts.map +0 -1
  629. package/dist/commands/task/finish.js +0 -1
  630. package/dist/harness/index.d.ts +0 -9
  631. package/dist/harness/index.d.ts.map +0 -1
  632. package/dist/harness/index.js +0 -8
  633. package/dist/runner/index.d.ts +0 -12
  634. package/dist/runner/index.d.ts.map +0 -1
  635. package/dist/runner/index.js +0 -11
  636. package/dist/runner/process-supervision.d.ts +0 -6
  637. package/dist/runner/process-supervision.d.ts.map +0 -1
  638. package/dist/runner/process-supervision.js +0 -3
  639. /package/dist/cli/run-cli/command-catalog/{shared.js → kernel.js} +0 -0
@@ -1,3 +1,4 @@
1
+ import { normalizeTaskStatus, parseTaskStatus } from "@agentplaneorg/core/tasks";
1
2
  import { invalidValueForFlag, missingValueMessage, warnMessage } from "../../../cli/output.js";
2
3
  import { exitCodeForError } from "../../../cli/exit-codes.js";
3
4
  import { CliError } from "../../../shared/errors.js";
@@ -111,8 +112,8 @@ function filterTaskProjectionByStatus(tasks, filters, defaultStatuses) {
111
112
  if (statuses.length === 0) {
112
113
  return tasks;
113
114
  }
114
- const wanted = new Set(statuses.map((status) => status.trim().toUpperCase()));
115
- return tasks.filter((task) => wanted.has(String(task.status || "TODO").toUpperCase()));
115
+ const wanted = new Set(statuses.map((status) => parseTaskStatus(status)).filter((status) => status !== null));
116
+ return tasks.filter((task) => wanted.has(normalizeTaskStatus(task.status)));
116
117
  }
117
118
  function filterTaskProjectionByOwner(tasks, filters) {
118
119
  if (filters.owner.length === 0) {
@@ -1,4 +1,4 @@
1
- import type { AgentplaneConfig } from "@agentplaneorg/core";
1
+ import type { AgentplaneConfig } from "@agentplaneorg/core/config";
2
2
  import type { CommandContext } from "../../shared/task-backend.js";
3
3
  export declare function normalizeDependsOnInput(value: string): string[];
4
4
  export declare function normalizeTaskStatus(value: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../../../src/commands/task/shared/tags.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQ5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAiBnE,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAI/D;AAID,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM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AAI,CAAC,CAe1F"}
@@ -1,5 +1,6 @@
1
1
  import { readdir } from "node:fs/promises";
2
2
  import path from "node:path";
3
+ import { parseTaskStatus, TASK_STATUS_VALUES } from "@agentplaneorg/core/tasks";
3
4
  import { fileExists } from "../../../cli/fs-utils.js";
4
5
  import { exitCodeForError } from "../../../cli/exit-codes.js";
5
6
  import { invalidValueMessage } from "../../../cli/output.js";
@@ -26,14 +27,13 @@ export function normalizeDependsOnInput(value) {
26
27
  return [];
27
28
  return [trimmed];
28
29
  }
29
- const ALLOWED_TASK_STATUSES = new Set(["TODO", "DOING", "DONE", "BLOCKED"]);
30
30
  export function normalizeTaskStatus(value) {
31
- const normalized = value.trim().toUpperCase();
32
- if (!ALLOWED_TASK_STATUSES.has(normalized)) {
31
+ const normalized = parseTaskStatus(value);
32
+ if (!normalized) {
33
33
  throw new CliError({
34
34
  exitCode: 2,
35
35
  code: "E_USAGE",
36
- message: invalidValueMessage("status", value, `one of ${[...ALLOWED_TASK_STATUSES].join(", ")}`),
36
+ message: invalidValueMessage("status", value, `one of ${TASK_STATUS_VALUES.join(", ")}`),
37
37
  });
38
38
  }
39
39
  return normalized;
@@ -0,0 +1,28 @@
1
+ import type { AgentplaneConfig } from "@agentplaneorg/core/config";
2
+ import type { TaskData, TaskEvent } from "../../../backends/task-backend.js";
3
+ export declare function appendTaskEvent(task: TaskData, event: TaskEvent): TaskEvent[];
4
+ export declare function isTransitionAllowed(current: string, next: string): boolean;
5
+ export declare function ensureStatusTransitionAllowed(opts: {
6
+ currentStatus: string;
7
+ nextStatus: string;
8
+ force: boolean;
9
+ }): void;
10
+ export declare function resolveCommentCommitWarning(opts: {
11
+ enabled: boolean;
12
+ config: AgentplaneConfig;
13
+ action: string;
14
+ confirmed: boolean;
15
+ quiet: boolean;
16
+ statusFrom: string;
17
+ statusTo: string;
18
+ }): string | null;
19
+ export declare function resolveStatusCommitPolicyWarning(opts: {
20
+ policy: AgentplaneConfig["status_commit_policy"];
21
+ action: string;
22
+ confirmed: boolean;
23
+ quiet: boolean;
24
+ statusFrom: string;
25
+ statusTo: string;
26
+ }): string | null;
27
+ export declare function isMajorStatusCommitTransition(statusFrom: string, statusTo: string): boolean;
28
+ //# sourceMappingURL=transition-rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transition-rules.d.ts","sourceRoot":"","sources":["../../../../src/commands/task/shared/transition-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAG7E,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,EAAE,CAW7E;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAO1E;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,IAAI,CAUP;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,GAAG,IAAI,CAmBhB;AAED,wBAAgB,gCAAgC,CAAC,IAAI,EAAE;IACrD,MAAM,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,GAAG,IAAI,CA2BhB;AAUD,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAK3F"}
@@ -0,0 +1,96 @@
1
+ import { CliError } from "../../../shared/errors.js";
2
+ export function appendTaskEvent(task, event) {
3
+ const existing = Array.isArray(task.events)
4
+ ? task.events.filter((entry) => !!entry &&
5
+ typeof entry.type === "string" &&
6
+ typeof entry.at === "string" &&
7
+ typeof entry.author === "string")
8
+ : [];
9
+ return [...existing, event];
10
+ }
11
+ export function isTransitionAllowed(current, next) {
12
+ if (current === next)
13
+ return true;
14
+ if (current === "TODO")
15
+ return next === "DOING" || next === "BLOCKED";
16
+ if (current === "DOING")
17
+ return next === "DONE" || next === "BLOCKED";
18
+ if (current === "BLOCKED")
19
+ return next === "TODO" || next === "DOING";
20
+ if (current === "DONE")
21
+ return false;
22
+ return false;
23
+ }
24
+ export function ensureStatusTransitionAllowed(opts) {
25
+ if (opts.force)
26
+ return;
27
+ if (isTransitionAllowed(opts.currentStatus, opts.nextStatus))
28
+ return;
29
+ throw new CliError({
30
+ exitCode: 2,
31
+ code: "E_USAGE",
32
+ message: `Refusing status transition ${opts.currentStatus} -> ${opts.nextStatus} ` +
33
+ "(use --force to override)",
34
+ });
35
+ }
36
+ export function resolveCommentCommitWarning(opts) {
37
+ if (!opts.enabled)
38
+ return null;
39
+ if (opts.config.commit_automation === "finish_only") {
40
+ throw new CliError({
41
+ exitCode: 2,
42
+ code: "E_USAGE",
43
+ message: `${opts.action}: --commit-from-comment is disabled by commit_automation='finish_only' ` +
44
+ "(allowed only in finish).",
45
+ });
46
+ }
47
+ return resolveStatusCommitPolicyWarning({
48
+ policy: opts.config.status_commit_policy,
49
+ action: opts.action,
50
+ confirmed: opts.confirmed,
51
+ quiet: opts.quiet,
52
+ statusFrom: opts.statusFrom,
53
+ statusTo: opts.statusTo,
54
+ });
55
+ }
56
+ export function resolveStatusCommitPolicyWarning(opts) {
57
+ if (!isMajorStatusCommitTransition(opts.statusFrom, opts.statusTo)) {
58
+ throw new CliError({
59
+ exitCode: 2,
60
+ code: "E_USAGE",
61
+ message: `${opts.action}: status/comment-driven commit is allowed only for major transitions ` +
62
+ `(got ${opts.statusFrom.toUpperCase()} -> ${opts.statusTo.toUpperCase()})`,
63
+ });
64
+ }
65
+ if (opts.policy === "off")
66
+ return null;
67
+ if (opts.policy === "warn") {
68
+ return opts.quiet || opts.confirmed
69
+ ? null
70
+ : `${opts.action}: status/comment-driven commit requested; policy=warn ` +
71
+ "(pass --confirm-status-commit to acknowledge)";
72
+ }
73
+ if (opts.policy === "confirm" && !opts.confirmed) {
74
+ throw new CliError({
75
+ exitCode: 2,
76
+ code: "E_USAGE",
77
+ message: `${opts.action}: status/comment-driven commit blocked by status_commit_policy='confirm' ` +
78
+ "(pass --confirm-status-commit to proceed)",
79
+ });
80
+ }
81
+ return null;
82
+ }
83
+ const MAJOR_STATUS_COMMIT_TRANSITIONS = new Set([
84
+ "READY->DOING",
85
+ "TODO->DOING",
86
+ "DOING->BLOCKED",
87
+ "BLOCKED->DOING",
88
+ "DOING->DONE",
89
+ ]);
90
+ export function isMajorStatusCommitTransition(statusFrom, statusTo) {
91
+ const from = statusFrom.trim().toUpperCase();
92
+ const to = statusTo.trim().toUpperCase();
93
+ if (!from || !to)
94
+ return false;
95
+ return MAJOR_STATUS_COMMIT_TRANSITIONS.has(`${from}->${to}`);
96
+ }
@@ -1,15 +1,8 @@
1
- import { type AgentplaneConfig } from "@agentplaneorg/core";
2
- import type { TaskData, TaskEvent } from "../../../backends/task-backend.js";
1
+ import type { AgentplaneConfig } from "@agentplaneorg/core/config";
2
+ import type { TaskData } from "../../../backends/task-backend.js";
3
3
  import type { CommandContext } from "../../shared/task-backend.js";
4
- export declare function appendTaskEvent(task: TaskData, event: TaskEvent): TaskEvent[];
5
4
  export declare function ensurePlanApprovedIfRequired(task: TaskData, config: AgentplaneConfig): void;
6
5
  export declare function ensureVerificationSatisfiedIfRequired(task: TaskData, config: AgentplaneConfig): void;
7
- export declare function isTransitionAllowed(current: string, next: string): boolean;
8
- export declare function ensureStatusTransitionAllowed(opts: {
9
- currentStatus: string;
10
- nextStatus: string;
11
- force: boolean;
12
- }): void;
13
6
  export declare function ensureCommentCommitAllowed(opts: {
14
7
  enabled: boolean;
15
8
  config: AgentplaneConfig;
@@ -20,15 +13,6 @@ export declare function ensureCommentCommitAllowed(opts: {
20
13
  statusTo: string;
21
14
  }): void;
22
15
  export declare function emitTransitionWarnings(warnings: readonly string[], quiet: boolean): void;
23
- export declare function resolveCommentCommitWarning(opts: {
24
- enabled: boolean;
25
- config: AgentplaneConfig;
26
- action: string;
27
- confirmed: boolean;
28
- quiet: boolean;
29
- statusFrom: string;
30
- statusTo: string;
31
- }): string | null;
32
16
  export declare function requireStructuredComment(body: string, prefix: string, minChars: number): void;
33
17
  export declare function prepareTaskTransitionComment(opts: {
34
18
  body?: string;
@@ -79,15 +63,6 @@ export declare function enforceStatusCommitPolicy(opts: {
79
63
  statusFrom: string;
80
64
  statusTo: string;
81
65
  }): void;
82
- export declare function resolveStatusCommitPolicyWarning(opts: {
83
- policy: AgentplaneConfig["status_commit_policy"];
84
- action: string;
85
- confirmed: boolean;
86
- quiet: boolean;
87
- statusFrom: string;
88
- statusTo: string;
89
- }): string | null;
90
- export declare function isMajorStatusCommitTransition(statusFrom: string, statusTo: string): boolean;
91
66
  export declare function readCommitInfo(cwd: string, rev: string): Promise<{
92
67
  hash: string;
93
68
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../../../src/commands/task/shared/transitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAO3E,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAG7E,OAAO,KAAK,EAAE,cAAc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C;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,IAAI,CAKP;AAED,wBAAsB,cAAc,CAClC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAI5C;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMlE"}
@@ -1,21 +1,14 @@
1
- import { execFileAsync } from "@agentplaneorg/core";
1
+ import { execFileAsync } from "@agentplaneorg/core/process";
2
+ import { normalizeTaskStatus } from "@agentplaneorg/core/tasks";
2
3
  import { infoMessage, warnMessage } from "../../../cli/output.js";
3
4
  import { formatCommentBodyForCommit } from "../../shared/comment-format.js";
4
5
  import { readDirectWorkLock } from "./direct-work-lock.js";
5
6
  import { CliError } from "../../../shared/errors.js";
6
7
  import { parseGitLogHashSubject } from "./git-log.js";
7
- import { commitFromComment } from "../../guard/index.js";
8
+ import { commitFromComment } from "../../guard/impl/comment-commit.js";
8
9
  import { refreshBranchPrArtifactsAfterTaskCommit } from "../../shared/post-commit-pr-artifacts.js";
9
10
  import { requiresVerificationByPrimary, toStringArray } from "./tags.js";
10
- export function appendTaskEvent(task, event) {
11
- const existing = Array.isArray(task.events)
12
- ? task.events.filter((entry) => !!entry &&
13
- typeof entry.type === "string" &&
14
- typeof entry.at === "string" &&
15
- typeof entry.author === "string")
16
- : [];
17
- return [...existing, event];
18
- }
11
+ import { resolveCommentCommitWarning, resolveStatusCommitPolicyWarning, } from "./transition-rules.js";
19
12
  export function ensurePlanApprovedIfRequired(task, config) {
20
13
  if (config.agents?.approvals?.require_plan !== true)
21
14
  return;
@@ -48,31 +41,6 @@ export function ensureVerificationSatisfiedIfRequired(task, config) {
48
41
  `(verification.state=${JSON.stringify(state)}; ${hint} or set agents.approvals.require_verify=false).`,
49
42
  });
50
43
  }
51
- export function isTransitionAllowed(current, next) {
52
- if (current === next)
53
- return true;
54
- if (current === "TODO")
55
- return next === "DOING" || next === "BLOCKED";
56
- if (current === "DOING")
57
- return next === "DONE" || next === "BLOCKED";
58
- if (current === "BLOCKED")
59
- return next === "TODO" || next === "DOING";
60
- if (current === "DONE")
61
- return false;
62
- return false;
63
- }
64
- export function ensureStatusTransitionAllowed(opts) {
65
- if (opts.force)
66
- return;
67
- if (isTransitionAllowed(opts.currentStatus, opts.nextStatus))
68
- return;
69
- throw new CliError({
70
- exitCode: 2,
71
- code: "E_USAGE",
72
- message: `Refusing status transition ${opts.currentStatus} -> ${opts.nextStatus} ` +
73
- "(use --force to override)",
74
- });
75
- }
76
44
  export function ensureCommentCommitAllowed(opts) {
77
45
  const warning = resolveCommentCommitWarning(opts);
78
46
  if (warning) {
@@ -86,26 +54,6 @@ export function emitTransitionWarnings(warnings, quiet) {
86
54
  process.stderr.write(`${warnMessage(warning)}\n`);
87
55
  }
88
56
  }
89
- export function resolveCommentCommitWarning(opts) {
90
- if (!opts.enabled)
91
- return null;
92
- if (opts.config.commit_automation === "finish_only") {
93
- throw new CliError({
94
- exitCode: 2,
95
- code: "E_USAGE",
96
- message: `${opts.action}: --commit-from-comment is disabled by commit_automation='finish_only' ` +
97
- "(allowed only in finish).",
98
- });
99
- }
100
- return resolveStatusCommitPolicyWarning({
101
- policy: opts.config.status_commit_policy,
102
- action: opts.action,
103
- confirmed: opts.confirmed,
104
- quiet: opts.quiet,
105
- statusFrom: opts.statusFrom,
106
- statusTo: opts.statusTo,
107
- });
108
- }
109
57
  export function requireStructuredComment(body, prefix, minChars) {
110
58
  const normalized = body.trim();
111
59
  if (!normalized.toLowerCase().startsWith(prefix.toLowerCase())) {
@@ -193,54 +141,13 @@ export function enforceStatusCommitPolicy(opts) {
193
141
  process.stderr.write(`${warnMessage(warning)}\n`);
194
142
  }
195
143
  }
196
- export function resolveStatusCommitPolicyWarning(opts) {
197
- if (!isMajorStatusCommitTransition(opts.statusFrom, opts.statusTo)) {
198
- throw new CliError({
199
- exitCode: 2,
200
- code: "E_USAGE",
201
- message: `${opts.action}: status/comment-driven commit is allowed only for major transitions ` +
202
- `(got ${opts.statusFrom.toUpperCase()} -> ${opts.statusTo.toUpperCase()})`,
203
- });
204
- }
205
- if (opts.policy === "off")
206
- return null;
207
- if (opts.policy === "warn") {
208
- return opts.quiet || opts.confirmed
209
- ? null
210
- : `${opts.action}: status/comment-driven commit requested; policy=warn ` +
211
- "(pass --confirm-status-commit to acknowledge)";
212
- }
213
- if (opts.policy === "confirm" && !opts.confirmed) {
214
- throw new CliError({
215
- exitCode: 2,
216
- code: "E_USAGE",
217
- message: `${opts.action}: status/comment-driven commit blocked by status_commit_policy='confirm' ` +
218
- "(pass --confirm-status-commit to proceed)",
219
- });
220
- }
221
- return null;
222
- }
223
- const MAJOR_STATUS_COMMIT_TRANSITIONS = new Set([
224
- "READY->DOING",
225
- "TODO->DOING",
226
- "DOING->BLOCKED",
227
- "BLOCKED->DOING",
228
- "DOING->DONE",
229
- ]);
230
- export function isMajorStatusCommitTransition(statusFrom, statusTo) {
231
- const from = statusFrom.trim().toUpperCase();
232
- const to = statusTo.trim().toUpperCase();
233
- if (!from || !to)
234
- return false;
235
- return MAJOR_STATUS_COMMIT_TRANSITIONS.has(`${from}->${to}`);
236
- }
237
144
  export async function readCommitInfo(cwd, rev) {
238
145
  const { stdout } = await execFileAsync("git", ["log", "-1", "--pretty=%H%x00%s", rev], { cwd });
239
146
  const { hash, subject } = parseGitLogHashSubject(stdout);
240
147
  return { hash, message: subject };
241
148
  }
242
149
  export function defaultCommitEmojiForStatus(status) {
243
- const normalized = status.trim().toUpperCase();
150
+ const normalized = normalizeTaskStatus(status);
244
151
  if (normalized === "DOING")
245
152
  return "🚧";
246
153
  if (normalized === "DONE")
@@ -1,4 +1,4 @@
1
- import { type AgentplaneConfig } from "@agentplaneorg/core";
1
+ import type { AgentplaneConfig } from "@agentplaneorg/core/config";
2
2
  import type { TaskBackend, TaskData } from "../../../backends/task-backend.js";
3
3
  import { type TaskStoreIntent, type TaskStoreTaskPatch } from "../../shared/task-store.js";
4
4
  import { type DependencyState } from "./dependencies.js";
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-transition-service.d.ts","sourceRoot":"","sources":["../../../../src/commands/task/shared/workflow-transition-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyC,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEnG,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,EAML,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAW3B,KAAK,WAAW,GAAG,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,KAAK,gCAAgC,GAAG;IACtC,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC,CAAC;AAEF,KAAK,sCAAsC,GAAG;IAC5C,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,IAAI,GAAG,cAAc,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CA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G;IAChE,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAEF,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAS3E;AA4ED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,gCAAgC,GACrC,mBAAmB,CAkCrB;AAED,wBAAsB,kCAAkC,CACtD,IAAI,EAAE,kCAAkC,GACvC,OAAO,CAAC,6BAA6B,CAAC,CAgDxC;AAED,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,sCAAsC,GAC3C,mBAAmB,CAyCrB;AAED,wBAAgB,wCAAwC,CACtD,IAAI,EAAE,wCAAwC,GAC7C,mCAAmC,CA8CrC"}
1
+ {"version":3,"file":"workflow-transition-service.d.ts","sourceRoot":"","sources":["../../../../src/commands/task/shared/workflow-transition-service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAOnE,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,EAML,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAc3B,KAAK,WAAW,GAAG,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,KAAK,gCAAgC,GAAG;IACtC,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,QAAQ,C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SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,gCAAgC,GAAG;IAClF,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;IACnD,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,gBAAgB,CAAC,EAAE,oCAAoC,CAAC;IACxD,mBAAmB,CAAC,EAAE,uCAAuC,CAAC;CAC/D,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,mBAAmB,GAAG;IAChE,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAEF,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAS3E;AA4ED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,gCAAgC,GACrC,mBAAmB,CAkCrB;AAED,wBAAsB,kCAAkC,CACtD,IAAI,EAAE,kCAAkC,GACvC,OAAO,CAAC,6BAA6B,CAAC,CAgDxC;AAED,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,sCAAsC,GAC3C,mBAAmB,CAyCrB;AAED,wBAAgB,wCAAwC,CACtD,IAAI,EAAE,wCAAwC,GAC7C,mCAAmC,CA8CrC"}
@@ -1,10 +1,10 @@
1
1
  import { createHash } from "node:crypto";
2
- import { ensureDocSections, setMarkdownSection } from "@agentplaneorg/core";
2
+ import { ensureDocSections, normalizeTaskStatus, setMarkdownSection, } from "@agentplaneorg/core/tasks";
3
3
  import { CliError } from "../../../shared/errors.js";
4
4
  import { appendTaskCommentIntent, appendTaskEventIntent, setTaskFieldsIntent, setTaskSectionIntent, touchTaskDocMetaIntent, } from "../../shared/task-store.js";
5
5
  import { dependencyWarningMessages, resolveTaskDependencyState, } from "./dependencies.js";
6
- import { appendTaskEvent, extractDocSection, normalizeTaskDocVersion, normalizeVerificationSectionLayout, VERIFICATION_RESULTS_BEGIN, VERIFICATION_RESULTS_END, } from "../shared.js";
7
- import { ensureStatusTransitionAllowed, resolveCommentCommitWarning } from "./transitions.js";
6
+ import { extractDocSection, normalizeTaskDocVersion, normalizeVerificationSectionLayout, VERIFICATION_RESULTS_BEGIN, VERIFICATION_RESULTS_END, } from "./docs.js";
7
+ import { appendTaskEvent, ensureStatusTransitionAllowed, resolveCommentCommitWarning, } from "./transition-rules.js";
8
8
  export function readDeferredTaskTransitionWarnings(error) {
9
9
  if (!(error instanceof CliError))
10
10
  return [];
@@ -70,7 +70,7 @@ function buildStatusTaskPatch(opts) {
70
70
  return patch;
71
71
  }
72
72
  export function buildTaskStatusTransition(opts) {
73
- const currentStatus = String(opts.task.status || "TODO").toUpperCase();
73
+ const currentStatus = normalizeTaskStatus(opts.task.status);
74
74
  const patch = buildStatusTaskPatch(opts);
75
75
  const statusEvent = {
76
76
  type: "status",
@@ -100,7 +100,7 @@ export function buildTaskStatusTransition(opts) {
100
100
  return { currentStatus, intents, nextTask };
101
101
  }
102
102
  export async function executeTaskStatusTransitionRequest(opts) {
103
- const currentStatus = String(opts.task.status || "TODO").toUpperCase();
103
+ const currentStatus = normalizeTaskStatus(opts.task.status);
104
104
  ensureStatusTransitionAllowed({
105
105
  currentStatus,
106
106
  nextStatus: opts.toStatus,
@@ -146,7 +146,7 @@ export async function executeTaskStatusTransitionRequest(opts) {
146
146
  };
147
147
  }
148
148
  export function buildTaskVerificationTransition(opts) {
149
- const currentStatus = String(opts.task.status || "TODO").toUpperCase();
149
+ const currentStatus = normalizeTaskStatus(opts.task.status);
150
150
  const verification = {
151
151
  state: opts.state,
152
152
  updated_at: opts.at,
@@ -2,7 +2,8 @@ export { dedupeStrings } from "../../shared/strings.js";
2
2
  export { decodeEscapedTaskTextNewlines, nowIso, normalizeTaskDocVersion, taskObservationSectionName, extractTaskObservationSection, VERIFY_STEPS_PLACEHOLDER, VERIFICATION_RESULTS_BEGIN, VERIFICATION_RESULTS_END, extractDocSection, assertVerifyStepsFilled, isVerifyStepsFilled, isDocSectionFilled, ensureAgentFilledRequiredDocSections, normalizeVerificationSectionLayout, resolveWritableDocSections, } from "./shared/docs.js";
3
3
  export { normalizeDependsOnInput, normalizeTaskStatus, toStringArray, requiresVerify, type PrimaryTagResolution, type TaskTagPolicy, readTaskTagPolicy, resolvePrimaryTagFromConfig, requiresVerifyStepsByPrimary, requiresVerificationByPrimary, resolvePrimaryTag, warnIfUnknownOwner, } from "./shared/tags.js";
4
4
  export { type DependencyState, dependencyWarningMessages, ensureTaskDependsOnGraphIsAcyclic, resolveTaskDependencyState, buildDependencyState, formatTaskLine, } from "./shared/dependencies.js";
5
- export { appendTaskEvent, ensurePlanApprovedIfRequired, ensureVerificationSatisfiedIfRequired, isTransitionAllowed, ensureStatusTransitionAllowed, ensureCommentCommitAllowed, emitTransitionWarnings, resolveCommentCommitWarning, requireStructuredComment, prepareTaskTransitionComment, resolveTaskTransitionExecutorAgent, runTaskTransitionCommentCommit, enforceStatusCommitPolicy, resolveStatusCommitPolicyWarning, isMajorStatusCommitTransition, readHeadCommit, readCommitInfo, defaultCommitEmojiForStatus, } from "./shared/transitions.js";
5
+ export { appendTaskEvent, isTransitionAllowed, isMajorStatusCommitTransition, } from "./shared/transition-rules.js";
6
+ export { ensurePlanApprovedIfRequired, ensureVerificationSatisfiedIfRequired, ensureCommentCommitAllowed, emitTransitionWarnings, requireStructuredComment, prepareTaskTransitionComment, resolveTaskTransitionExecutorAgent, runTaskTransitionCommentCommit, enforceStatusCommitPolicy, readHeadCommit, readCommitInfo, defaultCommitEmojiForStatus, } from "./shared/transitions.js";
6
7
  export { buildTaskStatusTransition, executeTaskStatusTransitionRequest, buildTaskVerificationTransition, executeTaskVerificationTransitionRequest, readDeferredTaskTransitionWarnings, type TaskTransitionWrite, type TaskStatusTransitionDependencyPolicy, type TaskStatusTransitionCommentCommitPolicy, type ExecuteTaskStatusTransitionRequest, type TaskStatusTransitionExecution, type ExecuteTaskVerificationTransitionRequest, type TaskVerificationTransitionExecution, } from "./shared/workflow-transition-service.js";
7
8
  export { applyTaskStatusTransitionCommand } from "./shared/transition-command.js";
8
9
  export { type TaskListFilters, parseTaskListFilters, handleTaskListWarnings, queryTaskProjection, type QueryTaskProjectionResult, taskTextBlob, } from "./shared/listing.js";
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/commands/task/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EACL,6BAA6B,EAC7B,MAAM,EACN,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,oCAAoC,EACpC,kCAAkC,EAClC,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,iBAAiB,EACjB,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,eAAe,EACpB,yBAAyB,EACzB,iCAAiC,EACjC,0BAA0B,EAC1B,oBAAoB,EACpB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,eAAe,EACf,4BAA4B,EAC5B,qCAAqC,EACrC,mBAAmB,EACnB,6BAA6B,EAC7B,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,kCAAkC,EAClC,8BAA8B,EAC9B,yBAAyB,EACzB,gCAAgC,EAChC,6BAA6B,EAC7B,cAAc,EACd,cAAc,EACd,2BAA2B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,yBAAyB,EACzB,kCAAkC,EAClC,+BAA+B,EAC/B,wCAAwC,EACxC,kCAAkC,EAClC,KAAK,mBAAmB,EACxB,KAAK,oCAAoC,EACzC,KAAK,uCAAuC,EAC5C,KAAK,kCAAkC,EACvC,KAAK,6BAA6B,EAClC,KAAK,wCAAwC,EAC7C,KAAK,mCAAmC,GACzC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EACL,KAAK,eAAe,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,YAAY,GACb,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/commands/task/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EACL,6BAA6B,EAC7B,MAAM,EACN,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,oCAAoC,EACpC,kCAAkC,EAClC,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,iBAAiB,EACjB,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,eAAe,EACpB,yBAAyB,EACzB,iCAAiC,EACjC,0BAA0B,EAC1B,oBAAoB,EACpB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,4BAA4B,EAC5B,qCAAqC,EACrC,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,EAC5B,kCAAkC,EAClC,8BAA8B,EAC9B,yBAAyB,EACzB,cAAc,EACd,cAAc,EACd,2BAA2B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,yBAAyB,EACzB,kCAAkC,EAClC,+BAA+B,EAC/B,wCAAwC,EACxC,kCAAkC,EAClC,KAAK,mBAAmB,EACxB,KAAK,oCAAoC,EACzC,KAAK,uCAAuC,EAC5C,KAAK,kCAAkC,EACvC,KAAK,6BAA6B,EAClC,KAAK,wCAAwC,EAC7C,KAAK,mCAAmC,GACzC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EACL,KAAK,eAAe,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,YAAY,GACb,MAAM,qBAAqB,CAAC"}
@@ -2,7 +2,8 @@ export { dedupeStrings } from "../../shared/strings.js";
2
2
  export { decodeEscapedTaskTextNewlines, nowIso, normalizeTaskDocVersion, taskObservationSectionName, extractTaskObservationSection, VERIFY_STEPS_PLACEHOLDER, VERIFICATION_RESULTS_BEGIN, VERIFICATION_RESULTS_END, extractDocSection, assertVerifyStepsFilled, isVerifyStepsFilled, isDocSectionFilled, ensureAgentFilledRequiredDocSections, normalizeVerificationSectionLayout, resolveWritableDocSections, } from "./shared/docs.js";
3
3
  export { normalizeDependsOnInput, normalizeTaskStatus, toStringArray, requiresVerify, readTaskTagPolicy, resolvePrimaryTagFromConfig, requiresVerifyStepsByPrimary, requiresVerificationByPrimary, resolvePrimaryTag, warnIfUnknownOwner, } from "./shared/tags.js";
4
4
  export { dependencyWarningMessages, ensureTaskDependsOnGraphIsAcyclic, resolveTaskDependencyState, buildDependencyState, formatTaskLine, } from "./shared/dependencies.js";
5
- export { appendTaskEvent, ensurePlanApprovedIfRequired, ensureVerificationSatisfiedIfRequired, isTransitionAllowed, ensureStatusTransitionAllowed, ensureCommentCommitAllowed, emitTransitionWarnings, resolveCommentCommitWarning, requireStructuredComment, prepareTaskTransitionComment, resolveTaskTransitionExecutorAgent, runTaskTransitionCommentCommit, enforceStatusCommitPolicy, resolveStatusCommitPolicyWarning, isMajorStatusCommitTransition, readHeadCommit, readCommitInfo, defaultCommitEmojiForStatus, } from "./shared/transitions.js";
5
+ export { appendTaskEvent, isTransitionAllowed, isMajorStatusCommitTransition, } from "./shared/transition-rules.js";
6
+ export { ensurePlanApprovedIfRequired, ensureVerificationSatisfiedIfRequired, ensureCommentCommitAllowed, emitTransitionWarnings, requireStructuredComment, prepareTaskTransitionComment, resolveTaskTransitionExecutorAgent, runTaskTransitionCommentCommit, enforceStatusCommitPolicy, readHeadCommit, readCommitInfo, defaultCommitEmojiForStatus, } from "./shared/transitions.js";
6
7
  export { buildTaskStatusTransition, executeTaskStatusTransitionRequest, buildTaskVerificationTransition, executeTaskVerificationTransitionRequest, readDeferredTaskTransitionWarnings, } from "./shared/workflow-transition-service.js";
7
8
  export { applyTaskStatusTransitionCommand } from "./shared/transition-command.js";
8
9
  export { parseTaskListFilters, handleTaskListWarnings, queryTaskProjection, taskTextBlob, } from "./shared/listing.js";
@@ -1 +1 @@
1
- {"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../../src/commands/task/show.ts"],"names":[],"mappings":"AAOA,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AA4BnC,wBAAsB,WAAW,CAAC,IAAI,EAAE;IACtC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsClB"}
1
+ {"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../../src/commands/task/show.ts"],"names":[],"mappings":"AAWA,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AA4BnC,wBAAsB,WAAW,CAAC,IAAI,EAAE;IACtC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsClB"}
@@ -1,4 +1,4 @@
1
- import { parseTaskReadme, taskReadmePath, validateTaskDocMetadata } from "@agentplaneorg/core";
1
+ import { parseTaskReadme, taskReadmePath, validateTaskDocMetadata, } from "@agentplaneorg/core/tasks";
2
2
  import { readFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
4
  import { mapBackendError } from "../../cli/error-map.js";
@@ -1,12 +1,13 @@
1
+ import { setByDottedKey, saveConfig } from "@agentplaneorg/core/config";
1
2
  import { lstat, mkdir, readlink, rm, writeFile } from "node:fs/promises";
2
3
  import path from "node:path";
3
- import { saveConfig, setByDottedKey } from "@agentplaneorg/core";
4
4
  import { backupPath, fileExists } from "../../cli/fs-utils.js";
5
5
  import { exitCodeForError } from "../../cli/exit-codes.js";
6
6
  import { withDiagnosticContext } from "../shared/diagnostics.js";
7
7
  import { CliError } from "../../shared/errors.js";
8
8
  import { protectedPathKindForFile } from "../../shared/protected-paths.js";
9
- import { execFileAsync, gitEnv } from "../shared/git.js";
9
+ import { execFileAsync } from "@agentplaneorg/core/process";
10
+ import { gitEnv } from "@agentplaneorg/core/git";
10
11
  async function safeRemovePath(targetPath) {
11
12
  try {
12
13
  await rm(targetPath, { recursive: true, force: true });
@@ -1 +1 @@
1
- {"version":3,"file":"materialize.d.ts","sourceRoot":"","sources":["../../../src/commands/upgrade/materialize.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,YAAY,CAAC;AAOn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M,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,cAAc,GAAG,gBAAgB,GAAG,cAAc,CAAC;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IACnD,KAAK,EAAE,gBAAgB,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,GAAG,CAAC;IAClB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAqJ/B"}
@@ -33,7 +33,7 @@ export async function materializeUpgradeSource(opts) {
33
33
  if (!hasBundle && !useRemote) {
34
34
  bundleLayout = "local_assets";
35
35
  bundleRoot = fileURLToPath(opts.assetsDirUrl);
36
- manifestPath = fileURLToPath(new URL("../../../assets/framework.manifest.json", import.meta.url));
36
+ manifestPath = fileURLToPath(new URL("framework.manifest.json", opts.assetsDirUrl));
37
37
  }
38
38
  else {
39
39
  let bundlePath = "";
@@ -1,6 +1,5 @@
1
- import type { CommandHandler, CommandSpec } from "../cli/spec/spec.js";
2
- import { type UpgradeFlags } from "./upgrade.js";
3
- export type UpgradeParsed = UpgradeFlags;
4
- export declare const upgradeSpec: CommandSpec<UpgradeParsed>;
1
+ import type { CommandHandler } from "../cli/spec/spec.js";
2
+ import type { UpgradeParsed } from "./upgrade.spec.js";
3
+ export { upgradeSpec } from "./upgrade.spec.js";
5
4
  export declare const runUpgrade: CommandHandler<UpgradeParsed>;
6
5
  //# sourceMappingURL=upgrade.command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade.command.d.ts","sourceRoot":"","sources":["../../src/commands/upgrade.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAEnE,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC;AAEzC,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,aAAa,CAwLlD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,aAAa,CACsB,CAAC"}
1
+ {"version":3,"file":"upgrade.command.d.ts","sourceRoot":"","sources":["../../src/commands/upgrade.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,aAAa,CACsB,CAAC"}