agentplane 0.3.7 → 0.3.8
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/assets/AGENTS.md +11 -1
- package/assets/RUNNER.md +17 -0
- package/bin/agentplane.js +16 -7
- package/bin/framework-dev-contract.d.ts +6 -0
- package/bin/framework-dev-contract.js +13 -0
- package/bin/stale-dist-policy.js +6 -1
- package/dist/.build-manifest.json +694 -339
- package/dist/adapters/task-backend/task-backend-adapter.d.ts +3 -1
- package/dist/adapters/task-backend/task-backend-adapter.d.ts.map +1 -1
- package/dist/adapters/task-backend/task-backend-adapter.js +13 -0
- package/dist/backends/task-backend/local-backend-doc.d.ts +5 -0
- package/dist/backends/task-backend/local-backend-doc.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-doc.js +98 -0
- package/dist/backends/task-backend/local-backend-read.d.ts +7 -0
- package/dist/backends/task-backend/local-backend-read.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-read.js +186 -0
- package/dist/backends/task-backend/local-backend-state.d.ts +17 -0
- package/dist/backends/task-backend/local-backend-state.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-state.js +50 -0
- package/dist/backends/task-backend/local-backend-write.d.ts +15 -0
- package/dist/backends/task-backend/local-backend-write.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-write.js +254 -0
- package/dist/backends/task-backend/local-backend.d.ts +4 -2
- package/dist/backends/task-backend/local-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend.js +26 -403
- package/dist/backends/task-backend/redmine/backend-cache-doc.d.ts +40 -0
- package/dist/backends/task-backend/redmine/backend-cache-doc.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-cache-doc.js +178 -0
- package/dist/backends/task-backend/redmine/backend-report.d.ts +10 -0
- package/dist/backends/task-backend/redmine/backend-report.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-report.js +43 -0
- package/dist/backends/task-backend/redmine/backend-sync.d.ts +67 -0
- package/dist/backends/task-backend/redmine/backend-sync.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-sync.js +367 -0
- package/dist/backends/task-backend/redmine/mapping.d.ts +2 -1
- package/dist/backends/task-backend/redmine/mapping.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/mapping.js +12 -2
- package/dist/backends/task-backend/redmine/parse.d.ts +2 -1
- package/dist/backends/task-backend/redmine/parse.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/parse.js +5 -3
- package/dist/backends/task-backend/redmine/state.d.ts +2 -0
- package/dist/backends/task-backend/redmine/state.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/state.js +15 -1
- package/dist/backends/task-backend/redmine-backend.d.ts +5 -2
- package/dist/backends/task-backend/redmine-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine-backend.js +88 -536
- package/dist/backends/task-backend/shared/constants.d.ts +2 -1
- package/dist/backends/task-backend/shared/constants.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/doc.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/doc.js +25 -39
- package/dist/backends/task-backend/shared/export.d.ts +2 -9
- package/dist/backends/task-backend/shared/export.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/export.js +73 -8
- package/dist/backends/task-backend/shared/normalize.d.ts +5 -1
- package/dist/backends/task-backend/shared/normalize.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/normalize.js +166 -0
- package/dist/backends/task-backend/shared/record.d.ts +1 -1
- package/dist/backends/task-backend/shared/record.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/record.js +7 -2
- package/dist/backends/task-backend/shared/types.d.ts +38 -36
- package/dist/backends/task-backend/shared/types.d.ts.map +1 -1
- package/dist/backends/task-backend/shared.d.ts +2 -2
- package/dist/backends/task-backend/shared.d.ts.map +1 -1
- package/dist/backends/task-backend/shared.js +1 -1
- package/dist/backends/task-backend.d.ts +1 -1
- package/dist/backends/task-backend.d.ts.map +1 -1
- package/dist/backends/task-backend.js +1 -1
- package/dist/backends/task-index.d.ts +2 -2
- package/dist/backends/task-index.d.ts.map +1 -1
- package/dist/backends/task-index.js +9 -6
- package/dist/cli/bootstrap-guide.d.ts +2 -2
- package/dist/cli/bootstrap-guide.d.ts.map +1 -1
- package/dist/cli/bootstrap-guide.js +10 -10
- package/dist/cli/command-guide.d.ts.map +1 -1
- package/dist/cli/command-guide.js +11 -9
- package/dist/cli/command-invocations.d.ts +4 -0
- package/dist/cli/command-invocations.d.ts.map +1 -0
- package/dist/cli/command-invocations.js +35 -0
- package/dist/cli/command-snippets.d.ts +12 -8
- package/dist/cli/command-snippets.d.ts.map +1 -1
- package/dist/cli/command-snippets.js +14 -8
- package/dist/cli/exit-codes.d.ts.map +1 -1
- package/dist/cli/exit-codes.js +1 -0
- package/dist/cli/group-command.d.ts +18 -0
- package/dist/cli/group-command.d.ts.map +1 -0
- package/dist/cli/group-command.js +45 -0
- package/dist/cli/output.d.ts +29 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +76 -0
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +5 -1
- package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/core.js +38 -29
- package/dist/cli/run-cli/command-catalog/lifecycle.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/lifecycle.js +9 -6
- package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/project.js +8 -6
- package/dist/cli/run-cli/command-catalog/shared.d.ts +12 -3
- package/dist/cli/run-cli/command-catalog/shared.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/shared.js +6 -3
- package/dist/cli/run-cli/command-catalog/task.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/task.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/task.js +46 -11
- package/dist/cli/run-cli/command-catalog.d.ts +11 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog.js +29 -0
- package/dist/cli/run-cli/commands/config.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/config.js +52 -6
- package/dist/cli/run-cli/commands/core/agent-profiles.d.ts +34 -0
- package/dist/cli/run-cli/commands/core/agent-profiles.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/agent-profiles.js +97 -0
- package/dist/cli/run-cli/commands/core/agents.d.ts +7 -0
- package/dist/cli/run-cli/commands/core/agents.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/agents.js +97 -0
- package/dist/cli/run-cli/commands/core/preflight.d.ts +10 -0
- package/dist/cli/run-cli/commands/core/preflight.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/preflight.js +286 -0
- package/dist/cli/run-cli/commands/core/quickstart.d.ts +8 -0
- package/dist/cli/run-cli/commands/core/quickstart.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/quickstart.js +43 -0
- package/dist/cli/run-cli/commands/core/role.d.ts +9 -0
- package/dist/cli/run-cli/commands/core/role.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/role.js +128 -0
- package/dist/cli/run-cli/commands/core.d.ts +4 -24
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core.js +4 -630
- package/dist/cli/run-cli/error-guidance.js +10 -0
- package/dist/cli/run-cli/globals.d.ts +5 -2
- package/dist/cli/run-cli/globals.d.ts.map +1 -1
- package/dist/cli/run-cli/globals.js +82 -86
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +137 -100
- package/dist/cli/run-cli.test-helpers.d.ts +21 -0
- package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
- package/dist/cli/run-cli.test-helpers.js +88 -4
- package/dist/cli/spec/help.d.ts +10 -2
- package/dist/cli/spec/help.d.ts.map +1 -1
- package/dist/cli/spec/help.js +7 -5
- package/dist/cli/spec/registry.d.ts +27 -1
- package/dist/cli/spec/registry.d.ts.map +1 -1
- package/dist/cli/spec/registry.js +98 -25
- package/dist/commands/backend/sync.command.d.ts +3 -5
- package/dist/commands/backend/sync.command.d.ts.map +1 -1
- package/dist/commands/backend/sync.command.js +9 -12
- package/dist/commands/backend.d.ts.map +1 -1
- package/dist/commands/backend.js +8 -7
- package/dist/commands/branch/base.command.d.ts +2 -3
- package/dist/commands/branch/base.command.d.ts.map +1 -1
- package/dist/commands/branch/base.command.js +8 -12
- package/dist/commands/branch/base.d.ts.map +1 -1
- package/dist/commands/branch/base.js +11 -7
- package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
- package/dist/commands/branch/cleanup-merged.js +9 -8
- package/dist/commands/branch/remove.d.ts.map +1 -1
- package/dist/commands/branch/remove.js +4 -3
- package/dist/commands/branch/status.d.ts.map +1 -1
- package/dist/commands/branch/status.js +4 -3
- package/dist/commands/branch/work-start.d.ts.map +1 -1
- package/dist/commands/branch/work-start.js +48 -5
- package/dist/commands/cleanup/merged.command.d.ts +2 -3
- package/dist/commands/cleanup/merged.command.d.ts.map +1 -1
- package/dist/commands/cleanup/merged.command.js +8 -12
- package/dist/commands/docs/cli.command.js +2 -2
- package/dist/commands/doctor/runtime.js +1 -1
- package/dist/commands/doctor/workflow.d.ts.map +1 -1
- package/dist/commands/doctor/workflow.js +10 -1
- package/dist/commands/finish.spec.d.ts.map +1 -1
- package/dist/commands/finish.spec.js +7 -0
- package/dist/commands/guard/guard.command.d.ts +3 -3
- package/dist/commands/guard/guard.command.d.ts.map +1 -1
- package/dist/commands/guard/guard.command.js +9 -14
- package/dist/commands/guard/impl/commands.d.ts +2 -0
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +55 -7
- package/dist/commands/guard/impl/policy.d.ts +1 -0
- package/dist/commands/guard/impl/policy.d.ts.map +1 -1
- package/dist/commands/guard/impl/policy.js +9 -6
- package/dist/commands/hooks/hooks.command.d.ts +3 -3
- package/dist/commands/hooks/hooks.command.d.ts.map +1 -1
- package/dist/commands/hooks/hooks.command.js +9 -11
- package/dist/commands/pr/check.d.ts.map +1 -1
- package/dist/commands/pr/check.js +90 -18
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
- package/dist/commands/pr/integrate/cmd.js +31 -3
- package/dist/commands/pr/integrate/internal/cleanup.d.ts +12 -0
- package/dist/commands/pr/integrate/internal/cleanup.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/cleanup.js +46 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts +4 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/finalize.js +34 -40
- package/dist/commands/pr/integrate/internal/merge.d.ts +6 -0
- package/dist/commands/pr/integrate/internal/merge.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/merge.js +92 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts +1 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/prepare.js +1 -0
- package/dist/commands/pr/integrate/verify.d.ts.map +1 -1
- package/dist/commands/pr/integrate/verify.js +4 -3
- package/dist/commands/pr/note.d.ts.map +1 -1
- package/dist/commands/pr/note.js +3 -2
- package/dist/commands/pr/open.d.ts.map +1 -1
- package/dist/commands/pr/open.js +9 -12
- package/dist/commands/pr/pr.command.d.ts +3 -4
- package/dist/commands/pr/pr.command.d.ts.map +1 -1
- package/dist/commands/pr/pr.command.js +6 -11
- package/dist/commands/pr/update.d.ts.map +1 -1
- package/dist/commands/pr/update.js +5 -10
- package/dist/commands/recipes/cache.command.d.ts +3 -4
- package/dist/commands/recipes/cache.command.d.ts.map +1 -1
- package/dist/commands/recipes/cache.command.js +8 -26
- package/dist/commands/recipes/impl/apply.d.ts +1 -1
- package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
- package/dist/commands/recipes/impl/apply.js +1 -1
- package/dist/commands/recipes/impl/commands/explain.js +1 -1
- package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/install.js +1 -2
- package/dist/commands/recipes/impl/installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/installed-recipes.js +1 -2
- package/dist/commands/recipes/impl/manifest.d.ts.map +1 -1
- package/dist/commands/recipes/impl/manifest.js +0 -10
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.js +1 -2
- package/dist/commands/recipes/impl/resolver.d.ts +1 -1
- package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
- package/dist/commands/recipes/impl/resolver.js +26 -16
- package/dist/commands/recipes/impl/scenario.d.ts.map +1 -1
- package/dist/commands/recipes/impl/scenario.js +80 -0
- package/dist/commands/recipes/impl/types.d.ts +27 -13
- package/dist/commands/recipes/impl/types.d.ts.map +1 -1
- package/dist/commands/recipes/recipes.command.d.ts +3 -4
- package/dist/commands/recipes/recipes.command.d.ts.map +1 -1
- package/dist/commands/recipes/recipes.command.js +8 -34
- package/dist/commands/recipes.d.ts +4 -4
- package/dist/commands/recipes.d.ts.map +1 -1
- package/dist/commands/recipes.js +3 -3
- package/dist/commands/recipes.test-helpers.d.ts +17 -0
- package/dist/commands/recipes.test-helpers.d.ts.map +1 -1
- package/dist/commands/recipes.test-helpers.js +56 -2
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +77 -56
- package/dist/commands/release/plan.command.d.ts.map +1 -1
- package/dist/commands/release/plan.command.js +7 -3
- package/dist/commands/release/release.command.d.ts +3 -3
- package/dist/commands/release/release.command.d.ts.map +1 -1
- package/dist/commands/release/release.command.js +9 -11
- package/dist/commands/release.test-helpers.d.ts +20 -0
- package/dist/commands/release.test-helpers.d.ts.map +1 -0
- package/dist/commands/release.test-helpers.js +37 -0
- package/dist/commands/runtime.command.d.ts +7 -7
- package/dist/commands/runtime.command.d.ts.map +1 -1
- package/dist/commands/runtime.command.js +29 -33
- package/dist/commands/scenario/execute.command.d.ts +8 -0
- package/dist/commands/scenario/execute.command.d.ts.map +1 -0
- package/dist/commands/scenario/execute.command.js +117 -0
- package/dist/commands/scenario/impl/commands.d.ts.map +1 -1
- package/dist/commands/scenario/impl/commands.js +45 -32
- package/dist/commands/scenario/run.command.js +2 -2
- package/dist/commands/scenario/scenario.command.d.ts +3 -4
- package/dist/commands/scenario/scenario.command.d.ts.map +1 -1
- package/dist/commands/scenario/scenario.command.js +8 -26
- package/dist/commands/shared/git-context.d.ts +1 -0
- package/dist/commands/shared/git-context.d.ts.map +1 -1
- package/dist/commands/shared/git-context.js +4 -2
- package/dist/commands/shared/git-ops.d.ts +1 -0
- package/dist/commands/shared/git-ops.d.ts.map +1 -1
- package/dist/commands/shared/git-ops.js +13 -0
- package/dist/commands/shared/operator-pipeline.d.ts +10 -0
- package/dist/commands/shared/operator-pipeline.d.ts.map +1 -0
- package/dist/commands/shared/operator-pipeline.js +16 -0
- package/dist/commands/shared/pr-meta.d.ts +32 -12
- package/dist/commands/shared/pr-meta.d.ts.map +1 -1
- package/dist/commands/shared/pr-meta.js +49 -14
- package/dist/commands/shared/reconcile-check.d.ts.map +1 -1
- package/dist/commands/shared/reconcile-check.js +28 -3
- package/dist/commands/shared/task-backend.d.ts +10 -6
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +99 -25
- package/dist/commands/shared/task-handoff.d.ts +64 -0
- package/dist/commands/shared/task-handoff.d.ts.map +1 -0
- package/dist/commands/shared/task-handoff.js +151 -0
- package/dist/commands/shared/task-mutation.d.ts +36 -0
- package/dist/commands/shared/task-mutation.d.ts.map +1 -0
- package/dist/commands/shared/task-mutation.js +67 -0
- package/dist/commands/shared/task-store.d.ts +5 -1
- package/dist/commands/shared/task-store.d.ts.map +1 -1
- package/dist/commands/shared/task-store.js +72 -92
- package/dist/commands/task/add.d.ts.map +1 -1
- package/dist/commands/task/add.js +41 -39
- package/dist/commands/task/block.d.ts.map +1 -1
- package/dist/commands/task/block.js +31 -110
- package/dist/commands/task/close-duplicate.d.ts.map +1 -1
- package/dist/commands/task/close-duplicate.js +0 -7
- package/dist/commands/task/close-noop.d.ts.map +1 -1
- package/dist/commands/task/close-noop.js +0 -21
- package/dist/commands/task/close-shared.d.ts +0 -2
- package/dist/commands/task/close-shared.d.ts.map +1 -1
- package/dist/commands/task/close-shared.js +25 -55
- package/dist/commands/task/comment.d.ts.map +1 -1
- package/dist/commands/task/comment.js +48 -37
- package/dist/commands/task/derive.d.ts.map +1 -1
- package/dist/commands/task/derive.js +14 -7
- package/dist/commands/task/doc.command.d.ts.map +1 -1
- package/dist/commands/task/doc.command.js +7 -6
- package/dist/commands/task/doc.d.ts.map +1 -1
- package/dist/commands/task/doc.js +58 -62
- package/dist/commands/task/finish-shared.d.ts +60 -0
- package/dist/commands/task/finish-shared.d.ts.map +1 -0
- package/dist/commands/task/finish-shared.js +181 -0
- package/dist/commands/task/finish.d.ts +1 -0
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +79 -210
- package/dist/commands/task/handoff-record.command.d.ts +17 -0
- package/dist/commands/task/handoff-record.command.d.ts.map +1 -0
- package/dist/commands/task/handoff-record.command.js +140 -0
- package/dist/commands/task/handoff-show.command.d.ts +8 -0
- package/dist/commands/task/handoff-show.command.d.ts.map +1 -0
- package/dist/commands/task/handoff-show.command.js +77 -0
- package/dist/commands/task/handoff.command.d.ts +7 -0
- package/dist/commands/task/handoff.command.d.ts.map +1 -0
- package/dist/commands/task/handoff.command.js +21 -0
- package/dist/commands/task/handoff.shared.d.ts +39 -0
- package/dist/commands/task/handoff.shared.d.ts.map +1 -0
- package/dist/commands/task/handoff.shared.js +134 -0
- package/dist/commands/task/hosted-close.command.d.ts +9 -0
- package/dist/commands/task/hosted-close.command.d.ts.map +1 -0
- package/dist/commands/task/hosted-close.command.js +190 -0
- package/dist/commands/task/hosted-merge-sync.d.ts +40 -0
- package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -0
- package/dist/commands/task/hosted-merge-sync.js +277 -0
- package/dist/commands/task/list.d.ts.map +1 -1
- package/dist/commands/task/list.js +7 -24
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +26 -6
- package/dist/commands/task/next.d.ts.map +1 -1
- package/dist/commands/task/next.js +10 -28
- package/dist/commands/task/normalize.command.d.ts +1 -0
- package/dist/commands/task/normalize.command.d.ts.map +1 -1
- package/dist/commands/task/normalize.command.js +12 -0
- package/dist/commands/task/normalize.d.ts +1 -0
- package/dist/commands/task/normalize.d.ts.map +1 -1
- package/dist/commands/task/normalize.js +21 -9
- package/dist/commands/task/plan.command.d.ts +3 -4
- package/dist/commands/task/plan.command.d.ts.map +1 -1
- package/dist/commands/task/plan.command.js +6 -12
- package/dist/commands/task/plan.d.ts.map +1 -1
- package/dist/commands/task/plan.js +96 -103
- package/dist/commands/task/reclaim.command.d.ts +11 -0
- package/dist/commands/task/reclaim.command.d.ts.map +1 -0
- package/dist/commands/task/reclaim.command.js +102 -0
- package/dist/commands/task/resume-context.command.d.ts +9 -0
- package/dist/commands/task/resume-context.command.d.ts.map +1 -0
- package/dist/commands/task/resume-context.command.js +60 -0
- package/dist/commands/task/run-cancel.command.d.ts +6 -0
- package/dist/commands/task/run-cancel.command.d.ts.map +1 -0
- package/dist/commands/task/run-cancel.command.js +45 -0
- package/dist/commands/task/run-cancel.spec.d.ts +7 -0
- package/dist/commands/task/run-cancel.spec.d.ts.map +1 -0
- package/dist/commands/task/run-cancel.spec.js +20 -0
- package/dist/commands/task/run-resume.command.d.ts +6 -0
- package/dist/commands/task/run-resume.command.d.ts.map +1 -0
- package/dist/commands/task/run-resume.command.js +55 -0
- package/dist/commands/task/run-resume.spec.d.ts +7 -0
- package/dist/commands/task/run-resume.spec.d.ts.map +1 -0
- package/dist/commands/task/run-resume.spec.js +20 -0
- package/dist/commands/task/run-retry.command.d.ts +6 -0
- package/dist/commands/task/run-retry.command.d.ts.map +1 -0
- package/dist/commands/task/run-retry.command.js +56 -0
- package/dist/commands/task/run-retry.spec.d.ts +7 -0
- package/dist/commands/task/run-retry.spec.d.ts.map +1 -0
- package/dist/commands/task/run-retry.spec.js +20 -0
- package/dist/commands/task/run-show.command.d.ts +6 -0
- package/dist/commands/task/run-show.command.d.ts.map +1 -0
- package/dist/commands/task/run-show.command.js +133 -0
- package/dist/commands/task/run-show.spec.d.ts +8 -0
- package/dist/commands/task/run-show.spec.d.ts.map +1 -0
- package/dist/commands/task/run-show.spec.js +44 -0
- package/dist/commands/task/run-tail.command.d.ts +6 -0
- package/dist/commands/task/run-tail.command.d.ts.map +1 -0
- package/dist/commands/task/run-tail.command.js +26 -0
- package/dist/commands/task/run-tail.spec.d.ts +8 -0
- package/dist/commands/task/run-tail.spec.d.ts.map +1 -0
- package/dist/commands/task/run-tail.spec.js +51 -0
- package/dist/commands/task/run-trace.command.d.ts +6 -0
- package/dist/commands/task/run-trace.command.d.ts.map +1 -0
- package/dist/commands/task/run-trace.command.js +25 -0
- package/dist/commands/task/run-trace.spec.d.ts +7 -0
- package/dist/commands/task/run-trace.spec.d.ts.map +1 -0
- package/dist/commands/task/run-trace.spec.js +31 -0
- package/dist/commands/task/run.command.d.ts +6 -0
- package/dist/commands/task/run.command.d.ts.map +1 -0
- package/dist/commands/task/run.command.js +74 -0
- package/dist/commands/task/run.spec.d.ts +7 -0
- package/dist/commands/task/run.spec.d.ts.map +1 -0
- package/dist/commands/task/run.spec.js +26 -0
- package/dist/commands/task/scaffold.d.ts.map +1 -1
- package/dist/commands/task/scaffold.js +4 -2
- package/dist/commands/task/scrub.d.ts.map +1 -1
- package/dist/commands/task/scrub.js +27 -24
- package/dist/commands/task/search.d.ts.map +1 -1
- package/dist/commands/task/search.js +21 -31
- package/dist/commands/task/set-status.d.ts.map +1 -1
- package/dist/commands/task/set-status.js +36 -152
- package/dist/commands/task/shared/dependencies.d.ts +4 -4
- package/dist/commands/task/shared/dependencies.d.ts.map +1 -1
- package/dist/commands/task/shared/dependencies.js +10 -2
- package/dist/commands/task/shared/docs.d.ts +6 -1
- package/dist/commands/task/shared/docs.d.ts.map +1 -1
- package/dist/commands/task/shared/docs.js +13 -0
- package/dist/commands/task/shared/listing.d.ts +16 -2
- package/dist/commands/task/shared/listing.d.ts.map +1 -1
- package/dist/commands/task/shared/listing.js +56 -0
- package/dist/commands/task/shared/transition-command.d.ts +15 -0
- package/dist/commands/task/shared/transition-command.d.ts.map +1 -0
- package/dist/commands/task/shared/transition-command.js +43 -0
- package/dist/commands/task/shared/transitions.d.ts +39 -0
- package/dist/commands/task/shared/transitions.d.ts.map +1 -1
- package/dist/commands/task/shared/transitions.js +62 -1
- package/dist/commands/task/shared/workflow-transition-service.d.ts +75 -0
- package/dist/commands/task/shared/workflow-transition-service.d.ts.map +1 -0
- package/dist/commands/task/shared/workflow-transition-service.js +226 -0
- package/dist/commands/task/shared.d.ts +5 -3
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +5 -3
- package/dist/commands/task/show.d.ts.map +1 -1
- package/dist/commands/task/show.js +37 -3
- package/dist/commands/task/start.d.ts.map +1 -1
- package/dist/commands/task/start.js +33 -119
- package/dist/commands/task/task.command.d.ts +3 -4
- package/dist/commands/task/task.command.d.ts.map +1 -1
- package/dist/commands/task/task.command.js +22 -37
- package/dist/commands/task/verify-record.d.ts.map +1 -1
- package/dist/commands/task/verify-record.js +16 -141
- package/dist/commands/task/verify.command.d.ts.map +1 -1
- package/dist/commands/task/verify.command.js +7 -6
- package/dist/commands/task.test-helpers.d.ts +13 -0
- package/dist/commands/task.test-helpers.d.ts.map +1 -0
- package/dist/commands/task.test-helpers.js +65 -0
- package/dist/commands/upgrade/materialize.d.ts +28 -0
- package/dist/commands/upgrade/materialize.d.ts.map +1 -0
- package/dist/commands/upgrade/materialize.js +154 -0
- package/dist/commands/upgrade/plan.d.ts +18 -0
- package/dist/commands/upgrade/plan.d.ts.map +1 -0
- package/dist/commands/upgrade/plan.js +219 -0
- package/dist/commands/upgrade/policy.d.ts +24 -0
- package/dist/commands/upgrade/policy.d.ts.map +1 -0
- package/dist/commands/upgrade/policy.js +182 -0
- package/dist/commands/upgrade/report.d.ts.map +1 -1
- package/dist/commands/upgrade/report.js +7 -5
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +154 -642
- package/dist/commands/workflow.command.d.ts +3 -4
- package/dist/commands/workflow.command.d.ts.map +1 -1
- package/dist/commands/workflow.command.js +8 -25
- package/dist/ports/task-backend-port.d.ts +3 -1
- package/dist/ports/task-backend-port.d.ts.map +1 -1
- package/dist/runner/adapters/codex.d.ts +9 -0
- package/dist/runner/adapters/codex.d.ts.map +1 -0
- package/dist/runner/adapters/codex.js +414 -0
- package/dist/runner/adapters/custom.d.ts +12 -0
- package/dist/runner/adapters/custom.d.ts.map +1 -0
- package/dist/runner/adapters/custom.js +512 -0
- package/dist/runner/adapters/index.d.ts +8 -0
- package/dist/runner/adapters/index.d.ts.map +1 -0
- package/dist/runner/adapters/index.js +15 -0
- package/dist/runner/adapters/recipe-run-profile.d.ts +8 -0
- package/dist/runner/adapters/recipe-run-profile.d.ts.map +1 -0
- package/dist/runner/adapters/recipe-run-profile.js +53 -0
- package/dist/runner/adapters/shared.d.ts +45 -0
- package/dist/runner/adapters/shared.d.ts.map +1 -0
- package/dist/runner/adapters/shared.js +58 -0
- package/dist/runner/artifacts.d.ts +31 -0
- package/dist/runner/artifacts.d.ts.map +1 -0
- package/dist/runner/artifacts.js +153 -0
- package/dist/runner/codex-approval-probe.d.ts +23 -0
- package/dist/runner/codex-approval-probe.d.ts.map +1 -0
- package/dist/runner/codex-approval-probe.js +55 -0
- package/dist/runner/codex-smoke.d.ts +11 -0
- package/dist/runner/codex-smoke.d.ts.map +1 -0
- package/dist/runner/codex-smoke.js +45 -0
- package/dist/runner/config.d.ts +6 -0
- package/dist/runner/config.d.ts.map +1 -0
- package/dist/runner/config.js +15 -0
- package/dist/runner/context/base-prompts.d.ts +10 -0
- package/dist/runner/context/base-prompts.d.ts.map +1 -0
- package/dist/runner/context/base-prompts.js +255 -0
- package/dist/runner/context/recipe-context.d.ts +17 -0
- package/dist/runner/context/recipe-context.d.ts.map +1 -0
- package/dist/runner/context/recipe-context.js +48 -0
- package/dist/runner/context/task-context.d.ts +24 -0
- package/dist/runner/context/task-context.d.ts.map +1 -0
- package/dist/runner/context/task-context.js +266 -0
- package/dist/runner/index.d.ts +12 -0
- package/dist/runner/index.d.ts.map +1 -0
- package/dist/runner/index.js +11 -0
- package/dist/runner/policy-decision.d.ts +12 -0
- package/dist/runner/policy-decision.d.ts.map +1 -0
- package/dist/runner/policy-decision.js +89 -0
- package/dist/runner/policy-display.d.ts +4 -0
- package/dist/runner/policy-display.d.ts.map +1 -0
- package/dist/runner/policy-display.js +41 -0
- package/dist/runner/process-supervision.d.ts +48 -0
- package/dist/runner/process-supervision.d.ts.map +1 -0
- package/dist/runner/process-supervision.js +490 -0
- package/dist/runner/result-manifest-policy.d.ts +9 -0
- package/dist/runner/result-manifest-policy.d.ts.map +1 -0
- package/dist/runner/result-manifest-policy.js +96 -0
- package/dist/runner/result-manifest.d.ts +30 -0
- package/dist/runner/result-manifest.d.ts.map +1 -0
- package/dist/runner/result-manifest.js +322 -0
- package/dist/runner/run-id.d.ts +2 -0
- package/dist/runner/run-id.d.ts.map +1 -0
- package/dist/runner/run-id.js +3 -0
- package/dist/runner/run-repository.d.ts +51 -0
- package/dist/runner/run-repository.d.ts.map +1 -0
- package/dist/runner/run-repository.js +222 -0
- package/dist/runner/task-run-paths.d.ts +19 -0
- package/dist/runner/task-run-paths.d.ts.map +1 -0
- package/dist/runner/task-run-paths.js +25 -0
- package/dist/runner/task-state.d.ts +9 -0
- package/dist/runner/task-state.d.ts.map +1 -0
- package/dist/runner/task-state.js +354 -0
- package/dist/runner/test-helpers.d.ts +30 -0
- package/dist/runner/test-helpers.d.ts.map +1 -0
- package/dist/runner/test-helpers.js +97 -0
- package/dist/runner/trace-artifacts.d.ts +14 -0
- package/dist/runner/trace-artifacts.d.ts.map +1 -0
- package/dist/runner/trace-artifacts.js +80 -0
- package/dist/runner/trace.d.ts +10 -0
- package/dist/runner/trace.d.ts.map +1 -0
- package/dist/runner/trace.js +37 -0
- package/dist/runner/types.d.ts +317 -0
- package/dist/runner/types.d.ts.map +1 -0
- package/dist/runner/types.js +3 -0
- package/dist/runner/usecases/scenario-materialize-task.d.ts +29 -0
- package/dist/runner/usecases/scenario-materialize-task.d.ts.map +1 -0
- package/dist/runner/usecases/scenario-materialize-task.js +151 -0
- package/dist/runner/usecases/task-run-inspect.d.ts +41 -0
- package/dist/runner/usecases/task-run-inspect.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-inspect.js +74 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.d.ts +10 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.js +172 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.d.ts +18 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.js +128 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.d.ts +45 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.js +172 -0
- package/dist/runner/usecases/task-run-lifecycle.d.ts +4 -0
- package/dist/runner/usecases/task-run-lifecycle.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle.js +2 -0
- package/dist/runner/usecases/task-run.d.ts +32 -0
- package/dist/runner/usecases/task-run.d.ts.map +1 -0
- package/dist/runner/usecases/task-run.js +278 -0
- package/dist/shared/agent-emoji.d.ts.map +1 -1
- package/dist/shared/agent-emoji.js +1 -0
- package/dist/shared/errors.d.ts +1 -1
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/guards.d.ts.map +1 -1
- package/dist/shared/guards.js +1 -0
- package/dist/shared/repo-cli-version.d.ts.map +1 -1
- package/dist/shared/repo-cli-version.js +7 -5
- package/dist/shared/task-doc-conflicts.d.ts +12 -0
- package/dist/shared/task-doc-conflicts.d.ts.map +1 -0
- package/dist/shared/task-doc-conflicts.js +40 -0
- package/dist/shared/task-doc-state.d.ts +10 -0
- package/dist/shared/task-doc-state.d.ts.map +1 -0
- package/dist/shared/task-doc-state.js +15 -0
- package/dist/test-helpers/fs.d.ts +2 -0
- package/dist/test-helpers/fs.d.ts.map +1 -0
- package/dist/test-helpers/fs.js +9 -0
- package/dist/usecases/context/resolve-context.d.ts +2 -0
- package/dist/usecases/context/resolve-context.d.ts.map +1 -1
- package/dist/usecases/context/resolve-context.js +4 -1
- package/dist/usecases/task/task-list-usecase.d.ts.map +1 -1
- package/dist/usecases/task/task-list-usecase.js +2 -8
- package/dist/workflow-runtime/fix.d.ts +9 -1
- package/dist/workflow-runtime/fix.d.ts.map +1 -1
- package/dist/workflow-runtime/fix.js +9 -1
- package/package.json +3 -2
- package/dist/backends/task-backend.test-helpers.d.ts +0 -4
- package/dist/backends/task-backend.test-helpers.d.ts.map +0 -1
- package/dist/backends/task-backend.test-helpers.js +0 -33
- package/dist/cli/run-cli/catalog.d.ts +0 -7
- package/dist/cli/run-cli/catalog.d.ts.map +0 -1
- package/dist/cli/run-cli/catalog.js +0 -22
- package/dist/cli/run-cli.core.pr-flow.test-helpers.d.ts +0 -3
- package/dist/cli/run-cli.core.pr-flow.test-helpers.d.ts.map +0 -1
- package/dist/cli/run-cli.core.pr-flow.test-helpers.js +0 -41
- package/dist/cli/run-cli.core.tasks.test-helpers.d.ts +0 -2
- package/dist/cli/run-cli.core.tasks.test-helpers.d.ts.map +0 -1
- package/dist/cli/run-cli.core.tasks.test-helpers.js +0 -6
- package/dist/commands/block.command.d.ts +0 -4
- package/dist/commands/block.command.d.ts.map +0 -1
- package/dist/commands/block.command.js +0 -2
- package/dist/commands/doctor.command.d.ts +0 -3
- package/dist/commands/doctor.command.d.ts.map +0 -1
- package/dist/commands/doctor.command.js +0 -2
- package/dist/commands/finish.command.d.ts +0 -4
- package/dist/commands/finish.command.d.ts.map +0 -1
- package/dist/commands/finish.command.js +0 -2
- package/dist/commands/recipes/install.command.d.ts +0 -3
- package/dist/commands/recipes/install.command.d.ts.map +0 -1
- package/dist/commands/recipes/install.command.js +0 -2
- package/dist/commands/start.command.d.ts +0 -4
- package/dist/commands/start.command.d.ts.map +0 -1
- package/dist/commands/start.command.js +0 -2
- package/dist/commands/task/list.command.d.ts +0 -4
- package/dist/commands/task/list.command.d.ts.map +0 -1
- package/dist/commands/task/list.command.js +0 -2
- package/dist/commands/task/next.command.d.ts +0 -4
- package/dist/commands/task/next.command.d.ts.map +0 -1
- package/dist/commands/task/next.command.js +0 -2
- package/dist/commands/task/search.command.d.ts +0 -4
- package/dist/commands/task/search.command.d.ts.map +0 -1
- package/dist/commands/task/search.command.js +0 -2
- package/dist/commands/task/show.command.d.ts +0 -4
- package/dist/commands/task/show.command.d.ts.map +0 -1
- package/dist/commands/task/show.command.js +0 -2
- package/dist/commands/verify.command.d.ts +0 -4
- package/dist/commands/verify.command.d.ts.map +0 -1
- package/dist/commands/verify.command.js +0 -2
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { clearPinnedBaseBranch, getPinnedBaseBranch, loadConfig, resolveBaseBranch, resolveProject, setPinnedBaseBranch, } from "@agentplaneorg/core";
|
|
2
2
|
import { mapCoreError } from "../../cli/error-map.js";
|
|
3
|
+
import { createCliEmitter } from "../../cli/output.js";
|
|
3
4
|
import { CliError } from "../../shared/errors.js";
|
|
4
5
|
import { gitBranchExists, gitCurrentBranch } from "../shared/git-ops.js";
|
|
6
|
+
const output = createCliEmitter();
|
|
5
7
|
export async function cmdBranchBaseGet(opts) {
|
|
6
8
|
try {
|
|
7
9
|
const pinned = await getPinnedBaseBranch({
|
|
@@ -15,7 +17,7 @@ export async function cmdBranchBaseGet(opts) {
|
|
|
15
17
|
message: "Base branch is not pinned (use `agentplane branch base set`).",
|
|
16
18
|
});
|
|
17
19
|
}
|
|
18
|
-
|
|
20
|
+
output.line(pinned);
|
|
19
21
|
return 0;
|
|
20
22
|
}
|
|
21
23
|
catch (err) {
|
|
@@ -47,7 +49,7 @@ export async function cmdBranchBaseSet(opts) {
|
|
|
47
49
|
rootOverride: opts.rootOverride ?? null,
|
|
48
50
|
value: nextValue,
|
|
49
51
|
});
|
|
50
|
-
|
|
52
|
+
output.line(value);
|
|
51
53
|
return 0;
|
|
52
54
|
}
|
|
53
55
|
catch (err) {
|
|
@@ -60,7 +62,7 @@ export async function cmdBranchBaseClear(opts) {
|
|
|
60
62
|
cwd: opts.cwd,
|
|
61
63
|
rootOverride: opts.rootOverride ?? null,
|
|
62
64
|
});
|
|
63
|
-
|
|
65
|
+
output.line(cleared ? "cleared" : "no-op");
|
|
64
66
|
return 0;
|
|
65
67
|
}
|
|
66
68
|
catch (err) {
|
|
@@ -98,12 +100,14 @@ export async function cmdBranchBaseExplain(opts) {
|
|
|
98
100
|
if (effective && !(await gitBranchExists(resolved.gitRoot, effective))) {
|
|
99
101
|
warnings.push(`Effective base branch not found: ${effective}`);
|
|
100
102
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
output.lines([
|
|
104
|
+
`current_branch=${current ?? "-"}`,
|
|
105
|
+
`pinned_base=${pinned ?? "-"}`,
|
|
106
|
+
`effective_base=${effective ?? "-"}`,
|
|
107
|
+
]);
|
|
104
108
|
if (warnings.length > 0) {
|
|
105
109
|
for (const warning of warnings) {
|
|
106
|
-
|
|
110
|
+
output.line(`warning=${warning}`);
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
113
|
return 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cleanup-merged.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/cleanup-merged.ts"],"names":[],"mappings":"AAiBA,OAAO,
|
|
1
|
+
{"version":3,"file":"cleanup-merged.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/cleanup-merged.ts"],"names":[],"mappings":"AAiBA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAKnC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsIlB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { resolveBaseBranch } from "@agentplaneorg/core";
|
|
3
3
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
4
|
-
import {
|
|
4
|
+
import { createCliEmitter, unknownEntityMessage, workflowModeMessage } from "../../cli/output.js";
|
|
5
5
|
import { CliError } from "../../shared/errors.js";
|
|
6
6
|
import { ensureGitClean } from "../guard/index.js";
|
|
7
7
|
import { execFileAsync, gitEnv } from "../shared/git.js";
|
|
@@ -9,8 +9,9 @@ import { gitDiffNames } from "../shared/git-diff.js";
|
|
|
9
9
|
import { gitBranchExists, gitCurrentBranch } from "../shared/git-ops.js";
|
|
10
10
|
import { findWorktreeForBranch, gitListTaskBranches, parseTaskIdFromBranch, } from "../shared/git-worktree.js";
|
|
11
11
|
import { isPathWithin, resolvePathFallback } from "../shared/path.js";
|
|
12
|
-
import { loadCommandContext } from "../shared/task-backend.js";
|
|
12
|
+
import { listTaskProjection, loadCommandContext, } from "../shared/task-backend.js";
|
|
13
13
|
import { archivePrArtifacts } from "./internal/archive-pr.js";
|
|
14
|
+
const output = createCliEmitter();
|
|
14
15
|
export async function cmdCleanupMerged(opts) {
|
|
15
16
|
try {
|
|
16
17
|
const ctx = opts.ctx ??
|
|
@@ -54,7 +55,7 @@ export async function cmdCleanupMerged(opts) {
|
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
const repoRoot = await resolvePathFallback(resolved.gitRoot);
|
|
57
|
-
const tasks = await ctx
|
|
58
|
+
const tasks = (await listTaskProjection(ctx)) ?? [];
|
|
58
59
|
const tasksById = new Map(tasks.map((task) => [task.id, task]));
|
|
59
60
|
const prefix = config.branch.task_prefix;
|
|
60
61
|
const branches = await gitListTaskBranches(resolved.gitRoot, prefix);
|
|
@@ -80,18 +81,18 @@ export async function cmdCleanupMerged(opts) {
|
|
|
80
81
|
const sortedCandidates = candidates.toSorted((a, b) => a.taskId.localeCompare(b.taskId));
|
|
81
82
|
if (!opts.quiet) {
|
|
82
83
|
const archiveLabel = opts.archive ? " archive=on" : "";
|
|
83
|
-
|
|
84
|
+
output.line(`cleanup merged (base=${baseBranch}${archiveLabel})`);
|
|
84
85
|
if (sortedCandidates.length === 0) {
|
|
85
|
-
|
|
86
|
+
output.line("no candidates");
|
|
86
87
|
return 0;
|
|
87
88
|
}
|
|
88
89
|
for (const item of sortedCandidates) {
|
|
89
|
-
|
|
90
|
+
output.line(`- ${item.taskId}: branch=${item.branch} worktree=${item.worktreePath ?? "-"}`);
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
if (!opts.yes) {
|
|
93
94
|
if (!opts.quiet) {
|
|
94
|
-
|
|
95
|
+
output.line("Re-run with --yes to delete these branches/worktrees.");
|
|
95
96
|
}
|
|
96
97
|
return 0;
|
|
97
98
|
}
|
|
@@ -129,7 +130,7 @@ export async function cmdCleanupMerged(opts) {
|
|
|
129
130
|
});
|
|
130
131
|
}
|
|
131
132
|
if (!opts.quiet) {
|
|
132
|
-
|
|
133
|
+
output.success("cleanup merged", undefined, `deleted=${candidates.length}`);
|
|
133
134
|
}
|
|
134
135
|
return 0;
|
|
135
136
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/remove.ts"],"names":[],"mappings":"AAYA,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/remove.ts"],"names":[],"mappings":"AAYA,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAqElB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { loadConfig, resolveProject } from "@agentplaneorg/core";
|
|
3
3
|
import { mapCoreError } from "../../cli/error-map.js";
|
|
4
|
-
import {
|
|
4
|
+
import { createCliEmitter, unknownEntityMessage } from "../../cli/output.js";
|
|
5
5
|
import { CliError } from "../../shared/errors.js";
|
|
6
6
|
import { ensureActionApproved } from "../shared/approval-requirements.js";
|
|
7
7
|
import { execFileAsync, gitEnv } from "../shared/git.js";
|
|
@@ -10,6 +10,7 @@ import { isPathWithin, resolvePathFallback } from "../shared/path.js";
|
|
|
10
10
|
export async function cmdBranchRemove(opts) {
|
|
11
11
|
const branch = (opts.branch ?? "").trim();
|
|
12
12
|
const worktree = (opts.worktree ?? "").trim();
|
|
13
|
+
const output = createCliEmitter();
|
|
13
14
|
if (!branch && !worktree) {
|
|
14
15
|
throw new CliError({
|
|
15
16
|
exitCode: 2,
|
|
@@ -45,7 +46,7 @@ export async function cmdBranchRemove(opts) {
|
|
|
45
46
|
}
|
|
46
47
|
await execFileAsync("git", ["worktree", "remove", ...(opts.force ? ["--force"] : []), worktreePath], { cwd: resolved.gitRoot, env: gitEnv() });
|
|
47
48
|
if (!opts.quiet) {
|
|
48
|
-
|
|
49
|
+
output.success("removed worktree", worktreePath);
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
if (branch) {
|
|
@@ -61,7 +62,7 @@ export async function cmdBranchRemove(opts) {
|
|
|
61
62
|
env: gitEnv(),
|
|
62
63
|
});
|
|
63
64
|
if (!opts.quiet) {
|
|
64
|
-
|
|
65
|
+
output.success("removed branch", branch);
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
return 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/status.ts"],"names":[],"mappings":"AAWA,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC,MAAM,CAAC,CA0DlB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { loadConfig, resolveBaseBranch, resolveProject } from "@agentplaneorg/core";
|
|
2
2
|
import { mapCoreError } from "../../cli/error-map.js";
|
|
3
3
|
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
4
|
-
import { unknownEntityMessage } from "../../cli/output.js";
|
|
4
|
+
import { createCliEmitter, unknownEntityMessage } from "../../cli/output.js";
|
|
5
5
|
import { CliError } from "../../shared/errors.js";
|
|
6
6
|
import { gitAheadBehind } from "../shared/git-diff.js";
|
|
7
7
|
import { gitBranchExists, gitCurrentBranch } from "../shared/git-ops.js";
|
|
8
8
|
import { findWorktreeForBranch, parseTaskIdFromBranch } from "../shared/git-worktree.js";
|
|
9
|
+
const output = createCliEmitter();
|
|
9
10
|
export async function cmdBranchStatus(opts) {
|
|
10
11
|
try {
|
|
11
12
|
const resolved = await resolveProject({
|
|
@@ -51,9 +52,9 @@ export async function cmdBranchStatus(opts) {
|
|
|
51
52
|
const taskId = parseTaskIdFromBranch(loaded.config.branch.task_prefix, branch);
|
|
52
53
|
const worktree = await findWorktreeForBranch(resolved.gitRoot, branch);
|
|
53
54
|
const { ahead, behind } = await gitAheadBehind(resolved.gitRoot, base, branch);
|
|
54
|
-
|
|
55
|
+
output.line(`branch=${branch} base=${base} ahead=${ahead} behind=${behind} task_id=${taskId ?? "-"}`);
|
|
55
56
|
if (worktree) {
|
|
56
|
-
|
|
57
|
+
output.line(`worktree=${worktree}`);
|
|
57
58
|
}
|
|
58
59
|
return 0;
|
|
59
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-start.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/work-start.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"work-start.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/work-start.ts"],"names":[],"mappings":"AAeA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAiInC,wBAAsB,YAAY,CAAC,IAAI,EAAE;IACvC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB,GAAG,OAAO,CAAC,MAAM,CAAC,CAqJlB"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
1
|
+
import { copyFile, mkdir, readFile, readdir, writeFile } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { resolveBaseBranch } from "@agentplaneorg/core";
|
|
4
|
+
import { LocalBackend } from "../../backends/task-backend.js";
|
|
4
5
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
5
6
|
import { fileExists } from "../../cli/fs-utils.js";
|
|
6
7
|
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
7
|
-
import {
|
|
8
|
+
import { createCliEmitter } from "../../cli/output.js";
|
|
8
9
|
import { CliError } from "../../shared/errors.js";
|
|
9
10
|
import { execFileAsync, gitEnv } from "../shared/git.js";
|
|
10
|
-
import {
|
|
11
|
+
import { gitAheadBehind } from "../shared/git-diff.js";
|
|
12
|
+
import { gitBranchExists, gitBranchUpstream, gitCurrentBranch } from "../shared/git-ops.js";
|
|
11
13
|
import { isPathWithin } from "../shared/path.js";
|
|
12
14
|
import { loadBackendTask, loadCommandContext, } from "../shared/task-backend.js";
|
|
13
15
|
import { ensurePlanApprovedIfRequired } from "../task/shared.js";
|
|
@@ -40,6 +42,26 @@ async function writeDirectWorkLock(agentplaneDir, lock) {
|
|
|
40
42
|
await mkdir(dir, { recursive: true });
|
|
41
43
|
await writeFile(directWorkLockPath(agentplaneDir), JSON.stringify(lock, null, 2) + "\n", "utf8");
|
|
42
44
|
}
|
|
45
|
+
async function materializeLocalBackendReadmesForWorktree(opts) {
|
|
46
|
+
if (!(opts.backend instanceof LocalBackend))
|
|
47
|
+
return;
|
|
48
|
+
const sourceRoot = path.resolve(opts.backend.root);
|
|
49
|
+
if (!isPathWithin(opts.repoRoot, sourceRoot))
|
|
50
|
+
return;
|
|
51
|
+
const relativeRoot = path.relative(opts.repoRoot, sourceRoot);
|
|
52
|
+
const targetRoot = path.join(opts.worktreePath, relativeRoot);
|
|
53
|
+
const entries = await readdir(sourceRoot, { withFileTypes: true }).catch(() => []);
|
|
54
|
+
for (const entry of entries) {
|
|
55
|
+
if (!entry.isDirectory())
|
|
56
|
+
continue;
|
|
57
|
+
const sourceReadme = path.join(sourceRoot, entry.name, "README.md");
|
|
58
|
+
if (!(await fileExists(sourceReadme)))
|
|
59
|
+
continue;
|
|
60
|
+
const targetReadme = path.join(targetRoot, entry.name, "README.md");
|
|
61
|
+
await mkdir(path.dirname(targetReadme), { recursive: true });
|
|
62
|
+
await copyFile(sourceReadme, targetReadme);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
43
65
|
async function ensureGitClean(gitRoot) {
|
|
44
66
|
const { stdout } = await execFileAsync("git", ["status", "--porcelain"], {
|
|
45
67
|
cwd: gitRoot,
|
|
@@ -82,8 +104,23 @@ async function ensureGitClean(gitRoot) {
|
|
|
82
104
|
message: "Working tree has non-task changes. In workflow_mode=direct, agentplane runs tasks in a single stream on the current branch; commit/stash your changes before starting a different task.",
|
|
83
105
|
});
|
|
84
106
|
}
|
|
107
|
+
async function ensureCurrentBaseBranch(gitRoot, baseBranch) {
|
|
108
|
+
const upstreamBranch = await gitBranchUpstream(gitRoot, baseBranch);
|
|
109
|
+
if (!upstreamBranch)
|
|
110
|
+
return;
|
|
111
|
+
const { behind } = await gitAheadBehind(gitRoot, upstreamBranch, baseBranch);
|
|
112
|
+
if (behind === 0)
|
|
113
|
+
return;
|
|
114
|
+
throw new CliError({
|
|
115
|
+
exitCode: exitCodeForError("E_GIT"),
|
|
116
|
+
code: "E_GIT",
|
|
117
|
+
message: `Base branch ${baseBranch} is behind its upstream ${upstreamBranch} by ${behind} commit(s). ` +
|
|
118
|
+
"Refresh the base branch before `agentplane work start` to avoid DIRTY hosted PRs.",
|
|
119
|
+
});
|
|
120
|
+
}
|
|
85
121
|
export async function cmdWorkStart(opts) {
|
|
86
122
|
try {
|
|
123
|
+
const output = createCliEmitter();
|
|
87
124
|
validateWorkAgent(opts.agent);
|
|
88
125
|
validateWorkSlug(opts.slug);
|
|
89
126
|
const ctx = opts.ctx ??
|
|
@@ -132,7 +169,7 @@ export async function cmdWorkStart(opts) {
|
|
|
132
169
|
branch: currentBranch,
|
|
133
170
|
started_at: new Date().toISOString(),
|
|
134
171
|
});
|
|
135
|
-
|
|
172
|
+
output.success("work start", opts.taskId, `mode=direct branch=${currentBranch}`);
|
|
136
173
|
return 0;
|
|
137
174
|
}
|
|
138
175
|
let baseRef = currentBranch;
|
|
@@ -157,6 +194,7 @@ export async function cmdWorkStart(opts) {
|
|
|
157
194
|
message: `work start must be run on base branch ${baseBranch} (current: ${currentBranch})`,
|
|
158
195
|
});
|
|
159
196
|
}
|
|
197
|
+
await ensureCurrentBaseBranch(resolved.gitRoot, baseBranch);
|
|
160
198
|
baseRef = baseBranch;
|
|
161
199
|
}
|
|
162
200
|
const prefix = config.branch.task_prefix;
|
|
@@ -185,6 +223,11 @@ export async function cmdWorkStart(opts) {
|
|
|
185
223
|
? ["worktree", "add", worktreePath, branchName]
|
|
186
224
|
: ["worktree", "add", "-b", branchName, worktreePath, baseRef];
|
|
187
225
|
await execFileAsync("git", worktreeArgs, { cwd: resolved.gitRoot, env: gitEnv() });
|
|
226
|
+
await materializeLocalBackendReadmesForWorktree({
|
|
227
|
+
backend: ctx.taskBackend,
|
|
228
|
+
repoRoot: resolved.gitRoot,
|
|
229
|
+
worktreePath,
|
|
230
|
+
});
|
|
188
231
|
}
|
|
189
232
|
else {
|
|
190
233
|
if (branchExists) {
|
|
@@ -202,7 +245,7 @@ export async function cmdWorkStart(opts) {
|
|
|
202
245
|
});
|
|
203
246
|
}
|
|
204
247
|
}
|
|
205
|
-
|
|
248
|
+
output.success("work start", branchName, opts.worktree ? `worktree=${path.relative(resolved.gitRoot, worktreePath)}` : "");
|
|
206
249
|
return 0;
|
|
207
250
|
}
|
|
208
251
|
catch (err) {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { CommandCtx, CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import { type GroupCommandParsed } from "../../cli/group-command.js";
|
|
2
3
|
import type { CommandContext } from "../shared/task-backend.js";
|
|
3
|
-
type CleanupGroupParsed =
|
|
4
|
-
cmd: string[];
|
|
5
|
-
};
|
|
4
|
+
type CleanupGroupParsed = GroupCommandParsed;
|
|
6
5
|
export declare const cleanupSpec: CommandSpec<CleanupGroupParsed>;
|
|
7
6
|
export type CleanupMergedParsed = {
|
|
8
7
|
base: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merged.command.d.ts","sourceRoot":"","sources":["../../../src/commands/cleanup/merged.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"merged.command.d.ts","sourceRoot":"","sources":["../../../src/commands/cleanup/merged.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,KAAK,kBAAkB,GAAG,kBAAkB,CAAC;AAE7C,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,kBAAkB,CAUvD,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAkC9D,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,kBAAkB,CAQzD,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC5E,KAAK,UAAU,EAAE,GAAG,mBAAmB,KAAG,OAAO,CAAC,MAAM,CAAC,CAWxE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { loadDirectSubcommandNames, parseGroupCommand, throwGroupCommandUsage, } from "../../cli/group-command.js";
|
|
1
2
|
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
-
import { suggestOne } from "../../cli/spec/suggest.js";
|
|
3
3
|
import { cmdCleanupMerged } from "../branch/index.js";
|
|
4
4
|
export const cleanupSpec = {
|
|
5
5
|
id: ["cleanup"],
|
|
@@ -10,7 +10,7 @@ export const cleanupSpec = {
|
|
|
10
10
|
examples: [
|
|
11
11
|
{ cmd: "agentplane cleanup merged --yes", why: "Delete merged task branches/worktrees." },
|
|
12
12
|
],
|
|
13
|
-
parse: (raw) => (
|
|
13
|
+
parse: (raw) => parseGroupCommand(raw),
|
|
14
14
|
};
|
|
15
15
|
export const cleanupMergedSpec = {
|
|
16
16
|
id: ["cleanup", "merged"],
|
|
@@ -47,18 +47,14 @@ export const cleanupMergedSpec = {
|
|
|
47
47
|
quiet: raw.opts.quiet === true,
|
|
48
48
|
}),
|
|
49
49
|
};
|
|
50
|
-
export const runCleanup = (_ctx, p) => {
|
|
51
|
-
|
|
52
|
-
const candidates = ["merged"];
|
|
53
|
-
const suggestion = suggestOne(input, candidates);
|
|
54
|
-
const suffix = suggestion ? ` Did you mean: ${suggestion}?` : "";
|
|
55
|
-
const msg = p.cmd.length === 0 ? "Missing subcommand." : `Unknown subcommand: ${p.cmd[0]}.`;
|
|
56
|
-
return Promise.reject(usageError({
|
|
50
|
+
export const runCleanup = async (_ctx, p) => {
|
|
51
|
+
throwGroupCommandUsage({
|
|
57
52
|
spec: cleanupSpec,
|
|
53
|
+
cmd: p.cmd,
|
|
54
|
+
subcommands: await loadDirectSubcommandNames(["cleanup"]),
|
|
58
55
|
command: "cleanup",
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}));
|
|
56
|
+
contextCommand: "cleanup",
|
|
57
|
+
});
|
|
62
58
|
};
|
|
63
59
|
export function makeRunCleanupMergedHandler(getCtx) {
|
|
64
60
|
return async (ctx, p) => {
|
|
@@ -7,7 +7,7 @@ import { writeTextIfChanged } from "../../shared/write-if-changed.js";
|
|
|
7
7
|
export const docsCliSpec = {
|
|
8
8
|
id: ["docs", "cli"],
|
|
9
9
|
group: "Docs",
|
|
10
|
-
summary: "Generate an MDX CLI reference from the current
|
|
10
|
+
summary: "Generate an MDX CLI reference from the current command spec catalog.",
|
|
11
11
|
options: [
|
|
12
12
|
{
|
|
13
13
|
kind: "string",
|
|
@@ -35,7 +35,7 @@ export function makeRunDocsCliHandler(getHelpJson) {
|
|
|
35
35
|
throw usageError({
|
|
36
36
|
spec: docsCliSpec,
|
|
37
37
|
command: "docs cli",
|
|
38
|
-
message: `Failed to read
|
|
38
|
+
message: `Failed to read command specs for docs generation: ${err instanceof Error ? err.message : String(err)}`,
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
const mdx = renderCliDocsMdx(list);
|
|
@@ -22,7 +22,7 @@ export function checkRuntimeSourceFacts(cwd, config) {
|
|
|
22
22
|
}
|
|
23
23
|
const warning = report.mode === "global-in-framework"
|
|
24
24
|
? "[WARN] Framework checkout detected but the active runtime is still a global installed binary. " +
|
|
25
|
-
"Run
|
|
25
|
+
"Run bun run framework:dev:bootstrap first so the wrapper can hand off to a built repo-local runtime."
|
|
26
26
|
: report.mode === "global-forced-in-framework"
|
|
27
27
|
? "[WARN] Framework checkout is forcing the global installed binary via AGENTPLANE_USE_GLOBAL_IN_FRAMEWORK=1. Unset it unless that override is intentional."
|
|
28
28
|
: null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/workflow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/workflow.ts"],"names":[],"mappings":"AAWA,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAU/E;AAED,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAyD7C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
+
import { loadConfig } from "@agentplaneorg/core";
|
|
3
4
|
import { emitWorkflowEvent, resolveWorkflowPaths, safeAutofixWorkflowText, validateWorkflowAtPath, } from "../../workflow-runtime/index.js";
|
|
4
5
|
export async function checkWorkflowContract(repoRoot) {
|
|
5
6
|
const result = await validateWorkflowAtPath(repoRoot);
|
|
@@ -26,7 +27,15 @@ export async function safeFixWorkflow(repoRoot) {
|
|
|
26
27
|
return { changed: false, note: "Skip: workflow contract file not found." };
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
const
|
|
30
|
+
const loaded = await loadConfig(path.join(repoRoot, ".agentplane"));
|
|
31
|
+
const fixed = safeAutofixWorkflowText(current, {
|
|
32
|
+
mode: loaded.config.workflow_mode,
|
|
33
|
+
approvals: {
|
|
34
|
+
require_plan: loaded.config.agents?.approvals?.require_plan ?? true,
|
|
35
|
+
require_verify: loaded.config.agents?.approvals?.require_verify ?? true,
|
|
36
|
+
require_network: loaded.config.agents?.approvals?.require_network ?? true,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
30
39
|
if (fixed.diagnostics.some((d) => d.code === "WF_FIX_SKIPPED_UNSAFE")) {
|
|
31
40
|
const details = fixed.diagnostics.map((d) => `${d.path}`).join(", ");
|
|
32
41
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"finish.spec.d.ts","sourceRoot":"","sources":["../../src/commands/finish.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AASvD,MAAM,MAAM,YAAY,GAAG;IACzB,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,GAAG,EAAE,OAAO,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,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,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"finish.spec.d.ts","sourceRoot":"","sources":["../../src/commands/finish.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AASvD,MAAM,MAAM,YAAY,GAAG;IACzB,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,GAAG,EAAE,OAAO,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,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,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,YAAY,CAqUhD,CAAC"}
|
|
@@ -213,6 +213,13 @@ export const finishSpec = {
|
|
|
213
213
|
message: "--commit-from-comment/--status-commit requires exactly one task id",
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
|
+
if (commitFromComment && statusCommit) {
|
|
217
|
+
throw usageError({
|
|
218
|
+
spec: finishSpec,
|
|
219
|
+
command: "finish",
|
|
220
|
+
message: "--commit-from-comment cannot be combined with --status-commit in finish; use one deterministic commit path.",
|
|
221
|
+
});
|
|
222
|
+
}
|
|
216
223
|
if (commitFromComment && commitAllow.length === 0) {
|
|
217
224
|
throw usageError({
|
|
218
225
|
spec: finishSpec,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
-
|
|
3
|
-
export declare const guardSpec: CommandSpec<
|
|
4
|
-
export declare const runGuard: CommandHandler<
|
|
2
|
+
import { type GroupCommandParsed } from "../../cli/group-command.js";
|
|
3
|
+
export declare const guardSpec: CommandSpec<GroupCommandParsed>;
|
|
4
|
+
export declare const runGuard: CommandHandler<GroupCommandParsed>;
|
|
5
5
|
//# sourceMappingURL=guard.command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.command.d.ts","sourceRoot":"","sources":["../../../src/commands/guard/guard.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"guard.command.d.ts","sourceRoot":"","sources":["../../../src/commands/guard/guard.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,kBAAkB,CAOrD,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,cAAc,CAAC,kBAAkB,CAMvD,CAAC"}
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { loadDirectSubcommandNames, parseGroupCommand, throwGroupCommandUsage, } from "../../cli/group-command.js";
|
|
2
2
|
export const guardSpec = {
|
|
3
3
|
id: ["guard"],
|
|
4
4
|
group: "Guard",
|
|
5
5
|
summary: "Guard commands (commit checks, git hygiene, and allowlist helpers).",
|
|
6
6
|
synopsis: ["agentplane guard <command> [args] [options]"],
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
throw usageError({
|
|
10
|
-
spec: guardSpec,
|
|
11
|
-
message: `Unknown subcommand: ${raw.extra[0]}`,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
throw usageError({ spec: guardSpec, message: "Missing subcommand." });
|
|
15
|
-
},
|
|
16
|
-
parse: () => ({}),
|
|
7
|
+
args: [{ name: "cmd", required: false, variadic: true, valueHint: "<command>" }],
|
|
8
|
+
parse: (raw) => parseGroupCommand(raw),
|
|
17
9
|
};
|
|
18
|
-
export const runGuard = () => {
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
export const runGuard = async (_ctx, p) => {
|
|
11
|
+
throwGroupCommandUsage({
|
|
12
|
+
spec: guardSpec,
|
|
13
|
+
cmd: p.cmd,
|
|
14
|
+
subcommands: await loadDirectSubcommandNames(["guard"]),
|
|
15
|
+
});
|
|
21
16
|
};
|
|
@@ -15,6 +15,7 @@ export declare function cmdCommit(opts: {
|
|
|
15
15
|
ctx?: CommandContext;
|
|
16
16
|
cwd: string;
|
|
17
17
|
rootOverride?: string;
|
|
18
|
+
baseBranchOverride?: string | null;
|
|
18
19
|
taskId: string;
|
|
19
20
|
message: string;
|
|
20
21
|
close: boolean;
|
|
@@ -30,5 +31,6 @@ export declare function cmdCommit(opts: {
|
|
|
30
31
|
quiet: boolean;
|
|
31
32
|
closeUnstageOthers: boolean;
|
|
32
33
|
closeCheckOnly: boolean;
|
|
34
|
+
closeStageTaskArtifacts?: boolean;
|
|
33
35
|
}): Promise<number>;
|
|
34
36
|
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/commands/guard/impl/commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/commands/guard/impl/commands.ts"],"names":[],"mappings":"AASA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAQvF,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAsOxE,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBlB;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B,GAAG,OAAO,CAAC,MAAM,CAAC,CAyBlB;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAa9E;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC,GAAG,OAAO,CAAC,MAAM,CAAC,CAuNlB"}
|