agentplane 0.3.12 → 0.3.14
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/RUNNER.md +1 -1
- package/assets/agents/ORCHESTRATOR.json +1 -1
- package/assets/agents/SKILL_EXTRACTOR.json +31 -0
- package/assets/codex-plugin/assets/header.png +0 -0
- package/assets/codex-plugin/assets/icon.svg +1 -0
- package/assets/codex-plugin/assets/logo.svg +1 -0
- package/assets/codex-plugin/skills/agentplane/SKILL.md +35 -0
- package/assets/framework.manifest.json +7 -0
- package/assets/policy/governance.md +4 -2
- package/assets/policy/incidents.md +4 -19
- package/assets/policy/workflow.branch_pr.md +10 -5
- package/assets/policy/workflow.release.md +5 -2
- package/dist/.build-manifest.json +409 -219
- package/dist/cli/exit-codes.d.ts.map +1 -1
- package/dist/cli/exit-codes.js +1 -0
- package/dist/cli/output.d.ts +29 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +33 -0
- package/dist/cli/reason-codes.d.ts +1 -1
- package/dist/cli/reason-codes.d.ts.map +1 -1
- package/dist/cli/reason-codes.js +12 -0
- package/dist/cli/run-cli/command-catalog/core.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/core.js +36 -78
- package/dist/cli/run-cli/command-catalog/lifecycle.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/lifecycle.js +4 -12
- 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 +27 -31
- package/dist/cli/run-cli/command-catalog/shared.d.ts +9 -6
- package/dist/cli/run-cli/command-catalog/shared.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/shared.js +23 -6
- package/dist/cli/run-cli/command-catalog/task.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/task.js +6 -18
- package/dist/cli/run-cli/command-catalog.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/codex.d.ts +14 -0
- package/dist/cli/run-cli/commands/codex.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/codex.js +100 -0
- package/dist/cli/run-cli/commands/core.d.ts +1 -0
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core.js +1 -0
- package/dist/cli/run-cli/commands/init/recipes.d.ts +9 -1
- package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/recipes.js +33 -22
- package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init.js +26 -21
- package/dist/cli/run-cli/error-guidance.js +20 -0
- package/dist/cli/run-cli.js +1 -1
- package/dist/cli/run-cli.test-helpers.d.ts +1 -74
- package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
- package/dist/cli/run-cli.test-helpers.js +1 -766
- package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
- package/dist/commands/branch/cleanup-merged.js +5 -9
- package/dist/commands/branch/work-start.command.d.ts.map +1 -1
- package/dist/commands/branch/work-start.command.js +1 -0
- package/dist/commands/codex/plugin-install.d.ts +26 -0
- package/dist/commands/codex/plugin-install.d.ts.map +1 -0
- package/dist/commands/codex/plugin-install.js +209 -0
- package/dist/commands/commit.spec.d.ts.map +1 -1
- package/dist/commands/commit.spec.js +2 -0
- package/dist/commands/doctor/branch-pr.d.ts +1 -1
- package/dist/commands/doctor/branch-pr.d.ts.map +1 -1
- package/dist/commands/doctor/branch-pr.js +5 -2
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +4 -1
- package/dist/commands/guard/impl/comment-commit.d.ts.map +1 -1
- package/dist/commands/guard/impl/comment-commit.js +2 -1
- package/dist/commands/guard/impl/env.d.ts +6 -0
- package/dist/commands/guard/impl/env.d.ts.map +1 -1
- package/dist/commands/guard/impl/env.js +41 -0
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
- package/dist/commands/pr/integrate/cmd.js +81 -5
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/prepare.js +38 -7
- package/dist/commands/pr/internal/auto-commit.d.ts.map +1 -1
- package/dist/commands/pr/internal/auto-commit.js +13 -7
- package/dist/commands/pr/internal/sync-branch.d.ts +36 -0
- package/dist/commands/pr/internal/sync-branch.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-branch.js +113 -0
- package/dist/commands/pr/internal/sync-github.d.ts +28 -0
- package/dist/commands/pr/internal/sync-github.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-github.js +178 -0
- package/dist/commands/pr/internal/sync-model.d.ts +36 -0
- package/dist/commands/pr/internal/sync-model.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-model.js +1 -0
- package/dist/commands/pr/internal/sync-open-step.d.ts +10 -0
- package/dist/commands/pr/internal/sync-open-step.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-open-step.js +128 -0
- package/dist/commands/pr/internal/sync-support.d.ts +7 -0
- package/dist/commands/pr/internal/sync-support.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-support.js +29 -0
- package/dist/commands/pr/internal/sync-update-step.d.ts +6 -0
- package/dist/commands/pr/internal/sync-update-step.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-update-step.js +68 -0
- package/dist/commands/pr/internal/sync.d.ts +2 -6
- package/dist/commands/pr/internal/sync.d.ts.map +1 -1
- package/dist/commands/pr/internal/sync.js +83 -525
- package/dist/commands/pr/open.d.ts.map +1 -1
- package/dist/commands/pr/open.js +62 -7
- package/dist/commands/pr/pr.command.d.ts.map +1 -1
- package/dist/commands/pr/pr.command.js +7 -2
- package/dist/commands/recipes/active.command.d.ts +7 -0
- package/dist/commands/recipes/active.command.d.ts.map +1 -0
- package/dist/commands/recipes/active.command.js +12 -0
- package/dist/commands/recipes/add.command.d.ts +8 -0
- package/dist/commands/recipes/add.command.d.ts.map +1 -0
- package/dist/commands/recipes/add.command.js +33 -0
- package/dist/commands/recipes/detach.command.d.ts +7 -0
- package/dist/commands/recipes/detach.command.d.ts.map +1 -0
- package/dist/commands/recipes/detach.command.js +19 -0
- package/dist/commands/recipes/disable.command.d.ts +7 -0
- package/dist/commands/recipes/disable.command.d.ts.map +1 -0
- package/dist/commands/recipes/disable.command.js +10 -0
- package/dist/commands/recipes/enable.command.d.ts +7 -0
- package/dist/commands/recipes/enable.command.d.ts.map +1 -0
- package/dist/commands/recipes/enable.command.js +10 -0
- package/dist/commands/recipes/explain-active.command.d.ts +5 -0
- package/dist/commands/recipes/explain-active.command.d.ts.map +1 -0
- package/dist/commands/recipes/explain-active.command.js +11 -0
- package/dist/commands/recipes/explain.command.d.ts.map +1 -1
- package/dist/commands/recipes/explain.command.js +4 -2
- 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 +34 -16
- package/dist/commands/recipes/impl/commands/active.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/active.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/active.js +47 -0
- package/dist/commands/recipes/impl/commands/add.d.ts +8 -0
- package/dist/commands/recipes/impl/commands/add.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/add.js +105 -0
- package/dist/commands/recipes/impl/commands/detach.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/detach.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/detach.js +99 -0
- package/dist/commands/recipes/impl/commands/disable.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/disable.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/disable.js +23 -0
- package/dist/commands/recipes/impl/commands/enable.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/enable.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/enable.js +41 -0
- package/dist/commands/recipes/impl/commands/explain-active.d.ts +5 -0
- package/dist/commands/recipes/impl/commands/explain-active.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/explain-active.js +20 -0
- package/dist/commands/recipes/impl/commands/explain.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/explain.js +83 -36
- package/dist/commands/recipes/impl/commands/info.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/info.js +39 -22
- package/dist/commands/recipes/impl/commands/install.d.ts +1 -1
- package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/install.js +35 -42
- package/dist/commands/recipes/impl/commands/list-remote.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/list-remote.js +2 -3
- package/dist/commands/recipes/impl/commands/list.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/list.js +13 -12
- package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/remove.js +12 -2
- package/dist/commands/recipes/impl/commands/update.d.ts +7 -0
- package/dist/commands/recipes/impl/commands/update.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/update.js +107 -0
- package/dist/commands/recipes/impl/commands.d.ts +7 -0
- package/dist/commands/recipes/impl/commands.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands.js +7 -0
- package/dist/commands/recipes/impl/constants.d.ts +1 -14
- package/dist/commands/recipes/impl/constants.d.ts.map +1 -1
- package/dist/commands/recipes/impl/constants.js +1 -18
- package/dist/commands/recipes/impl/index.d.ts +1 -1
- package/dist/commands/recipes/impl/index.d.ts.map +1 -1
- 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/mutation-transaction.d.ts +7 -0
- package/dist/commands/recipes/impl/mutation-transaction.d.ts.map +1 -0
- package/dist/commands/recipes/impl/mutation-transaction.js +47 -0
- package/dist/commands/recipes/impl/overlay-project.d.ts +48 -0
- package/dist/commands/recipes/impl/overlay-project.d.ts.map +1 -0
- package/dist/commands/recipes/impl/overlay-project.js +320 -0
- package/dist/commands/recipes/impl/paths.d.ts +17 -2
- package/dist/commands/recipes/impl/paths.d.ts.map +1 -1
- package/dist/commands/recipes/impl/paths.js +20 -5
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts +5 -4
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.js +34 -76
- package/dist/commands/recipes/impl/project-recipe-state.d.ts +18 -0
- package/dist/commands/recipes/impl/project-recipe-state.d.ts.map +1 -0
- package/dist/commands/recipes/impl/project-recipe-state.js +94 -0
- package/dist/commands/recipes/impl/project-registry.d.ts +24 -0
- package/dist/commands/recipes/impl/project-registry.d.ts.map +1 -0
- package/dist/commands/recipes/impl/project-registry.js +124 -0
- 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 +6 -4
- package/dist/commands/recipes/impl/types.d.ts +1 -240
- package/dist/commands/recipes/impl/types.d.ts.map +1 -1
- package/dist/commands/recipes/impl/version.d.ts +5 -0
- package/dist/commands/recipes/impl/version.d.ts.map +1 -0
- package/dist/commands/recipes/impl/version.js +9 -0
- package/dist/commands/recipes/info.command.js +2 -2
- package/dist/commands/recipes/install.spec.js +4 -4
- package/dist/commands/recipes/list.command.js +4 -4
- package/dist/commands/recipes/remove.command.js +2 -2
- package/dist/commands/recipes/update.command.d.ts +8 -0
- package/dist/commands/recipes/update.command.d.ts.map +1 -0
- package/dist/commands/recipes/update.command.js +35 -0
- package/dist/commands/recipes.d.ts +10 -6
- package/dist/commands/recipes.d.ts.map +1 -1
- package/dist/commands/recipes.js +8 -5
- package/dist/commands/recipes.test-helpers.d.ts +3 -3
- package/dist/commands/recipes.test-helpers.d.ts.map +1 -1
- package/dist/commands/recipes.test-helpers.js +105 -15
- package/dist/commands/release/apply.command.d.ts +1 -1
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +15 -379
- package/dist/commands/release/apply.mutation.d.ts +1 -0
- package/dist/commands/release/apply.mutation.d.ts.map +1 -1
- package/dist/commands/release/apply.mutation.js +24 -1
- package/dist/commands/release/apply.pipeline.d.ts +22 -0
- package/dist/commands/release/apply.pipeline.d.ts.map +1 -0
- package/dist/commands/release/apply.pipeline.js +371 -0
- package/dist/commands/release/apply.preflight.d.ts +2 -0
- package/dist/commands/release/apply.preflight.d.ts.map +1 -1
- package/dist/commands/release/apply.preflight.js +13 -4
- package/dist/commands/release/apply.types.d.ts +27 -0
- package/dist/commands/release/apply.types.d.ts.map +1 -1
- package/dist/commands/release.test-helpers.d.ts +4 -0
- package/dist/commands/release.test-helpers.d.ts.map +1 -1
- package/dist/commands/release.test-helpers.js +7 -0
- package/dist/commands/scenario/execute.command.js +4 -4
- package/dist/commands/scenario/impl/commands.js +4 -4
- package/dist/commands/scenario/info.command.js +4 -4
- package/dist/commands/scenario/list.command.js +3 -3
- package/dist/commands/scenario/run.command.js +5 -5
- package/dist/commands/scenario/scenario.command.js +7 -7
- package/dist/commands/shared/reconcile-check.d.ts.map +1 -1
- package/dist/commands/shared/reconcile-check.js +2 -2
- package/dist/commands/shared/task-backend.d.ts +6 -1
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +34 -2
- package/dist/commands/shared/task-handoff.d.ts +2 -1
- package/dist/commands/shared/task-handoff.d.ts.map +1 -1
- package/dist/commands/shared/task-handoff.js +15 -0
- package/dist/commands/shared/task-mutation.d.ts.map +1 -1
- package/dist/commands/shared/task-mutation.js +4 -4
- package/dist/commands/shared/task-store/intents.d.ts +34 -0
- package/dist/commands/shared/task-store/intents.d.ts.map +1 -0
- package/dist/commands/shared/task-store/intents.js +265 -0
- package/dist/commands/shared/task-store/readme.d.ts +28 -0
- package/dist/commands/shared/task-store/readme.d.ts.map +1 -0
- package/dist/commands/shared/task-store/readme.js +125 -0
- package/dist/commands/shared/task-store/store.d.ts +26 -0
- package/dist/commands/shared/task-store/store.d.ts.map +1 -0
- package/dist/commands/shared/task-store/store.js +105 -0
- package/dist/commands/shared/task-store/types.d.ts +94 -0
- package/dist/commands/shared/task-store/types.d.ts.map +1 -0
- package/dist/commands/shared/task-store/types.js +1 -0
- package/dist/commands/shared/task-store.d.ts +3 -109
- package/dist/commands/shared/task-store.d.ts.map +1 -1
- package/dist/commands/shared/task-store.js +2 -493
- package/dist/commands/task/block.d.ts.map +1 -1
- package/dist/commands/task/block.js +7 -2
- package/dist/commands/task/comment.d.ts.map +1 -1
- package/dist/commands/task/comment.js +7 -2
- package/dist/commands/task/finish-shared.d.ts.map +1 -1
- package/dist/commands/task/finish-shared.js +3 -3
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +102 -15
- package/dist/commands/task/handoff-show.command.d.ts.map +1 -1
- package/dist/commands/task/handoff-show.command.js +24 -0
- package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -1
- package/dist/commands/task/hosted-merge-sync.js +9 -4
- package/dist/commands/task/list.run.d.ts.map +1 -1
- package/dist/commands/task/list.run.js +14 -4
- package/dist/commands/task/new.command.d.ts.map +1 -1
- package/dist/commands/task/new.command.js +16 -2
- package/dist/commands/task/new.js +2 -2
- package/dist/commands/task/show.d.ts.map +1 -1
- package/dist/commands/task/show.js +3 -3
- package/dist/commands/task/update.d.ts.map +1 -1
- package/dist/commands/task/update.js +11 -3
- package/dist/runner/adapters/codex.d.ts.map +1 -1
- package/dist/runner/adapters/codex.js +3 -33
- package/dist/runner/adapters/custom.d.ts.map +1 -1
- package/dist/runner/adapters/custom.js +3 -30
- package/dist/runner/adapters/runtime-shared.d.ts +14 -0
- package/dist/runner/adapters/runtime-shared.d.ts.map +1 -0
- package/dist/runner/adapters/runtime-shared.js +36 -0
- package/dist/runner/context/base-prompt-sources.d.ts +30 -0
- package/dist/runner/context/base-prompt-sources.d.ts.map +1 -0
- package/dist/runner/context/base-prompt-sources.js +144 -0
- package/dist/runner/context/base-prompts.d.ts +5 -23
- package/dist/runner/context/base-prompts.d.ts.map +1 -1
- package/dist/runner/context/base-prompts.js +10 -358
- package/dist/runner/context/overlay-prompt-blocks.d.ts +7 -0
- package/dist/runner/context/overlay-prompt-blocks.d.ts.map +1 -0
- package/dist/runner/context/overlay-prompt-blocks.js +72 -0
- package/dist/runner/context/prompt-block-shared.d.ts +54 -0
- package/dist/runner/context/prompt-block-shared.d.ts.map +1 -0
- package/dist/runner/context/prompt-block-shared.js +106 -0
- package/dist/runner/context/recipe-context.d.ts +2 -1
- package/dist/runner/context/recipe-context.d.ts.map +1 -1
- package/dist/runner/context/recipe-context.js +41 -8
- package/dist/runner/context/recipe-prompt-blocks.d.ts +6 -0
- package/dist/runner/context/recipe-prompt-blocks.d.ts.map +1 -0
- package/dist/runner/context/recipe-prompt-blocks.js +143 -0
- package/dist/runner/types.d.ts +4 -0
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/usecases/scenario-materialize-task.js +2 -2
- package/dist/runner/usecases/task-run-inspect.js +2 -2
- package/dist/runner/usecases/task-run-lifecycle-shared.js +2 -2
- package/dist/runner/usecases/task-run.d.ts.map +1 -1
- package/dist/runner/usecases/task-run.js +6 -3
- package/dist/runtime/behavior/resolve.d.ts +2 -1
- package/dist/runtime/behavior/resolve.d.ts.map +1 -1
- package/dist/runtime/behavior/resolve.js +25 -5
- package/dist/runtime/behavior/types.d.ts +1 -0
- package/dist/runtime/behavior/types.d.ts.map +1 -1
- package/dist/runtime/capabilities/recipe.d.ts +2 -1
- package/dist/runtime/capabilities/recipe.d.ts.map +1 -1
- package/dist/runtime/capabilities/recipe.js +88 -28
- package/dist/runtime/execution-context.d.ts +63 -0
- package/dist/runtime/execution-context.d.ts.map +1 -0
- package/dist/{usecases/context/resolve-context.js → runtime/execution-context.js} +23 -26
- package/dist/runtime/incidents/advice-strategy.d.ts +15 -0
- package/dist/runtime/incidents/advice-strategy.d.ts.map +1 -0
- package/dist/runtime/incidents/advice-strategy.js +54 -0
- package/dist/runtime/incidents/plan-strategy.d.ts +9 -0
- package/dist/runtime/incidents/plan-strategy.d.ts.map +1 -0
- package/dist/runtime/incidents/plan-strategy.js +205 -0
- package/dist/runtime/incidents/registry-strategy.d.ts +6 -0
- package/dist/runtime/incidents/registry-strategy.d.ts.map +1 -0
- package/dist/runtime/incidents/registry-strategy.js +280 -0
- package/dist/runtime/incidents/resolve.d.ts +3 -25
- package/dist/runtime/incidents/resolve.d.ts.map +1 -1
- package/dist/runtime/incidents/resolve.js +3 -683
- package/dist/runtime/incidents/shared.d.ts +34 -0
- package/dist/runtime/incidents/shared.d.ts.map +1 -0
- package/dist/runtime/incidents/shared.js +171 -0
- package/dist/shared/errors.d.ts +1 -1
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/runtime-source.d.ts.map +1 -1
- package/dist/shared/runtime-source.js +8 -3
- package/dist/testing/cli-harness/recipe-archives.d.ts +28 -0
- package/dist/testing/cli-harness/recipe-archives.d.ts.map +1 -0
- package/dist/testing/cli-harness/recipe-archives.js +374 -0
- package/dist/testing/cli-harness/stdio.d.ts +26 -0
- package/dist/testing/cli-harness/stdio.d.ts.map +1 -0
- package/dist/testing/cli-harness/stdio.js +84 -0
- package/dist/testing/cli-harness.d.ts +25 -0
- package/dist/testing/cli-harness.d.ts.map +1 -0
- package/dist/testing/cli-harness.js +313 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +1 -0
- package/package.json +7 -3
- package/dist/cli/recipes-bundled.d.ts +0 -10
- package/dist/cli/recipes-bundled.d.ts.map +0 -1
- package/dist/cli/recipes-bundled.js +0 -36
- package/dist/commands/recipes/impl/manifest.d.ts +0 -4
- package/dist/commands/recipes/impl/manifest.d.ts.map +0 -1
- package/dist/commands/recipes/impl/manifest.js +0 -229
- package/dist/commands/recipes/impl/normalize.d.ts +0 -8
- package/dist/commands/recipes/impl/normalize.d.ts.map +0 -1
- package/dist/commands/recipes/impl/normalize.js +0 -54
- package/dist/commands/recipes/impl/scenario.d.ts +0 -16
- package/dist/commands/recipes/impl/scenario.d.ts.map +0 -1
- package/dist/commands/recipes/impl/scenario.js +0 -262
- package/dist/recipes/bundled-recipes.d.ts +0 -17
- package/dist/recipes/bundled-recipes.d.ts.map +0 -1
- package/dist/recipes/bundled-recipes.js +0 -15
- package/dist/usecases/context/resolve-context.d.ts +0 -68
- package/dist/usecases/context/resolve-context.d.ts.map +0 -1
- package/dist/usecases/task/task-list-usecase.d.ts +0 -9
- package/dist/usecases/task/task-list-usecase.d.ts.map +0 -1
- package/dist/usecases/task/task-list-usecase.js +0 -17
- package/dist/usecases/task/task-new-usecase.d.ts +0 -9
- package/dist/usecases/task/task-new-usecase.d.ts.map +0 -1
- package/dist/usecases/task/task-new-usecase.js +0 -17
|
@@ -35,7 +35,30 @@ export async function replaceAgentplanePackageMetadata(pkgJsonPath, nextVersion)
|
|
|
35
35
|
"Ensure packages/agentplane/package.json declares this dependency.",
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
const withRecipesDependency = withDependency.replace(/("@agentplaneorg\/recipes"\s*:\s*")[^"]*(")/u, `$1${nextVersion}$2`);
|
|
39
|
+
if (withRecipesDependency === withDependency) {
|
|
40
|
+
throw new CliError({
|
|
41
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
42
|
+
code: "E_VALIDATION",
|
|
43
|
+
message: `Failed to update @agentplaneorg/recipes dependency in ${pkgJsonPath}. ` +
|
|
44
|
+
"Ensure packages/agentplane/package.json declares this dependency.",
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
await writeFile(pkgJsonPath, withRecipesDependency, "utf8");
|
|
48
|
+
}
|
|
49
|
+
export async function replacePackageDependencyVersion(pkgJsonPath, dependencyName, nextVersion) {
|
|
50
|
+
const text = await readFile(pkgJsonPath, "utf8");
|
|
51
|
+
const pattern = new RegExp(`("${dependencyName.replace("/", "\\/")}"\\s*:\\s*")[^"]*(")`, "u");
|
|
52
|
+
const replaced = text.replace(pattern, `$1${nextVersion}$2`);
|
|
53
|
+
if (replaced === text) {
|
|
54
|
+
throw new CliError({
|
|
55
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
56
|
+
code: "E_VALIDATION",
|
|
57
|
+
message: `Failed to update ${dependencyName} dependency in ${pkgJsonPath}. ` +
|
|
58
|
+
"Ensure the package.json declares this dependency.",
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
await writeFile(pkgJsonPath, replaced, "utf8");
|
|
39
62
|
}
|
|
40
63
|
export async function maybeUpdateBunLockfile(gitRoot, fileExists) {
|
|
41
64
|
const bunLockPath = path.join(gitRoot, "bun.lock");
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ResolvedProject } from "@agentplaneorg/core";
|
|
2
|
+
import type { CommandSpec } from "../../cli/spec/spec.js";
|
|
3
|
+
import type { ReleaseApplyParsed, ReleaseCommandRouteResolver } from "./apply.types.js";
|
|
4
|
+
export declare function runReleaseCommandPipeline(opts: {
|
|
5
|
+
ctx: {
|
|
6
|
+
cwd: string;
|
|
7
|
+
rootOverride?: string | null;
|
|
8
|
+
};
|
|
9
|
+
flags: ReleaseApplyParsed;
|
|
10
|
+
spec: CommandSpec<ReleaseApplyParsed>;
|
|
11
|
+
commandLabel: string;
|
|
12
|
+
routeResolver: ReleaseCommandRouteResolver;
|
|
13
|
+
}): Promise<number>;
|
|
14
|
+
export type ReleaseApplyRouteResolverArgs = {
|
|
15
|
+
cwd: string;
|
|
16
|
+
rootOverride?: string | null;
|
|
17
|
+
gitRoot: string;
|
|
18
|
+
agentplaneDir: string;
|
|
19
|
+
};
|
|
20
|
+
export type ReleaseApplyResolvedProject = ResolvedProject;
|
|
21
|
+
export { pushReleaseCandidateBranch, pushReleaseRefs } from "./apply.reporting.js";
|
|
22
|
+
//# sourceMappingURL=apply.pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply.pipeline.d.ts","sourceRoot":"","sources":["../../../src/commands/release/apply.pipeline.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAsC1D,OAAO,KAAK,EACV,kBAAkB,EAIlB,2BAA2B,EAG5B,MAAM,kBAAkB,CAAC;AAgc1B,wBAAsB,yBAAyB,CAAC,IAAI,EAAE;IACpD,GAAG,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACnD,KAAK,EAAE,kBAAkB,CAAC;IAC1B,IAAI,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,2BAA2B,CAAC;CAC5C,GAAG,OAAO,CAAC,MAAM,CAAC,CAwBlB;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,eAAe,CAAC;AAE1D,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { extractTaskSuffix, loadConfig, resolveProject, } from "@agentplaneorg/core";
|
|
3
|
+
import { createCliEmitter, emitCommandResult } from "../../cli/output.js";
|
|
4
|
+
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
5
|
+
import { usageError } from "../../cli/spec/errors.js";
|
|
6
|
+
import { withDiagnosticContext } from "../../shared/diagnostics.js";
|
|
7
|
+
import { CliError } from "../../shared/errors.js";
|
|
8
|
+
import { execFileAsync, gitEnv } from "../shared/git.js";
|
|
9
|
+
import { GitContext } from "../shared/git-context.js";
|
|
10
|
+
import { ensureActionApproved } from "../shared/approval-requirements.js";
|
|
11
|
+
import { ensureNetworkApproved } from "../shared/network-approval.js";
|
|
12
|
+
import { runOperatorPipeline } from "../shared/operator-pipeline.js";
|
|
13
|
+
import { parseTaskIdFromBranch } from "../shared/git-worktree.js";
|
|
14
|
+
import { cleanHookEnv, maybePersistExpectedCliVersion, maybeRefreshGeneratedReference, maybeUpdateBunLockfile, replaceAgentplanePackageMetadata, replacePackageDependencyVersion, replacePackageVersionInFile, } from "./apply.mutation.js";
|
|
15
|
+
import { ensureCleanTrackedTree, ensureNpmVersionsAvailable, ensureRemoteExists, ensureRemoteTagDoesNotExist, ensureTagDoesNotExist, fileExists, loadReleasePlan, readAgentplaneDependencyVersion, readCoreDependencyVersion, readPackageVersion, readRecipesDependencyVersion, runReleasePrepublishGate, validateReleaseNotes, } from "./apply.preflight.js";
|
|
16
|
+
import { pushReleaseCandidateBranch, pushReleaseRefs, writeReleaseApplyReport, } from "./apply.reporting.js";
|
|
17
|
+
const output = createCliEmitter();
|
|
18
|
+
function emitReleaseLine(text) {
|
|
19
|
+
emitCommandResult(output, { kind: "line", text });
|
|
20
|
+
}
|
|
21
|
+
async function resolveReleasePlanInputs(opts) {
|
|
22
|
+
const { planDir, plan, minBullets } = await loadReleasePlan({
|
|
23
|
+
gitRoot: opts.gitRoot,
|
|
24
|
+
planOverride: opts.planOverride,
|
|
25
|
+
});
|
|
26
|
+
if (!/^v\d+\.\d+\.\d+$/u.test(plan.nextTag)) {
|
|
27
|
+
throw new CliError({
|
|
28
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
29
|
+
code: "E_VALIDATION",
|
|
30
|
+
message: `Invalid nextTag in version.json (expected vX.Y.Z): ${plan.nextTag}`,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
const notesPath = path.join(opts.gitRoot, "docs", "releases", `${plan.nextTag}.md`);
|
|
34
|
+
if (!(await fileExists(notesPath))) {
|
|
35
|
+
throw new CliError({
|
|
36
|
+
exitCode: exitCodeForError("E_IO"),
|
|
37
|
+
code: "E_IO",
|
|
38
|
+
message: `Missing release notes: ${path.relative(opts.gitRoot, notesPath)}\n` +
|
|
39
|
+
"Write this file using a DOCS agent before applying the release.",
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
await validateReleaseNotes(notesPath, minBullets);
|
|
43
|
+
return { planDir, plan, notesPath };
|
|
44
|
+
}
|
|
45
|
+
async function ensureReleasePlanMatchesRepoState(opts) {
|
|
46
|
+
const [coreVersion, agentplaneVersion, recipesVersion, coreDependencyVersion, recipesDependencyVersion,] = await Promise.all([
|
|
47
|
+
readPackageVersion(opts.corePkgPath),
|
|
48
|
+
readPackageVersion(opts.agentplanePkgPath),
|
|
49
|
+
readPackageVersion(opts.recipesPkgPath),
|
|
50
|
+
readCoreDependencyVersion(opts.agentplanePkgPath),
|
|
51
|
+
readRecipesDependencyVersion(opts.agentplanePkgPath),
|
|
52
|
+
]);
|
|
53
|
+
if (coreVersion !== agentplaneVersion || coreVersion !== recipesVersion) {
|
|
54
|
+
throw new CliError({
|
|
55
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
56
|
+
code: "E_VALIDATION",
|
|
57
|
+
message: `Package versions must match before applying a release. ` +
|
|
58
|
+
`packages/core=${coreVersion} packages/agentplane=${agentplaneVersion} packages/recipes=${recipesVersion}`,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
if (coreDependencyVersion !== coreVersion) {
|
|
62
|
+
throw new CliError({
|
|
63
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
64
|
+
code: "E_VALIDATION",
|
|
65
|
+
message: "Release dependency parity check failed before apply. " +
|
|
66
|
+
`packages/agentplane dependency @agentplaneorg/core=${coreDependencyVersion} ` +
|
|
67
|
+
`must match packages/core version ${coreVersion}.`,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (recipesDependencyVersion !== coreVersion) {
|
|
71
|
+
throw new CliError({
|
|
72
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
73
|
+
code: "E_VALIDATION",
|
|
74
|
+
message: "Release dependency parity check failed before apply. " +
|
|
75
|
+
`packages/agentplane dependency @agentplaneorg/recipes=${recipesDependencyVersion} ` +
|
|
76
|
+
`must match packages/recipes version ${coreVersion}.`,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (await fileExists(opts.testkitPkgPath)) {
|
|
80
|
+
const testkitAgentplaneDependencyVersion = await readAgentplaneDependencyVersion(opts.testkitPkgPath);
|
|
81
|
+
if (testkitAgentplaneDependencyVersion !== agentplaneVersion) {
|
|
82
|
+
throw new CliError({
|
|
83
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
84
|
+
code: "E_VALIDATION",
|
|
85
|
+
message: "Release dependency parity check failed before apply. " +
|
|
86
|
+
`packages/testkit dependency agentplane=${testkitAgentplaneDependencyVersion} ` +
|
|
87
|
+
`must match packages/agentplane version ${agentplaneVersion}.`,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
await ensureCleanTrackedTree(opts.gitRoot);
|
|
92
|
+
await ensureTagDoesNotExist(opts.gitRoot, opts.plan.nextTag);
|
|
93
|
+
if (coreVersion !== opts.plan.prevVersion) {
|
|
94
|
+
throw new CliError({
|
|
95
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
96
|
+
code: "E_VALIDATION",
|
|
97
|
+
message: `Current version does not match the release-plan baseline. ` +
|
|
98
|
+
`current=${coreVersion} expected_prev=${opts.plan.prevVersion} expected_next=${opts.plan.nextVersion}\n` +
|
|
99
|
+
"Re-run `agentplane release plan` to generate a fresh plan for this repo state.",
|
|
100
|
+
context: withDiagnosticContext({ command: "release apply" }, {
|
|
101
|
+
state: "the repository version no longer matches the prepared release-plan baseline",
|
|
102
|
+
likelyCause: "package versions changed after the plan was generated, so continuing would apply the release over a partially drifted local state",
|
|
103
|
+
nextAction: {
|
|
104
|
+
command: "agentplane release plan",
|
|
105
|
+
reason: "generate a fresh release plan from the current repository state before applying the release",
|
|
106
|
+
reasonCode: "release_plan_drifted",
|
|
107
|
+
},
|
|
108
|
+
}),
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async function runPushPreflight(opts) {
|
|
113
|
+
const loaded = await loadConfig(opts.agentplaneDir);
|
|
114
|
+
const pushReason = opts.route.kind === "release_candidate"
|
|
115
|
+
? `${opts.commandLabel} will push current branch ${opts.route.current_branch} to ${opts.remote} as a release candidate for ${opts.nextTag}; final publication remains gated on merge to ${opts.route.base_branch}`
|
|
116
|
+
: `${opts.commandLabel} will push HEAD and ${opts.nextTag} to ${opts.remote}`;
|
|
117
|
+
await ensureNetworkApproved({
|
|
118
|
+
action: opts.route.kind === "release_candidate" ? "release_candidate" : "release_apply",
|
|
119
|
+
config: loaded.config,
|
|
120
|
+
yes: opts.yes,
|
|
121
|
+
reason: `${opts.commandLabel} validates npm version availability and pushes over network`,
|
|
122
|
+
interactive: Boolean(process.stdin.isTTY),
|
|
123
|
+
});
|
|
124
|
+
await ensureActionApproved({
|
|
125
|
+
action: "git_push",
|
|
126
|
+
config: loaded.config,
|
|
127
|
+
yes: opts.yes,
|
|
128
|
+
reason: pushReason,
|
|
129
|
+
interactive: Boolean(process.stdin.isTTY),
|
|
130
|
+
});
|
|
131
|
+
await ensureRemoteExists(opts.gitRoot, opts.remote);
|
|
132
|
+
await ensureRemoteTagDoesNotExist(opts.gitRoot, opts.remote, opts.nextTag);
|
|
133
|
+
await ensureNpmVersionsAvailable(opts.gitRoot, opts.nextVersion);
|
|
134
|
+
await runReleasePrepublishGate(opts.gitRoot);
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
async function applyReleaseMutation(opts) {
|
|
138
|
+
let releaseCommit = null;
|
|
139
|
+
await Promise.all([
|
|
140
|
+
replacePackageVersionInFile(opts.corePkgPath, opts.nextVersion),
|
|
141
|
+
replacePackageVersionInFile(opts.recipesPkgPath, opts.nextVersion),
|
|
142
|
+
replaceAgentplanePackageMetadata(opts.agentplanePkgPath, opts.nextVersion),
|
|
143
|
+
]);
|
|
144
|
+
if (await fileExists(opts.testkitPkgPath)) {
|
|
145
|
+
await replacePackageDependencyVersion(opts.testkitPkgPath, "agentplane", opts.nextVersion);
|
|
146
|
+
}
|
|
147
|
+
const expectedCliVersionPersisted = await maybePersistExpectedCliVersion(opts.agentplaneDir, opts.nextVersion);
|
|
148
|
+
await maybeUpdateBunLockfile(opts.gitRoot, fileExists);
|
|
149
|
+
const generatedReferenceExists = await maybeRefreshGeneratedReference(opts.gitRoot, fileExists);
|
|
150
|
+
const stagePaths = [
|
|
151
|
+
"packages/core/package.json",
|
|
152
|
+
"packages/agentplane/package.json",
|
|
153
|
+
"packages/recipes/package.json",
|
|
154
|
+
path.relative(opts.gitRoot, opts.notesPath),
|
|
155
|
+
];
|
|
156
|
+
if (await fileExists(opts.testkitPkgPath)) {
|
|
157
|
+
stagePaths.push("packages/testkit/package.json");
|
|
158
|
+
}
|
|
159
|
+
if (expectedCliVersionPersisted) {
|
|
160
|
+
stagePaths.push(".agentplane/config.json");
|
|
161
|
+
}
|
|
162
|
+
if (generatedReferenceExists) {
|
|
163
|
+
stagePaths.push("docs/reference/generated-reference.mdx");
|
|
164
|
+
}
|
|
165
|
+
if (await fileExists(path.join(opts.gitRoot, "bun.lock"))) {
|
|
166
|
+
stagePaths.push("bun.lock");
|
|
167
|
+
}
|
|
168
|
+
await opts.git.stage(stagePaths);
|
|
169
|
+
const staged = await opts.git.statusStagedPaths();
|
|
170
|
+
if (staged.length === 0) {
|
|
171
|
+
emitReleaseLine("No changes to commit.");
|
|
172
|
+
return { releaseCommit };
|
|
173
|
+
}
|
|
174
|
+
const taskId = opts.route.kind === "release_candidate"
|
|
175
|
+
? parseTaskIdFromBranch(opts.taskBranchPrefix, opts.route.current_branch)
|
|
176
|
+
: null;
|
|
177
|
+
const subject = taskId
|
|
178
|
+
? `✨ ${extractTaskSuffix(taskId)} release: publish ${opts.nextTag}`
|
|
179
|
+
: `✨ release: publish ${opts.nextTag}`;
|
|
180
|
+
await opts.git.commit({ message: subject, env: cleanHookEnv() });
|
|
181
|
+
const { stdout: headHash } = await execFileAsync("git", ["rev-parse", "HEAD"], {
|
|
182
|
+
cwd: opts.gitRoot,
|
|
183
|
+
env: gitEnv(),
|
|
184
|
+
});
|
|
185
|
+
releaseCommit = { hash: String(headHash ?? "").trim(), subject };
|
|
186
|
+
return { releaseCommit };
|
|
187
|
+
}
|
|
188
|
+
async function finalizeReleaseApply(opts) {
|
|
189
|
+
const tagCreated = opts.route.kind === "direct_release";
|
|
190
|
+
const pushedRefs = [];
|
|
191
|
+
if (tagCreated) {
|
|
192
|
+
await execFileAsync("git", ["tag", opts.plan.nextTag], {
|
|
193
|
+
cwd: opts.gitRoot,
|
|
194
|
+
env: gitEnv(),
|
|
195
|
+
});
|
|
196
|
+
emitReleaseLine(`Release tag created: ${opts.plan.nextTag}`);
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
emitReleaseLine(`Release candidate prepared on ${opts.route.current_branch}; skipped local tag creation for ${opts.plan.nextTag} because final publication is deferred until merge to ${opts.route.base_branch}.`);
|
|
200
|
+
}
|
|
201
|
+
if (opts.push) {
|
|
202
|
+
if (opts.route.kind === "release_candidate") {
|
|
203
|
+
await pushReleaseCandidateBranch(opts.gitRoot, opts.remote);
|
|
204
|
+
pushedRefs.push("HEAD");
|
|
205
|
+
emitReleaseLine(`Pushed: ${opts.remote} ${opts.route.current_branch} (release candidate branch only; no tag pushed)`);
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
await pushReleaseRefs(opts.gitRoot, opts.remote, opts.plan.nextTag);
|
|
209
|
+
pushedRefs.push("HEAD", opts.plan.nextTag);
|
|
210
|
+
emitReleaseLine(`Pushed: ${opts.remote} HEAD + ${opts.plan.nextTag}`);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
else if (opts.route.kind === "release_candidate") {
|
|
214
|
+
emitReleaseLine(`Next: git push <remote> HEAD # merge ${opts.route.current_branch} into ${opts.route.base_branch} before publishing ${opts.plan.nextTag}`);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
emitReleaseLine(`Next: git push <remote> HEAD && git push <remote> ${opts.plan.nextTag}`);
|
|
218
|
+
}
|
|
219
|
+
const reportPath = await writeReleaseApplyReport(opts.gitRoot, {
|
|
220
|
+
applied_at: new Date().toISOString(),
|
|
221
|
+
plan_dir: path.relative(opts.gitRoot, opts.planDir),
|
|
222
|
+
notes_path: path.relative(opts.gitRoot, opts.notesPath),
|
|
223
|
+
prev_version: opts.plan.prevVersion,
|
|
224
|
+
next_version: opts.plan.nextVersion,
|
|
225
|
+
prev_tag: opts.plan.prevTag,
|
|
226
|
+
next_tag: opts.plan.nextTag,
|
|
227
|
+
bump: opts.plan.bump,
|
|
228
|
+
checks: {
|
|
229
|
+
clean_tracked_tree: true,
|
|
230
|
+
tag_absent: true,
|
|
231
|
+
notes_validated: true,
|
|
232
|
+
npm_version_available_checked: opts.npmVersionChecked,
|
|
233
|
+
},
|
|
234
|
+
commit: opts.releaseCommit,
|
|
235
|
+
route: opts.route,
|
|
236
|
+
tag: {
|
|
237
|
+
name: opts.plan.nextTag,
|
|
238
|
+
created: tagCreated,
|
|
239
|
+
pushed: tagCreated && opts.push,
|
|
240
|
+
},
|
|
241
|
+
push: {
|
|
242
|
+
requested: opts.push,
|
|
243
|
+
remote: opts.remote,
|
|
244
|
+
performed: pushedRefs.length > 0,
|
|
245
|
+
refs: pushedRefs,
|
|
246
|
+
},
|
|
247
|
+
});
|
|
248
|
+
emitReleaseLine(`Release report: ${path.relative(opts.gitRoot, reportPath)}`);
|
|
249
|
+
return 0;
|
|
250
|
+
}
|
|
251
|
+
async function buildReleaseCommandState(opts) {
|
|
252
|
+
const resolved = await resolveProject({
|
|
253
|
+
cwd: opts.cwd,
|
|
254
|
+
rootOverride: opts.rootOverride ?? null,
|
|
255
|
+
});
|
|
256
|
+
const gitRoot = resolved.gitRoot;
|
|
257
|
+
const { planDir, plan, notesPath } = await resolveReleasePlanInputs({
|
|
258
|
+
gitRoot,
|
|
259
|
+
planOverride: opts.planOverride,
|
|
260
|
+
});
|
|
261
|
+
const loaded = await loadConfig(resolved.agentplaneDir);
|
|
262
|
+
return {
|
|
263
|
+
resolved,
|
|
264
|
+
gitRoot,
|
|
265
|
+
planDir,
|
|
266
|
+
plan,
|
|
267
|
+
notesPath,
|
|
268
|
+
taskBranchPrefix: loaded.config.branch.task_prefix,
|
|
269
|
+
route: await opts.routeResolver({
|
|
270
|
+
cwd: opts.cwd,
|
|
271
|
+
rootOverride: opts.rootOverride ?? null,
|
|
272
|
+
gitRoot,
|
|
273
|
+
agentplaneDir: resolved.agentplaneDir,
|
|
274
|
+
}),
|
|
275
|
+
corePkgPath: path.join(gitRoot, "packages", "core", "package.json"),
|
|
276
|
+
agentplanePkgPath: path.join(gitRoot, "packages", "agentplane", "package.json"),
|
|
277
|
+
recipesPkgPath: path.join(gitRoot, "packages", "recipes", "package.json"),
|
|
278
|
+
testkitPkgPath: path.join(gitRoot, "packages", "testkit", "package.json"),
|
|
279
|
+
npmVersionChecked: false,
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
function assertReleaseBumpApproved(opts) {
|
|
283
|
+
if ((opts.plan.bump === "minor" || opts.plan.bump === "major") && opts.flags.yes !== true) {
|
|
284
|
+
throw usageError({
|
|
285
|
+
spec: opts.spec,
|
|
286
|
+
command: opts.commandLabel,
|
|
287
|
+
message: `Bump '${opts.plan.bump}' requires explicit approval. Re-run with --yes.`,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
async function runReleaseCommandPreflight(opts) {
|
|
292
|
+
assertReleaseBumpApproved({
|
|
293
|
+
flags: opts.flags,
|
|
294
|
+
plan: opts.state.plan,
|
|
295
|
+
spec: opts.spec,
|
|
296
|
+
commandLabel: opts.commandLabel,
|
|
297
|
+
});
|
|
298
|
+
await ensureReleasePlanMatchesRepoState({
|
|
299
|
+
gitRoot: opts.state.gitRoot,
|
|
300
|
+
plan: opts.state.plan,
|
|
301
|
+
corePkgPath: opts.state.corePkgPath,
|
|
302
|
+
agentplanePkgPath: opts.state.agentplanePkgPath,
|
|
303
|
+
recipesPkgPath: opts.state.recipesPkgPath,
|
|
304
|
+
testkitPkgPath: opts.state.testkitPkgPath,
|
|
305
|
+
});
|
|
306
|
+
if (opts.flags.push) {
|
|
307
|
+
opts.state.npmVersionChecked = await runPushPreflight({
|
|
308
|
+
agentplaneDir: opts.state.resolved.agentplaneDir,
|
|
309
|
+
gitRoot: opts.state.gitRoot,
|
|
310
|
+
remote: opts.flags.remote,
|
|
311
|
+
nextTag: opts.state.plan.nextTag,
|
|
312
|
+
nextVersion: opts.state.plan.nextVersion,
|
|
313
|
+
route: opts.state.route,
|
|
314
|
+
yes: opts.flags.yes,
|
|
315
|
+
commandLabel: `${opts.commandLabel} --push`,
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
async function runReleaseCommandExecute(state) {
|
|
320
|
+
const git = new GitContext({ gitRoot: state.gitRoot });
|
|
321
|
+
return await applyReleaseMutation({
|
|
322
|
+
agentplaneDir: state.resolved.agentplaneDir,
|
|
323
|
+
gitRoot: state.gitRoot,
|
|
324
|
+
git,
|
|
325
|
+
notesPath: state.notesPath,
|
|
326
|
+
corePkgPath: state.corePkgPath,
|
|
327
|
+
agentplanePkgPath: state.agentplanePkgPath,
|
|
328
|
+
recipesPkgPath: state.recipesPkgPath,
|
|
329
|
+
testkitPkgPath: state.testkitPkgPath,
|
|
330
|
+
nextTag: state.plan.nextTag,
|
|
331
|
+
nextVersion: state.plan.nextVersion,
|
|
332
|
+
route: state.route,
|
|
333
|
+
taskBranchPrefix: state.taskBranchPrefix,
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
async function runReleaseCommandFinalize(opts) {
|
|
337
|
+
return await finalizeReleaseApply({
|
|
338
|
+
gitRoot: opts.state.gitRoot,
|
|
339
|
+
planDir: opts.state.planDir,
|
|
340
|
+
notesPath: opts.state.notesPath,
|
|
341
|
+
plan: opts.state.plan,
|
|
342
|
+
npmVersionChecked: opts.state.npmVersionChecked,
|
|
343
|
+
releaseCommit: opts.mutation.releaseCommit,
|
|
344
|
+
route: opts.state.route,
|
|
345
|
+
push: opts.flags.push,
|
|
346
|
+
remote: opts.flags.remote,
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
export async function runReleaseCommandPipeline(opts) {
|
|
350
|
+
return await runOperatorPipeline({
|
|
351
|
+
init: async () => await buildReleaseCommandState({
|
|
352
|
+
cwd: opts.ctx.cwd,
|
|
353
|
+
rootOverride: opts.ctx.rootOverride ?? null,
|
|
354
|
+
planOverride: opts.flags.plan,
|
|
355
|
+
routeResolver: opts.routeResolver,
|
|
356
|
+
}),
|
|
357
|
+
preflight: async (state) => await runReleaseCommandPreflight({
|
|
358
|
+
state,
|
|
359
|
+
flags: opts.flags,
|
|
360
|
+
spec: opts.spec,
|
|
361
|
+
commandLabel: opts.commandLabel,
|
|
362
|
+
}),
|
|
363
|
+
execute: async (state) => await runReleaseCommandExecute(state),
|
|
364
|
+
finalize: async (state, mutation) => await runReleaseCommandFinalize({
|
|
365
|
+
state,
|
|
366
|
+
mutation,
|
|
367
|
+
flags: opts.flags,
|
|
368
|
+
}),
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
export { pushReleaseCandidateBranch, pushReleaseRefs } from "./apply.reporting.js";
|
|
@@ -5,6 +5,8 @@ export declare function parseVersionPlan(raw: unknown): ReleaseVersionPlan;
|
|
|
5
5
|
export declare function findLatestPlanDir(gitRoot: string): Promise<string>;
|
|
6
6
|
export declare function readPackageVersion(pkgJsonPath: string): Promise<string>;
|
|
7
7
|
export declare function readCoreDependencyVersion(pkgJsonPath: string): Promise<string>;
|
|
8
|
+
export declare function readRecipesDependencyVersion(pkgJsonPath: string): Promise<string>;
|
|
9
|
+
export declare function readAgentplaneDependencyVersion(pkgJsonPath: string): Promise<string>;
|
|
8
10
|
export declare function validateReleaseNotes(notesPath: string, minBullets: number): Promise<void>;
|
|
9
11
|
export declare function ensureCleanTrackedTree(gitRoot: string): Promise<void>;
|
|
10
12
|
export declare function ensureTagDoesNotExist(gitRoot: string, tag: string): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.preflight.d.ts","sourceRoot":"","sources":["../../../src/commands/release/apply.preflight.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,wBAAsB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO5D;AAED,wBAAsB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAE3D;AAaD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,kBAAkB,CAuBjE;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBxE;AAED,wBAAsB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAW7E;
|
|
1
|
+
{"version":3,"file":"apply.preflight.d.ts","sourceRoot":"","sources":["../../../src/commands/release/apply.preflight.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,wBAAsB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO5D;AAED,wBAAsB,YAAY,CAAC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AO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA0C7E;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC;IAC/F,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAwBD"}
|
|
@@ -79,20 +79,29 @@ export async function readPackageVersion(pkgJsonPath) {
|
|
|
79
79
|
}
|
|
80
80
|
return version;
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
async function readDependencyVersion(pkgJsonPath, dependencyName) {
|
|
83
83
|
const raw = JSON.parse(await readFile(pkgJsonPath, "utf8"));
|
|
84
|
-
const value = raw.dependencies?.[
|
|
84
|
+
const value = raw.dependencies?.[dependencyName];
|
|
85
85
|
const version = typeof value === "string" ? value.trim() : "";
|
|
86
86
|
if (!version) {
|
|
87
87
|
throw new CliError({
|
|
88
88
|
exitCode: exitCodeForError("E_VALIDATION"),
|
|
89
89
|
code: "E_VALIDATION",
|
|
90
|
-
message: `Missing dependency
|
|
91
|
-
|
|
90
|
+
message: `Missing dependency ${dependencyName} in ${pkgJsonPath}. ` +
|
|
91
|
+
`Release parity requires packages/agentplane to pin ${dependencyName} to the same version.`,
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
return version;
|
|
95
95
|
}
|
|
96
|
+
export async function readCoreDependencyVersion(pkgJsonPath) {
|
|
97
|
+
return await readDependencyVersion(pkgJsonPath, "@agentplaneorg/core");
|
|
98
|
+
}
|
|
99
|
+
export async function readRecipesDependencyVersion(pkgJsonPath) {
|
|
100
|
+
return await readDependencyVersion(pkgJsonPath, "@agentplaneorg/recipes");
|
|
101
|
+
}
|
|
102
|
+
export async function readAgentplaneDependencyVersion(pkgJsonPath) {
|
|
103
|
+
return await readDependencyVersion(pkgJsonPath, "agentplane");
|
|
104
|
+
}
|
|
96
105
|
export async function validateReleaseNotes(notesPath, minBullets) {
|
|
97
106
|
const content = await readFile(notesPath, "utf8");
|
|
98
107
|
if (!/release\s+notes/i.test(content)) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ResolvedProject } from "@agentplaneorg/core";
|
|
1
2
|
export type BumpKind = "patch" | "minor" | "major";
|
|
2
3
|
export type ReleaseApplyFlags = {
|
|
3
4
|
plan?: string;
|
|
@@ -56,4 +57,30 @@ export type ReleaseApplyReport = {
|
|
|
56
57
|
refs: string[];
|
|
57
58
|
};
|
|
58
59
|
};
|
|
60
|
+
export type ReleaseCommandState = {
|
|
61
|
+
resolved: ResolvedProject;
|
|
62
|
+
gitRoot: string;
|
|
63
|
+
planDir: string;
|
|
64
|
+
plan: ReleaseVersionPlan;
|
|
65
|
+
notesPath: string;
|
|
66
|
+
taskBranchPrefix: string;
|
|
67
|
+
route: ReleaseApplyRoute;
|
|
68
|
+
corePkgPath: string;
|
|
69
|
+
agentplanePkgPath: string;
|
|
70
|
+
recipesPkgPath: string;
|
|
71
|
+
testkitPkgPath: string;
|
|
72
|
+
npmVersionChecked: boolean;
|
|
73
|
+
};
|
|
74
|
+
export type ReleaseCommandMutation = {
|
|
75
|
+
releaseCommit: {
|
|
76
|
+
hash: string;
|
|
77
|
+
subject: string;
|
|
78
|
+
} | null;
|
|
79
|
+
};
|
|
80
|
+
export type ReleaseCommandRouteResolver = (opts: {
|
|
81
|
+
cwd: string;
|
|
82
|
+
rootOverride?: string | null;
|
|
83
|
+
gitRoot: string;
|
|
84
|
+
agentplaneDir: string;
|
|
85
|
+
}) => Promise<ReleaseApplyRoute>;
|
|
59
86
|
//# sourceMappingURL=apply.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.types.d.ts","sourceRoot":"","sources":["../../../src/commands/release/apply.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C;IAChB,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,iBAAiB,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,aAAa,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,CAAC,IAAI,EAAE;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -3,7 +3,9 @@ export declare function writeReleaseNotes(root: string, version: string, body?:
|
|
|
3
3
|
export declare function seedReleaseWorkspace(root: string, opts?: {
|
|
4
4
|
coreVersion?: string;
|
|
5
5
|
cliVersion?: string;
|
|
6
|
+
recipesVersion?: string;
|
|
6
7
|
dependencyVersion?: string;
|
|
8
|
+
recipesDependencyVersion?: string;
|
|
7
9
|
extraDependencies?: Record<string, string>;
|
|
8
10
|
extraWorkspacePackages?: {
|
|
9
11
|
relDir: string;
|
|
@@ -19,7 +21,9 @@ export declare function initReleaseWorkspace(opts?: {
|
|
|
19
21
|
prefix?: string;
|
|
20
22
|
coreVersion?: string;
|
|
21
23
|
cliVersion?: string;
|
|
24
|
+
recipesVersion?: string;
|
|
22
25
|
dependencyVersion?: string;
|
|
26
|
+
recipesDependencyVersion?: string;
|
|
23
27
|
extraDependencies?: Record<string, string>;
|
|
24
28
|
extraWorkspacePackages?: {
|
|
25
29
|
relDir: string;
|
|
@@ -1 +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,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,sBAAsB,CAAC,EAAE;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,EAAE,CAAC;IACJ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,GACL,OAAO,CAAC,IAAI,CAAC,
|
|
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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EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,EAAE,CAAC;IACJ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,GACL,OAAO,CAAC,MAAM,CAAC,CAIjB"}
|
|
@@ -14,9 +14,12 @@ export async function writeReleaseNotes(root, version, body = "# Notes\n") {
|
|
|
14
14
|
export async function seedReleaseWorkspace(root, opts = {}) {
|
|
15
15
|
const coreVersion = opts.coreVersion ?? "1.2.3";
|
|
16
16
|
const cliVersion = opts.cliVersion ?? coreVersion;
|
|
17
|
+
const recipesVersion = opts.recipesVersion ?? cliVersion;
|
|
17
18
|
const dependencyVersion = opts.dependencyVersion ?? coreVersion;
|
|
19
|
+
const recipesDependencyVersion = opts.recipesDependencyVersion ?? recipesVersion;
|
|
18
20
|
const dependencies = {
|
|
19
21
|
"@agentplaneorg/core": dependencyVersion,
|
|
22
|
+
"@agentplaneorg/recipes": recipesDependencyVersion,
|
|
20
23
|
};
|
|
21
24
|
if (opts.extraDependencies) {
|
|
22
25
|
Object.assign(dependencies, opts.extraDependencies);
|
|
@@ -30,6 +33,10 @@ export async function seedReleaseWorkspace(root, opts = {}) {
|
|
|
30
33
|
version: cliVersion,
|
|
31
34
|
dependencies,
|
|
32
35
|
});
|
|
36
|
+
await writePackageJson(root, "packages/recipes", {
|
|
37
|
+
name: "@agentplaneorg/recipes",
|
|
38
|
+
version: recipesVersion,
|
|
39
|
+
});
|
|
33
40
|
for (const pkg of opts.extraWorkspacePackages ?? []) {
|
|
34
41
|
await writePackageJson(root, pkg.relDir, {
|
|
35
42
|
name: pkg.name,
|
|
@@ -10,14 +10,14 @@ import { cmdTaskStartReady } from "../task/start-ready.js";
|
|
|
10
10
|
import { CliError } from "../../shared/errors.js";
|
|
11
11
|
const output = createCliEmitter();
|
|
12
12
|
export const scenarioExecuteSpec = {
|
|
13
|
-
id: ["scenario", "execute"],
|
|
14
|
-
group: "
|
|
13
|
+
id: ["recipes", "scenario", "execute"],
|
|
14
|
+
group: "Recipes",
|
|
15
15
|
summary: "Materialize a recipe-backed task and execute it through the shared runner flow.",
|
|
16
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
17
|
args: [{ name: "id", required: true, valueHint: "<recipe:scenario>" }],
|
|
18
18
|
examples: [
|
|
19
19
|
{
|
|
20
|
-
cmd: "agentplane scenario execute viewer:demo",
|
|
20
|
+
cmd: "agentplane recipes scenario execute viewer:demo",
|
|
21
21
|
why: "Create a task from the scenario template and execute it through the configured runner.",
|
|
22
22
|
},
|
|
23
23
|
],
|
|
@@ -27,7 +27,7 @@ export const scenarioExecuteSpec = {
|
|
|
27
27
|
if (!recipeId || !scenarioId) {
|
|
28
28
|
throw usageError({
|
|
29
29
|
spec: scenarioExecuteSpec,
|
|
30
|
-
command: "scenario execute",
|
|
30
|
+
command: "recipes scenario execute",
|
|
31
31
|
message: `Invalid scenario id: ${id} (expected: <recipe:scenario>)`,
|
|
32
32
|
});
|
|
33
33
|
}
|
|
@@ -187,7 +187,7 @@ export async function cmdScenarioListParsed(opts) {
|
|
|
187
187
|
catch (err) {
|
|
188
188
|
if (err instanceof CliError)
|
|
189
189
|
throw err;
|
|
190
|
-
throw mapCoreError(err, { command: "scenario list", root: opts.rootOverride ?? null });
|
|
190
|
+
throw mapCoreError(err, { command: "recipes scenario list", root: opts.rootOverride ?? null });
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
export async function cmdScenarioInfoParsed(opts) {
|
|
@@ -225,7 +225,7 @@ export async function cmdScenarioInfoParsed(opts) {
|
|
|
225
225
|
catch (err) {
|
|
226
226
|
if (err instanceof CliError)
|
|
227
227
|
throw err;
|
|
228
|
-
throw mapCoreError(err, { command: "scenario info", root: opts.rootOverride ?? null });
|
|
228
|
+
throw mapCoreError(err, { command: "recipes scenario info", root: opts.rootOverride ?? null });
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
export async function executeRecipeTool(opts) {
|
|
@@ -297,13 +297,13 @@ export async function cmdScenarioRunParsed(opts) {
|
|
|
297
297
|
...validationChecks,
|
|
298
298
|
]);
|
|
299
299
|
output.line("Status: preview only; no task created and no runner executed.");
|
|
300
|
-
output.line(`Next: use \`agentplane scenario execute ${selection.recipe_id}:${selection.scenario_id}\` ` +
|
|
300
|
+
output.line(`Next: use \`agentplane recipes scenario execute ${selection.recipe_id}:${selection.scenario_id}\` ` +
|
|
301
301
|
"to materialize and run this scenario.");
|
|
302
302
|
return 0;
|
|
303
303
|
}
|
|
304
304
|
catch (err) {
|
|
305
305
|
if (err instanceof CliError)
|
|
306
306
|
throw err;
|
|
307
|
-
throw mapCoreError(err, { command: "scenario run", root: opts.rootOverride ?? null });
|
|
307
|
+
throw mapCoreError(err, { command: "recipes scenario run", root: opts.rootOverride ?? null });
|
|
308
308
|
}
|
|
309
309
|
}
|