agentplane 0.3.6 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/AGENTS.md +11 -1
- package/assets/RUNNER.md +17 -0
- package/bin/agentplane.js +16 -7
- package/bin/framework-dev-contract.d.ts +6 -0
- package/bin/framework-dev-contract.js +13 -0
- package/bin/stale-dist-policy.js +6 -1
- package/dist/.build-manifest.json +724 -359
- package/dist/adapters/task-backend/task-backend-adapter.d.ts +4 -2
- package/dist/adapters/task-backend/task-backend-adapter.d.ts.map +1 -1
- package/dist/adapters/task-backend/task-backend-adapter.js +15 -2
- package/dist/backends/task-backend/local-backend-doc.d.ts +5 -0
- package/dist/backends/task-backend/local-backend-doc.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-doc.js +98 -0
- package/dist/backends/task-backend/local-backend-read.d.ts +7 -0
- package/dist/backends/task-backend/local-backend-read.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-read.js +186 -0
- package/dist/backends/task-backend/local-backend-state.d.ts +17 -0
- package/dist/backends/task-backend/local-backend-state.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-state.js +50 -0
- package/dist/backends/task-backend/local-backend-write.d.ts +15 -0
- package/dist/backends/task-backend/local-backend-write.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-write.js +254 -0
- package/dist/backends/task-backend/local-backend.d.ts +10 -6
- package/dist/backends/task-backend/local-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend.js +32 -337
- package/dist/backends/task-backend/redmine/backend-cache-doc.d.ts +40 -0
- package/dist/backends/task-backend/redmine/backend-cache-doc.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-cache-doc.js +178 -0
- package/dist/backends/task-backend/redmine/backend-report.d.ts +10 -0
- package/dist/backends/task-backend/redmine/backend-report.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-report.js +43 -0
- package/dist/backends/task-backend/redmine/backend-sync.d.ts +67 -0
- package/dist/backends/task-backend/redmine/backend-sync.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-sync.js +367 -0
- package/dist/backends/task-backend/redmine/env.d.ts +1 -1
- package/dist/backends/task-backend/redmine/env.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/env.js +3 -0
- package/dist/backends/task-backend/redmine/inspect.d.ts +11 -0
- package/dist/backends/task-backend/redmine/inspect.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/inspect.js +75 -0
- package/dist/backends/task-backend/redmine/mapping.d.ts +2 -1
- package/dist/backends/task-backend/redmine/mapping.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/mapping.js +32 -3
- package/dist/backends/task-backend/redmine/parse.d.ts +2 -1
- package/dist/backends/task-backend/redmine/parse.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/parse.js +5 -3
- package/dist/backends/task-backend/redmine/state.d.ts +19 -0
- package/dist/backends/task-backend/redmine/state.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/state.js +109 -0
- package/dist/backends/task-backend/redmine-backend.d.ts +14 -17
- package/dist/backends/task-backend/redmine-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine-backend.js +121 -379
- package/dist/backends/task-backend/shared/constants.d.ts +2 -1
- package/dist/backends/task-backend/shared/constants.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/constants.js +1 -1
- package/dist/backends/task-backend/shared/doc.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/doc.js +25 -39
- package/dist/backends/task-backend/shared/export.d.ts +2 -9
- package/dist/backends/task-backend/shared/export.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/export.js +73 -8
- package/dist/backends/task-backend/shared/normalize.d.ts +5 -1
- package/dist/backends/task-backend/shared/normalize.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/normalize.js +166 -0
- package/dist/backends/task-backend/shared/record.d.ts +1 -1
- package/dist/backends/task-backend/shared/record.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/record.js +27 -3
- package/dist/backends/task-backend/shared/types.d.ts +76 -36
- package/dist/backends/task-backend/shared/types.d.ts.map +1 -1
- package/dist/backends/task-backend/shared.d.ts +2 -2
- package/dist/backends/task-backend/shared.d.ts.map +1 -1
- package/dist/backends/task-backend/shared.js +1 -1
- package/dist/backends/task-backend.d.ts +1 -1
- package/dist/backends/task-backend.d.ts.map +1 -1
- package/dist/backends/task-backend.js +1 -1
- package/dist/backends/task-index.d.ts +2 -2
- package/dist/backends/task-index.d.ts.map +1 -1
- package/dist/backends/task-index.js +9 -5
- package/dist/cli/bootstrap-guide.d.ts +2 -2
- package/dist/cli/bootstrap-guide.d.ts.map +1 -1
- package/dist/cli/bootstrap-guide.js +10 -10
- package/dist/cli/command-guide.d.ts.map +1 -1
- package/dist/cli/command-guide.js +11 -9
- package/dist/cli/command-invocations.d.ts +4 -0
- package/dist/cli/command-invocations.d.ts.map +1 -0
- package/dist/cli/command-invocations.js +35 -0
- package/dist/cli/command-snippets.d.ts +12 -8
- package/dist/cli/command-snippets.d.ts.map +1 -1
- package/dist/cli/command-snippets.js +14 -8
- package/dist/cli/exit-codes.d.ts.map +1 -1
- package/dist/cli/exit-codes.js +1 -0
- package/dist/cli/group-command.d.ts +18 -0
- package/dist/cli/group-command.d.ts.map +1 -0
- package/dist/cli/group-command.js +45 -0
- package/dist/cli/output.d.ts +29 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +76 -0
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +5 -1
- package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/core.js +38 -29
- package/dist/cli/run-cli/command-catalog/lifecycle.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/lifecycle.js +9 -6
- package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/project.js +11 -7
- package/dist/cli/run-cli/command-catalog/shared.d.ts +12 -3
- package/dist/cli/run-cli/command-catalog/shared.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/shared.js +6 -3
- package/dist/cli/run-cli/command-catalog/task.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/task.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/task.js +46 -11
- package/dist/cli/run-cli/command-catalog.d.ts +11 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog.js +29 -0
- package/dist/cli/run-cli/commands/config.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/config.js +52 -6
- package/dist/cli/run-cli/commands/core/agent-profiles.d.ts +34 -0
- package/dist/cli/run-cli/commands/core/agent-profiles.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/agent-profiles.js +97 -0
- package/dist/cli/run-cli/commands/core/agents.d.ts +7 -0
- package/dist/cli/run-cli/commands/core/agents.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/agents.js +97 -0
- package/dist/cli/run-cli/commands/core/preflight.d.ts +10 -0
- package/dist/cli/run-cli/commands/core/preflight.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/preflight.js +286 -0
- package/dist/cli/run-cli/commands/core/quickstart.d.ts +8 -0
- package/dist/cli/run-cli/commands/core/quickstart.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/quickstart.js +43 -0
- package/dist/cli/run-cli/commands/core/role.d.ts +9 -0
- package/dist/cli/run-cli/commands/core/role.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/role.js +128 -0
- package/dist/cli/run-cli/commands/core.d.ts +4 -24
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core.js +4 -630
- package/dist/cli/run-cli/commands/init/write-env.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-env.js +12 -0
- package/dist/cli/run-cli/error-guidance.js +10 -0
- package/dist/cli/run-cli/globals.d.ts +5 -2
- package/dist/cli/run-cli/globals.d.ts.map +1 -1
- package/dist/cli/run-cli/globals.js +82 -86
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +137 -100
- package/dist/cli/run-cli.test-helpers.d.ts +21 -0
- package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
- package/dist/cli/run-cli.test-helpers.js +90 -4
- package/dist/cli/spec/help.d.ts +10 -2
- package/dist/cli/spec/help.d.ts.map +1 -1
- package/dist/cli/spec/help.js +7 -5
- package/dist/cli/spec/registry.d.ts +27 -1
- package/dist/cli/spec/registry.d.ts.map +1 -1
- package/dist/cli/spec/registry.js +98 -25
- package/dist/commands/backend/sync.command.d.ts +8 -6
- package/dist/commands/backend/sync.command.d.ts.map +1 -1
- package/dist/commands/backend/sync.command.js +75 -14
- package/dist/commands/backend.d.ts +22 -0
- package/dist/commands/backend.d.ts.map +1 -1
- package/dist/commands/backend.js +111 -1
- package/dist/commands/branch/base.command.d.ts +2 -3
- package/dist/commands/branch/base.command.d.ts.map +1 -1
- package/dist/commands/branch/base.command.js +8 -12
- package/dist/commands/branch/base.d.ts.map +1 -1
- package/dist/commands/branch/base.js +11 -7
- package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
- package/dist/commands/branch/cleanup-merged.js +9 -8
- package/dist/commands/branch/remove.d.ts.map +1 -1
- package/dist/commands/branch/remove.js +4 -3
- package/dist/commands/branch/status.d.ts.map +1 -1
- package/dist/commands/branch/status.js +4 -3
- package/dist/commands/branch/work-start.d.ts.map +1 -1
- package/dist/commands/branch/work-start.js +48 -5
- package/dist/commands/cleanup/merged.command.d.ts +2 -3
- package/dist/commands/cleanup/merged.command.d.ts.map +1 -1
- package/dist/commands/cleanup/merged.command.js +8 -12
- package/dist/commands/commit.spec.d.ts.map +1 -1
- package/dist/commands/commit.spec.js +30 -6
- package/dist/commands/docs/cli.command.js +2 -2
- package/dist/commands/doctor/runtime.js +1 -1
- package/dist/commands/doctor/workflow.d.ts.map +1 -1
- package/dist/commands/doctor/workflow.js +10 -1
- package/dist/commands/doctor/workspace.d.ts +8 -0
- package/dist/commands/doctor/workspace.d.ts.map +1 -1
- package/dist/commands/doctor/workspace.js +127 -3
- package/dist/commands/finish.spec.d.ts.map +1 -1
- package/dist/commands/finish.spec.js +7 -0
- package/dist/commands/guard/commit.command.d.ts.map +1 -1
- package/dist/commands/guard/commit.command.js +30 -6
- package/dist/commands/guard/guard.command.d.ts +3 -3
- package/dist/commands/guard/guard.command.d.ts.map +1 -1
- package/dist/commands/guard/guard.command.js +9 -14
- package/dist/commands/guard/impl/allow.d.ts +4 -0
- package/dist/commands/guard/impl/allow.d.ts.map +1 -1
- package/dist/commands/guard/impl/allow.js +14 -3
- package/dist/commands/guard/impl/commands.d.ts +2 -0
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +66 -9
- package/dist/commands/guard/impl/policy.d.ts +1 -0
- package/dist/commands/guard/impl/policy.d.ts.map +1 -1
- package/dist/commands/guard/impl/policy.js +9 -6
- package/dist/commands/hooks/hooks.command.d.ts +3 -3
- package/dist/commands/hooks/hooks.command.d.ts.map +1 -1
- package/dist/commands/hooks/hooks.command.js +9 -11
- package/dist/commands/pr/check.d.ts.map +1 -1
- package/dist/commands/pr/check.js +90 -18
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
- package/dist/commands/pr/integrate/cmd.js +31 -3
- package/dist/commands/pr/integrate/internal/cleanup.d.ts +12 -0
- package/dist/commands/pr/integrate/internal/cleanup.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/cleanup.js +46 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts +4 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/finalize.js +34 -40
- package/dist/commands/pr/integrate/internal/merge.d.ts +6 -0
- package/dist/commands/pr/integrate/internal/merge.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/merge.js +92 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts +1 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/prepare.js +1 -0
- package/dist/commands/pr/integrate/verify.d.ts.map +1 -1
- package/dist/commands/pr/integrate/verify.js +4 -3
- package/dist/commands/pr/note.d.ts.map +1 -1
- package/dist/commands/pr/note.js +3 -2
- package/dist/commands/pr/open.d.ts.map +1 -1
- package/dist/commands/pr/open.js +9 -12
- package/dist/commands/pr/pr.command.d.ts +3 -4
- package/dist/commands/pr/pr.command.d.ts.map +1 -1
- package/dist/commands/pr/pr.command.js +6 -11
- package/dist/commands/pr/update.d.ts.map +1 -1
- package/dist/commands/pr/update.js +5 -10
- package/dist/commands/recipes/cache.command.d.ts +3 -4
- package/dist/commands/recipes/cache.command.d.ts.map +1 -1
- package/dist/commands/recipes/cache.command.js +8 -26
- package/dist/commands/recipes/impl/apply.d.ts +1 -1
- package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
- package/dist/commands/recipes/impl/apply.js +1 -1
- package/dist/commands/recipes/impl/commands/explain.js +1 -1
- package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/install.js +1 -2
- package/dist/commands/recipes/impl/installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/installed-recipes.js +1 -2
- package/dist/commands/recipes/impl/manifest.d.ts.map +1 -1
- package/dist/commands/recipes/impl/manifest.js +0 -10
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.js +1 -2
- package/dist/commands/recipes/impl/resolver.d.ts +1 -1
- package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
- package/dist/commands/recipes/impl/resolver.js +26 -16
- package/dist/commands/recipes/impl/scenario.d.ts.map +1 -1
- package/dist/commands/recipes/impl/scenario.js +80 -0
- package/dist/commands/recipes/impl/types.d.ts +27 -13
- package/dist/commands/recipes/impl/types.d.ts.map +1 -1
- package/dist/commands/recipes/recipes.command.d.ts +3 -4
- package/dist/commands/recipes/recipes.command.d.ts.map +1 -1
- package/dist/commands/recipes/recipes.command.js +8 -34
- package/dist/commands/recipes.d.ts +4 -4
- package/dist/commands/recipes.d.ts.map +1 -1
- package/dist/commands/recipes.js +3 -3
- package/dist/commands/recipes.test-helpers.d.ts +17 -0
- package/dist/commands/recipes.test-helpers.d.ts.map +1 -1
- package/dist/commands/recipes.test-helpers.js +56 -2
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +77 -56
- package/dist/commands/release/plan.command.d.ts.map +1 -1
- package/dist/commands/release/plan.command.js +7 -3
- package/dist/commands/release/release.command.d.ts +3 -3
- package/dist/commands/release/release.command.d.ts.map +1 -1
- package/dist/commands/release/release.command.js +9 -11
- package/dist/commands/release.test-helpers.d.ts +20 -0
- package/dist/commands/release.test-helpers.d.ts.map +1 -0
- package/dist/commands/release.test-helpers.js +37 -0
- package/dist/commands/runtime.command.d.ts +7 -7
- package/dist/commands/runtime.command.d.ts.map +1 -1
- package/dist/commands/runtime.command.js +29 -33
- package/dist/commands/scenario/execute.command.d.ts +8 -0
- package/dist/commands/scenario/execute.command.d.ts.map +1 -0
- package/dist/commands/scenario/execute.command.js +117 -0
- package/dist/commands/scenario/impl/commands.d.ts.map +1 -1
- package/dist/commands/scenario/impl/commands.js +45 -32
- package/dist/commands/scenario/run.command.js +2 -2
- package/dist/commands/scenario/scenario.command.d.ts +3 -4
- package/dist/commands/scenario/scenario.command.d.ts.map +1 -1
- package/dist/commands/scenario/scenario.command.js +8 -26
- package/dist/commands/shared/git-context.d.ts +1 -0
- package/dist/commands/shared/git-context.d.ts.map +1 -1
- package/dist/commands/shared/git-context.js +4 -2
- package/dist/commands/shared/git-ops.d.ts +1 -0
- package/dist/commands/shared/git-ops.d.ts.map +1 -1
- package/dist/commands/shared/git-ops.js +13 -0
- package/dist/commands/shared/operator-pipeline.d.ts +10 -0
- package/dist/commands/shared/operator-pipeline.d.ts.map +1 -0
- package/dist/commands/shared/operator-pipeline.js +16 -0
- package/dist/commands/shared/pr-meta.d.ts +32 -12
- package/dist/commands/shared/pr-meta.d.ts.map +1 -1
- package/dist/commands/shared/pr-meta.js +49 -14
- package/dist/commands/shared/reconcile-check.d.ts.map +1 -1
- package/dist/commands/shared/reconcile-check.js +28 -3
- package/dist/commands/shared/task-backend.d.ts +11 -7
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +107 -24
- package/dist/commands/shared/task-handoff.d.ts +64 -0
- package/dist/commands/shared/task-handoff.d.ts.map +1 -0
- package/dist/commands/shared/task-handoff.js +151 -0
- package/dist/commands/shared/task-mutation.d.ts +36 -0
- package/dist/commands/shared/task-mutation.d.ts.map +1 -0
- package/dist/commands/shared/task-mutation.js +67 -0
- package/dist/commands/shared/task-store.d.ts +65 -2
- package/dist/commands/shared/task-store.d.ts.map +1 -1
- package/dist/commands/shared/task-store.js +309 -91
- package/dist/commands/task/add.d.ts.map +1 -1
- package/dist/commands/task/add.js +41 -39
- package/dist/commands/task/block.d.ts.map +1 -1
- package/dist/commands/task/block.js +31 -89
- package/dist/commands/task/close-duplicate.d.ts.map +1 -1
- package/dist/commands/task/close-duplicate.js +0 -7
- package/dist/commands/task/close-noop.d.ts.map +1 -1
- package/dist/commands/task/close-noop.js +0 -21
- package/dist/commands/task/close-shared.d.ts +0 -2
- package/dist/commands/task/close-shared.d.ts.map +1 -1
- package/dist/commands/task/close-shared.js +24 -57
- package/dist/commands/task/comment.d.ts.map +1 -1
- package/dist/commands/task/comment.js +48 -42
- package/dist/commands/task/derive.command.d.ts +1 -0
- package/dist/commands/task/derive.command.d.ts.map +1 -1
- package/dist/commands/task/derive.command.js +15 -2
- package/dist/commands/task/derive.d.ts +1 -0
- package/dist/commands/task/derive.d.ts.map +1 -1
- package/dist/commands/task/derive.js +37 -7
- package/dist/commands/task/doc.command.d.ts.map +1 -1
- package/dist/commands/task/doc.command.js +7 -6
- package/dist/commands/task/doc.d.ts.map +1 -1
- package/dist/commands/task/doc.js +68 -61
- package/dist/commands/task/finish-shared.d.ts +60 -0
- package/dist/commands/task/finish-shared.d.ts.map +1 -0
- package/dist/commands/task/finish-shared.js +181 -0
- package/dist/commands/task/finish.d.ts +1 -0
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +73 -204
- package/dist/commands/task/handoff-record.command.d.ts +17 -0
- package/dist/commands/task/handoff-record.command.d.ts.map +1 -0
- package/dist/commands/task/handoff-record.command.js +140 -0
- package/dist/commands/task/handoff-show.command.d.ts +8 -0
- package/dist/commands/task/handoff-show.command.d.ts.map +1 -0
- package/dist/commands/task/handoff-show.command.js +77 -0
- package/dist/commands/task/handoff.command.d.ts +7 -0
- package/dist/commands/task/handoff.command.d.ts.map +1 -0
- package/dist/commands/task/handoff.command.js +21 -0
- package/dist/commands/task/handoff.shared.d.ts +39 -0
- package/dist/commands/task/handoff.shared.d.ts.map +1 -0
- package/dist/commands/task/handoff.shared.js +134 -0
- package/dist/commands/task/hosted-close.command.d.ts +9 -0
- package/dist/commands/task/hosted-close.command.d.ts.map +1 -0
- package/dist/commands/task/hosted-close.command.js +190 -0
- package/dist/commands/task/hosted-merge-sync.d.ts +40 -0
- package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -0
- package/dist/commands/task/hosted-merge-sync.js +277 -0
- package/dist/commands/task/list.d.ts.map +1 -1
- package/dist/commands/task/list.js +7 -24
- package/dist/commands/task/migrate-doc.d.ts +15 -0
- package/dist/commands/task/migrate-doc.d.ts.map +1 -1
- package/dist/commands/task/migrate-doc.js +126 -35
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +26 -4
- package/dist/commands/task/next.d.ts.map +1 -1
- package/dist/commands/task/next.js +10 -28
- package/dist/commands/task/normalize.command.d.ts +1 -0
- package/dist/commands/task/normalize.command.d.ts.map +1 -1
- package/dist/commands/task/normalize.command.js +12 -0
- package/dist/commands/task/normalize.d.ts +1 -0
- package/dist/commands/task/normalize.d.ts.map +1 -1
- package/dist/commands/task/normalize.js +21 -9
- package/dist/commands/task/plan.command.d.ts +3 -4
- package/dist/commands/task/plan.command.d.ts.map +1 -1
- package/dist/commands/task/plan.command.js +6 -12
- package/dist/commands/task/plan.d.ts.map +1 -1
- package/dist/commands/task/plan.js +118 -125
- package/dist/commands/task/reclaim.command.d.ts +11 -0
- package/dist/commands/task/reclaim.command.d.ts.map +1 -0
- package/dist/commands/task/reclaim.command.js +102 -0
- package/dist/commands/task/resume-context.command.d.ts +9 -0
- package/dist/commands/task/resume-context.command.d.ts.map +1 -0
- package/dist/commands/task/resume-context.command.js +60 -0
- package/dist/commands/task/run-cancel.command.d.ts +6 -0
- package/dist/commands/task/run-cancel.command.d.ts.map +1 -0
- package/dist/commands/task/run-cancel.command.js +45 -0
- package/dist/commands/task/run-cancel.spec.d.ts +7 -0
- package/dist/commands/task/run-cancel.spec.d.ts.map +1 -0
- package/dist/commands/task/run-cancel.spec.js +20 -0
- package/dist/commands/task/run-resume.command.d.ts +6 -0
- package/dist/commands/task/run-resume.command.d.ts.map +1 -0
- package/dist/commands/task/run-resume.command.js +55 -0
- package/dist/commands/task/run-resume.spec.d.ts +7 -0
- package/dist/commands/task/run-resume.spec.d.ts.map +1 -0
- package/dist/commands/task/run-resume.spec.js +20 -0
- package/dist/commands/task/run-retry.command.d.ts +6 -0
- package/dist/commands/task/run-retry.command.d.ts.map +1 -0
- package/dist/commands/task/run-retry.command.js +56 -0
- package/dist/commands/task/run-retry.spec.d.ts +7 -0
- package/dist/commands/task/run-retry.spec.d.ts.map +1 -0
- package/dist/commands/task/run-retry.spec.js +20 -0
- package/dist/commands/task/run-show.command.d.ts +6 -0
- package/dist/commands/task/run-show.command.d.ts.map +1 -0
- package/dist/commands/task/run-show.command.js +133 -0
- package/dist/commands/task/run-show.spec.d.ts +8 -0
- package/dist/commands/task/run-show.spec.d.ts.map +1 -0
- package/dist/commands/task/run-show.spec.js +44 -0
- package/dist/commands/task/run-tail.command.d.ts +6 -0
- package/dist/commands/task/run-tail.command.d.ts.map +1 -0
- package/dist/commands/task/run-tail.command.js +26 -0
- package/dist/commands/task/run-tail.spec.d.ts +8 -0
- package/dist/commands/task/run-tail.spec.d.ts.map +1 -0
- package/dist/commands/task/run-tail.spec.js +51 -0
- package/dist/commands/task/run-trace.command.d.ts +6 -0
- package/dist/commands/task/run-trace.command.d.ts.map +1 -0
- package/dist/commands/task/run-trace.command.js +25 -0
- package/dist/commands/task/run-trace.spec.d.ts +7 -0
- package/dist/commands/task/run-trace.spec.d.ts.map +1 -0
- package/dist/commands/task/run-trace.spec.js +31 -0
- package/dist/commands/task/run.command.d.ts +6 -0
- package/dist/commands/task/run.command.d.ts.map +1 -0
- package/dist/commands/task/run.command.js +74 -0
- package/dist/commands/task/run.spec.d.ts +7 -0
- package/dist/commands/task/run.spec.d.ts.map +1 -0
- package/dist/commands/task/run.spec.js +26 -0
- package/dist/commands/task/scaffold.d.ts.map +1 -1
- package/dist/commands/task/scaffold.js +4 -2
- package/dist/commands/task/scrub.d.ts.map +1 -1
- package/dist/commands/task/scrub.js +27 -24
- package/dist/commands/task/search.d.ts.map +1 -1
- package/dist/commands/task/search.js +21 -31
- package/dist/commands/task/set-status.d.ts.map +1 -1
- package/dist/commands/task/set-status.js +38 -111
- package/dist/commands/task/shared/dependencies.d.ts +5 -4
- package/dist/commands/task/shared/dependencies.d.ts.map +1 -1
- package/dist/commands/task/shared/dependencies.js +20 -2
- package/dist/commands/task/shared/docs.d.ts +6 -1
- package/dist/commands/task/shared/docs.d.ts.map +1 -1
- package/dist/commands/task/shared/docs.js +14 -1
- package/dist/commands/task/shared/listing.d.ts +16 -2
- package/dist/commands/task/shared/listing.d.ts.map +1 -1
- package/dist/commands/task/shared/listing.js +56 -0
- package/dist/commands/task/shared/transition-command.d.ts +15 -0
- package/dist/commands/task/shared/transition-command.d.ts.map +1 -0
- package/dist/commands/task/shared/transition-command.js +43 -0
- package/dist/commands/task/shared/transitions.d.ts +56 -0
- package/dist/commands/task/shared/transitions.d.ts.map +1 -1
- package/dist/commands/task/shared/transitions.js +82 -8
- package/dist/commands/task/shared/workflow-transition-service.d.ts +75 -0
- package/dist/commands/task/shared/workflow-transition-service.d.ts.map +1 -0
- package/dist/commands/task/shared/workflow-transition-service.js +226 -0
- package/dist/commands/task/shared.d.ts +6 -4
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +6 -4
- package/dist/commands/task/show.d.ts.map +1 -1
- package/dist/commands/task/show.js +37 -3
- package/dist/commands/task/start.d.ts.map +1 -1
- package/dist/commands/task/start.js +32 -113
- package/dist/commands/task/task.command.d.ts +3 -4
- package/dist/commands/task/task.command.d.ts.map +1 -1
- package/dist/commands/task/task.command.js +22 -37
- package/dist/commands/task/verify-record.d.ts.map +1 -1
- package/dist/commands/task/verify-record.js +21 -146
- package/dist/commands/task/verify.command.d.ts.map +1 -1
- package/dist/commands/task/verify.command.js +7 -6
- package/dist/commands/task.test-helpers.d.ts +13 -0
- package/dist/commands/task.test-helpers.d.ts.map +1 -0
- package/dist/commands/task.test-helpers.js +65 -0
- package/dist/commands/upgrade/apply.d.ts +2 -0
- package/dist/commands/upgrade/apply.d.ts.map +1 -1
- package/dist/commands/upgrade/apply.js +33 -1
- package/dist/commands/upgrade/materialize.d.ts +28 -0
- package/dist/commands/upgrade/materialize.d.ts.map +1 -0
- package/dist/commands/upgrade/materialize.js +154 -0
- package/dist/commands/upgrade/plan.d.ts +18 -0
- package/dist/commands/upgrade/plan.d.ts.map +1 -0
- package/dist/commands/upgrade/plan.js +219 -0
- package/dist/commands/upgrade/policy.d.ts +24 -0
- package/dist/commands/upgrade/policy.d.ts.map +1 -0
- package/dist/commands/upgrade/policy.js +182 -0
- package/dist/commands/upgrade/report.d.ts.map +1 -1
- package/dist/commands/upgrade/report.js +7 -5
- package/dist/commands/upgrade.command.d.ts.map +1 -1
- package/dist/commands/upgrade.command.js +25 -0
- package/dist/commands/upgrade.d.ts +1 -0
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +164 -618
- package/dist/commands/workflow.command.d.ts +3 -4
- package/dist/commands/workflow.command.d.ts.map +1 -1
- package/dist/commands/workflow.command.js +8 -25
- package/dist/policy/rules/allowlist.d.ts.map +1 -1
- package/dist/policy/rules/allowlist.js +12 -9
- package/dist/ports/task-backend-port.d.ts +4 -2
- package/dist/ports/task-backend-port.d.ts.map +1 -1
- package/dist/runner/adapters/codex.d.ts +9 -0
- package/dist/runner/adapters/codex.d.ts.map +1 -0
- package/dist/runner/adapters/codex.js +414 -0
- package/dist/runner/adapters/custom.d.ts +12 -0
- package/dist/runner/adapters/custom.d.ts.map +1 -0
- package/dist/runner/adapters/custom.js +512 -0
- package/dist/runner/adapters/index.d.ts +8 -0
- package/dist/runner/adapters/index.d.ts.map +1 -0
- package/dist/runner/adapters/index.js +15 -0
- package/dist/runner/adapters/recipe-run-profile.d.ts +8 -0
- package/dist/runner/adapters/recipe-run-profile.d.ts.map +1 -0
- package/dist/runner/adapters/recipe-run-profile.js +53 -0
- package/dist/runner/adapters/shared.d.ts +45 -0
- package/dist/runner/adapters/shared.d.ts.map +1 -0
- package/dist/runner/adapters/shared.js +58 -0
- package/dist/runner/artifacts.d.ts +31 -0
- package/dist/runner/artifacts.d.ts.map +1 -0
- package/dist/runner/artifacts.js +153 -0
- package/dist/runner/codex-approval-probe.d.ts +23 -0
- package/dist/runner/codex-approval-probe.d.ts.map +1 -0
- package/dist/runner/codex-approval-probe.js +55 -0
- package/dist/runner/codex-smoke.d.ts +11 -0
- package/dist/runner/codex-smoke.d.ts.map +1 -0
- package/dist/runner/codex-smoke.js +45 -0
- package/dist/runner/config.d.ts +6 -0
- package/dist/runner/config.d.ts.map +1 -0
- package/dist/runner/config.js +15 -0
- package/dist/runner/context/base-prompts.d.ts +10 -0
- package/dist/runner/context/base-prompts.d.ts.map +1 -0
- package/dist/runner/context/base-prompts.js +255 -0
- package/dist/runner/context/recipe-context.d.ts +17 -0
- package/dist/runner/context/recipe-context.d.ts.map +1 -0
- package/dist/runner/context/recipe-context.js +48 -0
- package/dist/runner/context/task-context.d.ts +24 -0
- package/dist/runner/context/task-context.d.ts.map +1 -0
- package/dist/runner/context/task-context.js +266 -0
- package/dist/runner/index.d.ts +12 -0
- package/dist/runner/index.d.ts.map +1 -0
- package/dist/runner/index.js +11 -0
- package/dist/runner/policy-decision.d.ts +12 -0
- package/dist/runner/policy-decision.d.ts.map +1 -0
- package/dist/runner/policy-decision.js +89 -0
- package/dist/runner/policy-display.d.ts +4 -0
- package/dist/runner/policy-display.d.ts.map +1 -0
- package/dist/runner/policy-display.js +41 -0
- package/dist/runner/process-supervision.d.ts +48 -0
- package/dist/runner/process-supervision.d.ts.map +1 -0
- package/dist/runner/process-supervision.js +490 -0
- package/dist/runner/result-manifest-policy.d.ts +9 -0
- package/dist/runner/result-manifest-policy.d.ts.map +1 -0
- package/dist/runner/result-manifest-policy.js +96 -0
- package/dist/runner/result-manifest.d.ts +30 -0
- package/dist/runner/result-manifest.d.ts.map +1 -0
- package/dist/runner/result-manifest.js +322 -0
- package/dist/runner/run-id.d.ts +2 -0
- package/dist/runner/run-id.d.ts.map +1 -0
- package/dist/runner/run-id.js +3 -0
- package/dist/runner/run-repository.d.ts +51 -0
- package/dist/runner/run-repository.d.ts.map +1 -0
- package/dist/runner/run-repository.js +222 -0
- package/dist/runner/task-run-paths.d.ts +19 -0
- package/dist/runner/task-run-paths.d.ts.map +1 -0
- package/dist/runner/task-run-paths.js +25 -0
- package/dist/runner/task-state.d.ts +9 -0
- package/dist/runner/task-state.d.ts.map +1 -0
- package/dist/runner/task-state.js +354 -0
- package/dist/runner/test-helpers.d.ts +30 -0
- package/dist/runner/test-helpers.d.ts.map +1 -0
- package/dist/runner/test-helpers.js +97 -0
- package/dist/runner/trace-artifacts.d.ts +14 -0
- package/dist/runner/trace-artifacts.d.ts.map +1 -0
- package/dist/runner/trace-artifacts.js +80 -0
- package/dist/runner/trace.d.ts +10 -0
- package/dist/runner/trace.d.ts.map +1 -0
- package/dist/runner/trace.js +37 -0
- package/dist/runner/types.d.ts +317 -0
- package/dist/runner/types.d.ts.map +1 -0
- package/dist/runner/types.js +3 -0
- package/dist/runner/usecases/scenario-materialize-task.d.ts +29 -0
- package/dist/runner/usecases/scenario-materialize-task.d.ts.map +1 -0
- package/dist/runner/usecases/scenario-materialize-task.js +151 -0
- package/dist/runner/usecases/task-run-inspect.d.ts +41 -0
- package/dist/runner/usecases/task-run-inspect.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-inspect.js +74 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.d.ts +10 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.js +172 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.d.ts +18 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.js +128 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.d.ts +45 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.js +172 -0
- package/dist/runner/usecases/task-run-lifecycle.d.ts +4 -0
- package/dist/runner/usecases/task-run-lifecycle.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle.js +2 -0
- package/dist/runner/usecases/task-run.d.ts +32 -0
- package/dist/runner/usecases/task-run.d.ts.map +1 -0
- package/dist/runner/usecases/task-run.js +278 -0
- package/dist/shared/agent-emoji.d.ts.map +1 -1
- package/dist/shared/agent-emoji.js +1 -0
- package/dist/shared/errors.d.ts +1 -1
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/guards.d.ts.map +1 -1
- package/dist/shared/guards.js +1 -0
- package/dist/shared/protected-paths.d.ts +10 -0
- package/dist/shared/protected-paths.d.ts.map +1 -1
- package/dist/shared/protected-paths.js +33 -0
- package/dist/shared/repo-cli-version.d.ts.map +1 -1
- package/dist/shared/repo-cli-version.js +7 -5
- package/dist/shared/task-doc-conflicts.d.ts +12 -0
- package/dist/shared/task-doc-conflicts.d.ts.map +1 -0
- package/dist/shared/task-doc-conflicts.js +40 -0
- package/dist/shared/task-doc-state.d.ts +10 -0
- package/dist/shared/task-doc-state.d.ts.map +1 -0
- package/dist/shared/task-doc-state.js +15 -0
- package/dist/test-helpers/fs.d.ts +2 -0
- package/dist/test-helpers/fs.d.ts.map +1 -0
- package/dist/test-helpers/fs.js +9 -0
- package/dist/usecases/context/resolve-context.d.ts +2 -0
- package/dist/usecases/context/resolve-context.d.ts.map +1 -1
- package/dist/usecases/context/resolve-context.js +4 -1
- package/dist/usecases/task/task-list-usecase.d.ts.map +1 -1
- package/dist/usecases/task/task-list-usecase.js +2 -8
- package/dist/workflow-runtime/fix.d.ts +9 -1
- package/dist/workflow-runtime/fix.d.ts.map +1 -1
- package/dist/workflow-runtime/fix.js +9 -1
- package/package.json +3 -2
- package/dist/backends/task-backend.test-helpers.d.ts +0 -4
- package/dist/backends/task-backend.test-helpers.d.ts.map +0 -1
- package/dist/backends/task-backend.test-helpers.js +0 -33
- package/dist/cli/run-cli/catalog.d.ts +0 -7
- package/dist/cli/run-cli/catalog.d.ts.map +0 -1
- package/dist/cli/run-cli/catalog.js +0 -22
- package/dist/cli/run-cli.core.pr-flow.test-helpers.d.ts +0 -3
- package/dist/cli/run-cli.core.pr-flow.test-helpers.d.ts.map +0 -1
- package/dist/cli/run-cli.core.pr-flow.test-helpers.js +0 -41
- package/dist/cli/run-cli.core.tasks.test-helpers.d.ts +0 -2
- package/dist/cli/run-cli.core.tasks.test-helpers.d.ts.map +0 -1
- package/dist/cli/run-cli.core.tasks.test-helpers.js +0 -6
- package/dist/commands/block.command.d.ts +0 -4
- package/dist/commands/block.command.d.ts.map +0 -1
- package/dist/commands/block.command.js +0 -2
- package/dist/commands/doctor.command.d.ts +0 -3
- package/dist/commands/doctor.command.d.ts.map +0 -1
- package/dist/commands/doctor.command.js +0 -2
- package/dist/commands/finish.command.d.ts +0 -4
- package/dist/commands/finish.command.d.ts.map +0 -1
- package/dist/commands/finish.command.js +0 -2
- package/dist/commands/recipes/install.command.d.ts +0 -3
- package/dist/commands/recipes/install.command.d.ts.map +0 -1
- package/dist/commands/recipes/install.command.js +0 -2
- package/dist/commands/start.command.d.ts +0 -4
- package/dist/commands/start.command.d.ts.map +0 -1
- package/dist/commands/start.command.js +0 -2
- package/dist/commands/task/list.command.d.ts +0 -4
- package/dist/commands/task/list.command.d.ts.map +0 -1
- package/dist/commands/task/list.command.js +0 -2
- package/dist/commands/task/next.command.d.ts +0 -4
- package/dist/commands/task/next.command.d.ts.map +0 -1
- package/dist/commands/task/next.command.js +0 -2
- package/dist/commands/task/search.command.d.ts +0 -4
- package/dist/commands/task/search.command.d.ts.map +0 -1
- package/dist/commands/task/search.command.js +0 -2
- package/dist/commands/task/show.command.d.ts +0 -4
- package/dist/commands/task/show.command.d.ts.map +0 -1
- package/dist/commands/task/show.command.js +0 -2
- package/dist/commands/verify.command.d.ts +0 -4
- package/dist/commands/verify.command.d.ts.map +0 -1
- package/dist/commands/verify.command.js +0 -2
|
@@ -1,10 +1,82 @@
|
|
|
1
|
+
import { mkdir, rename, rm } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
1
3
|
import { extractTaskSuffix, validateCommitSubject } from "@agentplaneorg/core";
|
|
2
4
|
import { exitCodeForError } from "../../../../cli/exit-codes.js";
|
|
3
5
|
import { CliError } from "../../../../shared/errors.js";
|
|
4
6
|
import { execFileAsync, gitEnv } from "../../../shared/git.js";
|
|
5
7
|
import { gitRevParse } from "../../../shared/git-ops.js";
|
|
6
8
|
import { computeVerifyState, runVerifyCommands } from "../verify.js";
|
|
9
|
+
const noopPromise = () => Promise.resolve();
|
|
10
|
+
async function listUntrackedTaskArtifacts(opts) {
|
|
11
|
+
const { stdout } = await execFileAsync("git", ["status", "--short", "--untracked-files=all", "--", opts.taskPrefix], {
|
|
12
|
+
cwd: opts.gitRoot,
|
|
13
|
+
env: gitEnv(),
|
|
14
|
+
});
|
|
15
|
+
return stdout
|
|
16
|
+
.split("\n")
|
|
17
|
+
.map((line) => line.trim())
|
|
18
|
+
.filter((line) => line.startsWith("?? "))
|
|
19
|
+
.map((line) => line.slice(3).trim())
|
|
20
|
+
.filter(Boolean);
|
|
21
|
+
}
|
|
22
|
+
async function moveCollidingTaskArtifacts(opts) {
|
|
23
|
+
const taskPrefix = `${opts.workflowDir.replaceAll("\\", "/")}/${opts.taskId}`;
|
|
24
|
+
const candidatePaths = opts.changedPaths.filter((changedPath) => changedPath === taskPrefix || changedPath.startsWith(`${taskPrefix}/`));
|
|
25
|
+
if (candidatePaths.length === 0) {
|
|
26
|
+
return {
|
|
27
|
+
moved: [],
|
|
28
|
+
restore: noopPromise,
|
|
29
|
+
cleanup: noopPromise,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const untrackedPaths = await listUntrackedTaskArtifacts({
|
|
33
|
+
gitRoot: opts.gitRoot,
|
|
34
|
+
taskPrefix,
|
|
35
|
+
});
|
|
36
|
+
const collidingPaths = untrackedPaths.filter((untrackedPath) => candidatePaths.includes(untrackedPath));
|
|
37
|
+
if (collidingPaths.length === 0) {
|
|
38
|
+
return {
|
|
39
|
+
moved: [],
|
|
40
|
+
restore: noopPromise,
|
|
41
|
+
cleanup: noopPromise,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const backupRoot = path.join(opts.gitRoot, ".agentplane", "tmp", "integrate-backups", `${opts.taskId}-${Date.now()}`);
|
|
45
|
+
const backupParent = path.dirname(backupRoot);
|
|
46
|
+
const backupGrandparent = path.dirname(backupParent);
|
|
47
|
+
const moved = [];
|
|
48
|
+
for (const relativePath of collidingPaths) {
|
|
49
|
+
const sourcePath = path.join(opts.gitRoot, relativePath);
|
|
50
|
+
const backupPath = path.join(backupRoot, relativePath);
|
|
51
|
+
await mkdir(path.dirname(backupPath), { recursive: true });
|
|
52
|
+
await rename(sourcePath, backupPath);
|
|
53
|
+
moved.push({ relativePath, backupPath });
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
moved,
|
|
57
|
+
restore: async () => {
|
|
58
|
+
for (const entry of moved.toReversed()) {
|
|
59
|
+
await mkdir(path.dirname(path.join(opts.gitRoot, entry.relativePath)), { recursive: true });
|
|
60
|
+
await rename(entry.backupPath, path.join(opts.gitRoot, entry.relativePath));
|
|
61
|
+
}
|
|
62
|
+
await rm(backupRoot, { recursive: true, force: true }).catch(() => null);
|
|
63
|
+
await rm(backupParent).catch(() => null);
|
|
64
|
+
await rm(backupGrandparent).catch(() => null);
|
|
65
|
+
},
|
|
66
|
+
cleanup: async () => {
|
|
67
|
+
await rm(backupRoot, { recursive: true, force: true }).catch(() => null);
|
|
68
|
+
await rm(backupParent).catch(() => null);
|
|
69
|
+
await rm(backupGrandparent).catch(() => null);
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
7
73
|
export async function runSquashMerge(opts) {
|
|
74
|
+
const movedArtifacts = await moveCollidingTaskArtifacts({
|
|
75
|
+
gitRoot: opts.gitRoot,
|
|
76
|
+
workflowDir: opts.workflowDir,
|
|
77
|
+
taskId: opts.taskId,
|
|
78
|
+
changedPaths: opts.changedPaths,
|
|
79
|
+
});
|
|
8
80
|
try {
|
|
9
81
|
await execFileAsync("git", ["merge", "--squash", opts.branch], {
|
|
10
82
|
cwd: opts.gitRoot,
|
|
@@ -16,6 +88,7 @@ export async function runSquashMerge(opts) {
|
|
|
16
88
|
cwd: opts.gitRoot,
|
|
17
89
|
env: gitEnv(),
|
|
18
90
|
});
|
|
91
|
+
await movedArtifacts.restore();
|
|
19
92
|
const message = err instanceof Error ? err.message : "git merge --squash failed";
|
|
20
93
|
throw new CliError({ exitCode: exitCodeForError("E_GIT"), code: "E_GIT", message });
|
|
21
94
|
}
|
|
@@ -28,6 +101,7 @@ export async function runSquashMerge(opts) {
|
|
|
28
101
|
cwd: opts.gitRoot,
|
|
29
102
|
env: gitEnv(),
|
|
30
103
|
});
|
|
104
|
+
await movedArtifacts.restore();
|
|
31
105
|
throw new CliError({
|
|
32
106
|
exitCode: exitCodeForError("E_USAGE"),
|
|
33
107
|
code: "E_USAGE",
|
|
@@ -65,13 +139,21 @@ export async function runSquashMerge(opts) {
|
|
|
65
139
|
cwd: opts.gitRoot,
|
|
66
140
|
env: gitEnv(),
|
|
67
141
|
});
|
|
142
|
+
await movedArtifacts.restore();
|
|
68
143
|
const message = err instanceof Error ? err.message : "git commit failed";
|
|
69
144
|
throw new CliError({ exitCode: exitCodeForError("E_GIT"), code: "E_GIT", message });
|
|
70
145
|
}
|
|
146
|
+
await movedArtifacts.cleanup();
|
|
71
147
|
return await gitRevParse(opts.gitRoot, ["HEAD"]);
|
|
72
148
|
}
|
|
73
149
|
export async function runMergeCommit(opts) {
|
|
74
150
|
const suffix = extractTaskSuffix(opts.taskId);
|
|
151
|
+
const movedArtifacts = await moveCollidingTaskArtifacts({
|
|
152
|
+
gitRoot: opts.gitRoot,
|
|
153
|
+
workflowDir: opts.workflowDir,
|
|
154
|
+
taskId: opts.taskId,
|
|
155
|
+
changedPaths: opts.changedPaths,
|
|
156
|
+
});
|
|
75
157
|
const env = {
|
|
76
158
|
...process.env,
|
|
77
159
|
AGENTPLANE_TASK_ID: opts.taskId,
|
|
@@ -83,9 +165,11 @@ export async function runMergeCommit(opts) {
|
|
|
83
165
|
}
|
|
84
166
|
catch (err) {
|
|
85
167
|
await execFileAsync("git", ["merge", "--abort"], { cwd: opts.gitRoot, env: gitEnv() });
|
|
168
|
+
await movedArtifacts.restore();
|
|
86
169
|
const message = err instanceof Error ? err.message : "git merge failed";
|
|
87
170
|
throw new CliError({ exitCode: exitCodeForError("E_GIT"), code: "E_GIT", message });
|
|
88
171
|
}
|
|
172
|
+
await movedArtifacts.cleanup();
|
|
89
173
|
return await gitRevParse(opts.gitRoot, ["HEAD"]);
|
|
90
174
|
}
|
|
91
175
|
export async function runRebaseFastForward(opts) {
|
|
@@ -119,6 +203,12 @@ export async function runRebaseFastForward(opts) {
|
|
|
119
203
|
taskId: opts.taskId,
|
|
120
204
|
})));
|
|
121
205
|
}
|
|
206
|
+
const movedArtifacts = await moveCollidingTaskArtifacts({
|
|
207
|
+
gitRoot: opts.gitRoot,
|
|
208
|
+
workflowDir: opts.workflowDir,
|
|
209
|
+
taskId: opts.taskId,
|
|
210
|
+
changedPaths: opts.changedPaths,
|
|
211
|
+
});
|
|
122
212
|
try {
|
|
123
213
|
await execFileAsync("git", ["merge", "--ff-only", opts.branch], {
|
|
124
214
|
cwd: opts.gitRoot,
|
|
@@ -130,10 +220,12 @@ export async function runRebaseFastForward(opts) {
|
|
|
130
220
|
cwd: opts.gitRoot,
|
|
131
221
|
env: gitEnv(),
|
|
132
222
|
}).catch(() => null);
|
|
223
|
+
await movedArtifacts.restore();
|
|
133
224
|
const message = err instanceof Error ? err.message : "git merge --ff-only failed";
|
|
134
225
|
throw new CliError({ exitCode: exitCodeForError("E_GIT"), code: "E_GIT", message });
|
|
135
226
|
}
|
|
136
227
|
const mergeHash = await gitRevParse(opts.gitRoot, ["HEAD"]);
|
|
137
228
|
branchHeadSha = await gitRevParse(opts.gitRoot, [opts.branch]);
|
|
229
|
+
await movedArtifacts.cleanup();
|
|
138
230
|
return { mergeHash, branchHeadSha, verifyEntries, alreadyVerifiedSha, shouldRunVerify };
|
|
139
231
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../../../../src/commands/pr/integrate/internal/prepare.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,eAAe,EAEf,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAC;AAUzC,OAAO,EAAe,KAAK,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,cAAc,CAAC;IACpB,QAAQ,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAC5C,YAAY,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAE1D,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IAEtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IAEtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IAEb,aAAa,EAAE,MAAM,CAAC;IAEtB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB,GAAG,OAAO,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../../../../src/commands/pr/integrate/internal/prepare.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,eAAe,EAEf,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAC;AAUzC,OAAO,EAAe,KAAK,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,cAAc,CAAC;IACpB,QAAQ,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAC5C,YAAY,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAE1D,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IAEtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IAEtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IAEb,aAAa,EAAE,MAAM,CAAC;IAEtB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAyJ7B"}
|
|
@@ -140,6 +140,7 @@ export async function prepareIntegrate(opts) {
|
|
|
140
140
|
base,
|
|
141
141
|
verifyLogText,
|
|
142
142
|
branchHeadSha,
|
|
143
|
+
changedPaths,
|
|
143
144
|
verifyCommands: initialVerifyState.verifyCommands,
|
|
144
145
|
alreadyVerifiedSha: initialVerifyState.alreadyVerifiedSha,
|
|
145
146
|
shouldRunVerify: initialVerifyState.shouldRunVerify,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../../src/commands/pr/integrate/verify.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../../src/commands/pr/integrate/verify.ts"],"names":[],"mappings":"AAeA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;CACpB,GAAG;IACF,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,eAAe,EAAE,OAAO,CAAC;CAC1B,CAgBA;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC,CAgCjD"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { extractLastVerifiedSha, runShellCommand } from "../../shared/pr-meta.js";
|
|
2
|
-
import {
|
|
2
|
+
import { createCliEmitter } from "../../../cli/output.js";
|
|
3
3
|
import { exitCodeForError } from "../../../cli/exit-codes.js";
|
|
4
4
|
import { CliError } from "../../../shared/errors.js";
|
|
5
|
+
const output = createCliEmitter();
|
|
5
6
|
function normalizeVerifyCommands(rawVerify) {
|
|
6
7
|
return Array.isArray(rawVerify)
|
|
7
8
|
? rawVerify
|
|
@@ -31,7 +32,7 @@ export async function runVerifyCommands(opts) {
|
|
|
31
32
|
const verifyEntries = [];
|
|
32
33
|
for (const command of opts.commands) {
|
|
33
34
|
if (!opts.quiet) {
|
|
34
|
-
|
|
35
|
+
output.line(`$ ${command}`);
|
|
35
36
|
}
|
|
36
37
|
const timestamp = new Date().toISOString();
|
|
37
38
|
const result = await runShellCommand(command, opts.worktreePath);
|
|
@@ -56,7 +57,7 @@ export async function runVerifyCommands(opts) {
|
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
59
|
if (!opts.quiet) {
|
|
59
|
-
|
|
60
|
+
output.success("verify passed", opts.taskId);
|
|
60
61
|
}
|
|
61
62
|
return verifyEntries;
|
|
62
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"note.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/note.ts"],"names":[],"mappings":"AAUA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAKpF,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"note.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/note.ts"],"names":[],"mappings":"AAUA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAKpF,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,MAAM,CAAC,CAmDlB"}
|
package/dist/commands/pr/note.js
CHANGED
|
@@ -4,13 +4,14 @@ import { atomicWriteFile } from "@agentplaneorg/core";
|
|
|
4
4
|
import { mapCoreError } from "../../cli/error-map.js";
|
|
5
5
|
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
6
6
|
import { fileExists } from "../../cli/fs-utils.js";
|
|
7
|
-
import {
|
|
7
|
+
import { createCliEmitter, workflowModeMessage } from "../../cli/output.js";
|
|
8
8
|
import { CliError } from "../../shared/errors.js";
|
|
9
9
|
import { loadCommandContext } from "../shared/task-backend.js";
|
|
10
10
|
import { resolvePrPaths } from "./internal/pr-paths.js";
|
|
11
11
|
import { appendHandoffNote } from "./internal/review-template.js";
|
|
12
12
|
export async function cmdPrNote(opts) {
|
|
13
13
|
try {
|
|
14
|
+
const output = createCliEmitter();
|
|
14
15
|
const author = opts.author.trim();
|
|
15
16
|
const body = opts.body.trim();
|
|
16
17
|
if (!author) {
|
|
@@ -48,7 +49,7 @@ export async function cmdPrNote(opts) {
|
|
|
48
49
|
const review = await readFile(reviewPath, "utf8");
|
|
49
50
|
const updated = appendHandoffNote(review, `${author}: ${body}`);
|
|
50
51
|
await atomicWriteFile(reviewPath, updated, "utf8");
|
|
51
|
-
|
|
52
|
+
output.success("pr note", opts.taskId);
|
|
52
53
|
return 0;
|
|
53
54
|
}
|
|
54
55
|
catch (err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/open.ts"],"names":[],"mappings":"AAaA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AASnC,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/open.ts"],"names":[],"mappings":"AAaA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AASnC,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,MAAM,CAAC,CAuElB"}
|
package/dist/commands/pr/open.js
CHANGED
|
@@ -4,11 +4,11 @@ import { atomicWriteFile } from "@agentplaneorg/core";
|
|
|
4
4
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
5
5
|
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
6
6
|
import { fileExists } from "../../cli/fs-utils.js";
|
|
7
|
-
import {
|
|
7
|
+
import { createCliEmitter, workflowModeMessage } from "../../cli/output.js";
|
|
8
8
|
import { CliError } from "../../shared/errors.js";
|
|
9
9
|
import { writeJsonStableIfChanged, writeTextIfChanged } from "../../shared/write-if-changed.js";
|
|
10
10
|
import { gitCurrentBranch } from "../shared/git-ops.js";
|
|
11
|
-
import { parsePrMeta } from "../shared/pr-meta.js";
|
|
11
|
+
import { buildOpenedPrMeta, parsePrMeta } from "../shared/pr-meta.js";
|
|
12
12
|
import { loadBackendTask, loadCommandContext, } from "../shared/task-backend.js";
|
|
13
13
|
import { resolvePrPaths } from "./internal/pr-paths.js";
|
|
14
14
|
import { renderPrReviewTemplate } from "./internal/review-template.js";
|
|
@@ -17,6 +17,7 @@ function nowIso() {
|
|
|
17
17
|
}
|
|
18
18
|
export async function cmdPrOpen(opts) {
|
|
19
19
|
try {
|
|
20
|
+
const output = createCliEmitter();
|
|
20
21
|
const author = opts.author.trim();
|
|
21
22
|
if (!author) {
|
|
22
23
|
throw new CliError({
|
|
@@ -57,16 +58,12 @@ export async function cmdPrOpen(opts) {
|
|
|
57
58
|
meta = parsePrMeta(raw, task.id);
|
|
58
59
|
}
|
|
59
60
|
const createdAt = meta?.created_at ?? now;
|
|
60
|
-
const nextMeta = {
|
|
61
|
-
|
|
62
|
-
task_id: task.id,
|
|
61
|
+
const nextMeta = buildOpenedPrMeta({
|
|
62
|
+
taskId: task.id,
|
|
63
63
|
branch,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
last_verified_at: meta?.last_verified_at ?? null,
|
|
68
|
-
verify: meta?.verify ?? { status: "skipped" },
|
|
69
|
-
};
|
|
64
|
+
at: now,
|
|
65
|
+
previousMeta: meta,
|
|
66
|
+
});
|
|
70
67
|
await writeJsonStableIfChanged(metaPath, nextMeta);
|
|
71
68
|
await writeTextIfChanged(diffstatPath, "");
|
|
72
69
|
await writeTextIfChanged(verifyLogPath, "");
|
|
@@ -74,7 +71,7 @@ export async function cmdPrOpen(opts) {
|
|
|
74
71
|
const review = renderPrReviewTemplate({ author, createdAt, branch });
|
|
75
72
|
await atomicWriteFile(reviewPath, review, "utf8");
|
|
76
73
|
}
|
|
77
|
-
|
|
74
|
+
output.success("pr open", path.relative(resolved.gitRoot, prDir));
|
|
78
75
|
return 0;
|
|
79
76
|
}
|
|
80
77
|
catch (err) {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { CommandCtx, CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import { type GroupCommandParsed } from "../../cli/group-command.js";
|
|
2
3
|
import type { CommandContext } from "../shared/task-backend.js";
|
|
3
|
-
type PrGroupParsed =
|
|
4
|
-
cmd: string[];
|
|
5
|
-
};
|
|
4
|
+
type PrGroupParsed = GroupCommandParsed;
|
|
6
5
|
export declare const prSpec: CommandSpec<PrGroupParsed>;
|
|
7
6
|
export type PrOpenParsed = {
|
|
8
7
|
taskId: string;
|
|
@@ -24,7 +23,7 @@ export type PrNoteParsed = {
|
|
|
24
23
|
body: string;
|
|
25
24
|
};
|
|
26
25
|
export declare const prNoteSpec: CommandSpec<PrNoteParsed>;
|
|
27
|
-
export declare function makeRunPrHandler(_getCtx: (cmd: string) => Promise<CommandContext>): CommandHandler<
|
|
26
|
+
export declare function makeRunPrHandler(_getCtx: (cmd: string) => Promise<CommandContext>): CommandHandler<GroupCommandParsed>;
|
|
28
27
|
export declare function makeRunPrOpenHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: PrOpenParsed) => Promise<number>;
|
|
29
28
|
export declare function makeRunPrUpdateHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: PrUpdateParsed) => Promise<number>;
|
|
30
29
|
export declare function makeRunPrCheckHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: PrCheckParsed) => Promise<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr.command.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/pr.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"pr.command.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/pr.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,KAAK,aAAa,GAAG,kBAAkB,CAAC;AAExC,eAAO,MAAM,MAAM,EAAE,WAAW,CAAC,aAAa,CAgB7C,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAErF,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,YAAY,CAgChD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhD,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,cAAc,CAOpD,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/C,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,aAAa,CAOlD,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5E,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,YAAY,CA0ChD,CAAC;AAWF,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,GAChD,cAAc,CAAC,kBAAkB,CAAC,CAEpC;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACrE,KAAK,UAAU,EAAE,GAAG,YAAY,KAAG,OAAO,CAAC,MAAM,CAAC,CAUjE;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACvE,KAAK,UAAU,EAAE,GAAG,cAAc,KAAG,OAAO,CAAC,MAAM,CAAC,CAQnE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACtE,KAAK,UAAU,EAAE,GAAG,aAAa,KAAG,OAAO,CAAC,MAAM,CAAC,CAQlE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACrE,KAAK,UAAU,EAAE,GAAG,YAAY,KAAG,OAAO,CAAC,MAAM,CAAC,CAUjE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { loadDirectSubcommandNames, parseGroupCommand, throwGroupCommandUsage, } from "../../cli/group-command.js";
|
|
1
2
|
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
-
import { suggestOne } from "../../cli/spec/suggest.js";
|
|
3
3
|
import { cmdPrCheck, cmdPrNote, cmdPrOpen, cmdPrUpdate } from "./index.js";
|
|
4
4
|
export const prSpec = {
|
|
5
5
|
id: ["pr"],
|
|
@@ -16,7 +16,7 @@ export const prSpec = {
|
|
|
16
16
|
why: "Append a handoff note.",
|
|
17
17
|
},
|
|
18
18
|
],
|
|
19
|
-
parse: (raw) => (
|
|
19
|
+
parse: (raw) => parseGroupCommand(raw),
|
|
20
20
|
};
|
|
21
21
|
export const prOpenSpec = {
|
|
22
22
|
id: ["pr", "open"],
|
|
@@ -110,17 +110,12 @@ export const prNoteSpec = {
|
|
|
110
110
|
body: String(raw.opts.body),
|
|
111
111
|
}),
|
|
112
112
|
};
|
|
113
|
-
function runPrRootGroup(_ctx, p) {
|
|
114
|
-
|
|
115
|
-
const candidates = ["open", "update", "check", "note"];
|
|
116
|
-
const suggestion = suggestOne(input, candidates);
|
|
117
|
-
const suffix = suggestion ? ` Did you mean: ${suggestion}?` : "";
|
|
118
|
-
const msg = p.cmd.length === 0 ? "Missing subcommand." : `Unknown subcommand: ${p.cmd[0]}.`;
|
|
119
|
-
throw usageError({
|
|
113
|
+
async function runPrRootGroup(_ctx, p) {
|
|
114
|
+
throwGroupCommandUsage({
|
|
120
115
|
spec: prSpec,
|
|
116
|
+
cmd: p.cmd,
|
|
117
|
+
subcommands: await loadDirectSubcommandNames(["pr"]),
|
|
121
118
|
command: "pr",
|
|
122
|
-
message: `${msg}${suffix}`,
|
|
123
|
-
context: { command: "pr" },
|
|
124
119
|
});
|
|
125
120
|
}
|
|
126
121
|
export function makeRunPrHandler(_getCtx) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/update.ts"],"names":[],"mappings":"AAaA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AASnC,wBAAsB,WAAW,CAAC,IAAI,EAAE;IACtC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/commands/pr/update.ts"],"names":[],"mappings":"AAaA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AASnC,wBAAsB,WAAW,CAAC,IAAI,EAAE;IACtC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAwFlB"}
|
|
@@ -3,12 +3,12 @@ import path from "node:path";
|
|
|
3
3
|
import { resolveBaseBranch } from "@agentplaneorg/core";
|
|
4
4
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
5
5
|
import { fileExists } from "../../cli/fs-utils.js";
|
|
6
|
-
import {
|
|
6
|
+
import { createCliEmitter, workflowModeMessage } from "../../cli/output.js";
|
|
7
7
|
import { CliError } from "../../shared/errors.js";
|
|
8
8
|
import { writeJsonStableIfChanged, writeTextIfChanged } from "../../shared/write-if-changed.js";
|
|
9
9
|
import { execFileAsync, gitEnv } from "../shared/git.js";
|
|
10
10
|
import { gitCurrentBranch } from "../shared/git-ops.js";
|
|
11
|
-
import { parsePrMeta } from "../shared/pr-meta.js";
|
|
11
|
+
import { buildUpdatedPrMeta, parsePrMeta } from "../shared/pr-meta.js";
|
|
12
12
|
import { loadBackendTask, loadCommandContext, } from "../shared/task-backend.js";
|
|
13
13
|
import { resolvePrPaths } from "./internal/pr-paths.js";
|
|
14
14
|
import { updateAutoSummaryBlock } from "./internal/review-template.js";
|
|
@@ -17,6 +17,7 @@ function nowIso() {
|
|
|
17
17
|
}
|
|
18
18
|
export async function cmdPrUpdate(opts) {
|
|
19
19
|
try {
|
|
20
|
+
const output = createCliEmitter();
|
|
20
21
|
const ctx = opts.ctx ??
|
|
21
22
|
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
22
23
|
await loadBackendTask({
|
|
@@ -84,15 +85,9 @@ export async function cmdPrUpdate(opts) {
|
|
|
84
85
|
await writeTextIfChanged(reviewPath, nextReview);
|
|
85
86
|
const rawMeta = await readFile(metaPath, "utf8");
|
|
86
87
|
const meta = parsePrMeta(rawMeta, opts.taskId);
|
|
87
|
-
const nextMeta = {
|
|
88
|
-
...meta,
|
|
89
|
-
branch,
|
|
90
|
-
updated_at: nowIso(),
|
|
91
|
-
last_verified_sha: meta.last_verified_sha ?? null,
|
|
92
|
-
last_verified_at: meta.last_verified_at ?? null,
|
|
93
|
-
};
|
|
88
|
+
const nextMeta = buildUpdatedPrMeta({ meta, branch, at: nowIso() });
|
|
94
89
|
await writeJsonStableIfChanged(metaPath, nextMeta);
|
|
95
|
-
|
|
90
|
+
output.success("pr update", path.relative(resolved.gitRoot, prDir));
|
|
96
91
|
return 0;
|
|
97
92
|
}
|
|
98
93
|
catch (err) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
-
type
|
|
3
|
-
export declare const recipesCacheSpec: CommandSpec<
|
|
4
|
-
export declare const runRecipesCache: CommandHandler<
|
|
5
|
-
export {};
|
|
2
|
+
import { type GroupCommandParsed } from "../../cli/group-command.js";
|
|
3
|
+
export declare const recipesCacheSpec: CommandSpec<GroupCommandParsed>;
|
|
4
|
+
export declare const runRecipesCache: CommandHandler<GroupCommandParsed>;
|
|
6
5
|
//# sourceMappingURL=cache.command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/cache.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAc,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"cache.command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/cache.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAc,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,kBAAkB,CAO5D,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,kBAAkB,CAS9D,CAAC"}
|
|
@@ -1,37 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { suggestOne } from "../../cli/spec/suggest.js";
|
|
3
|
-
const RECIPES_CACHE_SUBCOMMANDS = ["prune"];
|
|
1
|
+
import { loadDirectSubcommandNames, parseGroupCommand, throwGroupCommandUsage, } from "../../cli/group-command.js";
|
|
4
2
|
export const recipesCacheSpec = {
|
|
5
3
|
id: ["recipes", "cache"],
|
|
6
4
|
group: "Recipes",
|
|
7
5
|
summary: "Manage recipes cache.",
|
|
8
6
|
synopsis: ["agentplane recipes cache <subcommand> [options]"],
|
|
9
7
|
args: [{ name: "subcommand", required: false, variadic: true, valueHint: "<subcommand>" }],
|
|
10
|
-
parse: () => (
|
|
11
|
-
validateRaw: (raw) => {
|
|
12
|
-
const rest = Array.isArray(raw.args.subcommand) ? raw.args.subcommand : [];
|
|
13
|
-
const sub = rest[0];
|
|
14
|
-
if (!sub) {
|
|
15
|
-
throw usageError({
|
|
16
|
-
spec: recipesCacheSpec,
|
|
17
|
-
command: "recipes cache",
|
|
18
|
-
message: "Missing recipes cache subcommand.",
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
const suggestion = suggestOne(String(sub), [...RECIPES_CACHE_SUBCOMMANDS]);
|
|
22
|
-
const suffix = suggestion ? ` Did you mean: ${suggestion}?` : "";
|
|
23
|
-
throw usageError({
|
|
24
|
-
spec: recipesCacheSpec,
|
|
25
|
-
command: "recipes cache",
|
|
26
|
-
message: `Unknown recipes cache subcommand: ${String(sub)}.${suffix}`,
|
|
27
|
-
});
|
|
28
|
-
},
|
|
8
|
+
parse: (raw) => parseGroupCommand(raw, "subcommand"),
|
|
29
9
|
};
|
|
30
|
-
export const runRecipesCache = (_ctx) => {
|
|
31
|
-
|
|
32
|
-
throw usageError({
|
|
10
|
+
export const runRecipesCache = async (_ctx, p) => {
|
|
11
|
+
throwGroupCommandUsage({
|
|
33
12
|
spec: recipesCacheSpec,
|
|
13
|
+
cmd: p.cmd,
|
|
14
|
+
subcommands: await loadDirectSubcommandNames(["recipes", "cache"]),
|
|
34
15
|
command: "recipes cache",
|
|
35
|
-
|
|
16
|
+
missingMessage: "Missing recipes cache subcommand.",
|
|
17
|
+
unknownMessage: (subcommand) => `Unknown recipes cache subcommand: ${subcommand}.`,
|
|
36
18
|
});
|
|
37
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/apply.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/apply.ts"],"names":[],"mappings":"AASA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAK7B,wBAAsB,aAAa,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAarF;AAkBD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,QAAQ,EAAE,cAAc,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BhB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,QAAQ,EAAE,cAAc,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,kBAAkB,CAAC;CAChC,GAAG,OAAO,CAAC,IAAI,CAAC,CAgDhB;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,QAAQ,EAAE,cAAc,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BhB"}
|
|
@@ -6,9 +6,9 @@ import { invalidFieldMessage, missingFileMessage } from "../../../cli/output.js"
|
|
|
6
6
|
import { CliError } from "../../../shared/errors.js";
|
|
7
7
|
import { isRecord } from "../../../shared/guards.js";
|
|
8
8
|
import { writeJsonStableIfChanged } from "../../../shared/write-if-changed.js";
|
|
9
|
+
import { readScenarioDefinition, } from "@agentplane/recipes";
|
|
9
10
|
import { RECIPES_SCENARIOS_DIR_NAME, RECIPES_SCENARIOS_INDEX_NAME } from "./constants.js";
|
|
10
11
|
import { normalizeAgentId } from "./normalize.js";
|
|
11
|
-
import { readScenarioDefinition } from "./scenario.js";
|
|
12
12
|
export async function moveRecipeDir(opts) {
|
|
13
13
|
await mkdir(path.dirname(opts.to), { recursive: true });
|
|
14
14
|
try {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveProject } from "@agentplaneorg/core";
|
|
2
|
+
import { collectRecipeScenarioDetails } from "@agentplane/recipes";
|
|
2
3
|
import { mapCoreError } from "../../../../cli/error-map.js";
|
|
3
4
|
import { exitCodeForError } from "../../../../cli/exit-codes.js";
|
|
4
5
|
import { CliError } from "../../../../shared/errors.js";
|
|
5
|
-
import { collectRecipeScenarioDetails } from "../scenario.js";
|
|
6
6
|
import { formatJsonBlock } from "../format.js";
|
|
7
7
|
import { readProjectInstalledRecipes } from "../project-installed-recipes.js";
|
|
8
8
|
import { resolveProjectInstalledRecipeDir } from "../paths.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/install.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/install.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAM3E,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,GAAG,EAAE,OAAO,CAAC;CACd,GAAG,OAAO,CAAC,MAAM,CAAC,CA4NlB"}
|
|
@@ -2,6 +2,7 @@ import { cp, mkdir, mkdtemp, rm } from "node:fs/promises";
|
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { defaultConfig, loadConfig, resolveProject } from "@agentplaneorg/core";
|
|
5
|
+
import { DEFAULT_RECIPES_INDEX_URL, RECIPE_RUNS_DIR_NAME, readRecipeManifest, } from "@agentplane/recipes";
|
|
5
6
|
import { extractArchive } from "../../../../cli/archive.js";
|
|
6
7
|
import { sha256File } from "../../../../cli/checksum.js";
|
|
7
8
|
import { mapCoreError } from "../../../../cli/error-map.js";
|
|
@@ -14,9 +15,7 @@ import { ensureNetworkApproved } from "../../../shared/network-approval.js";
|
|
|
14
15
|
import { resolvePathFallback } from "../../../shared/path.js";
|
|
15
16
|
import { moveRecipeDir, validateRecipeAssets } from "../apply.js";
|
|
16
17
|
import { resolveRecipeRoot } from "../archive.js";
|
|
17
|
-
import { DEFAULT_RECIPES_INDEX_URL, RECIPE_RUNS_DIR_NAME } from "../constants.js";
|
|
18
18
|
import { loadRecipesRemoteIndex, willFetchRemoteRecipesIndex } from "../index.js";
|
|
19
|
-
import { readRecipeManifest } from "../manifest.js";
|
|
20
19
|
import { normalizeRecipeTags } from "../normalize.js";
|
|
21
20
|
import { writeRecipeInstallMetadata } from "../project-installed-recipes.js";
|
|
22
21
|
import { resolveProjectInstalledRecipeDir, resolveProjectRecipeInstallMetaPath, resolveProjectRecipesDir, resolveRecipesIndexCachePath, } from "../paths.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type InstalledRecipesFile } from "@agentplane/recipes";
|
|
2
2
|
export declare function readInstalledRecipesFile(filePath: string): Promise<InstalledRecipesFile>;
|
|
3
3
|
export declare function writeInstalledRecipesFile(filePath: string, file: InstalledRecipesFile): Promise<void>;
|
|
4
4
|
//# sourceMappingURL=installed-recipes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installed-recipes.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/installed-recipes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"installed-recipes.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/installed-recipes.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAC;AAoC7B,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAS9F;AAED,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,IAAI,CAAC,CAOf"}
|
|
@@ -3,8 +3,7 @@ import path from "node:path";
|
|
|
3
3
|
import { invalidFieldMessage } from "../../../cli/output.js";
|
|
4
4
|
import { isRecord } from "../../../shared/guards.js";
|
|
5
5
|
import { writeJsonStableIfChanged } from "../../../shared/write-if-changed.js";
|
|
6
|
-
import { normalizeRecipeTags } from "
|
|
7
|
-
import { validateRecipeManifest } from "./manifest.js";
|
|
6
|
+
import { normalizeRecipeTags, validateRecipeManifest, } from "@agentplane/recipes";
|
|
8
7
|
function validateInstalledRecipesFile(raw) {
|
|
9
8
|
if (!isRecord(raw))
|
|
10
9
|
throw new Error(invalidFieldMessage("recipes.json", "object"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/manifest.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAGV,cAAc,EAKf,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/manifest.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAGV,cAAc,EAKf,MAAM,YAAY,CAAC;AA0OpB,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,cAAc,CAsDnE;AAED,wBAAsB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAGtF"}
|
|
@@ -41,13 +41,6 @@ function normalizeOptionalStringList(raw, field) {
|
|
|
41
41
|
return undefined;
|
|
42
42
|
return normalizeStringList(raw, field);
|
|
43
43
|
}
|
|
44
|
-
function normalizeBoolean(raw, field) {
|
|
45
|
-
if (raw === undefined)
|
|
46
|
-
return undefined;
|
|
47
|
-
if (typeof raw !== "boolean")
|
|
48
|
-
throw new Error(invalidFieldMessage(field, "boolean"));
|
|
49
|
-
return raw;
|
|
50
|
-
}
|
|
51
44
|
function normalizeNumber(raw, field) {
|
|
52
45
|
if (raw === undefined)
|
|
53
46
|
return undefined;
|
|
@@ -76,10 +69,7 @@ function normalizeRunProfile(raw, field) {
|
|
|
76
69
|
return {
|
|
77
70
|
mode: normalizeRequiredString(raw.mode, `${field}.mode`),
|
|
78
71
|
sandbox: normalizeOptionalString(raw.sandbox, `${field}.sandbox`),
|
|
79
|
-
network: normalizeBoolean(raw.network, `${field}.network`),
|
|
80
|
-
requires_human_approval: normalizeBoolean(raw.requires_human_approval, `${field}.requires_human_approval`),
|
|
81
72
|
writes_artifacts_to: normalizeOptionalStringList(raw.writes_artifacts_to, `${field}.writes_artifacts_to`),
|
|
82
|
-
expected_exit_contract: normalizeOptionalString(raw.expected_exit_contract, `${field}.expected_exit_contract`),
|
|
83
73
|
};
|
|
84
74
|
}
|
|
85
75
|
function normalizeSkills(raw) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type InstalledRecipesFile, type RecipeInstallMetadata } from "@agentplane/recipes";
|
|
2
2
|
export declare function readRecipeInstallMetadata(filePath: string): Promise<RecipeInstallMetadata | null>;
|
|
3
3
|
export declare function writeRecipeInstallMetadata(filePath: string, metadata: RecipeInstallMetadata): Promise<void>;
|
|
4
4
|
export declare function readProjectInstalledRecipes(opts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-installed-recipes.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/project-installed-recipes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project-installed-recipes.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/project-installed-recipes.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AA4C7B,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CASvC;AAED,wBAAsB,0BAA0B,CAC9C,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAGf;AAED,wBAAsB,2BAA2B,CAAC,IAAI,EAAE;IACtD,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA0DhC"}
|