agentplane 0.3.6 → 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 +724 -359
- package/dist/adapters/task-backend/task-backend-adapter.d.ts +4 -2
- package/dist/adapters/task-backend/task-backend-adapter.d.ts.map +1 -1
- package/dist/adapters/task-backend/task-backend-adapter.js +15 -2
- 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 +10 -6
- package/dist/backends/task-backend/local-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend.js +32 -337
- 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/env.d.ts +1 -1
- package/dist/backends/task-backend/redmine/env.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/env.js +3 -0
- package/dist/backends/task-backend/redmine/inspect.d.ts +11 -0
- package/dist/backends/task-backend/redmine/inspect.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/inspect.js +75 -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 +32 -3
- 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 +19 -0
- package/dist/backends/task-backend/redmine/state.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/state.js +109 -0
- package/dist/backends/task-backend/redmine-backend.d.ts +14 -17
- package/dist/backends/task-backend/redmine-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine-backend.js +121 -379
- 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/constants.js +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 +27 -3
- package/dist/backends/task-backend/shared/types.d.ts +76 -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 -5
- 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 +11 -7
- 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/commands/init/write-env.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-env.js +12 -0
- 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 +90 -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 +8 -6
- package/dist/commands/backend/sync.command.d.ts.map +1 -1
- package/dist/commands/backend/sync.command.js +75 -14
- package/dist/commands/backend.d.ts +22 -0
- package/dist/commands/backend.d.ts.map +1 -1
- package/dist/commands/backend.js +111 -1
- 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/commit.spec.d.ts.map +1 -1
- package/dist/commands/commit.spec.js +30 -6
- 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/doctor/workspace.d.ts +8 -0
- package/dist/commands/doctor/workspace.d.ts.map +1 -1
- package/dist/commands/doctor/workspace.js +127 -3
- package/dist/commands/finish.spec.d.ts.map +1 -1
- package/dist/commands/finish.spec.js +7 -0
- package/dist/commands/guard/commit.command.d.ts.map +1 -1
- package/dist/commands/guard/commit.command.js +30 -6
- 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/allow.d.ts +4 -0
- package/dist/commands/guard/impl/allow.d.ts.map +1 -1
- package/dist/commands/guard/impl/allow.js +14 -3
- 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 +66 -9
- 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 +11 -7
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +107 -24
- 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 +65 -2
- package/dist/commands/shared/task-store.d.ts.map +1 -1
- package/dist/commands/shared/task-store.js +309 -91
- 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 -89
- 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 +24 -57
- package/dist/commands/task/comment.d.ts.map +1 -1
- package/dist/commands/task/comment.js +48 -42
- package/dist/commands/task/derive.command.d.ts +1 -0
- package/dist/commands/task/derive.command.d.ts.map +1 -1
- package/dist/commands/task/derive.command.js +15 -2
- package/dist/commands/task/derive.d.ts +1 -0
- package/dist/commands/task/derive.d.ts.map +1 -1
- package/dist/commands/task/derive.js +37 -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 +68 -61
- 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 +73 -204
- 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/migrate-doc.d.ts +15 -0
- package/dist/commands/task/migrate-doc.d.ts.map +1 -1
- package/dist/commands/task/migrate-doc.js +126 -35
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +26 -4
- 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 +118 -125
- 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 +38 -111
- package/dist/commands/task/shared/dependencies.d.ts +5 -4
- package/dist/commands/task/shared/dependencies.d.ts.map +1 -1
- package/dist/commands/task/shared/dependencies.js +20 -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 +14 -1
- 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 +56 -0
- package/dist/commands/task/shared/transitions.d.ts.map +1 -1
- package/dist/commands/task/shared/transitions.js +82 -8
- 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 +6 -4
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +6 -4
- 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 +32 -113
- 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 +21 -146
- 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/apply.d.ts +2 -0
- package/dist/commands/upgrade/apply.d.ts.map +1 -1
- package/dist/commands/upgrade/apply.js +33 -1
- 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.command.d.ts.map +1 -1
- package/dist/commands/upgrade.command.js +25 -0
- package/dist/commands/upgrade.d.ts +1 -0
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +164 -618
- 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/policy/rules/allowlist.d.ts.map +1 -1
- package/dist/policy/rules/allowlist.js +12 -9
- package/dist/ports/task-backend-port.d.ts +4 -2
- 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/protected-paths.d.ts +10 -0
- package/dist/shared/protected-paths.d.ts.map +1 -1
- package/dist/shared/protected-paths.js +33 -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
|
@@ -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,5 +1,13 @@
|
|
|
1
1
|
import { type CommandContext } from "../shared/task-backend.js";
|
|
2
|
+
type TaskDocSnapshot = {
|
|
3
|
+
id?: unknown;
|
|
4
|
+
status?: unknown;
|
|
5
|
+
doc_version?: unknown;
|
|
6
|
+
};
|
|
7
|
+
export declare function buildTaskReadmeMigrationFindings(tasks: TaskDocSnapshot[]): string[];
|
|
8
|
+
export declare function checkTaskReadmeMigrationState(repoRoot: string, ctx?: CommandContext): Promise<string[]>;
|
|
2
9
|
export declare function checkWorkspace(repoRoot: string, opts?: {
|
|
3
10
|
ctx?: CommandContext;
|
|
4
11
|
}): Promise<string[]>;
|
|
12
|
+
export {};
|
|
5
13
|
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/workspace.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/workspace.ts"],"names":[],"mappings":"AAUA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,KAAK,eAAe,GAAG;IACrB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAuFF,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,MAAM,EAAE,CAyDnF;AAED,wBAAsB,6BAA6B,CACjD,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,cAAc,GACnB,OAAO,CAAC,MAAM,EAAE,CAAC,CAOnB;AAuMD,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,cAAc,CAAA;CAAE,GAC9B,OAAO,CAAC,MAAM,EAAE,CAAC,CA2DnB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { parseTaskReadme, renderTaskDocFromSections } from "@agentplaneorg/core";
|
|
4
5
|
import { renderDiagnosticFinding } from "../../shared/diagnostics.js";
|
|
5
6
|
import { resolvePolicyGatewayForRepo } from "../../shared/policy-gateway.js";
|
|
6
7
|
import { GitContext } from "../shared/git-context.js";
|
|
@@ -84,7 +85,7 @@ async function readTaskDocSnapshotsFromProjection(ctx) {
|
|
|
84
85
|
return null;
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
|
-
function buildTaskReadmeMigrationFindings(tasks) {
|
|
88
|
+
export function buildTaskReadmeMigrationFindings(tasks) {
|
|
88
89
|
if (tasks.length === 0)
|
|
89
90
|
return [];
|
|
90
91
|
const legacy = tasks.filter((task) => task.doc_version !== 3);
|
|
@@ -138,7 +139,7 @@ function buildTaskReadmeMigrationFindings(tasks) {
|
|
|
138
139
|
}),
|
|
139
140
|
];
|
|
140
141
|
}
|
|
141
|
-
async function checkTaskReadmeMigrationState(repoRoot, ctx) {
|
|
142
|
+
export async function checkTaskReadmeMigrationState(repoRoot, ctx) {
|
|
142
143
|
const projectionTasks = await readTaskDocSnapshotsFromProjection(ctx);
|
|
143
144
|
const tasks = projectionTasks && projectionTasks.length > 0
|
|
144
145
|
? projectionTasks
|
|
@@ -197,6 +198,129 @@ async function checkDoneTaskReadmeArchiveDrift(repoRoot, ctx) {
|
|
|
197
198
|
}),
|
|
198
199
|
];
|
|
199
200
|
}
|
|
201
|
+
function normalizeTaskBodyForComparison(text) {
|
|
202
|
+
return text.replaceAll("\r\n", "\n").trim();
|
|
203
|
+
}
|
|
204
|
+
function normalizeCanonicalSections(value) {
|
|
205
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
206
|
+
return null;
|
|
207
|
+
const sections = {};
|
|
208
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
209
|
+
const title = key.trim();
|
|
210
|
+
if (!title || typeof entry !== "string")
|
|
211
|
+
continue;
|
|
212
|
+
sections[title] = entry;
|
|
213
|
+
}
|
|
214
|
+
return Object.keys(sections).length > 0 ? sections : null;
|
|
215
|
+
}
|
|
216
|
+
async function checkTaskProjectionDrift(repoRoot, ctx) {
|
|
217
|
+
const workflowDir = path.join(repoRoot, ctx?.config.paths.workflow_dir ?? ".agentplane/tasks");
|
|
218
|
+
let entries;
|
|
219
|
+
try {
|
|
220
|
+
entries = await fs.readdir(workflowDir, { withFileTypes: true });
|
|
221
|
+
}
|
|
222
|
+
catch {
|
|
223
|
+
return [];
|
|
224
|
+
}
|
|
225
|
+
const drifted = [];
|
|
226
|
+
for (const entry of entries) {
|
|
227
|
+
if (!entry.isDirectory())
|
|
228
|
+
continue;
|
|
229
|
+
const readmePath = path.join(workflowDir, entry.name, "README.md");
|
|
230
|
+
let text = "";
|
|
231
|
+
try {
|
|
232
|
+
text = await fs.readFile(readmePath, "utf8");
|
|
233
|
+
}
|
|
234
|
+
catch {
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
let parsed;
|
|
238
|
+
try {
|
|
239
|
+
parsed = parseTaskReadme(text);
|
|
240
|
+
}
|
|
241
|
+
catch {
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
const sections = normalizeCanonicalSections(parsed.frontmatter.sections);
|
|
245
|
+
if (!sections)
|
|
246
|
+
continue;
|
|
247
|
+
const renderedBody = renderTaskDocFromSections(sections);
|
|
248
|
+
if (normalizeTaskBodyForComparison(parsed.body) === normalizeTaskBodyForComparison(renderedBody)) {
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
const taskId = typeof parsed.frontmatter.id === "string" && parsed.frontmatter.id.trim()
|
|
252
|
+
? parsed.frontmatter.id.trim()
|
|
253
|
+
: entry.name;
|
|
254
|
+
const status = typeof parsed.frontmatter.status === "string" && parsed.frontmatter.status.trim()
|
|
255
|
+
? parsed.frontmatter.status.trim().toUpperCase()
|
|
256
|
+
: "UNKNOWN";
|
|
257
|
+
drifted.push({ id: taskId, status });
|
|
258
|
+
}
|
|
259
|
+
if (drifted.length === 0)
|
|
260
|
+
return [];
|
|
261
|
+
const activeCount = drifted.filter((task) => task.status !== "DONE").length;
|
|
262
|
+
const examples = drifted
|
|
263
|
+
.slice(0, 5)
|
|
264
|
+
.map((task) => `${task.id}[${task.status}]`)
|
|
265
|
+
.join(", ");
|
|
266
|
+
return [
|
|
267
|
+
renderDiagnosticFinding({
|
|
268
|
+
severity: "WARN",
|
|
269
|
+
state: "task README projection drift detected",
|
|
270
|
+
likelyCause: "canonical frontmatter.sections no longer match the rendered task body on disk",
|
|
271
|
+
nextAction: {
|
|
272
|
+
command: "agentplane task normalize",
|
|
273
|
+
reason: "re-render task README bodies from canonical one-file task state",
|
|
274
|
+
},
|
|
275
|
+
details: [
|
|
276
|
+
`Drifted task READMEs: ${drifted.length}; active drifted tasks: ${activeCount}`,
|
|
277
|
+
examples ? `Examples: ${examples}` : "Examples unavailable.",
|
|
278
|
+
],
|
|
279
|
+
}),
|
|
280
|
+
];
|
|
281
|
+
}
|
|
282
|
+
function checkBackendReadiness(ctx) {
|
|
283
|
+
if (ctx?.backendId !== "redmine")
|
|
284
|
+
return [];
|
|
285
|
+
const { supports_task_revisions, supports_revision_guarded_writes } = ctx.taskBackend.capabilities;
|
|
286
|
+
if (supports_task_revisions === supports_revision_guarded_writes &&
|
|
287
|
+
supports_task_revisions === true) {
|
|
288
|
+
return [];
|
|
289
|
+
}
|
|
290
|
+
if (supports_task_revisions === false && supports_revision_guarded_writes === false) {
|
|
291
|
+
return [
|
|
292
|
+
renderDiagnosticFinding({
|
|
293
|
+
severity: "WARN",
|
|
294
|
+
state: "Redmine backend is running in partial compatibility mode without canonical_state support",
|
|
295
|
+
likelyCause: "AGENTPLANE_REDMINE_CUSTOM_FIELDS_CANONICAL_STATE is not configured, so Redmine cannot round-trip the full canonical task state or guard writes by remote revision",
|
|
296
|
+
nextAction: {
|
|
297
|
+
command: "agentplane backend inspect redmine --yes",
|
|
298
|
+
reason: "inspect visible Redmine custom fields first, then wire AGENTPLANE_REDMINE_CUSTOM_FIELDS_CANONICAL_STATE to the correct field id",
|
|
299
|
+
},
|
|
300
|
+
details: [
|
|
301
|
+
`Backend config: ${ctx.backendConfigPath}`,
|
|
302
|
+
"Current capability flags: supports_task_revisions=false; supports_revision_guarded_writes=false",
|
|
303
|
+
"Legacy doc field syncing can still work, but the backend remains partial-compatibility only.",
|
|
304
|
+
],
|
|
305
|
+
}),
|
|
306
|
+
];
|
|
307
|
+
}
|
|
308
|
+
return [
|
|
309
|
+
renderDiagnosticFinding({
|
|
310
|
+
severity: "WARN",
|
|
311
|
+
state: "Redmine backend capability contract is internally inconsistent",
|
|
312
|
+
likelyCause: "backend capability flags diverged, so doctor cannot rely on a single revision-guard readiness state",
|
|
313
|
+
nextAction: {
|
|
314
|
+
command: "inspect Redmine backend capability wiring and rerun agentplane doctor",
|
|
315
|
+
reason: "restore a coherent readiness contract before relying on guarded remote writes",
|
|
316
|
+
},
|
|
317
|
+
details: [
|
|
318
|
+
`Backend config: ${ctx.backendConfigPath}`,
|
|
319
|
+
`Current capability flags: supports_task_revisions=${String(supports_task_revisions)}; supports_revision_guarded_writes=${String(supports_revision_guarded_writes)}`,
|
|
320
|
+
],
|
|
321
|
+
}),
|
|
322
|
+
];
|
|
323
|
+
}
|
|
200
324
|
export async function checkWorkspace(repoRoot, opts) {
|
|
201
325
|
const problems = [];
|
|
202
326
|
const requiredFiles = [path.join(repoRoot, ".agentplane", "config.json")];
|
|
@@ -243,6 +367,6 @@ export async function checkWorkspace(repoRoot, opts) {
|
|
|
243
367
|
if (!hasJson) {
|
|
244
368
|
problems.push("No agent profiles found in .agentplane/agents (*.json expected).");
|
|
245
369
|
}
|
|
246
|
-
problems.push(...(await checkTaskReadmeMigrationState(repoRoot, opts?.ctx)), ...(await checkDoneTaskReadmeArchiveDrift(repoRoot, opts?.ctx)));
|
|
370
|
+
problems.push(...checkBackendReadiness(opts?.ctx), ...(await checkTaskReadmeMigrationState(repoRoot, opts?.ctx)), ...(await checkDoneTaskReadmeArchiveDrift(repoRoot, opts?.ctx)), ...(await checkTaskProjectionDrift(repoRoot, opts?.ctx)));
|
|
247
371
|
return problems;
|
|
248
372
|
}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commit.command.d.ts","sourceRoot":"","sources":["../../../src/commands/guard/commit.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAOtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,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;CAChB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"commit.command.d.ts","sourceRoot":"","sources":["../../../src/commands/guard/commit.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAOtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,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;CAChB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,iBAAiB,CAmI1D,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC1E,KAAK,UAAU,EAAE,GAAG,iBAAiB,KAAG,OAAO,CAAC,MAAM,CAAC,CA2BtE"}
|
|
@@ -34,23 +34,38 @@ export const guardCommitSpec = {
|
|
|
34
34
|
kind: "boolean",
|
|
35
35
|
name: "allow-tasks",
|
|
36
36
|
default: false,
|
|
37
|
-
description: "Allow the tasks export snapshot plus artifacts under the active task subtree.",
|
|
37
|
+
description: "Allow the tasks export snapshot plus artifacts under the active task subtree; standalone path scope.",
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
kind: "boolean",
|
|
41
41
|
name: "allow-base",
|
|
42
42
|
default: false,
|
|
43
|
-
description: "Allow base branch edits.",
|
|
43
|
+
description: "Allow base branch edits; branch override only, not a path allowlist.",
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
kind: "boolean",
|
|
47
47
|
name: "allow-policy",
|
|
48
48
|
default: false,
|
|
49
|
-
description: "Allow policy edits (e.g. AGENTS.md).",
|
|
49
|
+
description: "Allow policy edits (e.g. AGENTS.md); standalone path scope.",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
kind: "boolean",
|
|
53
|
+
name: "allow-config",
|
|
54
|
+
default: false,
|
|
55
|
+
description: "Allow config edits; standalone path scope.",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
kind: "boolean",
|
|
59
|
+
name: "allow-hooks",
|
|
60
|
+
default: false,
|
|
61
|
+
description: "Allow hooks edits; standalone path scope.",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
kind: "boolean",
|
|
65
|
+
name: "allow-ci",
|
|
66
|
+
default: false,
|
|
67
|
+
description: "Allow CI workflow edits; standalone path scope.",
|
|
50
68
|
},
|
|
51
|
-
{ kind: "boolean", name: "allow-config", default: false, description: "Allow config edits." },
|
|
52
|
-
{ kind: "boolean", name: "allow-hooks", default: false, description: "Allow hooks edits." },
|
|
53
|
-
{ kind: "boolean", name: "allow-ci", default: false, description: "Allow CI workflow edits." },
|
|
54
69
|
{
|
|
55
70
|
kind: "boolean",
|
|
56
71
|
name: "require-clean",
|
|
@@ -64,6 +79,15 @@ export const guardCommitSpec = {
|
|
|
64
79
|
cmd: 'agentplane guard commit 202602030608-F1Q8AB -m "✨ F1Q8AB task: implement allowlist guard" --allow packages/agentplane',
|
|
65
80
|
why: "Validate staged changes are covered by allowlist and policy.",
|
|
66
81
|
},
|
|
82
|
+
{
|
|
83
|
+
cmd: 'agentplane guard commit 202602030608-F1Q8AB -m "✨ F1Q8AB task: update publish workflow" --allow-ci',
|
|
84
|
+
why: "Validate already staged CI-only changes without a redundant explicit workflow path prefix.",
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
notes: [
|
|
88
|
+
"Protected path-scoped overrides can stand alone without a duplicate explicit prefix: `--allow-tasks`, `--allow-policy`, `--allow-config`, `--allow-hooks`, and `--allow-ci` each admit their own path family.",
|
|
89
|
+
"`agentplane guard commit` remains staged-only: it validates the current index and never auto-stages files for you.",
|
|
90
|
+
"`--allow-base` is different: it only overrides base-branch protection and never selects file paths by itself.",
|
|
67
91
|
],
|
|
68
92
|
validateRaw: (raw) => {
|
|
69
93
|
const msg = typeof raw.opts.message === "string" ? raw.opts.message.trim() : "";
|
|
@@ -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
|
};
|
|
@@ -13,6 +13,10 @@ export declare function stageAllowlist(opts: {
|
|
|
13
13
|
ctx: CommandContext;
|
|
14
14
|
allow: string[];
|
|
15
15
|
allowTasks: boolean;
|
|
16
|
+
allowPolicy?: boolean;
|
|
17
|
+
allowConfig?: boolean;
|
|
18
|
+
allowHooks?: boolean;
|
|
19
|
+
allowCI?: boolean;
|
|
16
20
|
tasksPath: string;
|
|
17
21
|
workflowDir?: string;
|
|
18
22
|
taskId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allow.d.ts","sourceRoot":"","sources":["../../../../src/commands/guard/impl/allow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"allow.d.ts","sourceRoot":"","sources":["../../../../src/commands/guard/impl/allow.ts"],"names":[],"mappings":"AAUA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAkBvF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAe9D;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAOpB;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBhB;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,GAAG,EAAE,cAAc,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAoEpB"}
|
|
@@ -2,7 +2,7 @@ import { resolveProject } from "@agentplaneorg/core";
|
|
|
2
2
|
import { exitCodeForError } from "../../../cli/exit-codes.js";
|
|
3
3
|
import { gitPathIsUnderPrefix, normalizeGitPathPrefix } from "../../../shared/git-path.js";
|
|
4
4
|
import { CliError } from "../../../shared/errors.js";
|
|
5
|
-
import { taskArtifactPrefixes } from "../../../shared/protected-paths.js";
|
|
5
|
+
import { protectedPathAllowPrefixes, taskArtifactPrefixes, } from "../../../shared/protected-paths.js";
|
|
6
6
|
import { GitContext } from "../../shared/git-context.js";
|
|
7
7
|
import { loadCommandContext } from "../../shared/task-backend.js";
|
|
8
8
|
function normalizeAllowPrefixes(prefixes) {
|
|
@@ -88,8 +88,19 @@ export async function stageAllowlist(opts) {
|
|
|
88
88
|
workflowDir: opts.workflowDir,
|
|
89
89
|
taskId: opts.taskId,
|
|
90
90
|
});
|
|
91
|
-
const
|
|
92
|
-
|
|
91
|
+
const protectedAllow = protectedPathAllowPrefixes({
|
|
92
|
+
tasksPath: opts.tasksPath,
|
|
93
|
+
workflowDir: opts.workflowDir,
|
|
94
|
+
taskId: opts.taskId,
|
|
95
|
+
allowTasks: opts.allowTasks,
|
|
96
|
+
allowPolicy: opts.allowPolicy,
|
|
97
|
+
allowConfig: opts.allowConfig,
|
|
98
|
+
allowHooks: opts.allowHooks,
|
|
99
|
+
allowCI: opts.allowCI,
|
|
100
|
+
});
|
|
101
|
+
const effectiveAllow = normalizeAllowPrefixes([...allow, ...protectedAllow]);
|
|
102
|
+
if (effectiveAllow.length === 0 ||
|
|
103
|
+
(allow.length === 0 && protectedAllow.length === 0 && opts.allowTaskOnly !== true)) {
|
|
93
104
|
throw new CliError({
|
|
94
105
|
exitCode: 2,
|
|
95
106
|
code: "E_USAGE",
|
|
@@ -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"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { mkdir, rm, writeFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { resolveTaskIndexPath } from "../../../backends/task-index.js";
|
|
1
4
|
import { mapCoreError } from "../../../cli/error-map.js";
|
|
2
5
|
import { infoMessage, successMessage } from "../../../cli/output.js";
|
|
3
6
|
import { stripAnsi } from "../../../cli/shared/ansi.js";
|
|
@@ -25,6 +28,37 @@ const FORMATTER_SIGNAL_PATTERNS = [
|
|
|
25
28
|
/Run Prettier with --write/i,
|
|
26
29
|
];
|
|
27
30
|
const ESLINT_SIGNAL_PATTERNS = [/\bESLint\b/i, /\b[0-9]+\s+problems?\b/i];
|
|
31
|
+
async function resetRebuildableTaskIndexCache(ctx) {
|
|
32
|
+
const gitRoot = path.resolve(ctx.resolvedProject.gitRoot);
|
|
33
|
+
const workflowDirAbs = path.resolve(gitRoot, ctx.config.paths.workflow_dir);
|
|
34
|
+
const cachePath = path.resolve(resolveTaskIndexPath(workflowDirAbs));
|
|
35
|
+
const relativeCachePath = path.relative(gitRoot, cachePath);
|
|
36
|
+
if (!relativeCachePath || relativeCachePath.startsWith(".."))
|
|
37
|
+
return;
|
|
38
|
+
try {
|
|
39
|
+
await execFileAsync("git", ["ls-files", "--error-unmatch", "--", relativeCachePath], {
|
|
40
|
+
cwd: gitRoot,
|
|
41
|
+
env: gitEnv(),
|
|
42
|
+
});
|
|
43
|
+
const gitPath = relativeCachePath.split(path.sep).join("/");
|
|
44
|
+
const cacheBlob = await execFileAsync("git", ["show", `HEAD:${gitPath}`], {
|
|
45
|
+
cwd: gitRoot,
|
|
46
|
+
env: gitEnv(),
|
|
47
|
+
});
|
|
48
|
+
await mkdir(path.dirname(cachePath), { recursive: true });
|
|
49
|
+
await writeFile(cachePath, cacheBlob.stdout, "utf8");
|
|
50
|
+
await execFileAsync("git", ["restore", "--staged", "--", relativeCachePath], {
|
|
51
|
+
cwd: gitRoot,
|
|
52
|
+
env: gitEnv(),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
// The task index is a rebuildable cache. If it is absent from HEAD here, remove it so
|
|
57
|
+
// deterministic close commits only see canonical task artifacts.
|
|
58
|
+
await rm(cachePath, { force: true });
|
|
59
|
+
}
|
|
60
|
+
ctx.git.invalidateStatus();
|
|
61
|
+
}
|
|
28
62
|
function readText(value) {
|
|
29
63
|
if (typeof value === "string")
|
|
30
64
|
return value;
|
|
@@ -130,7 +164,12 @@ function commitFailureDiagnostic(phase, output) {
|
|
|
130
164
|
};
|
|
131
165
|
}
|
|
132
166
|
function hasExplicitCommitScope(opts) {
|
|
133
|
-
return opts.allow.some((prefix) => prefix.trim().length > 0) ||
|
|
167
|
+
return (opts.allow.some((prefix) => prefix.trim().length > 0) ||
|
|
168
|
+
opts.allowTasks ||
|
|
169
|
+
opts.allowPolicy ||
|
|
170
|
+
opts.allowConfig ||
|
|
171
|
+
opts.allowHooks ||
|
|
172
|
+
opts.allowCI);
|
|
134
173
|
}
|
|
135
174
|
function asCommitFailure(err, phase) {
|
|
136
175
|
if (err instanceof Error) {
|
|
@@ -237,6 +276,7 @@ export async function cmdCommit(opts) {
|
|
|
237
276
|
if (opts.close) {
|
|
238
277
|
if (!opts.closeCheckOnly) {
|
|
239
278
|
await ensureReconciledBeforeMutation({ ctx, command: "commit" });
|
|
279
|
+
await resetRebuildableTaskIndexCache(ctx);
|
|
240
280
|
}
|
|
241
281
|
// Make the close commit deterministic: start from a clean index unless --unstage-others is used.
|
|
242
282
|
let staged = await ctx.git.statusStagedPaths();
|
|
@@ -256,7 +296,7 @@ export async function cmdCommit(opts) {
|
|
|
256
296
|
message: "Staged files exist (close commit requires an empty index; rerun with --unstage-others to auto-unstage).",
|
|
257
297
|
context: withDiagnosticContext({ command: "commit" }, {
|
|
258
298
|
state: "close commit cannot run with a non-empty git index",
|
|
259
|
-
likelyCause: "deterministic close commits only stage the task
|
|
299
|
+
likelyCause: "deterministic close commits only stage the active task artifact scope, but other staged files are already in the index",
|
|
260
300
|
nextAction: {
|
|
261
301
|
command: "git restore --staged -- .",
|
|
262
302
|
reason: "clear the current index before rerunning the close commit flow",
|
|
@@ -285,18 +325,30 @@ export async function cmdCommit(opts) {
|
|
|
285
325
|
}
|
|
286
326
|
return 0;
|
|
287
327
|
}
|
|
288
|
-
await
|
|
328
|
+
await (opts.closeStageTaskArtifacts === true
|
|
329
|
+
? stageAllowlist({
|
|
330
|
+
ctx,
|
|
331
|
+
allow: [],
|
|
332
|
+
allowTasks: true,
|
|
333
|
+
tasksPath: ctx.config.paths.tasks_path,
|
|
334
|
+
workflowDir: ctx.config.paths.workflow_dir,
|
|
335
|
+
taskId: opts.taskId,
|
|
336
|
+
allowTaskOnly: true,
|
|
337
|
+
emptyAllowMessage: "No changed task artifacts to stage for the deterministic close commit.",
|
|
338
|
+
noMatchMessage: "No changed files matched the active task artifact scope for the deterministic close commit.",
|
|
339
|
+
})
|
|
340
|
+
: ctx.git.stage([readmeRel]));
|
|
289
341
|
// Close commits should not require manual --allow flags:
|
|
290
|
-
// the command stages
|
|
291
|
-
const allow = [ctx.config.paths.workflow_dir];
|
|
342
|
+
// the command stages only the active task artifact scope.
|
|
292
343
|
await guardCommitCheck({
|
|
293
344
|
ctx,
|
|
294
345
|
cwd: opts.cwd,
|
|
295
346
|
rootOverride: opts.rootOverride,
|
|
347
|
+
baseBranchOverride: opts.baseBranchOverride ?? null,
|
|
296
348
|
taskId: opts.taskId,
|
|
297
349
|
message: msg.subject,
|
|
298
|
-
allow,
|
|
299
|
-
allowBase:
|
|
350
|
+
allow: [],
|
|
351
|
+
allowBase: opts.allowBase,
|
|
300
352
|
allowTasks: true,
|
|
301
353
|
allowPolicy: false,
|
|
302
354
|
allowConfig: false,
|
|
@@ -308,7 +360,7 @@ export async function cmdCommit(opts) {
|
|
|
308
360
|
const env = buildGitCommitEnv({
|
|
309
361
|
taskId: opts.taskId,
|
|
310
362
|
allowTasks: true,
|
|
311
|
-
allowBase:
|
|
363
|
+
allowBase: opts.allowBase,
|
|
312
364
|
allowPolicy: false,
|
|
313
365
|
allowConfig: false,
|
|
314
366
|
allowHooks: false,
|
|
@@ -343,12 +395,16 @@ export async function cmdCommit(opts) {
|
|
|
343
395
|
ctx,
|
|
344
396
|
allow: opts.allow,
|
|
345
397
|
allowTasks: opts.allowTasks,
|
|
398
|
+
allowPolicy: opts.allowPolicy,
|
|
399
|
+
allowConfig: opts.allowConfig,
|
|
400
|
+
allowHooks: opts.allowHooks,
|
|
401
|
+
allowCI: opts.allowCI,
|
|
346
402
|
tasksPath: ctx.config.paths.tasks_path,
|
|
347
403
|
workflowDir: ctx.config.paths.workflow_dir,
|
|
348
404
|
taskId: opts.taskId,
|
|
349
405
|
allowTaskOnly: true,
|
|
350
406
|
emptyAllowMessage: "No staged files and no commit allowlist. Pass --allow <path-prefix>, use --allow-tasks for active task artifacts, or stage files manually.",
|
|
351
|
-
noMatchMessage: "No changed files matched the commit allowlist (adjust --allow
|
|
407
|
+
noMatchMessage: "No changed files matched the commit allowlist (adjust --allow, protected allow flags, or --allow-tasks; otherwise stage files manually).",
|
|
352
408
|
});
|
|
353
409
|
if (!opts.quiet) {
|
|
354
410
|
process.stdout.write(`${infoMessage(`commit auto-staged ${autoStaged.length} path(s) from allowlist`)}\n`);
|
|
@@ -358,6 +414,7 @@ export async function cmdCommit(opts) {
|
|
|
358
414
|
ctx,
|
|
359
415
|
cwd: opts.cwd,
|
|
360
416
|
rootOverride: opts.rootOverride,
|
|
417
|
+
baseBranchOverride: opts.baseBranchOverride ?? null,
|
|
361
418
|
taskId: opts.taskId,
|
|
362
419
|
message: opts.message,
|
|
363
420
|
allow: opts.allow,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../../src/commands/guard/impl/policy.ts"],"names":[],"mappings":"AAKA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEvF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,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;CAChB,CAAC;AAEF,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../../src/commands/guard/impl/policy.ts"],"names":[],"mappings":"AAKA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEvF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,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,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,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;CAChB,CAAC;AAEF,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+C9E"}
|
|
@@ -9,13 +9,16 @@ export async function guardCommitCheck(opts) {
|
|
|
9
9
|
const staged = await ctx.git.statusStagedPaths();
|
|
10
10
|
const unstagedTrackedPaths = opts.requireClean ? await ctx.git.statusUnstagedTrackedPaths() : [];
|
|
11
11
|
const inBranchPr = ctx.config.workflow_mode === "branch_pr";
|
|
12
|
+
const explicitBaseBranch = opts.baseBranchOverride?.trim();
|
|
12
13
|
const baseBranch = inBranchPr
|
|
13
|
-
?
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
? explicitBaseBranch && explicitBaseBranch.length > 0
|
|
15
|
+
? explicitBaseBranch
|
|
16
|
+
: await resolveBaseBranch({
|
|
17
|
+
cwd: opts.cwd,
|
|
18
|
+
rootOverride: opts.rootOverride ?? null,
|
|
19
|
+
cliBaseOpt: null,
|
|
20
|
+
mode: ctx.config.workflow_mode,
|
|
21
|
+
})
|
|
19
22
|
: null;
|
|
20
23
|
const currentBranch = inBranchPr
|
|
21
24
|
? await gitCurrentBranch(ctx.resolvedProject.gitRoot)
|