agentplane 0.1.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/assets/AGENTS.md +294 -72
- 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 -192
- package/dist/backends/task-backend.d.ts.map +1 -1
- package/dist/backends/task-backend.js +4 -1329
- 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 +28 -12
- 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 -2408
- 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 -66
- package/dist/commands/guard/index.d.ts.map +1 -1
- package/dist/commands/guard/index.js +4 -367
- 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 +42 -77
- 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 -12
- package/dist/commands/recipes.d.ts.map +1 -1
- package/dist/commands/recipes.js +6 -1963
- 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 +2 -0
- package/dist/commands/scenario.d.ts.map +1 -0
- package/dist/commands/scenario.js +1 -0
- 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 +31 -3
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +42 -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 +31 -21
- 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 +19 -9
- 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 +80 -37
- 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 +32 -12
- package/dist/commands/task/shared.d.ts +8 -2
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +68 -28
- 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 +66 -23
- 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 +114 -117
- package/dist/commands/task/verify-rework.command.d.ts +13 -0
- package/dist/commands/task/verify-rework.command.d.ts.map +1 -0
- package/dist/commands/task/verify-rework.command.js +83 -0
- package/dist/commands/task/verify-show.command.d.ts +9 -0
- package/dist/commands/task/verify-show.command.d.ts.map +1 -0
- package/dist/commands/task/verify-show.command.js +38 -0
- package/dist/commands/task/verify.command.d.ts +7 -0
- package/dist/commands/task/verify.command.d.ts.map +1 -0
- package/dist/commands/task/verify.command.js +20 -0
- package/dist/commands/upgrade.command.d.ts +6 -0
- package/dist/commands/upgrade.command.d.ts.map +1 -0
- package/dist/commands/upgrade.command.js +104 -0
- package/dist/commands/upgrade.d.ts +13 -2
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +12 -80
- package/dist/commands/verify.command.d.ts +16 -0
- package/dist/commands/verify.command.d.ts.map +1 -0
- package/dist/commands/verify.command.js +113 -0
- package/dist/commands/workflow.d.ts +4 -6
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +4 -7
- package/dist/meta/release.d.ts +2 -0
- package/dist/meta/release.d.ts.map +1 -0
- package/dist/meta/release.js +50 -0
- package/dist/policy/evaluate.d.ts +3 -0
- package/dist/policy/evaluate.d.ts.map +1 -0
- package/dist/policy/evaluate.js +27 -0
- package/dist/policy/result.d.ts +7 -0
- package/dist/policy/result.d.ts.map +1 -0
- package/dist/policy/result.js +21 -0
- package/dist/policy/rules/allowlist.d.ts +3 -0
- package/dist/policy/rules/allowlist.d.ts.map +1 -0
- package/dist/policy/rules/allowlist.js +30 -0
- package/dist/policy/rules/branch-pr-base.d.ts +3 -0
- package/dist/policy/rules/branch-pr-base.d.ts.map +1 -0
- package/dist/policy/rules/branch-pr-base.js +43 -0
- package/dist/policy/rules/clean-tree.d.ts +3 -0
- package/dist/policy/rules/clean-tree.d.ts.map +1 -0
- package/dist/policy/rules/clean-tree.js +19 -0
- package/dist/policy/rules/commit-subject.d.ts +3 -0
- package/dist/policy/rules/commit-subject.d.ts.map +1 -0
- package/dist/policy/rules/commit-subject.js +33 -0
- package/dist/policy/rules/protected-paths.d.ts +3 -0
- package/dist/policy/rules/protected-paths.d.ts.map +1 -0
- package/dist/policy/rules/protected-paths.js +53 -0
- package/dist/policy/types.d.ts +38 -0
- package/dist/policy/types.d.ts.map +1 -0
- package/dist/policy/types.js +1 -0
- package/dist/shared/git-log.d.ts +5 -0
- package/dist/shared/git-log.d.ts.map +1 -0
- package/dist/shared/git-log.js +14 -0
- package/dist/shared/git-path.d.ts +3 -0
- package/dist/shared/git-path.d.ts.map +1 -0
- package/dist/shared/git-path.js +30 -0
- package/dist/shared/guards.d.ts +2 -0
- package/dist/shared/guards.d.ts.map +1 -0
- package/dist/shared/guards.js +3 -0
- package/dist/shared/protected-paths.d.ts +12 -0
- package/dist/shared/protected-paths.d.ts.map +1 -0
- package/dist/shared/protected-paths.js +51 -0
- package/dist/shared/strings.d.ts +2 -0
- package/dist/shared/strings.d.ts.map +1 -0
- package/dist/shared/strings.js +14 -0
- package/dist/shared/write-if-changed.d.ts +3 -0
- package/dist/shared/write-if-changed.d.ts.map +1 -0
- package/dist/shared/write-if-changed.js +25 -0
- package/package.json +2 -2
- package/dist/cli/help.d.ts +0 -2
- package/dist/cli/help.d.ts.map +0 -1
- package/dist/cli/help.js +0 -127
- package/dist/commands/task/verify.d.ts +0 -2
- package/dist/commands/task/verify.d.ts.map +0 -1
- package/dist/commands/task/verify.js +0 -1
|
@@ -1,96 +1,15 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { ensureDocSections, normalizeDocSectionName, parseDocSections, setMarkdownSection, } from "@agentplaneorg/core";
|
|
4
|
-
import { loadTaskBackend } from "../../backends/task-backend.js";
|
|
5
4
|
import { mapBackendError, mapCoreError } from "../../cli/error-map.js";
|
|
6
|
-
import { infoMessage,
|
|
5
|
+
import { infoMessage, unknownEntityMessage, backendNotSupportedMessage } from "../../cli/output.js";
|
|
7
6
|
import { CliError } from "../../shared/errors.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export const TASK_DOC_SHOW_USAGE = "Usage: agentplane task doc show <task-id> [--section <name>] [--quiet]";
|
|
11
|
-
export const TASK_DOC_SHOW_USAGE_EXAMPLE = "agentplane task doc show 202602030608-F1Q8AB --section Summary";
|
|
12
|
-
function parseTaskDocShowFlags(args) {
|
|
13
|
-
const out = { quiet: false };
|
|
14
|
-
for (let i = 0; i < args.length; i++) {
|
|
15
|
-
const arg = args[i];
|
|
16
|
-
if (!arg)
|
|
17
|
-
continue;
|
|
18
|
-
if (arg === "--quiet") {
|
|
19
|
-
out.quiet = true;
|
|
20
|
-
continue;
|
|
21
|
-
}
|
|
22
|
-
if (arg === "--section") {
|
|
23
|
-
const next = args[i + 1];
|
|
24
|
-
if (!next) {
|
|
25
|
-
throw new CliError({ exitCode: 2, code: "E_USAGE", message: missingValueMessage(arg) });
|
|
26
|
-
}
|
|
27
|
-
out.section = next;
|
|
28
|
-
i++;
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
throw new CliError({ exitCode: 2, code: "E_USAGE", message: `Unknown flag: ${arg}` });
|
|
32
|
-
}
|
|
33
|
-
return out;
|
|
34
|
-
}
|
|
35
|
-
function parseTaskDocSetFlags(args) {
|
|
36
|
-
const out = {};
|
|
37
|
-
for (let i = 0; i < args.length; i++) {
|
|
38
|
-
const arg = args[i];
|
|
39
|
-
if (!arg)
|
|
40
|
-
continue;
|
|
41
|
-
if (!arg.startsWith("--")) {
|
|
42
|
-
throw new CliError({ exitCode: 2, code: "E_USAGE", message: `Unexpected argument: ${arg}` });
|
|
43
|
-
}
|
|
44
|
-
const next = args[i + 1];
|
|
45
|
-
if (!next) {
|
|
46
|
-
throw new CliError({ exitCode: 2, code: "E_USAGE", message: missingValueMessage(arg) });
|
|
47
|
-
}
|
|
48
|
-
switch (arg) {
|
|
49
|
-
case "--section": {
|
|
50
|
-
out.section = next;
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
case "--text": {
|
|
54
|
-
out.text = next;
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
case "--file": {
|
|
58
|
-
out.file = next;
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
case "--updated-by": {
|
|
62
|
-
out.updatedBy = next;
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
default: {
|
|
66
|
-
throw new CliError({ exitCode: 2, code: "E_USAGE", message: `Unknown flag: ${arg}` });
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
i++;
|
|
70
|
-
}
|
|
71
|
-
return out;
|
|
72
|
-
}
|
|
7
|
+
import { loadCommandContext } from "../shared/task-backend.js";
|
|
8
|
+
import { backendIsLocalFileBackend, getTaskStore } from "../shared/task-store.js";
|
|
73
9
|
export async function cmdTaskDocSet(opts) {
|
|
74
|
-
const flags = parseTaskDocSetFlags(opts.args);
|
|
75
|
-
if (!flags.section) {
|
|
76
|
-
throw new CliError({
|
|
77
|
-
exitCode: 2,
|
|
78
|
-
code: "E_USAGE",
|
|
79
|
-
message: usageMessage(TASK_DOC_SET_USAGE, TASK_DOC_SET_USAGE_EXAMPLE),
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
const hasText = flags.text !== undefined;
|
|
83
|
-
const hasFile = flags.file !== undefined;
|
|
84
|
-
if (hasText === hasFile) {
|
|
85
|
-
throw new CliError({
|
|
86
|
-
exitCode: 2,
|
|
87
|
-
code: "E_USAGE",
|
|
88
|
-
message: usageMessage(TASK_DOC_SET_USAGE, TASK_DOC_SET_USAGE_EXAMPLE),
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
10
|
let updatedBy;
|
|
92
|
-
if (
|
|
93
|
-
const trimmed =
|
|
11
|
+
if (opts.updatedBy !== undefined) {
|
|
12
|
+
const trimmed = opts.updatedBy.trim();
|
|
94
13
|
if (trimmed.length === 0) {
|
|
95
14
|
throw new CliError({
|
|
96
15
|
exitCode: 2,
|
|
@@ -100,20 +19,30 @@ export async function cmdTaskDocSet(opts) {
|
|
|
100
19
|
}
|
|
101
20
|
updatedBy = trimmed;
|
|
102
21
|
}
|
|
103
|
-
|
|
22
|
+
const hasText = opts.text !== undefined;
|
|
23
|
+
const hasFile = opts.file !== undefined;
|
|
24
|
+
if (hasText === hasFile) {
|
|
25
|
+
throw new CliError({
|
|
26
|
+
exitCode: 2,
|
|
27
|
+
code: "E_USAGE",
|
|
28
|
+
message: "Exactly one of --text or --file must be provided",
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
let text = opts.text ?? "";
|
|
104
32
|
if (hasFile) {
|
|
105
33
|
try {
|
|
106
|
-
text = await readFile(path.resolve(opts.cwd,
|
|
34
|
+
text = await readFile(path.resolve(opts.cwd, opts.file ?? ""), "utf8");
|
|
107
35
|
}
|
|
108
36
|
catch (err) {
|
|
109
|
-
throw mapCoreError(err, { command: "task doc set", filePath:
|
|
37
|
+
throw mapCoreError(err, { command: "task doc set", filePath: opts.file ?? "" });
|
|
110
38
|
}
|
|
111
39
|
}
|
|
112
40
|
try {
|
|
113
|
-
const
|
|
114
|
-
cwd: opts.cwd,
|
|
115
|
-
|
|
116
|
-
|
|
41
|
+
const ctx = opts.ctx ??
|
|
42
|
+
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
43
|
+
const backend = ctx.taskBackend;
|
|
44
|
+
const resolved = ctx.resolvedProject;
|
|
45
|
+
const config = ctx.config;
|
|
117
46
|
if (!backend.getTaskDoc || !backend.setTaskDoc) {
|
|
118
47
|
throw new CliError({
|
|
119
48
|
exitCode: 2,
|
|
@@ -121,16 +50,18 @@ export async function cmdTaskDocSet(opts) {
|
|
|
121
50
|
message: backendNotSupportedMessage("task docs"),
|
|
122
51
|
});
|
|
123
52
|
}
|
|
53
|
+
const useStore = backendIsLocalFileBackend(ctx);
|
|
54
|
+
const store = useStore ? getTaskStore(ctx) : null;
|
|
124
55
|
const allowed = config.tasks.doc.sections;
|
|
125
|
-
if (!allowed.includes(
|
|
56
|
+
if (!allowed.includes(opts.section)) {
|
|
126
57
|
throw new CliError({
|
|
127
58
|
exitCode: 2,
|
|
128
59
|
code: "E_USAGE",
|
|
129
|
-
message: unknownEntityMessage("doc section",
|
|
60
|
+
message: unknownEntityMessage("doc section", opts.section),
|
|
130
61
|
});
|
|
131
62
|
}
|
|
132
63
|
const normalizedAllowed = new Set(allowed.map((section) => normalizeDocSectionName(section)));
|
|
133
|
-
const targetKey = normalizeDocSectionName(
|
|
64
|
+
const targetKey = normalizeDocSectionName(opts.section);
|
|
134
65
|
const headingKeys = new Set();
|
|
135
66
|
for (const line of text.replaceAll("\r\n", "\n").split("\n")) {
|
|
136
67
|
const match = /^##\s+(.*)$/.exec(line.trim());
|
|
@@ -140,11 +71,20 @@ export async function cmdTaskDocSet(opts) {
|
|
|
140
71
|
if (key && normalizedAllowed.has(key))
|
|
141
72
|
headingKeys.add(key);
|
|
142
73
|
}
|
|
143
|
-
const
|
|
144
|
-
const
|
|
74
|
+
const storeTask = useStore ? await store.get(opts.taskId) : null;
|
|
75
|
+
const baseDocRaw = useStore
|
|
76
|
+
? String(storeTask.doc ?? "")
|
|
77
|
+
: ((await backend.getTaskDoc(opts.taskId)) ?? "");
|
|
78
|
+
const baseDoc = ensureDocSections(baseDocRaw, config.tasks.doc.required_sections);
|
|
145
79
|
if (headingKeys.size > 0 && (headingKeys.size > 1 || !headingKeys.has(targetKey))) {
|
|
146
80
|
const fullDoc = ensureDocSections(text, config.tasks.doc.required_sections);
|
|
147
|
-
await
|
|
81
|
+
await (useStore
|
|
82
|
+
? store.update(opts.taskId, (current) => ({
|
|
83
|
+
...current,
|
|
84
|
+
doc: fullDoc,
|
|
85
|
+
...(updatedBy ? { doc_updated_by: updatedBy } : {}),
|
|
86
|
+
}))
|
|
87
|
+
: backend.setTaskDoc(opts.taskId, fullDoc, updatedBy));
|
|
148
88
|
}
|
|
149
89
|
else {
|
|
150
90
|
let nextText = text;
|
|
@@ -153,16 +93,22 @@ export async function cmdTaskDocSet(opts) {
|
|
|
153
93
|
let firstContent = 0;
|
|
154
94
|
while (firstContent < lines.length && lines[firstContent]?.trim() === "")
|
|
155
95
|
firstContent++;
|
|
156
|
-
if ((lines[firstContent]?.trim() ?? "") === `## ${
|
|
96
|
+
if ((lines[firstContent]?.trim() ?? "") === `## ${opts.section}`) {
|
|
157
97
|
lines.splice(firstContent, 1);
|
|
158
98
|
if (lines[firstContent]?.trim() === "")
|
|
159
99
|
lines.splice(firstContent, 1);
|
|
160
100
|
nextText = lines.join("\n");
|
|
161
101
|
}
|
|
162
102
|
}
|
|
163
|
-
const nextDoc = setMarkdownSection(baseDoc,
|
|
103
|
+
const nextDoc = setMarkdownSection(baseDoc, opts.section, nextText);
|
|
164
104
|
const normalized = ensureDocSections(nextDoc, config.tasks.doc.required_sections);
|
|
165
|
-
await
|
|
105
|
+
await (useStore
|
|
106
|
+
? store.update(opts.taskId, (current) => ({
|
|
107
|
+
...current,
|
|
108
|
+
doc: normalized,
|
|
109
|
+
...(updatedBy ? { doc_updated_by: updatedBy } : {}),
|
|
110
|
+
}))
|
|
111
|
+
: backend.setTaskDoc(opts.taskId, normalized, updatedBy));
|
|
166
112
|
}
|
|
167
113
|
const tasksDir = path.join(resolved.gitRoot, config.paths.workflow_dir);
|
|
168
114
|
process.stdout.write(`${path.join(tasksDir, opts.taskId, "README.md")}\n`);
|
|
@@ -175,12 +121,10 @@ export async function cmdTaskDocSet(opts) {
|
|
|
175
121
|
}
|
|
176
122
|
}
|
|
177
123
|
export async function cmdTaskDocShow(opts) {
|
|
178
|
-
const flags = parseTaskDocShowFlags(opts.args);
|
|
179
124
|
try {
|
|
180
|
-
const
|
|
181
|
-
cwd: opts.cwd,
|
|
182
|
-
|
|
183
|
-
});
|
|
125
|
+
const ctx = opts.ctx ??
|
|
126
|
+
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
127
|
+
const backend = ctx.taskBackend;
|
|
184
128
|
if (!backend.getTaskDoc) {
|
|
185
129
|
throw new CliError({
|
|
186
130
|
exitCode: 2,
|
|
@@ -188,9 +132,13 @@ export async function cmdTaskDocShow(opts) {
|
|
|
188
132
|
message: backendNotSupportedMessage("task docs"),
|
|
189
133
|
});
|
|
190
134
|
}
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
135
|
+
const useStore = backendIsLocalFileBackend(ctx);
|
|
136
|
+
const storeTask = useStore ? await getTaskStore(ctx).get(opts.taskId) : null;
|
|
137
|
+
const doc = useStore
|
|
138
|
+
? String(storeTask.doc ?? "")
|
|
139
|
+
: ((await backend.getTaskDoc(opts.taskId)) ?? "");
|
|
140
|
+
if (opts.section) {
|
|
141
|
+
const sectionKey = normalizeDocSectionName(opts.section);
|
|
194
142
|
const { sections } = parseDocSections(doc);
|
|
195
143
|
const entry = sections.get(sectionKey);
|
|
196
144
|
const content = entry?.lines ?? [];
|
|
@@ -198,8 +146,8 @@ export async function cmdTaskDocShow(opts) {
|
|
|
198
146
|
process.stdout.write(`${content.join("\n").trimEnd()}\n`);
|
|
199
147
|
return 0;
|
|
200
148
|
}
|
|
201
|
-
if (!
|
|
202
|
-
process.stdout.write(`${infoMessage(`section has no content: ${
|
|
149
|
+
if (!opts.quiet) {
|
|
150
|
+
process.stdout.write(`${infoMessage(`section has no content: ${opts.section}`)}\n`);
|
|
203
151
|
}
|
|
204
152
|
return 0;
|
|
205
153
|
}
|
|
@@ -207,7 +155,7 @@ export async function cmdTaskDocShow(opts) {
|
|
|
207
155
|
process.stdout.write(`${doc.trimEnd()}\n`);
|
|
208
156
|
return 0;
|
|
209
157
|
}
|
|
210
|
-
if (!
|
|
158
|
+
if (!opts.quiet) {
|
|
211
159
|
process.stdout.write(`${infoMessage("task doc metadata missing")}\n`);
|
|
212
160
|
}
|
|
213
161
|
return 0;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CommandCtx, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import type { CommandContext } from "../shared/task-backend.js";
|
|
3
|
+
export type TaskExportParsed = Record<string, never>;
|
|
4
|
+
export declare const taskExportSpec: CommandSpec<TaskExportParsed>;
|
|
5
|
+
export declare function makeRunTaskExportHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx) => Promise<number>;
|
|
6
|
+
//# sourceMappingURL=export.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/export.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,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAErD,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,gBAAgB,CAMxD,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACzE,KAAK,UAAU,KAAG,OAAO,CAAC,MAAM,CAAC,CAOhD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cmdTaskExport } from "./export.js";
|
|
2
|
+
export const taskExportSpec = {
|
|
3
|
+
id: ["task", "export"],
|
|
4
|
+
group: "Task",
|
|
5
|
+
summary: "Export tasks to the configured tasks export path (typically .agentplane/tasks.json).",
|
|
6
|
+
examples: [{ cmd: "agentplane task export", why: "Write tasks export JSON and print the path." }],
|
|
7
|
+
parse: () => ({}),
|
|
8
|
+
};
|
|
9
|
+
export function makeRunTaskExportHandler(getCtx) {
|
|
10
|
+
return async (ctx) => {
|
|
11
|
+
return await cmdTaskExport({
|
|
12
|
+
ctx: await getCtx("task export"),
|
|
13
|
+
cwd: ctx.cwd,
|
|
14
|
+
rootOverride: ctx.rootOverride,
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../src/commands/task/export.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../src/commands/task/export.ts"],"names":[],"mappings":"AAKA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBlB"}
|
|
@@ -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"}
|
|
@@ -1,29 +1,20 @@
|
|
|
1
|
-
import { loadConfig, resolveProject } from "@agentplaneorg/core";
|
|
2
|
-
import { loadTaskBackend } from "../../backends/task-backend.js";
|
|
3
1
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
4
2
|
import { successMessage } from "../../cli/output.js";
|
|
5
3
|
import { formatCommentBodyForCommit } from "../../shared/comment-format.js";
|
|
6
4
|
import { CliError } from "../../shared/errors.js";
|
|
7
5
|
import { commitFromComment } from "../guard/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
export const FINISH_USAGE_EXAMPLE = 'agentplane finish 202602030608-F1Q8AB --author INTEGRATOR --body "Verified: ..."';
|
|
6
|
+
import { loadCommandContext, loadTaskFromContext, } from "../shared/task-backend.js";
|
|
7
|
+
import { backendIsLocalFileBackend, getTaskStore } from "../shared/task-store.js";
|
|
8
|
+
import { appendTaskEvent, defaultCommitEmojiForStatus, enforceStatusCommitPolicy, ensureVerificationSatisfiedIfRequired, nowIso, readCommitInfo, readHeadCommit, requireStructuredComment, } from "./shared.js";
|
|
12
9
|
export async function cmdFinish(opts) {
|
|
13
10
|
try {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
const resolved = await resolveProject({
|
|
18
|
-
cwd: opts.cwd,
|
|
19
|
-
rootOverride: opts.rootOverride ?? null,
|
|
20
|
-
});
|
|
21
|
-
const loaded = await loadConfig(resolved.agentplaneDir);
|
|
22
|
-
const { prefix, min_chars: minChars } = loaded.config.tasks.comments.verified;
|
|
11
|
+
const ctx = opts.ctx ??
|
|
12
|
+
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
13
|
+
const { prefix, min_chars: minChars } = ctx.config.tasks.comments.verified;
|
|
23
14
|
requireStructuredComment(opts.body, prefix, minChars);
|
|
24
15
|
if (opts.commitFromComment || opts.statusCommit) {
|
|
25
16
|
enforceStatusCommitPolicy({
|
|
26
|
-
policy:
|
|
17
|
+
policy: ctx.config.status_commit_policy,
|
|
27
18
|
action: "finish",
|
|
28
19
|
confirmed: opts.confirmStatusCommit,
|
|
29
20
|
quiet: opts.quiet,
|
|
@@ -44,19 +35,27 @@ export async function cmdFinish(opts) {
|
|
|
44
35
|
message: "--commit-from-comment/--status-commit requires exactly one task id",
|
|
45
36
|
});
|
|
46
37
|
}
|
|
47
|
-
const
|
|
48
|
-
cwd: opts.cwd,
|
|
49
|
-
rootOverride: opts.rootOverride ?? null,
|
|
50
|
-
});
|
|
38
|
+
const gitRoot = ctx.resolvedProject.gitRoot;
|
|
51
39
|
const commitInfo = opts.commit
|
|
52
|
-
? await readCommitInfo(
|
|
53
|
-
: await readHeadCommit(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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",
|
|
59
51
|
});
|
|
52
|
+
}
|
|
53
|
+
const resultSummary = typeof opts.result === "string" ? opts.result.trim() : "";
|
|
54
|
+
const riskLevel = opts.risk;
|
|
55
|
+
const breaking = opts.breaking === true;
|
|
56
|
+
let primaryStatusFrom = null;
|
|
57
|
+
for (const taskId of opts.taskIds) {
|
|
58
|
+
const task = useStore ? await store.get(taskId) : await loadTaskFromContext({ ctx, taskId });
|
|
60
59
|
if (!opts.force) {
|
|
61
60
|
const currentStatus = String(task.status || "TODO").toUpperCase();
|
|
62
61
|
if (currentStatus === "DONE") {
|
|
@@ -67,56 +66,100 @@ export async function cmdFinish(opts) {
|
|
|
67
66
|
});
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
|
-
|
|
69
|
+
if (taskId === primaryTaskId &&
|
|
70
|
+
(opts.commitFromComment || opts.statusCommit) &&
|
|
71
|
+
primaryStatusFrom === null) {
|
|
72
|
+
primaryStatusFrom = String(task.status || "TODO").toUpperCase();
|
|
73
|
+
}
|
|
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
|
+
}
|
|
71
95
|
const existingComments = Array.isArray(task.comments)
|
|
72
96
|
? task.comments.filter((item) => !!item && typeof item.author === "string" && typeof item.body === "string")
|
|
73
97
|
: [];
|
|
74
98
|
const commentsValue = [...existingComments, { author: opts.author, body: opts.body }];
|
|
99
|
+
const at = nowIso();
|
|
75
100
|
const nextTask = {
|
|
76
101
|
...task,
|
|
77
102
|
status: "DONE",
|
|
78
103
|
commit: { hash: commitInfo.hash, message: commitInfo.message },
|
|
79
104
|
comments: commentsValue,
|
|
105
|
+
events: appendTaskEvent(task, {
|
|
106
|
+
type: "status",
|
|
107
|
+
at,
|
|
108
|
+
author: opts.author,
|
|
109
|
+
from: String(task.status || "TODO").toUpperCase(),
|
|
110
|
+
to: "DONE",
|
|
111
|
+
note: opts.body,
|
|
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,
|
|
80
116
|
doc_version: 2,
|
|
81
|
-
doc_updated_at:
|
|
117
|
+
doc_updated_at: at,
|
|
82
118
|
doc_updated_by: opts.author,
|
|
83
119
|
};
|
|
84
|
-
await
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
// No-op for parity; verify is handled by `agentplane verify`.
|
|
120
|
+
await (useStore
|
|
121
|
+
? store.update(taskId, () => nextTask)
|
|
122
|
+
: ctx.taskBackend.writeTask(nextTask));
|
|
88
123
|
}
|
|
89
124
|
// tasks.json is export-only; generated via `agentplane task export`.
|
|
90
125
|
if (opts.commitFromComment) {
|
|
91
126
|
await commitFromComment({
|
|
127
|
+
ctx,
|
|
92
128
|
cwd: opts.cwd,
|
|
93
129
|
rootOverride: opts.rootOverride,
|
|
94
130
|
taskId: primaryTaskId,
|
|
131
|
+
author: opts.author,
|
|
132
|
+
statusFrom: primaryStatusFrom ?? undefined,
|
|
133
|
+
statusTo: "DONE",
|
|
95
134
|
commentBody: opts.body,
|
|
96
|
-
formattedComment: formatCommentBodyForCommit(opts.body,
|
|
135
|
+
formattedComment: formatCommentBodyForCommit(opts.body, ctx.config),
|
|
97
136
|
emoji: opts.commitEmoji ?? defaultCommitEmojiForStatus("DONE"),
|
|
98
137
|
allow: opts.commitAllow,
|
|
99
138
|
autoAllow: opts.commitAutoAllow || opts.commitAllow.length === 0,
|
|
100
139
|
allowTasks: opts.commitAllowTasks,
|
|
101
140
|
requireClean: opts.commitRequireClean,
|
|
102
141
|
quiet: opts.quiet,
|
|
103
|
-
config:
|
|
142
|
+
config: ctx.config,
|
|
104
143
|
});
|
|
105
144
|
}
|
|
106
145
|
if (opts.statusCommit) {
|
|
107
146
|
await commitFromComment({
|
|
147
|
+
ctx,
|
|
108
148
|
cwd: opts.cwd,
|
|
109
149
|
rootOverride: opts.rootOverride,
|
|
110
150
|
taskId: primaryTaskId,
|
|
151
|
+
author: opts.author,
|
|
152
|
+
statusFrom: primaryStatusFrom ?? undefined,
|
|
153
|
+
statusTo: "DONE",
|
|
111
154
|
commentBody: opts.body,
|
|
112
|
-
formattedComment: formatCommentBodyForCommit(opts.body,
|
|
155
|
+
formattedComment: formatCommentBodyForCommit(opts.body, ctx.config),
|
|
113
156
|
emoji: opts.statusCommitEmoji ?? defaultCommitEmojiForStatus("DONE"),
|
|
114
157
|
allow: opts.statusCommitAllow,
|
|
115
158
|
autoAllow: opts.statusCommitAutoAllow || opts.statusCommitAllow.length === 0,
|
|
116
159
|
allowTasks: true,
|
|
117
160
|
requireClean: opts.statusCommitRequireClean,
|
|
118
161
|
quiet: opts.quiet,
|
|
119
|
-
config:
|
|
162
|
+
config: ctx.config,
|
|
120
163
|
});
|
|
121
164
|
}
|
|
122
165
|
if (!opts.quiet) {
|
|
@@ -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"}
|