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,10 +1,20 @@
|
|
|
1
1
|
import { loadTaskBackend, type TaskData } from "../../backends/task-backend.js";
|
|
2
|
+
import { GitContext } from "./git-context.js";
|
|
3
|
+
export type CommandMemo = {
|
|
4
|
+
taskList?: Promise<TaskData[]>;
|
|
5
|
+
changedPaths?: Promise<string[]>;
|
|
6
|
+
headCommit?: Promise<string>;
|
|
7
|
+
};
|
|
2
8
|
export type CommandContext = {
|
|
3
|
-
|
|
9
|
+
resolvedProject: Awaited<ReturnType<typeof loadTaskBackend>>["resolved"];
|
|
10
|
+
config: Awaited<ReturnType<typeof loadTaskBackend>>["config"];
|
|
11
|
+
taskBackend: Awaited<ReturnType<typeof loadTaskBackend>>["backend"];
|
|
4
12
|
backendId: string;
|
|
5
13
|
backendConfigPath: string;
|
|
6
|
-
|
|
7
|
-
|
|
14
|
+
git: GitContext;
|
|
15
|
+
memo: CommandMemo;
|
|
16
|
+
resolved: CommandContext["resolvedProject"];
|
|
17
|
+
backend: CommandContext["taskBackend"];
|
|
8
18
|
};
|
|
9
19
|
export declare function resolveDocUpdatedBy(task: TaskData, author?: string): string;
|
|
10
20
|
export declare function taskDataToFrontmatter(task: TaskData): Record<string, unknown>;
|
|
@@ -17,15 +27,17 @@ export declare function loadTaskFromContext(opts: {
|
|
|
17
27
|
taskId: string;
|
|
18
28
|
}): Promise<TaskData>;
|
|
19
29
|
export declare function loadBackendTask(opts: {
|
|
30
|
+
ctx?: CommandContext;
|
|
20
31
|
cwd: string;
|
|
21
32
|
rootOverride?: string | null;
|
|
22
33
|
taskId: string;
|
|
23
34
|
}): Promise<{
|
|
24
|
-
backend: CommandContext["
|
|
35
|
+
backend: CommandContext["taskBackend"];
|
|
25
36
|
backendId: string;
|
|
26
37
|
backendConfigPath: string;
|
|
27
|
-
resolved: CommandContext["
|
|
38
|
+
resolved: CommandContext["resolvedProject"];
|
|
28
39
|
config: CommandContext["config"];
|
|
29
40
|
task: TaskData;
|
|
30
41
|
}>;
|
|
42
|
+
export declare function listTasksMemo(ctx: CommandContext): Promise<TaskData[]>;
|
|
31
43
|
//# sourceMappingURL=task-backend.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-backend.d.ts","sourceRoot":"","sources":["../../../src/commands/shared/task-backend.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"task-backend.d.ts","sourceRoot":"","sources":["../../../src/commands/shared/task-backend.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IACzE,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC9D,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACpE,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,GAAG,EAAE,UAAU,CAAC;IAEhB,IAAI,EAAE,WAAW,CAAC;IAGlB,QAAQ,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAC5C,OAAO,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;CACxC,CAAC;AASF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ3E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA+B7E;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,GAAG,OAAO,CAAC,cAAc,CAAC,CAgB1B;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE;IAC9C,GAAG,EAAE,cAAc,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAepB;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC;IACV,OAAO,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAC5C,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IACjC,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC,CAaD;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAG5E"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { CliError } from "../../shared/errors.js";
|
|
3
3
|
import { loadTaskBackend } from "../../backends/task-backend.js";
|
|
4
|
+
import { GitContext } from "./git-context.js";
|
|
4
5
|
function normalizeDocUpdatedBy(value) {
|
|
5
6
|
const trimmed = value?.trim() ?? "";
|
|
6
7
|
if (!trimmed)
|
|
@@ -26,6 +27,9 @@ export function taskDataToFrontmatter(task) {
|
|
|
26
27
|
return {
|
|
27
28
|
id: task.id,
|
|
28
29
|
title: task.title,
|
|
30
|
+
result_summary: task.result_summary,
|
|
31
|
+
risk_level: task.risk_level,
|
|
32
|
+
breaking: task.breaking,
|
|
29
33
|
status: task.status,
|
|
30
34
|
priority: task.priority,
|
|
31
35
|
owner: task.owner,
|
|
@@ -36,10 +40,13 @@ export function taskDataToFrontmatter(task) {
|
|
|
36
40
|
verification,
|
|
37
41
|
commit: task.commit ?? null,
|
|
38
42
|
comments: task.comments ?? [],
|
|
43
|
+
events: task.events ?? [],
|
|
39
44
|
doc_version: task.doc_version,
|
|
40
45
|
doc_updated_at: task.doc_updated_at,
|
|
41
46
|
doc_updated_by: task.doc_updated_by,
|
|
42
47
|
description: task.description ?? "",
|
|
48
|
+
id_source: task.id_source,
|
|
49
|
+
dirty: task.dirty,
|
|
43
50
|
};
|
|
44
51
|
}
|
|
45
52
|
export async function loadCommandContext(opts) {
|
|
@@ -47,12 +54,22 @@ export async function loadCommandContext(opts) {
|
|
|
47
54
|
cwd: opts.cwd,
|
|
48
55
|
rootOverride: opts.rootOverride ?? null,
|
|
49
56
|
});
|
|
50
|
-
return {
|
|
57
|
+
return {
|
|
58
|
+
resolvedProject: resolved,
|
|
59
|
+
config,
|
|
60
|
+
taskBackend: backend,
|
|
61
|
+
backendId,
|
|
62
|
+
backendConfigPath,
|
|
63
|
+
git: new GitContext({ gitRoot: resolved.gitRoot }),
|
|
64
|
+
memo: {},
|
|
65
|
+
resolved,
|
|
66
|
+
backend,
|
|
67
|
+
};
|
|
51
68
|
}
|
|
52
69
|
export async function loadTaskFromContext(opts) {
|
|
53
|
-
const task = await opts.ctx.
|
|
70
|
+
const task = await opts.ctx.taskBackend.getTask(opts.taskId);
|
|
54
71
|
if (!task) {
|
|
55
|
-
const tasksDir = path.join(opts.ctx.
|
|
72
|
+
const tasksDir = path.join(opts.ctx.resolvedProject.gitRoot, opts.ctx.config.paths.workflow_dir);
|
|
56
73
|
const readmePath = path.join(tasksDir, opts.taskId, "README.md");
|
|
57
74
|
throw new CliError({
|
|
58
75
|
exitCode: 4,
|
|
@@ -63,7 +80,19 @@ export async function loadTaskFromContext(opts) {
|
|
|
63
80
|
return task;
|
|
64
81
|
}
|
|
65
82
|
export async function loadBackendTask(opts) {
|
|
66
|
-
const ctx =
|
|
83
|
+
const ctx = opts.ctx ??
|
|
84
|
+
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
67
85
|
const task = await loadTaskFromContext({ ctx, taskId: opts.taskId });
|
|
68
|
-
return {
|
|
86
|
+
return {
|
|
87
|
+
backend: ctx.taskBackend,
|
|
88
|
+
backendId: ctx.backendId,
|
|
89
|
+
backendConfigPath: ctx.backendConfigPath,
|
|
90
|
+
resolved: ctx.resolvedProject,
|
|
91
|
+
config: ctx.config,
|
|
92
|
+
task,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export async function listTasksMemo(ctx) {
|
|
96
|
+
ctx.memo.taskList ??= ctx.taskBackend.listTasks();
|
|
97
|
+
return await ctx.memo.taskList;
|
|
69
98
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type TaskData } from "../../backends/task-backend.js";
|
|
2
|
+
import { type CommandContext } from "./task-backend.js";
|
|
3
|
+
export declare class TaskStore {
|
|
4
|
+
private ctx;
|
|
5
|
+
private cache;
|
|
6
|
+
constructor(ctx: CommandContext);
|
|
7
|
+
get(taskId: string): Promise<TaskData>;
|
|
8
|
+
private getCached;
|
|
9
|
+
update(taskId: string, updater: (current: TaskData) => Promise<TaskData> | TaskData): Promise<{
|
|
10
|
+
changed: boolean;
|
|
11
|
+
task: TaskData;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
export declare function getTaskStore(ctx: CommandContext): TaskStore;
|
|
15
|
+
export declare function backendIsLocalFileBackend(ctx: CommandContext): boolean;
|
|
16
|
+
//# sourceMappingURL=task-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-store.d.ts","sourceRoot":"","sources":["../../../src/commands/shared/task-store.ts"],"names":[],"mappings":"AAYA,OAAO,EAAgB,KAAK,QAAQ,EAAoB,MAAM,gCAAgC,CAAC;AAG/F,OAAO,EAA8C,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA0DpG,qBAAa,SAAS;IACpB,OAAO,CAAC,GAAG,CAAiB;IAC5B,OAAO,CAAC,KAAK,CAA0C;gBAE3C,GAAG,EAAE,cAAc;IAIzB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;YAK9B,SAAS;IAkBjB,MAAM,CACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,GAC3D,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC;CAwEjD;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,SAAS,CAI3D;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAEtE"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { readFile, stat } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { docChanged, extractTaskDoc, mergeTaskDoc, parseTaskReadme, renderTaskReadme, } from "@agentplaneorg/core";
|
|
4
|
+
import { LocalBackend, taskRecordToData } from "../../backends/task-backend.js";
|
|
5
|
+
import { CliError } from "../../shared/errors.js";
|
|
6
|
+
import { writeTextIfChanged } from "../../shared/write-if-changed.js";
|
|
7
|
+
import { resolveDocUpdatedBy, taskDataToFrontmatter } from "./task-backend.js";
|
|
8
|
+
function taskReadmePath(ctx, taskId) {
|
|
9
|
+
return path.join(ctx.resolvedProject.gitRoot, ctx.config.paths.workflow_dir, taskId, "README.md");
|
|
10
|
+
}
|
|
11
|
+
async function readTaskReadmeCached(opts) {
|
|
12
|
+
const readmePath = taskReadmePath(opts.ctx, opts.taskId);
|
|
13
|
+
let text;
|
|
14
|
+
let st;
|
|
15
|
+
try {
|
|
16
|
+
st = await stat(readmePath);
|
|
17
|
+
text = await readFile(readmePath, "utf8");
|
|
18
|
+
}
|
|
19
|
+
catch (err) {
|
|
20
|
+
const code = err?.code;
|
|
21
|
+
if (code === "ENOENT") {
|
|
22
|
+
throw new CliError({
|
|
23
|
+
exitCode: 4,
|
|
24
|
+
code: "E_IO",
|
|
25
|
+
message: `ENOENT: no such file or directory, open '${readmePath}'`,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
throw err;
|
|
29
|
+
}
|
|
30
|
+
const parsed = parseTaskReadme(text);
|
|
31
|
+
const task = taskRecordToData({
|
|
32
|
+
id: opts.taskId,
|
|
33
|
+
frontmatter: parsed.frontmatter,
|
|
34
|
+
body: parsed.body,
|
|
35
|
+
readmePath,
|
|
36
|
+
});
|
|
37
|
+
return { task, readmePath, mtimeMs: st.mtimeMs, parsed };
|
|
38
|
+
}
|
|
39
|
+
async function ensureUnchangedOnDisk(opts) {
|
|
40
|
+
const st = await stat(opts.readmePath);
|
|
41
|
+
if (st.mtimeMs !== opts.expectedMtimeMs) {
|
|
42
|
+
throw new CliError({
|
|
43
|
+
exitCode: 4,
|
|
44
|
+
code: "E_IO",
|
|
45
|
+
message: `Task README changed concurrently: ${opts.readmePath}`,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export class TaskStore {
|
|
50
|
+
ctx;
|
|
51
|
+
cache = new Map();
|
|
52
|
+
constructor(ctx) {
|
|
53
|
+
this.ctx = ctx;
|
|
54
|
+
}
|
|
55
|
+
async get(taskId) {
|
|
56
|
+
const entry = await this.getCached(taskId);
|
|
57
|
+
return entry.task;
|
|
58
|
+
}
|
|
59
|
+
async getCached(taskId) {
|
|
60
|
+
const key = taskId.trim();
|
|
61
|
+
if (!key) {
|
|
62
|
+
throw new CliError({ exitCode: 2, code: "E_USAGE", message: "task id is required" });
|
|
63
|
+
}
|
|
64
|
+
const existing = this.cache.get(key);
|
|
65
|
+
if (existing)
|
|
66
|
+
return await existing;
|
|
67
|
+
const load = (async () => {
|
|
68
|
+
// For now, TaskStore does file-based caching. Non-file backends can still rely on
|
|
69
|
+
// backend.getTask/writeTask elsewhere, but lifecycle/status commands in this repo
|
|
70
|
+
// operate on the local task README files.
|
|
71
|
+
return await readTaskReadmeCached({ ctx: this.ctx, taskId: key });
|
|
72
|
+
})();
|
|
73
|
+
this.cache.set(key, load);
|
|
74
|
+
return await load;
|
|
75
|
+
}
|
|
76
|
+
async update(taskId, updater) {
|
|
77
|
+
// One retry on concurrent modification: re-read latest and re-apply updater.
|
|
78
|
+
for (let attempt = 0; attempt < 2; attempt++) {
|
|
79
|
+
const entry = await this.getCached(taskId);
|
|
80
|
+
const current = entry.task;
|
|
81
|
+
const next = await updater({ ...current });
|
|
82
|
+
// Start from existing frontmatter to preserve any unknown keys.
|
|
83
|
+
const frontmatter = { ...entry.parsed.frontmatter, ...taskDataToFrontmatter(next) };
|
|
84
|
+
let body = entry.parsed.body ?? "";
|
|
85
|
+
const existingDoc = extractTaskDoc(body);
|
|
86
|
+
const now = new Date().toISOString();
|
|
87
|
+
if (next.doc !== undefined) {
|
|
88
|
+
const nextDoc = String(next.doc ?? "");
|
|
89
|
+
body = mergeTaskDoc(body, nextDoc);
|
|
90
|
+
if (docChanged(existingDoc, nextDoc) || !frontmatter.doc_updated_at) {
|
|
91
|
+
frontmatter.doc_version = 2;
|
|
92
|
+
frontmatter.doc_updated_at = now;
|
|
93
|
+
frontmatter.doc_updated_by = resolveDocUpdatedBy(next);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (frontmatter.doc_version !== 2)
|
|
97
|
+
frontmatter.doc_version = 2;
|
|
98
|
+
if (typeof frontmatter.doc_updated_at !== "string" ||
|
|
99
|
+
frontmatter.doc_updated_at.trim() === "") {
|
|
100
|
+
frontmatter.doc_updated_at = now;
|
|
101
|
+
}
|
|
102
|
+
if (typeof frontmatter.doc_updated_by !== "string" ||
|
|
103
|
+
frontmatter.doc_updated_by.trim() === "") {
|
|
104
|
+
frontmatter.doc_updated_by = resolveDocUpdatedBy(next);
|
|
105
|
+
}
|
|
106
|
+
const rendered = renderTaskReadme(frontmatter, body);
|
|
107
|
+
try {
|
|
108
|
+
await ensureUnchangedOnDisk({
|
|
109
|
+
readmePath: entry.readmePath,
|
|
110
|
+
expectedMtimeMs: entry.mtimeMs,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
if (attempt === 0 && err instanceof CliError) {
|
|
115
|
+
// Refresh cache and retry once.
|
|
116
|
+
this.cache.delete(taskId);
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
throw err;
|
|
120
|
+
}
|
|
121
|
+
const nextText = rendered.endsWith("\n") ? rendered : `${rendered}\n`;
|
|
122
|
+
const changed = await writeTextIfChanged(entry.readmePath, nextText);
|
|
123
|
+
// Refresh cache with latest content on disk.
|
|
124
|
+
this.cache.set(taskId, (async () => {
|
|
125
|
+
return await readTaskReadmeCached({ ctx: this.ctx, taskId });
|
|
126
|
+
})());
|
|
127
|
+
const updated = await this.get(taskId);
|
|
128
|
+
return { changed, task: updated };
|
|
129
|
+
}
|
|
130
|
+
// Unreachable, but keeps TS happy.
|
|
131
|
+
const task = await this.get(taskId);
|
|
132
|
+
return { changed: false, task };
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
export function getTaskStore(ctx) {
|
|
136
|
+
const memo = ctx.memo;
|
|
137
|
+
memo.taskStore ??= new TaskStore(ctx);
|
|
138
|
+
return memo.taskStore;
|
|
139
|
+
}
|
|
140
|
+
export function backendIsLocalFileBackend(ctx) {
|
|
141
|
+
return ctx.taskBackend instanceof LocalBackend;
|
|
142
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CommandCtx, CommandSpec } from "../cli/spec/spec.js";
|
|
2
|
+
import type { CommandContext } from "./shared/task-backend.js";
|
|
3
|
+
export type StartParsed = {
|
|
4
|
+
taskId: string;
|
|
5
|
+
author: string;
|
|
6
|
+
body: string;
|
|
7
|
+
commitFromComment: boolean;
|
|
8
|
+
commitEmoji?: string;
|
|
9
|
+
commitAllow: string[];
|
|
10
|
+
commitAutoAllow: boolean;
|
|
11
|
+
commitAllowTasks: boolean;
|
|
12
|
+
commitRequireClean: boolean;
|
|
13
|
+
confirmStatusCommit: boolean;
|
|
14
|
+
force: boolean;
|
|
15
|
+
quiet: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare const startSpec: CommandSpec<StartParsed>;
|
|
18
|
+
export declare function makeRunStartHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: StartParsed) => Promise<number>;
|
|
19
|
+
//# sourceMappingURL=start.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start.command.d.ts","sourceRoot":"","sources":["../../src/commands/start.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAI/D,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAQF,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,WAAW,CAmH9C,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACpE,KAAK,UAAU,EAAE,GAAG,WAAW,KAAG,OAAO,CAAC,MAAM,CAAC,CAmBhE"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { usageError } from "../cli/spec/errors.js";
|
|
2
|
+
import { cmdStart } from "./task/start.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 startSpec = {
|
|
11
|
+
id: ["start"],
|
|
12
|
+
group: "Lifecycle",
|
|
13
|
+
summary: "Transition a task to DOING and record a structured Start comment.",
|
|
14
|
+
args: [
|
|
15
|
+
{
|
|
16
|
+
name: "task-id",
|
|
17
|
+
required: true,
|
|
18
|
+
valueHint: "<task-id>",
|
|
19
|
+
description: "Existing task id.",
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
options: [
|
|
23
|
+
{
|
|
24
|
+
kind: "string",
|
|
25
|
+
name: "author",
|
|
26
|
+
valueHint: "<id>",
|
|
27
|
+
required: true,
|
|
28
|
+
description: "Comment author id (e.g. CODER).",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
kind: "string",
|
|
32
|
+
name: "body",
|
|
33
|
+
valueHint: "<text>",
|
|
34
|
+
required: true,
|
|
35
|
+
description: "Structured comment body (must match the configured Start: prefix).",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
kind: "boolean",
|
|
39
|
+
name: "commit-from-comment",
|
|
40
|
+
default: false,
|
|
41
|
+
description: "Create a status commit using the comment body.",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
kind: "string",
|
|
45
|
+
name: "commit-emoji",
|
|
46
|
+
valueHint: "<emoji>",
|
|
47
|
+
description: "Override the status commit emoji (used with --commit-from-comment).",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
kind: "string",
|
|
51
|
+
name: "commit-allow",
|
|
52
|
+
valueHint: "<path-prefix>",
|
|
53
|
+
repeatable: true,
|
|
54
|
+
description: "Repeatable. Allowlist path prefixes to stage for the status commit (used with --commit-from-comment).",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
kind: "boolean",
|
|
58
|
+
name: "commit-auto-allow",
|
|
59
|
+
default: false,
|
|
60
|
+
description: "Auto-allow inferred allowlist paths if none are provided (used with --commit-from-comment).",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
kind: "boolean",
|
|
64
|
+
name: "commit-allow-tasks",
|
|
65
|
+
default: true,
|
|
66
|
+
hidden: true,
|
|
67
|
+
description: "Deprecated. Tasks are always allowed for status commits.",
|
|
68
|
+
deprecated: "no-op",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
kind: "boolean",
|
|
72
|
+
name: "commit-require-clean",
|
|
73
|
+
default: false,
|
|
74
|
+
description: "Require a clean working tree for the status commit (used with --commit-from-comment).",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
kind: "boolean",
|
|
78
|
+
name: "confirm-status-commit",
|
|
79
|
+
default: false,
|
|
80
|
+
description: "Confirm status commit creation when status_commit_policy=confirm (used with --commit-from-comment).",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
kind: "boolean",
|
|
84
|
+
name: "force",
|
|
85
|
+
default: false,
|
|
86
|
+
description: "Override readiness checks and status transition restrictions.",
|
|
87
|
+
},
|
|
88
|
+
{ kind: "boolean", name: "quiet", default: false, description: "Suppress output." },
|
|
89
|
+
],
|
|
90
|
+
examples: [
|
|
91
|
+
{
|
|
92
|
+
cmd: 'agentplane start 202602030608-F1Q8AB --author CODER --body "Start: implement spec-driven CLI"',
|
|
93
|
+
why: "Start work on a task.",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
cmd: 'agentplane start 202602030608-F1Q8AB --author CODER --body "Start: implement spec-driven CLI" --commit-from-comment --commit-allow packages/agentplane/src',
|
|
97
|
+
why: "Start work and create a status commit from the comment.",
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
validateRaw: (raw) => {
|
|
101
|
+
const author = typeof raw.opts.author === "string" ? raw.opts.author.trim() : "";
|
|
102
|
+
const body = typeof raw.opts.body === "string" ? raw.opts.body.trim() : "";
|
|
103
|
+
if (!author)
|
|
104
|
+
throw usageError({ spec: startSpec, message: "Invalid value for --author: empty." });
|
|
105
|
+
if (!body)
|
|
106
|
+
throw usageError({ spec: startSpec, message: "Invalid value for --body: empty." });
|
|
107
|
+
},
|
|
108
|
+
parse: (raw) => ({
|
|
109
|
+
taskId: typeof raw.args["task-id"] === "string" ? raw.args["task-id"] : "",
|
|
110
|
+
author: raw.opts.author,
|
|
111
|
+
body: raw.opts.body,
|
|
112
|
+
commitFromComment: raw.opts["commit-from-comment"] === true,
|
|
113
|
+
commitEmoji: raw.opts["commit-emoji"],
|
|
114
|
+
commitAllow: toStringList(raw.opts["commit-allow"]),
|
|
115
|
+
commitAutoAllow: raw.opts["commit-auto-allow"] === true,
|
|
116
|
+
commitAllowTasks: raw.opts["commit-allow-tasks"] !== false,
|
|
117
|
+
commitRequireClean: raw.opts["commit-require-clean"] === true,
|
|
118
|
+
confirmStatusCommit: raw.opts["confirm-status-commit"] === true,
|
|
119
|
+
force: raw.opts.force === true,
|
|
120
|
+
quiet: raw.opts.quiet === true,
|
|
121
|
+
}),
|
|
122
|
+
};
|
|
123
|
+
export function makeRunStartHandler(getCtx) {
|
|
124
|
+
return async (ctx, p) => {
|
|
125
|
+
return await cmdStart({
|
|
126
|
+
ctx: await getCtx("start"),
|
|
127
|
+
cwd: ctx.cwd,
|
|
128
|
+
rootOverride: ctx.rootOverride,
|
|
129
|
+
taskId: p.taskId,
|
|
130
|
+
author: p.author,
|
|
131
|
+
body: p.body,
|
|
132
|
+
commitFromComment: p.commitFromComment,
|
|
133
|
+
commitEmoji: p.commitEmoji,
|
|
134
|
+
commitAllow: p.commitAllow,
|
|
135
|
+
commitAutoAllow: p.commitAutoAllow,
|
|
136
|
+
commitAllowTasks: p.commitAllowTasks,
|
|
137
|
+
commitRequireClean: p.commitRequireClean,
|
|
138
|
+
confirmStatusCommit: p.confirmStatusCommit,
|
|
139
|
+
force: p.force,
|
|
140
|
+
quiet: p.quiet,
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CommandCtx, CommandSpec } from "../cli/spec/spec.js";
|
|
2
|
+
import type { CommandContext } from "./shared/task-backend.js";
|
|
3
|
+
import { type SyncParsed } from "./backend.js";
|
|
4
|
+
export declare const syncSpec: CommandSpec<SyncParsed>;
|
|
5
|
+
export declare function makeRunSyncHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: SyncParsed) => Promise<number>;
|
|
6
|
+
//# sourceMappingURL=sync.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.command.d.ts","sourceRoot":"","sources":["../../src/commands/sync.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE9D,eAAO,MAAM,QAAQ,EAAE,WAAW,CAAC,UAAU,CA6C5C,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACnE,KAAK,UAAU,EAAE,GAAG,UAAU,KAAG,OAAO,CAAC,MAAM,CAAC,CAS/D"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { cmdSyncParsed } from "./backend.js";
|
|
2
|
+
export const syncSpec = {
|
|
3
|
+
id: ["sync"],
|
|
4
|
+
group: "Backend",
|
|
5
|
+
summary: "Sync the configured backend (alias).",
|
|
6
|
+
description: "Alias for backend sync using the configured backend id. Optionally pass an explicit backend id.",
|
|
7
|
+
args: [
|
|
8
|
+
{
|
|
9
|
+
name: "id",
|
|
10
|
+
required: false,
|
|
11
|
+
valueHint: "<id>",
|
|
12
|
+
description: "Optional backend id (must match configured backend id).",
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
kind: "string",
|
|
18
|
+
name: "direction",
|
|
19
|
+
valueHint: "<push|pull>",
|
|
20
|
+
choices: ["push", "pull"],
|
|
21
|
+
default: "push",
|
|
22
|
+
description: "Sync direction (default: push).",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
kind: "string",
|
|
26
|
+
name: "conflict",
|
|
27
|
+
valueHint: "<diff|prefer-local|prefer-remote|fail>",
|
|
28
|
+
choices: ["diff", "prefer-local", "prefer-remote", "fail"],
|
|
29
|
+
default: "diff",
|
|
30
|
+
description: "Conflict handling policy (default: diff).",
|
|
31
|
+
},
|
|
32
|
+
{ kind: "boolean", name: "yes", default: false, description: "Auto-approve network access." },
|
|
33
|
+
{ kind: "boolean", name: "quiet", default: false, description: "Reduce output noise." },
|
|
34
|
+
],
|
|
35
|
+
examples: [
|
|
36
|
+
{ cmd: "agentplane sync --direction pull", why: "Pull from backend (configured backend id)." },
|
|
37
|
+
{ cmd: "agentplane sync redmine --direction push --yes", why: "Push to redmine backend." },
|
|
38
|
+
],
|
|
39
|
+
parse: (raw) => ({
|
|
40
|
+
backendId: raw.args.id ? String(raw.args.id) : null,
|
|
41
|
+
direction: (raw.opts.direction ?? "push"),
|
|
42
|
+
conflict: (raw.opts.conflict ?? "diff"),
|
|
43
|
+
yes: raw.opts.yes === true,
|
|
44
|
+
quiet: raw.opts.quiet === true,
|
|
45
|
+
}),
|
|
46
|
+
};
|
|
47
|
+
export function makeRunSyncHandler(getCtx) {
|
|
48
|
+
return async (ctx, p) => {
|
|
49
|
+
const commandCtx = await getCtx("sync");
|
|
50
|
+
return await cmdSyncParsed({
|
|
51
|
+
ctx: commandCtx,
|
|
52
|
+
cwd: ctx.cwd,
|
|
53
|
+
rootOverride: ctx.rootOverride,
|
|
54
|
+
flags: p,
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CommandCtx, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import type { CommandContext } from "../shared/task-backend.js";
|
|
3
|
+
export type TaskAddParsed = {
|
|
4
|
+
taskIds: string[];
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
status: "TODO" | "DOING" | "DONE" | "BLOCKED";
|
|
8
|
+
priority: "low" | "normal" | "med" | "high";
|
|
9
|
+
owner: string;
|
|
10
|
+
tags: string[];
|
|
11
|
+
dependsOn: string[];
|
|
12
|
+
verify: string[];
|
|
13
|
+
commentAuthor: string | null;
|
|
14
|
+
commentBody: string | null;
|
|
15
|
+
};
|
|
16
|
+
export declare const taskAddSpec: CommandSpec<TaskAddParsed>;
|
|
17
|
+
export declare function makeRunTaskAddHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: TaskAddParsed) => Promise<number>;
|
|
18
|
+
//# sourceMappingURL=add.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/add.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAKhE,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC9C,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAQF,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,aAAa,CAmIlD,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACtE,KAAK,UAAU,EAAE,GAAG,aAAa,KAAG,OAAO,CAAC,MAAM,CAAC,CAkBlE"}
|