agentplane 0.1.9 → 0.2.1
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 +19 -2
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +281 -85
- 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 +3 -3
- 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,89 @@
|
|
|
1
|
+
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
+
import { cmdTaskNext } from "./next.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 taskNextSpec = {
|
|
11
|
+
id: ["task", "next"],
|
|
12
|
+
group: "Task",
|
|
13
|
+
summary: "List ready tasks (default status=TODO) with optional filters.",
|
|
14
|
+
options: [
|
|
15
|
+
{
|
|
16
|
+
kind: "string",
|
|
17
|
+
name: "status",
|
|
18
|
+
valueHint: "<status>",
|
|
19
|
+
repeatable: true,
|
|
20
|
+
description: "Repeatable. Filter by status (default: TODO).",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
kind: "string",
|
|
24
|
+
name: "owner",
|
|
25
|
+
valueHint: "<owner>",
|
|
26
|
+
repeatable: true,
|
|
27
|
+
description: "Repeatable. Filter by owner id.",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
kind: "string",
|
|
31
|
+
name: "tag",
|
|
32
|
+
valueHint: "<tag>",
|
|
33
|
+
repeatable: true,
|
|
34
|
+
description: "Repeatable. Filter by tag.",
|
|
35
|
+
},
|
|
36
|
+
{ kind: "string", name: "limit", valueHint: "<n>", description: "Max rows to print." },
|
|
37
|
+
{ kind: "boolean", name: "quiet", default: false, description: "Suppress summary output." },
|
|
38
|
+
],
|
|
39
|
+
examples: [
|
|
40
|
+
{ cmd: "agentplane task next", why: "List ready TODO tasks." },
|
|
41
|
+
{ cmd: "agentplane task next --limit 3", why: "Limit output." },
|
|
42
|
+
],
|
|
43
|
+
validateRaw: (raw) => {
|
|
44
|
+
for (const key of ["status", "owner", "tag"]) {
|
|
45
|
+
const list = toStringList(raw.opts[key]);
|
|
46
|
+
if (list.some((s) => s.trim() === "")) {
|
|
47
|
+
throw usageError({ spec: taskNextSpec, message: `Invalid value for --${key}: empty.` });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (raw.opts.limit !== undefined) {
|
|
51
|
+
const limitRaw = raw.opts.limit;
|
|
52
|
+
if (typeof limitRaw !== "string") {
|
|
53
|
+
throw usageError({
|
|
54
|
+
spec: taskNextSpec,
|
|
55
|
+
message: `Invalid value for --limit: ${JSON.stringify(limitRaw)} (expected integer)`,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
const parsed = Number.parseInt(limitRaw, 10);
|
|
59
|
+
if (Number.isFinite(parsed)) {
|
|
60
|
+
// ok
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
throw usageError({
|
|
64
|
+
spec: taskNextSpec,
|
|
65
|
+
message: `Invalid value for --limit: ${limitRaw} (expected integer)`,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
parse: (raw) => ({
|
|
71
|
+
filters: {
|
|
72
|
+
status: toStringList(raw.opts.status),
|
|
73
|
+
owner: toStringList(raw.opts.owner),
|
|
74
|
+
tag: toStringList(raw.opts.tag),
|
|
75
|
+
limit: typeof raw.opts.limit === "string" ? Number.parseInt(raw.opts.limit, 10) : undefined,
|
|
76
|
+
quiet: raw.opts.quiet === true,
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
};
|
|
80
|
+
export function makeRunTaskNextHandler(getCtx) {
|
|
81
|
+
return async (ctx, p) => {
|
|
82
|
+
return await cmdTaskNext({
|
|
83
|
+
ctx: await getCtx("task next"),
|
|
84
|
+
cwd: ctx.cwd,
|
|
85
|
+
rootOverride: ctx.rootOverride,
|
|
86
|
+
filters: p.filters,
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type CommandContext } from "../shared/task-backend.js";
|
|
2
|
+
import { type TaskListFilters } from "./shared.js";
|
|
1
3
|
export declare function cmdTaskNext(opts: {
|
|
4
|
+
ctx?: CommandContext;
|
|
2
5
|
cwd: string;
|
|
3
6
|
rootOverride?: string;
|
|
4
|
-
|
|
7
|
+
filters: TaskListFilters;
|
|
5
8
|
}): Promise<number>;
|
|
6
9
|
//# sourceMappingURL=next.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../../src/commands/task/next.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../../src/commands/task/next.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,wBAAsB,WAAW,CAAC,IAAI,EAAE;IACtC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,eAAe,CAAC;CAC1B,GAAG,OAAO,CAAC,MAAM,CAAC,CA4ClB"}
|
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
import { loadTaskBackend } from "../../backends/task-backend.js";
|
|
2
1
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
3
|
-
import {
|
|
2
|
+
import { loadCommandContext } from "../shared/task-backend.js";
|
|
3
|
+
import { buildDependencyState, dedupeStrings, formatTaskLine, toStringArray, } from "./shared.js";
|
|
4
4
|
export async function cmdTaskNext(opts) {
|
|
5
|
-
const filters = parseTaskListFilters(opts.args, { allowLimit: true });
|
|
6
5
|
try {
|
|
7
|
-
const
|
|
8
|
-
cwd: opts.cwd,
|
|
9
|
-
|
|
10
|
-
});
|
|
11
|
-
const tasks = await backend.listTasks();
|
|
6
|
+
const ctx = opts.ctx ??
|
|
7
|
+
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
8
|
+
const tasks = await ctx.taskBackend.listTasks();
|
|
12
9
|
const depState = buildDependencyState(tasks);
|
|
13
|
-
const statuses = filters.status.length > 0
|
|
14
|
-
? new Set(filters.status.map((s) => s.trim().toUpperCase()))
|
|
10
|
+
const statuses = opts.filters.status.length > 0
|
|
11
|
+
? new Set(opts.filters.status.map((s) => s.trim().toUpperCase()))
|
|
15
12
|
: new Set(["TODO"]);
|
|
16
13
|
let filtered = tasks.filter((task) => statuses.has(String(task.status || "TODO").toUpperCase()));
|
|
17
|
-
if (filters.owner.length > 0) {
|
|
18
|
-
const wanted = new Set(filters.owner.map((o) => o.trim().toUpperCase()));
|
|
14
|
+
if (opts.filters.owner.length > 0) {
|
|
15
|
+
const wanted = new Set(opts.filters.owner.map((o) => o.trim().toUpperCase()));
|
|
19
16
|
filtered = filtered.filter((task) => wanted.has(String(task.owner || "").toUpperCase()));
|
|
20
17
|
}
|
|
21
|
-
if (filters.tag.length > 0) {
|
|
22
|
-
const wanted = new Set(filters.tag.map((t) => t.trim()).filter(Boolean));
|
|
18
|
+
if (opts.filters.tag.length > 0) {
|
|
19
|
+
const wanted = new Set(opts.filters.tag.map((t) => t.trim()).filter(Boolean));
|
|
23
20
|
filtered = filtered.filter((task) => {
|
|
24
21
|
const tags = dedupeStrings(toStringArray(task.tags));
|
|
25
22
|
return tags.some((tag) => wanted.has(tag));
|
|
@@ -30,11 +27,13 @@ export async function cmdTaskNext(opts) {
|
|
|
30
27
|
const dep = depState.get(task.id);
|
|
31
28
|
return !dep || (dep.missing.length === 0 && dep.incomplete.length === 0);
|
|
32
29
|
});
|
|
33
|
-
const limited = filters.limit !== undefined && filters.limit >= 0
|
|
30
|
+
const limited = opts.filters.limit !== undefined && opts.filters.limit >= 0
|
|
31
|
+
? ready.slice(0, opts.filters.limit)
|
|
32
|
+
: ready;
|
|
34
33
|
for (const task of limited) {
|
|
35
34
|
process.stdout.write(`${formatTaskLine(task, depState.get(task.id))}\n`);
|
|
36
35
|
}
|
|
37
|
-
if (!filters.quiet) {
|
|
36
|
+
if (!opts.filters.quiet) {
|
|
38
37
|
process.stdout.write(`Ready: ${limited.length} / ${filtered.length}\n`);
|
|
39
38
|
}
|
|
40
39
|
return 0;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CommandCtx, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import type { CommandContext } from "../shared/task-backend.js";
|
|
3
|
+
export type TaskNormalizeParsed = {
|
|
4
|
+
quiet: boolean;
|
|
5
|
+
force: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const taskNormalizeSpec: CommandSpec<TaskNormalizeParsed>;
|
|
8
|
+
export declare function makeRunTaskNormalizeHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: TaskNormalizeParsed) => Promise<number>;
|
|
9
|
+
//# sourceMappingURL=normalize.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/normalize.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,mBAAmB,GAAG;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CA0B9D,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC5E,KAAK,UAAU,EAAE,GAAG,mBAAmB,KAAG,OAAO,CAAC,MAAM,CAAC,CASxE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cmdTaskNormalize } from "./normalize.js";
|
|
2
|
+
export const taskNormalizeSpec = {
|
|
3
|
+
id: ["task", "normalize"],
|
|
4
|
+
group: "Task",
|
|
5
|
+
summary: "Normalize tasks in the configured backend (stable ordering and formatting).",
|
|
6
|
+
options: [
|
|
7
|
+
{
|
|
8
|
+
kind: "boolean",
|
|
9
|
+
name: "quiet",
|
|
10
|
+
default: false,
|
|
11
|
+
description: "Suppress normal output (still prints errors).",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
kind: "boolean",
|
|
15
|
+
name: "force",
|
|
16
|
+
default: false,
|
|
17
|
+
description: "Accepted for parity; currently has no additional checks in the node CLI.",
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
examples: [
|
|
21
|
+
{ cmd: "agentplane task normalize", why: "Normalize tasks and print a short summary." },
|
|
22
|
+
{ cmd: "agentplane task normalize --quiet", why: "Normalize tasks without printing output." },
|
|
23
|
+
],
|
|
24
|
+
parse: (raw) => ({
|
|
25
|
+
quiet: raw.opts.quiet === true,
|
|
26
|
+
force: raw.opts.force === true,
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
export function makeRunTaskNormalizeHandler(getCtx) {
|
|
30
|
+
return async (ctx, p) => {
|
|
31
|
+
return await cmdTaskNormalize({
|
|
32
|
+
ctx: await getCtx("task normalize"),
|
|
33
|
+
cwd: ctx.cwd,
|
|
34
|
+
rootOverride: ctx.rootOverride,
|
|
35
|
+
quiet: p.quiet,
|
|
36
|
+
force: p.force,
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type CommandContext } from "../shared/task-backend.js";
|
|
1
2
|
export declare function cmdTaskNormalize(opts: {
|
|
3
|
+
ctx?: CommandContext;
|
|
2
4
|
cwd: string;
|
|
3
5
|
rootOverride?: string;
|
|
4
|
-
|
|
6
|
+
quiet: boolean;
|
|
7
|
+
force: boolean;
|
|
5
8
|
}): Promise<number>;
|
|
6
9
|
//# sourceMappingURL=normalize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../src/commands/task/normalize.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../src/commands/task/normalize.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiClB"}
|
|
@@ -1,41 +1,28 @@
|
|
|
1
|
-
import { loadTaskBackend } from "../../backends/task-backend.js";
|
|
2
1
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
3
2
|
import { successMessage } from "../../cli/output.js";
|
|
4
|
-
import {
|
|
5
|
-
function parseTaskNormalizeFlags(args) {
|
|
6
|
-
const out = { quiet: false, force: false };
|
|
7
|
-
for (const arg of args) {
|
|
8
|
-
if (!arg)
|
|
9
|
-
continue;
|
|
10
|
-
if (arg === "--quiet")
|
|
11
|
-
out.quiet = true;
|
|
12
|
-
else if (arg === "--force")
|
|
13
|
-
out.force = true;
|
|
14
|
-
else if (arg.startsWith("--")) {
|
|
15
|
-
throw new CliError({ exitCode: 2, code: "E_USAGE", message: `Unknown flag: ${arg}` });
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return out;
|
|
19
|
-
}
|
|
3
|
+
import { loadCommandContext } from "../shared/task-backend.js";
|
|
20
4
|
export async function cmdTaskNormalize(opts) {
|
|
21
|
-
|
|
22
|
-
if (flags.force) {
|
|
5
|
+
if (opts.force) {
|
|
23
6
|
// Force is accepted for parity; no additional checks in node CLI.
|
|
24
7
|
}
|
|
25
8
|
try {
|
|
26
|
-
const
|
|
27
|
-
cwd: opts.cwd,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
else {
|
|
35
|
-
for (const task of tasks)
|
|
36
|
-
await backend.writeTask(task);
|
|
9
|
+
const ctx = opts.ctx ??
|
|
10
|
+
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
11
|
+
if (ctx.taskBackend.normalizeTasks) {
|
|
12
|
+
const result = await ctx.taskBackend.normalizeTasks();
|
|
13
|
+
if (!opts.quiet) {
|
|
14
|
+
process.stdout.write(`${successMessage("normalized tasks", undefined, `scanned=${result.scanned} changed=${result.changed}`)}\n`);
|
|
15
|
+
}
|
|
16
|
+
return 0;
|
|
37
17
|
}
|
|
38
|
-
|
|
18
|
+
const tasks = await ctx.taskBackend.listTasks();
|
|
19
|
+
await (ctx.taskBackend.writeTasks
|
|
20
|
+
? ctx.taskBackend.writeTasks(tasks)
|
|
21
|
+
: (async () => {
|
|
22
|
+
for (const task of tasks)
|
|
23
|
+
await ctx.taskBackend.writeTask(task);
|
|
24
|
+
})());
|
|
25
|
+
if (!opts.quiet) {
|
|
39
26
|
process.stdout.write(`${successMessage("normalized tasks", undefined, `count=${tasks.length}`)}\n`);
|
|
40
27
|
}
|
|
41
28
|
return 0;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CommandCtx, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import type { CommandContext } from "../shared/task-backend.js";
|
|
3
|
+
export type TaskPlanApproveParsed = {
|
|
4
|
+
taskId: string;
|
|
5
|
+
by: string;
|
|
6
|
+
note?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const taskPlanApproveSpec: CommandSpec<TaskPlanApproveParsed>;
|
|
9
|
+
export declare function makeRunTaskPlanApproveHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: TaskPlanApproveParsed) => Promise<number>;
|
|
10
|
+
//# sourceMappingURL=plan-approve.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-approve.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/plan-approve.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,qBAAqB,CAuClE,CAAC;AAEF,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC9E,KAAK,UAAU,EAAE,GAAG,qBAAqB,KAAG,OAAO,CAAC,MAAM,CAAC,CAU1E"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
+
import { cmdTaskPlanApprove } from "./plan.js";
|
|
3
|
+
export const taskPlanApproveSpec = {
|
|
4
|
+
id: ["task", "plan", "approve"],
|
|
5
|
+
group: "Task",
|
|
6
|
+
summary: "Approve the current task plan (enforces Verify Steps gating when configured).",
|
|
7
|
+
args: [{ name: "task-id", required: true, valueHint: "<task-id>" }],
|
|
8
|
+
options: [
|
|
9
|
+
{
|
|
10
|
+
kind: "string",
|
|
11
|
+
name: "by",
|
|
12
|
+
valueHint: "<id>",
|
|
13
|
+
required: true,
|
|
14
|
+
description: "Approver id.",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
kind: "string",
|
|
18
|
+
name: "note",
|
|
19
|
+
valueHint: "<text>",
|
|
20
|
+
description: "Optional note (stored in plan_approval.note).",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
examples: [
|
|
24
|
+
{
|
|
25
|
+
cmd: 'agentplane task plan approve 202602030608-F1Q8AB --by USER --note "OK"',
|
|
26
|
+
why: "Approve a plan with a note.",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
validateRaw: (raw) => {
|
|
30
|
+
const by = raw.opts.by;
|
|
31
|
+
if (typeof by === "string" && by.trim().length === 0) {
|
|
32
|
+
throw usageError({ spec: taskPlanApproveSpec, message: "Invalid value for --by: empty." });
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
parse: (raw) => {
|
|
36
|
+
return {
|
|
37
|
+
taskId: String(raw.args["task-id"]),
|
|
38
|
+
by: String(raw.opts.by),
|
|
39
|
+
note: typeof raw.opts.note === "string" ? raw.opts.note : undefined,
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
export function makeRunTaskPlanApproveHandler(getCtx) {
|
|
44
|
+
return async (ctx, p) => {
|
|
45
|
+
return await cmdTaskPlanApprove({
|
|
46
|
+
ctx: await getCtx("task plan approve"),
|
|
47
|
+
cwd: ctx.cwd,
|
|
48
|
+
rootOverride: ctx.rootOverride,
|
|
49
|
+
taskId: p.taskId,
|
|
50
|
+
by: p.by,
|
|
51
|
+
note: p.note,
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CommandCtx, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import type { CommandContext } from "../shared/task-backend.js";
|
|
3
|
+
export type TaskPlanRejectParsed = {
|
|
4
|
+
taskId: string;
|
|
5
|
+
by: string;
|
|
6
|
+
note: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const taskPlanRejectSpec: CommandSpec<TaskPlanRejectParsed>;
|
|
9
|
+
export declare function makeRunTaskPlanRejectHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: TaskPlanRejectParsed) => Promise<number>;
|
|
10
|
+
//# sourceMappingURL=plan-reject.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-reject.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/plan-reject.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,oBAAoB,CA4ChE,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC7E,KAAK,UAAU,EAAE,GAAG,oBAAoB,KAAG,OAAO,CAAC,MAAM,CAAC,CAUzE"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
+
import { cmdTaskPlanReject } from "./plan.js";
|
|
3
|
+
export const taskPlanRejectSpec = {
|
|
4
|
+
id: ["task", "plan", "reject"],
|
|
5
|
+
group: "Task",
|
|
6
|
+
summary: "Reject the current task plan (requires a note).",
|
|
7
|
+
args: [{ name: "task-id", required: true, valueHint: "<task-id>" }],
|
|
8
|
+
options: [
|
|
9
|
+
{
|
|
10
|
+
kind: "string",
|
|
11
|
+
name: "by",
|
|
12
|
+
valueHint: "<id>",
|
|
13
|
+
required: true,
|
|
14
|
+
description: "Reviewer id.",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
kind: "string",
|
|
18
|
+
name: "note",
|
|
19
|
+
valueHint: "<text>",
|
|
20
|
+
required: true,
|
|
21
|
+
description: "Required note explaining what needs to change.",
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
examples: [
|
|
25
|
+
{
|
|
26
|
+
cmd: 'agentplane task plan reject 202602030608-F1Q8AB --by USER --note "Need clarification"',
|
|
27
|
+
why: "Reject a plan with a note.",
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
validateRaw: (raw) => {
|
|
31
|
+
const by = raw.opts.by;
|
|
32
|
+
if (typeof by === "string" && by.trim().length === 0) {
|
|
33
|
+
throw usageError({ spec: taskPlanRejectSpec, message: "Invalid value for --by: empty." });
|
|
34
|
+
}
|
|
35
|
+
const note = raw.opts.note;
|
|
36
|
+
if (typeof note === "string" && note.trim().length === 0) {
|
|
37
|
+
throw usageError({ spec: taskPlanRejectSpec, message: "Invalid value for --note: empty." });
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
parse: (raw) => {
|
|
41
|
+
return {
|
|
42
|
+
taskId: String(raw.args["task-id"]),
|
|
43
|
+
by: String(raw.opts.by),
|
|
44
|
+
note: String(raw.opts.note),
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
export function makeRunTaskPlanRejectHandler(getCtx) {
|
|
49
|
+
return async (ctx, p) => {
|
|
50
|
+
return await cmdTaskPlanReject({
|
|
51
|
+
ctx: await getCtx("task plan reject"),
|
|
52
|
+
cwd: ctx.cwd,
|
|
53
|
+
rootOverride: ctx.rootOverride,
|
|
54
|
+
taskId: p.taskId,
|
|
55
|
+
by: p.by,
|
|
56
|
+
note: p.note,
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CommandCtx, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import type { CommandContext } from "../shared/task-backend.js";
|
|
3
|
+
export type TaskPlanSetParsed = {
|
|
4
|
+
taskId: string;
|
|
5
|
+
text?: string;
|
|
6
|
+
file?: string;
|
|
7
|
+
updatedBy?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const taskPlanSetSpec: CommandSpec<TaskPlanSetParsed>;
|
|
10
|
+
export declare function makeRunTaskPlanSetHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: TaskPlanSetParsed) => Promise<number>;
|
|
11
|
+
//# sourceMappingURL=plan-set.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-set.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/plan-set.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,iBAAiB,CA4D1D,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC1E,KAAK,UAAU,EAAE,GAAG,iBAAiB,KAAG,OAAO,CAAC,MAAM,CAAC,CAWtE"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
+
import { cmdTaskPlanSet } from "./plan.js";
|
|
3
|
+
export const taskPlanSetSpec = {
|
|
4
|
+
id: ["task", "plan", "set"],
|
|
5
|
+
group: "Task",
|
|
6
|
+
summary: "Set a task plan (writes the Plan section and resets plan approval to pending).",
|
|
7
|
+
args: [{ name: "task-id", required: true, valueHint: "<task-id>" }],
|
|
8
|
+
options: [
|
|
9
|
+
{
|
|
10
|
+
kind: "string",
|
|
11
|
+
name: "text",
|
|
12
|
+
valueHint: "<text>",
|
|
13
|
+
description: "Plan text to write into the task README Plan section.",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
kind: "string",
|
|
17
|
+
name: "file",
|
|
18
|
+
valueHint: "<path>",
|
|
19
|
+
description: "Read plan text from a file path (relative to cwd).",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
kind: "string",
|
|
23
|
+
name: "updated-by",
|
|
24
|
+
valueHint: "<id>",
|
|
25
|
+
description: "Optional. Sets doc_updated_by when writing the plan.",
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
examples: [
|
|
29
|
+
{
|
|
30
|
+
cmd: String.raw `agentplane task plan set 202602030608-F1Q8AB --text "1) Do X\n2) Verify Y" --updated-by ORCHESTRATOR`,
|
|
31
|
+
why: "Write plan from text and set doc_updated_by.",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
cmd: "agentplane task plan set 202602030608-F1Q8AB --file plan.md",
|
|
35
|
+
why: "Write plan from a file.",
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
validateRaw: (raw) => {
|
|
39
|
+
const hasText = typeof raw.opts.text === "string";
|
|
40
|
+
const hasFile = typeof raw.opts.file === "string";
|
|
41
|
+
if (hasText === hasFile) {
|
|
42
|
+
throw usageError({
|
|
43
|
+
spec: taskPlanSetSpec,
|
|
44
|
+
message: "Provide exactly one of --text or --file.",
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const updatedBy = raw.opts["updated-by"];
|
|
48
|
+
if (typeof updatedBy === "string" && updatedBy.trim().length === 0) {
|
|
49
|
+
throw usageError({
|
|
50
|
+
spec: taskPlanSetSpec,
|
|
51
|
+
message: "Invalid value for --updated-by: empty.",
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
parse: (raw) => {
|
|
56
|
+
return {
|
|
57
|
+
taskId: String(raw.args["task-id"]),
|
|
58
|
+
text: typeof raw.opts.text === "string" ? raw.opts.text : undefined,
|
|
59
|
+
file: typeof raw.opts.file === "string" ? raw.opts.file : undefined,
|
|
60
|
+
updatedBy: typeof raw.opts["updated-by"] === "string" ? raw.opts["updated-by"] : undefined,
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
export function makeRunTaskPlanSetHandler(getCtx) {
|
|
65
|
+
return async (ctx, p) => {
|
|
66
|
+
return await cmdTaskPlanSet({
|
|
67
|
+
ctx: await getCtx("task plan set"),
|
|
68
|
+
cwd: ctx.cwd,
|
|
69
|
+
rootOverride: ctx.rootOverride,
|
|
70
|
+
taskId: p.taskId,
|
|
71
|
+
text: p.text,
|
|
72
|
+
file: p.file,
|
|
73
|
+
updatedBy: p.updatedBy,
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -1,14 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
export declare const TASK_PLAN_SET_USAGE_EXAMPLE: string;
|
|
5
|
-
export declare const TASK_PLAN_APPROVE_USAGE = "Usage: agentplane task plan approve <task-id> --by <id> [--note <text>]";
|
|
6
|
-
export declare const TASK_PLAN_APPROVE_USAGE_EXAMPLE = "agentplane task plan approve 202602030608-F1Q8AB --by USER --note \"OK\"";
|
|
7
|
-
export declare const TASK_PLAN_REJECT_USAGE = "Usage: agentplane task plan reject <task-id> --by <id> --note <text>";
|
|
8
|
-
export declare const TASK_PLAN_REJECT_USAGE_EXAMPLE = "agentplane task plan reject 202602030608-F1Q8AB --by USER --note \"Need clarification\"";
|
|
9
|
-
export declare function cmdTaskPlan(opts: {
|
|
1
|
+
import { type CommandContext } from "../shared/task-backend.js";
|
|
2
|
+
export declare function cmdTaskPlanSet(opts: {
|
|
3
|
+
ctx?: CommandContext;
|
|
10
4
|
cwd: string;
|
|
11
5
|
rootOverride?: string;
|
|
12
|
-
|
|
6
|
+
taskId: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
file?: string;
|
|
9
|
+
updatedBy?: string;
|
|
10
|
+
}): Promise<number>;
|
|
11
|
+
export declare function cmdTaskPlanApprove(opts: {
|
|
12
|
+
ctx?: CommandContext;
|
|
13
|
+
cwd: string;
|
|
14
|
+
rootOverride?: string;
|
|
15
|
+
taskId: string;
|
|
16
|
+
by: string;
|
|
17
|
+
note?: string;
|
|
18
|
+
}): Promise<number>;
|
|
19
|
+
export declare function cmdTaskPlanReject(opts: {
|
|
20
|
+
ctx?: CommandContext;
|
|
21
|
+
cwd: string;
|
|
22
|
+
rootOverride?: string;
|
|
23
|
+
taskId: string;
|
|
24
|
+
by: string;
|
|
25
|
+
note: string;
|
|
13
26
|
}): Promise<number>;
|
|
14
27
|
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/commands/task/plan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/commands/task/plan.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AA+CnC,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,MAAM,CAAC,CAmElB;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAC7C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC,MAAM,CAAC,CAkFlB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,MAAM,CAAC,CAuDlB"}
|