agentplane 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/AGENTS.md +11 -1
- package/assets/RUNNER.md +17 -0
- package/bin/agentplane.js +16 -7
- package/bin/framework-dev-contract.d.ts +6 -0
- package/bin/framework-dev-contract.js +13 -0
- package/bin/stale-dist-policy.js +6 -1
- package/dist/.build-manifest.json +694 -339
- package/dist/adapters/task-backend/task-backend-adapter.d.ts +3 -1
- package/dist/adapters/task-backend/task-backend-adapter.d.ts.map +1 -1
- package/dist/adapters/task-backend/task-backend-adapter.js +13 -0
- package/dist/backends/task-backend/local-backend-doc.d.ts +5 -0
- package/dist/backends/task-backend/local-backend-doc.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-doc.js +98 -0
- package/dist/backends/task-backend/local-backend-read.d.ts +7 -0
- package/dist/backends/task-backend/local-backend-read.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-read.js +186 -0
- package/dist/backends/task-backend/local-backend-state.d.ts +17 -0
- package/dist/backends/task-backend/local-backend-state.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-state.js +50 -0
- package/dist/backends/task-backend/local-backend-write.d.ts +15 -0
- package/dist/backends/task-backend/local-backend-write.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-write.js +254 -0
- package/dist/backends/task-backend/local-backend.d.ts +4 -2
- package/dist/backends/task-backend/local-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend.js +26 -403
- package/dist/backends/task-backend/redmine/backend-cache-doc.d.ts +40 -0
- package/dist/backends/task-backend/redmine/backend-cache-doc.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-cache-doc.js +178 -0
- package/dist/backends/task-backend/redmine/backend-report.d.ts +10 -0
- package/dist/backends/task-backend/redmine/backend-report.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-report.js +43 -0
- package/dist/backends/task-backend/redmine/backend-sync.d.ts +67 -0
- package/dist/backends/task-backend/redmine/backend-sync.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-sync.js +367 -0
- package/dist/backends/task-backend/redmine/mapping.d.ts +2 -1
- package/dist/backends/task-backend/redmine/mapping.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/mapping.js +12 -2
- package/dist/backends/task-backend/redmine/parse.d.ts +2 -1
- package/dist/backends/task-backend/redmine/parse.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/parse.js +5 -3
- package/dist/backends/task-backend/redmine/state.d.ts +2 -0
- package/dist/backends/task-backend/redmine/state.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/state.js +15 -1
- package/dist/backends/task-backend/redmine-backend.d.ts +5 -2
- package/dist/backends/task-backend/redmine-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine-backend.js +88 -536
- package/dist/backends/task-backend/shared/constants.d.ts +2 -1
- package/dist/backends/task-backend/shared/constants.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/doc.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/doc.js +25 -39
- package/dist/backends/task-backend/shared/export.d.ts +2 -9
- package/dist/backends/task-backend/shared/export.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/export.js +73 -8
- package/dist/backends/task-backend/shared/normalize.d.ts +5 -1
- package/dist/backends/task-backend/shared/normalize.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/normalize.js +166 -0
- package/dist/backends/task-backend/shared/record.d.ts +1 -1
- package/dist/backends/task-backend/shared/record.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/record.js +7 -2
- package/dist/backends/task-backend/shared/types.d.ts +38 -36
- package/dist/backends/task-backend/shared/types.d.ts.map +1 -1
- package/dist/backends/task-backend/shared.d.ts +2 -2
- package/dist/backends/task-backend/shared.d.ts.map +1 -1
- package/dist/backends/task-backend/shared.js +1 -1
- package/dist/backends/task-backend.d.ts +1 -1
- package/dist/backends/task-backend.d.ts.map +1 -1
- package/dist/backends/task-backend.js +1 -1
- package/dist/backends/task-index.d.ts +2 -2
- package/dist/backends/task-index.d.ts.map +1 -1
- package/dist/backends/task-index.js +9 -6
- package/dist/cli/bootstrap-guide.d.ts +2 -2
- package/dist/cli/bootstrap-guide.d.ts.map +1 -1
- package/dist/cli/bootstrap-guide.js +10 -10
- package/dist/cli/command-guide.d.ts.map +1 -1
- package/dist/cli/command-guide.js +11 -9
- package/dist/cli/command-invocations.d.ts +4 -0
- package/dist/cli/command-invocations.d.ts.map +1 -0
- package/dist/cli/command-invocations.js +35 -0
- package/dist/cli/command-snippets.d.ts +12 -8
- package/dist/cli/command-snippets.d.ts.map +1 -1
- package/dist/cli/command-snippets.js +14 -8
- package/dist/cli/exit-codes.d.ts.map +1 -1
- package/dist/cli/exit-codes.js +1 -0
- package/dist/cli/group-command.d.ts +18 -0
- package/dist/cli/group-command.d.ts.map +1 -0
- package/dist/cli/group-command.js +45 -0
- package/dist/cli/output.d.ts +29 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +76 -0
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +5 -1
- package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/core.js +38 -29
- package/dist/cli/run-cli/command-catalog/lifecycle.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/lifecycle.js +9 -6
- package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/project.js +8 -6
- package/dist/cli/run-cli/command-catalog/shared.d.ts +12 -3
- package/dist/cli/run-cli/command-catalog/shared.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/shared.js +6 -3
- package/dist/cli/run-cli/command-catalog/task.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/task.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/task.js +46 -11
- package/dist/cli/run-cli/command-catalog.d.ts +11 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog.js +29 -0
- package/dist/cli/run-cli/commands/config.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/config.js +52 -6
- package/dist/cli/run-cli/commands/core/agent-profiles.d.ts +34 -0
- package/dist/cli/run-cli/commands/core/agent-profiles.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/agent-profiles.js +97 -0
- package/dist/cli/run-cli/commands/core/agents.d.ts +7 -0
- package/dist/cli/run-cli/commands/core/agents.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/agents.js +97 -0
- package/dist/cli/run-cli/commands/core/preflight.d.ts +10 -0
- package/dist/cli/run-cli/commands/core/preflight.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/preflight.js +286 -0
- package/dist/cli/run-cli/commands/core/quickstart.d.ts +8 -0
- package/dist/cli/run-cli/commands/core/quickstart.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/quickstart.js +43 -0
- package/dist/cli/run-cli/commands/core/role.d.ts +9 -0
- package/dist/cli/run-cli/commands/core/role.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/role.js +128 -0
- package/dist/cli/run-cli/commands/core.d.ts +4 -24
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core.js +4 -630
- package/dist/cli/run-cli/error-guidance.js +10 -0
- package/dist/cli/run-cli/globals.d.ts +5 -2
- package/dist/cli/run-cli/globals.d.ts.map +1 -1
- package/dist/cli/run-cli/globals.js +82 -86
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +137 -100
- package/dist/cli/run-cli.test-helpers.d.ts +21 -0
- package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
- package/dist/cli/run-cli.test-helpers.js +88 -4
- package/dist/cli/spec/help.d.ts +10 -2
- package/dist/cli/spec/help.d.ts.map +1 -1
- package/dist/cli/spec/help.js +7 -5
- package/dist/cli/spec/registry.d.ts +27 -1
- package/dist/cli/spec/registry.d.ts.map +1 -1
- package/dist/cli/spec/registry.js +98 -25
- package/dist/commands/backend/sync.command.d.ts +3 -5
- package/dist/commands/backend/sync.command.d.ts.map +1 -1
- package/dist/commands/backend/sync.command.js +9 -12
- package/dist/commands/backend.d.ts.map +1 -1
- package/dist/commands/backend.js +8 -7
- package/dist/commands/branch/base.command.d.ts +2 -3
- package/dist/commands/branch/base.command.d.ts.map +1 -1
- package/dist/commands/branch/base.command.js +8 -12
- package/dist/commands/branch/base.d.ts.map +1 -1
- package/dist/commands/branch/base.js +11 -7
- package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
- package/dist/commands/branch/cleanup-merged.js +9 -8
- package/dist/commands/branch/remove.d.ts.map +1 -1
- package/dist/commands/branch/remove.js +4 -3
- package/dist/commands/branch/status.d.ts.map +1 -1
- package/dist/commands/branch/status.js +4 -3
- package/dist/commands/branch/work-start.d.ts.map +1 -1
- package/dist/commands/branch/work-start.js +48 -5
- package/dist/commands/cleanup/merged.command.d.ts +2 -3
- package/dist/commands/cleanup/merged.command.d.ts.map +1 -1
- package/dist/commands/cleanup/merged.command.js +8 -12
- package/dist/commands/docs/cli.command.js +2 -2
- package/dist/commands/doctor/runtime.js +1 -1
- package/dist/commands/doctor/workflow.d.ts.map +1 -1
- package/dist/commands/doctor/workflow.js +10 -1
- package/dist/commands/finish.spec.d.ts.map +1 -1
- package/dist/commands/finish.spec.js +7 -0
- package/dist/commands/guard/guard.command.d.ts +3 -3
- package/dist/commands/guard/guard.command.d.ts.map +1 -1
- package/dist/commands/guard/guard.command.js +9 -14
- package/dist/commands/guard/impl/commands.d.ts +2 -0
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +55 -7
- package/dist/commands/guard/impl/policy.d.ts +1 -0
- package/dist/commands/guard/impl/policy.d.ts.map +1 -1
- package/dist/commands/guard/impl/policy.js +9 -6
- package/dist/commands/hooks/hooks.command.d.ts +3 -3
- package/dist/commands/hooks/hooks.command.d.ts.map +1 -1
- package/dist/commands/hooks/hooks.command.js +9 -11
- package/dist/commands/pr/check.d.ts.map +1 -1
- package/dist/commands/pr/check.js +90 -18
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
- package/dist/commands/pr/integrate/cmd.js +31 -3
- package/dist/commands/pr/integrate/internal/cleanup.d.ts +12 -0
- package/dist/commands/pr/integrate/internal/cleanup.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/cleanup.js +46 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts +4 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/finalize.js +34 -40
- package/dist/commands/pr/integrate/internal/merge.d.ts +6 -0
- package/dist/commands/pr/integrate/internal/merge.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/merge.js +92 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts +1 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/prepare.js +1 -0
- package/dist/commands/pr/integrate/verify.d.ts.map +1 -1
- package/dist/commands/pr/integrate/verify.js +4 -3
- package/dist/commands/pr/note.d.ts.map +1 -1
- package/dist/commands/pr/note.js +3 -2
- package/dist/commands/pr/open.d.ts.map +1 -1
- package/dist/commands/pr/open.js +9 -12
- package/dist/commands/pr/pr.command.d.ts +3 -4
- package/dist/commands/pr/pr.command.d.ts.map +1 -1
- package/dist/commands/pr/pr.command.js +6 -11
- package/dist/commands/pr/update.d.ts.map +1 -1
- package/dist/commands/pr/update.js +5 -10
- package/dist/commands/recipes/cache.command.d.ts +3 -4
- package/dist/commands/recipes/cache.command.d.ts.map +1 -1
- package/dist/commands/recipes/cache.command.js +8 -26
- package/dist/commands/recipes/impl/apply.d.ts +1 -1
- package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
- package/dist/commands/recipes/impl/apply.js +1 -1
- package/dist/commands/recipes/impl/commands/explain.js +1 -1
- package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/install.js +1 -2
- package/dist/commands/recipes/impl/installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/installed-recipes.js +1 -2
- package/dist/commands/recipes/impl/manifest.d.ts.map +1 -1
- package/dist/commands/recipes/impl/manifest.js +0 -10
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.js +1 -2
- package/dist/commands/recipes/impl/resolver.d.ts +1 -1
- package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
- package/dist/commands/recipes/impl/resolver.js +26 -16
- package/dist/commands/recipes/impl/scenario.d.ts.map +1 -1
- package/dist/commands/recipes/impl/scenario.js +80 -0
- package/dist/commands/recipes/impl/types.d.ts +27 -13
- package/dist/commands/recipes/impl/types.d.ts.map +1 -1
- package/dist/commands/recipes/recipes.command.d.ts +3 -4
- package/dist/commands/recipes/recipes.command.d.ts.map +1 -1
- package/dist/commands/recipes/recipes.command.js +8 -34
- package/dist/commands/recipes.d.ts +4 -4
- package/dist/commands/recipes.d.ts.map +1 -1
- package/dist/commands/recipes.js +3 -3
- package/dist/commands/recipes.test-helpers.d.ts +17 -0
- package/dist/commands/recipes.test-helpers.d.ts.map +1 -1
- package/dist/commands/recipes.test-helpers.js +56 -2
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +77 -56
- package/dist/commands/release/plan.command.d.ts.map +1 -1
- package/dist/commands/release/plan.command.js +7 -3
- package/dist/commands/release/release.command.d.ts +3 -3
- package/dist/commands/release/release.command.d.ts.map +1 -1
- package/dist/commands/release/release.command.js +9 -11
- package/dist/commands/release.test-helpers.d.ts +20 -0
- package/dist/commands/release.test-helpers.d.ts.map +1 -0
- package/dist/commands/release.test-helpers.js +37 -0
- package/dist/commands/runtime.command.d.ts +7 -7
- package/dist/commands/runtime.command.d.ts.map +1 -1
- package/dist/commands/runtime.command.js +29 -33
- package/dist/commands/scenario/execute.command.d.ts +8 -0
- package/dist/commands/scenario/execute.command.d.ts.map +1 -0
- package/dist/commands/scenario/execute.command.js +117 -0
- package/dist/commands/scenario/impl/commands.d.ts.map +1 -1
- package/dist/commands/scenario/impl/commands.js +45 -32
- package/dist/commands/scenario/run.command.js +2 -2
- package/dist/commands/scenario/scenario.command.d.ts +3 -4
- package/dist/commands/scenario/scenario.command.d.ts.map +1 -1
- package/dist/commands/scenario/scenario.command.js +8 -26
- package/dist/commands/shared/git-context.d.ts +1 -0
- package/dist/commands/shared/git-context.d.ts.map +1 -1
- package/dist/commands/shared/git-context.js +4 -2
- package/dist/commands/shared/git-ops.d.ts +1 -0
- package/dist/commands/shared/git-ops.d.ts.map +1 -1
- package/dist/commands/shared/git-ops.js +13 -0
- package/dist/commands/shared/operator-pipeline.d.ts +10 -0
- package/dist/commands/shared/operator-pipeline.d.ts.map +1 -0
- package/dist/commands/shared/operator-pipeline.js +16 -0
- package/dist/commands/shared/pr-meta.d.ts +32 -12
- package/dist/commands/shared/pr-meta.d.ts.map +1 -1
- package/dist/commands/shared/pr-meta.js +49 -14
- package/dist/commands/shared/reconcile-check.d.ts.map +1 -1
- package/dist/commands/shared/reconcile-check.js +28 -3
- package/dist/commands/shared/task-backend.d.ts +10 -6
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +99 -25
- package/dist/commands/shared/task-handoff.d.ts +64 -0
- package/dist/commands/shared/task-handoff.d.ts.map +1 -0
- package/dist/commands/shared/task-handoff.js +151 -0
- package/dist/commands/shared/task-mutation.d.ts +36 -0
- package/dist/commands/shared/task-mutation.d.ts.map +1 -0
- package/dist/commands/shared/task-mutation.js +67 -0
- package/dist/commands/shared/task-store.d.ts +5 -1
- package/dist/commands/shared/task-store.d.ts.map +1 -1
- package/dist/commands/shared/task-store.js +72 -92
- package/dist/commands/task/add.d.ts.map +1 -1
- package/dist/commands/task/add.js +41 -39
- package/dist/commands/task/block.d.ts.map +1 -1
- package/dist/commands/task/block.js +31 -110
- package/dist/commands/task/close-duplicate.d.ts.map +1 -1
- package/dist/commands/task/close-duplicate.js +0 -7
- package/dist/commands/task/close-noop.d.ts.map +1 -1
- package/dist/commands/task/close-noop.js +0 -21
- package/dist/commands/task/close-shared.d.ts +0 -2
- package/dist/commands/task/close-shared.d.ts.map +1 -1
- package/dist/commands/task/close-shared.js +25 -55
- package/dist/commands/task/comment.d.ts.map +1 -1
- package/dist/commands/task/comment.js +48 -37
- package/dist/commands/task/derive.d.ts.map +1 -1
- package/dist/commands/task/derive.js +14 -7
- package/dist/commands/task/doc.command.d.ts.map +1 -1
- package/dist/commands/task/doc.command.js +7 -6
- package/dist/commands/task/doc.d.ts.map +1 -1
- package/dist/commands/task/doc.js +58 -62
- package/dist/commands/task/finish-shared.d.ts +60 -0
- package/dist/commands/task/finish-shared.d.ts.map +1 -0
- package/dist/commands/task/finish-shared.js +181 -0
- package/dist/commands/task/finish.d.ts +1 -0
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +79 -210
- package/dist/commands/task/handoff-record.command.d.ts +17 -0
- package/dist/commands/task/handoff-record.command.d.ts.map +1 -0
- package/dist/commands/task/handoff-record.command.js +140 -0
- package/dist/commands/task/handoff-show.command.d.ts +8 -0
- package/dist/commands/task/handoff-show.command.d.ts.map +1 -0
- package/dist/commands/task/handoff-show.command.js +77 -0
- package/dist/commands/task/handoff.command.d.ts +7 -0
- package/dist/commands/task/handoff.command.d.ts.map +1 -0
- package/dist/commands/task/handoff.command.js +21 -0
- package/dist/commands/task/handoff.shared.d.ts +39 -0
- package/dist/commands/task/handoff.shared.d.ts.map +1 -0
- package/dist/commands/task/handoff.shared.js +134 -0
- package/dist/commands/task/hosted-close.command.d.ts +9 -0
- package/dist/commands/task/hosted-close.command.d.ts.map +1 -0
- package/dist/commands/task/hosted-close.command.js +190 -0
- package/dist/commands/task/hosted-merge-sync.d.ts +40 -0
- package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -0
- package/dist/commands/task/hosted-merge-sync.js +277 -0
- package/dist/commands/task/list.d.ts.map +1 -1
- package/dist/commands/task/list.js +7 -24
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +26 -6
- package/dist/commands/task/next.d.ts.map +1 -1
- package/dist/commands/task/next.js +10 -28
- package/dist/commands/task/normalize.command.d.ts +1 -0
- package/dist/commands/task/normalize.command.d.ts.map +1 -1
- package/dist/commands/task/normalize.command.js +12 -0
- package/dist/commands/task/normalize.d.ts +1 -0
- package/dist/commands/task/normalize.d.ts.map +1 -1
- package/dist/commands/task/normalize.js +21 -9
- package/dist/commands/task/plan.command.d.ts +3 -4
- package/dist/commands/task/plan.command.d.ts.map +1 -1
- package/dist/commands/task/plan.command.js +6 -12
- package/dist/commands/task/plan.d.ts.map +1 -1
- package/dist/commands/task/plan.js +96 -103
- package/dist/commands/task/reclaim.command.d.ts +11 -0
- package/dist/commands/task/reclaim.command.d.ts.map +1 -0
- package/dist/commands/task/reclaim.command.js +102 -0
- package/dist/commands/task/resume-context.command.d.ts +9 -0
- package/dist/commands/task/resume-context.command.d.ts.map +1 -0
- package/dist/commands/task/resume-context.command.js +60 -0
- package/dist/commands/task/run-cancel.command.d.ts +6 -0
- package/dist/commands/task/run-cancel.command.d.ts.map +1 -0
- package/dist/commands/task/run-cancel.command.js +45 -0
- package/dist/commands/task/run-cancel.spec.d.ts +7 -0
- package/dist/commands/task/run-cancel.spec.d.ts.map +1 -0
- package/dist/commands/task/run-cancel.spec.js +20 -0
- package/dist/commands/task/run-resume.command.d.ts +6 -0
- package/dist/commands/task/run-resume.command.d.ts.map +1 -0
- package/dist/commands/task/run-resume.command.js +55 -0
- package/dist/commands/task/run-resume.spec.d.ts +7 -0
- package/dist/commands/task/run-resume.spec.d.ts.map +1 -0
- package/dist/commands/task/run-resume.spec.js +20 -0
- package/dist/commands/task/run-retry.command.d.ts +6 -0
- package/dist/commands/task/run-retry.command.d.ts.map +1 -0
- package/dist/commands/task/run-retry.command.js +56 -0
- package/dist/commands/task/run-retry.spec.d.ts +7 -0
- package/dist/commands/task/run-retry.spec.d.ts.map +1 -0
- package/dist/commands/task/run-retry.spec.js +20 -0
- package/dist/commands/task/run-show.command.d.ts +6 -0
- package/dist/commands/task/run-show.command.d.ts.map +1 -0
- package/dist/commands/task/run-show.command.js +133 -0
- package/dist/commands/task/run-show.spec.d.ts +8 -0
- package/dist/commands/task/run-show.spec.d.ts.map +1 -0
- package/dist/commands/task/run-show.spec.js +44 -0
- package/dist/commands/task/run-tail.command.d.ts +6 -0
- package/dist/commands/task/run-tail.command.d.ts.map +1 -0
- package/dist/commands/task/run-tail.command.js +26 -0
- package/dist/commands/task/run-tail.spec.d.ts +8 -0
- package/dist/commands/task/run-tail.spec.d.ts.map +1 -0
- package/dist/commands/task/run-tail.spec.js +51 -0
- package/dist/commands/task/run-trace.command.d.ts +6 -0
- package/dist/commands/task/run-trace.command.d.ts.map +1 -0
- package/dist/commands/task/run-trace.command.js +25 -0
- package/dist/commands/task/run-trace.spec.d.ts +7 -0
- package/dist/commands/task/run-trace.spec.d.ts.map +1 -0
- package/dist/commands/task/run-trace.spec.js +31 -0
- package/dist/commands/task/run.command.d.ts +6 -0
- package/dist/commands/task/run.command.d.ts.map +1 -0
- package/dist/commands/task/run.command.js +74 -0
- package/dist/commands/task/run.spec.d.ts +7 -0
- package/dist/commands/task/run.spec.d.ts.map +1 -0
- package/dist/commands/task/run.spec.js +26 -0
- package/dist/commands/task/scaffold.d.ts.map +1 -1
- package/dist/commands/task/scaffold.js +4 -2
- package/dist/commands/task/scrub.d.ts.map +1 -1
- package/dist/commands/task/scrub.js +27 -24
- package/dist/commands/task/search.d.ts.map +1 -1
- package/dist/commands/task/search.js +21 -31
- package/dist/commands/task/set-status.d.ts.map +1 -1
- package/dist/commands/task/set-status.js +36 -152
- package/dist/commands/task/shared/dependencies.d.ts +4 -4
- package/dist/commands/task/shared/dependencies.d.ts.map +1 -1
- package/dist/commands/task/shared/dependencies.js +10 -2
- package/dist/commands/task/shared/docs.d.ts +6 -1
- package/dist/commands/task/shared/docs.d.ts.map +1 -1
- package/dist/commands/task/shared/docs.js +13 -0
- package/dist/commands/task/shared/listing.d.ts +16 -2
- package/dist/commands/task/shared/listing.d.ts.map +1 -1
- package/dist/commands/task/shared/listing.js +56 -0
- package/dist/commands/task/shared/transition-command.d.ts +15 -0
- package/dist/commands/task/shared/transition-command.d.ts.map +1 -0
- package/dist/commands/task/shared/transition-command.js +43 -0
- package/dist/commands/task/shared/transitions.d.ts +39 -0
- package/dist/commands/task/shared/transitions.d.ts.map +1 -1
- package/dist/commands/task/shared/transitions.js +62 -1
- package/dist/commands/task/shared/workflow-transition-service.d.ts +75 -0
- package/dist/commands/task/shared/workflow-transition-service.d.ts.map +1 -0
- package/dist/commands/task/shared/workflow-transition-service.js +226 -0
- package/dist/commands/task/shared.d.ts +5 -3
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +5 -3
- package/dist/commands/task/show.d.ts.map +1 -1
- package/dist/commands/task/show.js +37 -3
- package/dist/commands/task/start.d.ts.map +1 -1
- package/dist/commands/task/start.js +33 -119
- package/dist/commands/task/task.command.d.ts +3 -4
- package/dist/commands/task/task.command.d.ts.map +1 -1
- package/dist/commands/task/task.command.js +22 -37
- package/dist/commands/task/verify-record.d.ts.map +1 -1
- package/dist/commands/task/verify-record.js +16 -141
- package/dist/commands/task/verify.command.d.ts.map +1 -1
- package/dist/commands/task/verify.command.js +7 -6
- package/dist/commands/task.test-helpers.d.ts +13 -0
- package/dist/commands/task.test-helpers.d.ts.map +1 -0
- package/dist/commands/task.test-helpers.js +65 -0
- package/dist/commands/upgrade/materialize.d.ts +28 -0
- package/dist/commands/upgrade/materialize.d.ts.map +1 -0
- package/dist/commands/upgrade/materialize.js +154 -0
- package/dist/commands/upgrade/plan.d.ts +18 -0
- package/dist/commands/upgrade/plan.d.ts.map +1 -0
- package/dist/commands/upgrade/plan.js +219 -0
- package/dist/commands/upgrade/policy.d.ts +24 -0
- package/dist/commands/upgrade/policy.d.ts.map +1 -0
- package/dist/commands/upgrade/policy.js +182 -0
- package/dist/commands/upgrade/report.d.ts.map +1 -1
- package/dist/commands/upgrade/report.js +7 -5
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +154 -642
- package/dist/commands/workflow.command.d.ts +3 -4
- package/dist/commands/workflow.command.d.ts.map +1 -1
- package/dist/commands/workflow.command.js +8 -25
- package/dist/ports/task-backend-port.d.ts +3 -1
- package/dist/ports/task-backend-port.d.ts.map +1 -1
- package/dist/runner/adapters/codex.d.ts +9 -0
- package/dist/runner/adapters/codex.d.ts.map +1 -0
- package/dist/runner/adapters/codex.js +414 -0
- package/dist/runner/adapters/custom.d.ts +12 -0
- package/dist/runner/adapters/custom.d.ts.map +1 -0
- package/dist/runner/adapters/custom.js +512 -0
- package/dist/runner/adapters/index.d.ts +8 -0
- package/dist/runner/adapters/index.d.ts.map +1 -0
- package/dist/runner/adapters/index.js +15 -0
- package/dist/runner/adapters/recipe-run-profile.d.ts +8 -0
- package/dist/runner/adapters/recipe-run-profile.d.ts.map +1 -0
- package/dist/runner/adapters/recipe-run-profile.js +53 -0
- package/dist/runner/adapters/shared.d.ts +45 -0
- package/dist/runner/adapters/shared.d.ts.map +1 -0
- package/dist/runner/adapters/shared.js +58 -0
- package/dist/runner/artifacts.d.ts +31 -0
- package/dist/runner/artifacts.d.ts.map +1 -0
- package/dist/runner/artifacts.js +153 -0
- package/dist/runner/codex-approval-probe.d.ts +23 -0
- package/dist/runner/codex-approval-probe.d.ts.map +1 -0
- package/dist/runner/codex-approval-probe.js +55 -0
- package/dist/runner/codex-smoke.d.ts +11 -0
- package/dist/runner/codex-smoke.d.ts.map +1 -0
- package/dist/runner/codex-smoke.js +45 -0
- package/dist/runner/config.d.ts +6 -0
- package/dist/runner/config.d.ts.map +1 -0
- package/dist/runner/config.js +15 -0
- package/dist/runner/context/base-prompts.d.ts +10 -0
- package/dist/runner/context/base-prompts.d.ts.map +1 -0
- package/dist/runner/context/base-prompts.js +255 -0
- package/dist/runner/context/recipe-context.d.ts +17 -0
- package/dist/runner/context/recipe-context.d.ts.map +1 -0
- package/dist/runner/context/recipe-context.js +48 -0
- package/dist/runner/context/task-context.d.ts +24 -0
- package/dist/runner/context/task-context.d.ts.map +1 -0
- package/dist/runner/context/task-context.js +266 -0
- package/dist/runner/index.d.ts +12 -0
- package/dist/runner/index.d.ts.map +1 -0
- package/dist/runner/index.js +11 -0
- package/dist/runner/policy-decision.d.ts +12 -0
- package/dist/runner/policy-decision.d.ts.map +1 -0
- package/dist/runner/policy-decision.js +89 -0
- package/dist/runner/policy-display.d.ts +4 -0
- package/dist/runner/policy-display.d.ts.map +1 -0
- package/dist/runner/policy-display.js +41 -0
- package/dist/runner/process-supervision.d.ts +48 -0
- package/dist/runner/process-supervision.d.ts.map +1 -0
- package/dist/runner/process-supervision.js +490 -0
- package/dist/runner/result-manifest-policy.d.ts +9 -0
- package/dist/runner/result-manifest-policy.d.ts.map +1 -0
- package/dist/runner/result-manifest-policy.js +96 -0
- package/dist/runner/result-manifest.d.ts +30 -0
- package/dist/runner/result-manifest.d.ts.map +1 -0
- package/dist/runner/result-manifest.js +322 -0
- package/dist/runner/run-id.d.ts +2 -0
- package/dist/runner/run-id.d.ts.map +1 -0
- package/dist/runner/run-id.js +3 -0
- package/dist/runner/run-repository.d.ts +51 -0
- package/dist/runner/run-repository.d.ts.map +1 -0
- package/dist/runner/run-repository.js +222 -0
- package/dist/runner/task-run-paths.d.ts +19 -0
- package/dist/runner/task-run-paths.d.ts.map +1 -0
- package/dist/runner/task-run-paths.js +25 -0
- package/dist/runner/task-state.d.ts +9 -0
- package/dist/runner/task-state.d.ts.map +1 -0
- package/dist/runner/task-state.js +354 -0
- package/dist/runner/test-helpers.d.ts +30 -0
- package/dist/runner/test-helpers.d.ts.map +1 -0
- package/dist/runner/test-helpers.js +97 -0
- package/dist/runner/trace-artifacts.d.ts +14 -0
- package/dist/runner/trace-artifacts.d.ts.map +1 -0
- package/dist/runner/trace-artifacts.js +80 -0
- package/dist/runner/trace.d.ts +10 -0
- package/dist/runner/trace.d.ts.map +1 -0
- package/dist/runner/trace.js +37 -0
- package/dist/runner/types.d.ts +317 -0
- package/dist/runner/types.d.ts.map +1 -0
- package/dist/runner/types.js +3 -0
- package/dist/runner/usecases/scenario-materialize-task.d.ts +29 -0
- package/dist/runner/usecases/scenario-materialize-task.d.ts.map +1 -0
- package/dist/runner/usecases/scenario-materialize-task.js +151 -0
- package/dist/runner/usecases/task-run-inspect.d.ts +41 -0
- package/dist/runner/usecases/task-run-inspect.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-inspect.js +74 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.d.ts +10 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.js +172 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.d.ts +18 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.js +128 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.d.ts +45 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.js +172 -0
- package/dist/runner/usecases/task-run-lifecycle.d.ts +4 -0
- package/dist/runner/usecases/task-run-lifecycle.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle.js +2 -0
- package/dist/runner/usecases/task-run.d.ts +32 -0
- package/dist/runner/usecases/task-run.d.ts.map +1 -0
- package/dist/runner/usecases/task-run.js +278 -0
- package/dist/shared/agent-emoji.d.ts.map +1 -1
- package/dist/shared/agent-emoji.js +1 -0
- package/dist/shared/errors.d.ts +1 -1
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/guards.d.ts.map +1 -1
- package/dist/shared/guards.js +1 -0
- package/dist/shared/repo-cli-version.d.ts.map +1 -1
- package/dist/shared/repo-cli-version.js +7 -5
- package/dist/shared/task-doc-conflicts.d.ts +12 -0
- package/dist/shared/task-doc-conflicts.d.ts.map +1 -0
- package/dist/shared/task-doc-conflicts.js +40 -0
- package/dist/shared/task-doc-state.d.ts +10 -0
- package/dist/shared/task-doc-state.d.ts.map +1 -0
- package/dist/shared/task-doc-state.js +15 -0
- package/dist/test-helpers/fs.d.ts +2 -0
- package/dist/test-helpers/fs.d.ts.map +1 -0
- package/dist/test-helpers/fs.js +9 -0
- package/dist/usecases/context/resolve-context.d.ts +2 -0
- package/dist/usecases/context/resolve-context.d.ts.map +1 -1
- package/dist/usecases/context/resolve-context.js +4 -1
- package/dist/usecases/task/task-list-usecase.d.ts.map +1 -1
- package/dist/usecases/task/task-list-usecase.js +2 -8
- package/dist/workflow-runtime/fix.d.ts +9 -1
- package/dist/workflow-runtime/fix.d.ts.map +1 -1
- package/dist/workflow-runtime/fix.js +9 -1
- package/package.json +3 -2
- package/dist/backends/task-backend.test-helpers.d.ts +0 -4
- package/dist/backends/task-backend.test-helpers.d.ts.map +0 -1
- package/dist/backends/task-backend.test-helpers.js +0 -33
- package/dist/cli/run-cli/catalog.d.ts +0 -7
- package/dist/cli/run-cli/catalog.d.ts.map +0 -1
- package/dist/cli/run-cli/catalog.js +0 -22
- package/dist/cli/run-cli.core.pr-flow.test-helpers.d.ts +0 -3
- package/dist/cli/run-cli.core.pr-flow.test-helpers.d.ts.map +0 -1
- package/dist/cli/run-cli.core.pr-flow.test-helpers.js +0 -41
- package/dist/cli/run-cli.core.tasks.test-helpers.d.ts +0 -2
- package/dist/cli/run-cli.core.tasks.test-helpers.d.ts.map +0 -1
- package/dist/cli/run-cli.core.tasks.test-helpers.js +0 -6
- package/dist/commands/block.command.d.ts +0 -4
- package/dist/commands/block.command.d.ts.map +0 -1
- package/dist/commands/block.command.js +0 -2
- package/dist/commands/doctor.command.d.ts +0 -3
- package/dist/commands/doctor.command.d.ts.map +0 -1
- package/dist/commands/doctor.command.js +0 -2
- package/dist/commands/finish.command.d.ts +0 -4
- package/dist/commands/finish.command.d.ts.map +0 -1
- package/dist/commands/finish.command.js +0 -2
- package/dist/commands/recipes/install.command.d.ts +0 -3
- package/dist/commands/recipes/install.command.d.ts.map +0 -1
- package/dist/commands/recipes/install.command.js +0 -2
- package/dist/commands/start.command.d.ts +0 -4
- package/dist/commands/start.command.d.ts.map +0 -1
- package/dist/commands/start.command.js +0 -2
- package/dist/commands/task/list.command.d.ts +0 -4
- package/dist/commands/task/list.command.d.ts.map +0 -1
- package/dist/commands/task/list.command.js +0 -2
- package/dist/commands/task/next.command.d.ts +0 -4
- package/dist/commands/task/next.command.d.ts.map +0 -1
- package/dist/commands/task/next.command.js +0 -2
- package/dist/commands/task/search.command.d.ts +0 -4
- package/dist/commands/task/search.command.d.ts.map +0 -1
- package/dist/commands/task/search.command.js +0 -2
- package/dist/commands/task/show.command.d.ts +0 -4
- package/dist/commands/task/show.command.d.ts.map +0 -1
- package/dist/commands/task/show.command.js +0 -2
- package/dist/commands/verify.command.d.ts +0 -4
- package/dist/commands/verify.command.d.ts.map +0 -1
- package/dist/commands/verify.command.js +0 -2
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defaultConfig } from "@agentplaneorg/core";
|
|
2
|
+
import { GitContext } from "./shared/git-context.js";
|
|
3
|
+
export function makeTaskFixture(overrides = {}) {
|
|
4
|
+
return {
|
|
5
|
+
id: "T-1",
|
|
6
|
+
title: "Title",
|
|
7
|
+
description: "Desc",
|
|
8
|
+
status: "TODO",
|
|
9
|
+
priority: "normal",
|
|
10
|
+
owner: "CODER",
|
|
11
|
+
depends_on: [],
|
|
12
|
+
tags: [],
|
|
13
|
+
verify: [],
|
|
14
|
+
comments: [],
|
|
15
|
+
events: [],
|
|
16
|
+
doc_version: 3,
|
|
17
|
+
doc_updated_by: "CODER",
|
|
18
|
+
...overrides,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export function makeTaskBackendDouble(overrides = {}) {
|
|
22
|
+
return {
|
|
23
|
+
id: "mock",
|
|
24
|
+
capabilities: {
|
|
25
|
+
canonical_source: "local",
|
|
26
|
+
projection: "canonical",
|
|
27
|
+
projection_read_mode: "fallback",
|
|
28
|
+
reads_from_projection_by_default: false,
|
|
29
|
+
supports_task_revisions: true,
|
|
30
|
+
supports_revision_guarded_writes: true,
|
|
31
|
+
may_access_network_on_read: false,
|
|
32
|
+
may_access_network_on_write: false,
|
|
33
|
+
supports_projection_refresh: false,
|
|
34
|
+
supports_push_sync: false,
|
|
35
|
+
supports_snapshot_export: false,
|
|
36
|
+
},
|
|
37
|
+
listTasks: () => Promise.resolve([]),
|
|
38
|
+
getTask: () => Promise.resolve(null),
|
|
39
|
+
writeTask: () => Promise.resolve(),
|
|
40
|
+
getTaskDoc: () => Promise.resolve(""),
|
|
41
|
+
setTaskDoc: () => Promise.resolve(),
|
|
42
|
+
...overrides,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export function makeTaskCommandContext(opts = {}) {
|
|
46
|
+
const config = defaultConfig();
|
|
47
|
+
config.paths.workflow_dir = ".agentplane/tasks";
|
|
48
|
+
opts.configureConfig?.(config);
|
|
49
|
+
const resolved = opts.resolvedProject ??
|
|
50
|
+
{
|
|
51
|
+
gitRoot: "/repo",
|
|
52
|
+
agentplaneDir: "/repo/.agentplane",
|
|
53
|
+
};
|
|
54
|
+
const backend = opts.taskBackend ?? makeTaskBackendDouble();
|
|
55
|
+
const ctx = {
|
|
56
|
+
resolvedProject: resolved,
|
|
57
|
+
config,
|
|
58
|
+
taskBackend: backend,
|
|
59
|
+
backendId: backend.id,
|
|
60
|
+
backendConfigPath: "/repo/.agentplane/backends/local/backend.json",
|
|
61
|
+
git: opts.git ?? new GitContext({ gitRoot: resolved.gitRoot }),
|
|
62
|
+
memo: {},
|
|
63
|
+
};
|
|
64
|
+
return { ...ctx, ...opts.overrides };
|
|
65
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { FrameworkManifest } from "./types.js";
|
|
2
|
+
type MaterializeFlags = {
|
|
3
|
+
source?: string;
|
|
4
|
+
tag?: string;
|
|
5
|
+
bundle?: string;
|
|
6
|
+
checksum?: string;
|
|
7
|
+
asset?: string;
|
|
8
|
+
checksumAsset?: string;
|
|
9
|
+
remote: boolean;
|
|
10
|
+
allowTarball: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type MaterializedUpgrade = {
|
|
13
|
+
tempRoot: string;
|
|
14
|
+
extractRoot: string | null;
|
|
15
|
+
bundleLayout: "local_assets" | "upgrade_bundle" | "repo_tarball";
|
|
16
|
+
bundleRoot: string;
|
|
17
|
+
manifest: FrameworkManifest;
|
|
18
|
+
normalizedSourceToPersist: string | null;
|
|
19
|
+
upgradeVersionLabel: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function materializeUpgradeSource(opts: {
|
|
22
|
+
flags: MaterializeFlags;
|
|
23
|
+
frameworkSource: string;
|
|
24
|
+
assetsDirUrl: URL;
|
|
25
|
+
ensureApproved: (reason: string) => Promise<void>;
|
|
26
|
+
}): Promise<MaterializedUpgrade>;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=materialize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"materialize.d.ts","sourceRoot":"","sources":["../../../src/commands/upgrade/materialize.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,YAAY,CAAC;AAOnE,KAAK,gBAAgB,GAAG;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,cAAc,GAAG,gBAAgB,GAAG,cAAc,CAAC;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IACnD,KAAK,EAAE,gBAAgB,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,GAAG,CAAC;IAClB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAkK/B"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { mkdtemp, readFile } from "node:fs/promises";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { downloadToFile, fetchJson } from "../../cli/http.js";
|
|
6
|
+
import { parseSha256Text, sha256File } from "../../cli/checksum.js";
|
|
7
|
+
import { extractArchive } from "../../cli/archive.js";
|
|
8
|
+
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
9
|
+
import { warnMessage } from "../../cli/output.js";
|
|
10
|
+
import { getVersion } from "../../meta/version.js";
|
|
11
|
+
import { CliError } from "../../shared/errors.js";
|
|
12
|
+
import { normalizeUpgradeVersionLabel } from "./policy.js";
|
|
13
|
+
import { loadFrameworkManifestFromPath, normalizeFrameworkSourceForUpgrade, resolveRepoTarballUrl, resolveUpgradeDownloadFromRelease, resolveUpgradeRoot, } from "./source.js";
|
|
14
|
+
const DEFAULT_UPGRADE_ASSET = "agentplane-upgrade.tar.gz";
|
|
15
|
+
const DEFAULT_UPGRADE_CHECKSUM_ASSET = "agentplane-upgrade.tar.gz.sha256";
|
|
16
|
+
const UPGRADE_DOWNLOAD_TIMEOUT_MS = 60_000;
|
|
17
|
+
const UPGRADE_RELEASE_METADATA_TIMEOUT_MS = 15_000;
|
|
18
|
+
export async function materializeUpgradeSource(opts) {
|
|
19
|
+
const { flags } = opts;
|
|
20
|
+
const hasBundle = Boolean(flags.bundle);
|
|
21
|
+
const hasRemoteHints = Boolean(flags.source) ||
|
|
22
|
+
Boolean(flags.tag) ||
|
|
23
|
+
Boolean(flags.asset) ||
|
|
24
|
+
Boolean(flags.checksumAsset);
|
|
25
|
+
const useRemote = flags.remote === true || hasRemoteHints;
|
|
26
|
+
const tempRoot = await mkdtemp(path.join(os.tmpdir(), "agentplane-upgrade-"));
|
|
27
|
+
let extractRoot = null;
|
|
28
|
+
let bundleLayout = "upgrade_bundle";
|
|
29
|
+
let bundleRoot = "";
|
|
30
|
+
let normalizedSourceToPersist = null;
|
|
31
|
+
let upgradeVersionLabel = normalizeUpgradeVersionLabel(getVersion());
|
|
32
|
+
let manifestPath = "";
|
|
33
|
+
if (!hasBundle && !useRemote) {
|
|
34
|
+
bundleLayout = "local_assets";
|
|
35
|
+
bundleRoot = fileURLToPath(opts.assetsDirUrl);
|
|
36
|
+
manifestPath = fileURLToPath(new URL("../../../assets/framework.manifest.json", import.meta.url));
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
let bundlePath = "";
|
|
40
|
+
let checksumPath = "";
|
|
41
|
+
if (flags.bundle) {
|
|
42
|
+
const bundleIsUrl = flags.bundle.startsWith("http://") || flags.bundle.startsWith("https://");
|
|
43
|
+
bundlePath = bundleIsUrl ? path.join(tempRoot, "bundle.tar.gz") : path.resolve(flags.bundle);
|
|
44
|
+
if (bundleIsUrl) {
|
|
45
|
+
await opts.ensureApproved("upgrade downloads the bundle/checksum from the network");
|
|
46
|
+
await downloadToFile(flags.bundle, bundlePath, UPGRADE_DOWNLOAD_TIMEOUT_MS);
|
|
47
|
+
}
|
|
48
|
+
const checksumValue = flags.checksum ?? "";
|
|
49
|
+
const checksumIsUrl = checksumValue.startsWith("http://") || checksumValue.startsWith("https://");
|
|
50
|
+
checksumPath = checksumIsUrl
|
|
51
|
+
? path.join(tempRoot, "bundle.tar.gz.sha256")
|
|
52
|
+
: path.resolve(checksumValue);
|
|
53
|
+
if (checksumIsUrl) {
|
|
54
|
+
await opts.ensureApproved("upgrade downloads the bundle/checksum from the network");
|
|
55
|
+
await downloadToFile(checksumValue, checksumPath, UPGRADE_DOWNLOAD_TIMEOUT_MS);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
const sourceFromFlags = typeof flags.source === "string" && flags.source.trim().length > 0;
|
|
60
|
+
const originalSource = flags.source ?? opts.frameworkSource;
|
|
61
|
+
const normalized = normalizeFrameworkSourceForUpgrade(originalSource);
|
|
62
|
+
if (!sourceFromFlags && normalized.migrated) {
|
|
63
|
+
normalizedSourceToPersist = normalized.source;
|
|
64
|
+
}
|
|
65
|
+
if (normalized.migrated) {
|
|
66
|
+
process.stderr.write(`${warnMessage(`config.framework.source uses deprecated repo basilisk-labs/agent-plane; using ${normalized.source}`)}\n`);
|
|
67
|
+
}
|
|
68
|
+
const releaseUrl = flags.tag
|
|
69
|
+
? `https://api.github.com/repos/${normalized.owner}/${normalized.repo}/releases/tags/${flags.tag}`
|
|
70
|
+
: `https://api.github.com/repos/${normalized.owner}/${normalized.repo}/releases/latest`;
|
|
71
|
+
await opts.ensureApproved("upgrade fetches release metadata and downloads assets from the network");
|
|
72
|
+
const release = (await fetchJson(releaseUrl, UPGRADE_RELEASE_METADATA_TIMEOUT_MS));
|
|
73
|
+
const releaseTag = (typeof release.tag_name === "string" && release.tag_name.trim()) ||
|
|
74
|
+
(typeof flags.tag === "string" && flags.tag.trim()) ||
|
|
75
|
+
"";
|
|
76
|
+
if (releaseTag) {
|
|
77
|
+
upgradeVersionLabel = normalizeUpgradeVersionLabel(releaseTag);
|
|
78
|
+
}
|
|
79
|
+
const download = resolveUpgradeDownloadFromRelease({
|
|
80
|
+
release,
|
|
81
|
+
owner: normalized.owner,
|
|
82
|
+
repo: normalized.repo,
|
|
83
|
+
assetName: flags.asset ?? DEFAULT_UPGRADE_ASSET,
|
|
84
|
+
checksumName: flags.checksumAsset ?? DEFAULT_UPGRADE_CHECKSUM_ASSET,
|
|
85
|
+
});
|
|
86
|
+
if (download.kind === "assets") {
|
|
87
|
+
bundlePath = path.join(tempRoot, flags.asset ?? DEFAULT_UPGRADE_ASSET);
|
|
88
|
+
checksumPath = path.join(tempRoot, flags.checksumAsset ?? DEFAULT_UPGRADE_CHECKSUM_ASSET);
|
|
89
|
+
await downloadToFile(download.bundleUrl, bundlePath, UPGRADE_DOWNLOAD_TIMEOUT_MS);
|
|
90
|
+
await downloadToFile(download.checksumUrl, checksumPath, UPGRADE_DOWNLOAD_TIMEOUT_MS);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
if (!flags.allowTarball) {
|
|
94
|
+
throw new CliError({
|
|
95
|
+
exitCode: exitCodeForError("E_NETWORK"),
|
|
96
|
+
code: "E_NETWORK",
|
|
97
|
+
message: `Upgrade assets ${flags.asset ?? DEFAULT_UPGRADE_ASSET}/${flags.checksumAsset ?? DEFAULT_UPGRADE_CHECKSUM_ASSET} not found in ${normalized.owner}/${normalized.repo} release. ` +
|
|
98
|
+
"Publish the upgrade bundle assets, or re-run with --allow-tarball to download a repo tarball (no checksum verification).",
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
process.stderr.write(`${warnMessage(`upgrade release does not include ${flags.asset ?? DEFAULT_UPGRADE_ASSET}/${flags.checksumAsset ?? DEFAULT_UPGRADE_CHECKSUM_ASSET}; falling back to repo tarball without checksum verification`)}\n`);
|
|
102
|
+
bundleLayout = "repo_tarball";
|
|
103
|
+
bundlePath = path.join(tempRoot, "source.tar.gz");
|
|
104
|
+
const tarballUrl = resolveRepoTarballUrl({
|
|
105
|
+
release,
|
|
106
|
+
owner: normalized.owner,
|
|
107
|
+
repo: normalized.repo,
|
|
108
|
+
explicitTag: flags.tag,
|
|
109
|
+
});
|
|
110
|
+
await downloadToFile(tarballUrl, bundlePath, UPGRADE_DOWNLOAD_TIMEOUT_MS);
|
|
111
|
+
checksumPath = "";
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (checksumPath) {
|
|
115
|
+
const expected = parseSha256Text(await readFile(checksumPath, "utf8"));
|
|
116
|
+
if (!expected) {
|
|
117
|
+
throw new CliError({
|
|
118
|
+
exitCode: 3,
|
|
119
|
+
code: "E_VALIDATION",
|
|
120
|
+
message: "Upgrade checksum file is empty or invalid",
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
const actual = await sha256File(bundlePath);
|
|
124
|
+
if (actual !== expected) {
|
|
125
|
+
throw new CliError({
|
|
126
|
+
exitCode: 3,
|
|
127
|
+
code: "E_VALIDATION",
|
|
128
|
+
message: `Upgrade checksum mismatch (expected ${expected}, got ${actual})`,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
extractRoot = await mkdtemp(path.join(os.tmpdir(), "agentplane-upgrade-extract-"));
|
|
133
|
+
await extractArchive({
|
|
134
|
+
archivePath: bundlePath,
|
|
135
|
+
destDir: extractRoot,
|
|
136
|
+
});
|
|
137
|
+
const extractedRoot = await resolveUpgradeRoot(extractRoot);
|
|
138
|
+
bundleRoot =
|
|
139
|
+
bundleLayout === "repo_tarball"
|
|
140
|
+
? path.join(extractedRoot, "packages", "agentplane", "assets")
|
|
141
|
+
: extractedRoot;
|
|
142
|
+
manifestPath = path.join(bundleRoot, "framework.manifest.json");
|
|
143
|
+
}
|
|
144
|
+
const manifest = await loadFrameworkManifestFromPath(manifestPath);
|
|
145
|
+
return {
|
|
146
|
+
tempRoot,
|
|
147
|
+
extractRoot,
|
|
148
|
+
bundleLayout,
|
|
149
|
+
bundleRoot,
|
|
150
|
+
manifest,
|
|
151
|
+
normalizedSourceToPersist,
|
|
152
|
+
upgradeVersionLabel,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FrameworkManifest, UpgradeReviewRecord } from "./types.js";
|
|
2
|
+
export type ManagedUpgradePlan = {
|
|
3
|
+
additions: string[];
|
|
4
|
+
updates: string[];
|
|
5
|
+
skipped: string[];
|
|
6
|
+
merged: string[];
|
|
7
|
+
fileContents: Map<string, Buffer>;
|
|
8
|
+
reviewRecords: UpgradeReviewRecord[];
|
|
9
|
+
incidentsAppendedCount: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function planManagedUpgrade(opts: {
|
|
12
|
+
gitRoot: string;
|
|
13
|
+
manifest: FrameworkManifest;
|
|
14
|
+
bundleRoot: string;
|
|
15
|
+
baselineDirNew: string;
|
|
16
|
+
baselineDirLegacy: string;
|
|
17
|
+
}): Promise<ManagedUpgradePlan>;
|
|
18
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/commands/upgrade/plan.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,aAAa,EAAE,mBAAmB,EAAE,CAAC;IACrC,sBAAsB,EAAE,MAAM,CAAC;CAChC,CAAC;AAwBF,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA6M9B"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileExists, getPathKind } from "../../cli/fs-utils.js";
|
|
4
|
+
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
5
|
+
import { CliError } from "../../shared/errors.js";
|
|
6
|
+
import { INCIDENTS_POLICY_PATH, isAllowedUpgradePath, isDeniedUpgradePath, mergeIncidentsPolicy, textChangedForType, toUpgradeBaselineKey, } from "./policy.js";
|
|
7
|
+
async function readUpgradeBaseline(opts) {
|
|
8
|
+
try {
|
|
9
|
+
return await readFile(path.join(opts.baselineDirNew, opts.baselineKey), "utf8");
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
try {
|
|
13
|
+
return await readFile(path.join(opts.baselineDirLegacy, opts.baselineKey), "utf8");
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
async function resolvePolicyGatewayRel(gitRoot) {
|
|
21
|
+
if (await fileExists(path.join(gitRoot, "AGENTS.md")))
|
|
22
|
+
return "AGENTS.md";
|
|
23
|
+
if (await fileExists(path.join(gitRoot, "CLAUDE.md")))
|
|
24
|
+
return "CLAUDE.md";
|
|
25
|
+
return "AGENTS.md";
|
|
26
|
+
}
|
|
27
|
+
export async function planManagedUpgrade(opts) {
|
|
28
|
+
const additions = [];
|
|
29
|
+
const updates = [];
|
|
30
|
+
const skipped = [];
|
|
31
|
+
const merged = [];
|
|
32
|
+
const fileContents = new Map();
|
|
33
|
+
const missingRequired = [];
|
|
34
|
+
const reviewRecords = [];
|
|
35
|
+
let incidentsAppendedCount = 0;
|
|
36
|
+
const policyGatewayRel = await resolvePolicyGatewayRel(opts.gitRoot);
|
|
37
|
+
const remapManagedGatewayRel = (rel) => {
|
|
38
|
+
if (rel === "AGENTS.md" && policyGatewayRel === "CLAUDE.md")
|
|
39
|
+
return "CLAUDE.md";
|
|
40
|
+
return rel;
|
|
41
|
+
};
|
|
42
|
+
for (const entry of opts.manifest.files) {
|
|
43
|
+
const relRaw = entry.path.replaceAll("\\", "/").trim();
|
|
44
|
+
if (!relRaw || relRaw.startsWith("..") || path.isAbsolute(relRaw)) {
|
|
45
|
+
throw new CliError({
|
|
46
|
+
exitCode: 3,
|
|
47
|
+
code: "E_VALIDATION",
|
|
48
|
+
message: `Invalid manifest path: ${entry.path}`,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
if (isDeniedUpgradePath(relRaw)) {
|
|
52
|
+
throw new CliError({
|
|
53
|
+
exitCode: 3,
|
|
54
|
+
code: "E_VALIDATION",
|
|
55
|
+
message: `Manifest includes a denied path: ${relRaw}`,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
if (!isAllowedUpgradePath(relRaw)) {
|
|
59
|
+
throw new CliError({
|
|
60
|
+
exitCode: 3,
|
|
61
|
+
code: "E_VALIDATION",
|
|
62
|
+
message: `Manifest path not allowed: ${relRaw}`,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
const rel = remapManagedGatewayRel(relRaw);
|
|
66
|
+
const destPath = path.join(opts.gitRoot, rel);
|
|
67
|
+
const kind = await getPathKind(destPath);
|
|
68
|
+
if (kind === "dir") {
|
|
69
|
+
throw new CliError({
|
|
70
|
+
exitCode: exitCodeForError("E_IO"),
|
|
71
|
+
code: "E_IO",
|
|
72
|
+
message: `Upgrade target is a directory: ${rel}`,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
const sourceRelRaw = (entry.source_path ?? entry.path).replaceAll("\\", "/").trim();
|
|
76
|
+
const mappedSourceRel = rel === "CLAUDE.md" && sourceRelRaw === "AGENTS.md" ? "CLAUDE.md" : sourceRelRaw;
|
|
77
|
+
const sourceCandidates = [...new Set([mappedSourceRel, sourceRelRaw])];
|
|
78
|
+
let incomingData = null;
|
|
79
|
+
for (const candidate of sourceCandidates) {
|
|
80
|
+
try {
|
|
81
|
+
incomingData = await readFile(path.join(opts.bundleRoot, candidate));
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
// try next candidate
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (!incomingData) {
|
|
89
|
+
if (entry.required)
|
|
90
|
+
missingRequired.push(rel);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
let existingBuf = null;
|
|
94
|
+
if (kind !== null) {
|
|
95
|
+
existingBuf = await readFile(destPath);
|
|
96
|
+
}
|
|
97
|
+
const incomingTextOriginal = incomingData.toString("utf8");
|
|
98
|
+
const currentTextForReview = existingBuf ? existingBuf.toString("utf8") : null;
|
|
99
|
+
const baselineKey = toUpgradeBaselineKey(rel);
|
|
100
|
+
const baselineText = baselineKey
|
|
101
|
+
? await readUpgradeBaseline({
|
|
102
|
+
baselineDirNew: opts.baselineDirNew,
|
|
103
|
+
baselineDirLegacy: opts.baselineDirLegacy,
|
|
104
|
+
baselineKey,
|
|
105
|
+
})
|
|
106
|
+
: null;
|
|
107
|
+
const hasBaseline = baselineText !== null;
|
|
108
|
+
const changedCurrentVsBaseline = hasBaseline && currentTextForReview !== null
|
|
109
|
+
? textChangedForType({
|
|
110
|
+
type: entry.type,
|
|
111
|
+
aText: currentTextForReview,
|
|
112
|
+
bText: baselineText,
|
|
113
|
+
})
|
|
114
|
+
: null;
|
|
115
|
+
const changedIncomingVsBaseline = hasBaseline
|
|
116
|
+
? textChangedForType({
|
|
117
|
+
type: entry.type,
|
|
118
|
+
aText: incomingTextOriginal,
|
|
119
|
+
bText: baselineText,
|
|
120
|
+
})
|
|
121
|
+
: null;
|
|
122
|
+
const currentAndIncomingEqual = currentTextForReview === null
|
|
123
|
+
? false
|
|
124
|
+
: textChangedForType({
|
|
125
|
+
type: entry.type,
|
|
126
|
+
aText: currentTextForReview,
|
|
127
|
+
bText: incomingTextOriginal,
|
|
128
|
+
}) === false;
|
|
129
|
+
if (currentTextForReview !== null && currentAndIncomingEqual) {
|
|
130
|
+
skipped.push(rel);
|
|
131
|
+
reviewRecords.push({
|
|
132
|
+
relPath: rel,
|
|
133
|
+
mergeStrategy: entry.merge_strategy,
|
|
134
|
+
hasBaseline,
|
|
135
|
+
changedCurrentVsBaseline,
|
|
136
|
+
changedIncomingVsBaseline,
|
|
137
|
+
currentDiffersFromIncoming: false,
|
|
138
|
+
needsSemanticReview: false,
|
|
139
|
+
mergeApplied: false,
|
|
140
|
+
mergePath: "none",
|
|
141
|
+
});
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
if (currentTextForReview !== null && changedCurrentVsBaseline === false) {
|
|
145
|
+
updates.push(rel);
|
|
146
|
+
fileContents.set(rel, incomingData);
|
|
147
|
+
reviewRecords.push({
|
|
148
|
+
relPath: rel,
|
|
149
|
+
mergeStrategy: entry.merge_strategy,
|
|
150
|
+
hasBaseline,
|
|
151
|
+
changedCurrentVsBaseline,
|
|
152
|
+
changedIncomingVsBaseline,
|
|
153
|
+
currentDiffersFromIncoming: true,
|
|
154
|
+
needsSemanticReview: false,
|
|
155
|
+
mergeApplied: false,
|
|
156
|
+
mergePath: "none",
|
|
157
|
+
});
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
let mergeApplied = false;
|
|
161
|
+
let mergePath = "none";
|
|
162
|
+
let nextData = incomingData;
|
|
163
|
+
if (existingBuf && rel === INCIDENTS_POLICY_PATH) {
|
|
164
|
+
const mergedIncidents = mergeIncidentsPolicy({
|
|
165
|
+
incomingText: incomingData.toString("utf8"),
|
|
166
|
+
currentText: existingBuf.toString("utf8"),
|
|
167
|
+
baselineText,
|
|
168
|
+
});
|
|
169
|
+
nextData = Buffer.from(mergedIncidents.nextText, "utf8");
|
|
170
|
+
if (mergedIncidents.appended) {
|
|
171
|
+
merged.push(rel);
|
|
172
|
+
mergeApplied = true;
|
|
173
|
+
mergePath = "incidentsAppend";
|
|
174
|
+
incidentsAppendedCount += mergedIncidents.appendedCount;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
const currentDiffersFromIncoming = currentTextForReview === null
|
|
178
|
+
? false
|
|
179
|
+
: textChangedForType({
|
|
180
|
+
type: entry.type,
|
|
181
|
+
aText: currentTextForReview,
|
|
182
|
+
bText: incomingTextOriginal,
|
|
183
|
+
});
|
|
184
|
+
reviewRecords.push({
|
|
185
|
+
relPath: rel,
|
|
186
|
+
mergeStrategy: entry.merge_strategy,
|
|
187
|
+
hasBaseline,
|
|
188
|
+
changedCurrentVsBaseline,
|
|
189
|
+
changedIncomingVsBaseline,
|
|
190
|
+
currentDiffersFromIncoming,
|
|
191
|
+
needsSemanticReview: false,
|
|
192
|
+
mergeApplied,
|
|
193
|
+
mergePath,
|
|
194
|
+
});
|
|
195
|
+
fileContents.set(rel, nextData);
|
|
196
|
+
if (kind === null)
|
|
197
|
+
additions.push(rel);
|
|
198
|
+
else if (existingBuf && Buffer.compare(existingBuf, nextData) === 0)
|
|
199
|
+
skipped.push(rel);
|
|
200
|
+
else
|
|
201
|
+
updates.push(rel);
|
|
202
|
+
}
|
|
203
|
+
if (missingRequired.length > 0) {
|
|
204
|
+
throw new CliError({
|
|
205
|
+
exitCode: 3,
|
|
206
|
+
code: "E_VALIDATION",
|
|
207
|
+
message: `Upgrade bundle is missing required managed files: ${missingRequired.join(", ")}`,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
additions,
|
|
212
|
+
updates,
|
|
213
|
+
skipped,
|
|
214
|
+
merged,
|
|
215
|
+
fileContents,
|
|
216
|
+
reviewRecords,
|
|
217
|
+
incidentsAppendedCount,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { FrameworkManifestEntry } from "./types.js";
|
|
2
|
+
export declare const INCIDENTS_POLICY_PATH = ".agentplane/policy/incidents.md";
|
|
3
|
+
export declare const INCIDENTS_APPEND_MARKER = "<!-- AGENTPLANE:UPGRADE-APPEND incidents.md -->";
|
|
4
|
+
export declare const CONFIG_REL_PATH = ".agentplane/config.json";
|
|
5
|
+
export declare function isDeniedUpgradePath(relPath: string): boolean;
|
|
6
|
+
export declare function isAllowedUpgradePath(relPath: string): boolean;
|
|
7
|
+
export declare function textChangedForType(opts: {
|
|
8
|
+
type: FrameworkManifestEntry["type"];
|
|
9
|
+
aText: string | null;
|
|
10
|
+
bText: string | null;
|
|
11
|
+
}): boolean;
|
|
12
|
+
export declare function mergeIncidentsPolicy(opts: {
|
|
13
|
+
incomingText: string;
|
|
14
|
+
currentText: string;
|
|
15
|
+
baselineText: string | null;
|
|
16
|
+
}): {
|
|
17
|
+
nextText: string;
|
|
18
|
+
appended: boolean;
|
|
19
|
+
appendedCount: number;
|
|
20
|
+
};
|
|
21
|
+
export declare function normalizeUpgradeVersionLabel(input: string): string;
|
|
22
|
+
export declare function normalizeVersionForConfig(input: string): string | null;
|
|
23
|
+
export declare function toUpgradeBaselineKey(rel: string): string | null;
|
|
24
|
+
//# sourceMappingURL=policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../src/commands/upgrade/policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AACvE,eAAO,MAAM,uBAAuB,oDAAoD,CAAC;AACzF,eAAO,MAAM,eAAe,4BAA4B,CAAC;AAEzD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAU5D;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAc7D;AAwBD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACrC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,GAAG,OAAO,CAaV;AAqDD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,GAAG;IACF,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CAiDA;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKlE;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGtE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK/D"}
|