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
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { loadTaskBackend } from "../../backends/task-backend.js";
|
|
3
2
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
4
3
|
import { backendNotSupportedMessage } from "../../cli/output.js";
|
|
5
4
|
import { CliError } from "../../shared/errors.js";
|
|
5
|
+
import { loadCommandContext } from "../shared/task-backend.js";
|
|
6
6
|
export async function cmdTaskExport(opts) {
|
|
7
7
|
try {
|
|
8
|
-
const
|
|
9
|
-
cwd: opts.cwd,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const outPath = path.join(resolved.gitRoot, config.paths.tasks_path);
|
|
13
|
-
if (!backend.exportTasksJson) {
|
|
8
|
+
const ctx = opts.ctx ??
|
|
9
|
+
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
10
|
+
const outPath = path.join(ctx.resolvedProject.gitRoot, ctx.config.paths.tasks_path);
|
|
11
|
+
if (!ctx.taskBackend.exportTasksJson) {
|
|
14
12
|
throw new CliError({
|
|
15
13
|
exitCode: 3,
|
|
16
14
|
code: "E_VALIDATION",
|
|
17
15
|
message: backendNotSupportedMessage("exportTasksJson()"),
|
|
18
16
|
});
|
|
19
17
|
}
|
|
20
|
-
await
|
|
21
|
-
process.stdout.write(`${path.relative(
|
|
18
|
+
await ctx.taskBackend.exportTasksJson(outPath);
|
|
19
|
+
process.stdout.write(`${path.relative(ctx.resolvedProject.gitRoot, outPath)}\n`);
|
|
22
20
|
return 0;
|
|
23
21
|
}
|
|
24
22
|
catch (err) {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const FINISH_USAGE_EXAMPLE = "agentplane finish 202602030608-F1Q8AB --author INTEGRATOR --body \"Verified: ...\"";
|
|
1
|
+
import { type CommandContext } from "../shared/task-backend.js";
|
|
3
2
|
export declare function cmdFinish(opts: {
|
|
3
|
+
ctx?: CommandContext;
|
|
4
4
|
cwd: string;
|
|
5
5
|
rootOverride?: string;
|
|
6
6
|
taskIds: string[];
|
|
7
7
|
author: string;
|
|
8
8
|
body: string;
|
|
9
|
+
result?: string;
|
|
10
|
+
risk?: "low" | "med" | "high";
|
|
11
|
+
breaking: boolean;
|
|
9
12
|
commit?: string;
|
|
10
|
-
skipVerify: boolean;
|
|
11
13
|
force: boolean;
|
|
12
|
-
noRequireTaskIdInCommit: boolean;
|
|
13
14
|
commitFromComment: boolean;
|
|
14
15
|
commitEmoji?: string;
|
|
15
16
|
commitAllow: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"finish.d.ts","sourceRoot":"","sources":["../../../src/commands/task/finish.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"finish.d.ts","sourceRoot":"","sources":["../../../src/commands/task/finish.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAcnC,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,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,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,wBAAwB,EAAE,OAAO,CAAC;IAClC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAyLlB"}
|
|
@@ -3,19 +3,13 @@ import { successMessage } 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";
|
|
6
|
+
import { loadCommandContext, loadTaskFromContext, } from "../shared/task-backend.js";
|
|
7
|
+
import { backendIsLocalFileBackend, getTaskStore } from "../shared/task-store.js";
|
|
7
8
|
import { appendTaskEvent, defaultCommitEmojiForStatus, enforceStatusCommitPolicy, ensureVerificationSatisfiedIfRequired, nowIso, readCommitInfo, readHeadCommit, requireStructuredComment, } from "./shared.js";
|
|
8
|
-
export const FINISH_USAGE = "Usage: agentplane finish <task-id> [<task-id>...] --author <id> --body <text> [flags]";
|
|
9
|
-
export const FINISH_USAGE_EXAMPLE = 'agentplane finish 202602030608-F1Q8AB --author INTEGRATOR --body "Verified: ..."';
|
|
10
9
|
export async function cmdFinish(opts) {
|
|
11
10
|
try {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
const ctx = await loadCommandContext({
|
|
16
|
-
cwd: opts.cwd,
|
|
17
|
-
rootOverride: opts.rootOverride ?? null,
|
|
18
|
-
});
|
|
11
|
+
const ctx = opts.ctx ??
|
|
12
|
+
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
19
13
|
const { prefix, min_chars: minChars } = ctx.config.tasks.comments.verified;
|
|
20
14
|
requireStructuredComment(opts.body, prefix, minChars);
|
|
21
15
|
if (opts.commitFromComment || opts.statusCommit) {
|
|
@@ -41,12 +35,27 @@ export async function cmdFinish(opts) {
|
|
|
41
35
|
message: "--commit-from-comment/--status-commit requires exactly one task id",
|
|
42
36
|
});
|
|
43
37
|
}
|
|
38
|
+
const gitRoot = ctx.resolvedProject.gitRoot;
|
|
44
39
|
const commitInfo = opts.commit
|
|
45
|
-
? await readCommitInfo(
|
|
46
|
-
: await readHeadCommit(
|
|
40
|
+
? await readCommitInfo(gitRoot, opts.commit)
|
|
41
|
+
: await readHeadCommit(gitRoot);
|
|
42
|
+
const useStore = backendIsLocalFileBackend(ctx);
|
|
43
|
+
const store = useStore ? getTaskStore(ctx) : null;
|
|
44
|
+
const metaTaskId = opts.taskIds.length === 1 ? (opts.taskIds[0] ?? "") : "";
|
|
45
|
+
const wantMeta = typeof opts.result === "string" || typeof opts.risk === "string" || opts.breaking === true;
|
|
46
|
+
if (wantMeta && opts.taskIds.length !== 1) {
|
|
47
|
+
throw new CliError({
|
|
48
|
+
exitCode: 2,
|
|
49
|
+
code: "E_USAGE",
|
|
50
|
+
message: "--result/--risk/--breaking requires exactly one task id",
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const resultSummary = typeof opts.result === "string" ? opts.result.trim() : "";
|
|
54
|
+
const riskLevel = opts.risk;
|
|
55
|
+
const breaking = opts.breaking === true;
|
|
47
56
|
let primaryStatusFrom = null;
|
|
48
57
|
for (const taskId of opts.taskIds) {
|
|
49
|
-
const task = await loadTaskFromContext({ ctx, taskId });
|
|
58
|
+
const task = useStore ? await store.get(taskId) : await loadTaskFromContext({ ctx, taskId });
|
|
50
59
|
if (!opts.force) {
|
|
51
60
|
const currentStatus = String(task.status || "TODO").toUpperCase();
|
|
52
61
|
if (currentStatus === "DONE") {
|
|
@@ -63,6 +72,26 @@ export async function cmdFinish(opts) {
|
|
|
63
72
|
primaryStatusFrom = String(task.status || "TODO").toUpperCase();
|
|
64
73
|
}
|
|
65
74
|
ensureVerificationSatisfiedIfRequired(task, ctx.config);
|
|
75
|
+
if (taskId === metaTaskId) {
|
|
76
|
+
const tags = Array.isArray(task.tags)
|
|
77
|
+
? task.tags.filter((t) => typeof t === "string")
|
|
78
|
+
: [];
|
|
79
|
+
const isSpike = tags.includes("spike");
|
|
80
|
+
if (!isSpike && opts.taskIds.length === 1 && !resultSummary) {
|
|
81
|
+
throw new CliError({
|
|
82
|
+
exitCode: 2,
|
|
83
|
+
code: "E_USAGE",
|
|
84
|
+
message: "Missing required --result for non-spike tasks.",
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
if (typeof opts.result === "string" && !resultSummary) {
|
|
88
|
+
throw new CliError({
|
|
89
|
+
exitCode: 2,
|
|
90
|
+
code: "E_USAGE",
|
|
91
|
+
message: "Invalid value for --result: empty.",
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
66
95
|
const existingComments = Array.isArray(task.comments)
|
|
67
96
|
? task.comments.filter((item) => !!item && typeof item.author === "string" && typeof item.body === "string")
|
|
68
97
|
: [];
|
|
@@ -81,18 +110,21 @@ export async function cmdFinish(opts) {
|
|
|
81
110
|
to: "DONE",
|
|
82
111
|
note: opts.body,
|
|
83
112
|
}),
|
|
113
|
+
result_summary: taskId === metaTaskId && resultSummary ? resultSummary : task.result_summary,
|
|
114
|
+
risk_level: taskId === metaTaskId && riskLevel ? riskLevel : task.risk_level,
|
|
115
|
+
breaking: taskId === metaTaskId && breaking ? true : task.breaking,
|
|
84
116
|
doc_version: 2,
|
|
85
117
|
doc_updated_at: at,
|
|
86
118
|
doc_updated_by: opts.author,
|
|
87
119
|
};
|
|
88
|
-
await
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
// No-op for parity; verify is handled by `agentplane verify`.
|
|
120
|
+
await (useStore
|
|
121
|
+
? store.update(taskId, () => nextTask)
|
|
122
|
+
: ctx.taskBackend.writeTask(nextTask));
|
|
92
123
|
}
|
|
93
124
|
// tasks.json is export-only; generated via `agentplane task export`.
|
|
94
125
|
if (opts.commitFromComment) {
|
|
95
126
|
await commitFromComment({
|
|
127
|
+
ctx,
|
|
96
128
|
cwd: opts.cwd,
|
|
97
129
|
rootOverride: opts.rootOverride,
|
|
98
130
|
taskId: primaryTaskId,
|
|
@@ -112,6 +144,7 @@ export async function cmdFinish(opts) {
|
|
|
112
144
|
}
|
|
113
145
|
if (opts.statusCommit) {
|
|
114
146
|
await commitFromComment({
|
|
147
|
+
ctx,
|
|
115
148
|
cwd: opts.cwd,
|
|
116
149
|
rootOverride: opts.rootOverride,
|
|
117
150
|
taskId: primaryTaskId,
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export type { TaskNewParsed } from "./new.js";
|
|
2
|
+
export { runTaskNewParsed } from "./new.js";
|
|
3
|
+
export { cmdTaskAdd } from "./add.js";
|
|
4
|
+
export { cmdTaskUpdate } from "./update.js";
|
|
5
|
+
export { cmdTaskScrub } from "./scrub.js";
|
|
5
6
|
export { cmdTaskListWithFilters, cmdTaskList } from "./list.js";
|
|
6
7
|
export { cmdTaskNext } from "./next.js";
|
|
7
8
|
export { cmdReady } from "./ready.js";
|
|
8
9
|
export { cmdTaskSearch } from "./search.js";
|
|
9
|
-
export {
|
|
10
|
+
export { cmdTaskScaffold } from "./scaffold.js";
|
|
10
11
|
export { cmdTaskNormalize } from "./normalize.js";
|
|
11
12
|
export { cmdTaskMigrate } from "./migrate.js";
|
|
12
|
-
export {
|
|
13
|
+
export { cmdTaskMigrateDoc } from "./migrate-doc.js";
|
|
13
14
|
export { cmdTaskComment } from "./comment.js";
|
|
14
15
|
export { cmdTaskSetStatus } from "./set-status.js";
|
|
15
16
|
export { cmdTaskShow } from "./show.js";
|
|
17
|
+
export { cmdTaskDerive } from "./derive.js";
|
|
16
18
|
export { cmdTaskExport } from "./export.js";
|
|
17
19
|
export { cmdTaskLint } from "./lint.js";
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export { TASK_DOC_SET_USAGE, TASK_DOC_SET_USAGE_EXAMPLE, TASK_DOC_SHOW_USAGE, TASK_DOC_SHOW_USAGE_EXAMPLE, cmdTaskDocSet, cmdTaskDocShow, } from "./doc.js";
|
|
20
|
+
export { cmdTaskPlanSet, cmdTaskPlanApprove, cmdTaskPlanReject } from "./plan.js";
|
|
21
|
+
export { cmdStart } from "./start.js";
|
|
22
|
+
export { cmdBlock } from "./block.js";
|
|
23
|
+
export { cmdFinish } from "./finish.js";
|
|
24
|
+
export { cmdTaskVerifyOk, cmdTaskVerifyRework } from "./verify-record.js";
|
|
25
|
+
export { cmdTaskDocSet, cmdTaskDocShow } from "./doc.js";
|
|
25
26
|
export { dedupeStrings } from "./shared.js";
|
|
26
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/task/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/task/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAElF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { runTaskNewParsed } from "./new.js";
|
|
2
|
+
export { cmdTaskAdd } from "./add.js";
|
|
3
|
+
export { cmdTaskUpdate } from "./update.js";
|
|
4
|
+
export { cmdTaskScrub } from "./scrub.js";
|
|
5
5
|
export { cmdTaskListWithFilters, cmdTaskList } from "./list.js";
|
|
6
6
|
export { cmdTaskNext } from "./next.js";
|
|
7
7
|
export { cmdReady } from "./ready.js";
|
|
8
8
|
export { cmdTaskSearch } from "./search.js";
|
|
9
|
-
export {
|
|
9
|
+
export { cmdTaskScaffold } from "./scaffold.js";
|
|
10
10
|
export { cmdTaskNormalize } from "./normalize.js";
|
|
11
11
|
export { cmdTaskMigrate } from "./migrate.js";
|
|
12
|
-
export {
|
|
12
|
+
export { cmdTaskMigrateDoc } from "./migrate-doc.js";
|
|
13
13
|
export { cmdTaskComment } from "./comment.js";
|
|
14
14
|
export { cmdTaskSetStatus } from "./set-status.js";
|
|
15
15
|
export { cmdTaskShow } from "./show.js";
|
|
16
|
+
export { cmdTaskDerive } from "./derive.js";
|
|
16
17
|
export { cmdTaskExport } from "./export.js";
|
|
17
18
|
export { cmdTaskLint } from "./lint.js";
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export { TASK_DOC_SET_USAGE, TASK_DOC_SET_USAGE_EXAMPLE, TASK_DOC_SHOW_USAGE, TASK_DOC_SHOW_USAGE_EXAMPLE, cmdTaskDocSet, cmdTaskDocShow, } from "./doc.js";
|
|
19
|
+
export { cmdTaskPlanSet, cmdTaskPlanApprove, cmdTaskPlanReject } from "./plan.js";
|
|
20
|
+
export { cmdStart } from "./start.js";
|
|
21
|
+
export { cmdBlock } from "./block.js";
|
|
22
|
+
export { cmdFinish } from "./finish.js";
|
|
23
|
+
export { cmdTaskVerifyOk, cmdTaskVerifyRework } from "./verify-record.js";
|
|
24
|
+
export { cmdTaskDocSet, cmdTaskDocShow } from "./doc.js";
|
|
25
25
|
export { dedupeStrings } from "./shared.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CommandCtx, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
export type TaskLintParsed = Record<string, never>;
|
|
3
|
+
export declare const taskLintSpec: CommandSpec<TaskLintParsed>;
|
|
4
|
+
export declare function runTaskLint(ctx: CommandCtx): Promise<number>;
|
|
5
|
+
//# sourceMappingURL=lint.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lint.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/lint.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAItE,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEnD,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,cAAc,CAMpD,CAAC;AAEF,wBAAsB,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAElE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { cmdTaskLint } from "./lint.js";
|
|
2
|
+
export const taskLintSpec = {
|
|
3
|
+
id: ["task", "lint"],
|
|
4
|
+
group: "Task",
|
|
5
|
+
summary: "Lint the exported tasks JSON file (schema + invariants).",
|
|
6
|
+
examples: [{ cmd: "agentplane task lint", why: "Validate the tasks export file." }],
|
|
7
|
+
parse: () => ({}),
|
|
8
|
+
};
|
|
9
|
+
export async function runTaskLint(ctx) {
|
|
10
|
+
return await cmdTaskLint({ cwd: ctx.cwd, rootOverride: ctx.rootOverride });
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CommandCtx, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import type { CommandContext } from "../shared/task-backend.js";
|
|
3
|
+
import type { TaskListFilters } from "./shared.js";
|
|
4
|
+
export type TaskListParsed = {
|
|
5
|
+
filters: TaskListFilters;
|
|
6
|
+
};
|
|
7
|
+
export declare const taskListSpec: CommandSpec<TaskListParsed>;
|
|
8
|
+
export declare function makeRunTaskListHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: TaskListParsed) => Promise<number>;
|
|
9
|
+
//# sourceMappingURL=list.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/list.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,cAAc,GAAG;IAAE,OAAO,EAAE,eAAe,CAAA;CAAE,CAAC;AAQ1D,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,cAAc,CAgDpD,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,68 @@
|
|
|
1
|
+
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
+
import { cmdTaskList } from "./list.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 taskListSpec = {
|
|
11
|
+
id: ["task", "list"],
|
|
12
|
+
group: "Task",
|
|
13
|
+
summary: "List tasks (optionally filtered by status/owner/tag).",
|
|
14
|
+
options: [
|
|
15
|
+
{
|
|
16
|
+
kind: "string",
|
|
17
|
+
name: "status",
|
|
18
|
+
valueHint: "<status>",
|
|
19
|
+
repeatable: true,
|
|
20
|
+
description: "Repeatable. Filter by status.",
|
|
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: "boolean", name: "quiet", default: false, description: "Suppress summary output." },
|
|
37
|
+
],
|
|
38
|
+
examples: [
|
|
39
|
+
{ cmd: "agentplane task list", why: "List all tasks." },
|
|
40
|
+
{ cmd: "agentplane task list --status TODO --owner CODER", why: "List filtered tasks." },
|
|
41
|
+
],
|
|
42
|
+
validateRaw: (raw) => {
|
|
43
|
+
for (const key of ["status", "owner", "tag"]) {
|
|
44
|
+
const list = toStringList(raw.opts[key]);
|
|
45
|
+
if (list.some((s) => s.trim() === "")) {
|
|
46
|
+
throw usageError({ spec: taskListSpec, message: `Invalid value for --${key}: empty.` });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
parse: (raw) => ({
|
|
51
|
+
filters: {
|
|
52
|
+
status: toStringList(raw.opts.status),
|
|
53
|
+
owner: toStringList(raw.opts.owner),
|
|
54
|
+
tag: toStringList(raw.opts.tag),
|
|
55
|
+
quiet: raw.opts.quiet === true,
|
|
56
|
+
},
|
|
57
|
+
}),
|
|
58
|
+
};
|
|
59
|
+
export function makeRunTaskListHandler(getCtx) {
|
|
60
|
+
return async (ctx, p) => {
|
|
61
|
+
return await cmdTaskList({
|
|
62
|
+
ctx: await getCtx("task list"),
|
|
63
|
+
cwd: ctx.cwd,
|
|
64
|
+
rootOverride: ctx.rootOverride,
|
|
65
|
+
filters: p.filters,
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import { type CommandContext } from "../shared/task-backend.js";
|
|
2
|
+
import { type TaskListFilters } from "./shared.js";
|
|
1
3
|
export declare function cmdTaskListWithFilters(opts: {
|
|
4
|
+
ctx?: CommandContext;
|
|
2
5
|
cwd: string;
|
|
3
6
|
rootOverride?: string;
|
|
4
|
-
|
|
7
|
+
filters: TaskListFilters;
|
|
5
8
|
}): Promise<number>;
|
|
6
9
|
export declare function cmdTaskList(opts: {
|
|
10
|
+
ctx?: CommandContext;
|
|
7
11
|
cwd: string;
|
|
8
12
|
rootOverride?: string;
|
|
9
|
-
|
|
13
|
+
filters: TaskListFilters;
|
|
10
14
|
}): Promise<number>;
|
|
11
15
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/task/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/task/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAqC,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEnG,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,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;AAED,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,CAElB"}
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import { loadTaskBackend } from "../../backends/task-backend.js";
|
|
2
1
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
3
|
-
import {
|
|
2
|
+
import { listTasksMemo, loadCommandContext } from "../shared/task-backend.js";
|
|
3
|
+
import { buildDependencyState, dedupeStrings, formatTaskLine, toStringArray, } from "./shared.js";
|
|
4
4
|
export async function cmdTaskListWithFilters(opts) {
|
|
5
|
-
const filters = parseTaskListFilters(opts.args);
|
|
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 listTasksMemo(ctx);
|
|
12
9
|
const depState = buildDependencyState(tasks);
|
|
13
10
|
let filtered = tasks;
|
|
14
|
-
if (filters.status.length > 0) {
|
|
15
|
-
const wanted = new Set(filters.status.map((s) => s.trim().toUpperCase()));
|
|
11
|
+
if (opts.filters.status.length > 0) {
|
|
12
|
+
const wanted = new Set(opts.filters.status.map((s) => s.trim().toUpperCase()));
|
|
16
13
|
filtered = filtered.filter((task) => wanted.has(String(task.status || "TODO").toUpperCase()));
|
|
17
14
|
}
|
|
18
|
-
if (filters.owner.length > 0) {
|
|
19
|
-
const wanted = new Set(filters.owner.map((o) => o.trim().toUpperCase()));
|
|
15
|
+
if (opts.filters.owner.length > 0) {
|
|
16
|
+
const wanted = new Set(opts.filters.owner.map((o) => o.trim().toUpperCase()));
|
|
20
17
|
filtered = filtered.filter((task) => wanted.has(String(task.owner || "").toUpperCase()));
|
|
21
18
|
}
|
|
22
|
-
if (filters.tag.length > 0) {
|
|
23
|
-
const wanted = new Set(filters.tag.map((t) => t.trim()).filter(Boolean));
|
|
19
|
+
if (opts.filters.tag.length > 0) {
|
|
20
|
+
const wanted = new Set(opts.filters.tag.map((t) => t.trim()).filter(Boolean));
|
|
24
21
|
filtered = filtered.filter((task) => {
|
|
25
22
|
const tags = dedupeStrings(toStringArray(task.tags));
|
|
26
23
|
return tags.some((tag) => wanted.has(tag));
|
|
@@ -30,7 +27,7 @@ export async function cmdTaskListWithFilters(opts) {
|
|
|
30
27
|
for (const task of sorted) {
|
|
31
28
|
process.stdout.write(`${formatTaskLine(task, depState.get(task.id))}\n`);
|
|
32
29
|
}
|
|
33
|
-
if (!filters.quiet) {
|
|
30
|
+
if (!opts.filters.quiet) {
|
|
34
31
|
const counts = {};
|
|
35
32
|
for (const task of sorted) {
|
|
36
33
|
const status = String(task.status || "TODO").toUpperCase();
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CommandCtx, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
export type TaskMigrateDocParsed = {
|
|
3
|
+
all: boolean;
|
|
4
|
+
quiet: boolean;
|
|
5
|
+
taskIds: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare const taskMigrateDocSpec: CommandSpec<TaskMigrateDocParsed>;
|
|
8
|
+
export declare function runTaskMigrateDoc(ctx: CommandCtx, p: TaskMigrateDocParsed): Promise<number>;
|
|
9
|
+
//# sourceMappingURL=migrate-doc.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-doc.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/migrate-doc.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAa,MAAM,wBAAwB,CAAC;AAKjF,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAUF,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,oBAAoB,CA6ChE,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAQjG"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
+
import { cmdTaskMigrateDoc } from "./migrate-doc.js";
|
|
3
|
+
function normalizeTaskIdsArg(raw) {
|
|
4
|
+
const value = raw.args["task-id"];
|
|
5
|
+
if (Array.isArray(value))
|
|
6
|
+
return value.filter((v) => typeof v === "string" && v.trim().length > 0);
|
|
7
|
+
if (typeof value === "string" && value.trim().length > 0)
|
|
8
|
+
return [value];
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
export const taskMigrateDocSpec = {
|
|
12
|
+
id: ["task", "migrate-doc"],
|
|
13
|
+
group: "Task",
|
|
14
|
+
summary: "Migrate task README docs to the current template/metadata format.",
|
|
15
|
+
args: [{ name: "task-id", required: false, variadic: true, valueHint: "<task-id>" }],
|
|
16
|
+
options: [
|
|
17
|
+
{ kind: "boolean", name: "all", default: false, description: "Migrate all task READMEs." },
|
|
18
|
+
{
|
|
19
|
+
kind: "boolean",
|
|
20
|
+
name: "quiet",
|
|
21
|
+
default: false,
|
|
22
|
+
description: "Suppress normal output (still prints errors).",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
examples: [
|
|
26
|
+
{ cmd: "agentplane task migrate-doc --all", why: "Migrate all task READMEs." },
|
|
27
|
+
{
|
|
28
|
+
cmd: "agentplane task migrate-doc 202602030608-F1Q8AB 202602030609-ABCDEF",
|
|
29
|
+
why: "Migrate specific task READMEs.",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
validateRaw: (raw) => {
|
|
33
|
+
const all = raw.opts.all === true;
|
|
34
|
+
const taskIds = normalizeTaskIdsArg(raw);
|
|
35
|
+
const hasIds = taskIds.length > 0;
|
|
36
|
+
if (all && hasIds) {
|
|
37
|
+
throw usageError({
|
|
38
|
+
spec: taskMigrateDocSpec,
|
|
39
|
+
message: "Invalid arguments: use either --all or <task-id>..., not both.",
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (!all && !hasIds) {
|
|
43
|
+
throw usageError({
|
|
44
|
+
spec: taskMigrateDocSpec,
|
|
45
|
+
message: "Missing task ids (provide <task-id>... or use --all).",
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
parse: (raw) => {
|
|
50
|
+
return {
|
|
51
|
+
all: raw.opts.all === true,
|
|
52
|
+
quiet: raw.opts.quiet === true,
|
|
53
|
+
taskIds: normalizeTaskIdsArg(raw),
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
export async function runTaskMigrateDoc(ctx, p) {
|
|
58
|
+
return await cmdTaskMigrateDoc({
|
|
59
|
+
cwd: ctx.cwd,
|
|
60
|
+
rootOverride: ctx.rootOverride,
|
|
61
|
+
all: p.all,
|
|
62
|
+
quiet: p.quiet,
|
|
63
|
+
taskIds: p.taskIds,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const TASK_MIGRATE_DOC_USAGE = "Usage: agentplane task migrate-doc [<task-id> ...] [--all] [--quiet]";
|
|
2
|
-
export declare const TASK_MIGRATE_DOC_USAGE_EXAMPLE = "agentplane task migrate-doc --all";
|
|
3
1
|
export declare function cmdTaskMigrateDoc(opts: {
|
|
4
2
|
cwd: string;
|
|
5
3
|
rootOverride?: string;
|
|
6
|
-
|
|
4
|
+
all: boolean;
|
|
5
|
+
quiet: boolean;
|
|
6
|
+
taskIds: string[];
|
|
7
7
|
}): Promise<number>;
|
|
8
8
|
//# sourceMappingURL=migrate-doc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-doc.d.ts","sourceRoot":"","sources":["../../../src/commands/task/migrate-doc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrate-doc.d.ts","sourceRoot":"","sources":["../../../src/commands/task/migrate-doc.ts"],"names":[],"mappings":"AAkIA,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,GAAG,OAAO,CAAC,MAAM,CAAC,CAwClB"}
|