agentplane 0.3.15 → 0.3.17
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/policy/incidents.md +7 -0
- package/bin/agentplane.js +1 -1
- package/bin/framework-dev-contract.js +1 -0
- package/dist/.build-manifest.json +641 -351
- package/dist/backends/task-backend/load.d.ts.map +1 -1
- package/dist/backends/task-backend/load.js +32 -19
- package/dist/backends/task-backend/local-backend-doc.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend-doc.js +1 -1
- package/dist/backends/task-backend/redmine/backend-runtime.d.ts +5 -0
- package/dist/backends/task-backend/redmine/backend-runtime.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-runtime.js +4 -0
- package/dist/backends/task-backend/redmine/backend-sync/context.d.ts +44 -0
- package/dist/backends/task-backend/redmine/backend-sync/context.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-sync/context.js +8 -0
- package/dist/backends/task-backend/redmine/backend-sync/ids.d.ts +6 -0
- package/dist/backends/task-backend/redmine/backend-sync/ids.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-sync/ids.js +21 -0
- package/dist/backends/task-backend/redmine/backend-sync/migration.d.ts +4 -0
- package/dist/backends/task-backend/redmine/backend-sync/migration.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-sync/migration.js +87 -0
- package/dist/backends/task-backend/redmine/backend-sync/status.d.ts +10 -0
- package/dist/backends/task-backend/redmine/backend-sync/status.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-sync/status.js +78 -0
- package/dist/backends/task-backend/redmine/backend-sync/sync.d.ts +12 -0
- package/dist/backends/task-backend/redmine/backend-sync/sync.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-sync/sync.js +82 -0
- package/dist/backends/task-backend/redmine/backend-sync/write.d.ts +5 -0
- package/dist/backends/task-backend/redmine/backend-sync/write.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-sync/write.js +100 -0
- package/dist/backends/task-backend/redmine/backend-sync.d.ts +6 -66
- package/dist/backends/task-backend/redmine/backend-sync.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/backend-sync.js +5 -367
- package/dist/backends/task-backend/redmine/mapping.js +1 -1
- package/dist/backends/task-backend/redmine/runtime-context.d.ts +98 -0
- package/dist/backends/task-backend/redmine/runtime-context.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/runtime-context.js +57 -0
- package/dist/backends/task-backend/redmine/runtime-methods.d.ts +33 -0
- package/dist/backends/task-backend/redmine/runtime-methods.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/runtime-methods.js +86 -0
- package/dist/backends/task-backend/redmine/runtime-operations.d.ts +19 -0
- package/dist/backends/task-backend/redmine/runtime-operations.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/runtime-operations.js +83 -0
- package/dist/backends/task-backend/redmine/runtime-state.d.ts +10 -0
- package/dist/backends/task-backend/redmine/runtime-state.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/runtime-state.js +45 -0
- package/dist/backends/task-backend/redmine-backend.d.ts +2 -33
- package/dist/backends/task-backend/redmine-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine-backend.js +26 -241
- package/dist/backends/task-backend/shared/constants.d.ts +1 -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/errors.d.ts +12 -0
- package/dist/backends/task-backend/shared/errors.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/errors.js +12 -0
- package/dist/backends/task-index.d.ts +0 -4
- package/dist/backends/task-index.d.ts.map +1 -1
- package/dist/backends/task-index.js +0 -33
- package/dist/cli/archive.d.ts.map +1 -1
- package/dist/cli/archive.js +3 -5
- package/dist/cli/error-map.d.ts +7 -1
- package/dist/cli/error-map.d.ts.map +1 -1
- package/dist/cli/error-map.js +231 -19
- package/dist/cli/exit-codes.d.ts +14 -2
- package/dist/cli/exit-codes.d.ts.map +1 -1
- package/dist/cli/exit-codes.js +25 -11
- package/dist/cli/http.d.ts.map +1 -1
- package/dist/cli/http.js +34 -15
- package/dist/cli/output.d.ts +3 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +25 -14
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +44 -0
- package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/core.js +34 -76
- package/dist/cli/run-cli/command-catalog/lifecycle.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/lifecycle.js +23 -26
- package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/project.js +39 -54
- package/dist/cli/run-cli/command-catalog/shared.d.ts +15 -3
- package/dist/cli/run-cli/command-catalog/shared.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/shared.js +19 -6
- package/dist/cli/run-cli/command-catalog/task.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/task.js +63 -57
- package/dist/cli/run-cli/command-loaders.d.ts +170 -0
- package/dist/cli/run-cli/command-loaders.d.ts.map +1 -0
- package/dist/cli/run-cli/command-loaders.js +128 -0
- package/dist/cli/run-cli/commands/init/model.d.ts +42 -0
- package/dist/cli/run-cli/commands/init/model.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/orchestrate.d.ts +9 -0
- package/dist/cli/run-cli/commands/init/orchestrate.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/orchestrate.js +321 -0
- package/dist/cli/run-cli/commands/init/parsers.d.ts +5 -0
- package/dist/cli/run-cli/commands/init/parsers.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/parsers.js +36 -0
- package/dist/cli/run-cli/commands/init/presets.d.ts +15 -0
- package/dist/cli/run-cli/commands/init/presets.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/presets.js +63 -0
- package/dist/cli/run-cli/commands/init/spec.d.ts +5 -0
- package/dist/cli/run-cli/commands/init/spec.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/spec.js +212 -0
- package/dist/cli/run-cli/commands/init/write-config.d.ts +1 -0
- package/dist/cli/run-cli/commands/init/write-config.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-config.js +1 -0
- package/dist/cli/run-cli/commands/init/write-gitignore.js +1 -1
- package/dist/cli/run-cli/commands/init.d.ts +1 -28
- package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init.js +1 -596
- package/dist/cli/run-cli/update-warning.d.ts +1 -0
- package/dist/cli/run-cli/update-warning.d.ts.map +1 -1
- package/dist/cli/run-cli/update-warning.js +10 -2
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +1 -2
- package/dist/cli/spec/errors.d.ts +18 -1
- package/dist/cli/spec/errors.d.ts.map +1 -1
- package/dist/cli/spec/errors.js +27 -4
- package/dist/cli/spec/parse.d.ts.map +1 -1
- package/dist/cli/spec/parse.js +8 -1
- package/dist/commands/backend.d.ts.map +1 -1
- package/dist/commands/backend.js +66 -118
- package/dist/commands/block.spec.js +1 -1
- package/dist/commands/branch/work-start.d.ts.map +1 -1
- package/dist/commands/branch/work-start.direct.d.ts +13 -0
- package/dist/commands/branch/work-start.direct.d.ts.map +1 -0
- package/dist/commands/branch/work-start.direct.js +75 -0
- package/dist/commands/branch/work-start.git.d.ts +3 -0
- package/dist/commands/branch/work-start.git.d.ts.map +1 -0
- package/dist/commands/branch/work-start.git.js +19 -0
- package/dist/commands/branch/work-start.hook-shim.d.ts +2 -0
- package/dist/commands/branch/work-start.hook-shim.d.ts.map +1 -0
- package/dist/commands/branch/work-start.hook-shim.js +38 -0
- package/dist/commands/branch/work-start.js +6 -235
- package/dist/commands/branch/work-start.materialize.d.ts +16 -0
- package/dist/commands/branch/work-start.materialize.d.ts.map +1 -0
- package/dist/commands/branch/work-start.materialize.js +110 -0
- package/dist/commands/commit.spec.js +1 -1
- package/dist/commands/doctor/branch-pr.js +1 -1
- package/dist/commands/doctor/fixes.d.ts +0 -5
- package/dist/commands/doctor/fixes.d.ts.map +1 -1
- package/dist/commands/doctor/fixes.js +1 -71
- package/dist/commands/doctor/runtime.d.ts.map +1 -1
- package/dist/commands/doctor/runtime.js +2 -2
- package/dist/commands/doctor/workflow.d.ts.map +1 -1
- package/dist/commands/doctor/workflow.js +2 -23
- package/dist/commands/doctor/workspace.js +1 -1
- package/dist/commands/doctor.run.d.ts.map +1 -1
- package/dist/commands/doctor.run.js +1 -3
- package/dist/commands/finish.spec.js +1 -1
- package/dist/commands/guard/commit.command.js +1 -1
- package/dist/commands/guard/impl/clean.d.ts +6 -0
- package/dist/commands/guard/impl/clean.d.ts.map +1 -0
- package/dist/commands/guard/impl/clean.js +29 -0
- package/dist/commands/guard/impl/close-dirt.d.ts +6 -0
- package/dist/commands/guard/impl/close-dirt.d.ts.map +1 -0
- package/dist/commands/guard/impl/close-dirt.js +56 -0
- package/dist/commands/guard/impl/commands.d.ts +4 -36
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +4 -549
- package/dist/commands/guard/impl/comment-commit.js +1 -1
- package/dist/commands/guard/impl/commit-diagnostics.d.ts +4 -0
- package/dist/commands/guard/impl/commit-diagnostics.d.ts.map +1 -0
- package/dist/commands/guard/impl/commit-diagnostics.js +150 -0
- package/dist/commands/guard/impl/commit.d.ts +25 -0
- package/dist/commands/guard/impl/commit.d.ts.map +1 -0
- package/dist/commands/guard/impl/commit.js +366 -0
- package/dist/commands/guard/impl/guard-commit.d.ts +3 -0
- package/dist/commands/guard/impl/guard-commit.d.ts.map +1 -0
- package/dist/commands/guard/impl/guard-commit.js +21 -0
- 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 -2
- package/dist/commands/guard/impl/suggest.d.ts +6 -0
- package/dist/commands/guard/impl/suggest.d.ts.map +1 -0
- package/dist/commands/guard/impl/suggest.js +33 -0
- package/dist/commands/hooks/index.d.ts +4 -17
- package/dist/commands/hooks/index.d.ts.map +1 -1
- package/dist/commands/hooks/index.js +4 -415
- package/dist/commands/hooks/install.d.ts +11 -0
- package/dist/commands/hooks/install.d.ts.map +1 -0
- package/dist/commands/hooks/install.js +136 -0
- package/dist/commands/hooks/run.commit-msg.d.ts +3 -0
- package/dist/commands/hooks/run.commit-msg.d.ts.map +1 -0
- package/dist/commands/hooks/run.commit-msg.js +67 -0
- package/dist/commands/hooks/run.d.ts +9 -0
- package/dist/commands/hooks/run.d.ts.map +1 -0
- package/dist/commands/hooks/run.js +45 -0
- package/dist/commands/hooks/run.post-merge.d.ts +3 -0
- package/dist/commands/hooks/run.post-merge.d.ts.map +1 -0
- package/dist/commands/hooks/run.post-merge.js +44 -0
- package/dist/commands/hooks/run.pre-commit.d.ts +3 -0
- package/dist/commands/hooks/run.pre-commit.d.ts.map +1 -0
- package/dist/commands/hooks/run.pre-commit.js +48 -0
- package/dist/commands/hooks/run.pre-push.d.ts +6 -0
- package/dist/commands/hooks/run.pre-push.d.ts.map +1 -0
- package/dist/commands/hooks/run.pre-push.js +88 -0
- package/dist/commands/hooks/shared.d.ts +7 -0
- package/dist/commands/hooks/shared.d.ts.map +1 -0
- package/dist/commands/hooks/shared.js +41 -0
- package/dist/commands/pr/integrate/cmd.js +1 -1
- package/dist/commands/pr/integrate/internal/prepare.js +1 -1
- package/dist/commands/pr/internal/auto-commit.d.ts.map +1 -1
- package/dist/commands/pr/internal/auto-commit.js +2 -5
- package/dist/commands/pr/internal/gh-api.d.ts.map +1 -1
- package/dist/commands/pr/internal/gh-api.js +15 -8
- package/dist/commands/pr/internal/sync-branch.d.ts +0 -1
- package/dist/commands/pr/internal/sync-branch.d.ts.map +1 -1
- package/dist/commands/pr/internal/sync-branch.js +2 -5
- package/dist/commands/pr/internal/sync.d.ts.map +1 -1
- package/dist/commands/pr/internal/sync.js +30 -0
- package/dist/commands/pr/open.d.ts.map +1 -1
- package/dist/commands/pr/open.js +98 -8
- package/dist/commands/recipes/impl/index.d.ts.map +1 -1
- package/dist/commands/recipes/impl/index.js +13 -3
- package/dist/commands/recipes/impl/resolver.js +1 -1
- package/dist/commands/recipes/impl/version.js +1 -1
- package/dist/commands/release/apply.command.js +1 -1
- 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 +4 -0
- package/dist/commands/release/apply.pipeline/finalize.d.ts +21 -0
- package/dist/commands/release/apply.pipeline/finalize.d.ts.map +1 -0
- package/dist/commands/release/apply.pipeline/finalize.js +80 -0
- package/dist/commands/release/apply.pipeline/mutation.d.ts +18 -0
- package/dist/commands/release/apply.pipeline/mutation.d.ts.map +1 -0
- package/dist/commands/release/apply.pipeline/mutation.js +78 -0
- package/dist/commands/release/apply.pipeline/preflight.d.ts +25 -0
- package/dist/commands/release/apply.pipeline/preflight.d.ts.map +1 -0
- package/dist/commands/release/apply.pipeline/preflight.js +69 -0
- package/dist/commands/release/apply.pipeline/shared.d.ts +2 -0
- package/dist/commands/release/apply.pipeline/shared.d.ts.map +1 -0
- package/dist/commands/release/apply.pipeline/shared.js +5 -0
- package/dist/commands/release/apply.pipeline/state.d.ts +25 -0
- package/dist/commands/release/apply.pipeline/state.d.ts.map +1 -0
- package/dist/commands/release/apply.pipeline/state.js +129 -0
- package/dist/commands/release/apply.pipeline.d.ts +1 -1
- package/dist/commands/release/apply.pipeline.d.ts.map +1 -1
- package/dist/commands/release/apply.pipeline.js +4 -347
- package/dist/commands/release/apply.preflight.d.ts +9 -6
- package/dist/commands/release/apply.preflight.d.ts.map +1 -1
- package/dist/commands/release/apply.preflight.js +71 -51
- package/dist/commands/runtime.command.d.ts +2 -2
- package/dist/commands/runtime.command.d.ts.map +1 -1
- package/dist/commands/runtime.command.js +2 -2
- package/dist/commands/scenario/impl/commands.d.ts.map +1 -1
- package/dist/commands/scenario/impl/commands.js +52 -39
- package/dist/commands/scenario/impl/report.d.ts.map +1 -1
- package/dist/commands/scenario/impl/report.js +4 -7
- package/dist/commands/shared/allow-prefix-policy.d.ts.map +1 -0
- package/dist/{shared → commands/shared}/allow-prefix-policy.js +1 -1
- package/dist/commands/shared/comment-format.d.ts.map +1 -0
- package/dist/commands/shared/diagnostics.d.ts.map +1 -0
- package/dist/commands/shared/git-context.d.ts +1 -27
- package/dist/commands/shared/git-context.d.ts.map +1 -1
- package/dist/commands/shared/git-context.js +1 -156
- package/dist/commands/shared/git-diff.d.ts +1 -10
- package/dist/commands/shared/git-diff.d.ts.map +1 -1
- package/dist/commands/shared/git-diff.js +1 -49
- package/dist/commands/shared/git-ops.d.ts +1 -14
- package/dist/commands/shared/git-ops.d.ts.map +1 -1
- package/dist/commands/shared/git-ops.js +20 -150
- package/dist/commands/shared/git-worktree.d.ts +1 -9
- package/dist/commands/shared/git-worktree.d.ts.map +1 -1
- package/dist/commands/shared/git-worktree.js +1 -68
- package/dist/commands/shared/git.d.ts +1 -3
- package/dist/commands/shared/git.d.ts.map +1 -1
- package/dist/commands/shared/git.js +1 -14
- package/dist/commands/shared/policy-deny.d.ts +1 -1
- package/dist/commands/shared/reconcile-check.js +1 -1
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +24 -2
- package/dist/commands/shared/task-store/intents.d.ts.map +1 -1
- package/dist/commands/shared/task-store/intents.js +1 -1
- package/dist/commands/start.spec.js +1 -1
- package/dist/commands/task/close-tail-state.d.ts +7 -0
- package/dist/commands/task/close-tail-state.d.ts.map +1 -0
- package/dist/commands/task/close-tail-state.js +18 -0
- package/dist/commands/task/derive.js +1 -1
- package/dist/commands/task/finish-close.d.ts +22 -0
- package/dist/commands/task/finish-close.d.ts.map +1 -0
- package/dist/commands/task/finish-close.js +119 -0
- package/dist/commands/task/finish-command.d.ts +3 -0
- package/dist/commands/task/finish-command.d.ts.map +1 -0
- package/dist/commands/task/finish-command.js +56 -0
- package/dist/commands/task/finish-execute.d.ts +8 -0
- package/dist/commands/task/finish-execute.d.ts.map +1 -0
- package/dist/commands/task/finish-execute.js +272 -0
- package/dist/commands/task/finish-findings.d.ts +20 -0
- package/dist/commands/task/finish-findings.d.ts.map +1 -0
- package/dist/commands/task/finish-findings.js +27 -0
- package/dist/commands/task/finish-plan.d.ts +7 -0
- package/dist/commands/task/finish-plan.d.ts.map +1 -0
- package/dist/commands/task/finish-plan.js +157 -0
- package/dist/commands/task/finish-types.d.ts +69 -0
- package/dist/commands/task/finish-types.d.ts.map +1 -0
- package/dist/commands/task/finish.d.ts +1 -42
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +1 -527
- package/dist/commands/task/hosted-close-pr.command.d.ts +2 -7
- package/dist/commands/task/hosted-close-pr.command.d.ts.map +1 -1
- package/dist/commands/task/hosted-close-pr.command.js +9 -348
- package/dist/commands/task/hosted-close-pr.execute.d.ts +3 -0
- package/dist/commands/task/hosted-close-pr.execute.d.ts.map +1 -0
- package/dist/commands/task/hosted-close-pr.execute.js +135 -0
- package/dist/commands/task/hosted-close-pr.postcheck.d.ts +3 -0
- package/dist/commands/task/hosted-close-pr.postcheck.d.ts.map +1 -0
- package/dist/commands/task/hosted-close-pr.postcheck.js +13 -0
- package/dist/commands/task/hosted-close-pr.precheck.d.ts +4 -0
- package/dist/commands/task/hosted-close-pr.precheck.d.ts.map +1 -0
- package/dist/commands/task/hosted-close-pr.precheck.js +288 -0
- package/dist/commands/task/hosted-close-pr.report.d.ts +4 -0
- package/dist/commands/task/hosted-close-pr.report.d.ts.map +1 -0
- package/dist/commands/task/hosted-close-pr.report.js +42 -0
- package/dist/commands/task/hosted-close-pr.types.d.ts +75 -0
- package/dist/commands/task/hosted-close-pr.types.d.ts.map +1 -0
- package/dist/commands/task/hosted-merge-sync/builders.d.ts +35 -0
- package/dist/commands/task/hosted-merge-sync/builders.d.ts.map +1 -0
- package/dist/commands/task/hosted-merge-sync/builders.js +148 -0
- package/dist/commands/task/hosted-merge-sync/github.d.ts +10 -0
- package/dist/commands/task/hosted-merge-sync/github.d.ts.map +1 -0
- package/dist/commands/task/hosted-merge-sync/github.js +113 -0
- package/dist/commands/task/hosted-merge-sync/local-branch.d.ts +12 -0
- package/dist/commands/task/hosted-merge-sync/local-branch.d.ts.map +1 -0
- package/dist/commands/task/hosted-merge-sync/local-branch.js +143 -0
- package/dist/commands/task/hosted-merge-sync/model.d.ts +47 -0
- package/dist/commands/task/hosted-merge-sync/model.d.ts.map +1 -0
- package/dist/commands/task/hosted-merge-sync/pr-meta.d.ts +12 -0
- package/dist/commands/task/hosted-merge-sync/pr-meta.d.ts.map +1 -0
- package/dist/commands/task/hosted-merge-sync/pr-meta.js +26 -0
- package/dist/commands/task/hosted-merge-sync.d.ts +5 -63
- package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -1
- package/dist/commands/task/hosted-merge-sync.js +10 -444
- package/dist/commands/task/new.js +1 -1
- package/dist/commands/task/set-status.command.js +1 -1
- package/dist/commands/task/shared/direct-work-lock.d.ts.map +1 -0
- package/dist/commands/task/shared/git-log.d.ts.map +1 -0
- package/dist/commands/task/shared/transitions.d.ts +1 -1
- package/dist/commands/task/shared/transitions.d.ts.map +1 -1
- package/dist/commands/task/shared/transitions.js +4 -6
- package/dist/commands/upgrade/apply.js +1 -1
- package/dist/commands/upgrade/materialize.d.ts.map +1 -1
- package/dist/commands/upgrade/materialize.js +0 -7
- package/dist/commands/upgrade/source.d.ts +0 -1
- package/dist/commands/upgrade/source.d.ts.map +1 -1
- package/dist/commands/upgrade/source.js +1 -9
- package/dist/commands/workflow-playbook.command.d.ts.map +1 -1
- package/dist/commands/workflow-playbook.command.js +8 -7
- package/dist/harness/hooks-lifecycle.d.ts.map +1 -1
- package/dist/harness/hooks-lifecycle.js +11 -7
- package/dist/meta/release.d.ts.map +1 -1
- package/dist/meta/release.js +8 -4
- package/dist/policy/engine.d.ts +1 -1
- package/dist/policy/evaluate.d.ts +1 -1
- package/dist/policy/{types.d.ts → model.d.ts} +1 -1
- package/dist/policy/{types.d.ts.map → model.d.ts.map} +1 -1
- package/dist/policy/result.d.ts +1 -1
- package/dist/policy/rules/allowlist.d.ts +1 -1
- package/dist/policy/rules/branch-pr-base.d.ts +1 -1
- package/dist/policy/rules/clean-tree.d.ts +1 -1
- package/dist/policy/rules/commit-subject.d.ts +1 -1
- package/dist/policy/rules/protected-paths.d.ts +1 -1
- package/dist/runner/adapters/base.d.ts +42 -0
- package/dist/runner/adapters/base.d.ts.map +1 -0
- package/dist/runner/adapters/base.js +107 -0
- package/dist/runner/adapters/codex-preparation.d.ts +7 -0
- package/dist/runner/adapters/codex-preparation.d.ts.map +1 -0
- package/dist/runner/adapters/codex-preparation.js +86 -0
- package/dist/runner/adapters/codex.d.ts.map +1 -1
- package/dist/runner/adapters/codex.js +30 -175
- package/dist/runner/adapters/custom-preparation.d.ts +9 -0
- package/dist/runner/adapters/custom-preparation.d.ts.map +1 -0
- package/dist/runner/adapters/custom-preparation.js +191 -0
- package/dist/runner/adapters/custom.d.ts.map +1 -1
- package/dist/runner/adapters/custom.js +26 -279
- package/dist/runner/context/base-prompts.d.ts.map +1 -1
- package/dist/runner/context/base-prompts.js +4 -0
- package/dist/runner/context/project-skill-prompt-blocks.d.ts +5 -0
- package/dist/runner/context/project-skill-prompt-blocks.d.ts.map +1 -0
- package/dist/runner/context/project-skill-prompt-blocks.js +57 -0
- package/dist/runner/process-supervision/run.d.ts +30 -0
- package/dist/runner/process-supervision/run.d.ts.map +1 -0
- package/dist/runner/process-supervision/run.js +351 -0
- package/dist/runner/process-supervision/signals.d.ts +16 -0
- package/dist/runner/process-supervision/signals.d.ts.map +1 -0
- package/dist/runner/process-supervision/signals.js +85 -0
- package/dist/runner/process-supervision/state.d.ts +10 -0
- package/dist/runner/process-supervision/state.d.ts.map +1 -0
- package/dist/runner/process-supervision/state.js +42 -0
- package/dist/runner/process-supervision/streams.d.ts +6 -0
- package/dist/runner/process-supervision/streams.d.ts.map +1 -0
- package/dist/runner/process-supervision/streams.js +23 -0
- package/dist/runner/process-supervision.d.ts +5 -47
- package/dist/runner/process-supervision.d.ts.map +1 -1
- package/dist/runner/process-supervision.js +3 -490
- package/dist/runner/usecases/scenario-materialize-task.js +1 -1
- package/dist/runtime/approvals/index.d.ts +1 -1
- package/dist/runtime/approvals/{types.d.ts → model.d.ts} +1 -1
- package/dist/runtime/approvals/{types.d.ts.map → model.d.ts.map} +1 -1
- package/dist/runtime/approvals/runtime.d.ts +1 -1
- package/dist/runtime/behavior/index.d.ts +1 -1
- package/dist/runtime/behavior/{types.d.ts → model.d.ts} +1 -1
- package/dist/runtime/behavior/{types.d.ts.map → model.d.ts.map} +1 -1
- package/dist/runtime/behavior/model.js +1 -0
- package/dist/runtime/behavior/resolve.d.ts +1 -1
- package/dist/runtime/capabilities/backend.d.ts +1 -1
- package/dist/runtime/capabilities/index.d.ts +1 -1
- package/dist/runtime/capabilities/{types.d.ts → model.d.ts} +1 -1
- package/dist/runtime/capabilities/{types.d.ts.map → model.d.ts.map} +1 -1
- package/dist/runtime/capabilities/model.js +1 -0
- package/dist/runtime/capabilities/recipe.d.ts +1 -1
- package/dist/runtime/capabilities/registry.d.ts +1 -1
- package/dist/runtime/capabilities/runner.d.ts +1 -1
- package/dist/runtime/execution-context.d.ts.map +1 -1
- package/dist/runtime/execution-context.js +16 -0
- package/dist/runtime/execution-profile/index.d.ts +1 -1
- package/dist/runtime/execution-profile/{types.d.ts → model.d.ts} +1 -1
- package/dist/runtime/execution-profile/{types.d.ts.map → model.d.ts.map} +1 -1
- package/dist/runtime/execution-profile/model.js +1 -0
- package/dist/runtime/execution-profile/resolve.d.ts +1 -1
- package/dist/runtime/explain/index.d.ts +1 -1
- package/dist/runtime/explain/{types.d.ts → model.d.ts} +1 -1
- package/dist/runtime/explain/{types.d.ts.map → model.d.ts.map} +1 -1
- package/dist/runtime/explain/model.js +1 -0
- package/dist/runtime/explain/resolve.d.ts +1 -1
- package/dist/runtime/protocol/index.d.ts +1 -1
- package/dist/runtime/protocol/index.js +1 -1
- package/dist/runtime/protocol/{types.d.ts → model.d.ts} +1 -1
- package/dist/runtime/protocol/{types.d.ts.map → model.d.ts.map} +1 -1
- package/dist/runtime/protocol/resolve.d.ts +1 -1
- package/dist/runtime/protocol/resolve.js +1 -1
- package/dist/runtime/shared/repo-cli-version.d.ts.map +1 -0
- package/dist/{shared → runtime/shared}/repo-cli-version.js +1 -1
- package/dist/runtime/shared/runtime-artifacts.d.ts.map +1 -0
- package/dist/{shared → runtime/shared}/runtime-source.d.ts +1 -1
- package/dist/runtime/shared/runtime-source.d.ts.map +1 -0
- package/dist/{shared → runtime/shared}/runtime-source.js +1 -1
- package/dist/runtime/shared/version-compare.d.ts.map +1 -0
- package/dist/runtime/task-intake/resolve.js +1 -1
- package/dist/shared/errors.d.ts +56 -3
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/errors.js +72 -4
- package/dist/shared/trace-events.d.ts +13 -0
- package/dist/shared/trace-events.d.ts.map +1 -0
- package/dist/shared/trace-events.js +17 -0
- package/dist/shared/workflow-artifacts.d.ts.map +1 -1
- package/dist/shared/workflow-artifacts.js +1 -8
- package/dist/{shared/task-doc-conflicts.d.ts → task-doc/conflicts.d.ts} +1 -1
- package/dist/task-doc/conflicts.d.ts.map +1 -0
- package/dist/{shared/task-doc-conflicts.js → task-doc/conflicts.js} +1 -1
- package/dist/{shared/task-doc-state.d.ts → task-doc/state.d.ts} +1 -1
- package/dist/task-doc/state.d.ts.map +1 -0
- package/dist/workflow-runtime/file-ops.d.ts.map +1 -1
- package/dist/workflow-runtime/file-ops.js +1 -20
- package/dist/workflow-runtime/paths.d.ts.map +1 -1
- package/dist/workflow-runtime/paths.js +0 -1
- package/dist/workflow-runtime/types.d.ts +0 -1
- package/dist/workflow-runtime/types.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/cli/run-cli/error-guidance.d.ts +0 -9
- package/dist/cli/run-cli/error-guidance.d.ts.map +0 -1
- package/dist/cli/run-cli/error-guidance.js +0 -210
- package/dist/cli/run-cli.test-helpers.d.ts +0 -2
- package/dist/cli/run-cli.test-helpers.d.ts.map +0 -1
- package/dist/cli/run-cli.test-helpers.js +0 -1
- package/dist/commands/recipes.test-helpers.d.ts +0 -202
- package/dist/commands/recipes.test-helpers.d.ts.map +0 -1
- package/dist/commands/recipes.test-helpers.js +0 -483
- package/dist/commands/release.test-helpers.d.ts +0 -38
- package/dist/commands/release.test-helpers.d.ts.map +0 -1
- package/dist/commands/release.test-helpers.js +0 -55
- package/dist/commands/task.test-helpers.d.ts +0 -13
- package/dist/commands/task.test-helpers.d.ts.map +0 -1
- package/dist/commands/task.test-helpers.js +0 -65
- package/dist/runner/test-helpers.d.ts +0 -30
- package/dist/runner/test-helpers.d.ts.map +0 -1
- package/dist/runner/test-helpers.js +0 -97
- package/dist/shared/agent-emoji.d.ts +0 -5
- package/dist/shared/agent-emoji.d.ts.map +0 -1
- package/dist/shared/agent-emoji.js +0 -51
- package/dist/shared/allow-prefix-policy.d.ts.map +0 -1
- package/dist/shared/comment-format.d.ts.map +0 -1
- package/dist/shared/diagnostics.d.ts.map +0 -1
- package/dist/shared/direct-work-lock.d.ts.map +0 -1
- package/dist/shared/git-log.d.ts.map +0 -1
- package/dist/shared/repo-cli-version.d.ts.map +0 -1
- package/dist/shared/runtime-artifacts.d.ts.map +0 -1
- package/dist/shared/runtime-source.d.ts.map +0 -1
- package/dist/shared/task-doc-conflicts.d.ts.map +0 -1
- package/dist/shared/task-doc-state.d.ts.map +0 -1
- package/dist/shared/version-compare.d.ts.map +0 -1
- package/dist/testing/cli-harness/recipe-archives.d.ts +0 -28
- package/dist/testing/cli-harness/recipe-archives.d.ts.map +0 -1
- package/dist/testing/cli-harness/recipe-archives.js +0 -374
- package/dist/testing/cli-harness/stdio.d.ts +0 -26
- package/dist/testing/cli-harness/stdio.d.ts.map +0 -1
- package/dist/testing/cli-harness/stdio.js +0 -84
- package/dist/testing/cli-harness.d.ts +0 -25
- package/dist/testing/cli-harness.d.ts.map +0 -1
- package/dist/testing/cli-harness.js +0 -313
- package/dist/testing/index.d.ts +0 -2
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js +0 -1
- /package/dist/{policy/types.js → cli/run-cli/commands/init/model.js} +0 -0
- /package/dist/{shared → commands/shared}/allow-prefix-policy.d.ts +0 -0
- /package/dist/{shared → commands/shared}/comment-format.d.ts +0 -0
- /package/dist/{shared → commands/shared}/comment-format.js +0 -0
- /package/dist/{shared → commands/shared}/diagnostics.d.ts +0 -0
- /package/dist/{shared → commands/shared}/diagnostics.js +0 -0
- /package/dist/{runtime/approvals/types.js → commands/task/finish-types.js} +0 -0
- /package/dist/{runtime/behavior/types.js → commands/task/hosted-close-pr.types.js} +0 -0
- /package/dist/{runtime/capabilities/types.js → commands/task/hosted-merge-sync/model.js} +0 -0
- /package/dist/{shared → commands/task/shared}/direct-work-lock.d.ts +0 -0
- /package/dist/{shared → commands/task/shared}/direct-work-lock.js +0 -0
- /package/dist/{shared → commands/task/shared}/git-log.d.ts +0 -0
- /package/dist/{shared → commands/task/shared}/git-log.js +0 -0
- /package/dist/{runtime/execution-profile/types.js → policy/model.js} +0 -0
- /package/dist/runtime/{explain/types.js → approvals/model.js} +0 -0
- /package/dist/runtime/protocol/{types.js → model.js} +0 -0
- /package/dist/{shared → runtime/shared}/repo-cli-version.d.ts +0 -0
- /package/dist/{shared → runtime/shared}/runtime-artifacts.d.ts +0 -0
- /package/dist/{shared → runtime/shared}/runtime-artifacts.js +0 -0
- /package/dist/{shared → runtime/shared}/version-compare.d.ts +0 -0
- /package/dist/{shared → runtime/shared}/version-compare.js +0 -0
- /package/dist/{shared/task-doc-state.js → task-doc/state.js} +0 -0
|
@@ -1,483 +0,0 @@
|
|
|
1
|
-
import { generateKeyPairSync, sign } from "node:crypto";
|
|
2
|
-
import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
|
|
3
|
-
import os from "node:os";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import { afterEach, beforeEach, vi } from "vitest";
|
|
6
|
-
import { cmdRecipeAddParsed, cmdRecipeCachePruneParsed, cmdRecipeDetachParsed, cmdRecipeExplainParsed, cmdRecipeInfoParsed, cmdRecipeInstall, cmdRecipeListParsed, cmdRecipeListRemoteParsed, cmdRecipeRemoveParsed, cmdRecipeUpdateParsed, hashRecipeTree, } from "./recipes.js";
|
|
7
|
-
import { cmdScenarioInfoParsed, cmdScenarioListParsed, cmdScenarioRunParsed } from "./scenario.js";
|
|
8
|
-
import { exitCodeForError } from "../cli/exit-codes.js";
|
|
9
|
-
import { parseCommandArgv } from "../cli/spec/parse.js";
|
|
10
|
-
import { captureStdIO, createRecipeArchive, mkGitRepoRoot, writeDefaultConfig, } from "../cli/run-cli.test-helpers.js";
|
|
11
|
-
import { CliError } from "../shared/errors.js";
|
|
12
|
-
import { recipesCachePruneSpec } from "./recipes/cache-prune.command.js";
|
|
13
|
-
import { recipesAddSpec } from "./recipes/add.command.js";
|
|
14
|
-
import { recipesExplainSpec } from "./recipes/explain.command.js";
|
|
15
|
-
import { recipesInfoSpec } from "./recipes/info.command.js";
|
|
16
|
-
import { recipesInstallSpec } from "./recipes/install.spec.js";
|
|
17
|
-
import { recipesListRemoteSpec } from "./recipes/list-remote.command.js";
|
|
18
|
-
import { recipesListSpec } from "./recipes/list.command.js";
|
|
19
|
-
import { recipesDetachSpec } from "./recipes/detach.command.js";
|
|
20
|
-
import { recipesRemoveSpec } from "./recipes/remove.command.js";
|
|
21
|
-
import { recipesUpdateSpec } from "./recipes/update.command.js";
|
|
22
|
-
import { scenarioInfoSpec } from "./scenario/info.command.js";
|
|
23
|
-
import { scenarioListSpec } from "./scenario/list.command.js";
|
|
24
|
-
import { scenarioRunSpec } from "./scenario/run.command.js";
|
|
25
|
-
const originalAgentplaneHome = process.env.AGENTPLANE_HOME;
|
|
26
|
-
const originalRecipesKeys = process.env.AGENTPLANE_RECIPES_INDEX_PUBLIC_KEYS;
|
|
27
|
-
let tempHome = null;
|
|
28
|
-
const testKeyId = "test-key";
|
|
29
|
-
let testPrivateKey = null;
|
|
30
|
-
export { captureStdIO, createRecipeArchive, mkGitRepoRoot, writeDefaultConfig, } from "../cli/run-cli.test-helpers.js";
|
|
31
|
-
export function installRecipesCommandHarness() {
|
|
32
|
-
beforeEach(async () => {
|
|
33
|
-
tempHome = await mkdtemp(path.join(os.tmpdir(), "agentplane-recipes-test-"));
|
|
34
|
-
process.env.AGENTPLANE_HOME = tempHome;
|
|
35
|
-
const { publicKey, privateKey } = generateKeyPairSync("ed25519");
|
|
36
|
-
testPrivateKey = privateKey;
|
|
37
|
-
const publicPem = publicKey.export({ type: "spki", format: "pem" }).toString();
|
|
38
|
-
process.env.AGENTPLANE_RECIPES_INDEX_PUBLIC_KEYS = JSON.stringify({ [testKeyId]: publicPem });
|
|
39
|
-
});
|
|
40
|
-
afterEach(async () => {
|
|
41
|
-
vi.unstubAllGlobals();
|
|
42
|
-
if (tempHome) {
|
|
43
|
-
await rm(tempHome, { recursive: true, force: true });
|
|
44
|
-
}
|
|
45
|
-
tempHome = null;
|
|
46
|
-
if (originalAgentplaneHome === undefined) {
|
|
47
|
-
delete process.env.AGENTPLANE_HOME;
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
process.env.AGENTPLANE_HOME = originalAgentplaneHome;
|
|
51
|
-
}
|
|
52
|
-
if (originalRecipesKeys === undefined) {
|
|
53
|
-
delete process.env.AGENTPLANE_RECIPES_INDEX_PUBLIC_KEYS;
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
process.env.AGENTPLANE_RECIPES_INDEX_PUBLIC_KEYS = originalRecipesKeys;
|
|
57
|
-
}
|
|
58
|
-
testPrivateKey = null;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
export function requireRecipesTempHome() {
|
|
62
|
-
if (!tempHome)
|
|
63
|
-
throw new Error("temp home not set");
|
|
64
|
-
return tempHome;
|
|
65
|
-
}
|
|
66
|
-
export function signIndexPayload(indexText) {
|
|
67
|
-
if (!testPrivateKey)
|
|
68
|
-
throw new Error("test private key not set");
|
|
69
|
-
const signature = sign(null, Buffer.from(indexText), testPrivateKey).toString("base64");
|
|
70
|
-
return { schema_version: 1, key_id: testKeyId, signature };
|
|
71
|
-
}
|
|
72
|
-
export async function writeSignedIndex(indexPath, payload) {
|
|
73
|
-
const indexText = JSON.stringify(payload, null, 2);
|
|
74
|
-
await writeFile(indexPath, indexText, "utf8");
|
|
75
|
-
const signature = signIndexPayload(indexText);
|
|
76
|
-
await writeFile(`${indexPath}.sig`, JSON.stringify(signature, null, 2), "utf8");
|
|
77
|
-
}
|
|
78
|
-
export function resolveProjectRecipeDir(projectDir, recipeId) {
|
|
79
|
-
return path.join(projectDir, ".agentplane", "recipes", "packages", recipeId);
|
|
80
|
-
}
|
|
81
|
-
export function resolveProjectRecipesRegistryPath(projectDir) {
|
|
82
|
-
return path.join(projectDir, ".agentplane", "recipes", "registry.json");
|
|
83
|
-
}
|
|
84
|
-
function readStringFixtureValue(record, key, fallback) {
|
|
85
|
-
const value = record[key];
|
|
86
|
-
return typeof value === "string" ? value : fallback;
|
|
87
|
-
}
|
|
88
|
-
export async function writeInstalledRecipes(projectDir, recipes) {
|
|
89
|
-
const recipesHome = requireRecipesTempHome();
|
|
90
|
-
const recipesDir = path.join(recipesHome, "recipes-store");
|
|
91
|
-
await rm(recipesDir, { recursive: true, force: true });
|
|
92
|
-
await mkdir(recipesDir, { recursive: true });
|
|
93
|
-
const vendoredRecipesDir = path.join(projectDir, ".agentplane", "recipes", "packages");
|
|
94
|
-
await rm(vendoredRecipesDir, { recursive: true, force: true });
|
|
95
|
-
await mkdir(vendoredRecipesDir, { recursive: true });
|
|
96
|
-
const cachedEntries = [];
|
|
97
|
-
const registryEntries = [];
|
|
98
|
-
for (const entry of recipes) {
|
|
99
|
-
const record = entry;
|
|
100
|
-
const manifest = record.manifest;
|
|
101
|
-
const recipeId = readStringFixtureValue(record, "id", readStringFixtureValue(manifest, "id", ""));
|
|
102
|
-
const recipeVersion = readStringFixtureValue(record, "version", readStringFixtureValue(manifest, "version", ""));
|
|
103
|
-
const source = readStringFixtureValue(record, "source", "local");
|
|
104
|
-
const installedAt = readStringFixtureValue(record, "installed_at", "2026-02-05T00:00:00Z");
|
|
105
|
-
const tags = Array.isArray(record.tags)
|
|
106
|
-
? record.tags
|
|
107
|
-
: Array.isArray(manifest.tags)
|
|
108
|
-
? manifest.tags
|
|
109
|
-
: [];
|
|
110
|
-
const recipeDir = path.join(recipesDir, recipeId, recipeVersion);
|
|
111
|
-
await mkdir(recipeDir, { recursive: true });
|
|
112
|
-
await writeFile(path.join(recipeDir, "manifest.json"), JSON.stringify(manifest, null, 2), "utf8");
|
|
113
|
-
const vendoredRecipeDir = resolveProjectRecipeDir(projectDir, recipeId);
|
|
114
|
-
await mkdir(vendoredRecipeDir, { recursive: true });
|
|
115
|
-
await writeFile(path.join(vendoredRecipeDir, "manifest.json"), JSON.stringify(manifest, null, 2), "utf8");
|
|
116
|
-
cachedEntries.push({
|
|
117
|
-
id: recipeId,
|
|
118
|
-
version: recipeVersion,
|
|
119
|
-
source,
|
|
120
|
-
installed_at: installedAt,
|
|
121
|
-
tags,
|
|
122
|
-
manifest,
|
|
123
|
-
});
|
|
124
|
-
const scenarios = Array.isArray(manifest.scenarios)
|
|
125
|
-
? manifest.scenarios.filter((scenario) => !!scenario && typeof scenario === "object")
|
|
126
|
-
: [];
|
|
127
|
-
for (const scenario of scenarios) {
|
|
128
|
-
const scenarioFile = readStringFixtureValue(scenario, "file", "").trim();
|
|
129
|
-
if (!scenarioFile)
|
|
130
|
-
continue;
|
|
131
|
-
const scenarioId = readStringFixtureValue(scenario, "id", "SCENARIO");
|
|
132
|
-
const scenarioName = readStringFixtureValue(scenario, "name", scenarioId);
|
|
133
|
-
const scenarioSummary = readStringFixtureValue(scenario, "summary", scenarioName);
|
|
134
|
-
const scenarioOutputs = Array.isArray(scenario.outputs)
|
|
135
|
-
? scenario.outputs.filter((entry) => typeof entry === "string")
|
|
136
|
-
: [];
|
|
137
|
-
const scenarioInputs = Array.isArray(scenario.required_inputs)
|
|
138
|
-
? scenario.required_inputs.filter((entry) => typeof entry === "string")
|
|
139
|
-
: [];
|
|
140
|
-
const scenarioPath = path.join(recipeDir, scenarioFile);
|
|
141
|
-
const vendoredScenarioPath = path.join(vendoredRecipeDir, scenarioFile);
|
|
142
|
-
await mkdir(path.dirname(scenarioPath), { recursive: true });
|
|
143
|
-
await mkdir(path.dirname(vendoredScenarioPath), { recursive: true });
|
|
144
|
-
const scenarioPayload = JSON.stringify({
|
|
145
|
-
schema_version: "1",
|
|
146
|
-
id: scenarioId,
|
|
147
|
-
summary: scenarioSummary,
|
|
148
|
-
goal: scenarioSummary,
|
|
149
|
-
task_template: {
|
|
150
|
-
title: `${scenarioName} task`,
|
|
151
|
-
description: scenarioSummary,
|
|
152
|
-
owner: "CODER",
|
|
153
|
-
},
|
|
154
|
-
inputs: scenarioInputs.map((name) => ({ name, type: "string" })),
|
|
155
|
-
outputs: scenarioOutputs.map((name) => ({ name, type: "string" })),
|
|
156
|
-
steps: [],
|
|
157
|
-
}, null, 2);
|
|
158
|
-
await writeFile(scenarioPath, scenarioPayload, "utf8");
|
|
159
|
-
await writeFile(vendoredScenarioPath, scenarioPayload, "utf8");
|
|
160
|
-
}
|
|
161
|
-
const tools = Array.isArray(manifest.tools)
|
|
162
|
-
? manifest.tools.filter((tool) => !!tool && typeof tool === "object")
|
|
163
|
-
: [];
|
|
164
|
-
for (const tool of tools) {
|
|
165
|
-
const entrypoint = readStringFixtureValue(tool, "entrypoint", "").trim();
|
|
166
|
-
if (!entrypoint)
|
|
167
|
-
continue;
|
|
168
|
-
const toolSource = "console.log('ok');\n";
|
|
169
|
-
const toolPath = path.join(recipeDir, entrypoint);
|
|
170
|
-
const vendoredToolPath = path.join(vendoredRecipeDir, entrypoint);
|
|
171
|
-
await mkdir(path.dirname(toolPath), { recursive: true });
|
|
172
|
-
await mkdir(path.dirname(vendoredToolPath), { recursive: true });
|
|
173
|
-
await writeFile(toolPath, toolSource, "utf8");
|
|
174
|
-
await writeFile(vendoredToolPath, toolSource, "utf8");
|
|
175
|
-
}
|
|
176
|
-
registryEntries.push({
|
|
177
|
-
id: recipeId,
|
|
178
|
-
version: recipeVersion,
|
|
179
|
-
path: `packages/${recipeId}`,
|
|
180
|
-
active: false,
|
|
181
|
-
materialization: "copy",
|
|
182
|
-
source_ref: source,
|
|
183
|
-
source_sha256: await hashRecipeTree(recipeDir),
|
|
184
|
-
vendored_sha256: await hashRecipeTree(vendoredRecipeDir),
|
|
185
|
-
installed_at: installedAt,
|
|
186
|
-
tags,
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
await writeInstalledRecipesRegistry(cachedEntries);
|
|
190
|
-
await writeFile(resolveProjectRecipesRegistryPath(projectDir), JSON.stringify({
|
|
191
|
-
schema_version: 1,
|
|
192
|
-
updated_at: "2026-02-05T00:00:00Z",
|
|
193
|
-
recipes: registryEntries,
|
|
194
|
-
}, null, 2), "utf8");
|
|
195
|
-
}
|
|
196
|
-
export async function writeInstalledRecipesRegistry(recipes) {
|
|
197
|
-
const recipesHome = requireRecipesTempHome();
|
|
198
|
-
const payload = {
|
|
199
|
-
schema_version: 1,
|
|
200
|
-
updated_at: "2026-02-05T00:00:00Z",
|
|
201
|
-
recipes,
|
|
202
|
-
};
|
|
203
|
-
await writeFile(path.join(recipesHome, "recipes.json"), JSON.stringify(payload, null, 2), "utf8");
|
|
204
|
-
}
|
|
205
|
-
export function skillEntry(overrides) {
|
|
206
|
-
return {
|
|
207
|
-
id: "RECIPE_SKILL",
|
|
208
|
-
summary: "Recipe skill",
|
|
209
|
-
file: "skills/recipe.md",
|
|
210
|
-
...overrides,
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
export function toolEntry(overrides) {
|
|
214
|
-
return {
|
|
215
|
-
id: "RECIPE_TOOL",
|
|
216
|
-
summary: "Recipe tool",
|
|
217
|
-
runtime: "node",
|
|
218
|
-
entrypoint: "tools/run.mjs",
|
|
219
|
-
...overrides,
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
export function agentEntry(overrides) {
|
|
223
|
-
return {
|
|
224
|
-
id: "RECIPE_AGENT",
|
|
225
|
-
display_name: "Recipe Agent",
|
|
226
|
-
role: "executor",
|
|
227
|
-
summary: "Recipe agent",
|
|
228
|
-
skills: ["RECIPE_SKILL"],
|
|
229
|
-
tools: ["RECIPE_TOOL"],
|
|
230
|
-
file: "agents/recipe.md",
|
|
231
|
-
...overrides,
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
export function scenarioDescriptor(overrides) {
|
|
235
|
-
return {
|
|
236
|
-
id: "RECIPE_SCENARIO",
|
|
237
|
-
name: "Recipe Scenario",
|
|
238
|
-
summary: "Recipe scenario",
|
|
239
|
-
use_when: ["Recipe scenario is appropriate"],
|
|
240
|
-
required_inputs: [],
|
|
241
|
-
outputs: [],
|
|
242
|
-
permissions: [],
|
|
243
|
-
artifacts: [],
|
|
244
|
-
agents_involved: ["RECIPE_AGENT"],
|
|
245
|
-
skills_used: ["RECIPE_SKILL"],
|
|
246
|
-
tools_used: ["RECIPE_TOOL"],
|
|
247
|
-
run_profile: { mode: "analysis" },
|
|
248
|
-
file: "scenarios/recipe.json",
|
|
249
|
-
...overrides,
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
export function baseRecipeManifest(overrides) {
|
|
253
|
-
return {
|
|
254
|
-
schema_version: "1",
|
|
255
|
-
id: "viewer",
|
|
256
|
-
version: "1.2.3",
|
|
257
|
-
name: "Viewer",
|
|
258
|
-
summary: "Preview tasks",
|
|
259
|
-
description: "Preview tasks",
|
|
260
|
-
tags: ["docs"],
|
|
261
|
-
compatibility: {
|
|
262
|
-
min_agentplane_version: "0.3.5",
|
|
263
|
-
manifest_api_version: "1",
|
|
264
|
-
scenario_api_version: "1",
|
|
265
|
-
runtime_api_version: "1",
|
|
266
|
-
platforms: ["darwin", "linux"],
|
|
267
|
-
repo_types: ["generic"],
|
|
268
|
-
},
|
|
269
|
-
skills: [skillEntry()],
|
|
270
|
-
agents: [agentEntry()],
|
|
271
|
-
tools: [toolEntry()],
|
|
272
|
-
scenarios: [scenarioDescriptor()],
|
|
273
|
-
...overrides,
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
export function baseRecipeEntry(overrides) {
|
|
277
|
-
const base = {
|
|
278
|
-
id: "viewer",
|
|
279
|
-
version: "1.2.3",
|
|
280
|
-
source: "local",
|
|
281
|
-
installed_at: "2026-02-05T00:00:00Z",
|
|
282
|
-
tags: ["docs"],
|
|
283
|
-
manifest: baseRecipeManifest(),
|
|
284
|
-
};
|
|
285
|
-
if (!overrides)
|
|
286
|
-
return base;
|
|
287
|
-
return { ...base, ...overrides };
|
|
288
|
-
}
|
|
289
|
-
export async function installRecipe(opts) {
|
|
290
|
-
const { archivePath } = opts.archivePath
|
|
291
|
-
? { archivePath: opts.archivePath }
|
|
292
|
-
: await createRecipeArchive({ tags: opts.tags });
|
|
293
|
-
const io = captureStdIO();
|
|
294
|
-
try {
|
|
295
|
-
await runRecipesTest({
|
|
296
|
-
cwd: opts.projectDir,
|
|
297
|
-
command: "install",
|
|
298
|
-
args: ["--path", archivePath],
|
|
299
|
-
});
|
|
300
|
-
if (opts.vendor ?? true) {
|
|
301
|
-
const recipesHome = process.env.AGENTPLANE_HOME?.trim() ?? requireRecipesTempHome();
|
|
302
|
-
const installed = JSON.parse(await readFile(path.join(recipesHome, "recipes.json"), "utf8"));
|
|
303
|
-
const latest = installed.recipes?.at(-1);
|
|
304
|
-
if (!latest)
|
|
305
|
-
throw new Error("cached recipe registry unexpectedly empty after install");
|
|
306
|
-
await runRecipesTest({
|
|
307
|
-
cwd: opts.projectDir,
|
|
308
|
-
command: "add",
|
|
309
|
-
args: opts.mode
|
|
310
|
-
? [`${latest.id}@${latest.version}`, "--mode", opts.mode]
|
|
311
|
-
: [`${latest.id}@${latest.version}`],
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
finally {
|
|
316
|
-
io.restore();
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
export async function installRecipeFixture(opts) {
|
|
320
|
-
const fixture = await createRecipeArchive({ tags: opts.tags });
|
|
321
|
-
await installRecipe({ projectDir: opts.projectDir, archivePath: fixture.archivePath });
|
|
322
|
-
return {
|
|
323
|
-
archivePath: fixture.archivePath,
|
|
324
|
-
manifest: fixture.manifest,
|
|
325
|
-
manifestId: String(fixture.manifest.id),
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
export async function createInstalledRecipeProject(opts = {}) {
|
|
329
|
-
const projectDir = await mkGitRepoRoot();
|
|
330
|
-
await writeDefaultConfig(projectDir);
|
|
331
|
-
const fixture = await installRecipeFixture({ projectDir, tags: opts.tags });
|
|
332
|
-
return {
|
|
333
|
-
projectDir,
|
|
334
|
-
...fixture,
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
export function resolveInstalledScenarioPath(projectDir, recipeId, scenarioFile = path.join("scenarios", "recipe-scenario.json")) {
|
|
338
|
-
return path.join(projectDir, ".agentplane", "recipes", "packages", recipeId, scenarioFile);
|
|
339
|
-
}
|
|
340
|
-
export async function runRecipesTest(opts) {
|
|
341
|
-
if (!opts.command) {
|
|
342
|
-
throw new CliError({
|
|
343
|
-
exitCode: exitCodeForError("E_USAGE"),
|
|
344
|
-
code: "E_USAGE",
|
|
345
|
-
message: "Missing recipes subcommand.",
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
switch (opts.command) {
|
|
349
|
-
case "list": {
|
|
350
|
-
const parsed = parseCommandArgv(recipesListSpec, opts.args).parsed;
|
|
351
|
-
return await cmdRecipeListParsed({
|
|
352
|
-
cwd: opts.cwd,
|
|
353
|
-
rootOverride: opts.rootOverride,
|
|
354
|
-
flags: parsed,
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
case "list-remote": {
|
|
358
|
-
const parsed = parseCommandArgv(recipesListRemoteSpec, opts.args).parsed;
|
|
359
|
-
return await cmdRecipeListRemoteParsed({
|
|
360
|
-
cwd: opts.cwd,
|
|
361
|
-
rootOverride: opts.rootOverride,
|
|
362
|
-
flags: parsed,
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
case "info": {
|
|
366
|
-
const parsed = parseCommandArgv(recipesInfoSpec, opts.args).parsed;
|
|
367
|
-
return await cmdRecipeInfoParsed({
|
|
368
|
-
cwd: opts.cwd,
|
|
369
|
-
rootOverride: opts.rootOverride,
|
|
370
|
-
id: parsed.id,
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
case "explain": {
|
|
374
|
-
const parsed = parseCommandArgv(recipesExplainSpec, opts.args).parsed;
|
|
375
|
-
return await cmdRecipeExplainParsed({
|
|
376
|
-
cwd: opts.cwd,
|
|
377
|
-
rootOverride: opts.rootOverride,
|
|
378
|
-
id: parsed.id,
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
case "install": {
|
|
382
|
-
const parsed = parseCommandArgv(recipesInstallSpec, opts.args).parsed;
|
|
383
|
-
return await cmdRecipeInstall({ cwd: opts.cwd, rootOverride: opts.rootOverride, ...parsed });
|
|
384
|
-
}
|
|
385
|
-
case "add": {
|
|
386
|
-
const parsed = parseCommandArgv(recipesAddSpec, opts.args).parsed;
|
|
387
|
-
return await cmdRecipeAddParsed({
|
|
388
|
-
cwd: opts.cwd,
|
|
389
|
-
rootOverride: opts.rootOverride,
|
|
390
|
-
recipeRef: parsed.recipeRef,
|
|
391
|
-
mode: parsed.mode,
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
case "remove": {
|
|
395
|
-
const parsed = parseCommandArgv(recipesRemoveSpec, opts.args).parsed;
|
|
396
|
-
return await cmdRecipeRemoveParsed({
|
|
397
|
-
cwd: opts.cwd,
|
|
398
|
-
rootOverride: opts.rootOverride,
|
|
399
|
-
id: parsed.id,
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
case "update": {
|
|
403
|
-
const parsed = parseCommandArgv(recipesUpdateSpec, opts.args).parsed;
|
|
404
|
-
return await cmdRecipeUpdateParsed({
|
|
405
|
-
cwd: opts.cwd,
|
|
406
|
-
rootOverride: opts.rootOverride,
|
|
407
|
-
id: parsed.id,
|
|
408
|
-
force: parsed.force,
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
case "detach": {
|
|
412
|
-
const parsed = parseCommandArgv(recipesDetachSpec, opts.args).parsed;
|
|
413
|
-
return await cmdRecipeDetachParsed({
|
|
414
|
-
cwd: opts.cwd,
|
|
415
|
-
rootOverride: opts.rootOverride,
|
|
416
|
-
id: parsed.id,
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
case "cache": {
|
|
420
|
-
const [sub, ...tail] = opts.args;
|
|
421
|
-
if (sub !== "prune") {
|
|
422
|
-
throw new CliError({
|
|
423
|
-
exitCode: 2,
|
|
424
|
-
code: "E_USAGE",
|
|
425
|
-
message: `Unknown recipes cache subcommand: ${String(sub ?? "")}`,
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
|
-
const parsed = parseCommandArgv(recipesCachePruneSpec, tail).parsed;
|
|
429
|
-
return await cmdRecipeCachePruneParsed({
|
|
430
|
-
cwd: opts.cwd,
|
|
431
|
-
rootOverride: opts.rootOverride,
|
|
432
|
-
flags: parsed,
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
default: {
|
|
436
|
-
throw new CliError({
|
|
437
|
-
exitCode: 2,
|
|
438
|
-
code: "E_USAGE",
|
|
439
|
-
message: `Unknown recipes subcommand: ${opts.command}`,
|
|
440
|
-
});
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
export async function runScenarioTest(opts) {
|
|
445
|
-
if (!opts.command) {
|
|
446
|
-
throw new CliError({
|
|
447
|
-
exitCode: exitCodeForError("E_USAGE"),
|
|
448
|
-
code: "E_USAGE",
|
|
449
|
-
message: "Missing scenario subcommand.",
|
|
450
|
-
});
|
|
451
|
-
}
|
|
452
|
-
switch (opts.command) {
|
|
453
|
-
case "list": {
|
|
454
|
-
parseCommandArgv(scenarioListSpec, opts.args);
|
|
455
|
-
return await cmdScenarioListParsed({ cwd: opts.cwd, rootOverride: opts.rootOverride });
|
|
456
|
-
}
|
|
457
|
-
case "info": {
|
|
458
|
-
const parsed = parseCommandArgv(scenarioInfoSpec, opts.args).parsed;
|
|
459
|
-
return await cmdScenarioInfoParsed({
|
|
460
|
-
cwd: opts.cwd,
|
|
461
|
-
rootOverride: opts.rootOverride,
|
|
462
|
-
recipeId: parsed.recipeId,
|
|
463
|
-
scenarioId: parsed.scenarioId,
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
case "run": {
|
|
467
|
-
const parsed = parseCommandArgv(scenarioRunSpec, opts.args).parsed;
|
|
468
|
-
return await cmdScenarioRunParsed({
|
|
469
|
-
cwd: opts.cwd,
|
|
470
|
-
rootOverride: opts.rootOverride,
|
|
471
|
-
recipeId: parsed.recipeId,
|
|
472
|
-
scenarioId: parsed.scenarioId,
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
default: {
|
|
476
|
-
throw new CliError({
|
|
477
|
-
exitCode: 2,
|
|
478
|
-
code: "E_USAGE",
|
|
479
|
-
message: `Unknown scenario subcommand: ${opts.command}`,
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export declare function writePackageJson(root: string, relDir: string, data: Record<string, unknown>): Promise<void>;
|
|
2
|
-
export declare function writeReleaseNotes(root: string, version: string, body?: string): Promise<void>;
|
|
3
|
-
export declare function seedReleaseWorkspace(root: string, opts?: {
|
|
4
|
-
coreVersion?: string;
|
|
5
|
-
cliVersion?: string;
|
|
6
|
-
recipesVersion?: string;
|
|
7
|
-
dependencyVersion?: string;
|
|
8
|
-
recipesDependencyVersion?: string;
|
|
9
|
-
extraDependencies?: Record<string, string>;
|
|
10
|
-
extraWorkspacePackages?: {
|
|
11
|
-
relDir: string;
|
|
12
|
-
name: string;
|
|
13
|
-
version?: string;
|
|
14
|
-
private?: boolean;
|
|
15
|
-
}[];
|
|
16
|
-
writeNotes?: boolean;
|
|
17
|
-
notesVersion?: string;
|
|
18
|
-
notesBody?: string;
|
|
19
|
-
}): Promise<void>;
|
|
20
|
-
export declare function initReleaseWorkspace(opts?: {
|
|
21
|
-
prefix?: string;
|
|
22
|
-
coreVersion?: string;
|
|
23
|
-
cliVersion?: string;
|
|
24
|
-
recipesVersion?: string;
|
|
25
|
-
dependencyVersion?: string;
|
|
26
|
-
recipesDependencyVersion?: string;
|
|
27
|
-
extraDependencies?: Record<string, string>;
|
|
28
|
-
extraWorkspacePackages?: {
|
|
29
|
-
relDir: string;
|
|
30
|
-
name: string;
|
|
31
|
-
version?: string;
|
|
32
|
-
private?: boolean;
|
|
33
|
-
}[];
|
|
34
|
-
writeNotes?: boolean;
|
|
35
|
-
notesVersion?: string;
|
|
36
|
-
notesBody?: string;
|
|
37
|
-
}): Promise<string>;
|
|
38
|
-
//# sourceMappingURL=release.test-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"release.test-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/release.test-helpers.ts"],"names":[],"mappings":"AAIA,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,IAAI,CAAC,CAIf;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,IAAI,SAAc,GACjB,OAAO,CAAC,IAAI,CAAC,CAIf;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE;IACJ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,sBAAsB,CAAC,EAAE;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,EAAE,CAAC;IACJ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,GACL,OAAO,CAAC,IAAI,CAAC,CAoCf;AAED,wBAAsB,oBAAoB,CACxC,IAAI,GAAE;IACJ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,sBAAsB,CAAC,EAAE;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,EAAE,CAAC;IACJ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,GACL,OAAO,CAAC,MAAM,CAAC,CAIjB"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { mkdir, mkdtemp, writeFile } from "node:fs/promises";
|
|
2
|
-
import { tmpdir } from "node:os";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
export async function writePackageJson(root, relDir, data) {
|
|
5
|
-
const dir = path.join(root, relDir);
|
|
6
|
-
await mkdir(dir, { recursive: true });
|
|
7
|
-
await writeFile(path.join(dir, "package.json"), `${JSON.stringify(data, null, 2)}\n`, "utf8");
|
|
8
|
-
}
|
|
9
|
-
export async function writeReleaseNotes(root, version, body = "# Notes\n") {
|
|
10
|
-
const releasesDir = path.join(root, "docs", "releases");
|
|
11
|
-
await mkdir(releasesDir, { recursive: true });
|
|
12
|
-
await writeFile(path.join(releasesDir, `v${version}.md`), body, "utf8");
|
|
13
|
-
}
|
|
14
|
-
export async function seedReleaseWorkspace(root, opts = {}) {
|
|
15
|
-
const coreVersion = opts.coreVersion ?? "1.2.3";
|
|
16
|
-
const cliVersion = opts.cliVersion ?? coreVersion;
|
|
17
|
-
const recipesVersion = opts.recipesVersion ?? cliVersion;
|
|
18
|
-
const dependencyVersion = opts.dependencyVersion ?? coreVersion;
|
|
19
|
-
const recipesDependencyVersion = opts.recipesDependencyVersion ?? recipesVersion;
|
|
20
|
-
const dependencies = {
|
|
21
|
-
"@agentplaneorg/core": dependencyVersion,
|
|
22
|
-
"@agentplaneorg/recipes": recipesDependencyVersion,
|
|
23
|
-
};
|
|
24
|
-
if (opts.extraDependencies) {
|
|
25
|
-
Object.assign(dependencies, opts.extraDependencies);
|
|
26
|
-
}
|
|
27
|
-
await writePackageJson(root, "packages/core", {
|
|
28
|
-
name: "@agentplaneorg/core",
|
|
29
|
-
version: coreVersion,
|
|
30
|
-
});
|
|
31
|
-
await writePackageJson(root, "packages/agentplane", {
|
|
32
|
-
name: "agentplane",
|
|
33
|
-
version: cliVersion,
|
|
34
|
-
dependencies,
|
|
35
|
-
});
|
|
36
|
-
await writePackageJson(root, "packages/recipes", {
|
|
37
|
-
name: "@agentplaneorg/recipes",
|
|
38
|
-
version: recipesVersion,
|
|
39
|
-
});
|
|
40
|
-
for (const pkg of opts.extraWorkspacePackages ?? []) {
|
|
41
|
-
await writePackageJson(root, pkg.relDir, {
|
|
42
|
-
name: pkg.name,
|
|
43
|
-
version: pkg.version ?? "0.0.0",
|
|
44
|
-
...(pkg.private === true ? { private: true } : {}),
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
if (opts.writeNotes) {
|
|
48
|
-
await writeReleaseNotes(root, opts.notesVersion ?? cliVersion, opts.notesBody);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
export async function initReleaseWorkspace(opts = {}) {
|
|
52
|
-
const root = await mkdtemp(path.join(tmpdir(), opts.prefix ?? "agentplane-release-"));
|
|
53
|
-
await seedReleaseWorkspace(root, opts);
|
|
54
|
-
return root;
|
|
55
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { defaultConfig, type ResolvedProject } from "@agentplaneorg/core";
|
|
2
|
-
import type { TaskBackend, TaskData } from "../backends/task-backend.js";
|
|
3
|
-
import type { CommandContext } from "./shared/task-backend.js";
|
|
4
|
-
export declare function makeTaskFixture(overrides?: Partial<TaskData>): TaskData;
|
|
5
|
-
export declare function makeTaskBackendDouble(overrides?: Partial<TaskBackend>): TaskBackend;
|
|
6
|
-
export declare function makeTaskCommandContext(opts?: {
|
|
7
|
-
taskBackend?: TaskBackend;
|
|
8
|
-
overrides?: Partial<CommandContext>;
|
|
9
|
-
configureConfig?: (config: ReturnType<typeof defaultConfig>) => void;
|
|
10
|
-
git?: CommandContext["git"];
|
|
11
|
-
resolvedProject?: ResolvedProject;
|
|
12
|
-
}): CommandContext;
|
|
13
|
-
//# sourceMappingURL=task.test-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task.test-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/task.test-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,wBAAgB,eAAe,CAAC,SAAS,GAAE,OAAO,CAAC,QAAQ,CAAM,GAAG,QAAQ,CAiB3E;AAED,wBAAgB,qBAAqB,CAAC,SAAS,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CAuBvF;AAED,wBAAgB,sBAAsB,CACpC,IAAI,GAAE;IACJ,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACpC,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,KAAK,IAAI,CAAC;IACrE,GAAG,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IAC5B,eAAe,CAAC,EAAE,eAAe,CAAC;CAC9B,GACL,cAAc,CAwBhB"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { defaultConfig } from "@agentplaneorg/core";
|
|
2
|
-
import { GitContext } from "./shared/git-context.js";
|
|
3
|
-
export function makeTaskFixture(overrides = {}) {
|
|
4
|
-
return {
|
|
5
|
-
id: "T-1",
|
|
6
|
-
title: "Title",
|
|
7
|
-
description: "Desc",
|
|
8
|
-
status: "TODO",
|
|
9
|
-
priority: "normal",
|
|
10
|
-
owner: "CODER",
|
|
11
|
-
depends_on: [],
|
|
12
|
-
tags: [],
|
|
13
|
-
verify: [],
|
|
14
|
-
comments: [],
|
|
15
|
-
events: [],
|
|
16
|
-
doc_version: 3,
|
|
17
|
-
doc_updated_by: "CODER",
|
|
18
|
-
...overrides,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
export function makeTaskBackendDouble(overrides = {}) {
|
|
22
|
-
return {
|
|
23
|
-
id: "mock",
|
|
24
|
-
capabilities: {
|
|
25
|
-
canonical_source: "local",
|
|
26
|
-
projection: "canonical",
|
|
27
|
-
projection_read_mode: "fallback",
|
|
28
|
-
reads_from_projection_by_default: false,
|
|
29
|
-
supports_task_revisions: true,
|
|
30
|
-
supports_revision_guarded_writes: true,
|
|
31
|
-
may_access_network_on_read: false,
|
|
32
|
-
may_access_network_on_write: false,
|
|
33
|
-
supports_projection_refresh: false,
|
|
34
|
-
supports_push_sync: false,
|
|
35
|
-
supports_snapshot_export: false,
|
|
36
|
-
},
|
|
37
|
-
listTasks: () => Promise.resolve([]),
|
|
38
|
-
getTask: () => Promise.resolve(null),
|
|
39
|
-
writeTask: () => Promise.resolve(),
|
|
40
|
-
getTaskDoc: () => Promise.resolve(""),
|
|
41
|
-
setTaskDoc: () => Promise.resolve(),
|
|
42
|
-
...overrides,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
export function makeTaskCommandContext(opts = {}) {
|
|
46
|
-
const config = defaultConfig();
|
|
47
|
-
config.paths.workflow_dir = ".agentplane/tasks";
|
|
48
|
-
opts.configureConfig?.(config);
|
|
49
|
-
const resolved = opts.resolvedProject ??
|
|
50
|
-
{
|
|
51
|
-
gitRoot: "/repo",
|
|
52
|
-
agentplaneDir: "/repo/.agentplane",
|
|
53
|
-
};
|
|
54
|
-
const backend = opts.taskBackend ?? makeTaskBackendDouble();
|
|
55
|
-
const ctx = {
|
|
56
|
-
resolvedProject: resolved,
|
|
57
|
-
config,
|
|
58
|
-
taskBackend: backend,
|
|
59
|
-
backendId: backend.id,
|
|
60
|
-
backendConfigPath: "/repo/.agentplane/backends/local/backend.json",
|
|
61
|
-
git: opts.git ?? new GitContext({ gitRoot: resolved.gitRoot }),
|
|
62
|
-
memo: {},
|
|
63
|
-
};
|
|
64
|
-
return { ...ctx, ...opts.overrides };
|
|
65
|
-
}
|