agentplane 0.1.9 → 0.2.0
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.
- package/README.md +4 -4
- package/assets/AGENTS.md +281 -70
- package/assets/agents/CODER.json +1 -0
- package/assets/agents/INTEGRATOR.json +1 -0
- package/assets/agents/ORCHESTRATOR.json +1 -0
- package/assets/agents/PLANNER.json +1 -0
- package/assets/agents/TESTER.json +1 -0
- package/dist/backends/task-backend/load.d.ts +13 -0
- package/dist/backends/task-backend/load.d.ts.map +1 -0
- package/dist/backends/task-backend/load.js +58 -0
- package/dist/backends/task-backend/local-backend.d.ts +28 -0
- package/dist/backends/task-backend/local-backend.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend.js +335 -0
- package/dist/backends/task-backend/redmine/client.d.ts +8 -0
- package/dist/backends/task-backend/redmine/client.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/client.js +60 -0
- package/dist/backends/task-backend/redmine/comments.d.ts +12 -0
- package/dist/backends/task-backend/redmine/comments.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/comments.js +54 -0
- package/dist/backends/task-backend/redmine/fields.d.ts +9 -0
- package/dist/backends/task-backend/redmine/fields.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/fields.js +38 -0
- package/dist/backends/task-backend/redmine/mapping.d.ts +20 -0
- package/dist/backends/task-backend/redmine/mapping.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/mapping.js +114 -0
- package/dist/backends/task-backend/redmine/parse.d.ts +3 -0
- package/dist/backends/task-backend/redmine/parse.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/parse.js +27 -0
- package/dist/backends/task-backend/redmine/remote.d.ts +19 -0
- package/dist/backends/task-backend/redmine/remote.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/remote.js +82 -0
- package/dist/backends/task-backend/redmine-backend.d.ts +80 -0
- package/dist/backends/task-backend/redmine-backend.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine-backend.js +505 -0
- package/dist/backends/task-backend/shared/concurrency.d.ts +3 -0
- package/dist/backends/task-backend/shared/concurrency.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/concurrency.js +21 -0
- package/dist/backends/task-backend/shared/constants.d.ts +4 -0
- package/dist/backends/task-backend/shared/constants.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/constants.js +4 -0
- package/dist/backends/task-backend/shared/doc.d.ts +11 -0
- package/dist/backends/task-backend/shared/doc.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/doc.js +78 -0
- package/dist/backends/task-backend/shared/errors.d.ts +10 -0
- package/dist/backends/task-backend/shared/errors.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/errors.js +18 -0
- package/dist/backends/task-backend/shared/events.d.ts +3 -0
- package/dist/backends/task-backend/shared/events.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/events.js +29 -0
- package/dist/backends/task-backend/shared/export.d.ts +15 -0
- package/dist/backends/task-backend/shared/export.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/export.js +60 -0
- package/dist/backends/task-backend/shared/id.d.ts +13 -0
- package/dist/backends/task-backend/shared/id.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/id.js +17 -0
- package/dist/backends/task-backend/shared/normalize.d.ts +8 -0
- package/dist/backends/task-backend/shared/normalize.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/normalize.js +54 -0
- package/dist/backends/task-backend/shared/record.d.ts +4 -0
- package/dist/backends/task-backend/shared/record.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/record.js +53 -0
- package/dist/backends/task-backend/shared/strings.d.ts +4 -0
- package/dist/backends/task-backend/shared/strings.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/strings.js +21 -0
- package/dist/backends/task-backend/shared/types.d.ts +84 -0
- package/dist/backends/task-backend/shared/types.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/types.js +1 -0
- package/dist/backends/task-backend/shared.d.ts +11 -0
- package/dist/backends/task-backend/shared.d.ts.map +1 -0
- package/dist/backends/task-backend/shared.js +9 -0
- package/dist/backends/task-backend.d.ts +4 -204
- package/dist/backends/task-backend.d.ts.map +1 -1
- package/dist/backends/task-backend.js +4 -1366
- package/dist/backends/task-index.js +2 -2
- package/dist/cli/archive.d.ts +0 -2
- package/dist/cli/archive.d.ts.map +1 -1
- package/dist/cli/archive.js +1 -2
- package/dist/cli/command-guide.d.ts.map +1 -1
- package/dist/cli/command-guide.js +25 -8
- package/dist/cli/parse/lifecycle.d.ts +64 -0
- package/dist/cli/parse/lifecycle.d.ts.map +1 -0
- package/dist/cli/parse/lifecycle.js +280 -0
- package/dist/cli/run-cli/command-catalog.d.ts +16 -0
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -0
- package/dist/cli/run-cli/command-catalog.js +204 -0
- package/dist/cli/run-cli/commands/config.d.ts +20 -0
- package/dist/cli/run-cli/commands/config.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/config.js +130 -0
- package/dist/cli/run-cli/commands/core.d.ts +14 -0
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core.js +144 -0
- package/dist/cli/run-cli/commands/ide.d.ts +13 -0
- package/dist/cli/run-cli/commands/ide.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/ide.js +67 -0
- package/dist/cli/run-cli/commands/init/base-branch.d.ts +9 -0
- package/dist/cli/run-cli/commands/init/base-branch.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/base-branch.js +11 -0
- package/dist/cli/run-cli/commands/init/conflicts.d.ts +11 -0
- package/dist/cli/run-cli/commands/init/conflicts.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/conflicts.js +42 -0
- package/dist/cli/run-cli/commands/init/git.d.ts +8 -0
- package/dist/cli/run-cli/commands/init/git.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/git.js +12 -0
- package/dist/cli/run-cli/commands/init/ide-sync.d.ts +9 -0
- package/dist/cli/run-cli/commands/init/ide-sync.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/ide-sync.js +18 -0
- package/dist/cli/run-cli/commands/init/recipes.d.ts +2 -0
- package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/recipes.js +11 -0
- package/dist/cli/run-cli/commands/init/write-agents.d.ts +11 -0
- package/dist/cli/run-cli/commands/init/write-agents.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/write-agents.js +30 -0
- package/dist/cli/run-cli/commands/init/write-config.d.ts +15 -0
- package/dist/cli/run-cli/commands/init/write-config.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/write-config.js +45 -0
- package/dist/cli/run-cli/commands/init.d.ts +21 -0
- package/dist/cli/run-cli/commands/init.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init.js +332 -0
- package/dist/cli/run-cli/registry.run.d.ts +4 -0
- package/dist/cli/run-cli/registry.run.d.ts.map +1 -0
- package/dist/cli/run-cli/registry.run.js +19 -0
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +182 -2463
- package/dist/cli/spec/docs-render.d.ts +3 -0
- package/dist/cli/spec/docs-render.d.ts.map +1 -0
- package/dist/cli/spec/docs-render.js +118 -0
- package/dist/cli/spec/errors.d.ts +9 -0
- package/dist/cli/spec/errors.d.ts.map +1 -0
- package/dist/cli/spec/errors.js +18 -0
- package/dist/cli/spec/help-render.d.ts +43 -0
- package/dist/cli/spec/help-render.d.ts.map +1 -0
- package/dist/cli/spec/help-render.js +185 -0
- package/dist/cli/spec/help.d.ts +10 -0
- package/dist/cli/spec/help.d.ts.map +1 -0
- package/dist/cli/spec/help.js +64 -0
- package/dist/cli/spec/parse.d.ts +8 -0
- package/dist/cli/spec/parse.d.ts.map +1 -0
- package/dist/cli/spec/parse.js +188 -0
- package/dist/cli/spec/registry.d.ts +12 -0
- package/dist/cli/spec/registry.d.ts.map +1 -0
- package/dist/cli/spec/registry.js +47 -0
- package/dist/cli/spec/spec.d.ts +76 -0
- package/dist/cli/spec/spec.d.ts.map +1 -0
- package/dist/cli/spec/spec.js +1 -0
- package/dist/cli/spec/suggest.d.ts +2 -0
- package/dist/cli/spec/suggest.d.ts.map +1 -0
- package/dist/cli/spec/suggest.js +45 -0
- package/dist/commands/backend/sync.command.d.ts +12 -0
- package/dist/commands/backend/sync.command.d.ts.map +1 -0
- package/dist/commands/backend/sync.command.js +79 -0
- package/dist/commands/backend.d.ts +21 -8
- package/dist/commands/backend.d.ts.map +1 -1
- package/dist/commands/backend.js +28 -165
- package/dist/commands/block.command.d.ts +19 -0
- package/dist/commands/block.command.d.ts.map +1 -0
- package/dist/commands/block.command.js +143 -0
- package/dist/commands/branch/base.command.d.ts +20 -0
- package/dist/commands/branch/base.command.d.ts.map +1 -0
- package/dist/commands/branch/base.command.js +110 -0
- package/dist/commands/branch/base.d.ts +19 -0
- package/dist/commands/branch/base.d.ts.map +1 -0
- package/dist/commands/branch/base.js +114 -0
- package/dist/commands/branch/cleanup-merged.d.ts +11 -0
- package/dist/commands/branch/cleanup-merged.d.ts.map +1 -0
- package/dist/commands/branch/cleanup-merged.js +141 -0
- package/dist/commands/branch/index.d.ts +6 -59
- package/dist/commands/branch/index.d.ts.map +1 -1
- package/dist/commands/branch/index.js +6 -513
- package/dist/commands/branch/internal/archive-pr.d.ts +2 -0
- package/dist/commands/branch/internal/archive-pr.d.ts.map +1 -0
- package/dist/commands/branch/internal/archive-pr.js +17 -0
- package/dist/commands/branch/internal/work-validate.d.ts +3 -0
- package/dist/commands/branch/internal/work-validate.d.ts.map +1 -0
- package/dist/commands/branch/internal/work-validate.js +27 -0
- package/dist/commands/branch/remove.command.d.ts +10 -0
- package/dist/commands/branch/remove.command.d.ts.map +1 -0
- package/dist/commands/branch/remove.command.js +63 -0
- package/dist/commands/branch/remove.d.ts +9 -0
- package/dist/commands/branch/remove.d.ts.map +1 -0
- package/dist/commands/branch/remove.js +65 -0
- package/dist/commands/branch/status.command.d.ts +8 -0
- package/dist/commands/branch/status.command.d.ts.map +1 -0
- package/dist/commands/branch/status.command.js +36 -0
- package/dist/commands/branch/status.d.ts +7 -0
- package/dist/commands/branch/status.d.ts.map +1 -0
- package/dist/commands/branch/status.js +60 -0
- package/dist/commands/branch/work-start.command.d.ts +11 -0
- package/dist/commands/branch/work-start.command.d.ts.map +1 -0
- package/dist/commands/branch/work-start.command.js +80 -0
- package/dist/commands/branch/work-start.d.ts +11 -0
- package/dist/commands/branch/work-start.d.ts.map +1 -0
- package/dist/commands/branch/work-start.js +120 -0
- package/dist/commands/cleanup/merged.command.d.ts +17 -0
- package/dist/commands/cleanup/merged.command.d.ts.map +1 -0
- package/dist/commands/cleanup/merged.command.js +75 -0
- package/dist/commands/commit.command.d.ts +6 -0
- package/dist/commands/commit.command.d.ts.map +1 -0
- package/dist/commands/commit.command.js +24 -0
- package/dist/commands/commit.spec.d.ts +18 -0
- package/dist/commands/commit.spec.d.ts.map +1 -0
- package/dist/commands/commit.spec.js +119 -0
- package/dist/commands/docs/cli.command.d.ts +9 -0
- package/dist/commands/docs/cli.command.d.ts.map +1 -0
- package/dist/commands/docs/cli.command.js +51 -0
- package/dist/commands/finish.command.d.ts +28 -0
- package/dist/commands/finish.command.d.ts.map +1 -0
- package/dist/commands/finish.command.js +237 -0
- package/dist/commands/guard/clean.command.d.ts +7 -0
- package/dist/commands/guard/clean.command.d.ts.map +1 -0
- package/dist/commands/guard/clean.command.js +14 -0
- package/dist/commands/guard/commit.command.d.ts +19 -0
- package/dist/commands/guard/commit.command.d.ts.map +1 -0
- package/dist/commands/guard/commit.command.js +132 -0
- package/dist/commands/guard/guard.command.d.ts +5 -0
- package/dist/commands/guard/guard.command.d.ts.map +1 -0
- package/dist/commands/guard/guard.command.js +21 -0
- package/dist/commands/guard/impl/allow.d.ts +18 -0
- package/dist/commands/guard/impl/allow.d.ts.map +1 -0
- package/dist/commands/guard/impl/allow.js +77 -0
- package/dist/commands/guard/impl/close-message.d.ts +16 -0
- package/dist/commands/guard/impl/close-message.d.ts.map +1 -0
- package/dist/commands/guard/impl/close-message.js +156 -0
- package/dist/commands/guard/impl/commands.d.ts +32 -0
- package/dist/commands/guard/impl/commands.d.ts.map +1 -0
- package/dist/commands/guard/impl/commands.js +191 -0
- package/dist/commands/guard/impl/comment-commit.d.ts +25 -0
- package/dist/commands/guard/impl/comment-commit.d.ts.map +1 -0
- package/dist/commands/guard/impl/comment-commit.js +137 -0
- package/dist/commands/guard/impl/env.d.ts +10 -0
- package/dist/commands/guard/impl/env.d.ts.map +1 -0
- package/dist/commands/guard/impl/env.js +12 -0
- package/dist/commands/guard/impl/policy.d.ts +19 -0
- package/dist/commands/guard/impl/policy.d.ts.map +1 -0
- package/dist/commands/guard/impl/policy.js +46 -0
- package/dist/commands/guard/index.d.ts +4 -87
- package/dist/commands/guard/index.d.ts.map +1 -1
- package/dist/commands/guard/index.js +4 -481
- package/dist/commands/guard/suggest-allow.command.d.ts +7 -0
- package/dist/commands/guard/suggest-allow.command.d.ts.map +1 -0
- package/dist/commands/guard/suggest-allow.command.js +28 -0
- package/dist/commands/hooks/hooks.command.d.ts +5 -0
- package/dist/commands/hooks/hooks.command.d.ts.map +1 -0
- package/dist/commands/hooks/hooks.command.js +18 -0
- package/dist/commands/hooks/index.d.ts.map +1 -1
- package/dist/commands/hooks/index.js +36 -81
- package/dist/commands/hooks/install.command.d.ts +7 -0
- package/dist/commands/hooks/install.command.d.ts.map +1 -0
- package/dist/commands/hooks/install.command.js +14 -0
- package/dist/commands/hooks/run.command.d.ts +9 -0
- package/dist/commands/hooks/run.command.d.ts.map +1 -0
- package/dist/commands/hooks/run.command.js +39 -0
- package/dist/commands/hooks/uninstall.command.d.ts +7 -0
- package/dist/commands/hooks/uninstall.command.d.ts.map +1 -0
- package/dist/commands/hooks/uninstall.command.js +16 -0
- package/dist/commands/integrate.command.d.ts +14 -0
- package/dist/commands/integrate.command.d.ts.map +1 -0
- package/dist/commands/integrate.command.js +61 -0
- package/dist/commands/pr/check.d.ts +8 -0
- package/dist/commands/pr/check.d.ts.map +1 -0
- package/dist/commands/pr/check.js +78 -0
- package/dist/commands/pr/index.d.ts +5 -45
- package/dist/commands/pr/index.d.ts.map +1 -1
- package/dist/commands/pr/index.js +5 -857
- package/dist/commands/pr/integrate/artifacts.d.ts +14 -0
- package/dist/commands/pr/integrate/artifacts.d.ts.map +1 -0
- package/dist/commands/pr/integrate/artifacts.js +45 -0
- package/dist/commands/pr/integrate/cmd.d.ts +14 -0
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -0
- package/dist/commands/pr/integrate/cmd.js +150 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts +25 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/finalize.js +86 -0
- package/dist/commands/pr/integrate/internal/merge.d.ts +40 -0
- package/dist/commands/pr/integrate/internal/merge.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/merge.js +138 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts +33 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/prepare.js +142 -0
- package/dist/commands/pr/integrate/internal/worktree.d.ts +14 -0
- package/dist/commands/pr/integrate/internal/worktree.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/worktree.js +51 -0
- package/dist/commands/pr/integrate/verify.d.ts +22 -0
- package/dist/commands/pr/integrate/verify.d.ts.map +1 -0
- package/dist/commands/pr/integrate/verify.js +60 -0
- package/dist/commands/pr/integrate.d.ts +2 -0
- package/dist/commands/pr/integrate.d.ts.map +1 -0
- package/dist/commands/pr/integrate.js +1 -0
- package/dist/commands/pr/internal/pr-paths.d.ts +29 -0
- package/dist/commands/pr/internal/pr-paths.d.ts.map +1 -0
- package/dist/commands/pr/internal/pr-paths.js +38 -0
- package/dist/commands/pr/internal/review-template.d.ts +9 -0
- package/dist/commands/pr/internal/review-template.d.ts.map +1 -0
- package/dist/commands/pr/internal/review-template.js +62 -0
- package/dist/commands/pr/note.d.ts +10 -0
- package/dist/commands/pr/note.d.ts.map +1 -0
- package/dist/commands/pr/note.js +50 -0
- package/dist/commands/pr/open.d.ts +10 -0
- package/dist/commands/pr/open.d.ts.map +1 -0
- package/dist/commands/pr/open.js +80 -0
- package/dist/commands/pr/pr.command.d.ts +33 -0
- package/dist/commands/pr/pr.command.d.ts.map +1 -0
- package/dist/commands/pr/pr.command.js +172 -0
- package/dist/commands/pr/update.d.ts +8 -0
- package/dist/commands/pr/update.d.ts.map +1 -0
- package/dist/commands/pr/update.js +103 -0
- package/dist/commands/ready.command.d.ts +8 -0
- package/dist/commands/ready.command.d.ts.map +1 -0
- package/dist/commands/ready.command.js +28 -0
- package/dist/commands/recipes/cache-prune.command.d.ts +6 -0
- package/dist/commands/recipes/cache-prune.command.d.ts.map +1 -0
- package/dist/commands/recipes/cache-prune.command.js +30 -0
- package/dist/commands/recipes/cache.command.d.ts +6 -0
- package/dist/commands/recipes/cache.command.d.ts.map +1 -0
- package/dist/commands/recipes/cache.command.js +37 -0
- package/dist/commands/recipes/explain.command.d.ts +7 -0
- package/dist/commands/recipes/explain.command.d.ts.map +1 -0
- package/dist/commands/recipes/explain.command.js +10 -0
- package/dist/commands/recipes/impl/apply.d.ts +16 -0
- package/dist/commands/recipes/impl/apply.d.ts.map +1 -0
- package/dist/commands/recipes/impl/apply.js +97 -0
- package/dist/commands/recipes/impl/archive.d.ts +2 -0
- package/dist/commands/recipes/impl/archive.d.ts.map +1 -0
- package/dist/commands/recipes/impl/archive.js +19 -0
- package/dist/commands/recipes/impl/commands/cache-prune.d.ts +7 -0
- package/dist/commands/recipes/impl/commands/cache-prune.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/cache-prune.js +94 -0
- package/dist/commands/recipes/impl/commands/explain.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/explain.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/explain.js +88 -0
- package/dist/commands/recipes/impl/commands/info.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/info.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/info.js +58 -0
- package/dist/commands/recipes/impl/commands/install.d.ts +11 -0
- package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/install.js +212 -0
- package/dist/commands/recipes/impl/commands/list-remote.d.ts +7 -0
- package/dist/commands/recipes/impl/commands/list-remote.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/list-remote.js +53 -0
- package/dist/commands/recipes/impl/commands/list.d.ts +7 -0
- package/dist/commands/recipes/impl/commands/list.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/list.js +38 -0
- package/dist/commands/recipes/impl/commands/remove.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/remove.js +35 -0
- package/dist/commands/recipes/impl/commands.d.ts +8 -0
- package/dist/commands/recipes/impl/commands.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands.js +7 -0
- package/dist/commands/recipes/impl/constants.d.ts +13 -0
- package/dist/commands/recipes/impl/constants.d.ts.map +1 -0
- package/dist/commands/recipes/impl/constants.js +16 -0
- package/dist/commands/recipes/impl/format.d.ts +2 -0
- package/dist/commands/recipes/impl/format.d.ts.map +1 -0
- package/dist/commands/recipes/impl/format.js +9 -0
- package/dist/commands/recipes/impl/index.d.ts +12 -0
- package/dist/commands/recipes/impl/index.d.ts.map +1 -0
- package/dist/commands/recipes/impl/index.js +150 -0
- package/dist/commands/recipes/impl/installed-recipes.d.ts +4 -0
- package/dist/commands/recipes/impl/installed-recipes.d.ts.map +1 -0
- package/dist/commands/recipes/impl/installed-recipes.js +58 -0
- package/dist/commands/recipes/impl/manifest.d.ts +4 -0
- package/dist/commands/recipes/impl/manifest.d.ts.map +1 -0
- package/dist/commands/recipes/impl/manifest.js +43 -0
- package/dist/commands/recipes/impl/normalize.d.ts +5 -0
- package/dist/commands/recipes/impl/normalize.d.ts.map +1 -0
- package/dist/commands/recipes/impl/normalize.js +50 -0
- package/dist/commands/recipes/impl/paths.d.ts +13 -0
- package/dist/commands/recipes/impl/paths.d.ts.map +1 -0
- package/dist/commands/recipes/impl/paths.js +27 -0
- package/dist/commands/recipes/impl/project.d.ts +8 -0
- package/dist/commands/recipes/impl/project.d.ts.map +1 -0
- package/dist/commands/recipes/impl/project.js +23 -0
- package/dist/commands/recipes/impl/scenario.d.ts +16 -0
- package/dist/commands/recipes/impl/scenario.d.ts.map +1 -0
- package/dist/commands/recipes/impl/scenario.js +128 -0
- package/dist/commands/recipes/impl/types.d.ts +107 -0
- package/dist/commands/recipes/impl/types.d.ts.map +1 -0
- package/dist/commands/recipes/impl/types.js +1 -0
- package/dist/commands/recipes/info.command.d.ts +7 -0
- package/dist/commands/recipes/info.command.d.ts.map +1 -0
- package/dist/commands/recipes/info.command.js +10 -0
- package/dist/commands/recipes/install.command.d.ts +12 -0
- package/dist/commands/recipes/install.command.d.ts.map +1 -0
- package/dist/commands/recipes/install.command.js +161 -0
- package/dist/commands/recipes/list-remote.command.d.ts +6 -0
- package/dist/commands/recipes/list-remote.command.d.ts.map +1 -0
- package/dist/commands/recipes/list-remote.command.js +46 -0
- package/dist/commands/recipes/list.command.d.ts +6 -0
- package/dist/commands/recipes/list.command.d.ts.map +1 -0
- package/dist/commands/recipes/list.command.js +39 -0
- package/dist/commands/recipes/recipes.command.d.ts +6 -0
- package/dist/commands/recipes/recipes.command.d.ts.map +1 -0
- package/dist/commands/recipes/recipes.command.js +45 -0
- package/dist/commands/recipes/remove.command.d.ts +7 -0
- package/dist/commands/recipes/remove.command.d.ts.map +1 -0
- package/dist/commands/recipes/remove.command.js +10 -0
- package/dist/commands/recipes.d.ts +7 -81
- package/dist/commands/recipes.d.ts.map +1 -1
- package/dist/commands/recipes.js +6 -1457
- package/dist/commands/scenario/impl/commands.d.ts +19 -0
- package/dist/commands/scenario/impl/commands.d.ts.map +1 -0
- package/dist/commands/scenario/impl/commands.js +336 -0
- package/dist/commands/scenario/impl/report.d.ts +30 -0
- package/dist/commands/scenario/impl/report.d.ts.map +1 -0
- package/dist/commands/scenario/impl/report.js +99 -0
- package/dist/commands/scenario/info.command.d.ts +8 -0
- package/dist/commands/scenario/info.command.d.ts.map +1 -0
- package/dist/commands/scenario/info.command.js +27 -0
- package/dist/commands/scenario/list.command.d.ts +5 -0
- package/dist/commands/scenario/list.command.d.ts.map +1 -0
- package/dist/commands/scenario/list.command.js +9 -0
- package/dist/commands/scenario/run.command.d.ts +8 -0
- package/dist/commands/scenario/run.command.d.ts.map +1 -0
- package/dist/commands/scenario/run.command.js +27 -0
- package/dist/commands/scenario/scenario.command.d.ts +6 -0
- package/dist/commands/scenario/scenario.command.d.ts.map +1 -0
- package/dist/commands/scenario/scenario.command.js +37 -0
- package/dist/commands/scenario.d.ts +1 -6
- package/dist/commands/scenario.d.ts.map +1 -1
- package/dist/commands/scenario.js +1 -501
- package/dist/commands/shared/git-context.d.ts +23 -0
- package/dist/commands/shared/git-context.d.ts.map +1 -0
- package/dist/commands/shared/git-context.js +140 -0
- package/dist/commands/shared/policy-deny.d.ts +3 -0
- package/dist/commands/shared/policy-deny.d.ts.map +1 -0
- package/dist/commands/shared/policy-deny.js +12 -0
- package/dist/commands/shared/task-backend.d.ts +17 -5
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +34 -5
- package/dist/commands/shared/task-store.d.ts +16 -0
- package/dist/commands/shared/task-store.d.ts.map +1 -0
- package/dist/commands/shared/task-store.js +142 -0
- package/dist/commands/start.command.d.ts +19 -0
- package/dist/commands/start.command.d.ts.map +1 -0
- package/dist/commands/start.command.js +143 -0
- package/dist/commands/sync.command.d.ts +6 -0
- package/dist/commands/sync.command.d.ts.map +1 -0
- package/dist/commands/sync.command.js +57 -0
- package/dist/commands/task/add.command.d.ts +18 -0
- package/dist/commands/task/add.command.d.ts.map +1 -0
- package/dist/commands/task/add.command.js +157 -0
- package/dist/commands/task/add.d.ts +13 -3
- package/dist/commands/task/add.d.ts.map +1 -1
- package/dist/commands/task/add.js +21 -126
- package/dist/commands/task/block.d.ts +2 -2
- package/dist/commands/task/block.d.ts.map +1 -1
- package/dist/commands/task/block.js +13 -9
- package/dist/commands/task/comment.command.d.ts +10 -0
- package/dist/commands/task/comment.command.d.ts.map +1 -0
- package/dist/commands/task/comment.command.js +57 -0
- package/dist/commands/task/comment.d.ts +2 -0
- package/dist/commands/task/comment.d.ts.map +1 -1
- package/dist/commands/task/comment.js +10 -7
- package/dist/commands/task/derive.command.d.ts +13 -0
- package/dist/commands/task/derive.command.d.ts.map +1 -0
- package/dist/commands/task/derive.command.js +94 -0
- package/dist/commands/task/derive.d.ts +13 -0
- package/dist/commands/task/derive.d.ts.map +1 -0
- package/dist/commands/task/derive.js +71 -0
- package/dist/commands/task/doc-set.command.d.ts +12 -0
- package/dist/commands/task/doc-set.command.d.ts.map +1 -0
- package/dist/commands/task/doc-set.command.js +82 -0
- package/dist/commands/task/doc-show.command.d.ts +10 -0
- package/dist/commands/task/doc-show.command.d.ts.map +1 -0
- package/dist/commands/task/doc-show.command.js +54 -0
- package/dist/commands/task/doc.command.d.ts +7 -0
- package/dist/commands/task/doc.command.d.ts.map +1 -0
- package/dist/commands/task/doc.command.js +22 -0
- package/dist/commands/task/doc.d.ts +9 -6
- package/dist/commands/task/doc.d.ts.map +1 -1
- package/dist/commands/task/doc.js +61 -113
- package/dist/commands/task/export.command.d.ts +6 -0
- package/dist/commands/task/export.command.d.ts.map +1 -0
- package/dist/commands/task/export.command.js +17 -0
- package/dist/commands/task/export.d.ts +2 -0
- package/dist/commands/task/export.d.ts.map +1 -1
- package/dist/commands/task/export.js +7 -9
- package/dist/commands/task/finish.d.ts +5 -4
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +50 -17
- package/dist/commands/task/index.d.ts +14 -13
- package/dist/commands/task/index.d.ts.map +1 -1
- package/dist/commands/task/index.js +13 -13
- package/dist/commands/task/lint.command.d.ts +5 -0
- package/dist/commands/task/lint.command.d.ts.map +1 -0
- package/dist/commands/task/lint.command.js +11 -0
- package/dist/commands/task/list.command.d.ts +9 -0
- package/dist/commands/task/list.command.d.ts.map +1 -0
- package/dist/commands/task/list.command.js +68 -0
- package/dist/commands/task/list.d.ts +6 -2
- package/dist/commands/task/list.d.ts.map +1 -1
- package/dist/commands/task/list.js +12 -15
- package/dist/commands/task/migrate-doc.command.d.ts +9 -0
- package/dist/commands/task/migrate-doc.command.d.ts.map +1 -0
- package/dist/commands/task/migrate-doc.command.js +65 -0
- package/dist/commands/task/migrate-doc.d.ts +3 -3
- package/dist/commands/task/migrate-doc.d.ts.map +1 -1
- package/dist/commands/task/migrate-doc.js +40 -47
- package/dist/commands/task/migrate.command.d.ts +10 -0
- package/dist/commands/task/migrate.command.d.ts.map +1 -0
- package/dist/commands/task/migrate.command.js +50 -0
- package/dist/commands/task/migrate.d.ts +5 -1
- package/dist/commands/task/migrate.d.ts.map +1 -1
- package/dist/commands/task/migrate.js +10 -44
- package/dist/commands/task/new.command.d.ts +6 -0
- package/dist/commands/task/new.command.d.ts.map +1 -0
- package/dist/commands/task/new.command.js +13 -0
- package/dist/commands/task/new.d.ts +13 -4
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +30 -92
- package/dist/commands/task/new.spec.d.ts +4 -0
- package/dist/commands/task/new.spec.d.ts.map +1 -0
- package/dist/commands/task/new.spec.js +79 -0
- package/dist/commands/task/next.command.d.ts +9 -0
- package/dist/commands/task/next.command.d.ts.map +1 -0
- package/dist/commands/task/next.command.js +89 -0
- package/dist/commands/task/next.d.ts +4 -1
- package/dist/commands/task/next.d.ts.map +1 -1
- package/dist/commands/task/next.js +15 -16
- package/dist/commands/task/normalize.command.d.ts +9 -0
- package/dist/commands/task/normalize.command.d.ts.map +1 -0
- package/dist/commands/task/normalize.command.js +39 -0
- package/dist/commands/task/normalize.d.ts +4 -1
- package/dist/commands/task/normalize.d.ts.map +1 -1
- package/dist/commands/task/normalize.js +18 -31
- package/dist/commands/task/plan-approve.command.d.ts +10 -0
- package/dist/commands/task/plan-approve.command.d.ts.map +1 -0
- package/dist/commands/task/plan-approve.command.js +54 -0
- package/dist/commands/task/plan-reject.command.d.ts +10 -0
- package/dist/commands/task/plan-reject.command.d.ts.map +1 -0
- package/dist/commands/task/plan-reject.command.js +59 -0
- package/dist/commands/task/plan-set.command.d.ts +11 -0
- package/dist/commands/task/plan-set.command.d.ts.map +1 -0
- package/dist/commands/task/plan-set.command.js +76 -0
- package/dist/commands/task/plan.d.ts +23 -10
- package/dist/commands/task/plan.d.ts.map +1 -1
- package/dist/commands/task/plan.js +182 -177
- package/dist/commands/task/ready.d.ts +2 -0
- package/dist/commands/task/ready.d.ts.map +1 -1
- package/dist/commands/task/ready.js +4 -6
- package/dist/commands/task/scaffold.command.d.ts +12 -0
- package/dist/commands/task/scaffold.command.d.ts.map +1 -0
- package/dist/commands/task/scaffold.command.js +73 -0
- package/dist/commands/task/scaffold.d.ts +7 -3
- package/dist/commands/task/scaffold.d.ts.map +1 -1
- package/dist/commands/task/scaffold.js +57 -67
- package/dist/commands/task/scrub.command.d.ts +11 -0
- package/dist/commands/task/scrub.command.d.ts.map +1 -0
- package/dist/commands/task/scrub.command.js +72 -0
- package/dist/commands/task/scrub.d.ts +6 -3
- package/dist/commands/task/scrub.d.ts.map +1 -1
- package/dist/commands/task/scrub.js +12 -68
- package/dist/commands/task/search.command.d.ts +11 -0
- package/dist/commands/task/search.command.d.ts.map +1 -0
- package/dist/commands/task/search.command.js +101 -0
- package/dist/commands/task/search.d.ts +5 -1
- package/dist/commands/task/search.d.ts.map +1 -1
- package/dist/commands/task/search.js +14 -23
- package/dist/commands/task/set-status.command.d.ts +21 -0
- package/dist/commands/task/set-status.command.d.ts.map +1 -0
- package/dist/commands/task/set-status.command.js +171 -0
- package/dist/commands/task/set-status.d.ts +2 -0
- package/dist/commands/task/set-status.d.ts.map +1 -1
- package/dist/commands/task/set-status.js +14 -8
- package/dist/commands/task/shared.d.ts +5 -0
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +50 -0
- package/dist/commands/task/show.command.d.ts +8 -0
- package/dist/commands/task/show.command.d.ts.map +1 -0
- package/dist/commands/task/show.command.js +19 -0
- package/dist/commands/task/show.d.ts +2 -0
- package/dist/commands/task/show.d.ts.map +1 -1
- package/dist/commands/task/show.js +5 -7
- package/dist/commands/task/start.d.ts +2 -2
- package/dist/commands/task/start.d.ts.map +1 -1
- package/dist/commands/task/start.js +48 -11
- package/dist/commands/task/update.command.d.ts +18 -0
- package/dist/commands/task/update.command.d.ts.map +1 -0
- package/dist/commands/task/update.command.js +141 -0
- package/dist/commands/task/update.d.ts +13 -3
- package/dist/commands/task/update.d.ts.map +1 -1
- package/dist/commands/task/update.js +31 -122
- package/dist/commands/task/verify-ok.command.d.ts +13 -0
- package/dist/commands/task/verify-ok.command.d.ts.map +1 -0
- package/dist/commands/task/verify-ok.command.js +83 -0
- package/dist/commands/task/verify-record.d.ts +30 -8
- package/dist/commands/task/verify-record.d.ts.map +1 -1
- package/dist/commands/task/verify-record.js +107 -117
- package/dist/commands/task/verify-rework.command.d.ts +13 -0
- package/dist/commands/task/verify-rework.command.d.ts.map +1 -0
- package/dist/commands/task/verify-rework.command.js +83 -0
- package/dist/commands/task/verify-show.command.d.ts +9 -0
- package/dist/commands/task/verify-show.command.d.ts.map +1 -0
- package/dist/commands/task/verify-show.command.js +38 -0
- package/dist/commands/task/verify.command.d.ts +7 -0
- package/dist/commands/task/verify.command.d.ts.map +1 -0
- package/dist/commands/task/verify.command.js +20 -0
- package/dist/commands/upgrade.command.d.ts +6 -0
- package/dist/commands/upgrade.command.d.ts.map +1 -0
- package/dist/commands/upgrade.command.js +104 -0
- package/dist/commands/upgrade.d.ts +13 -2
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +12 -80
- package/dist/commands/verify.command.d.ts +16 -0
- package/dist/commands/verify.command.d.ts.map +1 -0
- package/dist/commands/verify.command.js +113 -0
- package/dist/commands/workflow.d.ts +4 -6
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +4 -7
- package/dist/meta/release.d.ts +2 -0
- package/dist/meta/release.d.ts.map +1 -0
- package/dist/meta/release.js +50 -0
- package/dist/policy/evaluate.d.ts +3 -0
- package/dist/policy/evaluate.d.ts.map +1 -0
- package/dist/policy/evaluate.js +27 -0
- package/dist/policy/result.d.ts +7 -0
- package/dist/policy/result.d.ts.map +1 -0
- package/dist/policy/result.js +21 -0
- package/dist/policy/rules/allowlist.d.ts +3 -0
- package/dist/policy/rules/allowlist.d.ts.map +1 -0
- package/dist/policy/rules/allowlist.js +30 -0
- package/dist/policy/rules/branch-pr-base.d.ts +3 -0
- package/dist/policy/rules/branch-pr-base.d.ts.map +1 -0
- package/dist/policy/rules/branch-pr-base.js +43 -0
- package/dist/policy/rules/clean-tree.d.ts +3 -0
- package/dist/policy/rules/clean-tree.d.ts.map +1 -0
- package/dist/policy/rules/clean-tree.js +19 -0
- package/dist/policy/rules/commit-subject.d.ts +3 -0
- package/dist/policy/rules/commit-subject.d.ts.map +1 -0
- package/dist/policy/rules/commit-subject.js +33 -0
- package/dist/policy/rules/protected-paths.d.ts +3 -0
- package/dist/policy/rules/protected-paths.d.ts.map +1 -0
- package/dist/policy/rules/protected-paths.js +53 -0
- package/dist/policy/types.d.ts +38 -0
- package/dist/policy/types.d.ts.map +1 -0
- package/dist/policy/types.js +1 -0
- package/dist/shared/write-if-changed.d.ts +3 -0
- package/dist/shared/write-if-changed.d.ts.map +1 -0
- package/dist/shared/write-if-changed.js +25 -0
- package/package.json +2 -2
- package/dist/cli/help.d.ts +0 -2
- package/dist/cli/help.d.ts.map +0 -1
- package/dist/cli/help.js +0 -127
- package/dist/commands/task/verify.d.ts +0 -2
- package/dist/commands/task/verify.d.ts.map +0 -1
- package/dist/commands/task/verify.js +0 -1
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
+
import { cmdTaskSetStatus } from "./set-status.js";
|
|
3
|
+
function toStringList(v) {
|
|
4
|
+
if (typeof v === "string")
|
|
5
|
+
return [v];
|
|
6
|
+
if (Array.isArray(v))
|
|
7
|
+
return v.filter((x) => typeof x === "string");
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
export const taskSetStatusSpec = {
|
|
11
|
+
id: ["task", "set-status"],
|
|
12
|
+
group: "Task",
|
|
13
|
+
summary: "Change a task status (optionally committing from the comment body).",
|
|
14
|
+
args: [
|
|
15
|
+
{ name: "task-id", required: true, valueHint: "<task-id>" },
|
|
16
|
+
{ name: "status", required: true, valueHint: "<TODO|DOING|DONE|BLOCKED>" },
|
|
17
|
+
],
|
|
18
|
+
options: [
|
|
19
|
+
{
|
|
20
|
+
kind: "string",
|
|
21
|
+
name: "author",
|
|
22
|
+
valueHint: "<id>",
|
|
23
|
+
description: "Optional. Comment/event author (requires --body).",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
kind: "string",
|
|
27
|
+
name: "body",
|
|
28
|
+
valueHint: "<text>",
|
|
29
|
+
description: "Optional. Comment/event body (requires --author).",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
kind: "string",
|
|
33
|
+
name: "commit",
|
|
34
|
+
valueHint: "<hash>",
|
|
35
|
+
description: "Optional. Record an existing commit hash/message into task metadata.",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
kind: "boolean",
|
|
39
|
+
name: "force",
|
|
40
|
+
default: false,
|
|
41
|
+
description: "Allow unsafe transitions (and DONE without using agentplane finish).",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
kind: "boolean",
|
|
45
|
+
name: "commit-from-comment",
|
|
46
|
+
default: false,
|
|
47
|
+
description: "Create a git commit from the provided comment body (requires --body).",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
kind: "string",
|
|
51
|
+
name: "commit-emoji",
|
|
52
|
+
valueHint: "<emoji>",
|
|
53
|
+
description: "Optional. Emoji prefix used for commit-from-comment.",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
kind: "string",
|
|
57
|
+
name: "commit-allow",
|
|
58
|
+
valueHint: "<path-prefix>",
|
|
59
|
+
repeatable: true,
|
|
60
|
+
description: "Repeatable. Allowlist prefix for commit-from-comment staging.",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
kind: "boolean",
|
|
64
|
+
name: "commit-auto-allow",
|
|
65
|
+
default: false,
|
|
66
|
+
description: "Auto-derive allowlist prefixes from staged paths (commit-from-comment).",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
kind: "boolean",
|
|
70
|
+
name: "commit-allow-tasks",
|
|
71
|
+
default: true,
|
|
72
|
+
description: "Allow committing under .agentplane/tasks when commit-from-comment is used.",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
kind: "boolean",
|
|
76
|
+
name: "commit-require-clean",
|
|
77
|
+
default: false,
|
|
78
|
+
description: "Require a clean working tree before commit-from-comment.",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
kind: "boolean",
|
|
82
|
+
name: "confirm-status-commit",
|
|
83
|
+
default: false,
|
|
84
|
+
description: "Confirm status-commit when status_commit_policy requires confirmation.",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
kind: "boolean",
|
|
88
|
+
name: "quiet",
|
|
89
|
+
default: false,
|
|
90
|
+
description: "Suppress normal output (still prints errors).",
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
examples: [
|
|
94
|
+
{ cmd: "agentplane task set-status 202602030608-F1Q8AB DOING", why: "Mark task as DOING." },
|
|
95
|
+
{
|
|
96
|
+
cmd: 'agentplane task set-status 202602030608-F1Q8AB BLOCKED --author CODER --body "Waiting on upstream fix."',
|
|
97
|
+
why: "Add a status change note.",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
cmd: 'agentplane task set-status 202602030608-F1Q8AB DOING --commit-from-comment --author CODER --body "Start: working on it" --commit-allow packages/agentplane',
|
|
101
|
+
why: "Create a commit from the comment body (subject to policy and allowlist).",
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
validateRaw: (raw) => {
|
|
105
|
+
const author = raw.opts.author;
|
|
106
|
+
const body = raw.opts.body;
|
|
107
|
+
const hasAuthor = typeof author === "string" && author.trim() !== "";
|
|
108
|
+
const hasBody = typeof body === "string" && body.trim() !== "";
|
|
109
|
+
if (hasAuthor !== hasBody) {
|
|
110
|
+
throw usageError({
|
|
111
|
+
spec: taskSetStatusSpec,
|
|
112
|
+
message: "Both --author and --body must be provided together.",
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
if (raw.opts["commit-from-comment"] === true && !hasBody) {
|
|
116
|
+
throw usageError({
|
|
117
|
+
spec: taskSetStatusSpec,
|
|
118
|
+
message: "--body is required when using --commit-from-comment.",
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
const allow = toStringList(raw.opts["commit-allow"]);
|
|
122
|
+
if (allow.some((p) => p.trim() === "")) {
|
|
123
|
+
throw usageError({
|
|
124
|
+
spec: taskSetStatusSpec,
|
|
125
|
+
message: "Invalid value for --commit-allow: empty.",
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
parse: (raw) => {
|
|
130
|
+
const commitAllow = toStringList(raw.opts["commit-allow"]);
|
|
131
|
+
return {
|
|
132
|
+
taskId: String(raw.args["task-id"]),
|
|
133
|
+
status: String(raw.args.status),
|
|
134
|
+
author: typeof raw.opts.author === "string" ? raw.opts.author : undefined,
|
|
135
|
+
body: typeof raw.opts.body === "string" ? raw.opts.body : undefined,
|
|
136
|
+
commit: typeof raw.opts.commit === "string" ? raw.opts.commit : undefined,
|
|
137
|
+
force: raw.opts.force === true,
|
|
138
|
+
commitFromComment: raw.opts["commit-from-comment"] === true,
|
|
139
|
+
commitEmoji: typeof raw.opts["commit-emoji"] === "string" ? raw.opts["commit-emoji"] : undefined,
|
|
140
|
+
commitAllow,
|
|
141
|
+
commitAutoAllow: raw.opts["commit-auto-allow"] === true,
|
|
142
|
+
commitAllowTasks: raw.opts["commit-allow-tasks"] !== false,
|
|
143
|
+
commitRequireClean: raw.opts["commit-require-clean"] === true,
|
|
144
|
+
confirmStatusCommit: raw.opts["confirm-status-commit"] === true,
|
|
145
|
+
quiet: raw.opts.quiet === true,
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
export function makeRunTaskSetStatusHandler(getCtx) {
|
|
150
|
+
return async (ctx, p) => {
|
|
151
|
+
return await cmdTaskSetStatus({
|
|
152
|
+
ctx: await getCtx("task set-status"),
|
|
153
|
+
cwd: ctx.cwd,
|
|
154
|
+
rootOverride: ctx.rootOverride,
|
|
155
|
+
taskId: p.taskId,
|
|
156
|
+
status: p.status,
|
|
157
|
+
author: p.author,
|
|
158
|
+
body: p.body,
|
|
159
|
+
commit: p.commit,
|
|
160
|
+
force: p.force,
|
|
161
|
+
commitFromComment: p.commitFromComment,
|
|
162
|
+
commitEmoji: p.commitEmoji,
|
|
163
|
+
commitAllow: p.commitAllow,
|
|
164
|
+
commitAutoAllow: p.commitAutoAllow,
|
|
165
|
+
commitAllowTasks: p.commitAllowTasks,
|
|
166
|
+
commitRequireClean: p.commitRequireClean,
|
|
167
|
+
confirmStatusCommit: p.confirmStatusCommit,
|
|
168
|
+
quiet: p.quiet,
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-status.d.ts","sourceRoot":"","sources":["../../../src/commands/task/set-status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"set-status.d.ts","sourceRoot":"","sources":["../../../src/commands/task/set-status.ts"],"names":[],"mappings":"AAOA,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAcnC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAkJlB"}
|
|
@@ -3,7 +3,8 @@ import { successMessage, warnMessage } from "../../cli/output.js";
|
|
|
3
3
|
import { formatCommentBodyForCommit } from "../../shared/comment-format.js";
|
|
4
4
|
import { CliError } from "../../shared/errors.js";
|
|
5
5
|
import { commitFromComment } from "../guard/index.js";
|
|
6
|
-
import {
|
|
6
|
+
import { listTasksMemo, loadCommandContext, loadTaskFromContext, resolveDocUpdatedBy, } from "../shared/task-backend.js";
|
|
7
|
+
import { backendIsLocalFileBackend, getTaskStore } from "../shared/task-store.js";
|
|
7
8
|
import { appendTaskEvent, buildDependencyState, defaultCommitEmojiForStatus, enforceStatusCommitPolicy, isTransitionAllowed, normalizeTaskStatus, nowIso, readCommitInfo, } from "./shared.js";
|
|
8
9
|
export async function cmdTaskSetStatus(opts) {
|
|
9
10
|
const nextStatus = normalizeTaskStatus(opts.status);
|
|
@@ -22,11 +23,15 @@ export async function cmdTaskSetStatus(opts) {
|
|
|
22
23
|
});
|
|
23
24
|
}
|
|
24
25
|
try {
|
|
25
|
-
const
|
|
26
|
-
cwd: opts.cwd,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
const ctx = opts.ctx ??
|
|
27
|
+
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
28
|
+
const config = ctx.config;
|
|
29
|
+
const resolved = ctx.resolvedProject;
|
|
30
|
+
const useStore = backendIsLocalFileBackend(ctx);
|
|
31
|
+
const store = useStore ? getTaskStore(ctx) : null;
|
|
32
|
+
const task = useStore
|
|
33
|
+
? await store.get(opts.taskId)
|
|
34
|
+
: await loadTaskFromContext({ ctx, taskId: opts.taskId });
|
|
30
35
|
if (opts.commitFromComment) {
|
|
31
36
|
enforceStatusCommitPolicy({
|
|
32
37
|
policy: config.status_commit_policy,
|
|
@@ -44,7 +49,7 @@ export async function cmdTaskSetStatus(opts) {
|
|
|
44
49
|
});
|
|
45
50
|
}
|
|
46
51
|
if (!opts.force && (nextStatus === "DOING" || nextStatus === "DONE")) {
|
|
47
|
-
const allTasks = await
|
|
52
|
+
const allTasks = await listTasksMemo(ctx);
|
|
48
53
|
const depState = buildDependencyState(allTasks);
|
|
49
54
|
const dep = depState.get(task.id);
|
|
50
55
|
if (dep && (dep.missing.length > 0 || dep.incomplete.length > 0)) {
|
|
@@ -96,7 +101,7 @@ export async function cmdTaskSetStatus(opts) {
|
|
|
96
101
|
const commitInfo = await readCommitInfo(resolved.gitRoot, opts.commit);
|
|
97
102
|
next.commit = { hash: commitInfo.hash, message: commitInfo.message };
|
|
98
103
|
}
|
|
99
|
-
await
|
|
104
|
+
await (useStore ? store.update(opts.taskId, () => next) : ctx.taskBackend.writeTask(next));
|
|
100
105
|
// tasks.json is export-only; generated via `agentplane task export`.
|
|
101
106
|
if (opts.commitFromComment) {
|
|
102
107
|
if (!opts.body) {
|
|
@@ -107,6 +112,7 @@ export async function cmdTaskSetStatus(opts) {
|
|
|
107
112
|
});
|
|
108
113
|
}
|
|
109
114
|
await commitFromComment({
|
|
115
|
+
ctx,
|
|
110
116
|
cwd: opts.cwd,
|
|
111
117
|
rootOverride: opts.rootOverride,
|
|
112
118
|
taskId: opts.taskId,
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { execFile } from "node:child_process";
|
|
2
2
|
import { type AgentplaneConfig } from "@agentplaneorg/core";
|
|
3
3
|
import { type TaskData, type TaskEvent } from "../../backends/task-backend.js";
|
|
4
|
+
import type { CommandContext } from "../shared/task-backend.js";
|
|
4
5
|
export { dedupeStrings } from "../../shared/strings.js";
|
|
5
6
|
export declare const execFileAsync: typeof execFile.__promisify__;
|
|
6
7
|
export declare function nowIso(): string;
|
|
8
|
+
export declare const VERIFY_STEPS_PLACEHOLDER = "<!-- TODO: FILL VERIFY STEPS -->";
|
|
9
|
+
export declare function extractDocSection(doc: string, sectionName: string): string | null;
|
|
10
|
+
export declare function isVerifyStepsFilled(sectionText: string | null): boolean;
|
|
7
11
|
export declare function normalizeDependsOnInput(value: string): string[];
|
|
8
12
|
export declare function normalizeTaskStatus(value: string): string;
|
|
9
13
|
export declare function toStringArray(value: unknown): string[];
|
|
10
14
|
export declare function requiresVerify(tags: string[], requiredTags: string[]): boolean;
|
|
15
|
+
export declare function warnIfUnknownOwner(ctx: CommandContext, owner: string): Promise<void>;
|
|
11
16
|
export declare function appendTaskEvent(task: TaskData, event: TaskEvent): TaskEvent[];
|
|
12
17
|
export declare function ensurePlanApprovedIfRequired(task: TaskData, config: AgentplaneConfig): void;
|
|
13
18
|
export declare function ensureVerificationSatisfiedIfRequired(task: TaskData, config: AgentplaneConfig): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/commands/task/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/commands/task/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAK9C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAS5D,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAI/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,eAAO,MAAM,aAAa,+BAAsB,CAAC;AAEjD,wBAAgB,MAAM,IAAI,MAAM,CAE/B;AAED,eAAO,MAAM,wBAAwB,qCAAqC,CAAC;AAE3E,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAiBjF;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAKvE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAI/D;AAID,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAczD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAKtD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAI9E;AAED,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB1F;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,EAAE,CAW7E;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAc3F;AAED,wBAAgB,qCAAqC,CACnD,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,gBAAgB,GACvB,IAAI,CAiBN;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAqBpF;AAgBD,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,MAAM,CAgBjF;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAO1E;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAgB7F;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAI5F;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAC9C,MAAM,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,IAAI,CAqBP;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;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GAC9B,eAAe,CAsEjB;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAiBnD"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { execFile } from "node:child_process";
|
|
2
2
|
import { promisify } from "node:util";
|
|
3
|
+
import { readdir } from "node:fs/promises";
|
|
4
|
+
import path from "node:path";
|
|
3
5
|
import { invalidValueForFlag, invalidValueMessage, missingValueMessage, warnMessage, } from "../../cli/output.js";
|
|
6
|
+
import { fileExists } from "../../cli/fs-utils.js";
|
|
4
7
|
import { CliError } from "../../shared/errors.js";
|
|
5
8
|
import { dedupeStrings } from "../../shared/strings.js";
|
|
6
9
|
import { parseGitLogHashSubject } from "../../shared/git-log.js";
|
|
@@ -9,6 +12,34 @@ export const execFileAsync = promisify(execFile);
|
|
|
9
12
|
export function nowIso() {
|
|
10
13
|
return new Date().toISOString();
|
|
11
14
|
}
|
|
15
|
+
export const VERIFY_STEPS_PLACEHOLDER = "<!-- TODO: FILL VERIFY STEPS -->";
|
|
16
|
+
export function extractDocSection(doc, sectionName) {
|
|
17
|
+
const lines = doc.replaceAll("\r\n", "\n").split("\n");
|
|
18
|
+
let capturing = false;
|
|
19
|
+
const out = [];
|
|
20
|
+
for (const line of lines) {
|
|
21
|
+
const match = /^##\s+(.*)$/.exec(line.trim());
|
|
22
|
+
if (match) {
|
|
23
|
+
if (capturing)
|
|
24
|
+
break;
|
|
25
|
+
capturing = (match[1] ?? "").trim() === sectionName;
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (capturing)
|
|
29
|
+
out.push(line);
|
|
30
|
+
}
|
|
31
|
+
if (!capturing)
|
|
32
|
+
return null;
|
|
33
|
+
return out.join("\n").trimEnd();
|
|
34
|
+
}
|
|
35
|
+
export function isVerifyStepsFilled(sectionText) {
|
|
36
|
+
const normalized = (sectionText ?? "").trim();
|
|
37
|
+
if (!normalized)
|
|
38
|
+
return false;
|
|
39
|
+
if (normalized.includes(VERIFY_STEPS_PLACEHOLDER))
|
|
40
|
+
return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
12
43
|
export function normalizeDependsOnInput(value) {
|
|
13
44
|
const trimmed = value.trim();
|
|
14
45
|
if (!trimmed || trimmed === "[]")
|
|
@@ -40,6 +71,25 @@ export function requiresVerify(tags, requiredTags) {
|
|
|
40
71
|
return false;
|
|
41
72
|
return tags.some((tag) => required.has(tag.trim().toLowerCase()));
|
|
42
73
|
}
|
|
74
|
+
export async function warnIfUnknownOwner(ctx, owner) {
|
|
75
|
+
const trimmed = owner.trim();
|
|
76
|
+
if (!trimmed)
|
|
77
|
+
return;
|
|
78
|
+
const agentsDir = path.join(ctx.resolvedProject.gitRoot, ctx.config.paths.agents_dir);
|
|
79
|
+
if (!(await fileExists(agentsDir)))
|
|
80
|
+
return;
|
|
81
|
+
const entries = await readdir(agentsDir);
|
|
82
|
+
const ids = entries
|
|
83
|
+
.filter((name) => name.endsWith(".json"))
|
|
84
|
+
.map((name) => name.slice(0, -".json".length))
|
|
85
|
+
.filter((id) => id.trim().length > 0);
|
|
86
|
+
if (ids.length === 0)
|
|
87
|
+
return;
|
|
88
|
+
if (!ids.includes(trimmed)) {
|
|
89
|
+
process.stderr.write(`${warnMessage(`unknown task owner id: ${trimmed} (not found under ${ctx.config.paths.agents_dir}; ` +
|
|
90
|
+
`pick an existing agent id or create ${ctx.config.paths.agents_dir}/${trimmed}.json)`)}\n`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
43
93
|
export function appendTaskEvent(task, event) {
|
|
44
94
|
const existing = Array.isArray(task.events)
|
|
45
95
|
? task.events.filter((entry) => !!entry &&
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CommandCtx, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import type { CommandContext } from "../shared/task-backend.js";
|
|
3
|
+
export type TaskShowParsed = {
|
|
4
|
+
taskId: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const taskShowSpec: CommandSpec<TaskShowParsed>;
|
|
7
|
+
export declare function makeRunTaskShowHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: TaskShowParsed) => Promise<number>;
|
|
8
|
+
//# sourceMappingURL=show.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/show.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,cAAc,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhD,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,cAAc,CAOpD,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACvE,KAAK,UAAU,EAAE,GAAG,cAAc,KAAG,OAAO,CAAC,MAAM,CAAC,CAQnE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cmdTaskShow } from "./show.js";
|
|
2
|
+
export const taskShowSpec = {
|
|
3
|
+
id: ["task", "show"],
|
|
4
|
+
group: "Task",
|
|
5
|
+
summary: "Print task metadata as JSON (frontmatter shape).",
|
|
6
|
+
args: [{ name: "task-id", required: true, valueHint: "<task-id>" }],
|
|
7
|
+
examples: [{ cmd: "agentplane task show 202602030608-F1Q8AB", why: "Show task metadata." }],
|
|
8
|
+
parse: (raw) => ({ taskId: String(raw.args["task-id"]) }),
|
|
9
|
+
};
|
|
10
|
+
export function makeRunTaskShowHandler(getCtx) {
|
|
11
|
+
return async (ctx, p) => {
|
|
12
|
+
return await cmdTaskShow({
|
|
13
|
+
ctx: await getCtx("task show"),
|
|
14
|
+
cwd: ctx.cwd,
|
|
15
|
+
rootOverride: ctx.rootOverride,
|
|
16
|
+
taskId: p.taskId,
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../../src/commands/task/show.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../../src/commands/task/show.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAEnC,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,CA2BlB"}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { validateTaskDocMetadata } from "@agentplaneorg/core";
|
|
2
2
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
3
3
|
import { CliError } from "../../shared/errors.js";
|
|
4
|
-
import {
|
|
4
|
+
import { loadCommandContext, loadTaskFromContext, taskDataToFrontmatter, } from "../shared/task-backend.js";
|
|
5
5
|
export async function cmdTaskShow(opts) {
|
|
6
6
|
try {
|
|
7
|
-
const
|
|
8
|
-
cwd: opts.cwd,
|
|
9
|
-
|
|
10
|
-
taskId: opts.taskId,
|
|
11
|
-
});
|
|
7
|
+
const ctx = opts.ctx ??
|
|
8
|
+
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
9
|
+
const task = await loadTaskFromContext({ ctx, taskId: opts.taskId });
|
|
12
10
|
const frontmatter = taskDataToFrontmatter(task);
|
|
13
|
-
if (backendId === "local") {
|
|
11
|
+
if (ctx.backendId === "local") {
|
|
14
12
|
const metadataErrors = validateTaskDocMetadata(frontmatter);
|
|
15
13
|
if (metadataErrors.length > 0) {
|
|
16
14
|
throw new CliError({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const START_USAGE_EXAMPLE = "agentplane start 202602030608-F1Q8AB --author CODER --body \"Start: ...\"";
|
|
1
|
+
import { type CommandContext } from "../shared/task-backend.js";
|
|
3
2
|
export declare function cmdStart(opts: {
|
|
3
|
+
ctx?: CommandContext;
|
|
4
4
|
cwd: string;
|
|
5
5
|
rootOverride?: string;
|
|
6
6
|
taskId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/commands/task/start.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/commands/task/start.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAiBnC,wBAAsB,QAAQ,CAAC,IAAI,EAAE;IACnC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAqKlB"}
|
|
@@ -3,16 +3,13 @@ import { successMessage, warnMessage } from "../../cli/output.js";
|
|
|
3
3
|
import { formatCommentBodyForCommit } from "../../shared/comment-format.js";
|
|
4
4
|
import { CliError } from "../../shared/errors.js";
|
|
5
5
|
import { commitFromComment } from "../guard/index.js";
|
|
6
|
-
import { loadCommandContext, loadTaskFromContext } from "../shared/task-backend.js";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
export const START_USAGE_EXAMPLE = 'agentplane start 202602030608-F1Q8AB --author CODER --body "Start: ..."';
|
|
6
|
+
import { listTasksMemo, loadCommandContext, loadTaskFromContext, } from "../shared/task-backend.js";
|
|
7
|
+
import { backendIsLocalFileBackend, getTaskStore } from "../shared/task-store.js";
|
|
8
|
+
import { appendTaskEvent, buildDependencyState, ensurePlanApprovedIfRequired, enforceStatusCommitPolicy, extractDocSection, isVerifyStepsFilled, isTransitionAllowed, nowIso, requiresVerify, requireStructuredComment, toStringArray, } from "./shared.js";
|
|
10
9
|
export async function cmdStart(opts) {
|
|
11
10
|
try {
|
|
12
|
-
const ctx =
|
|
13
|
-
cwd: opts.cwd,
|
|
14
|
-
rootOverride: opts.rootOverride ?? null,
|
|
15
|
-
});
|
|
11
|
+
const ctx = opts.ctx ??
|
|
12
|
+
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
16
13
|
if (opts.commitFromComment) {
|
|
17
14
|
enforceStatusCommitPolicy({
|
|
18
15
|
policy: ctx.config.status_commit_policy,
|
|
@@ -23,7 +20,44 @@ export async function cmdStart(opts) {
|
|
|
23
20
|
}
|
|
24
21
|
const { prefix, min_chars: minChars } = ctx.config.tasks.comments.start;
|
|
25
22
|
requireStructuredComment(opts.body, prefix, minChars);
|
|
26
|
-
const
|
|
23
|
+
const useStore = backendIsLocalFileBackend(ctx);
|
|
24
|
+
const store = useStore ? getTaskStore(ctx) : null;
|
|
25
|
+
const task = useStore
|
|
26
|
+
? await store.get(opts.taskId)
|
|
27
|
+
: await loadTaskFromContext({ ctx, taskId: opts.taskId });
|
|
28
|
+
if (ctx.config.agents?.approvals?.require_plan !== true) {
|
|
29
|
+
const enforce = ctx.config.tasks.verify.enforce_on_start_when_no_plan !== false;
|
|
30
|
+
if (enforce) {
|
|
31
|
+
const tags = toStringArray(task.tags);
|
|
32
|
+
const requireStepsTags = ctx.config.tasks.verify.require_steps_for_tags ?? ctx.config.tasks.verify.required_tags;
|
|
33
|
+
const spikeTag = (ctx.config.tasks.verify.spike_tag ?? "spike").trim().toLowerCase();
|
|
34
|
+
const verifyRequired = requiresVerify(tags, requireStepsTags);
|
|
35
|
+
const isSpike = tags.some((tag) => tag.trim().toLowerCase() === spikeTag);
|
|
36
|
+
const doc = typeof task.doc === "string" ? task.doc : "";
|
|
37
|
+
if (verifyRequired || isSpike) {
|
|
38
|
+
const verifySteps = extractDocSection(doc, "Verify Steps");
|
|
39
|
+
if (!isVerifyStepsFilled(verifySteps)) {
|
|
40
|
+
throw new CliError({
|
|
41
|
+
exitCode: 3,
|
|
42
|
+
code: "E_VALIDATION",
|
|
43
|
+
message: `${task.id}: cannot start work: ## Verify Steps section is missing/empty/unfilled ` +
|
|
44
|
+
"(fill it before starting work when plan approval is disabled)",
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (isSpike) {
|
|
49
|
+
const notes = extractDocSection(doc, "Notes");
|
|
50
|
+
if (!notes || notes.trim().length === 0) {
|
|
51
|
+
throw new CliError({
|
|
52
|
+
exitCode: 3,
|
|
53
|
+
code: "E_VALIDATION",
|
|
54
|
+
message: `${task.id}: cannot start spike: ## Notes section is missing or empty ` +
|
|
55
|
+
"(include Findings/Decision/Next Steps)",
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
27
61
|
ensurePlanApprovedIfRequired(task, ctx.config);
|
|
28
62
|
const currentStatus = String(task.status || "TODO").toUpperCase();
|
|
29
63
|
if (!opts.force && !isTransitionAllowed(currentStatus, "DOING")) {
|
|
@@ -34,7 +68,7 @@ export async function cmdStart(opts) {
|
|
|
34
68
|
});
|
|
35
69
|
}
|
|
36
70
|
if (!opts.force) {
|
|
37
|
-
const allTasks = await ctx
|
|
71
|
+
const allTasks = await listTasksMemo(ctx);
|
|
38
72
|
const depState = buildDependencyState(allTasks);
|
|
39
73
|
const dep = depState.get(task.id);
|
|
40
74
|
if (dep && (dep.missing.length > 0 || dep.incomplete.length > 0)) {
|
|
@@ -81,10 +115,13 @@ export async function cmdStart(opts) {
|
|
|
81
115
|
doc_updated_at: at,
|
|
82
116
|
doc_updated_by: opts.author,
|
|
83
117
|
};
|
|
84
|
-
await
|
|
118
|
+
await (useStore
|
|
119
|
+
? store.update(opts.taskId, () => nextTask)
|
|
120
|
+
: ctx.taskBackend.writeTask(nextTask));
|
|
85
121
|
let commitInfo = null;
|
|
86
122
|
if (opts.commitFromComment) {
|
|
87
123
|
commitInfo = await commitFromComment({
|
|
124
|
+
ctx,
|
|
88
125
|
cwd: opts.cwd,
|
|
89
126
|
rootOverride: opts.rootOverride,
|
|
90
127
|
taskId: opts.taskId,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CommandCtx, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import type { CommandContext } from "../shared/task-backend.js";
|
|
3
|
+
export type TaskUpdateParsed = {
|
|
4
|
+
taskId: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
priority?: "low" | "normal" | "med" | "high";
|
|
8
|
+
owner?: string;
|
|
9
|
+
tags: string[];
|
|
10
|
+
replaceTags: boolean;
|
|
11
|
+
dependsOn: string[];
|
|
12
|
+
replaceDependsOn: boolean;
|
|
13
|
+
verify: string[];
|
|
14
|
+
replaceVerify: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare const taskUpdateSpec: CommandSpec<TaskUpdateParsed>;
|
|
17
|
+
export declare function makeRunTaskUpdateHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: TaskUpdateParsed) => Promise<number>;
|
|
18
|
+
//# sourceMappingURL=update.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/update.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAKhE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAQF,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,gBAAgB,CAiHxD,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACzE,KAAK,UAAU,EAAE,GAAG,gBAAgB,KAAG,OAAO,CAAC,MAAM,CAAC,CAkBrE"}
|