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,26 +0,0 @@
|
|
|
1
|
-
export type AgentJsonEnvelope = {
|
|
2
|
-
schema_version?: number;
|
|
3
|
-
mode?: string;
|
|
4
|
-
command?: string;
|
|
5
|
-
ok?: boolean;
|
|
6
|
-
exit_code?: number;
|
|
7
|
-
stdout?: string;
|
|
8
|
-
stderr?: string;
|
|
9
|
-
data?: unknown;
|
|
10
|
-
};
|
|
11
|
-
export declare function captureStdIO(): {
|
|
12
|
-
readonly stdout: string;
|
|
13
|
-
readonly stderr: string;
|
|
14
|
-
restore(): void;
|
|
15
|
-
};
|
|
16
|
-
export declare function splitOutputLines(text: string): string[];
|
|
17
|
-
export declare function parseAgentJsonEnvelope(stdout: string): AgentJsonEnvelope;
|
|
18
|
-
export declare function expectAgentJsonEnvelope(payload: AgentJsonEnvelope, opts: {
|
|
19
|
-
command: string;
|
|
20
|
-
ok: boolean;
|
|
21
|
-
exitCode: number;
|
|
22
|
-
hasData?: boolean;
|
|
23
|
-
}): void;
|
|
24
|
-
export declare function silenceStdIO(): () => void;
|
|
25
|
-
export declare function runCliSilent(args: string[]): Promise<number>;
|
|
26
|
-
//# sourceMappingURL=stdio.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../../src/testing/cli-harness/stdio.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,wBAAgB,YAAY;;;;EAgC3B;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAMvD;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAExE;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE;IACJ,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GACA,IAAI,CAYN;AAED,wBAAgB,YAAY,IAAI,MAAM,IAAI,CAkBzC;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAOlE"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { expect } from "vitest";
|
|
2
|
-
import { runCli } from "../../cli/run-cli.js";
|
|
3
|
-
const originalStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
4
|
-
const originalStderrWrite = process.stderr.write.bind(process.stderr);
|
|
5
|
-
let stdioSilenceDepth = 0;
|
|
6
|
-
export function captureStdIO() {
|
|
7
|
-
let stdout = "";
|
|
8
|
-
let stderr = "";
|
|
9
|
-
const origStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
10
|
-
const origStderrWrite = process.stderr.write.bind(process.stderr);
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
|
-
process.stdout.write = (chunk) => {
|
|
13
|
-
stdout += String(chunk);
|
|
14
|
-
return true;
|
|
15
|
-
};
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
-
process.stderr.write = (chunk) => {
|
|
18
|
-
stderr += String(chunk);
|
|
19
|
-
return true;
|
|
20
|
-
};
|
|
21
|
-
return {
|
|
22
|
-
get stdout() {
|
|
23
|
-
return stdout;
|
|
24
|
-
},
|
|
25
|
-
get stderr() {
|
|
26
|
-
return stderr;
|
|
27
|
-
},
|
|
28
|
-
restore() {
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
|
-
process.stdout.write = origStdoutWrite;
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
|
-
process.stderr.write = origStderrWrite;
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export function splitOutputLines(text) {
|
|
37
|
-
return text
|
|
38
|
-
.trim()
|
|
39
|
-
.split(/\r?\n/)
|
|
40
|
-
.map((line) => line.trimEnd())
|
|
41
|
-
.filter(Boolean);
|
|
42
|
-
}
|
|
43
|
-
export function parseAgentJsonEnvelope(stdout) {
|
|
44
|
-
return JSON.parse(stdout);
|
|
45
|
-
}
|
|
46
|
-
export function expectAgentJsonEnvelope(payload, opts) {
|
|
47
|
-
expect(payload.schema_version).toBe(1);
|
|
48
|
-
expect(payload.mode).toBe("agent_json_v1");
|
|
49
|
-
expect(payload.command).toBe(opts.command);
|
|
50
|
-
expect(payload.ok).toBe(opts.ok);
|
|
51
|
-
expect(payload.exit_code).toBe(opts.exitCode);
|
|
52
|
-
expect(Object.keys(payload)).toEqual(opts.hasData
|
|
53
|
-
? ["schema_version", "mode", "command", "ok", "exit_code", "stdout", "stderr", "data"]
|
|
54
|
-
: ["schema_version", "mode", "command", "ok", "exit_code", "stdout", "stderr"]);
|
|
55
|
-
expect(Object.hasOwn(payload, "data")).toBe(opts.hasData ?? false);
|
|
56
|
-
}
|
|
57
|
-
export function silenceStdIO() {
|
|
58
|
-
if (stdioSilenceDepth === 0) {
|
|
59
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
60
|
-
process.stdout.write = () => true;
|
|
61
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
62
|
-
process.stderr.write = () => true;
|
|
63
|
-
}
|
|
64
|
-
stdioSilenceDepth += 1;
|
|
65
|
-
return () => {
|
|
66
|
-
stdioSilenceDepth -= 1;
|
|
67
|
-
if (stdioSilenceDepth <= 0) {
|
|
68
|
-
stdioSilenceDepth = 0;
|
|
69
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
70
|
-
process.stdout.write = originalStdoutWrite;
|
|
71
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
72
|
-
process.stderr.write = originalStderrWrite;
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
export async function runCliSilent(args) {
|
|
77
|
-
const io = captureStdIO();
|
|
78
|
-
try {
|
|
79
|
-
return await runCli(args);
|
|
80
|
-
}
|
|
81
|
-
finally {
|
|
82
|
-
io.restore();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { defaultConfig } from "@agentplaneorg/core";
|
|
2
|
-
import type { TaskBackend } from "../backends/task-backend.js";
|
|
3
|
-
export * from "./cli-harness/recipe-archives.js";
|
|
4
|
-
export * from "./cli-harness/stdio.js";
|
|
5
|
-
export declare function registerAgentplaneHome(): void;
|
|
6
|
-
export declare function installRunCliIntegrationHarness(): void;
|
|
7
|
-
export declare function getAgentplaneHome(): string | null;
|
|
8
|
-
export declare function stubTaskBackend(overrides?: Partial<TaskBackend>): TaskBackend;
|
|
9
|
-
export declare function mkGitRepoRoot(): Promise<string>;
|
|
10
|
-
export declare function mkTempDir(): Promise<string>;
|
|
11
|
-
export declare function writeDefaultConfig(root: string): Promise<void>;
|
|
12
|
-
export declare function writeAndConfigureRoot(): Promise<string>;
|
|
13
|
-
export declare function approveTaskPlan(root: string, taskId: string): Promise<void>;
|
|
14
|
-
export declare function recordVerificationOk(root: string, taskId: string): Promise<void>;
|
|
15
|
-
export declare function writeConfig(root: string, config: ReturnType<typeof defaultConfig>): Promise<void>;
|
|
16
|
-
export declare function resetAgentplaneHomeRecipes(): Promise<void>;
|
|
17
|
-
export declare function mkGitRepoRootWithBranch(branch: string): Promise<string>;
|
|
18
|
-
export declare function configureGitUser(root: string): Promise<void>;
|
|
19
|
-
export declare function cleanGitEnv(): NodeJS.ProcessEnv;
|
|
20
|
-
export declare function pathExists(filePath: string): Promise<boolean>;
|
|
21
|
-
export declare function gitBranchExists(root: string, branch: string): Promise<boolean>;
|
|
22
|
-
export declare function commitAll(root: string, message: string): Promise<void>;
|
|
23
|
-
export declare function commitPathsIfChanged(root: string, paths: string[], message: string): Promise<boolean>;
|
|
24
|
-
export declare function stageGitignoreIfPresent(root: string): Promise<void>;
|
|
25
|
-
//# sourceMappingURL=cli-harness.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-harness.d.ts","sourceRoot":"","sources":["../../src/testing/cli-harness.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG/D,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AA8CvC,wBAAgB,sBAAsB,IAAI,IAAI,CAuD7C;AAED,wBAAgB,+BAA+B,IAAI,IAAI,CAYtD;AAED,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,IAAI,CAEjD;AAED,wBAAgB,eAAe,CAAC,SAAS,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CAsBjF;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAMrD;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAIjD;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKpE;AAED,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,CAI7D;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBjF;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBtF;AAED,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,GACvC,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAKhE;AAED,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAI7E;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CASlE;AAED,wBAAgB,WAAW,IAAI,MAAM,CAAC,UAAU,CAgB/C;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOnE;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAYpF;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM5E;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,OAAO,CAAC,CAgBlB;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIzE"}
|
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
import { execFile } from "node:child_process";
|
|
2
|
-
import { access, cp, mkdir, mkdtemp, readdir, rm, writeFile } from "node:fs/promises";
|
|
3
|
-
import os from "node:os";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import { promisify } from "node:util";
|
|
6
|
-
import { afterAll, afterEach, beforeAll, beforeEach, vi } from "vitest";
|
|
7
|
-
import { defaultConfig } from "@agentplaneorg/core";
|
|
8
|
-
import { runCliSilent, silenceStdIO } from "./cli-harness/stdio.js";
|
|
9
|
-
export * from "./cli-harness/recipe-archives.js";
|
|
10
|
-
export * from "./cli-harness/stdio.js";
|
|
11
|
-
const execFileAsync = promisify(execFile);
|
|
12
|
-
let agentplaneHome = null;
|
|
13
|
-
const testRoots = new Set();
|
|
14
|
-
const originalAgentplaneHome = process.env.AGENTPLANE_HOME;
|
|
15
|
-
const originalNoUpdateCheck = process.env.AGENTPLANE_NO_UPDATE_CHECK;
|
|
16
|
-
const originalGitAuthorName = process.env.GIT_AUTHOR_NAME;
|
|
17
|
-
const originalGitAuthorEmail = process.env.GIT_AUTHOR_EMAIL;
|
|
18
|
-
const originalGitCommitterName = process.env.GIT_COMMITTER_NAME;
|
|
19
|
-
const originalGitCommitterEmail = process.env.GIT_COMMITTER_EMAIL;
|
|
20
|
-
const originalHookRunner = process.env.AGENTPLANE_HOOK_RUNNER;
|
|
21
|
-
let gitTemplateRoot = null;
|
|
22
|
-
let gitTemplatePromise = null;
|
|
23
|
-
async function ensureGitTemplateRoot() {
|
|
24
|
-
if (gitTemplateRoot)
|
|
25
|
-
return gitTemplateRoot;
|
|
26
|
-
gitTemplatePromise ??= (async () => {
|
|
27
|
-
const root = await mkdtemp(path.join(os.tmpdir(), "agentplane-git-template-"));
|
|
28
|
-
await execFileAsync("git", ["init", "-q"], { cwd: root, env: cleanGitEnv() });
|
|
29
|
-
// Tests must not rely on global git config. Configure author identity locally
|
|
30
|
-
// so any helper that creates commits works in CI.
|
|
31
|
-
await execFileAsync("git", ["config", "user.email", "agentplane-test@example.com"], {
|
|
32
|
-
cwd: root,
|
|
33
|
-
env: cleanGitEnv(),
|
|
34
|
-
});
|
|
35
|
-
await execFileAsync("git", ["config", "user.name", "agentplane-test"], {
|
|
36
|
-
cwd: root,
|
|
37
|
-
env: cleanGitEnv(),
|
|
38
|
-
});
|
|
39
|
-
return root;
|
|
40
|
-
})();
|
|
41
|
-
gitTemplateRoot = await gitTemplatePromise;
|
|
42
|
-
return gitTemplateRoot;
|
|
43
|
-
}
|
|
44
|
-
async function copyDirContents(src, dest) {
|
|
45
|
-
const entries = await readdir(src, { withFileTypes: true });
|
|
46
|
-
await Promise.all(entries.map((entry) => cp(path.join(src, entry.name), path.join(dest, entry.name), { recursive: true })));
|
|
47
|
-
}
|
|
48
|
-
export function registerAgentplaneHome() {
|
|
49
|
-
beforeAll(async () => {
|
|
50
|
-
agentplaneHome = await mkdtemp(path.join(os.tmpdir(), "agentplane-home-"));
|
|
51
|
-
process.env.AGENTPLANE_HOME = agentplaneHome;
|
|
52
|
-
process.env.AGENTPLANE_NO_UPDATE_CHECK = "1";
|
|
53
|
-
process.env.AGENTPLANE_HOOK_RUNNER ??= path.join(process.cwd(), "packages", "agentplane", "bin", "agentplane.js");
|
|
54
|
-
// Keep tests hermetic: never rely on global git config for commit authorship.
|
|
55
|
-
process.env.GIT_AUTHOR_NAME ??= "agentplane-test";
|
|
56
|
-
process.env.GIT_AUTHOR_EMAIL ??= "agentplane-test@example.com";
|
|
57
|
-
process.env.GIT_COMMITTER_NAME ??= "agentplane-test";
|
|
58
|
-
process.env.GIT_COMMITTER_EMAIL ??= "agentplane-test@example.com";
|
|
59
|
-
});
|
|
60
|
-
afterAll(async () => {
|
|
61
|
-
if (agentplaneHome) {
|
|
62
|
-
await rm(agentplaneHome, { recursive: true, force: true });
|
|
63
|
-
}
|
|
64
|
-
if (originalAgentplaneHome === undefined) {
|
|
65
|
-
delete process.env.AGENTPLANE_HOME;
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
process.env.AGENTPLANE_HOME = originalAgentplaneHome;
|
|
69
|
-
}
|
|
70
|
-
if (originalNoUpdateCheck === undefined) {
|
|
71
|
-
delete process.env.AGENTPLANE_NO_UPDATE_CHECK;
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
process.env.AGENTPLANE_NO_UPDATE_CHECK = originalNoUpdateCheck;
|
|
75
|
-
}
|
|
76
|
-
if (originalGitAuthorName === undefined)
|
|
77
|
-
delete process.env.GIT_AUTHOR_NAME;
|
|
78
|
-
else
|
|
79
|
-
process.env.GIT_AUTHOR_NAME = originalGitAuthorName;
|
|
80
|
-
if (originalGitAuthorEmail === undefined)
|
|
81
|
-
delete process.env.GIT_AUTHOR_EMAIL;
|
|
82
|
-
else
|
|
83
|
-
process.env.GIT_AUTHOR_EMAIL = originalGitAuthorEmail;
|
|
84
|
-
if (originalGitCommitterName === undefined)
|
|
85
|
-
delete process.env.GIT_COMMITTER_NAME;
|
|
86
|
-
else
|
|
87
|
-
process.env.GIT_COMMITTER_NAME = originalGitCommitterName;
|
|
88
|
-
if (originalGitCommitterEmail === undefined)
|
|
89
|
-
delete process.env.GIT_COMMITTER_EMAIL;
|
|
90
|
-
else
|
|
91
|
-
process.env.GIT_COMMITTER_EMAIL = originalGitCommitterEmail;
|
|
92
|
-
if (originalHookRunner === undefined)
|
|
93
|
-
delete process.env.AGENTPLANE_HOOK_RUNNER;
|
|
94
|
-
else
|
|
95
|
-
process.env.AGENTPLANE_HOOK_RUNNER = originalHookRunner;
|
|
96
|
-
});
|
|
97
|
-
afterEach(async () => {
|
|
98
|
-
const roots = [...testRoots];
|
|
99
|
-
testRoots.clear();
|
|
100
|
-
await Promise.all(roots.map(async (root) => {
|
|
101
|
-
await rm(path.join(root, ".agentplane", ".upgrade"), { recursive: true, force: true });
|
|
102
|
-
await rm(path.join(root, ".agentplane", ".release"), { recursive: true, force: true });
|
|
103
|
-
}));
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
export function installRunCliIntegrationHarness() {
|
|
107
|
-
registerAgentplaneHome();
|
|
108
|
-
let restoreStdIO = null;
|
|
109
|
-
beforeEach(() => {
|
|
110
|
-
restoreStdIO = silenceStdIO();
|
|
111
|
-
});
|
|
112
|
-
afterEach(() => {
|
|
113
|
-
restoreStdIO?.();
|
|
114
|
-
restoreStdIO = null;
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
export function getAgentplaneHome() {
|
|
118
|
-
return agentplaneHome;
|
|
119
|
-
}
|
|
120
|
-
export function stubTaskBackend(overrides = {}) {
|
|
121
|
-
return {
|
|
122
|
-
id: "local",
|
|
123
|
-
capabilities: {
|
|
124
|
-
canonical_source: "local",
|
|
125
|
-
projection: "canonical",
|
|
126
|
-
projection_read_mode: "fallback",
|
|
127
|
-
reads_from_projection_by_default: false,
|
|
128
|
-
writes_task_readmes: true,
|
|
129
|
-
supports_task_revisions: true,
|
|
130
|
-
supports_revision_guarded_writes: true,
|
|
131
|
-
may_access_network_on_read: false,
|
|
132
|
-
may_access_network_on_write: false,
|
|
133
|
-
supports_projection_refresh: false,
|
|
134
|
-
supports_push_sync: false,
|
|
135
|
-
supports_snapshot_export: false,
|
|
136
|
-
},
|
|
137
|
-
listTasks: vi.fn().mockResolvedValue([]),
|
|
138
|
-
getTask: vi.fn().mockResolvedValue(null),
|
|
139
|
-
writeTask: vi.fn().mockImplementation(() => Promise.resolve()),
|
|
140
|
-
...overrides,
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
export async function mkGitRepoRoot() {
|
|
144
|
-
const template = await ensureGitTemplateRoot();
|
|
145
|
-
const root = await mkdtemp(path.join(os.tmpdir(), "agentplane-cli-test-"));
|
|
146
|
-
await copyDirContents(template, root);
|
|
147
|
-
testRoots.add(root);
|
|
148
|
-
return root;
|
|
149
|
-
}
|
|
150
|
-
export async function mkTempDir() {
|
|
151
|
-
const root = await mkdtemp(path.join(os.tmpdir(), "agentplane-cli-test-"));
|
|
152
|
-
testRoots.add(root);
|
|
153
|
-
return root;
|
|
154
|
-
}
|
|
155
|
-
export async function writeDefaultConfig(root) {
|
|
156
|
-
const agentplaneDir = path.join(root, ".agentplane");
|
|
157
|
-
await mkdir(agentplaneDir, { recursive: true });
|
|
158
|
-
const configPath = path.join(agentplaneDir, "config.json");
|
|
159
|
-
await writeFile(configPath, JSON.stringify(defaultConfig(), null, 2), "utf8");
|
|
160
|
-
}
|
|
161
|
-
export async function writeAndConfigureRoot() {
|
|
162
|
-
const root = await mkGitRepoRoot();
|
|
163
|
-
await writeDefaultConfig(root);
|
|
164
|
-
return root;
|
|
165
|
-
}
|
|
166
|
-
export async function approveTaskPlan(root, taskId) {
|
|
167
|
-
await runCliSilent([
|
|
168
|
-
"task",
|
|
169
|
-
"plan",
|
|
170
|
-
"set",
|
|
171
|
-
taskId,
|
|
172
|
-
"--text",
|
|
173
|
-
"1) Do the work\n2) Verify the work",
|
|
174
|
-
"--updated-by",
|
|
175
|
-
"ORCHESTRATOR",
|
|
176
|
-
"--root",
|
|
177
|
-
root,
|
|
178
|
-
]);
|
|
179
|
-
await runCliSilent([
|
|
180
|
-
"task",
|
|
181
|
-
"plan",
|
|
182
|
-
"approve",
|
|
183
|
-
taskId,
|
|
184
|
-
"--by",
|
|
185
|
-
"USER",
|
|
186
|
-
"--note",
|
|
187
|
-
"OK",
|
|
188
|
-
"--root",
|
|
189
|
-
root,
|
|
190
|
-
]);
|
|
191
|
-
}
|
|
192
|
-
export async function recordVerificationOk(root, taskId) {
|
|
193
|
-
await runCliSilent([
|
|
194
|
-
"task",
|
|
195
|
-
"doc",
|
|
196
|
-
"set",
|
|
197
|
-
taskId,
|
|
198
|
-
"--section",
|
|
199
|
-
"Verify Steps",
|
|
200
|
-
"--text",
|
|
201
|
-
"Run verify for this task. Expected: verification records successfully.",
|
|
202
|
-
"--root",
|
|
203
|
-
root,
|
|
204
|
-
]);
|
|
205
|
-
await runCliSilent([
|
|
206
|
-
"verify",
|
|
207
|
-
taskId,
|
|
208
|
-
"--ok",
|
|
209
|
-
"--by",
|
|
210
|
-
"REVIEWER",
|
|
211
|
-
"--note",
|
|
212
|
-
"Ok to integrate",
|
|
213
|
-
"--quiet",
|
|
214
|
-
"--root",
|
|
215
|
-
root,
|
|
216
|
-
]);
|
|
217
|
-
}
|
|
218
|
-
export async function writeConfig(root, config) {
|
|
219
|
-
const agentplaneDir = path.join(root, ".agentplane");
|
|
220
|
-
await mkdir(agentplaneDir, { recursive: true });
|
|
221
|
-
const configPath = path.join(agentplaneDir, "config.json");
|
|
222
|
-
await writeFile(configPath, JSON.stringify(config, null, 2), "utf8");
|
|
223
|
-
}
|
|
224
|
-
export async function resetAgentplaneHomeRecipes() {
|
|
225
|
-
if (!agentplaneHome)
|
|
226
|
-
return;
|
|
227
|
-
await rm(path.join(agentplaneHome, "recipes-store"), { recursive: true, force: true });
|
|
228
|
-
await rm(path.join(agentplaneHome, "recipes.json"), { force: true });
|
|
229
|
-
await rm(path.join(agentplaneHome, "recipes-index.json"), { force: true });
|
|
230
|
-
}
|
|
231
|
-
export async function mkGitRepoRootWithBranch(branch) {
|
|
232
|
-
const root = await mkGitRepoRoot();
|
|
233
|
-
await execFileAsync("git", ["checkout", "-b", branch], { cwd: root, env: cleanGitEnv() });
|
|
234
|
-
return root;
|
|
235
|
-
}
|
|
236
|
-
export async function configureGitUser(root) {
|
|
237
|
-
await execFileAsync("git", ["config", "user.email", "test@example.com"], {
|
|
238
|
-
cwd: root,
|
|
239
|
-
env: cleanGitEnv(),
|
|
240
|
-
});
|
|
241
|
-
await execFileAsync("git", ["config", "user.name", "Test User"], {
|
|
242
|
-
cwd: root,
|
|
243
|
-
env: cleanGitEnv(),
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
export function cleanGitEnv() {
|
|
247
|
-
const env = { ...process.env };
|
|
248
|
-
delete env.GIT_DIR;
|
|
249
|
-
delete env.GIT_WORK_TREE;
|
|
250
|
-
delete env.GIT_COMMON_DIR;
|
|
251
|
-
delete env.GIT_INDEX_FILE;
|
|
252
|
-
delete env.GIT_OBJECT_DIRECTORY;
|
|
253
|
-
delete env.GIT_ALTERNATE_OBJECT_DIRECTORIES;
|
|
254
|
-
env.GIT_CONFIG_GLOBAL = "/dev/null";
|
|
255
|
-
env.GIT_CONFIG_SYSTEM = "/dev/null";
|
|
256
|
-
env.GIT_TERMINAL_PROMPT = "0";
|
|
257
|
-
env.GIT_AUTHOR_NAME = env.GIT_AUTHOR_NAME ?? "Agentplane Test";
|
|
258
|
-
env.GIT_AUTHOR_EMAIL = env.GIT_AUTHOR_EMAIL ?? "agentplane-test@example.com";
|
|
259
|
-
env.GIT_COMMITTER_NAME = env.GIT_COMMITTER_NAME ?? "Agentplane Test";
|
|
260
|
-
env.GIT_COMMITTER_EMAIL = env.GIT_COMMITTER_EMAIL ?? "agentplane-test@example.com";
|
|
261
|
-
return env;
|
|
262
|
-
}
|
|
263
|
-
export async function pathExists(filePath) {
|
|
264
|
-
try {
|
|
265
|
-
await access(filePath);
|
|
266
|
-
return true;
|
|
267
|
-
}
|
|
268
|
-
catch {
|
|
269
|
-
return false;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
export async function gitBranchExists(root, branch) {
|
|
273
|
-
try {
|
|
274
|
-
await execFileAsync("git", ["show-ref", "--verify", "--quiet", `refs/heads/${branch}`], {
|
|
275
|
-
cwd: root,
|
|
276
|
-
env: cleanGitEnv(),
|
|
277
|
-
});
|
|
278
|
-
return true;
|
|
279
|
-
}
|
|
280
|
-
catch (err) {
|
|
281
|
-
const code = err?.code;
|
|
282
|
-
if (code === 1)
|
|
283
|
-
return false;
|
|
284
|
-
throw err;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
export async function commitAll(root, message) {
|
|
288
|
-
await execFileAsync("git", ["add", "."], { cwd: root, env: cleanGitEnv() });
|
|
289
|
-
await execFileAsync("git", ["commit", "--no-verify", "-m", message], {
|
|
290
|
-
cwd: root,
|
|
291
|
-
env: cleanGitEnv(),
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
export async function commitPathsIfChanged(root, paths, message) {
|
|
295
|
-
await execFileAsync("git", ["add", "--", ...paths], { cwd: root, env: cleanGitEnv() });
|
|
296
|
-
const { stdout } = await execFileAsync("git", ["diff", "--cached", "--name-only", "--", ...paths], {
|
|
297
|
-
cwd: root,
|
|
298
|
-
env: cleanGitEnv(),
|
|
299
|
-
});
|
|
300
|
-
if (!stdout.trim())
|
|
301
|
-
return false;
|
|
302
|
-
await execFileAsync("git", ["commit", "--no-verify", "-m", message], {
|
|
303
|
-
cwd: root,
|
|
304
|
-
env: cleanGitEnv(),
|
|
305
|
-
});
|
|
306
|
-
return true;
|
|
307
|
-
}
|
|
308
|
-
export async function stageGitignoreIfPresent(root) {
|
|
309
|
-
const gitignorePath = path.join(root, ".gitignore");
|
|
310
|
-
if (!(await pathExists(gitignorePath)))
|
|
311
|
-
return;
|
|
312
|
-
await execFileAsync("git", ["add", ".gitignore"], { cwd: root, env: cleanGitEnv() });
|
|
313
|
-
}
|
package/dist/testing/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
package/dist/testing/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./cli-harness.js";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|