agentplane 0.1.9 → 0.2.1
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/README.md +4 -4
- package/assets/AGENTS.md +281 -70
- package/assets/agents/CODER.json +1 -0
- package/assets/agents/INTEGRATOR.json +1 -0
- package/assets/agents/ORCHESTRATOR.json +1 -0
- package/assets/agents/PLANNER.json +1 -0
- package/assets/agents/TESTER.json +1 -0
- package/dist/backends/task-backend/load.d.ts +13 -0
- package/dist/backends/task-backend/load.d.ts.map +1 -0
- package/dist/backends/task-backend/load.js +58 -0
- package/dist/backends/task-backend/local-backend.d.ts +28 -0
- package/dist/backends/task-backend/local-backend.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend.js +335 -0
- package/dist/backends/task-backend/redmine/client.d.ts +8 -0
- package/dist/backends/task-backend/redmine/client.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/client.js +60 -0
- package/dist/backends/task-backend/redmine/comments.d.ts +12 -0
- package/dist/backends/task-backend/redmine/comments.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/comments.js +54 -0
- package/dist/backends/task-backend/redmine/fields.d.ts +9 -0
- package/dist/backends/task-backend/redmine/fields.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/fields.js +38 -0
- package/dist/backends/task-backend/redmine/mapping.d.ts +20 -0
- package/dist/backends/task-backend/redmine/mapping.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/mapping.js +114 -0
- package/dist/backends/task-backend/redmine/parse.d.ts +3 -0
- package/dist/backends/task-backend/redmine/parse.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/parse.js +27 -0
- package/dist/backends/task-backend/redmine/remote.d.ts +19 -0
- package/dist/backends/task-backend/redmine/remote.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/remote.js +82 -0
- package/dist/backends/task-backend/redmine-backend.d.ts +80 -0
- package/dist/backends/task-backend/redmine-backend.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine-backend.js +505 -0
- package/dist/backends/task-backend/shared/concurrency.d.ts +3 -0
- package/dist/backends/task-backend/shared/concurrency.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/concurrency.js +21 -0
- package/dist/backends/task-backend/shared/constants.d.ts +4 -0
- package/dist/backends/task-backend/shared/constants.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/constants.js +4 -0
- package/dist/backends/task-backend/shared/doc.d.ts +11 -0
- package/dist/backends/task-backend/shared/doc.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/doc.js +78 -0
- package/dist/backends/task-backend/shared/errors.d.ts +10 -0
- package/dist/backends/task-backend/shared/errors.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/errors.js +18 -0
- package/dist/backends/task-backend/shared/events.d.ts +3 -0
- package/dist/backends/task-backend/shared/events.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/events.js +29 -0
- package/dist/backends/task-backend/shared/export.d.ts +15 -0
- package/dist/backends/task-backend/shared/export.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/export.js +60 -0
- package/dist/backends/task-backend/shared/id.d.ts +13 -0
- package/dist/backends/task-backend/shared/id.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/id.js +17 -0
- package/dist/backends/task-backend/shared/normalize.d.ts +8 -0
- package/dist/backends/task-backend/shared/normalize.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/normalize.js +54 -0
- package/dist/backends/task-backend/shared/record.d.ts +4 -0
- package/dist/backends/task-backend/shared/record.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/record.js +53 -0
- package/dist/backends/task-backend/shared/strings.d.ts +4 -0
- package/dist/backends/task-backend/shared/strings.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/strings.js +21 -0
- package/dist/backends/task-backend/shared/types.d.ts +84 -0
- package/dist/backends/task-backend/shared/types.d.ts.map +1 -0
- package/dist/backends/task-backend/shared/types.js +1 -0
- package/dist/backends/task-backend/shared.d.ts +11 -0
- package/dist/backends/task-backend/shared.d.ts.map +1 -0
- package/dist/backends/task-backend/shared.js +9 -0
- package/dist/backends/task-backend.d.ts +4 -204
- package/dist/backends/task-backend.d.ts.map +1 -1
- package/dist/backends/task-backend.js +4 -1366
- package/dist/backends/task-index.js +2 -2
- package/dist/cli/archive.d.ts +0 -2
- package/dist/cli/archive.d.ts.map +1 -1
- package/dist/cli/archive.js +1 -2
- package/dist/cli/command-guide.d.ts.map +1 -1
- package/dist/cli/command-guide.js +25 -8
- package/dist/cli/parse/lifecycle.d.ts +64 -0
- package/dist/cli/parse/lifecycle.d.ts.map +1 -0
- package/dist/cli/parse/lifecycle.js +280 -0
- package/dist/cli/run-cli/command-catalog.d.ts +16 -0
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -0
- package/dist/cli/run-cli/command-catalog.js +204 -0
- package/dist/cli/run-cli/commands/config.d.ts +20 -0
- package/dist/cli/run-cli/commands/config.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/config.js +130 -0
- package/dist/cli/run-cli/commands/core.d.ts +14 -0
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core.js +144 -0
- package/dist/cli/run-cli/commands/ide.d.ts +13 -0
- package/dist/cli/run-cli/commands/ide.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/ide.js +67 -0
- package/dist/cli/run-cli/commands/init/base-branch.d.ts +9 -0
- package/dist/cli/run-cli/commands/init/base-branch.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/base-branch.js +11 -0
- package/dist/cli/run-cli/commands/init/conflicts.d.ts +11 -0
- package/dist/cli/run-cli/commands/init/conflicts.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/conflicts.js +42 -0
- package/dist/cli/run-cli/commands/init/git.d.ts +8 -0
- package/dist/cli/run-cli/commands/init/git.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/git.js +12 -0
- package/dist/cli/run-cli/commands/init/ide-sync.d.ts +9 -0
- package/dist/cli/run-cli/commands/init/ide-sync.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/ide-sync.js +18 -0
- package/dist/cli/run-cli/commands/init/recipes.d.ts +2 -0
- package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/recipes.js +11 -0
- package/dist/cli/run-cli/commands/init/write-agents.d.ts +11 -0
- package/dist/cli/run-cli/commands/init/write-agents.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/write-agents.js +30 -0
- package/dist/cli/run-cli/commands/init/write-config.d.ts +15 -0
- package/dist/cli/run-cli/commands/init/write-config.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/write-config.js +45 -0
- package/dist/cli/run-cli/commands/init.d.ts +21 -0
- package/dist/cli/run-cli/commands/init.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init.js +332 -0
- package/dist/cli/run-cli/registry.run.d.ts +4 -0
- package/dist/cli/run-cli/registry.run.d.ts.map +1 -0
- package/dist/cli/run-cli/registry.run.js +19 -0
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +182 -2463
- package/dist/cli/spec/docs-render.d.ts +3 -0
- package/dist/cli/spec/docs-render.d.ts.map +1 -0
- package/dist/cli/spec/docs-render.js +118 -0
- package/dist/cli/spec/errors.d.ts +9 -0
- package/dist/cli/spec/errors.d.ts.map +1 -0
- package/dist/cli/spec/errors.js +18 -0
- package/dist/cli/spec/help-render.d.ts +43 -0
- package/dist/cli/spec/help-render.d.ts.map +1 -0
- package/dist/cli/spec/help-render.js +185 -0
- package/dist/cli/spec/help.d.ts +10 -0
- package/dist/cli/spec/help.d.ts.map +1 -0
- package/dist/cli/spec/help.js +64 -0
- package/dist/cli/spec/parse.d.ts +8 -0
- package/dist/cli/spec/parse.d.ts.map +1 -0
- package/dist/cli/spec/parse.js +188 -0
- package/dist/cli/spec/registry.d.ts +12 -0
- package/dist/cli/spec/registry.d.ts.map +1 -0
- package/dist/cli/spec/registry.js +47 -0
- package/dist/cli/spec/spec.d.ts +76 -0
- package/dist/cli/spec/spec.d.ts.map +1 -0
- package/dist/cli/spec/spec.js +1 -0
- package/dist/cli/spec/suggest.d.ts +2 -0
- package/dist/cli/spec/suggest.d.ts.map +1 -0
- package/dist/cli/spec/suggest.js +45 -0
- package/dist/commands/backend/sync.command.d.ts +12 -0
- package/dist/commands/backend/sync.command.d.ts.map +1 -0
- package/dist/commands/backend/sync.command.js +79 -0
- package/dist/commands/backend.d.ts +21 -8
- package/dist/commands/backend.d.ts.map +1 -1
- package/dist/commands/backend.js +28 -165
- package/dist/commands/block.command.d.ts +19 -0
- package/dist/commands/block.command.d.ts.map +1 -0
- package/dist/commands/block.command.js +143 -0
- package/dist/commands/branch/base.command.d.ts +20 -0
- package/dist/commands/branch/base.command.d.ts.map +1 -0
- package/dist/commands/branch/base.command.js +110 -0
- package/dist/commands/branch/base.d.ts +19 -0
- package/dist/commands/branch/base.d.ts.map +1 -0
- package/dist/commands/branch/base.js +114 -0
- package/dist/commands/branch/cleanup-merged.d.ts +11 -0
- package/dist/commands/branch/cleanup-merged.d.ts.map +1 -0
- package/dist/commands/branch/cleanup-merged.js +141 -0
- package/dist/commands/branch/index.d.ts +6 -59
- package/dist/commands/branch/index.d.ts.map +1 -1
- package/dist/commands/branch/index.js +6 -513
- package/dist/commands/branch/internal/archive-pr.d.ts +2 -0
- package/dist/commands/branch/internal/archive-pr.d.ts.map +1 -0
- package/dist/commands/branch/internal/archive-pr.js +17 -0
- package/dist/commands/branch/internal/work-validate.d.ts +3 -0
- package/dist/commands/branch/internal/work-validate.d.ts.map +1 -0
- package/dist/commands/branch/internal/work-validate.js +27 -0
- package/dist/commands/branch/remove.command.d.ts +10 -0
- package/dist/commands/branch/remove.command.d.ts.map +1 -0
- package/dist/commands/branch/remove.command.js +63 -0
- package/dist/commands/branch/remove.d.ts +9 -0
- package/dist/commands/branch/remove.d.ts.map +1 -0
- package/dist/commands/branch/remove.js +65 -0
- package/dist/commands/branch/status.command.d.ts +8 -0
- package/dist/commands/branch/status.command.d.ts.map +1 -0
- package/dist/commands/branch/status.command.js +36 -0
- package/dist/commands/branch/status.d.ts +7 -0
- package/dist/commands/branch/status.d.ts.map +1 -0
- package/dist/commands/branch/status.js +60 -0
- package/dist/commands/branch/work-start.command.d.ts +11 -0
- package/dist/commands/branch/work-start.command.d.ts.map +1 -0
- package/dist/commands/branch/work-start.command.js +80 -0
- package/dist/commands/branch/work-start.d.ts +11 -0
- package/dist/commands/branch/work-start.d.ts.map +1 -0
- package/dist/commands/branch/work-start.js +120 -0
- package/dist/commands/cleanup/merged.command.d.ts +17 -0
- package/dist/commands/cleanup/merged.command.d.ts.map +1 -0
- package/dist/commands/cleanup/merged.command.js +75 -0
- package/dist/commands/commit.command.d.ts +6 -0
- package/dist/commands/commit.command.d.ts.map +1 -0
- package/dist/commands/commit.command.js +24 -0
- package/dist/commands/commit.spec.d.ts +18 -0
- package/dist/commands/commit.spec.d.ts.map +1 -0
- package/dist/commands/commit.spec.js +119 -0
- package/dist/commands/docs/cli.command.d.ts +9 -0
- package/dist/commands/docs/cli.command.d.ts.map +1 -0
- package/dist/commands/docs/cli.command.js +51 -0
- package/dist/commands/finish.command.d.ts +28 -0
- package/dist/commands/finish.command.d.ts.map +1 -0
- package/dist/commands/finish.command.js +237 -0
- package/dist/commands/guard/clean.command.d.ts +7 -0
- package/dist/commands/guard/clean.command.d.ts.map +1 -0
- package/dist/commands/guard/clean.command.js +14 -0
- package/dist/commands/guard/commit.command.d.ts +19 -0
- package/dist/commands/guard/commit.command.d.ts.map +1 -0
- package/dist/commands/guard/commit.command.js +132 -0
- package/dist/commands/guard/guard.command.d.ts +5 -0
- package/dist/commands/guard/guard.command.d.ts.map +1 -0
- package/dist/commands/guard/guard.command.js +21 -0
- package/dist/commands/guard/impl/allow.d.ts +18 -0
- package/dist/commands/guard/impl/allow.d.ts.map +1 -0
- package/dist/commands/guard/impl/allow.js +77 -0
- package/dist/commands/guard/impl/close-message.d.ts +16 -0
- package/dist/commands/guard/impl/close-message.d.ts.map +1 -0
- package/dist/commands/guard/impl/close-message.js +156 -0
- package/dist/commands/guard/impl/commands.d.ts +32 -0
- package/dist/commands/guard/impl/commands.d.ts.map +1 -0
- package/dist/commands/guard/impl/commands.js +191 -0
- package/dist/commands/guard/impl/comment-commit.d.ts +25 -0
- package/dist/commands/guard/impl/comment-commit.d.ts.map +1 -0
- package/dist/commands/guard/impl/comment-commit.js +137 -0
- package/dist/commands/guard/impl/env.d.ts +10 -0
- package/dist/commands/guard/impl/env.d.ts.map +1 -0
- package/dist/commands/guard/impl/env.js +12 -0
- package/dist/commands/guard/impl/policy.d.ts +19 -0
- package/dist/commands/guard/impl/policy.d.ts.map +1 -0
- package/dist/commands/guard/impl/policy.js +46 -0
- package/dist/commands/guard/index.d.ts +4 -87
- package/dist/commands/guard/index.d.ts.map +1 -1
- package/dist/commands/guard/index.js +4 -481
- package/dist/commands/guard/suggest-allow.command.d.ts +7 -0
- package/dist/commands/guard/suggest-allow.command.d.ts.map +1 -0
- package/dist/commands/guard/suggest-allow.command.js +28 -0
- package/dist/commands/hooks/hooks.command.d.ts +5 -0
- package/dist/commands/hooks/hooks.command.d.ts.map +1 -0
- package/dist/commands/hooks/hooks.command.js +18 -0
- package/dist/commands/hooks/index.d.ts.map +1 -1
- package/dist/commands/hooks/index.js +36 -81
- package/dist/commands/hooks/install.command.d.ts +7 -0
- package/dist/commands/hooks/install.command.d.ts.map +1 -0
- package/dist/commands/hooks/install.command.js +14 -0
- package/dist/commands/hooks/run.command.d.ts +9 -0
- package/dist/commands/hooks/run.command.d.ts.map +1 -0
- package/dist/commands/hooks/run.command.js +39 -0
- package/dist/commands/hooks/uninstall.command.d.ts +7 -0
- package/dist/commands/hooks/uninstall.command.d.ts.map +1 -0
- package/dist/commands/hooks/uninstall.command.js +16 -0
- package/dist/commands/integrate.command.d.ts +14 -0
- package/dist/commands/integrate.command.d.ts.map +1 -0
- package/dist/commands/integrate.command.js +61 -0
- package/dist/commands/pr/check.d.ts +8 -0
- package/dist/commands/pr/check.d.ts.map +1 -0
- package/dist/commands/pr/check.js +78 -0
- package/dist/commands/pr/index.d.ts +5 -45
- package/dist/commands/pr/index.d.ts.map +1 -1
- package/dist/commands/pr/index.js +5 -857
- package/dist/commands/pr/integrate/artifacts.d.ts +14 -0
- package/dist/commands/pr/integrate/artifacts.d.ts.map +1 -0
- package/dist/commands/pr/integrate/artifacts.js +45 -0
- package/dist/commands/pr/integrate/cmd.d.ts +14 -0
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -0
- package/dist/commands/pr/integrate/cmd.js +150 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts +25 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/finalize.js +86 -0
- package/dist/commands/pr/integrate/internal/merge.d.ts +40 -0
- package/dist/commands/pr/integrate/internal/merge.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/merge.js +138 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts +33 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/prepare.js +142 -0
- package/dist/commands/pr/integrate/internal/worktree.d.ts +14 -0
- package/dist/commands/pr/integrate/internal/worktree.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/worktree.js +51 -0
- package/dist/commands/pr/integrate/verify.d.ts +22 -0
- package/dist/commands/pr/integrate/verify.d.ts.map +1 -0
- package/dist/commands/pr/integrate/verify.js +60 -0
- package/dist/commands/pr/integrate.d.ts +2 -0
- package/dist/commands/pr/integrate.d.ts.map +1 -0
- package/dist/commands/pr/integrate.js +1 -0
- package/dist/commands/pr/internal/pr-paths.d.ts +29 -0
- package/dist/commands/pr/internal/pr-paths.d.ts.map +1 -0
- package/dist/commands/pr/internal/pr-paths.js +38 -0
- package/dist/commands/pr/internal/review-template.d.ts +9 -0
- package/dist/commands/pr/internal/review-template.d.ts.map +1 -0
- package/dist/commands/pr/internal/review-template.js +62 -0
- package/dist/commands/pr/note.d.ts +10 -0
- package/dist/commands/pr/note.d.ts.map +1 -0
- package/dist/commands/pr/note.js +50 -0
- package/dist/commands/pr/open.d.ts +10 -0
- package/dist/commands/pr/open.d.ts.map +1 -0
- package/dist/commands/pr/open.js +80 -0
- package/dist/commands/pr/pr.command.d.ts +33 -0
- package/dist/commands/pr/pr.command.d.ts.map +1 -0
- package/dist/commands/pr/pr.command.js +172 -0
- package/dist/commands/pr/update.d.ts +8 -0
- package/dist/commands/pr/update.d.ts.map +1 -0
- package/dist/commands/pr/update.js +103 -0
- package/dist/commands/ready.command.d.ts +8 -0
- package/dist/commands/ready.command.d.ts.map +1 -0
- package/dist/commands/ready.command.js +28 -0
- package/dist/commands/recipes/cache-prune.command.d.ts +6 -0
- package/dist/commands/recipes/cache-prune.command.d.ts.map +1 -0
- package/dist/commands/recipes/cache-prune.command.js +30 -0
- package/dist/commands/recipes/cache.command.d.ts +6 -0
- package/dist/commands/recipes/cache.command.d.ts.map +1 -0
- package/dist/commands/recipes/cache.command.js +37 -0
- package/dist/commands/recipes/explain.command.d.ts +7 -0
- package/dist/commands/recipes/explain.command.d.ts.map +1 -0
- package/dist/commands/recipes/explain.command.js +10 -0
- package/dist/commands/recipes/impl/apply.d.ts +16 -0
- package/dist/commands/recipes/impl/apply.d.ts.map +1 -0
- package/dist/commands/recipes/impl/apply.js +97 -0
- package/dist/commands/recipes/impl/archive.d.ts +2 -0
- package/dist/commands/recipes/impl/archive.d.ts.map +1 -0
- package/dist/commands/recipes/impl/archive.js +19 -0
- package/dist/commands/recipes/impl/commands/cache-prune.d.ts +7 -0
- package/dist/commands/recipes/impl/commands/cache-prune.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/cache-prune.js +94 -0
- package/dist/commands/recipes/impl/commands/explain.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/explain.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/explain.js +88 -0
- package/dist/commands/recipes/impl/commands/info.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/info.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/info.js +58 -0
- package/dist/commands/recipes/impl/commands/install.d.ts +11 -0
- package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/install.js +212 -0
- package/dist/commands/recipes/impl/commands/list-remote.d.ts +7 -0
- package/dist/commands/recipes/impl/commands/list-remote.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/list-remote.js +53 -0
- package/dist/commands/recipes/impl/commands/list.d.ts +7 -0
- package/dist/commands/recipes/impl/commands/list.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/list.js +38 -0
- package/dist/commands/recipes/impl/commands/remove.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/remove.js +35 -0
- package/dist/commands/recipes/impl/commands.d.ts +8 -0
- package/dist/commands/recipes/impl/commands.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands.js +7 -0
- package/dist/commands/recipes/impl/constants.d.ts +13 -0
- package/dist/commands/recipes/impl/constants.d.ts.map +1 -0
- package/dist/commands/recipes/impl/constants.js +16 -0
- package/dist/commands/recipes/impl/format.d.ts +2 -0
- package/dist/commands/recipes/impl/format.d.ts.map +1 -0
- package/dist/commands/recipes/impl/format.js +9 -0
- package/dist/commands/recipes/impl/index.d.ts +12 -0
- package/dist/commands/recipes/impl/index.d.ts.map +1 -0
- package/dist/commands/recipes/impl/index.js +150 -0
- package/dist/commands/recipes/impl/installed-recipes.d.ts +4 -0
- package/dist/commands/recipes/impl/installed-recipes.d.ts.map +1 -0
- package/dist/commands/recipes/impl/installed-recipes.js +58 -0
- package/dist/commands/recipes/impl/manifest.d.ts +4 -0
- package/dist/commands/recipes/impl/manifest.d.ts.map +1 -0
- package/dist/commands/recipes/impl/manifest.js +43 -0
- package/dist/commands/recipes/impl/normalize.d.ts +5 -0
- package/dist/commands/recipes/impl/normalize.d.ts.map +1 -0
- package/dist/commands/recipes/impl/normalize.js +50 -0
- package/dist/commands/recipes/impl/paths.d.ts +13 -0
- package/dist/commands/recipes/impl/paths.d.ts.map +1 -0
- package/dist/commands/recipes/impl/paths.js +27 -0
- package/dist/commands/recipes/impl/project.d.ts +8 -0
- package/dist/commands/recipes/impl/project.d.ts.map +1 -0
- package/dist/commands/recipes/impl/project.js +23 -0
- package/dist/commands/recipes/impl/scenario.d.ts +16 -0
- package/dist/commands/recipes/impl/scenario.d.ts.map +1 -0
- package/dist/commands/recipes/impl/scenario.js +128 -0
- package/dist/commands/recipes/impl/types.d.ts +107 -0
- package/dist/commands/recipes/impl/types.d.ts.map +1 -0
- package/dist/commands/recipes/impl/types.js +1 -0
- package/dist/commands/recipes/info.command.d.ts +7 -0
- package/dist/commands/recipes/info.command.d.ts.map +1 -0
- package/dist/commands/recipes/info.command.js +10 -0
- package/dist/commands/recipes/install.command.d.ts +12 -0
- package/dist/commands/recipes/install.command.d.ts.map +1 -0
- package/dist/commands/recipes/install.command.js +161 -0
- package/dist/commands/recipes/list-remote.command.d.ts +6 -0
- package/dist/commands/recipes/list-remote.command.d.ts.map +1 -0
- package/dist/commands/recipes/list-remote.command.js +46 -0
- package/dist/commands/recipes/list.command.d.ts +6 -0
- package/dist/commands/recipes/list.command.d.ts.map +1 -0
- package/dist/commands/recipes/list.command.js +39 -0
- package/dist/commands/recipes/recipes.command.d.ts +6 -0
- package/dist/commands/recipes/recipes.command.d.ts.map +1 -0
- package/dist/commands/recipes/recipes.command.js +45 -0
- package/dist/commands/recipes/remove.command.d.ts +7 -0
- package/dist/commands/recipes/remove.command.d.ts.map +1 -0
- package/dist/commands/recipes/remove.command.js +10 -0
- package/dist/commands/recipes.d.ts +7 -81
- package/dist/commands/recipes.d.ts.map +1 -1
- package/dist/commands/recipes.js +6 -1457
- package/dist/commands/scenario/impl/commands.d.ts +19 -0
- package/dist/commands/scenario/impl/commands.d.ts.map +1 -0
- package/dist/commands/scenario/impl/commands.js +336 -0
- package/dist/commands/scenario/impl/report.d.ts +30 -0
- package/dist/commands/scenario/impl/report.d.ts.map +1 -0
- package/dist/commands/scenario/impl/report.js +99 -0
- package/dist/commands/scenario/info.command.d.ts +8 -0
- package/dist/commands/scenario/info.command.d.ts.map +1 -0
- package/dist/commands/scenario/info.command.js +27 -0
- package/dist/commands/scenario/list.command.d.ts +5 -0
- package/dist/commands/scenario/list.command.d.ts.map +1 -0
- package/dist/commands/scenario/list.command.js +9 -0
- package/dist/commands/scenario/run.command.d.ts +8 -0
- package/dist/commands/scenario/run.command.d.ts.map +1 -0
- package/dist/commands/scenario/run.command.js +27 -0
- package/dist/commands/scenario/scenario.command.d.ts +6 -0
- package/dist/commands/scenario/scenario.command.d.ts.map +1 -0
- package/dist/commands/scenario/scenario.command.js +37 -0
- package/dist/commands/scenario.d.ts +1 -6
- package/dist/commands/scenario.d.ts.map +1 -1
- package/dist/commands/scenario.js +1 -501
- package/dist/commands/shared/git-context.d.ts +23 -0
- package/dist/commands/shared/git-context.d.ts.map +1 -0
- package/dist/commands/shared/git-context.js +140 -0
- package/dist/commands/shared/policy-deny.d.ts +3 -0
- package/dist/commands/shared/policy-deny.d.ts.map +1 -0
- package/dist/commands/shared/policy-deny.js +12 -0
- package/dist/commands/shared/task-backend.d.ts +17 -5
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +34 -5
- package/dist/commands/shared/task-store.d.ts +16 -0
- package/dist/commands/shared/task-store.d.ts.map +1 -0
- package/dist/commands/shared/task-store.js +142 -0
- package/dist/commands/start.command.d.ts +19 -0
- package/dist/commands/start.command.d.ts.map +1 -0
- package/dist/commands/start.command.js +143 -0
- package/dist/commands/sync.command.d.ts +6 -0
- package/dist/commands/sync.command.d.ts.map +1 -0
- package/dist/commands/sync.command.js +57 -0
- package/dist/commands/task/add.command.d.ts +18 -0
- package/dist/commands/task/add.command.d.ts.map +1 -0
- package/dist/commands/task/add.command.js +157 -0
- package/dist/commands/task/add.d.ts +13 -3
- package/dist/commands/task/add.d.ts.map +1 -1
- package/dist/commands/task/add.js +21 -126
- package/dist/commands/task/block.d.ts +2 -2
- package/dist/commands/task/block.d.ts.map +1 -1
- package/dist/commands/task/block.js +13 -9
- package/dist/commands/task/comment.command.d.ts +10 -0
- package/dist/commands/task/comment.command.d.ts.map +1 -0
- package/dist/commands/task/comment.command.js +57 -0
- package/dist/commands/task/comment.d.ts +2 -0
- package/dist/commands/task/comment.d.ts.map +1 -1
- package/dist/commands/task/comment.js +10 -7
- package/dist/commands/task/derive.command.d.ts +13 -0
- package/dist/commands/task/derive.command.d.ts.map +1 -0
- package/dist/commands/task/derive.command.js +94 -0
- package/dist/commands/task/derive.d.ts +13 -0
- package/dist/commands/task/derive.d.ts.map +1 -0
- package/dist/commands/task/derive.js +71 -0
- package/dist/commands/task/doc-set.command.d.ts +12 -0
- package/dist/commands/task/doc-set.command.d.ts.map +1 -0
- package/dist/commands/task/doc-set.command.js +82 -0
- package/dist/commands/task/doc-show.command.d.ts +10 -0
- package/dist/commands/task/doc-show.command.d.ts.map +1 -0
- package/dist/commands/task/doc-show.command.js +54 -0
- package/dist/commands/task/doc.command.d.ts +7 -0
- package/dist/commands/task/doc.command.d.ts.map +1 -0
- package/dist/commands/task/doc.command.js +22 -0
- package/dist/commands/task/doc.d.ts +9 -6
- package/dist/commands/task/doc.d.ts.map +1 -1
- package/dist/commands/task/doc.js +61 -113
- package/dist/commands/task/export.command.d.ts +6 -0
- package/dist/commands/task/export.command.d.ts.map +1 -0
- package/dist/commands/task/export.command.js +17 -0
- package/dist/commands/task/export.d.ts +2 -0
- package/dist/commands/task/export.d.ts.map +1 -1
- package/dist/commands/task/export.js +7 -9
- package/dist/commands/task/finish.d.ts +5 -4
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +50 -17
- package/dist/commands/task/index.d.ts +14 -13
- package/dist/commands/task/index.d.ts.map +1 -1
- package/dist/commands/task/index.js +13 -13
- package/dist/commands/task/lint.command.d.ts +5 -0
- package/dist/commands/task/lint.command.d.ts.map +1 -0
- package/dist/commands/task/lint.command.js +11 -0
- package/dist/commands/task/list.command.d.ts +9 -0
- package/dist/commands/task/list.command.d.ts.map +1 -0
- package/dist/commands/task/list.command.js +68 -0
- package/dist/commands/task/list.d.ts +6 -2
- package/dist/commands/task/list.d.ts.map +1 -1
- package/dist/commands/task/list.js +12 -15
- package/dist/commands/task/migrate-doc.command.d.ts +9 -0
- package/dist/commands/task/migrate-doc.command.d.ts.map +1 -0
- package/dist/commands/task/migrate-doc.command.js +65 -0
- package/dist/commands/task/migrate-doc.d.ts +3 -3
- package/dist/commands/task/migrate-doc.d.ts.map +1 -1
- package/dist/commands/task/migrate-doc.js +40 -47
- package/dist/commands/task/migrate.command.d.ts +10 -0
- package/dist/commands/task/migrate.command.d.ts.map +1 -0
- package/dist/commands/task/migrate.command.js +50 -0
- package/dist/commands/task/migrate.d.ts +5 -1
- package/dist/commands/task/migrate.d.ts.map +1 -1
- package/dist/commands/task/migrate.js +10 -44
- package/dist/commands/task/new.command.d.ts +6 -0
- package/dist/commands/task/new.command.d.ts.map +1 -0
- package/dist/commands/task/new.command.js +13 -0
- package/dist/commands/task/new.d.ts +13 -4
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +30 -92
- package/dist/commands/task/new.spec.d.ts +4 -0
- package/dist/commands/task/new.spec.d.ts.map +1 -0
- package/dist/commands/task/new.spec.js +79 -0
- package/dist/commands/task/next.command.d.ts +9 -0
- package/dist/commands/task/next.command.d.ts.map +1 -0
- package/dist/commands/task/next.command.js +89 -0
- package/dist/commands/task/next.d.ts +4 -1
- package/dist/commands/task/next.d.ts.map +1 -1
- package/dist/commands/task/next.js +15 -16
- package/dist/commands/task/normalize.command.d.ts +9 -0
- package/dist/commands/task/normalize.command.d.ts.map +1 -0
- package/dist/commands/task/normalize.command.js +39 -0
- package/dist/commands/task/normalize.d.ts +4 -1
- package/dist/commands/task/normalize.d.ts.map +1 -1
- package/dist/commands/task/normalize.js +18 -31
- package/dist/commands/task/plan-approve.command.d.ts +10 -0
- package/dist/commands/task/plan-approve.command.d.ts.map +1 -0
- package/dist/commands/task/plan-approve.command.js +54 -0
- package/dist/commands/task/plan-reject.command.d.ts +10 -0
- package/dist/commands/task/plan-reject.command.d.ts.map +1 -0
- package/dist/commands/task/plan-reject.command.js +59 -0
- package/dist/commands/task/plan-set.command.d.ts +11 -0
- package/dist/commands/task/plan-set.command.d.ts.map +1 -0
- package/dist/commands/task/plan-set.command.js +76 -0
- package/dist/commands/task/plan.d.ts +23 -10
- package/dist/commands/task/plan.d.ts.map +1 -1
- package/dist/commands/task/plan.js +182 -177
- package/dist/commands/task/ready.d.ts +2 -0
- package/dist/commands/task/ready.d.ts.map +1 -1
- package/dist/commands/task/ready.js +4 -6
- package/dist/commands/task/scaffold.command.d.ts +12 -0
- package/dist/commands/task/scaffold.command.d.ts.map +1 -0
- package/dist/commands/task/scaffold.command.js +73 -0
- package/dist/commands/task/scaffold.d.ts +7 -3
- package/dist/commands/task/scaffold.d.ts.map +1 -1
- package/dist/commands/task/scaffold.js +57 -67
- package/dist/commands/task/scrub.command.d.ts +11 -0
- package/dist/commands/task/scrub.command.d.ts.map +1 -0
- package/dist/commands/task/scrub.command.js +72 -0
- package/dist/commands/task/scrub.d.ts +6 -3
- package/dist/commands/task/scrub.d.ts.map +1 -1
- package/dist/commands/task/scrub.js +12 -68
- package/dist/commands/task/search.command.d.ts +11 -0
- package/dist/commands/task/search.command.d.ts.map +1 -0
- package/dist/commands/task/search.command.js +101 -0
- package/dist/commands/task/search.d.ts +5 -1
- package/dist/commands/task/search.d.ts.map +1 -1
- package/dist/commands/task/search.js +14 -23
- package/dist/commands/task/set-status.command.d.ts +21 -0
- package/dist/commands/task/set-status.command.d.ts.map +1 -0
- package/dist/commands/task/set-status.command.js +171 -0
- package/dist/commands/task/set-status.d.ts +2 -0
- package/dist/commands/task/set-status.d.ts.map +1 -1
- package/dist/commands/task/set-status.js +14 -8
- package/dist/commands/task/shared.d.ts +5 -0
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +50 -0
- package/dist/commands/task/show.command.d.ts +8 -0
- package/dist/commands/task/show.command.d.ts.map +1 -0
- package/dist/commands/task/show.command.js +19 -0
- package/dist/commands/task/show.d.ts +2 -0
- package/dist/commands/task/show.d.ts.map +1 -1
- package/dist/commands/task/show.js +5 -7
- package/dist/commands/task/start.d.ts +2 -2
- package/dist/commands/task/start.d.ts.map +1 -1
- package/dist/commands/task/start.js +48 -11
- package/dist/commands/task/update.command.d.ts +18 -0
- package/dist/commands/task/update.command.d.ts.map +1 -0
- package/dist/commands/task/update.command.js +141 -0
- package/dist/commands/task/update.d.ts +13 -3
- package/dist/commands/task/update.d.ts.map +1 -1
- package/dist/commands/task/update.js +31 -122
- package/dist/commands/task/verify-ok.command.d.ts +13 -0
- package/dist/commands/task/verify-ok.command.d.ts.map +1 -0
- package/dist/commands/task/verify-ok.command.js +83 -0
- package/dist/commands/task/verify-record.d.ts +30 -8
- package/dist/commands/task/verify-record.d.ts.map +1 -1
- package/dist/commands/task/verify-record.js +107 -117
- package/dist/commands/task/verify-rework.command.d.ts +13 -0
- package/dist/commands/task/verify-rework.command.d.ts.map +1 -0
- package/dist/commands/task/verify-rework.command.js +83 -0
- package/dist/commands/task/verify-show.command.d.ts +9 -0
- package/dist/commands/task/verify-show.command.d.ts.map +1 -0
- package/dist/commands/task/verify-show.command.js +38 -0
- package/dist/commands/task/verify.command.d.ts +7 -0
- package/dist/commands/task/verify.command.d.ts.map +1 -0
- package/dist/commands/task/verify.command.js +20 -0
- package/dist/commands/upgrade.command.d.ts +6 -0
- package/dist/commands/upgrade.command.d.ts.map +1 -0
- package/dist/commands/upgrade.command.js +104 -0
- package/dist/commands/upgrade.d.ts +19 -2
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +281 -85
- package/dist/commands/verify.command.d.ts +16 -0
- package/dist/commands/verify.command.d.ts.map +1 -0
- package/dist/commands/verify.command.js +113 -0
- package/dist/commands/workflow.d.ts +4 -6
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +4 -7
- package/dist/meta/release.d.ts +2 -0
- package/dist/meta/release.d.ts.map +1 -0
- package/dist/meta/release.js +50 -0
- package/dist/policy/evaluate.d.ts +3 -0
- package/dist/policy/evaluate.d.ts.map +1 -0
- package/dist/policy/evaluate.js +27 -0
- package/dist/policy/result.d.ts +7 -0
- package/dist/policy/result.d.ts.map +1 -0
- package/dist/policy/result.js +21 -0
- package/dist/policy/rules/allowlist.d.ts +3 -0
- package/dist/policy/rules/allowlist.d.ts.map +1 -0
- package/dist/policy/rules/allowlist.js +30 -0
- package/dist/policy/rules/branch-pr-base.d.ts +3 -0
- package/dist/policy/rules/branch-pr-base.d.ts.map +1 -0
- package/dist/policy/rules/branch-pr-base.js +43 -0
- package/dist/policy/rules/clean-tree.d.ts +3 -0
- package/dist/policy/rules/clean-tree.d.ts.map +1 -0
- package/dist/policy/rules/clean-tree.js +19 -0
- package/dist/policy/rules/commit-subject.d.ts +3 -0
- package/dist/policy/rules/commit-subject.d.ts.map +1 -0
- package/dist/policy/rules/commit-subject.js +33 -0
- package/dist/policy/rules/protected-paths.d.ts +3 -0
- package/dist/policy/rules/protected-paths.d.ts.map +1 -0
- package/dist/policy/rules/protected-paths.js +53 -0
- package/dist/policy/types.d.ts +38 -0
- package/dist/policy/types.d.ts.map +1 -0
- package/dist/policy/types.js +1 -0
- package/dist/shared/write-if-changed.d.ts +3 -0
- package/dist/shared/write-if-changed.d.ts.map +1 -0
- package/dist/shared/write-if-changed.js +25 -0
- package/package.json +3 -3
- package/dist/cli/help.d.ts +0 -2
- package/dist/cli/help.d.ts.map +0 -1
- package/dist/cli/help.js +0 -127
- package/dist/commands/task/verify.d.ts +0 -2
- package/dist/commands/task/verify.d.ts.map +0 -1
- package/dist/commands/task/verify.js +0 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileExists, getPathKind } from "../../../cli/fs-utils.js";
|
|
4
|
+
import { invalidFieldMessage, requiredFieldMessage } from "../../../cli/output.js";
|
|
5
|
+
import { isRecord } from "../../../shared/guards.js";
|
|
6
|
+
import { RECIPES_SCENARIOS_DIR_NAME, RECIPES_SCENARIOS_INDEX_NAME } from "./constants.js";
|
|
7
|
+
import { normalizeScenarioId } from "./normalize.js";
|
|
8
|
+
function validateScenarioDefinition(raw, sourcePath) {
|
|
9
|
+
if (!isRecord(raw))
|
|
10
|
+
throw new Error(invalidFieldMessage("scenario", "object", sourcePath));
|
|
11
|
+
if (raw.schema_version !== undefined && raw.schema_version !== "1") {
|
|
12
|
+
throw new Error(invalidFieldMessage("scenario.schema_version", '"1"', sourcePath));
|
|
13
|
+
}
|
|
14
|
+
const rawId = typeof raw.id === "string" ? raw.id : "";
|
|
15
|
+
const id = normalizeScenarioId(rawId);
|
|
16
|
+
const goal = typeof raw.goal === "string" ? raw.goal.trim() : "";
|
|
17
|
+
if (!goal)
|
|
18
|
+
throw new Error(requiredFieldMessage("scenario.goal", sourcePath));
|
|
19
|
+
if (!("inputs" in raw))
|
|
20
|
+
throw new Error(requiredFieldMessage("scenario.inputs", sourcePath));
|
|
21
|
+
if (!("outputs" in raw))
|
|
22
|
+
throw new Error(requiredFieldMessage("scenario.outputs", sourcePath));
|
|
23
|
+
if (!Array.isArray(raw.steps)) {
|
|
24
|
+
throw new Error(invalidFieldMessage("scenario.steps", "array", sourcePath));
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
schema_version: "1",
|
|
28
|
+
id,
|
|
29
|
+
summary: typeof raw.summary === "string" ? raw.summary.trim() : undefined,
|
|
30
|
+
description: typeof raw.description === "string" ? raw.description.trim() : undefined,
|
|
31
|
+
goal,
|
|
32
|
+
inputs: raw.inputs,
|
|
33
|
+
outputs: raw.outputs,
|
|
34
|
+
steps: raw.steps,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export async function readScenarioDefinition(filePath) {
|
|
38
|
+
const raw = JSON.parse(await readFile(filePath, "utf8"));
|
|
39
|
+
return validateScenarioDefinition(raw, filePath);
|
|
40
|
+
}
|
|
41
|
+
export async function readScenarioIndex(filePath) {
|
|
42
|
+
const raw = JSON.parse(await readFile(filePath, "utf8"));
|
|
43
|
+
if (!isRecord(raw))
|
|
44
|
+
throw new Error(invalidFieldMessage("scenarios index", "object"));
|
|
45
|
+
if (raw.schema_version !== 1)
|
|
46
|
+
throw new Error(invalidFieldMessage("scenarios index.schema_version", "1"));
|
|
47
|
+
if (!Array.isArray(raw.scenarios))
|
|
48
|
+
throw new Error(invalidFieldMessage("scenarios index.scenarios", "array"));
|
|
49
|
+
const scenarios = raw.scenarios
|
|
50
|
+
.filter((entry) => isRecord(entry))
|
|
51
|
+
.map((entry) => ({
|
|
52
|
+
id: typeof entry.id === "string" ? entry.id : "",
|
|
53
|
+
summary: typeof entry.summary === "string" ? entry.summary : undefined,
|
|
54
|
+
}))
|
|
55
|
+
.filter((entry) => entry.id);
|
|
56
|
+
return { schema_version: 1, scenarios };
|
|
57
|
+
}
|
|
58
|
+
export async function collectRecipeScenarioDetails(recipeDir, manifest) {
|
|
59
|
+
const scenariosDir = path.join(recipeDir, RECIPES_SCENARIOS_DIR_NAME);
|
|
60
|
+
if ((await getPathKind(scenariosDir)) === "dir") {
|
|
61
|
+
const files = await readdir(scenariosDir);
|
|
62
|
+
const jsonFiles = files.filter((file) => file.toLowerCase().endsWith(".json")).toSorted();
|
|
63
|
+
const details = [];
|
|
64
|
+
for (const file of jsonFiles) {
|
|
65
|
+
const scenario = await readScenarioDefinition(path.join(scenariosDir, file));
|
|
66
|
+
details.push({
|
|
67
|
+
id: scenario.id,
|
|
68
|
+
summary: scenario.summary,
|
|
69
|
+
description: scenario.description,
|
|
70
|
+
goal: scenario.goal,
|
|
71
|
+
inputs: scenario.inputs,
|
|
72
|
+
outputs: scenario.outputs,
|
|
73
|
+
steps: scenario.steps,
|
|
74
|
+
source: "definition",
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return details.toSorted((a, b) => a.id.localeCompare(b.id));
|
|
78
|
+
}
|
|
79
|
+
const scenariosIndexPath = path.join(recipeDir, RECIPES_SCENARIOS_INDEX_NAME);
|
|
80
|
+
if (await fileExists(scenariosIndexPath)) {
|
|
81
|
+
const index = await readScenarioIndex(scenariosIndexPath);
|
|
82
|
+
return index.scenarios
|
|
83
|
+
.map((scenario) => ({
|
|
84
|
+
id: scenario.id,
|
|
85
|
+
summary: scenario.summary,
|
|
86
|
+
source: "index",
|
|
87
|
+
}))
|
|
88
|
+
.toSorted((a, b) => a.id.localeCompare(b.id));
|
|
89
|
+
}
|
|
90
|
+
const manifestScenarios = manifest.scenarios ?? [];
|
|
91
|
+
if (manifestScenarios.length > 0) {
|
|
92
|
+
return manifestScenarios
|
|
93
|
+
.map((scenario) => ({
|
|
94
|
+
id: scenario?.id ?? "",
|
|
95
|
+
summary: scenario?.summary,
|
|
96
|
+
source: "manifest",
|
|
97
|
+
}))
|
|
98
|
+
.filter((scenario) => scenario.id)
|
|
99
|
+
.toSorted((a, b) => a.id.localeCompare(b.id));
|
|
100
|
+
}
|
|
101
|
+
return [];
|
|
102
|
+
}
|
|
103
|
+
export function normalizeScenarioToolStep(raw, sourcePath) {
|
|
104
|
+
if (!isRecord(raw)) {
|
|
105
|
+
throw new Error(invalidFieldMessage("scenario step", "object", sourcePath));
|
|
106
|
+
}
|
|
107
|
+
const tool = typeof raw.tool === "string" ? raw.tool.trim() : "";
|
|
108
|
+
if (!tool) {
|
|
109
|
+
throw new Error(requiredFieldMessage("scenario step.tool", sourcePath));
|
|
110
|
+
}
|
|
111
|
+
const args = Array.isArray(raw.args) ? raw.args.filter((arg) => typeof arg === "string") : [];
|
|
112
|
+
if (Array.isArray(raw.args) && args.length !== raw.args.length) {
|
|
113
|
+
throw new Error(invalidFieldMessage("scenario step.args", "string[]", sourcePath));
|
|
114
|
+
}
|
|
115
|
+
const env = {};
|
|
116
|
+
if (raw.env !== undefined) {
|
|
117
|
+
if (!isRecord(raw.env)) {
|
|
118
|
+
throw new Error(invalidFieldMessage("scenario step.env", "object", sourcePath));
|
|
119
|
+
}
|
|
120
|
+
for (const [key, value] of Object.entries(raw.env)) {
|
|
121
|
+
if (typeof value !== "string") {
|
|
122
|
+
throw new Error(invalidFieldMessage("scenario step.env", "string map", sourcePath));
|
|
123
|
+
}
|
|
124
|
+
env[key] = value;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return { tool, args, env };
|
|
128
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
export type RecipeManifest = {
|
|
2
|
+
schema_version: "1";
|
|
3
|
+
id: string;
|
|
4
|
+
version: string;
|
|
5
|
+
name: string;
|
|
6
|
+
summary: string;
|
|
7
|
+
description: string;
|
|
8
|
+
tags?: string[];
|
|
9
|
+
agents?: {
|
|
10
|
+
id?: string;
|
|
11
|
+
summary?: string;
|
|
12
|
+
file?: string;
|
|
13
|
+
}[];
|
|
14
|
+
tools?: {
|
|
15
|
+
id?: string;
|
|
16
|
+
summary?: string;
|
|
17
|
+
runtime?: "node" | "bash";
|
|
18
|
+
entrypoint?: string;
|
|
19
|
+
permissions?: string[];
|
|
20
|
+
}[];
|
|
21
|
+
scenarios?: {
|
|
22
|
+
id?: string;
|
|
23
|
+
summary?: string;
|
|
24
|
+
}[];
|
|
25
|
+
};
|
|
26
|
+
export type RecipeConflictMode = "fail" | "rename" | "overwrite";
|
|
27
|
+
export type InstalledRecipeEntry = {
|
|
28
|
+
id: string;
|
|
29
|
+
version: string;
|
|
30
|
+
source: string;
|
|
31
|
+
installed_at: string;
|
|
32
|
+
tags: string[];
|
|
33
|
+
manifest: RecipeManifest;
|
|
34
|
+
};
|
|
35
|
+
export type InstalledRecipesFile = {
|
|
36
|
+
schema_version: 1;
|
|
37
|
+
updated_at: string;
|
|
38
|
+
recipes: InstalledRecipeEntry[];
|
|
39
|
+
};
|
|
40
|
+
export type ScenarioDefinition = {
|
|
41
|
+
schema_version: "1";
|
|
42
|
+
id: string;
|
|
43
|
+
summary?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
goal: string;
|
|
46
|
+
inputs: unknown;
|
|
47
|
+
outputs: unknown;
|
|
48
|
+
steps: unknown[];
|
|
49
|
+
};
|
|
50
|
+
export type RecipeScenarioDetail = {
|
|
51
|
+
id: string;
|
|
52
|
+
summary?: string;
|
|
53
|
+
description?: string;
|
|
54
|
+
goal?: string;
|
|
55
|
+
inputs?: unknown;
|
|
56
|
+
outputs?: unknown;
|
|
57
|
+
steps?: unknown[];
|
|
58
|
+
source: "definition" | "index" | "manifest";
|
|
59
|
+
};
|
|
60
|
+
export type RecipesIndex = {
|
|
61
|
+
schema_version: 1;
|
|
62
|
+
recipes: {
|
|
63
|
+
id: string;
|
|
64
|
+
summary: string;
|
|
65
|
+
description?: string;
|
|
66
|
+
versions: {
|
|
67
|
+
version: string;
|
|
68
|
+
url: string;
|
|
69
|
+
sha256: string;
|
|
70
|
+
min_agentplane_version?: string;
|
|
71
|
+
tags?: string[];
|
|
72
|
+
}[];
|
|
73
|
+
}[];
|
|
74
|
+
};
|
|
75
|
+
export type RecipesIndexSignature = {
|
|
76
|
+
schema_version: 1;
|
|
77
|
+
key_id: string;
|
|
78
|
+
signature: string;
|
|
79
|
+
algorithm?: string;
|
|
80
|
+
};
|
|
81
|
+
export type RecipeInstallSource = {
|
|
82
|
+
type: "name";
|
|
83
|
+
value: string;
|
|
84
|
+
} | {
|
|
85
|
+
type: "path";
|
|
86
|
+
value: string;
|
|
87
|
+
} | {
|
|
88
|
+
type: "url";
|
|
89
|
+
value: string;
|
|
90
|
+
} | {
|
|
91
|
+
type: "auto";
|
|
92
|
+
value: string;
|
|
93
|
+
};
|
|
94
|
+
export type RecipeCachePruneFlags = {
|
|
95
|
+
dryRun: boolean;
|
|
96
|
+
all: boolean;
|
|
97
|
+
};
|
|
98
|
+
export type RecipeListFlags = {
|
|
99
|
+
full: boolean;
|
|
100
|
+
tag?: string;
|
|
101
|
+
};
|
|
102
|
+
export type RecipeListRemoteFlags = {
|
|
103
|
+
refresh: boolean;
|
|
104
|
+
index?: string;
|
|
105
|
+
yes: boolean;
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
export type RecipesInfoParsed = {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const recipesInfoSpec: CommandSpec<RecipesInfoParsed>;
|
|
6
|
+
export declare const runRecipesInfo: CommandHandler<RecipesInfoParsed>;
|
|
7
|
+
//# sourceMappingURL=info.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/info.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1E,MAAM,MAAM,iBAAiB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/C,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,iBAAiB,CAO1D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,iBAAiB,CACoB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { cmdRecipeInfoParsed } from "../recipes.js";
|
|
2
|
+
export const recipesInfoSpec = {
|
|
3
|
+
id: ["recipes", "info"],
|
|
4
|
+
group: "Recipes",
|
|
5
|
+
summary: "Show installed recipe metadata.",
|
|
6
|
+
args: [{ name: "id", required: true, valueHint: "<id>" }],
|
|
7
|
+
examples: [{ cmd: "agentplane recipes info viewer", why: "Show recipe metadata." }],
|
|
8
|
+
parse: (raw) => ({ id: String(raw.args.id ?? "") }),
|
|
9
|
+
};
|
|
10
|
+
export const runRecipesInfo = (ctx, p) => cmdRecipeInfoParsed({ cwd: ctx.cwd, rootOverride: ctx.rootOverride, id: p.id });
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import { type RecipeConflictMode, type RecipeInstallSource } from "../recipes.js";
|
|
3
|
+
export type RecipesInstallParsed = {
|
|
4
|
+
source: RecipeInstallSource;
|
|
5
|
+
index?: string;
|
|
6
|
+
refresh: boolean;
|
|
7
|
+
yes: boolean;
|
|
8
|
+
onConflict: RecipeConflictMode;
|
|
9
|
+
};
|
|
10
|
+
export declare const recipesInstallSpec: CommandSpec<RecipesInstallParsed>;
|
|
11
|
+
export declare const runRecipesInstall: CommandHandler<RecipesInstallParsed>;
|
|
12
|
+
//# sourceMappingURL=install.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/install.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAc,MAAM,wBAAwB,CAAC;AAItF,OAAO,EAAoB,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpG,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,oBAAoB,CA4IhE,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,oBAAoB,CAkB7D,CAAC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
+
import { CliError } from "../../shared/errors.js";
|
|
3
|
+
import { cmdRecipeInstall } from "../recipes.js";
|
|
4
|
+
export const recipesInstallSpec = {
|
|
5
|
+
id: ["recipes", "install"],
|
|
6
|
+
group: "Recipes",
|
|
7
|
+
summary: "Install a recipe from remote index, local archive, or URL.",
|
|
8
|
+
synopsis: [
|
|
9
|
+
"agentplane recipes install <id|path|url> [--index <path|url>] [--refresh] [--yes] [--on-conflict <fail|rename|overwrite>]",
|
|
10
|
+
"agentplane recipes install --name <id> [--index <path|url>] [--refresh] [--yes] [--on-conflict <fail|rename|overwrite>]",
|
|
11
|
+
"agentplane recipes install --path <path> [--yes] [--on-conflict <fail|rename|overwrite>]",
|
|
12
|
+
"agentplane recipes install --url <url> [--yes] [--on-conflict <fail|rename|overwrite>]",
|
|
13
|
+
],
|
|
14
|
+
args: [
|
|
15
|
+
{
|
|
16
|
+
name: "source",
|
|
17
|
+
required: false,
|
|
18
|
+
valueHint: "<id|path|url>",
|
|
19
|
+
description: "Auto mode: URL if http(s); else PATH if file exists; else NAME (remote index id).",
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
options: [
|
|
23
|
+
{
|
|
24
|
+
kind: "string",
|
|
25
|
+
name: "name",
|
|
26
|
+
valueHint: "<id>",
|
|
27
|
+
description: "Install from remote index by recipe id.",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
kind: "string",
|
|
31
|
+
name: "path",
|
|
32
|
+
valueHint: "<path>",
|
|
33
|
+
description: "Install from local recipe archive path.",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
kind: "string",
|
|
37
|
+
name: "url",
|
|
38
|
+
valueHint: "<url>",
|
|
39
|
+
description: "Install from recipe archive URL.",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
kind: "string",
|
|
43
|
+
name: "index",
|
|
44
|
+
valueHint: "<path|url>",
|
|
45
|
+
description: "Override recipes index location (used when installing by name / auto-name).",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
kind: "boolean",
|
|
49
|
+
name: "refresh",
|
|
50
|
+
default: false,
|
|
51
|
+
description: "Refresh remote index cache before installing.",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
kind: "boolean",
|
|
55
|
+
name: "yes",
|
|
56
|
+
default: false,
|
|
57
|
+
description: "Auto-approve network prompts when allowed by config.",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
kind: "string",
|
|
61
|
+
name: "on-conflict",
|
|
62
|
+
valueHint: "<fail|rename|overwrite>",
|
|
63
|
+
choices: ["fail", "rename", "overwrite"],
|
|
64
|
+
default: "fail",
|
|
65
|
+
description: "How to handle conflicts when applying recipe agents.",
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
validateRaw: (raw) => {
|
|
69
|
+
const explicit = [raw.opts.name, raw.opts.path, raw.opts.url].filter(Boolean).length;
|
|
70
|
+
const hasPositional = Boolean(raw.args.source);
|
|
71
|
+
if (explicit + (hasPositional ? 1 : 0) !== 1) {
|
|
72
|
+
throw usageError({
|
|
73
|
+
spec: recipesInstallSpec,
|
|
74
|
+
message: "Exactly one source is required: <source> OR --name OR --path OR --url",
|
|
75
|
+
command: "recipes install",
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
parse: (raw) => {
|
|
80
|
+
const onConflict = (raw.opts["on-conflict"] ?? "fail");
|
|
81
|
+
const refresh = raw.opts.refresh === true;
|
|
82
|
+
const yes = raw.opts.yes === true;
|
|
83
|
+
const index = typeof raw.opts.index === "string" ? raw.opts.index : undefined;
|
|
84
|
+
if (raw.opts.name) {
|
|
85
|
+
return {
|
|
86
|
+
source: { type: "name", value: raw.opts.name },
|
|
87
|
+
index,
|
|
88
|
+
refresh,
|
|
89
|
+
yes,
|
|
90
|
+
onConflict,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
if (raw.opts.path) {
|
|
94
|
+
return {
|
|
95
|
+
source: { type: "path", value: raw.opts.path },
|
|
96
|
+
index,
|
|
97
|
+
refresh,
|
|
98
|
+
yes,
|
|
99
|
+
onConflict,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
if (raw.opts.url) {
|
|
103
|
+
return {
|
|
104
|
+
source: { type: "url", value: raw.opts.url },
|
|
105
|
+
index,
|
|
106
|
+
refresh,
|
|
107
|
+
yes,
|
|
108
|
+
onConflict,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
const source = raw.args.source;
|
|
112
|
+
if (typeof source !== "string") {
|
|
113
|
+
throw usageError({
|
|
114
|
+
spec: recipesInstallSpec,
|
|
115
|
+
command: "recipes install",
|
|
116
|
+
message: "Missing source argument",
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
source: { type: "auto", value: source },
|
|
121
|
+
index,
|
|
122
|
+
refresh,
|
|
123
|
+
yes,
|
|
124
|
+
onConflict,
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
examples: [
|
|
128
|
+
{ cmd: "agentplane recipes install viewer", why: "Auto: install by id from remote index." },
|
|
129
|
+
{
|
|
130
|
+
cmd: "agentplane recipes install --name viewer --refresh",
|
|
131
|
+
why: "Install by id, forcing index refresh.",
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
cmd: "agentplane recipes install viewer --on-conflict overwrite",
|
|
135
|
+
why: "Apply recipe agents, overwriting conflicts.",
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
notes: [
|
|
139
|
+
"Auto mode resolution matches v0.1.9: URL if http(s); else PATH if file exists; else NAME (remote index).",
|
|
140
|
+
"Network operations may require approval; use --yes to auto-approve when allowed by config.",
|
|
141
|
+
],
|
|
142
|
+
};
|
|
143
|
+
export const runRecipesInstall = (ctx, p) => (async () => {
|
|
144
|
+
try {
|
|
145
|
+
return await cmdRecipeInstall({
|
|
146
|
+
cwd: ctx.cwd,
|
|
147
|
+
rootOverride: ctx.rootOverride,
|
|
148
|
+
...p,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
catch (err) {
|
|
152
|
+
if (err instanceof CliError && err.code === "E_USAGE") {
|
|
153
|
+
throw usageError({
|
|
154
|
+
spec: recipesInstallSpec,
|
|
155
|
+
command: "recipes install",
|
|
156
|
+
message: err.message,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
throw err;
|
|
160
|
+
}
|
|
161
|
+
})();
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import { type RecipeListRemoteFlags } from "../recipes.js";
|
|
3
|
+
export type RecipesListRemoteParsed = RecipeListRemoteFlags;
|
|
4
|
+
export declare const recipesListRemoteSpec: CommandSpec<RecipesListRemoteParsed>;
|
|
5
|
+
export declare const runRecipesListRemote: CommandHandler<RecipesListRemoteParsed>;
|
|
6
|
+
//# sourceMappingURL=list-remote.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-remote.command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/list-remote.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAA6B,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtF,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAE5D,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,uBAAuB,CA2CtE,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,uBAAuB,CACW,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { cmdRecipeListRemoteParsed } from "../recipes.js";
|
|
2
|
+
export const recipesListRemoteSpec = {
|
|
3
|
+
id: ["recipes", "list-remote"],
|
|
4
|
+
group: "Recipes",
|
|
5
|
+
summary: "List recipes from the remote index (or cache).",
|
|
6
|
+
options: [
|
|
7
|
+
{
|
|
8
|
+
kind: "boolean",
|
|
9
|
+
name: "refresh",
|
|
10
|
+
default: false,
|
|
11
|
+
description: "Refresh remote index cache before listing.",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
kind: "string",
|
|
15
|
+
name: "index",
|
|
16
|
+
valueHint: "<path|url>",
|
|
17
|
+
description: "Override recipes index location (path or http(s) URL).",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
kind: "boolean",
|
|
21
|
+
name: "yes",
|
|
22
|
+
default: false,
|
|
23
|
+
description: "Auto-approve network access prompts (subject to config approvals).",
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
examples: [
|
|
27
|
+
{
|
|
28
|
+
cmd: "agentplane recipes list-remote",
|
|
29
|
+
why: "List remote recipes using cached index when available.",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
cmd: "agentplane recipes list-remote --refresh",
|
|
33
|
+
why: "Force refresh of the remote index cache.",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
cmd: "agentplane recipes list-remote --index ./index.json --refresh",
|
|
37
|
+
why: "Refresh from a local index file.",
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
parse: (raw) => ({
|
|
41
|
+
refresh: raw.opts.refresh === true,
|
|
42
|
+
index: raw.opts.index,
|
|
43
|
+
yes: raw.opts.yes === true,
|
|
44
|
+
}),
|
|
45
|
+
};
|
|
46
|
+
export const runRecipesListRemote = (ctx, flags) => cmdRecipeListRemoteParsed({ cwd: ctx.cwd, rootOverride: ctx.rootOverride, flags });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import { type RecipeListFlags } from "../recipes.js";
|
|
3
|
+
export type RecipesListParsed = RecipeListFlags;
|
|
4
|
+
export declare const recipesListSpec: CommandSpec<RecipesListParsed>;
|
|
5
|
+
export declare const runRecipesList: CommandHandler<RecipesListParsed>;
|
|
6
|
+
//# sourceMappingURL=list.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/list.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1E,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAE1E,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAEhD,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,iBAAiB,CAkC1D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,iBAAiB,CACiB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
+
import { cmdRecipeListParsed } from "../recipes.js";
|
|
3
|
+
export const recipesListSpec = {
|
|
4
|
+
id: ["recipes", "list"],
|
|
5
|
+
group: "Recipes",
|
|
6
|
+
summary: "List installed recipes.",
|
|
7
|
+
options: [
|
|
8
|
+
{ kind: "boolean", name: "full", default: false, description: "Print full JSON payload." },
|
|
9
|
+
{
|
|
10
|
+
kind: "string",
|
|
11
|
+
name: "tag",
|
|
12
|
+
valueHint: "<tag>",
|
|
13
|
+
description: "Filter installed recipes by tag.",
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
examples: [
|
|
17
|
+
{ cmd: "agentplane recipes list", why: "List installed recipes." },
|
|
18
|
+
{ cmd: "agentplane recipes list --tag cli", why: "List installed recipes with a tag." },
|
|
19
|
+
{ cmd: "agentplane recipes list --full", why: "Print full JSON payload." },
|
|
20
|
+
],
|
|
21
|
+
parse: (raw) => ({
|
|
22
|
+
full: raw.opts.full === true,
|
|
23
|
+
tag: (() => {
|
|
24
|
+
const rawTag = raw.opts.tag;
|
|
25
|
+
if (rawTag === undefined)
|
|
26
|
+
return;
|
|
27
|
+
const trimmed = rawTag.trim();
|
|
28
|
+
if (!trimmed) {
|
|
29
|
+
throw usageError({
|
|
30
|
+
spec: recipesListSpec,
|
|
31
|
+
command: "recipes list",
|
|
32
|
+
message: "Option --tag must not be empty.",
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return trimmed;
|
|
36
|
+
})(),
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
39
|
+
export const runRecipesList = (ctx, flags) => cmdRecipeListParsed({ cwd: ctx.cwd, rootOverride: ctx.rootOverride, flags });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
type RecipesParsed = Record<string, never>;
|
|
3
|
+
export declare const recipesSpec: CommandSpec<RecipesParsed>;
|
|
4
|
+
export declare const runRecipes: CommandHandler<RecipesParsed>;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=recipes.command.d.ts.map
|
|
@@ -0,0 +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;AAItF,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAY3C,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,aAAa,CAyBlD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,aAAa,CAOpD,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { usageError } from "../../cli/spec/errors.js";
|
|
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
|
+
];
|
|
12
|
+
export const recipesSpec = {
|
|
13
|
+
id: ["recipes"],
|
|
14
|
+
group: "Recipes",
|
|
15
|
+
summary: "Recipe management commands.",
|
|
16
|
+
synopsis: ["agentplane recipes <subcommand> [options]"],
|
|
17
|
+
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
|
+
},
|
|
37
|
+
};
|
|
38
|
+
export const runRecipes = (_ctx) => {
|
|
39
|
+
// Should be unreachable because validateRaw always throws.
|
|
40
|
+
throw usageError({
|
|
41
|
+
spec: recipesSpec,
|
|
42
|
+
command: "recipes",
|
|
43
|
+
message: "Missing recipes subcommand.",
|
|
44
|
+
});
|
|
45
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
export type RecipesRemoveParsed = {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const recipesRemoveSpec: CommandSpec<RecipesRemoveParsed>;
|
|
6
|
+
export declare const runRecipesRemove: CommandHandler<RecipesRemoveParsed>;
|
|
7
|
+
//# sourceMappingURL=remove.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove.command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/remove.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1E,MAAM,MAAM,mBAAmB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAO9D,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,mBAAmB,CACkB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { cmdRecipeRemoveParsed } from "../recipes.js";
|
|
2
|
+
export const recipesRemoveSpec = {
|
|
3
|
+
id: ["recipes", "remove"],
|
|
4
|
+
group: "Recipes",
|
|
5
|
+
summary: "Remove an installed recipe.",
|
|
6
|
+
args: [{ name: "id", required: true, valueHint: "<id>" }],
|
|
7
|
+
examples: [{ cmd: "agentplane recipes remove viewer", why: "Remove a recipe by id." }],
|
|
8
|
+
parse: (raw) => ({ id: String(raw.args.id ?? "") }),
|
|
9
|
+
};
|
|
10
|
+
export const runRecipesRemove = (ctx, p) => cmdRecipeRemoveParsed({ cwd: ctx.cwd, rootOverride: ctx.rootOverride, id: p.id });
|