agentplane 0.3.14 → 0.3.16
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 +508 -323
- 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 +147 -0
- package/dist/backends/task-backend/redmine/backend-runtime.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-runtime.js +258 -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-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/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/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 +24 -11
- 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 +174 -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 +13 -1
- package/dist/cli/spec/errors.d.ts.map +1 -1
- package/dist/cli/spec/errors.js +14 -4
- 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.js +1 -1
- package/dist/commands/commit.spec.js +1 -1
- package/dist/commands/doctor/branch-pr.js +1 -1
- package/dist/commands/doctor/fixes.js +1 -1
- package/dist/commands/doctor/runtime.d.ts.map +1 -1
- package/dist/commands/doctor/runtime.js +2 -2
- package/dist/commands/doctor/workspace.js +1 -1
- 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 +3 -0
- package/dist/commands/hooks/index.d.ts.map +1 -1
- package/dist/commands/hooks/index.js +27 -10
- 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/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 +5 -1
- 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.map +1 -1
- package/dist/commands/task/hosted-close-pr.command.js +29 -4
- package/dist/commands/task/hosted-close.command.d.ts.map +1 -1
- package/dist/commands/task/hosted-close.command.js +23 -2
- 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/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/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 +349 -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/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 +52 -2
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/errors.js +66 -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/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/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-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/capabilities/types.js → policy/model.js} +0 -0
- /package/dist/runtime/{execution-profile/types.js → approvals/model.js} +0 -0
- /package/dist/runtime/{explain/types.js → behavior/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
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { extractTaskSuffix } from "@agentplaneorg/core";
|
|
3
|
+
import { execFileAsync, gitEnv } from "../../shared/git.js";
|
|
4
|
+
import { GitContext } from "../../shared/git-context.js";
|
|
5
|
+
import { parseTaskIdFromBranch } from "../../shared/git-worktree.js";
|
|
6
|
+
import { cleanHookEnv, maybePersistExpectedCliVersion, maybeRefreshGeneratedReference, maybeUpdateBunLockfile, packageDependencyExists, replaceAgentplanePackageMetadata, replacePackageDependencyVersion, replacePackageVersionInFile, } from "../apply.mutation.js";
|
|
7
|
+
import { fileExists } from "../apply.preflight.js";
|
|
8
|
+
import { emitReleaseLine } from "./shared.js";
|
|
9
|
+
export async function applyReleaseMutation(opts) {
|
|
10
|
+
let releaseCommit = null;
|
|
11
|
+
await Promise.all([
|
|
12
|
+
replacePackageVersionInFile(opts.corePkgPath, opts.nextVersion),
|
|
13
|
+
replacePackageVersionInFile(opts.recipesPkgPath, opts.nextVersion),
|
|
14
|
+
replaceAgentplanePackageMetadata(opts.agentplanePkgPath, opts.nextVersion),
|
|
15
|
+
]);
|
|
16
|
+
const shouldUpdateTestkitAgentplaneDependency = (await fileExists(opts.testkitPkgPath)) &&
|
|
17
|
+
(await packageDependencyExists(opts.testkitPkgPath, "agentplane"));
|
|
18
|
+
if (shouldUpdateTestkitAgentplaneDependency) {
|
|
19
|
+
await replacePackageDependencyVersion(opts.testkitPkgPath, "agentplane", opts.nextVersion);
|
|
20
|
+
}
|
|
21
|
+
const expectedCliVersionPersisted = await maybePersistExpectedCliVersion(opts.agentplaneDir, opts.nextVersion);
|
|
22
|
+
await maybeUpdateBunLockfile(opts.gitRoot, fileExists);
|
|
23
|
+
const generatedReferenceExists = await maybeRefreshGeneratedReference(opts.gitRoot, fileExists);
|
|
24
|
+
const stagePaths = [
|
|
25
|
+
"packages/core/package.json",
|
|
26
|
+
"packages/agentplane/package.json",
|
|
27
|
+
"packages/recipes/package.json",
|
|
28
|
+
path.relative(opts.gitRoot, opts.notesPath),
|
|
29
|
+
];
|
|
30
|
+
if (shouldUpdateTestkitAgentplaneDependency) {
|
|
31
|
+
stagePaths.push("packages/testkit/package.json");
|
|
32
|
+
}
|
|
33
|
+
if (expectedCliVersionPersisted) {
|
|
34
|
+
stagePaths.push(".agentplane/config.json");
|
|
35
|
+
}
|
|
36
|
+
if (generatedReferenceExists) {
|
|
37
|
+
stagePaths.push("docs/reference/generated-reference.mdx");
|
|
38
|
+
}
|
|
39
|
+
if (await fileExists(path.join(opts.gitRoot, "bun.lock"))) {
|
|
40
|
+
stagePaths.push("bun.lock");
|
|
41
|
+
}
|
|
42
|
+
await opts.git.stage(stagePaths);
|
|
43
|
+
const staged = await opts.git.statusStagedPaths();
|
|
44
|
+
if (staged.length === 0) {
|
|
45
|
+
emitReleaseLine("No changes to commit.");
|
|
46
|
+
return { releaseCommit };
|
|
47
|
+
}
|
|
48
|
+
const taskId = opts.route.kind === "release_candidate"
|
|
49
|
+
? parseTaskIdFromBranch(opts.taskBranchPrefix, opts.route.current_branch)
|
|
50
|
+
: null;
|
|
51
|
+
const subject = taskId
|
|
52
|
+
? `✨ ${extractTaskSuffix(taskId)} release: publish ${opts.nextTag}`
|
|
53
|
+
: `✨ release: publish ${opts.nextTag}`;
|
|
54
|
+
await opts.git.commit({ message: subject, env: cleanHookEnv() });
|
|
55
|
+
const { stdout: headHash } = await execFileAsync("git", ["rev-parse", "HEAD"], {
|
|
56
|
+
cwd: opts.gitRoot,
|
|
57
|
+
env: gitEnv(),
|
|
58
|
+
});
|
|
59
|
+
releaseCommit = { hash: String(headHash ?? "").trim(), subject };
|
|
60
|
+
return { releaseCommit };
|
|
61
|
+
}
|
|
62
|
+
export async function runReleaseCommandExecute(state) {
|
|
63
|
+
const git = new GitContext({ gitRoot: state.gitRoot });
|
|
64
|
+
return await applyReleaseMutation({
|
|
65
|
+
agentplaneDir: state.resolved.agentplaneDir,
|
|
66
|
+
gitRoot: state.gitRoot,
|
|
67
|
+
git,
|
|
68
|
+
notesPath: state.notesPath,
|
|
69
|
+
corePkgPath: state.corePkgPath,
|
|
70
|
+
agentplanePkgPath: state.agentplanePkgPath,
|
|
71
|
+
recipesPkgPath: state.recipesPkgPath,
|
|
72
|
+
testkitPkgPath: state.testkitPkgPath,
|
|
73
|
+
nextTag: state.plan.nextTag,
|
|
74
|
+
nextVersion: state.plan.nextVersion,
|
|
75
|
+
route: state.route,
|
|
76
|
+
taskBranchPrefix: state.taskBranchPrefix,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CommandSpec } from "../../../cli/spec/spec.js";
|
|
2
|
+
import type { ReleaseApplyParsed, ReleaseApplyRoute, ReleaseCommandState, ReleaseVersionPlan } from "../apply.types.js";
|
|
3
|
+
export declare function runPushPreflight(opts: {
|
|
4
|
+
agentplaneDir: string;
|
|
5
|
+
gitRoot: string;
|
|
6
|
+
remote: string;
|
|
7
|
+
nextTag: string;
|
|
8
|
+
nextVersion: string;
|
|
9
|
+
route: ReleaseApplyRoute;
|
|
10
|
+
yes: boolean;
|
|
11
|
+
commandLabel: string;
|
|
12
|
+
}): Promise<boolean>;
|
|
13
|
+
export declare function assertReleaseBumpApproved(opts: {
|
|
14
|
+
flags: ReleaseApplyParsed;
|
|
15
|
+
plan: ReleaseVersionPlan;
|
|
16
|
+
spec: CommandSpec<ReleaseApplyParsed>;
|
|
17
|
+
commandLabel: string;
|
|
18
|
+
}): void;
|
|
19
|
+
export declare function runReleaseCommandPreflight(opts: {
|
|
20
|
+
state: ReleaseCommandState;
|
|
21
|
+
flags: ReleaseApplyParsed;
|
|
22
|
+
spec: CommandSpec<ReleaseApplyParsed>;
|
|
23
|
+
commandLabel: string;
|
|
24
|
+
}): Promise<void>;
|
|
25
|
+
//# sourceMappingURL=preflight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/apply.pipeline/preflight.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAS7D,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAG3B,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,iBAAiB,CAAC;IACzB,GAAG,EAAE,OAAO,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAAC,OAAO,CAAC,CAyCnB;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAC9C,KAAK,EAAE,kBAAkB,CAAC;IAC1B,IAAI,EAAE,kBAAkB,CAAC;IACzB,IAAI,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAQP;AAED,wBAAsB,0BAA0B,CAAC,IAAI,EAAE;IACrD,KAAK,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,IAAI,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8BhB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { loadConfig } from "@agentplaneorg/core";
|
|
2
|
+
import { usageError } from "../../../cli/spec/errors.js";
|
|
3
|
+
import { ensureActionApproved } from "../../shared/approval-requirements.js";
|
|
4
|
+
import { ensureNetworkApproved } from "../../shared/network-approval.js";
|
|
5
|
+
import { ensureNpmVersionsAvailable, ensureRemoteExists, ensureRemoteTagDoesNotExist, runReleasePrepublishGate, } from "../apply.preflight.js";
|
|
6
|
+
import { ensureReleasePlanMatchesRepoState } from "./state.js";
|
|
7
|
+
export async function runPushPreflight(opts) {
|
|
8
|
+
const loaded = await loadConfig(opts.agentplaneDir);
|
|
9
|
+
const pushReason = opts.route.kind === "release_candidate"
|
|
10
|
+
? `${opts.commandLabel} will push current branch ${opts.route.current_branch} to ${opts.remote} as a release candidate for ${opts.nextTag}; final publication remains gated on merge to ${opts.route.base_branch}`
|
|
11
|
+
: `${opts.commandLabel} will push HEAD and ${opts.nextTag} to ${opts.remote}`;
|
|
12
|
+
await ensureNetworkApproved({
|
|
13
|
+
action: opts.route.kind === "release_candidate" ? "release_candidate" : "release_apply",
|
|
14
|
+
config: loaded.config,
|
|
15
|
+
yes: opts.yes,
|
|
16
|
+
reason: `${opts.commandLabel} validates npm version availability and pushes over network`,
|
|
17
|
+
interactive: Boolean(process.stdin.isTTY),
|
|
18
|
+
});
|
|
19
|
+
await ensureActionApproved({
|
|
20
|
+
action: "git_push",
|
|
21
|
+
config: loaded.config,
|
|
22
|
+
yes: opts.yes,
|
|
23
|
+
reason: pushReason,
|
|
24
|
+
interactive: Boolean(process.stdin.isTTY),
|
|
25
|
+
});
|
|
26
|
+
await ensureRemoteExists(opts.gitRoot, opts.remote, opts.commandLabel);
|
|
27
|
+
await ensureRemoteTagDoesNotExist(opts.gitRoot, opts.remote, opts.nextTag, opts.commandLabel);
|
|
28
|
+
await ensureNpmVersionsAvailable(opts.gitRoot, opts.nextVersion, opts.commandLabel);
|
|
29
|
+
await runReleasePrepublishGate(opts.gitRoot, opts.commandLabel);
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
export function assertReleaseBumpApproved(opts) {
|
|
33
|
+
if ((opts.plan.bump === "minor" || opts.plan.bump === "major") && opts.flags.yes !== true) {
|
|
34
|
+
throw usageError({
|
|
35
|
+
spec: opts.spec,
|
|
36
|
+
command: opts.commandLabel,
|
|
37
|
+
message: `Bump '${opts.plan.bump}' requires explicit approval. Re-run with --yes.`,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export async function runReleaseCommandPreflight(opts) {
|
|
42
|
+
assertReleaseBumpApproved({
|
|
43
|
+
flags: opts.flags,
|
|
44
|
+
plan: opts.state.plan,
|
|
45
|
+
spec: opts.spec,
|
|
46
|
+
commandLabel: opts.commandLabel,
|
|
47
|
+
});
|
|
48
|
+
await ensureReleasePlanMatchesRepoState({
|
|
49
|
+
gitRoot: opts.state.gitRoot,
|
|
50
|
+
plan: opts.state.plan,
|
|
51
|
+
corePkgPath: opts.state.corePkgPath,
|
|
52
|
+
agentplanePkgPath: opts.state.agentplanePkgPath,
|
|
53
|
+
recipesPkgPath: opts.state.recipesPkgPath,
|
|
54
|
+
testkitPkgPath: opts.state.testkitPkgPath,
|
|
55
|
+
commandLabel: opts.commandLabel,
|
|
56
|
+
});
|
|
57
|
+
if (opts.flags.push) {
|
|
58
|
+
opts.state.npmVersionChecked = await runPushPreflight({
|
|
59
|
+
agentplaneDir: opts.state.resolved.agentplaneDir,
|
|
60
|
+
gitRoot: opts.state.gitRoot,
|
|
61
|
+
remote: opts.flags.remote,
|
|
62
|
+
nextTag: opts.state.plan.nextTag,
|
|
63
|
+
nextVersion: opts.state.plan.nextVersion,
|
|
64
|
+
route: opts.state.route,
|
|
65
|
+
yes: opts.flags.yes,
|
|
66
|
+
commandLabel: `${opts.commandLabel} --push`,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/apply.pipeline/shared.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAElD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReleaseCommandRouteResolver, ReleaseCommandState, ReleaseVersionPlan } from "../apply.types.js";
|
|
2
|
+
export declare function resolveReleasePlanInputs(opts: {
|
|
3
|
+
gitRoot: string;
|
|
4
|
+
planOverride?: string;
|
|
5
|
+
}): Promise<{
|
|
6
|
+
planDir: string;
|
|
7
|
+
plan: ReleaseVersionPlan;
|
|
8
|
+
notesPath: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function ensureReleasePlanMatchesRepoState(opts: {
|
|
11
|
+
gitRoot: string;
|
|
12
|
+
plan: ReleaseVersionPlan;
|
|
13
|
+
corePkgPath: string;
|
|
14
|
+
agentplanePkgPath: string;
|
|
15
|
+
recipesPkgPath: string;
|
|
16
|
+
testkitPkgPath: string;
|
|
17
|
+
commandLabel: "release apply" | "release candidate";
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
export declare function buildReleaseCommandState(opts: {
|
|
20
|
+
cwd: string;
|
|
21
|
+
rootOverride?: string | null;
|
|
22
|
+
planOverride?: string;
|
|
23
|
+
routeResolver: ReleaseCommandRouteResolver;
|
|
24
|
+
}): Promise<ReleaseCommandState>;
|
|
25
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/apply.pipeline/state.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,2BAA2B,EAC3B,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAE3B,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC,CA2BD;AAED,wBAAsB,iCAAiC,CAAC,IAAI,EAAE;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,kBAAkB,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,eAAe,GAAG,mBAAmB,CAAC;CACrD,GAAG,OAAO,CAAC,IAAI,CAAC,CAwFhB;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IACnD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,2BAA2B,CAAC;CAC5C,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA+B/B"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { loadConfig, resolveProject } from "@agentplaneorg/core";
|
|
3
|
+
import { exitCodeForError } from "../../../cli/exit-codes.js";
|
|
4
|
+
import { CliError } from "../../../shared/errors.js";
|
|
5
|
+
import { withDiagnosticContext } from "../../shared/diagnostics.js";
|
|
6
|
+
import { ensureCleanTrackedTree, ensureTagDoesNotExist, fileExists, loadReleasePlan, readCoreDependencyVersion, readOptionalAgentplaneDependencyVersion, readPackageVersion, readRecipesDependencyVersion, validateReleaseNotes, } from "../apply.preflight.js";
|
|
7
|
+
export async function resolveReleasePlanInputs(opts) {
|
|
8
|
+
const { planDir, plan, minBullets } = await loadReleasePlan({
|
|
9
|
+
gitRoot: opts.gitRoot,
|
|
10
|
+
planOverride: opts.planOverride,
|
|
11
|
+
});
|
|
12
|
+
if (!/^v\d+\.\d+\.\d+$/u.test(plan.nextTag)) {
|
|
13
|
+
throw new CliError({
|
|
14
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
15
|
+
code: "E_VALIDATION",
|
|
16
|
+
message: `Invalid nextTag in version.json (expected vX.Y.Z): ${plan.nextTag}`,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
const notesPath = path.join(opts.gitRoot, "docs", "releases", `${plan.nextTag}.md`);
|
|
20
|
+
if (!(await fileExists(notesPath))) {
|
|
21
|
+
throw new CliError({
|
|
22
|
+
exitCode: exitCodeForError("E_IO"),
|
|
23
|
+
code: "E_IO",
|
|
24
|
+
message: `Missing release notes: ${path.relative(opts.gitRoot, notesPath)}\n` +
|
|
25
|
+
"Write this file using a DOCS agent before applying the release.",
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
await validateReleaseNotes(notesPath, minBullets);
|
|
29
|
+
return { planDir, plan, notesPath };
|
|
30
|
+
}
|
|
31
|
+
export async function ensureReleasePlanMatchesRepoState(opts) {
|
|
32
|
+
const [coreVersion, agentplaneVersion, recipesVersion, coreDependencyVersion, recipesDependencyVersion,] = await Promise.all([
|
|
33
|
+
readPackageVersion(opts.corePkgPath),
|
|
34
|
+
readPackageVersion(opts.agentplanePkgPath),
|
|
35
|
+
readPackageVersion(opts.recipesPkgPath),
|
|
36
|
+
readCoreDependencyVersion(opts.agentplanePkgPath),
|
|
37
|
+
readRecipesDependencyVersion(opts.agentplanePkgPath),
|
|
38
|
+
]);
|
|
39
|
+
if (coreVersion !== agentplaneVersion || coreVersion !== recipesVersion) {
|
|
40
|
+
throw new CliError({
|
|
41
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
42
|
+
code: "E_VALIDATION",
|
|
43
|
+
message: `Package versions must match before applying a release. ` +
|
|
44
|
+
`packages/core=${coreVersion} packages/agentplane=${agentplaneVersion} packages/recipes=${recipesVersion}`,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (coreDependencyVersion !== coreVersion) {
|
|
48
|
+
throw new CliError({
|
|
49
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
50
|
+
code: "E_VALIDATION",
|
|
51
|
+
message: "Release dependency parity check failed before apply. " +
|
|
52
|
+
`packages/agentplane dependency @agentplaneorg/core=${coreDependencyVersion} ` +
|
|
53
|
+
`must match packages/core version ${coreVersion}.`,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
if (recipesDependencyVersion !== coreVersion) {
|
|
57
|
+
throw new CliError({
|
|
58
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
59
|
+
code: "E_VALIDATION",
|
|
60
|
+
message: "Release dependency parity check failed before apply. " +
|
|
61
|
+
`packages/agentplane dependency @agentplaneorg/recipes=${recipesDependencyVersion} ` +
|
|
62
|
+
`must match packages/recipes version ${coreVersion}.`,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (await fileExists(opts.testkitPkgPath)) {
|
|
66
|
+
const testkitAgentplaneDependencyVersion = await readOptionalAgentplaneDependencyVersion(opts.testkitPkgPath);
|
|
67
|
+
if (testkitAgentplaneDependencyVersion &&
|
|
68
|
+
testkitAgentplaneDependencyVersion !== agentplaneVersion) {
|
|
69
|
+
throw new CliError({
|
|
70
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
71
|
+
code: "E_VALIDATION",
|
|
72
|
+
message: "Release dependency parity check failed before apply. " +
|
|
73
|
+
`packages/testkit dependency agentplane=${testkitAgentplaneDependencyVersion} ` +
|
|
74
|
+
`must match packages/agentplane version ${agentplaneVersion}.`,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
await ensureCleanTrackedTree(opts.gitRoot, opts.commandLabel);
|
|
79
|
+
await ensureTagDoesNotExist(opts.gitRoot, opts.plan.nextTag, opts.commandLabel);
|
|
80
|
+
if (coreVersion !== opts.plan.prevVersion) {
|
|
81
|
+
throw new CliError({
|
|
82
|
+
exitCode: exitCodeForError("E_VALIDATION"),
|
|
83
|
+
code: "E_VALIDATION",
|
|
84
|
+
message: `Current version does not match the release-plan baseline. ` +
|
|
85
|
+
`current=${coreVersion} expected_prev=${opts.plan.prevVersion} expected_next=${opts.plan.nextVersion}\n` +
|
|
86
|
+
"Re-run `agentplane release plan` to generate a fresh plan for this repo state.",
|
|
87
|
+
context: withDiagnosticContext({ command: opts.commandLabel }, {
|
|
88
|
+
state: "the repository version no longer matches the prepared release-plan baseline",
|
|
89
|
+
likelyCause: "package versions changed after the plan was generated, so continuing would apply the release over a partially drifted local state",
|
|
90
|
+
nextAction: {
|
|
91
|
+
command: "agentplane release plan",
|
|
92
|
+
reason: "generate a fresh release plan from the current repository state before applying the release",
|
|
93
|
+
reasonCode: "release_plan_drifted",
|
|
94
|
+
},
|
|
95
|
+
}),
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
export async function buildReleaseCommandState(opts) {
|
|
100
|
+
const resolved = await resolveProject({
|
|
101
|
+
cwd: opts.cwd,
|
|
102
|
+
rootOverride: opts.rootOverride ?? null,
|
|
103
|
+
});
|
|
104
|
+
const gitRoot = resolved.gitRoot;
|
|
105
|
+
const { planDir, plan, notesPath } = await resolveReleasePlanInputs({
|
|
106
|
+
gitRoot,
|
|
107
|
+
planOverride: opts.planOverride,
|
|
108
|
+
});
|
|
109
|
+
const loaded = await loadConfig(resolved.agentplaneDir);
|
|
110
|
+
return {
|
|
111
|
+
resolved,
|
|
112
|
+
gitRoot,
|
|
113
|
+
planDir,
|
|
114
|
+
plan,
|
|
115
|
+
notesPath,
|
|
116
|
+
taskBranchPrefix: loaded.config.branch.task_prefix,
|
|
117
|
+
route: await opts.routeResolver({
|
|
118
|
+
cwd: opts.cwd,
|
|
119
|
+
rootOverride: opts.rootOverride ?? null,
|
|
120
|
+
gitRoot,
|
|
121
|
+
agentplaneDir: resolved.agentplaneDir,
|
|
122
|
+
}),
|
|
123
|
+
corePkgPath: path.join(gitRoot, "packages", "core", "package.json"),
|
|
124
|
+
agentplanePkgPath: path.join(gitRoot, "packages", "agentplane", "package.json"),
|
|
125
|
+
recipesPkgPath: path.join(gitRoot, "packages", "recipes", "package.json"),
|
|
126
|
+
testkitPkgPath: path.join(gitRoot, "packages", "testkit", "package.json"),
|
|
127
|
+
npmVersionChecked: false,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ResolvedProject } from "@agentplaneorg/core";
|
|
2
2
|
import type { CommandSpec } from "../../cli/spec/spec.js";
|
|
3
3
|
import type { ReleaseApplyParsed, ReleaseCommandRouteResolver } from "./apply.types.js";
|
|
4
4
|
export declare function runReleaseCommandPipeline(opts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.pipeline.d.ts","sourceRoot":"","sources":["../../../src/commands/release/apply.pipeline.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply.pipeline.d.ts","sourceRoot":"","sources":["../../../src/commands/release/apply.pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAMxF,wBAAsB,yBAAyB,CAAC,IAAI,EAAE;IACpD,GAAG,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACnD,KAAK,EAAE,kBAAkB,CAAC;IAC1B,IAAI,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,2BAA2B,CAAC;CAC5C,GAAG,OAAO,CAAC,MAAM,CAAC,CAwBlB;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,eAAe,CAAC;AAE1D,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|