agentplane 0.3.6 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/AGENTS.md +11 -1
- package/assets/RUNNER.md +17 -0
- package/bin/agentplane.js +16 -7
- package/bin/framework-dev-contract.d.ts +6 -0
- package/bin/framework-dev-contract.js +13 -0
- package/bin/stale-dist-policy.js +6 -1
- package/dist/.build-manifest.json +724 -359
- package/dist/adapters/task-backend/task-backend-adapter.d.ts +4 -2
- package/dist/adapters/task-backend/task-backend-adapter.d.ts.map +1 -1
- package/dist/adapters/task-backend/task-backend-adapter.js +15 -2
- package/dist/backends/task-backend/local-backend-doc.d.ts +5 -0
- package/dist/backends/task-backend/local-backend-doc.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-doc.js +98 -0
- package/dist/backends/task-backend/local-backend-read.d.ts +7 -0
- package/dist/backends/task-backend/local-backend-read.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-read.js +186 -0
- package/dist/backends/task-backend/local-backend-state.d.ts +17 -0
- package/dist/backends/task-backend/local-backend-state.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-state.js +50 -0
- package/dist/backends/task-backend/local-backend-write.d.ts +15 -0
- package/dist/backends/task-backend/local-backend-write.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-write.js +254 -0
- package/dist/backends/task-backend/local-backend.d.ts +10 -6
- package/dist/backends/task-backend/local-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend.js +32 -337
- package/dist/backends/task-backend/redmine/backend-cache-doc.d.ts +40 -0
- package/dist/backends/task-backend/redmine/backend-cache-doc.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-cache-doc.js +178 -0
- package/dist/backends/task-backend/redmine/backend-report.d.ts +10 -0
- package/dist/backends/task-backend/redmine/backend-report.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-report.js +43 -0
- package/dist/backends/task-backend/redmine/backend-sync.d.ts +67 -0
- package/dist/backends/task-backend/redmine/backend-sync.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-sync.js +367 -0
- package/dist/backends/task-backend/redmine/env.d.ts +1 -1
- package/dist/backends/task-backend/redmine/env.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/env.js +3 -0
- package/dist/backends/task-backend/redmine/inspect.d.ts +11 -0
- package/dist/backends/task-backend/redmine/inspect.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/inspect.js +75 -0
- package/dist/backends/task-backend/redmine/mapping.d.ts +2 -1
- package/dist/backends/task-backend/redmine/mapping.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/mapping.js +32 -3
- package/dist/backends/task-backend/redmine/parse.d.ts +2 -1
- package/dist/backends/task-backend/redmine/parse.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/parse.js +5 -3
- package/dist/backends/task-backend/redmine/state.d.ts +19 -0
- package/dist/backends/task-backend/redmine/state.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/state.js +109 -0
- package/dist/backends/task-backend/redmine-backend.d.ts +14 -17
- package/dist/backends/task-backend/redmine-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine-backend.js +121 -379
- package/dist/backends/task-backend/shared/constants.d.ts +2 -1
- package/dist/backends/task-backend/shared/constants.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/constants.js +1 -1
- package/dist/backends/task-backend/shared/doc.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/doc.js +25 -39
- package/dist/backends/task-backend/shared/export.d.ts +2 -9
- package/dist/backends/task-backend/shared/export.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/export.js +73 -8
- package/dist/backends/task-backend/shared/normalize.d.ts +5 -1
- package/dist/backends/task-backend/shared/normalize.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/normalize.js +166 -0
- package/dist/backends/task-backend/shared/record.d.ts +1 -1
- package/dist/backends/task-backend/shared/record.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/record.js +27 -3
- package/dist/backends/task-backend/shared/types.d.ts +76 -36
- package/dist/backends/task-backend/shared/types.d.ts.map +1 -1
- package/dist/backends/task-backend/shared.d.ts +2 -2
- package/dist/backends/task-backend/shared.d.ts.map +1 -1
- package/dist/backends/task-backend/shared.js +1 -1
- package/dist/backends/task-backend.d.ts +1 -1
- package/dist/backends/task-backend.d.ts.map +1 -1
- package/dist/backends/task-backend.js +1 -1
- package/dist/backends/task-index.d.ts +2 -2
- package/dist/backends/task-index.d.ts.map +1 -1
- package/dist/backends/task-index.js +9 -5
- package/dist/cli/bootstrap-guide.d.ts +2 -2
- package/dist/cli/bootstrap-guide.d.ts.map +1 -1
- package/dist/cli/bootstrap-guide.js +10 -10
- package/dist/cli/command-guide.d.ts.map +1 -1
- package/dist/cli/command-guide.js +11 -9
- package/dist/cli/command-invocations.d.ts +4 -0
- package/dist/cli/command-invocations.d.ts.map +1 -0
- package/dist/cli/command-invocations.js +35 -0
- package/dist/cli/command-snippets.d.ts +12 -8
- package/dist/cli/command-snippets.d.ts.map +1 -1
- package/dist/cli/command-snippets.js +14 -8
- package/dist/cli/exit-codes.d.ts.map +1 -1
- package/dist/cli/exit-codes.js +1 -0
- package/dist/cli/group-command.d.ts +18 -0
- package/dist/cli/group-command.d.ts.map +1 -0
- package/dist/cli/group-command.js +45 -0
- package/dist/cli/output.d.ts +29 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +76 -0
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +5 -1
- package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/core.js +38 -29
- package/dist/cli/run-cli/command-catalog/lifecycle.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/lifecycle.js +9 -6
- package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/project.js +11 -7
- package/dist/cli/run-cli/command-catalog/shared.d.ts +12 -3
- package/dist/cli/run-cli/command-catalog/shared.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/shared.js +6 -3
- package/dist/cli/run-cli/command-catalog/task.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/task.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/task.js +46 -11
- package/dist/cli/run-cli/command-catalog.d.ts +11 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog.js +29 -0
- package/dist/cli/run-cli/commands/config.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/config.js +52 -6
- package/dist/cli/run-cli/commands/core/agent-profiles.d.ts +34 -0
- package/dist/cli/run-cli/commands/core/agent-profiles.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/agent-profiles.js +97 -0
- package/dist/cli/run-cli/commands/core/agents.d.ts +7 -0
- package/dist/cli/run-cli/commands/core/agents.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/agents.js +97 -0
- package/dist/cli/run-cli/commands/core/preflight.d.ts +10 -0
- package/dist/cli/run-cli/commands/core/preflight.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/preflight.js +286 -0
- package/dist/cli/run-cli/commands/core/quickstart.d.ts +8 -0
- package/dist/cli/run-cli/commands/core/quickstart.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/quickstart.js +43 -0
- package/dist/cli/run-cli/commands/core/role.d.ts +9 -0
- package/dist/cli/run-cli/commands/core/role.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/role.js +128 -0
- package/dist/cli/run-cli/commands/core.d.ts +4 -24
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core.js +4 -630
- package/dist/cli/run-cli/commands/init/write-env.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-env.js +12 -0
- package/dist/cli/run-cli/error-guidance.js +10 -0
- package/dist/cli/run-cli/globals.d.ts +5 -2
- package/dist/cli/run-cli/globals.d.ts.map +1 -1
- package/dist/cli/run-cli/globals.js +82 -86
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +137 -100
- package/dist/cli/run-cli.test-helpers.d.ts +21 -0
- package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
- package/dist/cli/run-cli.test-helpers.js +90 -4
- package/dist/cli/spec/help.d.ts +10 -2
- package/dist/cli/spec/help.d.ts.map +1 -1
- package/dist/cli/spec/help.js +7 -5
- package/dist/cli/spec/registry.d.ts +27 -1
- package/dist/cli/spec/registry.d.ts.map +1 -1
- package/dist/cli/spec/registry.js +98 -25
- package/dist/commands/backend/sync.command.d.ts +8 -6
- package/dist/commands/backend/sync.command.d.ts.map +1 -1
- package/dist/commands/backend/sync.command.js +75 -14
- package/dist/commands/backend.d.ts +22 -0
- package/dist/commands/backend.d.ts.map +1 -1
- package/dist/commands/backend.js +111 -1
- package/dist/commands/branch/base.command.d.ts +2 -3
- package/dist/commands/branch/base.command.d.ts.map +1 -1
- package/dist/commands/branch/base.command.js +8 -12
- package/dist/commands/branch/base.d.ts.map +1 -1
- package/dist/commands/branch/base.js +11 -7
- package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
- package/dist/commands/branch/cleanup-merged.js +9 -8
- package/dist/commands/branch/remove.d.ts.map +1 -1
- package/dist/commands/branch/remove.js +4 -3
- package/dist/commands/branch/status.d.ts.map +1 -1
- package/dist/commands/branch/status.js +4 -3
- package/dist/commands/branch/work-start.d.ts.map +1 -1
- package/dist/commands/branch/work-start.js +48 -5
- package/dist/commands/cleanup/merged.command.d.ts +2 -3
- package/dist/commands/cleanup/merged.command.d.ts.map +1 -1
- package/dist/commands/cleanup/merged.command.js +8 -12
- package/dist/commands/commit.spec.d.ts.map +1 -1
- package/dist/commands/commit.spec.js +30 -6
- package/dist/commands/docs/cli.command.js +2 -2
- package/dist/commands/doctor/runtime.js +1 -1
- package/dist/commands/doctor/workflow.d.ts.map +1 -1
- package/dist/commands/doctor/workflow.js +10 -1
- package/dist/commands/doctor/workspace.d.ts +8 -0
- package/dist/commands/doctor/workspace.d.ts.map +1 -1
- package/dist/commands/doctor/workspace.js +127 -3
- package/dist/commands/finish.spec.d.ts.map +1 -1
- package/dist/commands/finish.spec.js +7 -0
- package/dist/commands/guard/commit.command.d.ts.map +1 -1
- package/dist/commands/guard/commit.command.js +30 -6
- package/dist/commands/guard/guard.command.d.ts +3 -3
- package/dist/commands/guard/guard.command.d.ts.map +1 -1
- package/dist/commands/guard/guard.command.js +9 -14
- package/dist/commands/guard/impl/allow.d.ts +4 -0
- package/dist/commands/guard/impl/allow.d.ts.map +1 -1
- package/dist/commands/guard/impl/allow.js +14 -3
- package/dist/commands/guard/impl/commands.d.ts +2 -0
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +66 -9
- package/dist/commands/guard/impl/policy.d.ts +1 -0
- package/dist/commands/guard/impl/policy.d.ts.map +1 -1
- package/dist/commands/guard/impl/policy.js +9 -6
- package/dist/commands/hooks/hooks.command.d.ts +3 -3
- package/dist/commands/hooks/hooks.command.d.ts.map +1 -1
- package/dist/commands/hooks/hooks.command.js +9 -11
- package/dist/commands/pr/check.d.ts.map +1 -1
- package/dist/commands/pr/check.js +90 -18
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
- package/dist/commands/pr/integrate/cmd.js +31 -3
- package/dist/commands/pr/integrate/internal/cleanup.d.ts +12 -0
- package/dist/commands/pr/integrate/internal/cleanup.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/cleanup.js +46 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts +4 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/finalize.js +34 -40
- package/dist/commands/pr/integrate/internal/merge.d.ts +6 -0
- package/dist/commands/pr/integrate/internal/merge.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/merge.js +92 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts +1 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/prepare.js +1 -0
- package/dist/commands/pr/integrate/verify.d.ts.map +1 -1
- package/dist/commands/pr/integrate/verify.js +4 -3
- package/dist/commands/pr/note.d.ts.map +1 -1
- package/dist/commands/pr/note.js +3 -2
- package/dist/commands/pr/open.d.ts.map +1 -1
- package/dist/commands/pr/open.js +9 -12
- package/dist/commands/pr/pr.command.d.ts +3 -4
- package/dist/commands/pr/pr.command.d.ts.map +1 -1
- package/dist/commands/pr/pr.command.js +6 -11
- package/dist/commands/pr/update.d.ts.map +1 -1
- package/dist/commands/pr/update.js +5 -10
- package/dist/commands/recipes/cache.command.d.ts +3 -4
- package/dist/commands/recipes/cache.command.d.ts.map +1 -1
- package/dist/commands/recipes/cache.command.js +8 -26
- package/dist/commands/recipes/impl/apply.d.ts +1 -1
- package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
- package/dist/commands/recipes/impl/apply.js +1 -1
- package/dist/commands/recipes/impl/commands/explain.js +1 -1
- package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/install.js +1 -2
- package/dist/commands/recipes/impl/installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/installed-recipes.js +1 -2
- package/dist/commands/recipes/impl/manifest.d.ts.map +1 -1
- package/dist/commands/recipes/impl/manifest.js +0 -10
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.js +1 -2
- package/dist/commands/recipes/impl/resolver.d.ts +1 -1
- package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
- package/dist/commands/recipes/impl/resolver.js +26 -16
- package/dist/commands/recipes/impl/scenario.d.ts.map +1 -1
- package/dist/commands/recipes/impl/scenario.js +80 -0
- package/dist/commands/recipes/impl/types.d.ts +27 -13
- package/dist/commands/recipes/impl/types.d.ts.map +1 -1
- package/dist/commands/recipes/recipes.command.d.ts +3 -4
- package/dist/commands/recipes/recipes.command.d.ts.map +1 -1
- package/dist/commands/recipes/recipes.command.js +8 -34
- package/dist/commands/recipes.d.ts +4 -4
- package/dist/commands/recipes.d.ts.map +1 -1
- package/dist/commands/recipes.js +3 -3
- package/dist/commands/recipes.test-helpers.d.ts +17 -0
- package/dist/commands/recipes.test-helpers.d.ts.map +1 -1
- package/dist/commands/recipes.test-helpers.js +56 -2
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +77 -56
- package/dist/commands/release/plan.command.d.ts.map +1 -1
- package/dist/commands/release/plan.command.js +7 -3
- package/dist/commands/release/release.command.d.ts +3 -3
- package/dist/commands/release/release.command.d.ts.map +1 -1
- package/dist/commands/release/release.command.js +9 -11
- package/dist/commands/release.test-helpers.d.ts +20 -0
- package/dist/commands/release.test-helpers.d.ts.map +1 -0
- package/dist/commands/release.test-helpers.js +37 -0
- package/dist/commands/runtime.command.d.ts +7 -7
- package/dist/commands/runtime.command.d.ts.map +1 -1
- package/dist/commands/runtime.command.js +29 -33
- package/dist/commands/scenario/execute.command.d.ts +8 -0
- package/dist/commands/scenario/execute.command.d.ts.map +1 -0
- package/dist/commands/scenario/execute.command.js +117 -0
- package/dist/commands/scenario/impl/commands.d.ts.map +1 -1
- package/dist/commands/scenario/impl/commands.js +45 -32
- package/dist/commands/scenario/run.command.js +2 -2
- package/dist/commands/scenario/scenario.command.d.ts +3 -4
- package/dist/commands/scenario/scenario.command.d.ts.map +1 -1
- package/dist/commands/scenario/scenario.command.js +8 -26
- package/dist/commands/shared/git-context.d.ts +1 -0
- package/dist/commands/shared/git-context.d.ts.map +1 -1
- package/dist/commands/shared/git-context.js +4 -2
- package/dist/commands/shared/git-ops.d.ts +1 -0
- package/dist/commands/shared/git-ops.d.ts.map +1 -1
- package/dist/commands/shared/git-ops.js +13 -0
- package/dist/commands/shared/operator-pipeline.d.ts +10 -0
- package/dist/commands/shared/operator-pipeline.d.ts.map +1 -0
- package/dist/commands/shared/operator-pipeline.js +16 -0
- package/dist/commands/shared/pr-meta.d.ts +32 -12
- package/dist/commands/shared/pr-meta.d.ts.map +1 -1
- package/dist/commands/shared/pr-meta.js +49 -14
- package/dist/commands/shared/reconcile-check.d.ts.map +1 -1
- package/dist/commands/shared/reconcile-check.js +28 -3
- package/dist/commands/shared/task-backend.d.ts +11 -7
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +107 -24
- package/dist/commands/shared/task-handoff.d.ts +64 -0
- package/dist/commands/shared/task-handoff.d.ts.map +1 -0
- package/dist/commands/shared/task-handoff.js +151 -0
- package/dist/commands/shared/task-mutation.d.ts +36 -0
- package/dist/commands/shared/task-mutation.d.ts.map +1 -0
- package/dist/commands/shared/task-mutation.js +67 -0
- package/dist/commands/shared/task-store.d.ts +65 -2
- package/dist/commands/shared/task-store.d.ts.map +1 -1
- package/dist/commands/shared/task-store.js +309 -91
- package/dist/commands/task/add.d.ts.map +1 -1
- package/dist/commands/task/add.js +41 -39
- package/dist/commands/task/block.d.ts.map +1 -1
- package/dist/commands/task/block.js +31 -89
- package/dist/commands/task/close-duplicate.d.ts.map +1 -1
- package/dist/commands/task/close-duplicate.js +0 -7
- package/dist/commands/task/close-noop.d.ts.map +1 -1
- package/dist/commands/task/close-noop.js +0 -21
- package/dist/commands/task/close-shared.d.ts +0 -2
- package/dist/commands/task/close-shared.d.ts.map +1 -1
- package/dist/commands/task/close-shared.js +24 -57
- package/dist/commands/task/comment.d.ts.map +1 -1
- package/dist/commands/task/comment.js +48 -42
- package/dist/commands/task/derive.command.d.ts +1 -0
- package/dist/commands/task/derive.command.d.ts.map +1 -1
- package/dist/commands/task/derive.command.js +15 -2
- package/dist/commands/task/derive.d.ts +1 -0
- package/dist/commands/task/derive.d.ts.map +1 -1
- package/dist/commands/task/derive.js +37 -7
- package/dist/commands/task/doc.command.d.ts.map +1 -1
- package/dist/commands/task/doc.command.js +7 -6
- package/dist/commands/task/doc.d.ts.map +1 -1
- package/dist/commands/task/doc.js +68 -61
- package/dist/commands/task/finish-shared.d.ts +60 -0
- package/dist/commands/task/finish-shared.d.ts.map +1 -0
- package/dist/commands/task/finish-shared.js +181 -0
- package/dist/commands/task/finish.d.ts +1 -0
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +73 -204
- package/dist/commands/task/handoff-record.command.d.ts +17 -0
- package/dist/commands/task/handoff-record.command.d.ts.map +1 -0
- package/dist/commands/task/handoff-record.command.js +140 -0
- package/dist/commands/task/handoff-show.command.d.ts +8 -0
- package/dist/commands/task/handoff-show.command.d.ts.map +1 -0
- package/dist/commands/task/handoff-show.command.js +77 -0
- package/dist/commands/task/handoff.command.d.ts +7 -0
- package/dist/commands/task/handoff.command.d.ts.map +1 -0
- package/dist/commands/task/handoff.command.js +21 -0
- package/dist/commands/task/handoff.shared.d.ts +39 -0
- package/dist/commands/task/handoff.shared.d.ts.map +1 -0
- package/dist/commands/task/handoff.shared.js +134 -0
- package/dist/commands/task/hosted-close.command.d.ts +9 -0
- package/dist/commands/task/hosted-close.command.d.ts.map +1 -0
- package/dist/commands/task/hosted-close.command.js +190 -0
- package/dist/commands/task/hosted-merge-sync.d.ts +40 -0
- package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -0
- package/dist/commands/task/hosted-merge-sync.js +277 -0
- package/dist/commands/task/list.d.ts.map +1 -1
- package/dist/commands/task/list.js +7 -24
- package/dist/commands/task/migrate-doc.d.ts +15 -0
- package/dist/commands/task/migrate-doc.d.ts.map +1 -1
- package/dist/commands/task/migrate-doc.js +126 -35
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +26 -4
- package/dist/commands/task/next.d.ts.map +1 -1
- package/dist/commands/task/next.js +10 -28
- package/dist/commands/task/normalize.command.d.ts +1 -0
- package/dist/commands/task/normalize.command.d.ts.map +1 -1
- package/dist/commands/task/normalize.command.js +12 -0
- package/dist/commands/task/normalize.d.ts +1 -0
- package/dist/commands/task/normalize.d.ts.map +1 -1
- package/dist/commands/task/normalize.js +21 -9
- package/dist/commands/task/plan.command.d.ts +3 -4
- package/dist/commands/task/plan.command.d.ts.map +1 -1
- package/dist/commands/task/plan.command.js +6 -12
- package/dist/commands/task/plan.d.ts.map +1 -1
- package/dist/commands/task/plan.js +118 -125
- package/dist/commands/task/reclaim.command.d.ts +11 -0
- package/dist/commands/task/reclaim.command.d.ts.map +1 -0
- package/dist/commands/task/reclaim.command.js +102 -0
- package/dist/commands/task/resume-context.command.d.ts +9 -0
- package/dist/commands/task/resume-context.command.d.ts.map +1 -0
- package/dist/commands/task/resume-context.command.js +60 -0
- package/dist/commands/task/run-cancel.command.d.ts +6 -0
- package/dist/commands/task/run-cancel.command.d.ts.map +1 -0
- package/dist/commands/task/run-cancel.command.js +45 -0
- package/dist/commands/task/run-cancel.spec.d.ts +7 -0
- package/dist/commands/task/run-cancel.spec.d.ts.map +1 -0
- package/dist/commands/task/run-cancel.spec.js +20 -0
- package/dist/commands/task/run-resume.command.d.ts +6 -0
- package/dist/commands/task/run-resume.command.d.ts.map +1 -0
- package/dist/commands/task/run-resume.command.js +55 -0
- package/dist/commands/task/run-resume.spec.d.ts +7 -0
- package/dist/commands/task/run-resume.spec.d.ts.map +1 -0
- package/dist/commands/task/run-resume.spec.js +20 -0
- package/dist/commands/task/run-retry.command.d.ts +6 -0
- package/dist/commands/task/run-retry.command.d.ts.map +1 -0
- package/dist/commands/task/run-retry.command.js +56 -0
- package/dist/commands/task/run-retry.spec.d.ts +7 -0
- package/dist/commands/task/run-retry.spec.d.ts.map +1 -0
- package/dist/commands/task/run-retry.spec.js +20 -0
- package/dist/commands/task/run-show.command.d.ts +6 -0
- package/dist/commands/task/run-show.command.d.ts.map +1 -0
- package/dist/commands/task/run-show.command.js +133 -0
- package/dist/commands/task/run-show.spec.d.ts +8 -0
- package/dist/commands/task/run-show.spec.d.ts.map +1 -0
- package/dist/commands/task/run-show.spec.js +44 -0
- package/dist/commands/task/run-tail.command.d.ts +6 -0
- package/dist/commands/task/run-tail.command.d.ts.map +1 -0
- package/dist/commands/task/run-tail.command.js +26 -0
- package/dist/commands/task/run-tail.spec.d.ts +8 -0
- package/dist/commands/task/run-tail.spec.d.ts.map +1 -0
- package/dist/commands/task/run-tail.spec.js +51 -0
- package/dist/commands/task/run-trace.command.d.ts +6 -0
- package/dist/commands/task/run-trace.command.d.ts.map +1 -0
- package/dist/commands/task/run-trace.command.js +25 -0
- package/dist/commands/task/run-trace.spec.d.ts +7 -0
- package/dist/commands/task/run-trace.spec.d.ts.map +1 -0
- package/dist/commands/task/run-trace.spec.js +31 -0
- package/dist/commands/task/run.command.d.ts +6 -0
- package/dist/commands/task/run.command.d.ts.map +1 -0
- package/dist/commands/task/run.command.js +74 -0
- package/dist/commands/task/run.spec.d.ts +7 -0
- package/dist/commands/task/run.spec.d.ts.map +1 -0
- package/dist/commands/task/run.spec.js +26 -0
- package/dist/commands/task/scaffold.d.ts.map +1 -1
- package/dist/commands/task/scaffold.js +4 -2
- package/dist/commands/task/scrub.d.ts.map +1 -1
- package/dist/commands/task/scrub.js +27 -24
- package/dist/commands/task/search.d.ts.map +1 -1
- package/dist/commands/task/search.js +21 -31
- package/dist/commands/task/set-status.d.ts.map +1 -1
- package/dist/commands/task/set-status.js +38 -111
- package/dist/commands/task/shared/dependencies.d.ts +5 -4
- package/dist/commands/task/shared/dependencies.d.ts.map +1 -1
- package/dist/commands/task/shared/dependencies.js +20 -2
- package/dist/commands/task/shared/docs.d.ts +6 -1
- package/dist/commands/task/shared/docs.d.ts.map +1 -1
- package/dist/commands/task/shared/docs.js +14 -1
- package/dist/commands/task/shared/listing.d.ts +16 -2
- package/dist/commands/task/shared/listing.d.ts.map +1 -1
- package/dist/commands/task/shared/listing.js +56 -0
- package/dist/commands/task/shared/transition-command.d.ts +15 -0
- package/dist/commands/task/shared/transition-command.d.ts.map +1 -0
- package/dist/commands/task/shared/transition-command.js +43 -0
- package/dist/commands/task/shared/transitions.d.ts +56 -0
- package/dist/commands/task/shared/transitions.d.ts.map +1 -1
- package/dist/commands/task/shared/transitions.js +82 -8
- package/dist/commands/task/shared/workflow-transition-service.d.ts +75 -0
- package/dist/commands/task/shared/workflow-transition-service.d.ts.map +1 -0
- package/dist/commands/task/shared/workflow-transition-service.js +226 -0
- package/dist/commands/task/shared.d.ts +6 -4
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +6 -4
- package/dist/commands/task/show.d.ts.map +1 -1
- package/dist/commands/task/show.js +37 -3
- package/dist/commands/task/start.d.ts.map +1 -1
- package/dist/commands/task/start.js +32 -113
- package/dist/commands/task/task.command.d.ts +3 -4
- package/dist/commands/task/task.command.d.ts.map +1 -1
- package/dist/commands/task/task.command.js +22 -37
- package/dist/commands/task/verify-record.d.ts.map +1 -1
- package/dist/commands/task/verify-record.js +21 -146
- package/dist/commands/task/verify.command.d.ts.map +1 -1
- package/dist/commands/task/verify.command.js +7 -6
- package/dist/commands/task.test-helpers.d.ts +13 -0
- package/dist/commands/task.test-helpers.d.ts.map +1 -0
- package/dist/commands/task.test-helpers.js +65 -0
- package/dist/commands/upgrade/apply.d.ts +2 -0
- package/dist/commands/upgrade/apply.d.ts.map +1 -1
- package/dist/commands/upgrade/apply.js +33 -1
- package/dist/commands/upgrade/materialize.d.ts +28 -0
- package/dist/commands/upgrade/materialize.d.ts.map +1 -0
- package/dist/commands/upgrade/materialize.js +154 -0
- package/dist/commands/upgrade/plan.d.ts +18 -0
- package/dist/commands/upgrade/plan.d.ts.map +1 -0
- package/dist/commands/upgrade/plan.js +219 -0
- package/dist/commands/upgrade/policy.d.ts +24 -0
- package/dist/commands/upgrade/policy.d.ts.map +1 -0
- package/dist/commands/upgrade/policy.js +182 -0
- package/dist/commands/upgrade/report.d.ts.map +1 -1
- package/dist/commands/upgrade/report.js +7 -5
- package/dist/commands/upgrade.command.d.ts.map +1 -1
- package/dist/commands/upgrade.command.js +25 -0
- package/dist/commands/upgrade.d.ts +1 -0
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +164 -618
- package/dist/commands/workflow.command.d.ts +3 -4
- package/dist/commands/workflow.command.d.ts.map +1 -1
- package/dist/commands/workflow.command.js +8 -25
- package/dist/policy/rules/allowlist.d.ts.map +1 -1
- package/dist/policy/rules/allowlist.js +12 -9
- package/dist/ports/task-backend-port.d.ts +4 -2
- package/dist/ports/task-backend-port.d.ts.map +1 -1
- package/dist/runner/adapters/codex.d.ts +9 -0
- package/dist/runner/adapters/codex.d.ts.map +1 -0
- package/dist/runner/adapters/codex.js +414 -0
- package/dist/runner/adapters/custom.d.ts +12 -0
- package/dist/runner/adapters/custom.d.ts.map +1 -0
- package/dist/runner/adapters/custom.js +512 -0
- package/dist/runner/adapters/index.d.ts +8 -0
- package/dist/runner/adapters/index.d.ts.map +1 -0
- package/dist/runner/adapters/index.js +15 -0
- package/dist/runner/adapters/recipe-run-profile.d.ts +8 -0
- package/dist/runner/adapters/recipe-run-profile.d.ts.map +1 -0
- package/dist/runner/adapters/recipe-run-profile.js +53 -0
- package/dist/runner/adapters/shared.d.ts +45 -0
- package/dist/runner/adapters/shared.d.ts.map +1 -0
- package/dist/runner/adapters/shared.js +58 -0
- package/dist/runner/artifacts.d.ts +31 -0
- package/dist/runner/artifacts.d.ts.map +1 -0
- package/dist/runner/artifacts.js +153 -0
- package/dist/runner/codex-approval-probe.d.ts +23 -0
- package/dist/runner/codex-approval-probe.d.ts.map +1 -0
- package/dist/runner/codex-approval-probe.js +55 -0
- package/dist/runner/codex-smoke.d.ts +11 -0
- package/dist/runner/codex-smoke.d.ts.map +1 -0
- package/dist/runner/codex-smoke.js +45 -0
- package/dist/runner/config.d.ts +6 -0
- package/dist/runner/config.d.ts.map +1 -0
- package/dist/runner/config.js +15 -0
- package/dist/runner/context/base-prompts.d.ts +10 -0
- package/dist/runner/context/base-prompts.d.ts.map +1 -0
- package/dist/runner/context/base-prompts.js +255 -0
- package/dist/runner/context/recipe-context.d.ts +17 -0
- package/dist/runner/context/recipe-context.d.ts.map +1 -0
- package/dist/runner/context/recipe-context.js +48 -0
- package/dist/runner/context/task-context.d.ts +24 -0
- package/dist/runner/context/task-context.d.ts.map +1 -0
- package/dist/runner/context/task-context.js +266 -0
- package/dist/runner/index.d.ts +12 -0
- package/dist/runner/index.d.ts.map +1 -0
- package/dist/runner/index.js +11 -0
- package/dist/runner/policy-decision.d.ts +12 -0
- package/dist/runner/policy-decision.d.ts.map +1 -0
- package/dist/runner/policy-decision.js +89 -0
- package/dist/runner/policy-display.d.ts +4 -0
- package/dist/runner/policy-display.d.ts.map +1 -0
- package/dist/runner/policy-display.js +41 -0
- package/dist/runner/process-supervision.d.ts +48 -0
- package/dist/runner/process-supervision.d.ts.map +1 -0
- package/dist/runner/process-supervision.js +490 -0
- package/dist/runner/result-manifest-policy.d.ts +9 -0
- package/dist/runner/result-manifest-policy.d.ts.map +1 -0
- package/dist/runner/result-manifest-policy.js +96 -0
- package/dist/runner/result-manifest.d.ts +30 -0
- package/dist/runner/result-manifest.d.ts.map +1 -0
- package/dist/runner/result-manifest.js +322 -0
- package/dist/runner/run-id.d.ts +2 -0
- package/dist/runner/run-id.d.ts.map +1 -0
- package/dist/runner/run-id.js +3 -0
- package/dist/runner/run-repository.d.ts +51 -0
- package/dist/runner/run-repository.d.ts.map +1 -0
- package/dist/runner/run-repository.js +222 -0
- package/dist/runner/task-run-paths.d.ts +19 -0
- package/dist/runner/task-run-paths.d.ts.map +1 -0
- package/dist/runner/task-run-paths.js +25 -0
- package/dist/runner/task-state.d.ts +9 -0
- package/dist/runner/task-state.d.ts.map +1 -0
- package/dist/runner/task-state.js +354 -0
- package/dist/runner/test-helpers.d.ts +30 -0
- package/dist/runner/test-helpers.d.ts.map +1 -0
- package/dist/runner/test-helpers.js +97 -0
- package/dist/runner/trace-artifacts.d.ts +14 -0
- package/dist/runner/trace-artifacts.d.ts.map +1 -0
- package/dist/runner/trace-artifacts.js +80 -0
- package/dist/runner/trace.d.ts +10 -0
- package/dist/runner/trace.d.ts.map +1 -0
- package/dist/runner/trace.js +37 -0
- package/dist/runner/types.d.ts +317 -0
- package/dist/runner/types.d.ts.map +1 -0
- package/dist/runner/types.js +3 -0
- package/dist/runner/usecases/scenario-materialize-task.d.ts +29 -0
- package/dist/runner/usecases/scenario-materialize-task.d.ts.map +1 -0
- package/dist/runner/usecases/scenario-materialize-task.js +151 -0
- package/dist/runner/usecases/task-run-inspect.d.ts +41 -0
- package/dist/runner/usecases/task-run-inspect.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-inspect.js +74 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.d.ts +10 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.js +172 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.d.ts +18 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.js +128 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.d.ts +45 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.js +172 -0
- package/dist/runner/usecases/task-run-lifecycle.d.ts +4 -0
- package/dist/runner/usecases/task-run-lifecycle.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle.js +2 -0
- package/dist/runner/usecases/task-run.d.ts +32 -0
- package/dist/runner/usecases/task-run.d.ts.map +1 -0
- package/dist/runner/usecases/task-run.js +278 -0
- package/dist/shared/agent-emoji.d.ts.map +1 -1
- package/dist/shared/agent-emoji.js +1 -0
- package/dist/shared/errors.d.ts +1 -1
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/guards.d.ts.map +1 -1
- package/dist/shared/guards.js +1 -0
- package/dist/shared/protected-paths.d.ts +10 -0
- package/dist/shared/protected-paths.d.ts.map +1 -1
- package/dist/shared/protected-paths.js +33 -0
- package/dist/shared/repo-cli-version.d.ts.map +1 -1
- package/dist/shared/repo-cli-version.js +7 -5
- package/dist/shared/task-doc-conflicts.d.ts +12 -0
- package/dist/shared/task-doc-conflicts.d.ts.map +1 -0
- package/dist/shared/task-doc-conflicts.js +40 -0
- package/dist/shared/task-doc-state.d.ts +10 -0
- package/dist/shared/task-doc-state.d.ts.map +1 -0
- package/dist/shared/task-doc-state.js +15 -0
- package/dist/test-helpers/fs.d.ts +2 -0
- package/dist/test-helpers/fs.d.ts.map +1 -0
- package/dist/test-helpers/fs.js +9 -0
- package/dist/usecases/context/resolve-context.d.ts +2 -0
- package/dist/usecases/context/resolve-context.d.ts.map +1 -1
- package/dist/usecases/context/resolve-context.js +4 -1
- package/dist/usecases/task/task-list-usecase.d.ts.map +1 -1
- package/dist/usecases/task/task-list-usecase.js +2 -8
- package/dist/workflow-runtime/fix.d.ts +9 -1
- package/dist/workflow-runtime/fix.d.ts.map +1 -1
- package/dist/workflow-runtime/fix.js +9 -1
- package/package.json +3 -2
- package/dist/backends/task-backend.test-helpers.d.ts +0 -4
- package/dist/backends/task-backend.test-helpers.d.ts.map +0 -1
- package/dist/backends/task-backend.test-helpers.js +0 -33
- package/dist/cli/run-cli/catalog.d.ts +0 -7
- package/dist/cli/run-cli/catalog.d.ts.map +0 -1
- package/dist/cli/run-cli/catalog.js +0 -22
- package/dist/cli/run-cli.core.pr-flow.test-helpers.d.ts +0 -3
- package/dist/cli/run-cli.core.pr-flow.test-helpers.d.ts.map +0 -1
- package/dist/cli/run-cli.core.pr-flow.test-helpers.js +0 -41
- package/dist/cli/run-cli.core.tasks.test-helpers.d.ts +0 -2
- package/dist/cli/run-cli.core.tasks.test-helpers.d.ts.map +0 -1
- package/dist/cli/run-cli.core.tasks.test-helpers.js +0 -6
- package/dist/commands/block.command.d.ts +0 -4
- package/dist/commands/block.command.d.ts.map +0 -1
- package/dist/commands/block.command.js +0 -2
- package/dist/commands/doctor.command.d.ts +0 -3
- package/dist/commands/doctor.command.d.ts.map +0 -1
- package/dist/commands/doctor.command.js +0 -2
- package/dist/commands/finish.command.d.ts +0 -4
- package/dist/commands/finish.command.d.ts.map +0 -1
- package/dist/commands/finish.command.js +0 -2
- package/dist/commands/recipes/install.command.d.ts +0 -3
- package/dist/commands/recipes/install.command.d.ts.map +0 -1
- package/dist/commands/recipes/install.command.js +0 -2
- package/dist/commands/start.command.d.ts +0 -4
- package/dist/commands/start.command.d.ts.map +0 -1
- package/dist/commands/start.command.js +0 -2
- package/dist/commands/task/list.command.d.ts +0 -4
- package/dist/commands/task/list.command.d.ts.map +0 -1
- package/dist/commands/task/list.command.js +0 -2
- package/dist/commands/task/next.command.d.ts +0 -4
- package/dist/commands/task/next.command.d.ts.map +0 -1
- package/dist/commands/task/next.command.js +0 -2
- package/dist/commands/task/search.command.d.ts +0 -4
- package/dist/commands/task/search.command.d.ts.map +0 -1
- package/dist/commands/task/search.command.js +0 -2
- package/dist/commands/task/show.command.d.ts +0 -4
- package/dist/commands/task/show.command.d.ts.map +0 -1
- package/dist/commands/task/show.command.js +0 -2
- package/dist/commands/verify.command.d.ts +0 -4
- package/dist/commands/verify.command.d.ts.map +0 -1
- package/dist/commands/verify.command.js +0 -2
|
@@ -4,8 +4,7 @@ import { fileExists, getPathKind } from "../../../cli/fs-utils.js";
|
|
|
4
4
|
import { invalidFieldMessage, missingFileMessage } from "../../../cli/output.js";
|
|
5
5
|
import { isRecord } from "../../../shared/guards.js";
|
|
6
6
|
import { writeJsonStableIfChanged } from "../../../shared/write-if-changed.js";
|
|
7
|
-
import { readRecipeManifest } from "
|
|
8
|
-
import { normalizeRecipeTags } from "./normalize.js";
|
|
7
|
+
import { normalizeRecipeTags, readRecipeManifest, } from "@agentplane/recipes";
|
|
9
8
|
import { resolveProjectInstalledRecipeDir, resolveProjectRecipeInstallMetaPath, resolveProjectRecipesDir, } from "./paths.js";
|
|
10
9
|
function validateRecipeInstallMetadata(raw) {
|
|
11
10
|
if (!isRecord(raw))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ResolvedProject } from "@agentplaneorg/core";
|
|
2
|
-
import type
|
|
2
|
+
import { type RecipeCompatibility, type RecipeResolverCompatibility, type RecipeResolverContext, type RecipeScenarioDescriptor, type ResolveRecipeScenarioSelectionFlags, type ResolvedRecipeRunProfile, type ResolvedRecipeScenario, type ResolvedRecipeScenarioSelection } from "@agentplane/recipes";
|
|
3
3
|
export declare function buildRecipeResolverContext(opts: {
|
|
4
4
|
project: ResolvedProject;
|
|
5
5
|
}): Promise<RecipeResolverContext>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/resolver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/resolver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAEhC,KAAK,qBAAqB,EAE1B,KAAK,wBAAwB,EAE7B,KAAK,mCAAmC,EACxC,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,EACrC,MAAM,qBAAqB,CAAC;AA+B7B,wBAAsB,0BAA0B,CAAC,IAAI,EAAE;IACrD,OAAO,EAAE,eAAe,CAAC;CAC1B,GAAG,OAAO,CAAC,qBAAqB,CAAC,CASjC;AAYD,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAC/C,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC,OAAO,EAAE,qBAAqB,CAAC;CAChC,GAAG,2BAA2B,CAkG9B;AAED,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,wBAAwB,GACjC,wBAAwB,CAO1B;AAmDD,wBAAsB,2BAA2B,CAAC,IAAI,EAAE;IACtD,OAAO,EAAE,eAAe,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAsBpC;AAED,wBAAsB,8BAA8B,CAAC,IAAI,EAAE;IACzD,OAAO,EAAE,eAAe,CAAC;IACzB,KAAK,EAAE,mCAAmC,CAAC;CAC5C,GAAG,OAAO,CAAC,+BAA+B,CAAC,CA6D3C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
+
import { readScenarioDefinition, } from "@agentplane/recipes";
|
|
2
3
|
import { fileExists } from "../../../cli/fs-utils.js";
|
|
3
4
|
import { getVersion } from "../../../meta/version.js";
|
|
4
5
|
import { dedupeStrings } from "../../../shared/strings.js";
|
|
@@ -101,22 +102,10 @@ export function resolveRecipeCompatibility(opts) {
|
|
|
101
102
|
}
|
|
102
103
|
export function normalizeResolvedRecipeRunProfile(scenario) {
|
|
103
104
|
const declaredProfile = scenario.run_profile;
|
|
104
|
-
const permissions = dedupeStrings([...scenario.permissions]).toSorted();
|
|
105
|
-
const network = declaredProfile.network ?? permissions.includes("network");
|
|
106
105
|
return {
|
|
107
106
|
mode: declaredProfile.mode,
|
|
108
107
|
sandbox: declaredProfile.sandbox,
|
|
109
|
-
network,
|
|
110
|
-
requires_human_approval: declaredProfile.requires_human_approval ?? false,
|
|
111
108
|
writes_artifacts_to: dedupeStrings(declaredProfile.writes_artifacts_to ?? []).toSorted(),
|
|
112
|
-
expected_exit_contract: declaredProfile.expected_exit_contract,
|
|
113
|
-
permissions,
|
|
114
|
-
agents_involved: dedupeStrings([...scenario.agents_involved]).toSorted(),
|
|
115
|
-
skills_used: dedupeStrings([...scenario.skills_used]).toSorted(),
|
|
116
|
-
tools_used: dedupeStrings([...scenario.tools_used]).toSorted(),
|
|
117
|
-
required_inputs: dedupeStrings([...scenario.required_inputs]).toSorted(),
|
|
118
|
-
outputs: dedupeStrings([...scenario.outputs]).toSorted(),
|
|
119
|
-
artifacts: dedupeStrings([...scenario.artifacts]).toSorted(),
|
|
120
109
|
};
|
|
121
110
|
}
|
|
122
111
|
function toResolvedRecipeScenarios(opts) {
|
|
@@ -135,12 +124,29 @@ function toResolvedRecipeScenarios(opts) {
|
|
|
135
124
|
scenario_description: scenario.description,
|
|
136
125
|
use_when: [...scenario.use_when],
|
|
137
126
|
avoid_when: [...(scenario.avoid_when ?? [])],
|
|
127
|
+
required_inputs: dedupeStrings([...scenario.required_inputs]).toSorted(),
|
|
128
|
+
outputs: dedupeStrings([...scenario.outputs]).toSorted(),
|
|
129
|
+
permissions: dedupeStrings([...scenario.permissions]).toSorted(),
|
|
130
|
+
artifacts: dedupeStrings([...scenario.artifacts]).toSorted(),
|
|
131
|
+
agents_involved: dedupeStrings([...scenario.agents_involved]).toSorted(),
|
|
132
|
+
skills_used: dedupeStrings([...scenario.skills_used]).toSorted(),
|
|
133
|
+
tools_used: dedupeStrings([...scenario.tools_used]).toSorted(),
|
|
138
134
|
scenario_file: path.join(recipeDir, scenario.file),
|
|
139
135
|
compatibility: opts.compatibility,
|
|
140
136
|
run_profile: normalizeResolvedRecipeRunProfile(scenario),
|
|
141
137
|
}))
|
|
142
138
|
.toSorted((left, right) => left.scenario_id.localeCompare(right.scenario_id));
|
|
143
139
|
}
|
|
140
|
+
async function resolveScenarioTaskTemplate(selection) {
|
|
141
|
+
if (!(await fileExists(selection.scenario_file))) {
|
|
142
|
+
throw new Error(`Scenario definition not found: ${selection.scenario_file}`);
|
|
143
|
+
}
|
|
144
|
+
const scenario = await readScenarioDefinition(selection.scenario_file);
|
|
145
|
+
if (scenario.id !== selection.scenario_id) {
|
|
146
|
+
throw new Error(`Scenario definition id mismatch: manifest expects ${selection.scenario_id}, file defines ${scenario.id}`);
|
|
147
|
+
}
|
|
148
|
+
return scenario.task_template;
|
|
149
|
+
}
|
|
144
150
|
export async function listResolvedRecipeScenarios(opts) {
|
|
145
151
|
const [context, installed] = await Promise.all([
|
|
146
152
|
buildRecipeResolverContext({ project: opts.project }),
|
|
@@ -183,7 +189,7 @@ export async function resolveRecipeScenarioSelection(opts) {
|
|
|
183
189
|
continue;
|
|
184
190
|
}
|
|
185
191
|
if (availableInputs.length > 0 &&
|
|
186
|
-
candidate.
|
|
192
|
+
candidate.required_inputs.some((input) => !availableInputs.includes(input))) {
|
|
187
193
|
continue;
|
|
188
194
|
}
|
|
189
195
|
const selectionReasons = [];
|
|
@@ -199,8 +205,8 @@ export async function resolveRecipeScenarioSelection(opts) {
|
|
|
199
205
|
}
|
|
200
206
|
if (opts.flags.mode)
|
|
201
207
|
selectionReasons.push(`matches requested mode: ${opts.flags.mode}`);
|
|
202
|
-
if (availableInputs.length > 0 && candidate.
|
|
203
|
-
selectionReasons.push(`required inputs satisfied: ${candidate.
|
|
208
|
+
if (availableInputs.length > 0 && candidate.required_inputs.length > 0) {
|
|
209
|
+
selectionReasons.push(`required inputs satisfied: ${candidate.required_inputs.join(", ")}`);
|
|
204
210
|
}
|
|
205
211
|
matches.push({
|
|
206
212
|
...candidate,
|
|
@@ -216,5 +222,9 @@ export async function resolveRecipeScenarioSelection(opts) {
|
|
|
216
222
|
const labels = matches.map((match) => `${match.recipe_id}:${match.scenario_id}`).join(", ");
|
|
217
223
|
throw new Error(`Scenario selection is ambiguous: ${labels}`);
|
|
218
224
|
}
|
|
219
|
-
|
|
225
|
+
const selected = matches[0];
|
|
226
|
+
return {
|
|
227
|
+
...selected,
|
|
228
|
+
task_template: await resolveScenarioTaskTemplate(selected),
|
|
229
|
+
};
|
|
220
230
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/scenario.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scenario.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/scenario.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EAGpB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAqKpB,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAG1F;AAED,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACjE,cAAc,EAAE,CAAC,CAAC;IAClB,SAAS,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C,CAAC,CAeD;AAED,wBAAsB,4BAA4B,CAChD,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,oBAAoB,EAAE,CAAC,CA+EjC;AAED,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,OAAO,EACZ,UAAU,EAAE,MAAM,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAyB/D"}
|
|
@@ -3,8 +3,82 @@ import path from "node:path";
|
|
|
3
3
|
import { fileExists, getPathKind } from "../../../cli/fs-utils.js";
|
|
4
4
|
import { invalidFieldMessage, requiredFieldMessage } from "../../../cli/output.js";
|
|
5
5
|
import { isRecord } from "../../../shared/guards.js";
|
|
6
|
+
import { dedupeStrings } from "../../../shared/strings.js";
|
|
6
7
|
import { RECIPES_SCENARIOS_DIR_NAME, RECIPES_SCENARIOS_INDEX_NAME } from "./constants.js";
|
|
7
8
|
import { normalizeScenarioId } from "./normalize.js";
|
|
9
|
+
function normalizeRequiredString(raw, field, sourcePath) {
|
|
10
|
+
if (typeof raw !== "string")
|
|
11
|
+
throw new Error(invalidFieldMessage(field, "string", sourcePath));
|
|
12
|
+
const value = raw.trim();
|
|
13
|
+
if (!value)
|
|
14
|
+
throw new Error(requiredFieldMessage(field, sourcePath));
|
|
15
|
+
return value;
|
|
16
|
+
}
|
|
17
|
+
function normalizeOptionalString(raw, field, sourcePath) {
|
|
18
|
+
if (raw === undefined)
|
|
19
|
+
return undefined;
|
|
20
|
+
if (typeof raw !== "string")
|
|
21
|
+
throw new Error(invalidFieldMessage(field, "string", sourcePath));
|
|
22
|
+
const value = raw.trim();
|
|
23
|
+
return value || undefined;
|
|
24
|
+
}
|
|
25
|
+
function normalizeOptionalStringList(raw, field, sourcePath) {
|
|
26
|
+
if (raw === undefined)
|
|
27
|
+
return undefined;
|
|
28
|
+
if (!Array.isArray(raw))
|
|
29
|
+
throw new Error(invalidFieldMessage(field, "string[]", sourcePath));
|
|
30
|
+
const values = raw.map((value) => {
|
|
31
|
+
if (typeof value !== "string")
|
|
32
|
+
throw new Error(invalidFieldMessage(field, "string[]", sourcePath));
|
|
33
|
+
const trimmed = value.trim();
|
|
34
|
+
if (!trimmed)
|
|
35
|
+
throw new Error(invalidFieldMessage(field, "string[]", sourcePath));
|
|
36
|
+
return trimmed;
|
|
37
|
+
});
|
|
38
|
+
const deduped = dedupeStrings(values).toSorted();
|
|
39
|
+
return deduped.length > 0 ? deduped : undefined;
|
|
40
|
+
}
|
|
41
|
+
function normalizeTaskTemplateDoc(raw, sourcePath) {
|
|
42
|
+
if (raw === undefined)
|
|
43
|
+
return undefined;
|
|
44
|
+
if (!isRecord(raw)) {
|
|
45
|
+
throw new Error(invalidFieldMessage("scenario.task_template.doc", "object", sourcePath));
|
|
46
|
+
}
|
|
47
|
+
const doc = {
|
|
48
|
+
summary: normalizeOptionalString(raw.summary, "scenario.task_template.doc.summary", sourcePath),
|
|
49
|
+
scope: normalizeOptionalString(raw.scope, "scenario.task_template.doc.scope", sourcePath),
|
|
50
|
+
plan: normalizeOptionalString(raw.plan, "scenario.task_template.doc.plan", sourcePath),
|
|
51
|
+
verify_steps: normalizeOptionalString(raw.verify_steps, "scenario.task_template.doc.verify_steps", sourcePath),
|
|
52
|
+
rollback_plan: normalizeOptionalString(raw.rollback_plan, "scenario.task_template.doc.rollback_plan", sourcePath),
|
|
53
|
+
findings: normalizeOptionalString(raw.findings, "scenario.task_template.doc.findings", sourcePath),
|
|
54
|
+
};
|
|
55
|
+
return Object.values(doc).some((value) => value !== undefined) ? doc : undefined;
|
|
56
|
+
}
|
|
57
|
+
function normalizeTaskTemplate(raw, sourcePath) {
|
|
58
|
+
if (!isRecord(raw)) {
|
|
59
|
+
throw new Error(invalidFieldMessage("scenario.task_template", "object", sourcePath));
|
|
60
|
+
}
|
|
61
|
+
const rawPriority = raw.priority;
|
|
62
|
+
let priority;
|
|
63
|
+
if (rawPriority !== undefined) {
|
|
64
|
+
if (rawPriority !== "low" &&
|
|
65
|
+
rawPriority !== "normal" &&
|
|
66
|
+
rawPriority !== "med" &&
|
|
67
|
+
rawPriority !== "high") {
|
|
68
|
+
throw new Error(invalidFieldMessage("scenario.task_template.priority", '"low" | "normal" | "med" | "high"', sourcePath));
|
|
69
|
+
}
|
|
70
|
+
priority = rawPriority;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
title: normalizeRequiredString(raw.title, "scenario.task_template.title", sourcePath),
|
|
74
|
+
description: normalizeRequiredString(raw.description, "scenario.task_template.description", sourcePath),
|
|
75
|
+
owner: normalizeRequiredString(raw.owner, "scenario.task_template.owner", sourcePath),
|
|
76
|
+
priority,
|
|
77
|
+
tags: normalizeOptionalStringList(raw.tags, "scenario.task_template.tags", sourcePath),
|
|
78
|
+
verify: normalizeOptionalStringList(raw.verify, "scenario.task_template.verify", sourcePath),
|
|
79
|
+
doc: normalizeTaskTemplateDoc(raw.doc, sourcePath),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
8
82
|
function normalizeScenarioEvidence(raw, sourcePath) {
|
|
9
83
|
if (raw === undefined)
|
|
10
84
|
return undefined;
|
|
@@ -40,6 +114,9 @@ function validateScenarioDefinition(raw, sourcePath) {
|
|
|
40
114
|
const goal = typeof raw.goal === "string" ? raw.goal.trim() : "";
|
|
41
115
|
if (!goal)
|
|
42
116
|
throw new Error(requiredFieldMessage("scenario.goal", sourcePath));
|
|
117
|
+
if (!("task_template" in raw)) {
|
|
118
|
+
throw new Error(requiredFieldMessage("scenario.task_template", sourcePath));
|
|
119
|
+
}
|
|
43
120
|
if (!("inputs" in raw))
|
|
44
121
|
throw new Error(requiredFieldMessage("scenario.inputs", sourcePath));
|
|
45
122
|
if (!("outputs" in raw))
|
|
@@ -53,6 +130,7 @@ function validateScenarioDefinition(raw, sourcePath) {
|
|
|
53
130
|
summary: typeof raw.summary === "string" ? raw.summary.trim() : undefined,
|
|
54
131
|
description: typeof raw.description === "string" ? raw.description.trim() : undefined,
|
|
55
132
|
goal,
|
|
133
|
+
task_template: normalizeTaskTemplate(raw.task_template, sourcePath),
|
|
56
134
|
inputs: raw.inputs,
|
|
57
135
|
outputs: raw.outputs,
|
|
58
136
|
evidence: normalizeScenarioEvidence(raw.evidence, sourcePath),
|
|
@@ -112,6 +190,7 @@ export async function collectRecipeScenarioDetails(recipeDir, manifest) {
|
|
|
112
190
|
continue;
|
|
113
191
|
detail.description ??= scenario.description;
|
|
114
192
|
detail.goal = scenario.goal;
|
|
193
|
+
detail.task_template = scenario.task_template;
|
|
115
194
|
detail.inputs = scenario.inputs;
|
|
116
195
|
detail.steps = scenario.steps;
|
|
117
196
|
detail.outputs = detail.outputs ?? scenario.outputs;
|
|
@@ -132,6 +211,7 @@ export async function collectRecipeScenarioDetails(recipeDir, manifest) {
|
|
|
132
211
|
summary: scenario.summary,
|
|
133
212
|
description: scenario.description,
|
|
134
213
|
goal: scenario.goal,
|
|
214
|
+
task_template: scenario.task_template,
|
|
135
215
|
inputs: scenario.inputs,
|
|
136
216
|
outputs: scenario.outputs,
|
|
137
217
|
evidence: scenario.evidence,
|
|
@@ -9,10 +9,24 @@ export type RecipeCompatibility = {
|
|
|
9
9
|
export type RecipeRunProfile = {
|
|
10
10
|
mode: string;
|
|
11
11
|
sandbox?: string;
|
|
12
|
-
network?: boolean;
|
|
13
|
-
requires_human_approval?: boolean;
|
|
14
12
|
writes_artifacts_to?: string[];
|
|
15
|
-
|
|
13
|
+
};
|
|
14
|
+
export type RecipeTaskTemplateDoc = {
|
|
15
|
+
summary?: string;
|
|
16
|
+
scope?: string;
|
|
17
|
+
plan?: string;
|
|
18
|
+
verify_steps?: string;
|
|
19
|
+
rollback_plan?: string;
|
|
20
|
+
findings?: string;
|
|
21
|
+
};
|
|
22
|
+
export type RecipeTaskTemplate = {
|
|
23
|
+
title: string;
|
|
24
|
+
description: string;
|
|
25
|
+
owner: string;
|
|
26
|
+
priority?: "low" | "normal" | "med" | "high";
|
|
27
|
+
tags?: string[];
|
|
28
|
+
verify?: string[];
|
|
29
|
+
doc?: RecipeTaskTemplateDoc;
|
|
16
30
|
};
|
|
17
31
|
export type RecipeSkillDefinition = {
|
|
18
32
|
id: string;
|
|
@@ -77,17 +91,7 @@ export type RecipeResolverCompatibility = {
|
|
|
77
91
|
export type ResolvedRecipeRunProfile = {
|
|
78
92
|
mode: string;
|
|
79
93
|
sandbox?: string;
|
|
80
|
-
network: boolean;
|
|
81
|
-
requires_human_approval: boolean;
|
|
82
94
|
writes_artifacts_to: string[];
|
|
83
|
-
expected_exit_contract?: string;
|
|
84
|
-
permissions: string[];
|
|
85
|
-
agents_involved: string[];
|
|
86
|
-
skills_used: string[];
|
|
87
|
-
tools_used: string[];
|
|
88
|
-
required_inputs: string[];
|
|
89
|
-
outputs: string[];
|
|
90
|
-
artifacts: string[];
|
|
91
95
|
};
|
|
92
96
|
export type ResolvedRecipeScenario = {
|
|
93
97
|
recipe_id: string;
|
|
@@ -102,9 +106,17 @@ export type ResolvedRecipeScenario = {
|
|
|
102
106
|
scenario_description?: string;
|
|
103
107
|
use_when: string[];
|
|
104
108
|
avoid_when: string[];
|
|
109
|
+
required_inputs: string[];
|
|
110
|
+
outputs: string[];
|
|
111
|
+
permissions: string[];
|
|
112
|
+
artifacts: string[];
|
|
113
|
+
agents_involved: string[];
|
|
114
|
+
skills_used: string[];
|
|
115
|
+
tools_used: string[];
|
|
105
116
|
scenario_file: string;
|
|
106
117
|
compatibility: RecipeResolverCompatibility;
|
|
107
118
|
run_profile: ResolvedRecipeRunProfile;
|
|
119
|
+
task_template?: RecipeTaskTemplate;
|
|
108
120
|
};
|
|
109
121
|
export type ResolveRecipeScenarioSelectionFlags = {
|
|
110
122
|
recipeId?: string;
|
|
@@ -160,6 +172,7 @@ export type ScenarioDefinition = {
|
|
|
160
172
|
summary?: string;
|
|
161
173
|
description?: string;
|
|
162
174
|
goal: string;
|
|
175
|
+
task_template: RecipeTaskTemplate;
|
|
163
176
|
inputs: unknown;
|
|
164
177
|
outputs: unknown;
|
|
165
178
|
evidence?: {
|
|
@@ -183,6 +196,7 @@ export type RecipeScenarioDetail = {
|
|
|
183
196
|
tools_used?: string[];
|
|
184
197
|
run_profile?: RecipeRunProfile;
|
|
185
198
|
goal?: string;
|
|
199
|
+
task_template?: RecipeTaskTemplate;
|
|
186
200
|
inputs?: unknown;
|
|
187
201
|
outputs?: unknown;
|
|
188
202
|
evidence?: ScenarioDefinition["evidence"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,MAAM,MAA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,CAAC,EAAE,MAAM,EAAE,CAAC;SACjB,EAAE,CAAC;KACL,EAAE,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,cAAc,EAAE,CAAC,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAC3B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpC,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;CACd,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
-
type
|
|
3
|
-
export declare const recipesSpec: CommandSpec<
|
|
4
|
-
export declare const runRecipes: CommandHandler<
|
|
5
|
-
export {};
|
|
2
|
+
import { type GroupCommandParsed } from "../../cli/group-command.js";
|
|
3
|
+
export declare const recipesSpec: CommandSpec<GroupCommandParsed>;
|
|
4
|
+
export declare const runRecipes: CommandHandler<GroupCommandParsed>;
|
|
6
5
|
//# sourceMappingURL=recipes.command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipes.command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/recipes.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAc,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"recipes.command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/recipes.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAc,MAAM,wBAAwB,CAAC;AACtF,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,CASzD,CAAC"}
|
|
@@ -1,45 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { suggestOne } from "../../cli/spec/suggest.js";
|
|
3
|
-
const RECIPES_SUBCOMMANDS = [
|
|
4
|
-
"list",
|
|
5
|
-
"list-remote",
|
|
6
|
-
"info",
|
|
7
|
-
"explain",
|
|
8
|
-
"install",
|
|
9
|
-
"remove",
|
|
10
|
-
"cache",
|
|
11
|
-
];
|
|
1
|
+
import { loadDirectSubcommandNames, parseGroupCommand, throwGroupCommandUsage, } from "../../cli/group-command.js";
|
|
12
2
|
export const recipesSpec = {
|
|
13
3
|
id: ["recipes"],
|
|
14
4
|
group: "Recipes",
|
|
15
5
|
summary: "Recipe management commands.",
|
|
16
6
|
synopsis: ["agentplane recipes <subcommand> [options]"],
|
|
17
7
|
args: [{ name: "subcommand", required: false, variadic: true, valueHint: "<subcommand>" }],
|
|
18
|
-
parse: () => (
|
|
19
|
-
validateRaw: (raw) => {
|
|
20
|
-
const rest = Array.isArray(raw.args.subcommand) ? raw.args.subcommand : [];
|
|
21
|
-
const sub = rest[0];
|
|
22
|
-
if (!sub) {
|
|
23
|
-
throw usageError({
|
|
24
|
-
spec: recipesSpec,
|
|
25
|
-
command: "recipes",
|
|
26
|
-
message: "Missing recipes subcommand.",
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
const suggestion = suggestOne(String(sub), [...RECIPES_SUBCOMMANDS]);
|
|
30
|
-
const suffix = suggestion ? ` Did you mean: ${suggestion}?` : "";
|
|
31
|
-
throw usageError({
|
|
32
|
-
spec: recipesSpec,
|
|
33
|
-
command: "recipes",
|
|
34
|
-
message: `Unknown recipes subcommand: ${String(sub)}.${suffix}`,
|
|
35
|
-
});
|
|
36
|
-
},
|
|
8
|
+
parse: (raw) => parseGroupCommand(raw, "subcommand"),
|
|
37
9
|
};
|
|
38
|
-
export const runRecipes = (_ctx) => {
|
|
39
|
-
|
|
40
|
-
throw usageError({
|
|
10
|
+
export const runRecipes = async (_ctx, p) => {
|
|
11
|
+
throwGroupCommandUsage({
|
|
41
12
|
spec: recipesSpec,
|
|
13
|
+
cmd: p.cmd,
|
|
14
|
+
subcommands: await loadDirectSubcommandNames(["recipes"]),
|
|
42
15
|
command: "recipes",
|
|
43
|
-
|
|
16
|
+
missingMessage: "Missing recipes subcommand.",
|
|
17
|
+
unknownMessage: (subcommand) => `Unknown recipes subcommand: ${subcommand}.`,
|
|
44
18
|
});
|
|
45
19
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { RECIPES_DIR_NAME, RECIPES_SCENARIOS_DIR_NAME, RECIPES_SCENARIOS_INDEX_NAME, RECIPE_RUNS_DIR_NAME, } from "
|
|
2
|
-
export type { RecipeCachePruneFlags, RecipeConflictMode, RecipeInstallSource, RecipeListFlags, RecipeListRemoteFlags, RecipeResolverCompatibility, RecipeResolverCompatibilityFailure, RecipeResolverContext, ResolveRecipeScenarioSelectionFlags, ResolvedRecipeRunProfile, ResolvedRecipeScenario, ResolvedRecipeScenarioSelection, ScenarioDefinition, } from "
|
|
3
|
-
export { readRecipeManifest } from "
|
|
1
|
+
export { RECIPES_DIR_NAME, RECIPES_SCENARIOS_DIR_NAME, RECIPES_SCENARIOS_INDEX_NAME, RECIPE_RUNS_DIR_NAME, } from "@agentplane/recipes";
|
|
2
|
+
export type { RecipeCachePruneFlags, RecipeConflictMode, RecipeInstallSource, RecipeListFlags, RecipeListRemoteFlags, RecipeResolverCompatibility, RecipeResolverCompatibilityFailure, RecipeResolverContext, ResolveRecipeScenarioSelectionFlags, ResolvedRecipeRunProfile, ResolvedRecipeScenario, ResolvedRecipeScenarioSelection, ScenarioDefinition, } from "@agentplane/recipes";
|
|
3
|
+
export { readRecipeManifest } from "@agentplane/recipes";
|
|
4
4
|
export { readInstalledRecipesFile } from "./recipes/impl/installed-recipes.js";
|
|
5
5
|
export { readProjectInstalledRecipes, readRecipeInstallMetadata, writeRecipeInstallMetadata, } from "./recipes/impl/project-installed-recipes.js";
|
|
6
6
|
export { resolveInstalledRecipeDir, resolveInstalledRecipesPath, resolveProjectInstalledRecipeDir, resolveProjectRecipeInstallMetaPath, resolveProjectRecipesDir, resolveProjectRecipesCacheDir, } from "./recipes/impl/paths.js";
|
|
7
|
-
export { collectRecipeScenarioDetails, normalizeScenarioToolStep, readScenarioDefinition, readScenarioIndex, } from "
|
|
7
|
+
export { collectRecipeScenarioDetails, normalizeScenarioToolStep, readScenarioDefinition, readScenarioIndex, } from "@agentplane/recipes";
|
|
8
8
|
export { buildRecipeResolverContext, listResolvedRecipeScenarios, normalizeResolvedRecipeRunProfile, resolveRecipeCompatibility, resolveRecipeScenarioSelection, } from "./recipes/impl/resolver.js";
|
|
9
9
|
export { cmdRecipeCachePruneParsed, cmdRecipeExplainParsed, cmdRecipeInfoParsed, cmdRecipeInstall, cmdRecipeListParsed, cmdRecipeListRemoteParsed, cmdRecipeRemoveParsed, } from "./recipes/impl/commands.js";
|
|
10
10
|
//# sourceMappingURL=recipes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../../src/commands/recipes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,0BAA0B,EAC1B,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,
|
|
1
|
+
{"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../../src/commands/recipes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,0BAA0B,EAC1B,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,2BAA2B,EAC3B,kCAAkC,EAClC,qBAAqB,EACrB,mCAAmC,EACnC,wBAAwB,EACxB,sBAAsB,EACtB,+BAA+B,EAC/B,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,6CAA6C,CAAC;AAErD,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,gCAAgC,EAChC,mCAAmC,EACnC,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,iCAAiC,EACjC,0BAA0B,EAC1B,8BAA8B,GAC/B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC"}
|
package/dist/commands/recipes.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { RECIPES_DIR_NAME, RECIPES_SCENARIOS_DIR_NAME, RECIPES_SCENARIOS_INDEX_NAME, RECIPE_RUNS_DIR_NAME, } from "
|
|
2
|
-
export { readRecipeManifest } from "
|
|
1
|
+
export { RECIPES_DIR_NAME, RECIPES_SCENARIOS_DIR_NAME, RECIPES_SCENARIOS_INDEX_NAME, RECIPE_RUNS_DIR_NAME, } from "@agentplane/recipes";
|
|
2
|
+
export { readRecipeManifest } from "@agentplane/recipes";
|
|
3
3
|
export { readInstalledRecipesFile } from "./recipes/impl/installed-recipes.js";
|
|
4
4
|
export { readProjectInstalledRecipes, readRecipeInstallMetadata, writeRecipeInstallMetadata, } from "./recipes/impl/project-installed-recipes.js";
|
|
5
5
|
export { resolveInstalledRecipeDir, resolveInstalledRecipesPath, resolveProjectInstalledRecipeDir, resolveProjectRecipeInstallMetaPath, resolveProjectRecipesDir, resolveProjectRecipesCacheDir, } from "./recipes/impl/paths.js";
|
|
6
|
-
export { collectRecipeScenarioDetails, normalizeScenarioToolStep, readScenarioDefinition, readScenarioIndex, } from "
|
|
6
|
+
export { collectRecipeScenarioDetails, normalizeScenarioToolStep, readScenarioDefinition, readScenarioIndex, } from "@agentplane/recipes";
|
|
7
7
|
export { buildRecipeResolverContext, listResolvedRecipeScenarios, normalizeResolvedRecipeRunProfile, resolveRecipeCompatibility, resolveRecipeScenarioSelection, } from "./recipes/impl/resolver.js";
|
|
8
8
|
export { cmdRecipeCachePruneParsed, cmdRecipeExplainParsed, cmdRecipeInfoParsed, cmdRecipeInstall, cmdRecipeListParsed, cmdRecipeListRemoteParsed, cmdRecipeRemoveParsed, } from "./recipes/impl/commands.js";
|
|
@@ -170,6 +170,23 @@ export declare function installRecipe(opts: {
|
|
|
170
170
|
archivePath?: string;
|
|
171
171
|
tags?: string[];
|
|
172
172
|
}): Promise<void>;
|
|
173
|
+
export declare function installRecipeFixture(opts: {
|
|
174
|
+
projectDir: string;
|
|
175
|
+
tags?: string[];
|
|
176
|
+
}): Promise<{
|
|
177
|
+
archivePath: string;
|
|
178
|
+
manifest: Record<string, unknown>;
|
|
179
|
+
manifestId: string;
|
|
180
|
+
}>;
|
|
181
|
+
export declare function createInstalledRecipeProject(opts?: {
|
|
182
|
+
tags?: string[];
|
|
183
|
+
}): Promise<{
|
|
184
|
+
projectDir: string;
|
|
185
|
+
archivePath: string;
|
|
186
|
+
manifest: Record<string, unknown>;
|
|
187
|
+
manifestId: string;
|
|
188
|
+
}>;
|
|
189
|
+
export declare function resolveInstalledScenarioPath(projectDir: string, recipeId: string, scenarioFile?: string): string;
|
|
173
190
|
export declare function runRecipesTest(opts: {
|
|
174
191
|
cwd: string;
|
|
175
192
|
rootOverride?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipes.test-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/recipes.test-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"recipes.test-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/recipes.test-helpers.ts"],"names":[],"mappings":"AA0CA,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AAExC,wBAAgB,4BAA4B,IAAI,IAAI,CA4BnD;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAG/C;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG;IACnD,cAAc,EAAE,CAAC,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAIA;AAED,wBAAsB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAKzF;AAED,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEpF;AAWD,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;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,OAAO,CAAC;IACjG,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAQD;AAED,wBAAsB,4BAA4B,CAChD,IAAI,GAAE;IACJ,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACZ,GACL,OAAO,CAAC;IACT,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAQD;AAED,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,YAAY,SAAiD,GAC5D,MAAM,CAER;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CA8ElB;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAwClB"}
|
|
@@ -7,12 +7,12 @@ import { cmdRecipeCachePruneParsed, cmdRecipeExplainParsed, cmdRecipeInfoParsed,
|
|
|
7
7
|
import { cmdScenarioInfoParsed, cmdScenarioListParsed, cmdScenarioRunParsed } from "./scenario.js";
|
|
8
8
|
import { exitCodeForError } from "../cli/exit-codes.js";
|
|
9
9
|
import { parseCommandArgv } from "../cli/spec/parse.js";
|
|
10
|
-
import { captureStdIO, createRecipeArchive } from "../cli/run-cli.test-helpers.js";
|
|
10
|
+
import { captureStdIO, createRecipeArchive, mkGitRepoRoot, writeDefaultConfig, } from "../cli/run-cli.test-helpers.js";
|
|
11
11
|
import { CliError } from "../shared/errors.js";
|
|
12
12
|
import { recipesCachePruneSpec } from "./recipes/cache-prune.command.js";
|
|
13
13
|
import { recipesExplainSpec } from "./recipes/explain.command.js";
|
|
14
14
|
import { recipesInfoSpec } from "./recipes/info.command.js";
|
|
15
|
-
import { recipesInstallSpec } from "./recipes/install.
|
|
15
|
+
import { recipesInstallSpec } from "./recipes/install.spec.js";
|
|
16
16
|
import { recipesListRemoteSpec } from "./recipes/list-remote.command.js";
|
|
17
17
|
import { recipesListSpec } from "./recipes/list.command.js";
|
|
18
18
|
import { recipesRemoveSpec } from "./recipes/remove.command.js";
|
|
@@ -107,6 +107,39 @@ export async function writeInstalledRecipes(projectDir, recipes) {
|
|
|
107
107
|
tags,
|
|
108
108
|
install_mode: "project-local",
|
|
109
109
|
}, null, 2), "utf8");
|
|
110
|
+
const scenarios = Array.isArray(manifest.scenarios)
|
|
111
|
+
? manifest.scenarios.filter((scenario) => !!scenario && typeof scenario === "object")
|
|
112
|
+
: [];
|
|
113
|
+
for (const scenario of scenarios) {
|
|
114
|
+
const scenarioFile = readStringFixtureValue(scenario, "file", "").trim();
|
|
115
|
+
if (!scenarioFile)
|
|
116
|
+
continue;
|
|
117
|
+
const scenarioId = readStringFixtureValue(scenario, "id", "SCENARIO");
|
|
118
|
+
const scenarioName = readStringFixtureValue(scenario, "name", scenarioId);
|
|
119
|
+
const scenarioSummary = readStringFixtureValue(scenario, "summary", scenarioName);
|
|
120
|
+
const scenarioOutputs = Array.isArray(scenario.outputs)
|
|
121
|
+
? scenario.outputs.filter((entry) => typeof entry === "string")
|
|
122
|
+
: [];
|
|
123
|
+
const scenarioInputs = Array.isArray(scenario.required_inputs)
|
|
124
|
+
? scenario.required_inputs.filter((entry) => typeof entry === "string")
|
|
125
|
+
: [];
|
|
126
|
+
const scenarioPath = path.join(recipeDir, scenarioFile);
|
|
127
|
+
await mkdir(path.dirname(scenarioPath), { recursive: true });
|
|
128
|
+
await writeFile(scenarioPath, JSON.stringify({
|
|
129
|
+
schema_version: "1",
|
|
130
|
+
id: scenarioId,
|
|
131
|
+
summary: scenarioSummary,
|
|
132
|
+
goal: scenarioSummary,
|
|
133
|
+
task_template: {
|
|
134
|
+
title: `${scenarioName} task`,
|
|
135
|
+
description: scenarioSummary,
|
|
136
|
+
owner: "CODER",
|
|
137
|
+
},
|
|
138
|
+
inputs: scenarioInputs.map((name) => ({ name, type: "string" })),
|
|
139
|
+
outputs: scenarioOutputs.map((name) => ({ name, type: "string" })),
|
|
140
|
+
steps: [],
|
|
141
|
+
}, null, 2), "utf8");
|
|
142
|
+
}
|
|
110
143
|
}
|
|
111
144
|
}
|
|
112
145
|
export async function writeInstalledRecipesRegistry(recipes) {
|
|
@@ -219,6 +252,27 @@ export async function installRecipe(opts) {
|
|
|
219
252
|
io.restore();
|
|
220
253
|
}
|
|
221
254
|
}
|
|
255
|
+
export async function installRecipeFixture(opts) {
|
|
256
|
+
const fixture = await createRecipeArchive({ tags: opts.tags });
|
|
257
|
+
await installRecipe({ projectDir: opts.projectDir, archivePath: fixture.archivePath });
|
|
258
|
+
return {
|
|
259
|
+
archivePath: fixture.archivePath,
|
|
260
|
+
manifest: fixture.manifest,
|
|
261
|
+
manifestId: String(fixture.manifest.id),
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
export async function createInstalledRecipeProject(opts = {}) {
|
|
265
|
+
const projectDir = await mkGitRepoRoot();
|
|
266
|
+
await writeDefaultConfig(projectDir);
|
|
267
|
+
const fixture = await installRecipeFixture({ projectDir, tags: opts.tags });
|
|
268
|
+
return {
|
|
269
|
+
projectDir,
|
|
270
|
+
...fixture,
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
export function resolveInstalledScenarioPath(projectDir, recipeId, scenarioFile = path.join("scenarios", "recipe-scenario.json")) {
|
|
274
|
+
return path.join(projectDir, ".agentplane", "recipes", recipeId, scenarioFile);
|
|
275
|
+
}
|
|
222
276
|
export async function runRecipesTest(opts) {
|
|
223
277
|
if (!opts.command) {
|
|
224
278
|
throw new CliError({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.command.d.ts","sourceRoot":"","sources":["../../../src/commands/release/apply.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply.command.d.ts","sourceRoot":"","sources":["../../../src/commands/release/apply.command.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA6B1E,OAAO,KAAK,EAAE,kBAAkB,EAA0C,MAAM,kBAAkB,CAAC;AA0NnG,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,kBAAkB,CAiF5D,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,kBAAkB,CAmF9D,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|