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,5 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { loadConfig, resolveProject } from "@agentplaneorg/core";
|
|
3
|
+
import { createCliEmitter } from "../../cli/output.js";
|
|
3
4
|
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
4
5
|
import { usageError } from "../../cli/spec/errors.js";
|
|
5
6
|
import { withDiagnosticContext } from "../../shared/diagnostics.js";
|
|
@@ -7,9 +8,11 @@ import { CliError } from "../../shared/errors.js";
|
|
|
7
8
|
import { execFileAsync, gitEnv } from "../shared/git.js";
|
|
8
9
|
import { GitContext } from "../shared/git-context.js";
|
|
9
10
|
import { ensureNetworkApproved } from "../shared/network-approval.js";
|
|
11
|
+
import { runOperatorPipeline } from "../shared/operator-pipeline.js";
|
|
10
12
|
import { cleanHookEnv, maybePersistExpectedCliVersion, maybeRefreshGeneratedReference, maybeUpdateBunLockfile, replaceAgentplanePackageMetadata, replacePackageVersionInFile, } from "./apply.mutation.js";
|
|
11
13
|
import { ensureCleanTrackedTree, ensureNpmVersionsAvailable, ensureRemoteExists, ensureRemoteTagDoesNotExist, ensureTagDoesNotExist, fileExists, loadReleasePlan, readCoreDependencyVersion, readPackageVersion, runReleasePrepublishGate, validateReleaseNotes, } from "./apply.preflight.js";
|
|
12
14
|
import { pushReleaseRefs, writeReleaseApplyReport } from "./apply.reporting.js";
|
|
15
|
+
const output = createCliEmitter();
|
|
13
16
|
async function resolveReleasePlanInputs(opts) {
|
|
14
17
|
const { planDir, plan, minBullets } = await loadReleasePlan({
|
|
15
18
|
gitRoot: opts.gitRoot,
|
|
@@ -118,7 +121,7 @@ async function applyReleaseMutation(opts) {
|
|
|
118
121
|
await opts.git.stage(stagePaths);
|
|
119
122
|
const staged = await opts.git.statusStagedPaths();
|
|
120
123
|
if (staged.length === 0) {
|
|
121
|
-
|
|
124
|
+
output.line("No changes to commit.");
|
|
122
125
|
return { releaseCommit };
|
|
123
126
|
}
|
|
124
127
|
const subject = `✨ release: ${opts.nextTag}`;
|
|
@@ -135,13 +138,13 @@ async function finalizeReleaseApply(opts) {
|
|
|
135
138
|
cwd: opts.gitRoot,
|
|
136
139
|
env: gitEnv(),
|
|
137
140
|
});
|
|
138
|
-
|
|
141
|
+
output.line(`Release tag created: ${opts.plan.nextTag}`);
|
|
139
142
|
if (opts.push) {
|
|
140
143
|
await pushReleaseRefs(opts.gitRoot, opts.remote, opts.plan.nextTag);
|
|
141
|
-
|
|
144
|
+
output.line(`Pushed: ${opts.remote} HEAD + ${opts.plan.nextTag}`);
|
|
142
145
|
}
|
|
143
146
|
else {
|
|
144
|
-
|
|
147
|
+
output.line(`Next: git push <remote> HEAD && git push <remote> ${opts.plan.nextTag}`);
|
|
145
148
|
}
|
|
146
149
|
const reportPath = await writeReleaseApplyReport(opts.gitRoot, {
|
|
147
150
|
applied_at: new Date().toISOString(),
|
|
@@ -161,7 +164,7 @@ async function finalizeReleaseApply(opts) {
|
|
|
161
164
|
commit: opts.releaseCommit,
|
|
162
165
|
push: { requested: opts.push, remote: opts.remote, performed: opts.push },
|
|
163
166
|
});
|
|
164
|
-
|
|
167
|
+
output.line(`Release report: ${path.relative(opts.gitRoot, reportPath)}`);
|
|
165
168
|
return 0;
|
|
166
169
|
}
|
|
167
170
|
export const releaseApplySpec = {
|
|
@@ -250,58 +253,76 @@ export const runReleaseApply = async (ctx, flags) => {
|
|
|
250
253
|
message: "Release publish is mandatory. Run `agentplane release apply --push --yes`.",
|
|
251
254
|
});
|
|
252
255
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
256
|
+
return await runOperatorPipeline({
|
|
257
|
+
init: async () => {
|
|
258
|
+
const resolved = await resolveProject({
|
|
259
|
+
cwd: ctx.cwd,
|
|
260
|
+
rootOverride: ctx.rootOverride ?? null,
|
|
261
|
+
});
|
|
262
|
+
const gitRoot = resolved.gitRoot;
|
|
263
|
+
const { planDir, plan, notesPath } = await resolveReleasePlanInputs({
|
|
264
|
+
gitRoot,
|
|
265
|
+
planOverride: flags.plan,
|
|
266
|
+
});
|
|
267
|
+
return {
|
|
268
|
+
resolved,
|
|
269
|
+
gitRoot,
|
|
270
|
+
planDir,
|
|
271
|
+
plan,
|
|
272
|
+
notesPath,
|
|
273
|
+
corePkgPath: path.join(gitRoot, "packages", "core", "package.json"),
|
|
274
|
+
agentplanePkgPath: path.join(gitRoot, "packages", "agentplane", "package.json"),
|
|
275
|
+
npmVersionChecked: false,
|
|
276
|
+
};
|
|
277
|
+
},
|
|
278
|
+
preflight: async (state) => {
|
|
279
|
+
if ((state.plan.bump === "minor" || state.plan.bump === "major") && flags.yes !== true) {
|
|
280
|
+
throw usageError({
|
|
281
|
+
spec: releaseApplySpec,
|
|
282
|
+
command: "release apply",
|
|
283
|
+
message: `Bump '${state.plan.bump}' requires explicit approval. Re-run with --yes.`,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
await ensureReleasePlanMatchesRepoState({
|
|
287
|
+
gitRoot: state.gitRoot,
|
|
288
|
+
plan: state.plan,
|
|
289
|
+
corePkgPath: state.corePkgPath,
|
|
290
|
+
agentplanePkgPath: state.agentplanePkgPath,
|
|
291
|
+
});
|
|
292
|
+
if (flags.push) {
|
|
293
|
+
state.npmVersionChecked = await runPushPreflight({
|
|
294
|
+
agentplaneDir: state.resolved.agentplaneDir,
|
|
295
|
+
gitRoot: state.gitRoot,
|
|
296
|
+
remote: flags.remote,
|
|
297
|
+
nextTag: state.plan.nextTag,
|
|
298
|
+
nextVersion: state.plan.nextVersion,
|
|
299
|
+
yes: flags.yes,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
execute: async (state) => {
|
|
304
|
+
const git = new GitContext({ gitRoot: state.gitRoot });
|
|
305
|
+
return await applyReleaseMutation({
|
|
306
|
+
agentplaneDir: state.resolved.agentplaneDir,
|
|
307
|
+
gitRoot: state.gitRoot,
|
|
308
|
+
git,
|
|
309
|
+
notesPath: state.notesPath,
|
|
310
|
+
corePkgPath: state.corePkgPath,
|
|
311
|
+
agentplanePkgPath: state.agentplanePkgPath,
|
|
312
|
+
nextTag: state.plan.nextTag,
|
|
313
|
+
nextVersion: state.plan.nextVersion,
|
|
314
|
+
});
|
|
315
|
+
},
|
|
316
|
+
finalize: async (state, mutation) => await finalizeReleaseApply({
|
|
317
|
+
gitRoot: state.gitRoot,
|
|
318
|
+
planDir: state.planDir,
|
|
319
|
+
notesPath: state.notesPath,
|
|
320
|
+
plan: state.plan,
|
|
321
|
+
npmVersionChecked: state.npmVersionChecked,
|
|
322
|
+
releaseCommit: mutation.releaseCommit,
|
|
323
|
+
push: flags.push,
|
|
279
324
|
remote: flags.remote,
|
|
280
|
-
|
|
281
|
-
nextVersion: plan.nextVersion,
|
|
282
|
-
yes: flags.yes,
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
const git = new GitContext({ gitRoot });
|
|
286
|
-
const { releaseCommit } = await applyReleaseMutation({
|
|
287
|
-
agentplaneDir: resolved.agentplaneDir,
|
|
288
|
-
gitRoot,
|
|
289
|
-
git,
|
|
290
|
-
notesPath,
|
|
291
|
-
corePkgPath,
|
|
292
|
-
agentplanePkgPath,
|
|
293
|
-
nextTag: plan.nextTag,
|
|
294
|
-
nextVersion: plan.nextVersion,
|
|
295
|
-
});
|
|
296
|
-
return await finalizeReleaseApply({
|
|
297
|
-
gitRoot,
|
|
298
|
-
planDir,
|
|
299
|
-
notesPath,
|
|
300
|
-
plan,
|
|
301
|
-
npmVersionChecked,
|
|
302
|
-
releaseCommit,
|
|
303
|
-
push: flags.push,
|
|
304
|
-
remote: flags.remote,
|
|
325
|
+
}),
|
|
305
326
|
});
|
|
306
327
|
};
|
|
307
328
|
export { pushReleaseRefs } from "./apply.reporting.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.command.d.ts","sourceRoot":"","sources":["../../../src/commands/release/plan.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plan.command.d.ts","sourceRoot":"","sources":["../../../src/commands/release/plan.command.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAO1E,KAAK,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAE5C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;AA4IjD,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,iBAAiB,CA4E1D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,iBAAiB,CAqE5D,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { resolveProject } from "@agentplaneorg/core";
|
|
4
|
+
import { createCliEmitter } from "../../cli/output.js";
|
|
4
5
|
import { usageError } from "../../cli/spec/errors.js";
|
|
5
6
|
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
6
7
|
import { CliError } from "../../shared/errors.js";
|
|
7
8
|
import { execFileAsync, gitEnv } from "../shared/git.js";
|
|
9
|
+
const output = createCliEmitter();
|
|
8
10
|
function parseSemver(version) {
|
|
9
11
|
const m = /^(\d+)\.(\d+)\.(\d+)$/u.exec(version.trim());
|
|
10
12
|
if (!m)
|
|
@@ -229,8 +231,10 @@ export const runReleasePlan = async (ctx, flags) => {
|
|
|
229
231
|
await writeFile(path.join(baseDir, "changes.json"), JSON.stringify(changes, null, 2) + "\n", "utf8");
|
|
230
232
|
await writeFile(path.join(baseDir, "changes.md"), changesMarkdown(changes), "utf8");
|
|
231
233
|
await writeFile(path.join(baseDir, "instructions.md"), releaseInstructions({ nextTag, prevTag, bump: flags.bump, minBullets }), "utf8");
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
output.lines([
|
|
235
|
+
`Release plan written: ${path.relative(gitRoot, baseDir)}`,
|
|
236
|
+
`Next tag: ${nextTag}`,
|
|
237
|
+
`Hint: Create a DOCS task to write docs/releases/${nextTag}.md based on this plan.`,
|
|
238
|
+
]);
|
|
235
239
|
return 0;
|
|
236
240
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
-
|
|
3
|
-
export declare const releaseSpec: CommandSpec<
|
|
4
|
-
export declare const runRelease: CommandHandler<
|
|
2
|
+
import { type GroupCommandParsed } from "../../cli/group-command.js";
|
|
3
|
+
export declare const releaseSpec: CommandSpec<GroupCommandParsed>;
|
|
4
|
+
export declare const runRelease: CommandHandler<GroupCommandParsed>;
|
|
5
5
|
//# sourceMappingURL=release.command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.command.d.ts","sourceRoot":"","sources":["../../../src/commands/release/release.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"release.command.d.ts","sourceRoot":"","sources":["../../../src/commands/release/release.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,WAAW,EAAE,WAAW,CAAC,kBAAkB,CAOvD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,kBAAkB,CAMzD,CAAC"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { loadDirectSubcommandNames, parseGroupCommand, throwGroupCommandUsage, } from "../../cli/group-command.js";
|
|
2
2
|
export const releaseSpec = {
|
|
3
3
|
id: ["release"],
|
|
4
4
|
group: "Release",
|
|
5
5
|
summary: "Prepare a release (agent-assisted notes + version bump workflow).",
|
|
6
6
|
synopsis: ["agentplane release <command> [args] [options]"],
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
throw usageError({ spec: releaseSpec, message: `Unknown subcommand: ${raw.extra[0]}` });
|
|
10
|
-
}
|
|
11
|
-
throw usageError({ spec: releaseSpec, message: "Missing subcommand." });
|
|
12
|
-
},
|
|
13
|
-
parse: () => ({}),
|
|
7
|
+
args: [{ name: "cmd", required: false, variadic: true, valueHint: "<command>" }],
|
|
8
|
+
parse: (raw) => parseGroupCommand(raw),
|
|
14
9
|
};
|
|
15
|
-
export const runRelease = () => {
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
export const runRelease = async (_ctx, p) => {
|
|
11
|
+
throwGroupCommandUsage({
|
|
12
|
+
spec: releaseSpec,
|
|
13
|
+
cmd: p.cmd,
|
|
14
|
+
subcommands: await loadDirectSubcommandNames(["release"]),
|
|
15
|
+
});
|
|
18
16
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare function writePackageJson(root: string, relDir: string, data: Record<string, unknown>): Promise<void>;
|
|
2
|
+
export declare function writeReleaseNotes(root: string, version: string, body?: string): Promise<void>;
|
|
3
|
+
export declare function seedReleaseWorkspace(root: string, opts?: {
|
|
4
|
+
coreVersion?: string;
|
|
5
|
+
cliVersion?: string;
|
|
6
|
+
dependencyVersion?: string;
|
|
7
|
+
writeNotes?: boolean;
|
|
8
|
+
notesVersion?: string;
|
|
9
|
+
notesBody?: string;
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
export declare function initReleaseWorkspace(opts?: {
|
|
12
|
+
prefix?: string;
|
|
13
|
+
coreVersion?: string;
|
|
14
|
+
cliVersion?: string;
|
|
15
|
+
dependencyVersion?: string;
|
|
16
|
+
writeNotes?: boolean;
|
|
17
|
+
notesVersion?: string;
|
|
18
|
+
notesBody?: string;
|
|
19
|
+
}): Promise<string>;
|
|
20
|
+
//# sourceMappingURL=release.test-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release.test-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/release.test-helpers.ts"],"names":[],"mappings":"AAIA,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,IAAI,CAAC,CAIf;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,IAAI,SAAc,GACjB,OAAO,CAAC,IAAI,CAAC,CAIf;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE;IACJ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,GACL,OAAO,CAAC,IAAI,CAAC,CAkBf;AAED,wBAAsB,oBAAoB,CACxC,IAAI,GAAE;IACJ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,GACL,OAAO,CAAC,MAAM,CAAC,CAIjB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { mkdir, mkdtemp, writeFile } from "node:fs/promises";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
export async function writePackageJson(root, relDir, data) {
|
|
5
|
+
const dir = path.join(root, relDir);
|
|
6
|
+
await mkdir(dir, { recursive: true });
|
|
7
|
+
await writeFile(path.join(dir, "package.json"), `${JSON.stringify(data, null, 2)}\n`, "utf8");
|
|
8
|
+
}
|
|
9
|
+
export async function writeReleaseNotes(root, version, body = "# Notes\n") {
|
|
10
|
+
const releasesDir = path.join(root, "docs", "releases");
|
|
11
|
+
await mkdir(releasesDir, { recursive: true });
|
|
12
|
+
await writeFile(path.join(releasesDir, `v${version}.md`), body, "utf8");
|
|
13
|
+
}
|
|
14
|
+
export async function seedReleaseWorkspace(root, opts = {}) {
|
|
15
|
+
const coreVersion = opts.coreVersion ?? "1.2.3";
|
|
16
|
+
const cliVersion = opts.cliVersion ?? coreVersion;
|
|
17
|
+
const dependencyVersion = opts.dependencyVersion ?? coreVersion;
|
|
18
|
+
await writePackageJson(root, "packages/core", {
|
|
19
|
+
name: "@agentplaneorg/core",
|
|
20
|
+
version: coreVersion,
|
|
21
|
+
});
|
|
22
|
+
await writePackageJson(root, "packages/agentplane", {
|
|
23
|
+
name: "agentplane",
|
|
24
|
+
version: cliVersion,
|
|
25
|
+
dependencies: {
|
|
26
|
+
"@agentplaneorg/core": dependencyVersion,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
if (opts.writeNotes) {
|
|
30
|
+
await writeReleaseNotes(root, opts.notesVersion ?? cliVersion, opts.notesBody);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export async function initReleaseWorkspace(opts = {}) {
|
|
34
|
+
const root = await mkdtemp(path.join(tmpdir(), opts.prefix ?? "agentplane-release-"));
|
|
35
|
+
await seedReleaseWorkspace(root, opts);
|
|
36
|
+
return root;
|
|
37
|
+
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { CommandHandler, CommandSpec } from "../cli/spec/spec.js";
|
|
2
|
+
import { type GroupCommandParsed } from "../cli/group-command.js";
|
|
2
3
|
import { type RepoCliVersionExpectation } from "../shared/repo-cli-version.js";
|
|
3
4
|
import { type RuntimeSourceInfo } from "../shared/runtime-source.js";
|
|
4
5
|
export type FrameworkDevWorkflow = {
|
|
5
6
|
available: boolean;
|
|
6
|
-
|
|
7
|
+
bootstrapCommand: string;
|
|
8
|
+
manualRepairCommands: string[];
|
|
9
|
+
repoLocalVerifyCommand: string;
|
|
7
10
|
reinstallScript: string;
|
|
8
|
-
|
|
11
|
+
globalVerifyCommand: string;
|
|
9
12
|
forceGlobalExample: string;
|
|
10
13
|
recommendation: string | null;
|
|
11
14
|
};
|
|
@@ -13,16 +16,13 @@ export type RuntimeExplainPayload = RuntimeSourceInfo & {
|
|
|
13
16
|
frameworkDev: FrameworkDevWorkflow;
|
|
14
17
|
repoCliExpectation: RepoCliVersionExpectation;
|
|
15
18
|
};
|
|
16
|
-
export type RuntimeGroupParsed = {
|
|
17
|
-
cmd: string[];
|
|
18
|
-
};
|
|
19
19
|
export type RuntimeExplainParsed = {
|
|
20
20
|
json: boolean;
|
|
21
21
|
};
|
|
22
|
-
export declare const runtimeSpec: CommandSpec<
|
|
22
|
+
export declare const runtimeSpec: CommandSpec<GroupCommandParsed>;
|
|
23
23
|
export declare const runtimeExplainSpec: CommandSpec<RuntimeExplainParsed>;
|
|
24
24
|
export declare function buildFrameworkDevWorkflow(report: RuntimeSourceInfo): FrameworkDevWorkflow;
|
|
25
25
|
export declare function renderRuntimeExplainText(report: RuntimeSourceInfo, repoCliExpectation: RepoCliVersionExpectation): string;
|
|
26
|
-
export declare const runRuntime: CommandHandler<
|
|
26
|
+
export declare const runRuntime: CommandHandler<GroupCommandParsed>;
|
|
27
27
|
export declare const runRuntimeExplain: CommandHandler<RuntimeExplainParsed>;
|
|
28
28
|
//# sourceMappingURL=runtime.command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.command.d.ts","sourceRoot":"","sources":["../../src/commands/runtime.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.command.d.ts","sourceRoot":"","sources":["../../src/commands/runtime.command.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,+BAA+B,CAAC;AASvC,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,6BAA6B,CAAC;AAIrC,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,GAAG;IACtD,YAAY,EAAE,oBAAoB,CAAC;IACnC,kBAAkB,EAAE,yBAAyB,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAErD,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,kBAAkB,CAQvD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,oBAAoB,CAoBhE,CAAC;AAMF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,GAAG,oBAAoB,CAkCzF;AAgBD,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,iBAAiB,EACzB,kBAAkB,EAAE,yBAAyB,GAC5C,MAAM,CA+CR;AAyBD,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,kBAAkB,CAQzD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,oBAAoB,CAkBlE,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { loadConfig, resolveProject } from "@agentplaneorg/core";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { createCliEmitter } from "../cli/output.js";
|
|
3
|
+
import { loadDirectSubcommandNames, parseGroupCommand, throwGroupCommandUsage, } from "../cli/group-command.js";
|
|
4
4
|
import { evaluateRepoCliVersionExpectation, } from "../shared/repo-cli-version.js";
|
|
5
|
+
import { FRAMEWORK_DEV_BOOTSTRAP_COMMAND, FRAMEWORK_DEV_FORCE_GLOBAL_EXAMPLE, FRAMEWORK_DEV_GLOBAL_VERIFY_COMMAND, FRAMEWORK_DEV_MANUAL_REPAIR_COMMANDS, FRAMEWORK_DEV_REINSTALL_SCRIPT, FRAMEWORK_DEV_REPO_LOCAL_VERIFY_COMMAND, } from "../../bin/framework-dev-contract.js";
|
|
5
6
|
import { describeRuntimeMode, resolveRuntimeSourceInfo, } from "../shared/runtime-source.js";
|
|
7
|
+
const output = createCliEmitter();
|
|
6
8
|
export const runtimeSpec = {
|
|
7
9
|
id: ["runtime"],
|
|
8
10
|
group: "Diagnostics",
|
|
@@ -10,7 +12,7 @@ export const runtimeSpec = {
|
|
|
10
12
|
synopsis: ["agentplane runtime <explain> [options]"],
|
|
11
13
|
args: [{ name: "cmd", required: false, variadic: true, valueHint: "<cmd>" }],
|
|
12
14
|
examples: [{ cmd: "agentplane runtime explain", why: "Show active runtime details." }],
|
|
13
|
-
parse: (raw) => (
|
|
15
|
+
parse: (raw) => parseGroupCommand(raw),
|
|
14
16
|
};
|
|
15
17
|
export const runtimeExplainSpec = {
|
|
16
18
|
id: ["runtime", "explain"],
|
|
@@ -38,36 +40,33 @@ function renderPath(value) {
|
|
|
38
40
|
}
|
|
39
41
|
export function buildFrameworkDevWorkflow(report) {
|
|
40
42
|
const available = report.framework.inFrameworkCheckout;
|
|
41
|
-
const reinstallScript = "scripts/reinstall-global-agentplane.sh";
|
|
42
|
-
const rebuildCommands = [
|
|
43
|
-
"bun run --filter=@agentplaneorg/core build",
|
|
44
|
-
"bun run --filter=agentplane build",
|
|
45
|
-
];
|
|
46
|
-
const verifyCommand = "agentplane runtime explain";
|
|
47
|
-
const forceGlobalExample = "AGENTPLANE_USE_GLOBAL_IN_FRAMEWORK=1 agentplane <command>";
|
|
48
43
|
if (!available) {
|
|
49
44
|
return {
|
|
50
45
|
available,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
bootstrapCommand: FRAMEWORK_DEV_BOOTSTRAP_COMMAND,
|
|
47
|
+
manualRepairCommands: [...FRAMEWORK_DEV_MANUAL_REPAIR_COMMANDS],
|
|
48
|
+
repoLocalVerifyCommand: FRAMEWORK_DEV_REPO_LOCAL_VERIFY_COMMAND,
|
|
49
|
+
reinstallScript: FRAMEWORK_DEV_REINSTALL_SCRIPT,
|
|
50
|
+
globalVerifyCommand: FRAMEWORK_DEV_GLOBAL_VERIFY_COMMAND,
|
|
51
|
+
forceGlobalExample: FRAMEWORK_DEV_FORCE_GLOBAL_EXAMPLE,
|
|
55
52
|
recommendation: null,
|
|
56
53
|
};
|
|
57
54
|
}
|
|
58
55
|
const recommendation = report.mode === "repo-local" || report.mode === "repo-local-handoff"
|
|
59
|
-
? "
|
|
56
|
+
? "Run the framework bootstrap after fresh clones or dependency drift; use the reinstall helper only when the global PATH command itself should resolve this checkout."
|
|
60
57
|
: report.mode === "global-in-framework"
|
|
61
|
-
? "
|
|
58
|
+
? "Bootstrap the framework checkout first so the installed wrapper can hand off cleanly to the repo-local runtime."
|
|
62
59
|
: report.mode === "global-forced-in-framework"
|
|
63
60
|
? "Unset AGENTPLANE_USE_GLOBAL_IN_FRAMEWORK=1 unless you intentionally need the global installed CLI inside the framework checkout."
|
|
64
|
-
: "Use
|
|
61
|
+
: "Use the framework bootstrap command first, then verify the repo-local runtime and global wrapper explicitly.";
|
|
65
62
|
return {
|
|
66
63
|
available,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
bootstrapCommand: FRAMEWORK_DEV_BOOTSTRAP_COMMAND,
|
|
65
|
+
manualRepairCommands: [...FRAMEWORK_DEV_MANUAL_REPAIR_COMMANDS],
|
|
66
|
+
repoLocalVerifyCommand: FRAMEWORK_DEV_REPO_LOCAL_VERIFY_COMMAND,
|
|
67
|
+
reinstallScript: FRAMEWORK_DEV_REINSTALL_SCRIPT,
|
|
68
|
+
globalVerifyCommand: FRAMEWORK_DEV_GLOBAL_VERIFY_COMMAND,
|
|
69
|
+
forceGlobalExample: FRAMEWORK_DEV_FORCE_GLOBAL_EXAMPLE,
|
|
71
70
|
recommendation,
|
|
72
71
|
};
|
|
73
72
|
}
|
|
@@ -110,7 +109,7 @@ export function renderRuntimeExplainText(report, repoCliExpectation) {
|
|
|
110
109
|
lines.push(`Handoff from: ${report.handoffFromBinaryPath}`);
|
|
111
110
|
}
|
|
112
111
|
if (frameworkDev.available) {
|
|
113
|
-
lines.push("", "Framework dev workflow:", "1.
|
|
112
|
+
lines.push("", "Framework dev workflow:", "1. Canonical bootstrap:", ` - ${frameworkDev.bootstrapCommand}`, "2. Manual fallback:", ...frameworkDev.manualRepairCommands.map((command) => ` - ${command}`), "3. Verify the repo-local runtime directly:", ` - ${frameworkDev.repoLocalVerifyCommand}`, "4. If the global PATH install should resolve this checkout:", ` - ${frameworkDev.reinstallScript}`, "5. Re-verify the global wrapper:", ` - ${frameworkDev.globalVerifyCommand}`, "6. Optional: force the global installed CLI inside this checkout:", ` - ${frameworkDev.forceGlobalExample}`);
|
|
114
113
|
if (frameworkDev.recommendation) {
|
|
115
114
|
lines.push(`Recommendation: ${frameworkDev.recommendation}`);
|
|
116
115
|
}
|
|
@@ -136,17 +135,14 @@ async function resolveRepoCliExpectation(opts) {
|
|
|
136
135
|
};
|
|
137
136
|
}
|
|
138
137
|
}
|
|
139
|
-
export const runRuntime = (_ctx, p) => {
|
|
140
|
-
|
|
141
|
-
const suggestion = suggestOne(input, ["explain"]);
|
|
142
|
-
const suffix = suggestion ? ` Did you mean: ${suggestion}?` : "";
|
|
143
|
-
const msg = p.cmd.length === 0 ? "Missing subcommand." : `Unknown subcommand: ${p.cmd[0]}.`;
|
|
144
|
-
return Promise.reject(usageError({
|
|
138
|
+
export const runRuntime = async (_ctx, p) => {
|
|
139
|
+
throwGroupCommandUsage({
|
|
145
140
|
spec: runtimeSpec,
|
|
141
|
+
cmd: p.cmd,
|
|
142
|
+
subcommands: await loadDirectSubcommandNames(["runtime"]),
|
|
146
143
|
command: "runtime",
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}));
|
|
144
|
+
contextCommand: "runtime",
|
|
145
|
+
});
|
|
150
146
|
};
|
|
151
147
|
export const runRuntimeExplain = (ctx, p) => {
|
|
152
148
|
const report = resolveRuntimeSourceInfo({
|
|
@@ -160,10 +156,10 @@ export const runRuntimeExplain = (ctx, p) => {
|
|
|
160
156
|
}).then((repoCliExpectation) => {
|
|
161
157
|
const payload = { ...buildRuntimeExplainPayload(report), repoCliExpectation };
|
|
162
158
|
if (p.json) {
|
|
163
|
-
|
|
159
|
+
output.json(payload);
|
|
164
160
|
return 0;
|
|
165
161
|
}
|
|
166
|
-
|
|
162
|
+
output.line(renderRuntimeExplainText(report, repoCliExpectation));
|
|
167
163
|
return 0;
|
|
168
164
|
});
|
|
169
165
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
export type ScenarioExecuteParsed = {
|
|
3
|
+
recipeId: string;
|
|
4
|
+
scenarioId: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const scenarioExecuteSpec: CommandSpec<ScenarioExecuteParsed>;
|
|
7
|
+
export declare const runScenarioExecute: CommandHandler<ScenarioExecuteParsed>;
|
|
8
|
+
//# sourceMappingURL=execute.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.command.d.ts","sourceRoot":"","sources":["../../../src/commands/scenario/execute.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAa1E,MAAM,MAAM,qBAAqB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAG7E,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,qBAAqB,CAyBlE,CAAC;AAgBF,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,qBAAqB,CAuEpE,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
+
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
3
|
+
import { mapBackendError } from "../../cli/error-map.js";
|
|
4
|
+
import { createCliEmitter } from "../../cli/output.js";
|
|
5
|
+
import { loadCommandContext } from "../shared/task-backend.js";
|
|
6
|
+
import { executeTaskRunnerExecution } from "../../runner/usecases/task-run.js";
|
|
7
|
+
import { materializeRecipeScenarioTask } from "../../runner/usecases/scenario-materialize-task.js";
|
|
8
|
+
import { cmdTaskPlanApprove } from "../task/plan.js";
|
|
9
|
+
import { cmdTaskStartReady } from "../task/start-ready.js";
|
|
10
|
+
import { CliError } from "../../shared/errors.js";
|
|
11
|
+
const output = createCliEmitter();
|
|
12
|
+
export const scenarioExecuteSpec = {
|
|
13
|
+
id: ["scenario", "execute"],
|
|
14
|
+
group: "Scenario",
|
|
15
|
+
summary: "Materialize a recipe-backed task and execute it through the shared runner flow.",
|
|
16
|
+
description: "Resolves a recipe scenario, materializes a task from its explicit task_template, and executes the shared runner with recipe context bundled alongside the created task.",
|
|
17
|
+
args: [{ name: "id", required: true, valueHint: "<recipe:scenario>" }],
|
|
18
|
+
examples: [
|
|
19
|
+
{
|
|
20
|
+
cmd: "agentplane scenario execute viewer:demo",
|
|
21
|
+
why: "Create a task from the scenario template and execute it through the configured runner.",
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
parse: (raw) => {
|
|
25
|
+
const id = String(raw.args.id ?? "");
|
|
26
|
+
const [recipeId, scenarioId] = id.split(":", 2);
|
|
27
|
+
if (!recipeId || !scenarioId) {
|
|
28
|
+
throw usageError({
|
|
29
|
+
spec: scenarioExecuteSpec,
|
|
30
|
+
command: "scenario execute",
|
|
31
|
+
message: `Invalid scenario id: ${id} (expected: <recipe:scenario>)`,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return { recipeId, scenarioId };
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
function renderScenarioExecuteStartBody(parsed, taskId) {
|
|
38
|
+
return (`Start: execute recipe scenario ${parsed.recipeId}:${parsed.scenarioId} through the shared runner ` +
|
|
39
|
+
`using materialized task ${taskId} and its explicit task_template.`);
|
|
40
|
+
}
|
|
41
|
+
function renderScenarioExecutePlanApprovalNote(parsed) {
|
|
42
|
+
return (`Materialized from recipe scenario ${parsed.recipeId}:${parsed.scenarioId} ` +
|
|
43
|
+
"for immediate shared-runner execution.");
|
|
44
|
+
}
|
|
45
|
+
export const runScenarioExecute = async (ctx, parsed) => {
|
|
46
|
+
try {
|
|
47
|
+
const commandCtx = await loadCommandContext({
|
|
48
|
+
cwd: ctx.cwd,
|
|
49
|
+
rootOverride: ctx.rootOverride ?? null,
|
|
50
|
+
});
|
|
51
|
+
const materialized = await materializeRecipeScenarioTask({
|
|
52
|
+
ctx: commandCtx,
|
|
53
|
+
cwd: ctx.cwd,
|
|
54
|
+
rootOverride: ctx.rootOverride ?? null,
|
|
55
|
+
recipe_id: parsed.recipeId,
|
|
56
|
+
scenario_id: parsed.scenarioId,
|
|
57
|
+
});
|
|
58
|
+
await cmdTaskPlanApprove({
|
|
59
|
+
ctx: commandCtx,
|
|
60
|
+
cwd: ctx.cwd,
|
|
61
|
+
rootOverride: ctx.rootOverride ?? undefined,
|
|
62
|
+
taskId: materialized.task_id,
|
|
63
|
+
by: "ORCHESTRATOR",
|
|
64
|
+
note: renderScenarioExecutePlanApprovalNote(parsed),
|
|
65
|
+
});
|
|
66
|
+
await cmdTaskStartReady({
|
|
67
|
+
ctx: commandCtx,
|
|
68
|
+
cwd: ctx.cwd,
|
|
69
|
+
rootOverride: ctx.rootOverride ?? undefined,
|
|
70
|
+
taskId: materialized.task_id,
|
|
71
|
+
author: materialized.task.owner,
|
|
72
|
+
body: renderScenarioExecuteStartBody(parsed, materialized.task_id),
|
|
73
|
+
force: false,
|
|
74
|
+
yes: false,
|
|
75
|
+
quiet: true,
|
|
76
|
+
});
|
|
77
|
+
const executed = await executeTaskRunnerExecution({
|
|
78
|
+
ctx: commandCtx,
|
|
79
|
+
cwd: ctx.cwd,
|
|
80
|
+
rootOverride: ctx.rootOverride ?? null,
|
|
81
|
+
task_id: materialized.task_id,
|
|
82
|
+
run_id: materialized.run_id,
|
|
83
|
+
recipe: materialized.recipe_context,
|
|
84
|
+
target: {
|
|
85
|
+
kind: "recipe_scenario",
|
|
86
|
+
recipe_id: parsed.recipeId,
|
|
87
|
+
scenario_id: parsed.scenarioId,
|
|
88
|
+
task_id: materialized.task_id,
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
output.info(`scenario executed: ${parsed.recipeId}:${parsed.scenarioId}`);
|
|
92
|
+
output.line(`task_id: ${materialized.task_id}`);
|
|
93
|
+
output.line(`run_id: ${executed.invocation.run_id}`);
|
|
94
|
+
output.line(`state: ${executed.bundle.execution.artifact_paths.state_path}`);
|
|
95
|
+
output.line(`events: ${executed.bundle.execution.artifact_paths.events_path}`);
|
|
96
|
+
output.line(`status: ${executed.result.status}`);
|
|
97
|
+
output.line(`runner_exit_code: ${executed.result.exit_code ?? "null"}`);
|
|
98
|
+
if (executed.result.stdout_summary) {
|
|
99
|
+
output.line(`stdout: ${executed.result.stdout_summary}`);
|
|
100
|
+
}
|
|
101
|
+
if (executed.result.stderr_summary) {
|
|
102
|
+
output.line(`stderr: ${executed.result.stderr_summary}`, "stderr");
|
|
103
|
+
}
|
|
104
|
+
return executed.result.status === "success"
|
|
105
|
+
? 0
|
|
106
|
+
: (executed.result.exit_code ?? exitCodeForError("E_RUNTIME"));
|
|
107
|
+
}
|
|
108
|
+
catch (err) {
|
|
109
|
+
if (err instanceof CliError)
|
|
110
|
+
throw err;
|
|
111
|
+
throw mapBackendError(err, {
|
|
112
|
+
command: scenarioExecuteSpec.id.join(" "),
|
|
113
|
+
recipe_id: parsed.recipeId,
|
|
114
|
+
scenario_id: parsed.scenarioId,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/commands/scenario/impl/commands.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAwB,MAAM,qBAAqB,CAAC;AAkB3E,KAAK,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/commands/scenario/impl/commands.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAwB,MAAM,qBAAqB,CAAC;AAkB3E,KAAK,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AA2KF,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,iBAAiB,EAC1B,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EAAE,GACb,oBAAoB,CAQtB;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,MAAM,CAAC,CA4BlB;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,MAAM,CAAC,CAqClB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,OAAO,EAAE,iBAAiB,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CA2ChE;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC;CACvD,GAAG,OAAO,CAAC,MAAM,CAAC,CAuClB"}
|