agentplane 0.3.12 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/RUNNER.md +1 -1
- package/assets/agents/ORCHESTRATOR.json +1 -1
- package/assets/agents/SKILL_EXTRACTOR.json +31 -0
- package/assets/codex-plugin/assets/header.png +0 -0
- package/assets/codex-plugin/assets/icon.svg +1 -0
- package/assets/codex-plugin/assets/logo.svg +1 -0
- package/assets/codex-plugin/skills/agentplane/SKILL.md +35 -0
- package/assets/framework.manifest.json +7 -0
- package/assets/policy/governance.md +4 -2
- package/assets/policy/incidents.md +4 -19
- package/assets/policy/workflow.branch_pr.md +10 -5
- package/assets/policy/workflow.release.md +5 -2
- package/dist/.build-manifest.json +409 -219
- package/dist/cli/exit-codes.d.ts.map +1 -1
- package/dist/cli/exit-codes.js +1 -0
- package/dist/cli/output.d.ts +29 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +33 -0
- package/dist/cli/reason-codes.d.ts +1 -1
- package/dist/cli/reason-codes.d.ts.map +1 -1
- package/dist/cli/reason-codes.js +12 -0
- package/dist/cli/run-cli/command-catalog/core.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/core.js +36 -78
- package/dist/cli/run-cli/command-catalog/lifecycle.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/lifecycle.js +4 -12
- package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/project.js +27 -31
- package/dist/cli/run-cli/command-catalog/shared.d.ts +9 -6
- package/dist/cli/run-cli/command-catalog/shared.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/shared.js +23 -6
- package/dist/cli/run-cli/command-catalog/task.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/task.js +6 -18
- package/dist/cli/run-cli/command-catalog.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/codex.d.ts +14 -0
- package/dist/cli/run-cli/commands/codex.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/codex.js +100 -0
- package/dist/cli/run-cli/commands/core.d.ts +1 -0
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core.js +1 -0
- package/dist/cli/run-cli/commands/init/recipes.d.ts +9 -1
- package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/recipes.js +33 -22
- package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init.js +26 -21
- package/dist/cli/run-cli/error-guidance.js +20 -0
- package/dist/cli/run-cli.js +1 -1
- package/dist/cli/run-cli.test-helpers.d.ts +1 -74
- package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
- package/dist/cli/run-cli.test-helpers.js +1 -766
- package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
- package/dist/commands/branch/cleanup-merged.js +5 -9
- package/dist/commands/branch/work-start.command.d.ts.map +1 -1
- package/dist/commands/branch/work-start.command.js +1 -0
- package/dist/commands/codex/plugin-install.d.ts +26 -0
- package/dist/commands/codex/plugin-install.d.ts.map +1 -0
- package/dist/commands/codex/plugin-install.js +209 -0
- package/dist/commands/commit.spec.d.ts.map +1 -1
- package/dist/commands/commit.spec.js +2 -0
- package/dist/commands/doctor/branch-pr.d.ts +1 -1
- package/dist/commands/doctor/branch-pr.d.ts.map +1 -1
- package/dist/commands/doctor/branch-pr.js +5 -2
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +4 -1
- package/dist/commands/guard/impl/comment-commit.d.ts.map +1 -1
- package/dist/commands/guard/impl/comment-commit.js +2 -1
- package/dist/commands/guard/impl/env.d.ts +6 -0
- package/dist/commands/guard/impl/env.d.ts.map +1 -1
- package/dist/commands/guard/impl/env.js +41 -0
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
- package/dist/commands/pr/integrate/cmd.js +81 -5
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/prepare.js +38 -7
- package/dist/commands/pr/internal/auto-commit.d.ts.map +1 -1
- package/dist/commands/pr/internal/auto-commit.js +13 -7
- package/dist/commands/pr/internal/sync-branch.d.ts +36 -0
- package/dist/commands/pr/internal/sync-branch.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-branch.js +113 -0
- package/dist/commands/pr/internal/sync-github.d.ts +28 -0
- package/dist/commands/pr/internal/sync-github.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-github.js +178 -0
- package/dist/commands/pr/internal/sync-model.d.ts +36 -0
- package/dist/commands/pr/internal/sync-model.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-model.js +1 -0
- package/dist/commands/pr/internal/sync-open-step.d.ts +10 -0
- package/dist/commands/pr/internal/sync-open-step.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-open-step.js +128 -0
- package/dist/commands/pr/internal/sync-support.d.ts +7 -0
- package/dist/commands/pr/internal/sync-support.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-support.js +29 -0
- package/dist/commands/pr/internal/sync-update-step.d.ts +6 -0
- package/dist/commands/pr/internal/sync-update-step.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-update-step.js +68 -0
- package/dist/commands/pr/internal/sync.d.ts +2 -6
- package/dist/commands/pr/internal/sync.d.ts.map +1 -1
- package/dist/commands/pr/internal/sync.js +83 -525
- package/dist/commands/pr/open.d.ts.map +1 -1
- package/dist/commands/pr/open.js +62 -7
- package/dist/commands/pr/pr.command.d.ts.map +1 -1
- package/dist/commands/pr/pr.command.js +7 -2
- package/dist/commands/recipes/active.command.d.ts +7 -0
- package/dist/commands/recipes/active.command.d.ts.map +1 -0
- package/dist/commands/recipes/active.command.js +12 -0
- package/dist/commands/recipes/add.command.d.ts +8 -0
- package/dist/commands/recipes/add.command.d.ts.map +1 -0
- package/dist/commands/recipes/add.command.js +33 -0
- package/dist/commands/recipes/detach.command.d.ts +7 -0
- package/dist/commands/recipes/detach.command.d.ts.map +1 -0
- package/dist/commands/recipes/detach.command.js +19 -0
- package/dist/commands/recipes/disable.command.d.ts +7 -0
- package/dist/commands/recipes/disable.command.d.ts.map +1 -0
- package/dist/commands/recipes/disable.command.js +10 -0
- package/dist/commands/recipes/enable.command.d.ts +7 -0
- package/dist/commands/recipes/enable.command.d.ts.map +1 -0
- package/dist/commands/recipes/enable.command.js +10 -0
- package/dist/commands/recipes/explain-active.command.d.ts +5 -0
- package/dist/commands/recipes/explain-active.command.d.ts.map +1 -0
- package/dist/commands/recipes/explain-active.command.js +11 -0
- package/dist/commands/recipes/explain.command.d.ts.map +1 -1
- package/dist/commands/recipes/explain.command.js +4 -2
- package/dist/commands/recipes/impl/apply.d.ts +1 -1
- package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
- package/dist/commands/recipes/impl/apply.js +34 -16
- package/dist/commands/recipes/impl/commands/active.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/active.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/active.js +47 -0
- package/dist/commands/recipes/impl/commands/add.d.ts +8 -0
- package/dist/commands/recipes/impl/commands/add.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/add.js +105 -0
- package/dist/commands/recipes/impl/commands/detach.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/detach.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/detach.js +99 -0
- package/dist/commands/recipes/impl/commands/disable.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/disable.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/disable.js +23 -0
- package/dist/commands/recipes/impl/commands/enable.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/enable.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/enable.js +41 -0
- package/dist/commands/recipes/impl/commands/explain-active.d.ts +5 -0
- package/dist/commands/recipes/impl/commands/explain-active.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/explain-active.js +20 -0
- package/dist/commands/recipes/impl/commands/explain.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/explain.js +83 -36
- package/dist/commands/recipes/impl/commands/info.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/info.js +39 -22
- package/dist/commands/recipes/impl/commands/install.d.ts +1 -1
- package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/install.js +35 -42
- package/dist/commands/recipes/impl/commands/list-remote.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/list-remote.js +2 -3
- package/dist/commands/recipes/impl/commands/list.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/list.js +13 -12
- package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/remove.js +12 -2
- package/dist/commands/recipes/impl/commands/update.d.ts +7 -0
- package/dist/commands/recipes/impl/commands/update.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/update.js +107 -0
- package/dist/commands/recipes/impl/commands.d.ts +7 -0
- package/dist/commands/recipes/impl/commands.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands.js +7 -0
- package/dist/commands/recipes/impl/constants.d.ts +1 -14
- package/dist/commands/recipes/impl/constants.d.ts.map +1 -1
- package/dist/commands/recipes/impl/constants.js +1 -18
- package/dist/commands/recipes/impl/index.d.ts +1 -1
- package/dist/commands/recipes/impl/index.d.ts.map +1 -1
- package/dist/commands/recipes/impl/installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/installed-recipes.js +1 -2
- package/dist/commands/recipes/impl/mutation-transaction.d.ts +7 -0
- package/dist/commands/recipes/impl/mutation-transaction.d.ts.map +1 -0
- package/dist/commands/recipes/impl/mutation-transaction.js +47 -0
- package/dist/commands/recipes/impl/overlay-project.d.ts +48 -0
- package/dist/commands/recipes/impl/overlay-project.d.ts.map +1 -0
- package/dist/commands/recipes/impl/overlay-project.js +320 -0
- package/dist/commands/recipes/impl/paths.d.ts +17 -2
- package/dist/commands/recipes/impl/paths.d.ts.map +1 -1
- package/dist/commands/recipes/impl/paths.js +20 -5
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts +5 -4
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.js +34 -76
- package/dist/commands/recipes/impl/project-recipe-state.d.ts +18 -0
- package/dist/commands/recipes/impl/project-recipe-state.d.ts.map +1 -0
- package/dist/commands/recipes/impl/project-recipe-state.js +94 -0
- package/dist/commands/recipes/impl/project-registry.d.ts +24 -0
- package/dist/commands/recipes/impl/project-registry.d.ts.map +1 -0
- package/dist/commands/recipes/impl/project-registry.js +124 -0
- package/dist/commands/recipes/impl/resolver.d.ts +1 -1
- package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
- package/dist/commands/recipes/impl/resolver.js +6 -4
- package/dist/commands/recipes/impl/types.d.ts +1 -240
- package/dist/commands/recipes/impl/types.d.ts.map +1 -1
- package/dist/commands/recipes/impl/version.d.ts +5 -0
- package/dist/commands/recipes/impl/version.d.ts.map +1 -0
- package/dist/commands/recipes/impl/version.js +9 -0
- package/dist/commands/recipes/info.command.js +2 -2
- package/dist/commands/recipes/install.spec.js +4 -4
- package/dist/commands/recipes/list.command.js +4 -4
- package/dist/commands/recipes/remove.command.js +2 -2
- package/dist/commands/recipes/update.command.d.ts +8 -0
- package/dist/commands/recipes/update.command.d.ts.map +1 -0
- package/dist/commands/recipes/update.command.js +35 -0
- package/dist/commands/recipes.d.ts +10 -6
- package/dist/commands/recipes.d.ts.map +1 -1
- package/dist/commands/recipes.js +8 -5
- package/dist/commands/recipes.test-helpers.d.ts +3 -3
- package/dist/commands/recipes.test-helpers.d.ts.map +1 -1
- package/dist/commands/recipes.test-helpers.js +105 -15
- package/dist/commands/release/apply.command.d.ts +1 -1
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +15 -379
- package/dist/commands/release/apply.mutation.d.ts +1 -0
- package/dist/commands/release/apply.mutation.d.ts.map +1 -1
- package/dist/commands/release/apply.mutation.js +24 -1
- package/dist/commands/release/apply.pipeline.d.ts +22 -0
- package/dist/commands/release/apply.pipeline.d.ts.map +1 -0
- package/dist/commands/release/apply.pipeline.js +371 -0
- package/dist/commands/release/apply.preflight.d.ts +2 -0
- package/dist/commands/release/apply.preflight.d.ts.map +1 -1
- package/dist/commands/release/apply.preflight.js +13 -4
- package/dist/commands/release/apply.types.d.ts +27 -0
- package/dist/commands/release/apply.types.d.ts.map +1 -1
- package/dist/commands/release.test-helpers.d.ts +4 -0
- package/dist/commands/release.test-helpers.d.ts.map +1 -1
- package/dist/commands/release.test-helpers.js +7 -0
- package/dist/commands/scenario/execute.command.js +4 -4
- package/dist/commands/scenario/impl/commands.js +4 -4
- package/dist/commands/scenario/info.command.js +4 -4
- package/dist/commands/scenario/list.command.js +3 -3
- package/dist/commands/scenario/run.command.js +5 -5
- package/dist/commands/scenario/scenario.command.js +7 -7
- package/dist/commands/shared/reconcile-check.d.ts.map +1 -1
- package/dist/commands/shared/reconcile-check.js +2 -2
- package/dist/commands/shared/task-backend.d.ts +6 -1
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +34 -2
- package/dist/commands/shared/task-handoff.d.ts +2 -1
- package/dist/commands/shared/task-handoff.d.ts.map +1 -1
- package/dist/commands/shared/task-handoff.js +15 -0
- package/dist/commands/shared/task-mutation.d.ts.map +1 -1
- package/dist/commands/shared/task-mutation.js +4 -4
- package/dist/commands/shared/task-store/intents.d.ts +34 -0
- package/dist/commands/shared/task-store/intents.d.ts.map +1 -0
- package/dist/commands/shared/task-store/intents.js +265 -0
- package/dist/commands/shared/task-store/readme.d.ts +28 -0
- package/dist/commands/shared/task-store/readme.d.ts.map +1 -0
- package/dist/commands/shared/task-store/readme.js +125 -0
- package/dist/commands/shared/task-store/store.d.ts +26 -0
- package/dist/commands/shared/task-store/store.d.ts.map +1 -0
- package/dist/commands/shared/task-store/store.js +105 -0
- package/dist/commands/shared/task-store/types.d.ts +94 -0
- package/dist/commands/shared/task-store/types.d.ts.map +1 -0
- package/dist/commands/shared/task-store/types.js +1 -0
- package/dist/commands/shared/task-store.d.ts +3 -109
- package/dist/commands/shared/task-store.d.ts.map +1 -1
- package/dist/commands/shared/task-store.js +2 -493
- package/dist/commands/task/block.d.ts.map +1 -1
- package/dist/commands/task/block.js +7 -2
- package/dist/commands/task/comment.d.ts.map +1 -1
- package/dist/commands/task/comment.js +7 -2
- package/dist/commands/task/finish-shared.d.ts.map +1 -1
- package/dist/commands/task/finish-shared.js +3 -3
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +102 -15
- package/dist/commands/task/handoff-show.command.d.ts.map +1 -1
- package/dist/commands/task/handoff-show.command.js +24 -0
- package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -1
- package/dist/commands/task/hosted-merge-sync.js +9 -4
- package/dist/commands/task/list.run.d.ts.map +1 -1
- package/dist/commands/task/list.run.js +14 -4
- package/dist/commands/task/new.command.d.ts.map +1 -1
- package/dist/commands/task/new.command.js +16 -2
- package/dist/commands/task/new.js +2 -2
- package/dist/commands/task/show.d.ts.map +1 -1
- package/dist/commands/task/show.js +3 -3
- package/dist/commands/task/update.d.ts.map +1 -1
- package/dist/commands/task/update.js +11 -3
- package/dist/runner/adapters/codex.d.ts.map +1 -1
- package/dist/runner/adapters/codex.js +3 -33
- package/dist/runner/adapters/custom.d.ts.map +1 -1
- package/dist/runner/adapters/custom.js +3 -30
- package/dist/runner/adapters/runtime-shared.d.ts +14 -0
- package/dist/runner/adapters/runtime-shared.d.ts.map +1 -0
- package/dist/runner/adapters/runtime-shared.js +36 -0
- package/dist/runner/context/base-prompt-sources.d.ts +30 -0
- package/dist/runner/context/base-prompt-sources.d.ts.map +1 -0
- package/dist/runner/context/base-prompt-sources.js +144 -0
- package/dist/runner/context/base-prompts.d.ts +5 -23
- package/dist/runner/context/base-prompts.d.ts.map +1 -1
- package/dist/runner/context/base-prompts.js +10 -358
- package/dist/runner/context/overlay-prompt-blocks.d.ts +7 -0
- package/dist/runner/context/overlay-prompt-blocks.d.ts.map +1 -0
- package/dist/runner/context/overlay-prompt-blocks.js +72 -0
- package/dist/runner/context/prompt-block-shared.d.ts +54 -0
- package/dist/runner/context/prompt-block-shared.d.ts.map +1 -0
- package/dist/runner/context/prompt-block-shared.js +106 -0
- package/dist/runner/context/recipe-context.d.ts +2 -1
- package/dist/runner/context/recipe-context.d.ts.map +1 -1
- package/dist/runner/context/recipe-context.js +41 -8
- package/dist/runner/context/recipe-prompt-blocks.d.ts +6 -0
- package/dist/runner/context/recipe-prompt-blocks.d.ts.map +1 -0
- package/dist/runner/context/recipe-prompt-blocks.js +143 -0
- package/dist/runner/types.d.ts +4 -0
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/usecases/scenario-materialize-task.js +2 -2
- package/dist/runner/usecases/task-run-inspect.js +2 -2
- package/dist/runner/usecases/task-run-lifecycle-shared.js +2 -2
- package/dist/runner/usecases/task-run.d.ts.map +1 -1
- package/dist/runner/usecases/task-run.js +6 -3
- package/dist/runtime/behavior/resolve.d.ts +2 -1
- package/dist/runtime/behavior/resolve.d.ts.map +1 -1
- package/dist/runtime/behavior/resolve.js +25 -5
- package/dist/runtime/behavior/types.d.ts +1 -0
- package/dist/runtime/behavior/types.d.ts.map +1 -1
- package/dist/runtime/capabilities/recipe.d.ts +2 -1
- package/dist/runtime/capabilities/recipe.d.ts.map +1 -1
- package/dist/runtime/capabilities/recipe.js +88 -28
- package/dist/runtime/execution-context.d.ts +63 -0
- package/dist/runtime/execution-context.d.ts.map +1 -0
- package/dist/{usecases/context/resolve-context.js → runtime/execution-context.js} +23 -26
- package/dist/runtime/incidents/advice-strategy.d.ts +15 -0
- package/dist/runtime/incidents/advice-strategy.d.ts.map +1 -0
- package/dist/runtime/incidents/advice-strategy.js +54 -0
- package/dist/runtime/incidents/plan-strategy.d.ts +9 -0
- package/dist/runtime/incidents/plan-strategy.d.ts.map +1 -0
- package/dist/runtime/incidents/plan-strategy.js +205 -0
- package/dist/runtime/incidents/registry-strategy.d.ts +6 -0
- package/dist/runtime/incidents/registry-strategy.d.ts.map +1 -0
- package/dist/runtime/incidents/registry-strategy.js +280 -0
- package/dist/runtime/incidents/resolve.d.ts +3 -25
- package/dist/runtime/incidents/resolve.d.ts.map +1 -1
- package/dist/runtime/incidents/resolve.js +3 -683
- package/dist/runtime/incidents/shared.d.ts +34 -0
- package/dist/runtime/incidents/shared.d.ts.map +1 -0
- package/dist/runtime/incidents/shared.js +171 -0
- package/dist/shared/errors.d.ts +1 -1
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/runtime-source.d.ts.map +1 -1
- package/dist/shared/runtime-source.js +8 -3
- package/dist/testing/cli-harness/recipe-archives.d.ts +28 -0
- package/dist/testing/cli-harness/recipe-archives.d.ts.map +1 -0
- package/dist/testing/cli-harness/recipe-archives.js +374 -0
- package/dist/testing/cli-harness/stdio.d.ts +26 -0
- package/dist/testing/cli-harness/stdio.d.ts.map +1 -0
- package/dist/testing/cli-harness/stdio.js +84 -0
- package/dist/testing/cli-harness.d.ts +25 -0
- package/dist/testing/cli-harness.d.ts.map +1 -0
- package/dist/testing/cli-harness.js +313 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +1 -0
- package/package.json +7 -3
- package/dist/cli/recipes-bundled.d.ts +0 -10
- package/dist/cli/recipes-bundled.d.ts.map +0 -1
- package/dist/cli/recipes-bundled.js +0 -36
- package/dist/commands/recipes/impl/manifest.d.ts +0 -4
- package/dist/commands/recipes/impl/manifest.d.ts.map +0 -1
- package/dist/commands/recipes/impl/manifest.js +0 -229
- package/dist/commands/recipes/impl/normalize.d.ts +0 -8
- package/dist/commands/recipes/impl/normalize.d.ts.map +0 -1
- package/dist/commands/recipes/impl/normalize.js +0 -54
- package/dist/commands/recipes/impl/scenario.d.ts +0 -16
- package/dist/commands/recipes/impl/scenario.d.ts.map +0 -1
- package/dist/commands/recipes/impl/scenario.js +0 -262
- package/dist/recipes/bundled-recipes.d.ts +0 -17
- package/dist/recipes/bundled-recipes.d.ts.map +0 -1
- package/dist/recipes/bundled-recipes.js +0 -15
- package/dist/usecases/context/resolve-context.d.ts +0 -68
- package/dist/usecases/context/resolve-context.d.ts.map +0 -1
- package/dist/usecases/task/task-list-usecase.d.ts +0 -9
- package/dist/usecases/task/task-list-usecase.d.ts.map +0 -1
- package/dist/usecases/task/task-list-usecase.js +0 -17
- package/dist/usecases/task/task-new-usecase.d.ts +0 -9
- package/dist/usecases/task/task-new-usecase.d.ts.map +0 -1
- package/dist/usecases/task/task-new-usecase.js +0 -17
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { invalidPathMessage, requiredFieldMessage, invalidFieldMessage, } from "../../../cli/output.js";
|
|
2
|
-
import { dedupeStrings } from "../../../shared/strings.js";
|
|
3
|
-
function normalizeScopedId(field, value) {
|
|
4
|
-
const trimmed = value.trim();
|
|
5
|
-
if (!trimmed)
|
|
6
|
-
throw new Error(requiredFieldMessage(field));
|
|
7
|
-
if (trimmed.includes("/") || trimmed.includes("\\")) {
|
|
8
|
-
throw new Error(invalidPathMessage(field, "must not contain path separators"));
|
|
9
|
-
}
|
|
10
|
-
if (trimmed === "." || trimmed === "..") {
|
|
11
|
-
throw new Error(invalidPathMessage(field, "must not be '.' or '..'"));
|
|
12
|
-
}
|
|
13
|
-
return trimmed;
|
|
14
|
-
}
|
|
15
|
-
export function normalizeRecipeId(value) {
|
|
16
|
-
return normalizeScopedId("manifest.id", value);
|
|
17
|
-
}
|
|
18
|
-
export function normalizeAgentId(value) {
|
|
19
|
-
return normalizeScopedId("agent.id", value);
|
|
20
|
-
}
|
|
21
|
-
export function normalizeSkillId(value) {
|
|
22
|
-
return normalizeScopedId("skill.id", value);
|
|
23
|
-
}
|
|
24
|
-
export function normalizeToolId(value) {
|
|
25
|
-
return normalizeScopedId("tool.id", value);
|
|
26
|
-
}
|
|
27
|
-
export function normalizeScenarioId(value) {
|
|
28
|
-
return normalizeScopedId("scenario.id", value);
|
|
29
|
-
}
|
|
30
|
-
export function normalizeRecipeTags(value) {
|
|
31
|
-
if (value === undefined)
|
|
32
|
-
return [];
|
|
33
|
-
if (!Array.isArray(value))
|
|
34
|
-
throw new Error(invalidFieldMessage("manifest.tags", "string[]"));
|
|
35
|
-
const tags = value.map((tag) => {
|
|
36
|
-
if (typeof tag !== "string")
|
|
37
|
-
throw new Error(invalidFieldMessage("manifest.tags", "string[]"));
|
|
38
|
-
return tag.trim();
|
|
39
|
-
});
|
|
40
|
-
return dedupeStrings(tags);
|
|
41
|
-
}
|
|
42
|
-
export function normalizeRecipeRelativePath(field, value) {
|
|
43
|
-
const trimmed = value.trim().replaceAll("\\", "/");
|
|
44
|
-
if (!trimmed)
|
|
45
|
-
throw new Error(requiredFieldMessage(field));
|
|
46
|
-
if (trimmed.startsWith("/")) {
|
|
47
|
-
throw new Error(invalidPathMessage(field, "must be relative"));
|
|
48
|
-
}
|
|
49
|
-
const segments = trimmed.split("/");
|
|
50
|
-
if (segments.some((segment) => !segment || segment === "." || segment === "..")) {
|
|
51
|
-
throw new Error(invalidPathMessage(field, "must stay within the recipe root"));
|
|
52
|
-
}
|
|
53
|
-
return trimmed;
|
|
54
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { RecipeManifest, RecipeScenarioDetail, ScenarioDefinition } from "./types.js";
|
|
2
|
-
export declare function readScenarioDefinition(filePath: string): Promise<ScenarioDefinition>;
|
|
3
|
-
export declare function readScenarioIndex(filePath: string): Promise<{
|
|
4
|
-
schema_version: 1;
|
|
5
|
-
scenarios: {
|
|
6
|
-
id: string;
|
|
7
|
-
summary?: string;
|
|
8
|
-
}[];
|
|
9
|
-
}>;
|
|
10
|
-
export declare function collectRecipeScenarioDetails(recipeDir: string, manifest: RecipeManifest): Promise<RecipeScenarioDetail[]>;
|
|
11
|
-
export declare function normalizeScenarioToolStep(raw: unknown, sourcePath: string): {
|
|
12
|
-
tool: string;
|
|
13
|
-
args: string[];
|
|
14
|
-
env: Record<string, string>;
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=scenario.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,262 +0,0 @@
|
|
|
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 { dedupeStrings } from "../../../shared/strings.js";
|
|
7
|
-
import { RECIPES_SCENARIOS_DIR_NAME, RECIPES_SCENARIOS_INDEX_NAME } from "./constants.js";
|
|
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
|
-
}
|
|
82
|
-
function normalizeScenarioEvidence(raw, sourcePath) {
|
|
83
|
-
if (raw === undefined)
|
|
84
|
-
return undefined;
|
|
85
|
-
if (!isRecord(raw)) {
|
|
86
|
-
throw new Error(invalidFieldMessage("scenario.evidence", "object", sourcePath));
|
|
87
|
-
}
|
|
88
|
-
const required = raw.required === true;
|
|
89
|
-
let files = [];
|
|
90
|
-
if (raw.files !== undefined) {
|
|
91
|
-
if (!Array.isArray(raw.files)) {
|
|
92
|
-
throw new Error(invalidFieldMessage("scenario.evidence.files", "string[]", sourcePath));
|
|
93
|
-
}
|
|
94
|
-
files = raw.files
|
|
95
|
-
.map((value) => (typeof value === "string" ? value.trim() : ""))
|
|
96
|
-
.filter(Boolean);
|
|
97
|
-
if (files.length !== raw.files.length) {
|
|
98
|
-
throw new Error(invalidFieldMessage("scenario.evidence.files", "string[]", sourcePath));
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
if (required && files.length === 0) {
|
|
102
|
-
files = ["evidence.json"];
|
|
103
|
-
}
|
|
104
|
-
return { required, files };
|
|
105
|
-
}
|
|
106
|
-
function validateScenarioDefinition(raw, sourcePath) {
|
|
107
|
-
if (!isRecord(raw))
|
|
108
|
-
throw new Error(invalidFieldMessage("scenario", "object", sourcePath));
|
|
109
|
-
if (raw.schema_version !== undefined && raw.schema_version !== "1") {
|
|
110
|
-
throw new Error(invalidFieldMessage("scenario.schema_version", '"1"', sourcePath));
|
|
111
|
-
}
|
|
112
|
-
const rawId = typeof raw.id === "string" ? raw.id : "";
|
|
113
|
-
const id = normalizeScenarioId(rawId);
|
|
114
|
-
const goal = typeof raw.goal === "string" ? raw.goal.trim() : "";
|
|
115
|
-
if (!goal)
|
|
116
|
-
throw new Error(requiredFieldMessage("scenario.goal", sourcePath));
|
|
117
|
-
if (!("task_template" in raw)) {
|
|
118
|
-
throw new Error(requiredFieldMessage("scenario.task_template", sourcePath));
|
|
119
|
-
}
|
|
120
|
-
if (!("inputs" in raw))
|
|
121
|
-
throw new Error(requiredFieldMessage("scenario.inputs", sourcePath));
|
|
122
|
-
if (!("outputs" in raw))
|
|
123
|
-
throw new Error(requiredFieldMessage("scenario.outputs", sourcePath));
|
|
124
|
-
if (!Array.isArray(raw.steps)) {
|
|
125
|
-
throw new Error(invalidFieldMessage("scenario.steps", "array", sourcePath));
|
|
126
|
-
}
|
|
127
|
-
return {
|
|
128
|
-
schema_version: "1",
|
|
129
|
-
id,
|
|
130
|
-
summary: typeof raw.summary === "string" ? raw.summary.trim() : undefined,
|
|
131
|
-
description: typeof raw.description === "string" ? raw.description.trim() : undefined,
|
|
132
|
-
goal,
|
|
133
|
-
task_template: normalizeTaskTemplate(raw.task_template, sourcePath),
|
|
134
|
-
inputs: raw.inputs,
|
|
135
|
-
outputs: raw.outputs,
|
|
136
|
-
evidence: normalizeScenarioEvidence(raw.evidence, sourcePath),
|
|
137
|
-
steps: raw.steps,
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
export async function readScenarioDefinition(filePath) {
|
|
141
|
-
const raw = JSON.parse(await readFile(filePath, "utf8"));
|
|
142
|
-
return validateScenarioDefinition(raw, filePath);
|
|
143
|
-
}
|
|
144
|
-
export async function readScenarioIndex(filePath) {
|
|
145
|
-
const raw = JSON.parse(await readFile(filePath, "utf8"));
|
|
146
|
-
if (!isRecord(raw))
|
|
147
|
-
throw new Error(invalidFieldMessage("scenarios index", "object"));
|
|
148
|
-
if (raw.schema_version !== 1)
|
|
149
|
-
throw new Error(invalidFieldMessage("scenarios index.schema_version", "1"));
|
|
150
|
-
if (!Array.isArray(raw.scenarios))
|
|
151
|
-
throw new Error(invalidFieldMessage("scenarios index.scenarios", "array"));
|
|
152
|
-
const scenarios = raw.scenarios
|
|
153
|
-
.filter((entry) => isRecord(entry))
|
|
154
|
-
.map((entry) => ({
|
|
155
|
-
id: typeof entry.id === "string" ? entry.id : "",
|
|
156
|
-
summary: typeof entry.summary === "string" ? entry.summary : undefined,
|
|
157
|
-
}))
|
|
158
|
-
.filter((entry) => entry.id);
|
|
159
|
-
return { schema_version: 1, scenarios };
|
|
160
|
-
}
|
|
161
|
-
export async function collectRecipeScenarioDetails(recipeDir, manifest) {
|
|
162
|
-
const manifestScenarios = manifest.scenarios ?? [];
|
|
163
|
-
const scenariosDir = path.join(recipeDir, RECIPES_SCENARIOS_DIR_NAME);
|
|
164
|
-
if (manifestScenarios.length > 0) {
|
|
165
|
-
const details = manifestScenarios.map((scenario) => ({
|
|
166
|
-
id: scenario.id,
|
|
167
|
-
name: scenario.name,
|
|
168
|
-
summary: scenario.summary,
|
|
169
|
-
description: scenario.description,
|
|
170
|
-
use_when: scenario.use_when,
|
|
171
|
-
avoid_when: scenario.avoid_when,
|
|
172
|
-
required_inputs: scenario.required_inputs,
|
|
173
|
-
outputs: scenario.outputs,
|
|
174
|
-
permissions: scenario.permissions,
|
|
175
|
-
artifacts: scenario.artifacts,
|
|
176
|
-
agents_involved: scenario.agents_involved,
|
|
177
|
-
skills_used: scenario.skills_used,
|
|
178
|
-
tools_used: scenario.tools_used,
|
|
179
|
-
run_profile: scenario.run_profile,
|
|
180
|
-
file: scenario.file,
|
|
181
|
-
source: "manifest",
|
|
182
|
-
}));
|
|
183
|
-
if ((await getPathKind(scenariosDir)) === "dir") {
|
|
184
|
-
const files = await readdir(scenariosDir);
|
|
185
|
-
const jsonFiles = files.filter((file) => file.toLowerCase().endsWith(".json")).toSorted();
|
|
186
|
-
for (const file of jsonFiles) {
|
|
187
|
-
const scenario = await readScenarioDefinition(path.join(scenariosDir, file));
|
|
188
|
-
const detail = details.find((entry) => entry.id === scenario.id);
|
|
189
|
-
if (!detail)
|
|
190
|
-
continue;
|
|
191
|
-
detail.description ??= scenario.description;
|
|
192
|
-
detail.goal = scenario.goal;
|
|
193
|
-
detail.task_template = scenario.task_template;
|
|
194
|
-
detail.inputs = scenario.inputs;
|
|
195
|
-
detail.steps = scenario.steps;
|
|
196
|
-
detail.outputs = detail.outputs ?? scenario.outputs;
|
|
197
|
-
detail.evidence = scenario.evidence;
|
|
198
|
-
detail.source = "definition";
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
return details.toSorted((a, b) => a.id.localeCompare(b.id));
|
|
202
|
-
}
|
|
203
|
-
if ((await getPathKind(scenariosDir)) === "dir") {
|
|
204
|
-
const files = await readdir(scenariosDir);
|
|
205
|
-
const jsonFiles = files.filter((file) => file.toLowerCase().endsWith(".json")).toSorted();
|
|
206
|
-
const details = [];
|
|
207
|
-
for (const file of jsonFiles) {
|
|
208
|
-
const scenario = await readScenarioDefinition(path.join(scenariosDir, file));
|
|
209
|
-
details.push({
|
|
210
|
-
id: scenario.id,
|
|
211
|
-
summary: scenario.summary,
|
|
212
|
-
description: scenario.description,
|
|
213
|
-
goal: scenario.goal,
|
|
214
|
-
task_template: scenario.task_template,
|
|
215
|
-
inputs: scenario.inputs,
|
|
216
|
-
outputs: scenario.outputs,
|
|
217
|
-
evidence: scenario.evidence,
|
|
218
|
-
steps: scenario.steps,
|
|
219
|
-
source: "definition",
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
return details.toSorted((a, b) => a.id.localeCompare(b.id));
|
|
223
|
-
}
|
|
224
|
-
const scenariosIndexPath = path.join(recipeDir, RECIPES_SCENARIOS_INDEX_NAME);
|
|
225
|
-
if (await fileExists(scenariosIndexPath)) {
|
|
226
|
-
const index = await readScenarioIndex(scenariosIndexPath);
|
|
227
|
-
return index.scenarios
|
|
228
|
-
.map((scenario) => ({
|
|
229
|
-
id: scenario.id,
|
|
230
|
-
summary: scenario.summary,
|
|
231
|
-
source: "index",
|
|
232
|
-
}))
|
|
233
|
-
.toSorted((a, b) => a.id.localeCompare(b.id));
|
|
234
|
-
}
|
|
235
|
-
return [];
|
|
236
|
-
}
|
|
237
|
-
export function normalizeScenarioToolStep(raw, sourcePath) {
|
|
238
|
-
if (!isRecord(raw)) {
|
|
239
|
-
throw new Error(invalidFieldMessage("scenario step", "object", sourcePath));
|
|
240
|
-
}
|
|
241
|
-
const tool = typeof raw.tool === "string" ? raw.tool.trim() : "";
|
|
242
|
-
if (!tool) {
|
|
243
|
-
throw new Error(requiredFieldMessage("scenario step.tool", sourcePath));
|
|
244
|
-
}
|
|
245
|
-
const args = Array.isArray(raw.args) ? raw.args.filter((arg) => typeof arg === "string") : [];
|
|
246
|
-
if (Array.isArray(raw.args) && args.length !== raw.args.length) {
|
|
247
|
-
throw new Error(invalidFieldMessage("scenario step.args", "string[]", sourcePath));
|
|
248
|
-
}
|
|
249
|
-
const env = {};
|
|
250
|
-
if (raw.env !== undefined) {
|
|
251
|
-
if (!isRecord(raw.env)) {
|
|
252
|
-
throw new Error(invalidFieldMessage("scenario step.env", "object", sourcePath));
|
|
253
|
-
}
|
|
254
|
-
for (const [key, value] of Object.entries(raw.env)) {
|
|
255
|
-
if (typeof value !== "string") {
|
|
256
|
-
throw new Error(invalidFieldMessage("scenario step.env", "string map", sourcePath));
|
|
257
|
-
}
|
|
258
|
-
env[key] = value;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
return { tool, args, env };
|
|
262
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export type BundledRecipesCatalog = {
|
|
2
|
-
schema_version: 1;
|
|
3
|
-
recipes: {
|
|
4
|
-
id: string;
|
|
5
|
-
summary: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
source_path?: string;
|
|
8
|
-
versions: {
|
|
9
|
-
version: string;
|
|
10
|
-
}[];
|
|
11
|
-
}[];
|
|
12
|
-
};
|
|
13
|
-
export type BundledRecipeEntry = BundledRecipesCatalog["recipes"][number];
|
|
14
|
-
export declare const BUNDLED_RECIPES_CATALOG: BundledRecipesCatalog;
|
|
15
|
-
export declare function resolveBundledRecipeSourcePath(recipeId: string): string | null;
|
|
16
|
-
export declare function getBundledRecipeEntry(recipeId: string): BundledRecipeEntry | null;
|
|
17
|
-
//# sourceMappingURL=bundled-recipes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundled-recipes.d.ts","sourceRoot":"","sources":["../../src/recipes/bundled-recipes.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,qBAAqB,GAAG;IAClC,cAAc,EAAE,CAAC,CAAC;IAClB,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KACjC,EAAE,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,eAAO,MAAM,uBAAuB,EAAE,qBAGrC,CAAC;AAEF,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK9E;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAEjF"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from "node:url";
|
|
2
|
-
export const BUNDLED_RECIPES_CATALOG = {
|
|
3
|
-
schema_version: 1,
|
|
4
|
-
recipes: [],
|
|
5
|
-
};
|
|
6
|
-
export function resolveBundledRecipeSourcePath(recipeId) {
|
|
7
|
-
const entry = getBundledRecipeEntry(recipeId);
|
|
8
|
-
const sourcePath = entry?.source_path?.trim();
|
|
9
|
-
if (!sourcePath)
|
|
10
|
-
return null;
|
|
11
|
-
return fileURLToPath(new URL(`../../assets/${sourcePath.replace(/^\/+/, "")}`, import.meta.url));
|
|
12
|
-
}
|
|
13
|
-
export function getBundledRecipeEntry(recipeId) {
|
|
14
|
-
return BUNDLED_RECIPES_CATALOG.recipes.find((recipe) => recipe.id === recipeId) ?? null;
|
|
15
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import type { AgentplaneConfig, ResolvedProject } from "@agentplaneorg/core";
|
|
2
|
-
import type { Adapters } from "../../adapters/index.js";
|
|
3
|
-
import { type CommandContext } from "../../commands/shared/task-backend.js";
|
|
4
|
-
import { PolicyEngine } from "../../policy/engine.js";
|
|
5
|
-
import { type ApprovalRuntime } from "../../runtime/approvals/index.js";
|
|
6
|
-
import { type AgentplaneCapabilityRegistry } from "../../runtime/capabilities/index.js";
|
|
7
|
-
import { type ResolvedExecutionProfileRuntime } from "../../runtime/execution-profile/index.js";
|
|
8
|
-
import { type FrameworkExplainPayload } from "../../runtime/explain/index.js";
|
|
9
|
-
import { type ResolvedHarnessContract } from "../../runtime/harness/index.js";
|
|
10
|
-
import { type FrameworkProtocolSurface } from "../../runtime/protocol/index.js";
|
|
11
|
-
import { type TaskIntakeRuntime } from "../../runtime/task-intake/index.js";
|
|
12
|
-
export type AgentplaneRepositoryContext = {
|
|
13
|
-
git_root: string;
|
|
14
|
-
agentplane_dir: string;
|
|
15
|
-
workflow_dir: string;
|
|
16
|
-
};
|
|
17
|
-
export type AgentplaneBackendContext = {
|
|
18
|
-
id: string;
|
|
19
|
-
config_path: string;
|
|
20
|
-
capabilities: CommandContext["taskBackend"]["capabilities"] | null;
|
|
21
|
-
task_backend: CommandContext["taskBackend"];
|
|
22
|
-
};
|
|
23
|
-
export type ReadOnlyUsecaseContext = {
|
|
24
|
-
command: CommandContext;
|
|
25
|
-
project: CommandContext["resolvedProject"];
|
|
26
|
-
repo: AgentplaneRepositoryContext;
|
|
27
|
-
config: CommandContext["config"];
|
|
28
|
-
backend: AgentplaneBackendContext;
|
|
29
|
-
harness: ResolvedHarnessContract;
|
|
30
|
-
capabilities: AgentplaneCapabilityRegistry;
|
|
31
|
-
execution: ResolvedHarnessContract["execution"];
|
|
32
|
-
executionProfile: ResolvedExecutionProfileRuntime;
|
|
33
|
-
taskIntake: TaskIntakeRuntime;
|
|
34
|
-
frameworkExplain: FrameworkExplainPayload;
|
|
35
|
-
frameworkProtocol: FrameworkProtocolSurface;
|
|
36
|
-
approvals: ResolvedHarnessContract["policy"]["approvals"];
|
|
37
|
-
policy: PolicyEngine;
|
|
38
|
-
approvalRuntime: ApprovalRuntime;
|
|
39
|
-
};
|
|
40
|
-
export type UsecaseContext = ReadOnlyUsecaseContext & {
|
|
41
|
-
adapters: Adapters;
|
|
42
|
-
};
|
|
43
|
-
export type AgentplaneReadOnlyExecutionContext = ReadOnlyUsecaseContext;
|
|
44
|
-
export type AgentplaneExecutionContext = UsecaseContext;
|
|
45
|
-
export declare function resolveCommandContext(opts: {
|
|
46
|
-
cwd: string;
|
|
47
|
-
rootOverride?: string | null;
|
|
48
|
-
resolvedProject?: ResolvedProject;
|
|
49
|
-
config?: AgentplaneConfig;
|
|
50
|
-
}): Promise<CommandContext>;
|
|
51
|
-
export declare function resolveContext(opts: {
|
|
52
|
-
cwd: string;
|
|
53
|
-
rootOverride?: string | null;
|
|
54
|
-
resolvedProject?: ResolvedProject;
|
|
55
|
-
config?: AgentplaneConfig;
|
|
56
|
-
}): Promise<ReadOnlyUsecaseContext>;
|
|
57
|
-
export declare const resolveReadOnlyExecutionContext: typeof resolveContext;
|
|
58
|
-
export declare function resolveExecutionContext(opts: {
|
|
59
|
-
cwd: string;
|
|
60
|
-
rootOverride?: string | null;
|
|
61
|
-
resolvedProject?: ResolvedProject;
|
|
62
|
-
config?: AgentplaneConfig;
|
|
63
|
-
}): Promise<AgentplaneExecutionContext>;
|
|
64
|
-
export declare function makeReadOnlyUsecaseContext(command: CommandContext): Promise<ReadOnlyUsecaseContext>;
|
|
65
|
-
export declare function makeUsecaseContext(command: CommandContext): Promise<UsecaseContext>;
|
|
66
|
-
export declare const makeReadOnlyExecutionContext: typeof makeReadOnlyUsecaseContext;
|
|
67
|
-
export declare const makeExecutionContext: typeof makeUsecaseContext;
|
|
68
|
-
//# sourceMappingURL=resolve-context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-context.d.ts","sourceRoot":"","sources":["../../../src/usecases/context/resolve-context.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { CommandCtx } from "../../cli/spec/spec.js";
|
|
2
|
-
import type { CommandContext } from "../../commands/shared/task-backend.js";
|
|
3
|
-
import { cmdTaskList } from "../../commands/task/list.js";
|
|
4
|
-
export declare function taskListUsecase(opts: {
|
|
5
|
-
cli: CommandCtx;
|
|
6
|
-
command: CommandContext;
|
|
7
|
-
filters: Parameters<typeof cmdTaskList>[0]["filters"];
|
|
8
|
-
}): Promise<number>;
|
|
9
|
-
//# sourceMappingURL=task-list-usecase.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task-list-usecase.d.ts","sourceRoot":"","sources":["../../../src/usecases/task/task-list-usecase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI1D,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,EAAE,UAAU,CAAC;IAChB,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CACvD,GAAG,OAAO,CAAC,MAAM,CAAC,CAelB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { cmdTaskList } from "../../commands/task/list.js";
|
|
2
|
-
import { makeReadOnlyUsecaseContext } from "../context/resolve-context.js";
|
|
3
|
-
export async function taskListUsecase(opts) {
|
|
4
|
-
const execution = await makeReadOnlyUsecaseContext(opts.command);
|
|
5
|
-
void execution.policy.evaluate({
|
|
6
|
-
action: "task_list",
|
|
7
|
-
config: execution.config,
|
|
8
|
-
taskId: "",
|
|
9
|
-
git: { stagedPaths: [] },
|
|
10
|
-
});
|
|
11
|
-
return await cmdTaskList({
|
|
12
|
-
ctx: execution.command,
|
|
13
|
-
cwd: opts.cli.cwd,
|
|
14
|
-
rootOverride: opts.cli.rootOverride,
|
|
15
|
-
filters: opts.filters,
|
|
16
|
-
});
|
|
17
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { CommandCtx } from "../../cli/spec/spec.js";
|
|
2
|
-
import type { CommandContext } from "../../commands/shared/task-backend.js";
|
|
3
|
-
import type { TaskNewParsed } from "../../commands/task/new.js";
|
|
4
|
-
export declare function taskNewUsecase(opts: {
|
|
5
|
-
cli: CommandCtx;
|
|
6
|
-
command: CommandContext;
|
|
7
|
-
parsed: TaskNewParsed;
|
|
8
|
-
}): Promise<number>;
|
|
9
|
-
//# sourceMappingURL=task-new-usecase.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task-new-usecase.d.ts","sourceRoot":"","sources":["../../../src/usecases/task/task-new-usecase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAKhE,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,GAAG,EAAE,UAAU,CAAC;IAChB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,aAAa,CAAC;CACvB,GAAG,OAAO,CAAC,MAAM,CAAC,CAelB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { runTaskNewParsed } from "../../commands/task/new.js";
|
|
2
|
-
import { makeUsecaseContext } from "../context/resolve-context.js";
|
|
3
|
-
export async function taskNewUsecase(opts) {
|
|
4
|
-
const execution = await makeUsecaseContext(opts.command);
|
|
5
|
-
void execution.policy.evaluate({
|
|
6
|
-
action: "task_new",
|
|
7
|
-
config: execution.config,
|
|
8
|
-
taskId: "",
|
|
9
|
-
git: { stagedPaths: [] },
|
|
10
|
-
});
|
|
11
|
-
return await runTaskNewParsed({
|
|
12
|
-
ctx: execution.command,
|
|
13
|
-
cwd: opts.cli.cwd,
|
|
14
|
-
rootOverride: opts.cli.rootOverride,
|
|
15
|
-
parsed: opts.parsed,
|
|
16
|
-
});
|
|
17
|
-
}
|