agentplane 0.3.16 → 0.3.18
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 +1 -0
- package/dist/.build-manifest.json +798 -603
- package/dist/adapters/git/git-context-adapter.d.ts +1 -1
- package/dist/adapters/git/git-context-adapter.d.ts.map +1 -1
- package/dist/agents/agents-template.d.ts.map +1 -1
- package/dist/agents/agents-template.js +23 -9
- package/dist/backends/task-backend/load.d.ts +2 -1
- package/dist/backends/task-backend/load.d.ts.map +1 -1
- package/dist/backends/task-backend/load.js +2 -1
- package/dist/backends/task-backend/local-backend-doc.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend-doc.js +2 -1
- package/dist/backends/task-backend/local-backend-read.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend-read.js +2 -1
- package/dist/backends/task-backend/local-backend-state.d.ts +1 -1
- package/dist/backends/task-backend/local-backend-state.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend-write.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend-write.js +2 -1
- package/dist/backends/task-backend/redmine/backend-cache-doc.js +1 -1
- package/dist/backends/task-backend/redmine/backend-report.js +1 -1
- package/dist/backends/task-backend/redmine/backend-runtime.d.ts +4 -146
- package/dist/backends/task-backend/redmine/backend-runtime.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/backend-runtime.js +4 -258
- package/dist/backends/task-backend/redmine/backend-sync/migration.js +1 -1
- package/dist/backends/task-backend/redmine/backend-sync/status.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/backend-sync/status.js +2 -1
- package/dist/backends/task-backend/redmine/backend-sync/write.js +1 -1
- package/dist/backends/task-backend/redmine/mapping.d.ts +1 -1
- package/dist/backends/task-backend/redmine/mapping.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/mapping.js +3 -3
- package/dist/backends/task-backend/redmine/parse.d.ts +1 -1
- package/dist/backends/task-backend/redmine/parse.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/runtime-context.d.ts +98 -0
- package/dist/backends/task-backend/redmine/runtime-context.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/runtime-context.js +57 -0
- package/dist/backends/task-backend/redmine/runtime-methods.d.ts +33 -0
- package/dist/backends/task-backend/redmine/runtime-methods.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/runtime-methods.js +86 -0
- package/dist/backends/task-backend/redmine/runtime-operations.d.ts +19 -0
- package/dist/backends/task-backend/redmine/runtime-operations.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/runtime-operations.js +83 -0
- package/dist/backends/task-backend/redmine/runtime-state.d.ts +10 -0
- package/dist/backends/task-backend/redmine/runtime-state.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/runtime-state.js +45 -0
- package/dist/backends/task-backend/redmine/state.js +1 -1
- package/dist/backends/task-backend/shared/constants.d.ts +2 -2
- package/dist/backends/task-backend/shared/constants.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/constants.js +2 -2
- package/dist/backends/task-backend/shared/doc.js +1 -1
- package/dist/backends/task-backend/shared/export.d.ts +1 -1
- package/dist/backends/task-backend/shared/export.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/export.js +3 -14
- package/dist/backends/task-backend/shared/id.js +1 -1
- 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 +2 -3
- package/dist/backends/task-backend/shared/types.d.ts +2 -2
- package/dist/backends/task-backend/shared/types.d.ts.map +1 -1
- package/dist/backends/task-index.d.ts +0 -4
- package/dist/backends/task-index.d.ts.map +1 -1
- package/dist/backends/task-index.js +0 -33
- package/dist/cli/archive.d.ts.map +1 -1
- package/dist/cli/archive.js +1 -1
- 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 +1 -0
- package/dist/cli/group-command.d.ts.map +1 -1
- package/dist/cli/group-command.js +7 -3
- package/dist/cli/http.d.ts.map +1 -1
- package/dist/cli/http.js +34 -15
- package/dist/cli/output.d.ts +1 -1
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +1 -1
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +8 -6
- package/dist/cli/run-cli/command-catalog/core.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/core.js +8 -8
- package/dist/cli/run-cli/command-catalog/{shared.d.ts → kernel.d.ts} +3 -2
- package/dist/cli/run-cli/command-catalog/kernel.d.ts.map +1 -0
- package/dist/cli/run-cli/command-catalog/lifecycle.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/lifecycle.js +3 -3
- package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/project.js +4 -4
- package/dist/cli/run-cli/command-catalog/task.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/task.js +3 -3
- package/dist/cli/run-cli/command-catalog.d.ts +2 -2
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog.js +2 -0
- package/dist/cli/run-cli/command-loaders/core.d.ts +55 -0
- package/dist/cli/run-cli/command-loaders/core.d.ts.map +1 -0
- package/dist/cli/run-cli/command-loaders/core.js +27 -0
- package/dist/cli/run-cli/command-loaders/lifecycle.d.ts +19 -0
- package/dist/cli/run-cli/command-loaders/lifecycle.d.ts.map +1 -0
- package/dist/cli/run-cli/command-loaders/lifecycle.js +18 -0
- package/dist/cli/run-cli/command-loaders/project.d.ts +37 -0
- package/dist/cli/run-cli/command-loaders/project.d.ts.map +1 -0
- package/dist/cli/run-cli/command-loaders/project.js +36 -0
- package/dist/cli/run-cli/command-loaders/task.d.ts +65 -0
- package/dist/cli/run-cli/command-loaders/task.d.ts.map +1 -0
- package/dist/cli/run-cli/command-loaders/task.js +50 -0
- package/dist/cli/run-cli/commands/codex.d.ts +1 -1
- package/dist/cli/run-cli/commands/codex.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/config.d.ts +1 -1
- package/dist/cli/run-cli/commands/config.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/config.js +1 -1
- package/dist/cli/run-cli/commands/core/agent-profiles.js +1 -1
- package/dist/cli/run-cli/commands/core/agents.d.ts +1 -1
- package/dist/cli/run-cli/commands/core/agents.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core/preflight.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core/preflight.js +3 -2
- package/dist/cli/run-cli/commands/ide.d.ts +1 -1
- package/dist/cli/run-cli/commands/ide.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/model.d.ts +2 -1
- package/dist/cli/run-cli/commands/init/model.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/orchestrate-v2.d.ts +9 -0
- package/dist/cli/run-cli/commands/init/orchestrate-v2.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/orchestrate-v2.js +265 -0
- package/dist/cli/run-cli/commands/init/orchestrate.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/orchestrate.js +19 -23
- package/dist/cli/run-cli/commands/init/prompts-v2.d.ts +10 -0
- package/dist/cli/run-cli/commands/init/prompts-v2.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/prompts-v2.js +26 -0
- package/dist/cli/run-cli/commands/init/recipes.d.ts +2 -1
- package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/recipes.js +3 -1
- package/dist/cli/run-cli/commands/init/spec.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/spec.js +14 -0
- package/dist/cli/run-cli/commands/init/steps/advanced-settings.d.ts +9 -0
- package/dist/cli/run-cli/commands/init/steps/advanced-settings.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/steps/advanced-settings.js +48 -0
- package/dist/cli/run-cli/commands/init/steps/apply.d.ts +30 -0
- package/dist/cli/run-cli/commands/init/steps/apply.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/steps/apply.js +96 -0
- package/dist/cli/run-cli/commands/init/steps/backend.d.ts +8 -0
- package/dist/cli/run-cli/commands/init/steps/backend.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/steps/backend.js +17 -0
- package/dist/cli/run-cli/commands/init/steps/conflict-resolver.d.ts +10 -0
- package/dist/cli/run-cli/commands/init/steps/conflict-resolver.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/steps/conflict-resolver.js +41 -0
- package/dist/cli/run-cli/commands/init/steps/contracts.d.ts +57 -0
- package/dist/cli/run-cli/commands/init/steps/contracts.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/steps/contracts.js +1 -0
- package/dist/cli/run-cli/commands/init/steps/ide.d.ts +8 -0
- package/dist/cli/run-cli/commands/init/steps/ide.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/steps/ide.js +18 -0
- package/dist/cli/run-cli/commands/init/steps/index.d.ts +10 -0
- package/dist/cli/run-cli/commands/init/steps/index.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/steps/index.js +9 -0
- package/dist/cli/run-cli/commands/init/steps/policy-gateway.d.ts +8 -0
- package/dist/cli/run-cli/commands/init/steps/policy-gateway.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/steps/policy-gateway.js +17 -0
- package/dist/cli/run-cli/commands/init/steps/prompt-utils.d.ts +21 -0
- package/dist/cli/run-cli/commands/init/steps/prompt-utils.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/steps/prompt-utils.js +36 -0
- package/dist/cli/run-cli/commands/init/steps/recipe-selection.d.ts +15 -0
- package/dist/cli/run-cli/commands/init/steps/recipe-selection.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/steps/recipe-selection.js +35 -0
- package/dist/cli/run-cli/commands/init/steps/setup-profile.d.ts +8 -0
- package/dist/cli/run-cli/commands/init/steps/setup-profile.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/steps/setup-profile.js +32 -0
- package/dist/cli/run-cli/commands/init/steps/workflow.d.ts +9 -0
- package/dist/cli/run-cli/commands/init/steps/workflow.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/steps/workflow.js +48 -0
- package/dist/cli/run-cli/commands/init/ui-v2.d.ts +17 -0
- package/dist/cli/run-cli/commands/init/ui-v2.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/ui-v2.js +39 -0
- package/dist/cli/run-cli/commands/init/write-agents.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-agents.js +1 -1
- package/dist/cli/run-cli/commands/init/write-config.d.ts +2 -1
- 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 -1
- package/dist/cli/run-cli/registry.run.d.ts +1 -1
- package/dist/cli/run-cli/registry.run.d.ts.map +1 -1
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +2 -1
- package/dist/cli/spec/errors.d.ts +5 -0
- package/dist/cli/spec/errors.d.ts.map +1 -1
- package/dist/cli/spec/errors.js +14 -1
- package/dist/cli/spec/parse.d.ts.map +1 -1
- package/dist/cli/spec/parse.js +8 -1
- package/dist/cli.js +677 -4
- package/dist/commands/branch/base.js +3 -1
- package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
- package/dist/commands/branch/cleanup-merged.js +4 -5
- package/dist/commands/branch/remove.d.ts.map +1 -1
- package/dist/commands/branch/remove.js +4 -2
- package/dist/commands/branch/status.d.ts.map +1 -1
- package/dist/commands/branch/status.js +3 -3
- package/dist/commands/branch/work-start.d.ts.map +1 -1
- package/dist/commands/branch/work-start.direct.d.ts +13 -0
- package/dist/commands/branch/work-start.direct.d.ts.map +1 -0
- package/dist/commands/branch/work-start.direct.js +76 -0
- package/dist/commands/branch/work-start.git.d.ts +3 -0
- package/dist/commands/branch/work-start.git.d.ts.map +1 -0
- package/dist/commands/branch/work-start.git.js +19 -0
- package/dist/commands/branch/work-start.hook-shim.d.ts +2 -0
- package/dist/commands/branch/work-start.hook-shim.d.ts.map +1 -0
- package/dist/commands/branch/work-start.hook-shim.js +38 -0
- package/dist/commands/branch/work-start.js +8 -236
- package/dist/commands/branch/work-start.materialize.d.ts +16 -0
- package/dist/commands/branch/work-start.materialize.d.ts.map +1 -0
- package/dist/commands/branch/work-start.materialize.js +112 -0
- package/dist/commands/codex/plugin-install.d.ts.map +1 -1
- package/dist/commands/codex/plugin-install.js +2 -1
- package/dist/commands/commit.command.js +1 -1
- package/dist/commands/doctor/archive.d.ts.map +1 -1
- package/dist/commands/doctor/archive.js +4 -3
- package/dist/commands/doctor/fixes.d.ts +0 -5
- package/dist/commands/doctor/fixes.d.ts.map +1 -1
- package/dist/commands/doctor/fixes.js +0 -70
- package/dist/commands/doctor/runtime.d.ts +1 -1
- package/dist/commands/doctor/runtime.d.ts.map +1 -1
- package/dist/commands/doctor/workflow.d.ts.map +1 -1
- package/dist/commands/doctor/workflow.js +3 -24
- package/dist/commands/doctor/workspace.d.ts.map +1 -1
- package/dist/commands/doctor/workspace.js +7 -9
- package/dist/commands/doctor.run.d.ts.map +1 -1
- package/dist/commands/doctor.run.js +3 -4
- package/dist/commands/finish.run.js +1 -1
- package/dist/commands/guard/commit.command.d.ts +3 -16
- package/dist/commands/guard/commit.command.d.ts.map +1 -1
- package/dist/commands/guard/commit.command.js +1 -132
- package/dist/commands/guard/commit.spec.d.ts +17 -0
- package/dist/commands/guard/commit.spec.d.ts.map +1 -0
- package/dist/commands/guard/commit.spec.js +132 -0
- package/dist/commands/guard/impl/allow.js +2 -2
- package/dist/commands/guard/impl/close-dirt.d.ts.map +1 -1
- package/dist/commands/guard/impl/close-dirt.js +2 -3
- package/dist/commands/guard/impl/close-message.d.ts.map +1 -1
- package/dist/commands/guard/impl/close-message.js +5 -3
- package/dist/commands/guard/impl/comment-commit.d.ts +1 -1
- package/dist/commands/guard/impl/comment-commit.d.ts.map +1 -1
- package/dist/commands/guard/impl/comment-commit.js +1 -1
- package/dist/commands/guard/impl/commit.d.ts.map +1 -1
- package/dist/commands/guard/impl/commit.js +3 -2
- package/dist/commands/guard/impl/env.js +1 -1
- package/dist/commands/guard/impl/policy.js +1 -1
- package/dist/commands/guard/index.d.ts +3 -2
- package/dist/commands/guard/index.d.ts.map +1 -1
- package/dist/commands/guard/index.js +3 -2
- package/dist/commands/hooks/index.d.ts +4 -20
- package/dist/commands/hooks/index.d.ts.map +1 -1
- package/dist/commands/hooks/index.js +4 -432
- package/dist/commands/hooks/install.d.ts +11 -0
- package/dist/commands/hooks/install.d.ts.map +1 -0
- package/dist/commands/hooks/install.js +136 -0
- package/dist/commands/hooks/run.commit-msg.d.ts +3 -0
- package/dist/commands/hooks/run.commit-msg.d.ts.map +1 -0
- package/dist/commands/hooks/run.commit-msg.js +68 -0
- package/dist/commands/hooks/run.d.ts +9 -0
- package/dist/commands/hooks/run.d.ts.map +1 -0
- package/dist/commands/hooks/run.js +45 -0
- package/dist/commands/hooks/run.post-merge.d.ts +3 -0
- package/dist/commands/hooks/run.post-merge.d.ts.map +1 -0
- package/dist/commands/hooks/run.post-merge.js +44 -0
- package/dist/commands/hooks/run.pre-commit.d.ts +3 -0
- package/dist/commands/hooks/run.pre-commit.d.ts.map +1 -0
- package/dist/commands/hooks/run.pre-commit.js +49 -0
- package/dist/commands/hooks/run.pre-push.d.ts +6 -0
- package/dist/commands/hooks/run.pre-push.d.ts.map +1 -0
- package/dist/commands/hooks/run.pre-push.js +89 -0
- package/dist/commands/hooks/shared.d.ts +7 -0
- package/dist/commands/hooks/shared.d.ts.map +1 -0
- package/dist/commands/hooks/shared.js +41 -0
- package/dist/commands/incidents/shared.d.ts +1 -2
- package/dist/commands/incidents/shared.d.ts.map +1 -1
- package/dist/commands/incidents/shared.js +2 -2
- package/dist/commands/integrate.command.d.ts +2 -11
- package/dist/commands/integrate.command.d.ts.map +1 -1
- package/dist/commands/integrate.command.js +1 -45
- package/dist/commands/integrate.spec.d.ts +12 -0
- package/dist/commands/integrate.spec.d.ts.map +1 -0
- package/dist/commands/integrate.spec.js +44 -0
- package/dist/commands/pr/check.js +1 -1
- package/dist/commands/pr/integrate/artifacts.js +1 -1
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
- package/dist/commands/pr/integrate/cmd.js +2 -1
- package/dist/commands/pr/integrate/internal/cleanup.d.ts +1 -1
- package/dist/commands/pr/integrate/internal/cleanup.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/cleanup.js +1 -1
- package/dist/commands/pr/integrate/internal/finalize.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/finalize.js +3 -2
- package/dist/commands/pr/integrate/internal/merge.js +3 -2
- package/dist/commands/pr/integrate/internal/post-integrate-bootstrap.d.ts +2 -1
- package/dist/commands/pr/integrate/internal/post-integrate-bootstrap.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/post-integrate-bootstrap.js +1 -1
- package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.d.ts +2 -1
- package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.js +1 -1
- package/dist/commands/pr/integrate/internal/prepare.d.ts +2 -1
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/prepare.js +1 -3
- package/dist/commands/pr/integrate/internal/worktree.d.ts +2 -1
- package/dist/commands/pr/integrate/internal/worktree.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/worktree.js +2 -2
- package/dist/commands/pr/internal/auto-commit.js +3 -3
- package/dist/commands/pr/internal/gh-api.js +2 -2
- package/dist/commands/pr/internal/pr-paths.d.ts +1 -1
- package/dist/commands/pr/internal/pr-paths.d.ts.map +1 -1
- package/dist/commands/pr/internal/pr-paths.js +3 -2
- package/dist/commands/pr/internal/review-template.js +1 -1
- package/dist/commands/pr/internal/sync-branch.d.ts.map +1 -1
- package/dist/commands/pr/internal/sync-branch.js +3 -4
- package/dist/commands/pr/internal/sync-github.js +1 -1
- package/dist/commands/pr/internal/sync-support.js +1 -1
- package/dist/commands/pr/internal/sync.d.ts.map +1 -1
- package/dist/commands/pr/internal/sync.js +2 -2
- package/dist/commands/pr/note.d.ts.map +1 -1
- package/dist/commands/pr/note.js +1 -1
- package/dist/commands/pr/open.d.ts.map +1 -1
- package/dist/commands/pr/open.js +2 -1
- package/dist/commands/pr/pr.command.d.ts +3 -37
- package/dist/commands/pr/pr.command.d.ts.map +1 -1
- package/dist/commands/pr/pr.command.js +9 -211
- package/dist/commands/pr/pr.spec.d.ts +38 -0
- package/dist/commands/pr/pr.spec.d.ts.map +1 -0
- package/dist/commands/pr/pr.spec.js +210 -0
- package/dist/commands/recipes/active.command.js +1 -1
- package/dist/commands/recipes/add.command.js +1 -1
- package/dist/commands/recipes/cache-prune.command.d.ts +1 -1
- package/dist/commands/recipes/cache-prune.command.d.ts.map +1 -1
- package/dist/commands/recipes/cache-prune.command.js +1 -1
- package/dist/commands/recipes/detach.command.js +1 -1
- package/dist/commands/recipes/disable.command.js +1 -1
- package/dist/commands/recipes/enable.command.js +1 -1
- package/dist/commands/recipes/explain-active.command.js +1 -1
- package/dist/commands/recipes/explain.command.js +1 -1
- package/dist/commands/recipes/impl/commands/active.js +1 -1
- package/dist/commands/recipes/impl/commands/add.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/add.js +2 -1
- package/dist/commands/recipes/impl/commands/cache-prune.js +1 -1
- package/dist/commands/recipes/impl/commands/detach.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/detach.js +2 -1
- package/dist/commands/recipes/impl/commands/disable.js +1 -1
- package/dist/commands/recipes/impl/commands/enable.js +1 -1
- package/dist/commands/recipes/impl/commands/explain-active.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 +2 -1
- package/dist/commands/recipes/impl/commands/list-remote.js +1 -1
- package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/remove.js +2 -1
- package/dist/commands/recipes/impl/commands/update.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/update.js +2 -1
- package/dist/commands/recipes/impl/index.d.ts.map +1 -1
- package/dist/commands/recipes/impl/index.js +13 -3
- package/dist/commands/recipes/impl/overlay-project.d.ts.map +1 -1
- package/dist/commands/recipes/impl/overlay-project.js +2 -1
- package/dist/commands/recipes/impl/project.js +1 -1
- 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/info.command.js +1 -1
- package/dist/commands/recipes/install.run.js +1 -1
- package/dist/commands/recipes/install.spec.d.ts +1 -1
- package/dist/commands/recipes/install.spec.d.ts.map +1 -1
- package/dist/commands/recipes/list-remote.command.d.ts +1 -1
- package/dist/commands/recipes/list-remote.command.d.ts.map +1 -1
- package/dist/commands/recipes/list-remote.command.js +1 -1
- package/dist/commands/recipes/list.command.d.ts +1 -1
- package/dist/commands/recipes/list.command.d.ts.map +1 -1
- package/dist/commands/recipes/list.command.js +1 -1
- package/dist/commands/recipes/remove.command.js +1 -1
- package/dist/commands/recipes/update.command.js +1 -1
- package/dist/commands/release/apply.command.d.ts +2 -3
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +4 -137
- package/dist/commands/release/apply.mutation.js +4 -3
- package/dist/commands/release/apply.pipeline/finalize.d.ts.map +1 -1
- package/dist/commands/release/apply.pipeline/finalize.js +2 -1
- package/dist/commands/release/apply.pipeline/mutation.d.ts +1 -1
- package/dist/commands/release/apply.pipeline/mutation.d.ts.map +1 -1
- package/dist/commands/release/apply.pipeline/mutation.js +3 -4
- package/dist/commands/release/apply.pipeline/preflight.js +1 -1
- package/dist/commands/release/apply.pipeline/state.d.ts.map +1 -1
- package/dist/commands/release/apply.pipeline/state.js +2 -1
- package/dist/commands/release/apply.pipeline.d.ts +5 -1
- package/dist/commands/release/apply.pipeline.d.ts.map +1 -1
- package/dist/commands/release/apply.pipeline.js +4 -0
- package/dist/commands/release/apply.preflight.d.ts.map +1 -1
- package/dist/commands/release/apply.preflight.js +2 -1
- package/dist/commands/release/apply.reporting.d.ts.map +1 -1
- package/dist/commands/release/apply.reporting.js +2 -1
- package/dist/commands/release/apply.spec.d.ts +5 -0
- package/dist/commands/release/apply.spec.d.ts.map +1 -0
- package/dist/commands/release/apply.spec.js +136 -0
- package/dist/commands/release/apply.types.d.ts +1 -1
- package/dist/commands/release/apply.types.d.ts.map +1 -1
- package/dist/commands/release/plan.command.d.ts +3 -10
- package/dist/commands/release/plan.command.d.ts.map +1 -1
- package/dist/commands/release/plan.command.js +4 -78
- package/dist/commands/release/plan.spec.d.ts +10 -0
- package/dist/commands/release/plan.spec.d.ts.map +1 -0
- package/dist/commands/release/plan.spec.js +76 -0
- package/dist/commands/runtime.command.d.ts +3 -6
- package/dist/commands/runtime.command.d.ts.map +1 -1
- package/dist/commands/runtime.command.js +5 -32
- package/dist/commands/runtime.spec.d.ts +8 -0
- package/dist/commands/runtime.spec.d.ts.map +1 -0
- package/dist/commands/runtime.spec.js +31 -0
- package/dist/commands/scenario/impl/commands.d.ts +1 -1
- package/dist/commands/scenario/impl/commands.d.ts.map +1 -1
- package/dist/commands/scenario/impl/commands.js +2 -1
- package/dist/commands/shared/approval-requirements.d.ts +1 -1
- package/dist/commands/shared/approval-requirements.d.ts.map +1 -1
- package/dist/commands/shared/comment-format.d.ts +1 -1
- package/dist/commands/shared/comment-format.d.ts.map +1 -1
- package/dist/commands/shared/git-ops.d.ts +1 -1
- package/dist/commands/shared/git-ops.d.ts.map +1 -1
- package/dist/commands/shared/git-ops.js +3 -2
- package/dist/commands/shared/merged-branch-cleanup.js +2 -2
- package/dist/commands/shared/network-approval.d.ts +1 -1
- package/dist/commands/shared/network-approval.d.ts.map +1 -1
- package/dist/commands/shared/post-commit-pr-artifacts.d.ts.map +1 -1
- package/dist/commands/shared/post-commit-pr-artifacts.js +2 -1
- package/dist/commands/shared/pr-meta.d.ts +1 -1
- package/dist/commands/shared/pr-meta.d.ts.map +1 -1
- package/dist/commands/shared/pr-meta.js +2 -2
- package/dist/commands/shared/task-backend.d.ts +3 -2
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +3 -4
- package/dist/commands/shared/task-handoff.d.ts +1 -1
- package/dist/commands/shared/task-handoff.d.ts.map +1 -1
- package/dist/commands/shared/task-handoff.js +3 -2
- package/dist/commands/shared/task-local-freshness.js +1 -1
- package/dist/commands/shared/task-store/intents.js +1 -1
- package/dist/commands/shared/task-store/readme.d.ts.map +1 -1
- package/dist/commands/shared/task-store/readme.js +1 -1
- package/dist/commands/shared/task-store/types.d.ts +1 -1
- package/dist/commands/shared/task-store/types.d.ts.map +1 -1
- package/dist/commands/task/add.command.d.ts +2 -1
- package/dist/commands/task/add.command.d.ts.map +1 -1
- package/dist/commands/task/add.command.js +2 -1
- package/dist/commands/task/close-duplicate.d.ts.map +1 -1
- package/dist/commands/task/close-duplicate.js +2 -2
- package/dist/commands/task/close-shared.d.ts.map +1 -1
- package/dist/commands/task/close-shared.js +2 -1
- package/dist/commands/task/close-tail-state.d.ts.map +1 -1
- package/dist/commands/task/close-tail-state.js +3 -2
- package/dist/commands/task/derive.js +1 -1
- package/dist/commands/task/doc-template.js +1 -1
- package/dist/commands/task/doc.d.ts.map +1 -1
- package/dist/commands/task/doc.js +4 -2
- package/dist/commands/task/findings.d.ts +1 -1
- package/dist/commands/task/findings.d.ts.map +1 -1
- package/dist/commands/task/findings.js +1 -1
- package/dist/commands/task/finish-close.js +2 -2
- package/dist/commands/task/finish-shared.d.ts.map +1 -1
- package/dist/commands/task/finish-shared.js +6 -8
- package/dist/commands/task/handoff.shared.d.ts.map +1 -1
- package/dist/commands/task/handoff.shared.js +4 -5
- package/dist/commands/task/hosted-close-pr.command.d.ts +6 -7
- package/dist/commands/task/hosted-close-pr.command.d.ts.map +1 -1
- package/dist/commands/task/hosted-close-pr.command.js +13 -373
- package/dist/commands/task/hosted-close-pr.execute.d.ts +3 -0
- package/dist/commands/task/hosted-close-pr.execute.d.ts.map +1 -0
- package/dist/commands/task/hosted-close-pr.execute.js +135 -0
- package/dist/commands/task/hosted-close-pr.postcheck.d.ts +3 -0
- package/dist/commands/task/hosted-close-pr.postcheck.d.ts.map +1 -0
- package/dist/commands/task/hosted-close-pr.postcheck.js +13 -0
- package/dist/commands/task/hosted-close-pr.precheck.d.ts +4 -0
- package/dist/commands/task/hosted-close-pr.precheck.d.ts.map +1 -0
- package/dist/commands/task/hosted-close-pr.precheck.js +288 -0
- package/dist/commands/task/hosted-close-pr.report.d.ts +4 -0
- package/dist/commands/task/hosted-close-pr.report.d.ts.map +1 -0
- package/dist/commands/task/hosted-close-pr.report.js +42 -0
- package/dist/commands/task/hosted-close-pr.types.d.ts +75 -0
- package/dist/commands/task/hosted-close-pr.types.d.ts.map +1 -0
- package/dist/commands/task/hosted-close-pr.types.js +1 -0
- package/dist/commands/task/hosted-close.command.d.ts +3 -6
- package/dist/commands/task/hosted-close.command.d.ts.map +1 -1
- package/dist/commands/task/hosted-close.command.js +4 -41
- package/dist/commands/task/hosted-close.spec.d.ts +7 -0
- package/dist/commands/task/hosted-close.spec.d.ts.map +1 -0
- package/dist/commands/task/hosted-close.spec.js +39 -0
- package/dist/commands/task/hosted-merge-sync/builders.d.ts +1 -1
- package/dist/commands/task/hosted-merge-sync/builders.d.ts.map +1 -1
- package/dist/commands/task/hosted-merge-sync/builders.js +6 -6
- package/dist/commands/task/hosted-merge-sync/github.js +2 -2
- package/dist/commands/task/hosted-merge-sync/local-branch.d.ts.map +1 -1
- package/dist/commands/task/hosted-merge-sync/local-branch.js +5 -5
- package/dist/commands/task/hosted-merge-sync/model.d.ts +1 -1
- package/dist/commands/task/hosted-merge-sync/model.d.ts.map +1 -1
- package/dist/commands/task/hosted-merge-sync/pr-meta.d.ts +1 -1
- package/dist/commands/task/hosted-merge-sync/pr-meta.d.ts.map +1 -1
- package/dist/commands/task/index.d.ts +1 -1
- package/dist/commands/task/index.d.ts.map +1 -1
- package/dist/commands/task/index.js +1 -1
- package/dist/commands/task/lint.js +1 -1
- package/dist/commands/task/list.d.ts.map +1 -1
- package/dist/commands/task/list.js +2 -1
- package/dist/commands/task/migrate-doc.d.ts +2 -1
- package/dist/commands/task/migrate-doc.d.ts.map +1 -1
- package/dist/commands/task/migrate-doc.js +6 -2
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +6 -21
- package/dist/commands/task/normalize.d.ts.map +1 -1
- package/dist/commands/task/normalize.js +2 -1
- package/dist/commands/task/plan.d.ts.map +1 -1
- package/dist/commands/task/plan.js +1 -1
- package/dist/commands/task/ready.d.ts.map +1 -1
- package/dist/commands/task/ready.js +2 -1
- package/dist/commands/task/scaffold.d.ts.map +1 -1
- package/dist/commands/task/scaffold.js +1 -1
- package/dist/commands/task/shared/dependencies.d.ts.map +1 -1
- package/dist/commands/task/shared/dependencies.js +4 -3
- package/dist/commands/task/shared/docs.d.ts +1 -1
- package/dist/commands/task/shared/docs.d.ts.map +1 -1
- package/dist/commands/task/shared/docs.js +1 -1
- package/dist/commands/task/shared/listing.d.ts.map +1 -1
- package/dist/commands/task/shared/listing.js +3 -2
- package/dist/commands/task/shared/tags.d.ts +1 -1
- package/dist/commands/task/shared/tags.d.ts.map +1 -1
- package/dist/commands/task/shared/tags.js +4 -4
- package/dist/commands/task/shared/transition-rules.d.ts +28 -0
- package/dist/commands/task/shared/transition-rules.d.ts.map +1 -0
- package/dist/commands/task/shared/transition-rules.js +96 -0
- package/dist/commands/task/shared/transitions.d.ts +2 -27
- package/dist/commands/task/shared/transitions.d.ts.map +1 -1
- package/dist/commands/task/shared/transitions.js +5 -98
- package/dist/commands/task/shared/workflow-transition-service.d.ts +1 -1
- package/dist/commands/task/shared/workflow-transition-service.d.ts.map +1 -1
- package/dist/commands/task/shared/workflow-transition-service.js +6 -6
- package/dist/commands/task/shared.d.ts +2 -1
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +2 -1
- package/dist/commands/task/show.d.ts.map +1 -1
- package/dist/commands/task/show.js +1 -1
- package/dist/commands/upgrade/apply.js +3 -2
- package/dist/commands/upgrade/materialize.d.ts.map +1 -1
- package/dist/commands/upgrade/materialize.js +1 -8
- package/dist/commands/upgrade/source.d.ts +0 -1
- package/dist/commands/upgrade/source.d.ts.map +1 -1
- package/dist/commands/upgrade/source.js +1 -9
- package/dist/commands/upgrade.command.d.ts +3 -4
- package/dist/commands/upgrade.command.d.ts.map +1 -1
- package/dist/commands/upgrade.command.js +1 -179
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +4 -2
- package/dist/commands/upgrade.spec.d.ts +5 -0
- package/dist/commands/upgrade.spec.d.ts.map +1 -0
- package/dist/commands/upgrade.spec.js +179 -0
- package/dist/commands/workflow-build.command.d.ts.map +1 -1
- package/dist/commands/workflow-build.command.js +2 -1
- package/dist/commands/workflow-playbook.command.d.ts +3 -6
- package/dist/commands/workflow-playbook.command.d.ts.map +1 -1
- package/dist/commands/workflow-playbook.command.js +6 -24
- package/dist/commands/workflow-playbook.spec.d.ts +6 -0
- package/dist/commands/workflow-playbook.spec.d.ts.map +1 -0
- package/dist/commands/workflow-playbook.spec.js +21 -0
- package/dist/commands/workflow-restore.command.js +1 -1
- package/dist/commands/workflow.d.ts +4 -5
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +4 -5
- package/dist/harness/hooks-lifecycle.js +1 -1
- package/dist/meta/release.d.ts.map +1 -1
- package/dist/meta/release.js +3 -5
- package/dist/meta/version.d.ts.map +1 -1
- package/dist/meta/version.js +2 -2
- package/dist/policy/engine.d.ts +1 -1
- package/dist/policy/engine.d.ts.map +1 -1
- package/dist/policy/model.d.ts +1 -1
- package/dist/policy/model.d.ts.map +1 -1
- package/dist/policy/rules/commit-subject.js +1 -1
- package/dist/runner/adapters/base.d.ts +1 -1
- package/dist/runner/adapters/base.d.ts.map +1 -1
- package/dist/runner/adapters/codex.d.ts.map +1 -1
- package/dist/runner/adapters/codex.js +35 -113
- package/dist/runner/adapters/custom-preparation.d.ts +1 -1
- package/dist/runner/adapters/custom-preparation.d.ts.map +1 -1
- package/dist/runner/adapters/custom.d.ts +1 -1
- package/dist/runner/adapters/custom.d.ts.map +1 -1
- package/dist/runner/adapters/custom.js +34 -115
- package/dist/runner/adapters/execute-supervised.d.ts +41 -0
- package/dist/runner/adapters/execute-supervised.d.ts.map +1 -0
- package/dist/runner/adapters/execute-supervised.js +108 -0
- package/dist/runner/adapters/index.d.ts +1 -1
- package/dist/runner/adapters/index.d.ts.map +1 -1
- package/dist/runner/adapters/shared.d.ts +1 -1
- package/dist/runner/adapters/shared.d.ts.map +1 -1
- package/dist/runner/artifacts.d.ts.map +1 -1
- package/dist/runner/artifacts.js +1 -1
- package/dist/runner/config.d.ts +1 -1
- package/dist/runner/config.d.ts.map +1 -1
- package/dist/runner/context/base-prompt-sources.d.ts.map +1 -1
- package/dist/runner/context/base-prompt-sources.js +26 -4
- package/dist/runner/context/base-prompts.d.ts.map +1 -1
- package/dist/runner/context/base-prompts.js +4 -0
- package/dist/runner/context/project-skill-prompt-blocks.d.ts +5 -0
- package/dist/runner/context/project-skill-prompt-blocks.d.ts.map +1 -0
- package/dist/runner/context/project-skill-prompt-blocks.js +57 -0
- package/dist/runner/context/prompt-block-shared.d.ts +1 -1
- package/dist/runner/context/prompt-block-shared.d.ts.map +1 -1
- package/dist/runner/context/prompt-block-shared.js +8 -2
- package/dist/runner/context/recipe-context.d.ts +1 -1
- package/dist/runner/context/recipe-context.d.ts.map +1 -1
- package/dist/runner/context/task-context.d.ts.map +1 -1
- package/dist/runner/context/task-context.js +1 -1
- package/dist/runner/process-supervision/buffered-file-writer.d.ts +10 -0
- package/dist/runner/process-supervision/buffered-file-writer.d.ts.map +1 -0
- package/dist/runner/process-supervision/buffered-file-writer.js +70 -0
- package/dist/runner/process-supervision/run.d.ts.map +1 -1
- package/dist/runner/process-supervision/run.js +83 -68
- package/dist/runner/process-supervision/signals.js +1 -1
- package/dist/runner/result-manifest.d.ts.map +1 -1
- package/dist/runner/result-manifest.js +1 -1
- package/dist/runner/task-state.js +1 -1
- package/dist/runner/trace-artifacts.d.ts.map +1 -1
- package/dist/runner/trace-artifacts.js +1 -1
- package/dist/runner/types.d.ts +2 -2
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/usecases/scenario-materialize-task.d.ts.map +1 -1
- package/dist/runner/usecases/scenario-materialize-task.js +1 -1
- package/dist/runner/usecases/task-run-lifecycle-cancel.d.ts.map +1 -1
- package/dist/runner/usecases/task-run-lifecycle-cancel.js +2 -1
- package/dist/runner/usecases/task-run-lifecycle-shared.d.ts.map +1 -1
- package/dist/runner/usecases/task-run-lifecycle-shared.js +3 -7
- package/dist/runner/usecases/task-run.d.ts.map +1 -1
- package/dist/runner/usecases/task-run.js +2 -3
- package/dist/runtime/approvals/model.d.ts +1 -1
- package/dist/runtime/approvals/model.d.ts.map +1 -1
- package/dist/runtime/approvals/runtime.d.ts +1 -1
- package/dist/runtime/approvals/runtime.d.ts.map +1 -1
- package/dist/runtime/execution-context.d.ts +2 -1
- package/dist/runtime/execution-context.d.ts.map +1 -1
- package/dist/runtime/execution-profile/model.d.ts +1 -1
- package/dist/runtime/execution-profile/model.d.ts.map +1 -1
- package/dist/runtime/execution-profile/resolve.d.ts +1 -1
- package/dist/runtime/execution-profile/resolve.d.ts.map +1 -1
- package/dist/runtime/execution-profile/resolve.js +1 -1
- package/dist/runtime/harness/resolve.d.ts +2 -1
- package/dist/runtime/harness/resolve.d.ts.map +1 -1
- package/dist/runtime/harness/resolve.js +1 -1
- package/dist/runtime/harness/types.d.ts +2 -1
- package/dist/runtime/harness/types.d.ts.map +1 -1
- package/dist/runtime/incidents/paths.d.ts +3 -0
- package/dist/runtime/incidents/paths.d.ts.map +1 -0
- package/dist/runtime/incidents/paths.js +2 -0
- package/dist/runtime/shared/repo-cli-version.d.ts +1 -1
- package/dist/runtime/shared/repo-cli-version.d.ts.map +1 -1
- package/dist/runtime/task-intake/types.d.ts +2 -1
- package/dist/runtime/task-intake/types.d.ts.map +1 -1
- package/dist/shared/errors.d.ts +4 -1
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/errors.js +6 -0
- package/dist/shared/package-paths.d.ts +8 -0
- package/dist/shared/package-paths.d.ts.map +1 -0
- package/dist/shared/package-paths.js +80 -0
- package/dist/shared/trace-events.d.ts +1 -1
- package/dist/shared/trace-events.d.ts.map +1 -1
- package/dist/shared/trace-events.js +1 -1
- package/dist/shared/workflow-artifacts.d.ts.map +1 -1
- package/dist/shared/workflow-artifacts.js +1 -8
- package/dist/shared/write-if-changed.js +2 -1
- package/dist/task-doc/conflicts.js +1 -1
- package/dist/task-doc/state.d.ts +2 -2
- package/dist/task-doc/state.d.ts.map +1 -1
- package/dist/task-doc/state.js +1 -1
- package/dist/workflow-runtime/file-ops.d.ts.map +1 -1
- package/dist/workflow-runtime/file-ops.js +2 -21
- package/dist/workflow-runtime/markdown.js +1 -1
- package/dist/workflow-runtime/paths.d.ts.map +1 -1
- package/dist/workflow-runtime/paths.js +0 -1
- package/dist/workflow-runtime/types.d.ts +0 -1
- package/dist/workflow-runtime/types.d.ts.map +1 -1
- package/dist/workflow-runtime/validate.d.ts +1 -1
- package/dist/workflow-runtime/validate.d.ts.map +1 -1
- package/package.json +6 -4
- package/dist/cli/cli-error.d.ts +0 -9
- package/dist/cli/cli-error.d.ts.map +0 -1
- package/dist/cli/cli-error.js +0 -13
- package/dist/cli/run-cli/command-catalog/shared.d.ts.map +0 -1
- package/dist/cli/run-cli/command-loaders.d.ts +0 -174
- package/dist/cli/run-cli/command-loaders.d.ts.map +0 -1
- package/dist/cli/run-cli/command-loaders.js +0 -128
- package/dist/cli/run-cli/commands/init/ui.d.ts +0 -3
- package/dist/cli/run-cli/commands/init/ui.d.ts.map +0 -1
- package/dist/cli/run-cli/commands/init/ui.js +0 -58
- package/dist/cli/run-cli/commands/init.d.ts +0 -2
- package/dist/cli/run-cli/commands/init.d.ts.map +0 -1
- package/dist/cli/run-cli/commands/init.js +0 -1
- package/dist/commands/guard/impl/commands.d.ts +0 -5
- package/dist/commands/guard/impl/commands.d.ts.map +0 -1
- package/dist/commands/guard/impl/commands.js +0 -4
- package/dist/commands/pr/index.d.ts +0 -8
- package/dist/commands/pr/index.d.ts.map +0 -1
- package/dist/commands/pr/index.js +0 -7
- package/dist/commands/pr/integrate.d.ts +0 -2
- package/dist/commands/pr/integrate.d.ts.map +0 -1
- package/dist/commands/pr/integrate.js +0 -1
- package/dist/commands/scenario/execute.command.d.ts +0 -8
- package/dist/commands/scenario/execute.command.d.ts.map +0 -1
- package/dist/commands/scenario/execute.command.js +0 -117
- package/dist/commands/scenario/impl/report.d.ts +0 -38
- package/dist/commands/scenario/impl/report.d.ts.map +0 -1
- package/dist/commands/scenario/impl/report.js +0 -97
- package/dist/commands/scenario/scenario.command.d.ts +0 -5
- package/dist/commands/scenario/scenario.command.d.ts.map +0 -1
- package/dist/commands/scenario/scenario.command.js +0 -19
- package/dist/commands/shared/git-context.d.ts +0 -2
- package/dist/commands/shared/git-context.d.ts.map +0 -1
- package/dist/commands/shared/git-context.js +0 -1
- package/dist/commands/shared/git-diff.d.ts +0 -2
- package/dist/commands/shared/git-diff.d.ts.map +0 -1
- package/dist/commands/shared/git-diff.js +0 -1
- package/dist/commands/shared/git-worktree.d.ts +0 -2
- package/dist/commands/shared/git-worktree.d.ts.map +0 -1
- package/dist/commands/shared/git-worktree.js +0 -1
- package/dist/commands/shared/git.d.ts +0 -2
- package/dist/commands/shared/git.d.ts.map +0 -1
- package/dist/commands/shared/git.js +0 -1
- package/dist/commands/task/finish.d.ts +0 -2
- package/dist/commands/task/finish.d.ts.map +0 -1
- package/dist/commands/task/finish.js +0 -1
- package/dist/harness/index.d.ts +0 -9
- package/dist/harness/index.d.ts.map +0 -1
- package/dist/harness/index.js +0 -8
- package/dist/runner/index.d.ts +0 -12
- package/dist/runner/index.d.ts.map +0 -1
- package/dist/runner/index.js +0 -11
- package/dist/runner/process-supervision.d.ts +0 -6
- package/dist/runner/process-supervision.d.ts.map +0 -1
- package/dist/runner/process-supervision.js +0 -3
- /package/dist/cli/run-cli/command-catalog/{shared.js → kernel.js} +0 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { loadConfig } from "@agentplaneorg/core/config";
|
|
2
|
+
import { resolveProject } from "@agentplaneorg/core/project";
|
|
3
|
+
import { clearPinnedBaseBranch, getPinnedBaseBranch, resolveBaseBranch, setPinnedBaseBranch, } from "@agentplaneorg/core/git";
|
|
2
4
|
import { mapCoreError } from "../../cli/error-map.js";
|
|
3
5
|
import { createCliEmitter } from "../../cli/output.js";
|
|
4
6
|
import { CliError } from "../../shared/errors.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cleanup-merged.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/cleanup-merged.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cleanup-merged.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/cleanup-merged.ts"],"names":[],"mappings":"AAwBA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAgInC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,GAAG,OAAO,CAAC,MAAM,CAAC,CAyJlB"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { resolveBaseBranch } from "@agentplaneorg/core";
|
|
3
|
+
import { resolveBaseBranch, gitEnv, gitDiffNames, findWorktreeForBranch, gitListBranchesByPrefixes, parseTaskIdFromCloseBranch, parseTaskIdFromBranch, } from "@agentplaneorg/core/git";
|
|
4
|
+
import { normalizeTaskStatus } from "@agentplaneorg/core/tasks";
|
|
4
5
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
5
6
|
import { createCliEmitter, unknownEntityMessage, workflowModeMessage } from "../../cli/output.js";
|
|
6
7
|
import { CliError } from "../../shared/errors.js";
|
|
7
8
|
import { ensureGitClean } from "../guard/index.js";
|
|
8
|
-
import { execFileAsync
|
|
9
|
-
import { gitDiffNames } from "../shared/git-diff.js";
|
|
9
|
+
import { execFileAsync } from "@agentplaneorg/core/process";
|
|
10
10
|
import { gitBranchExists, gitCurrentBranch, gitIsAncestor } from "../shared/git-ops.js";
|
|
11
11
|
import { cleanupMergedLocalBranch } from "../shared/merged-branch-cleanup.js";
|
|
12
|
-
import { findWorktreeForBranch, gitListBranchesByPrefixes, parseTaskIdFromCloseBranch, parseTaskIdFromBranch, } from "../shared/git-worktree.js";
|
|
13
12
|
import { isPathWithin, resolvePathFallback } from "../shared/path.js";
|
|
14
13
|
import { parsePrMeta } from "../shared/pr-meta.js";
|
|
15
14
|
import { loadTaskFromContext, loadCommandContext, } from "../shared/task-backend.js";
|
|
@@ -70,7 +69,7 @@ async function resolveCleanupCandidates(opts) {
|
|
|
70
69
|
}
|
|
71
70
|
if (!task)
|
|
72
71
|
continue;
|
|
73
|
-
const status =
|
|
72
|
+
const status = normalizeTaskStatus(task.status);
|
|
74
73
|
if (status !== "DONE")
|
|
75
74
|
continue;
|
|
76
75
|
const diff = await gitDiffNames(opts.gitRoot, opts.baseBranch, branch);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/remove.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/remove.ts"],"names":[],"mappings":"AAcA,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAqElB"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { loadConfig
|
|
2
|
+
import { loadConfig } from "@agentplaneorg/core/config";
|
|
3
|
+
import { resolveProject } from "@agentplaneorg/core/project";
|
|
3
4
|
import { mapCoreError } from "../../cli/error-map.js";
|
|
4
5
|
import { createCliEmitter, unknownEntityMessage } from "../../cli/output.js";
|
|
5
6
|
import { CliError } from "../../shared/errors.js";
|
|
6
7
|
import { ensureActionApproved } from "../shared/approval-requirements.js";
|
|
7
|
-
import { execFileAsync
|
|
8
|
+
import { execFileAsync } from "@agentplaneorg/core/process";
|
|
9
|
+
import { gitEnv } from "@agentplaneorg/core/git";
|
|
8
10
|
import { gitBranchExists } from "../shared/git-ops.js";
|
|
9
11
|
import { isPathWithin, resolvePathFallback } from "../shared/path.js";
|
|
10
12
|
export async function cmdBranchRemove(opts) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/status.ts"],"names":[],"mappings":"AAgBA,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC,MAAM,CAAC,CA0DlB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { loadConfig
|
|
1
|
+
import { loadConfig } from "@agentplaneorg/core/config";
|
|
2
|
+
import { resolveProject } from "@agentplaneorg/core/project";
|
|
3
|
+
import { resolveBaseBranch, gitAheadBehind, findWorktreeForBranch, parseTaskIdFromBranch, } from "@agentplaneorg/core/git";
|
|
2
4
|
import { mapCoreError } from "../../cli/error-map.js";
|
|
3
5
|
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
4
6
|
import { createCliEmitter, unknownEntityMessage } from "../../cli/output.js";
|
|
5
7
|
import { CliError } from "../../shared/errors.js";
|
|
6
|
-
import { gitAheadBehind } from "../shared/git-diff.js";
|
|
7
8
|
import { gitBranchExists, gitCurrentBranch } from "../shared/git-ops.js";
|
|
8
|
-
import { findWorktreeForBranch, parseTaskIdFromBranch } from "../shared/git-worktree.js";
|
|
9
9
|
const output = createCliEmitter();
|
|
10
10
|
export async function cmdBranchStatus(opts) {
|
|
11
11
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-start.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/work-start.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"work-start.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/work-start.ts"],"names":[],"mappings":"AAYA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAmBnC,wBAAsB,YAAY,CAAC,IAAI,EAAE;IACvC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB,GAAG,OAAO,CAAC,MAAM,CAAC,CA+JlB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type DirectWorkLock = {
|
|
2
|
+
task_id: string;
|
|
3
|
+
agent: string;
|
|
4
|
+
slug: string;
|
|
5
|
+
branch: string;
|
|
6
|
+
started_at: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function directWorkLockPath(agentplaneDir: string): string;
|
|
9
|
+
export declare function readDirectWorkLock(agentplaneDir: string): Promise<DirectWorkLock | null>;
|
|
10
|
+
export declare function writeDirectWorkLock(agentplaneDir: string, lock: DirectWorkLock): Promise<void>;
|
|
11
|
+
export declare function ensureGitClean(gitRoot: string): Promise<void>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=work-start.direct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-start.direct.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/work-start.direct.ts"],"names":[],"mappings":"AAQA,KAAK,cAAc,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAGhE;AAED,wBAAsB,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAkB9F;AAED,wBAAsB,mBAAmB,CACvC,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC,CAIf;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyCnE"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
4
|
+
import { CliError } from "../../shared/errors.js";
|
|
5
|
+
import { execFileAsync } from "@agentplaneorg/core/process";
|
|
6
|
+
import { gitEnv } from "@agentplaneorg/core/git";
|
|
7
|
+
export function directWorkLockPath(agentplaneDir) {
|
|
8
|
+
// Intentionally under cache/ so it stays out of git by default.
|
|
9
|
+
return path.join(agentplaneDir, "cache", "direct-work.json");
|
|
10
|
+
}
|
|
11
|
+
export async function readDirectWorkLock(agentplaneDir) {
|
|
12
|
+
try {
|
|
13
|
+
const text = await readFile(directWorkLockPath(agentplaneDir), "utf8");
|
|
14
|
+
const parsed = JSON.parse(text);
|
|
15
|
+
if (!parsed || typeof parsed !== "object")
|
|
16
|
+
return null;
|
|
17
|
+
if (typeof parsed.task_id !== "string" ||
|
|
18
|
+
typeof parsed.agent !== "string" ||
|
|
19
|
+
typeof parsed.slug !== "string" ||
|
|
20
|
+
typeof parsed.branch !== "string" ||
|
|
21
|
+
typeof parsed.started_at !== "string") {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return parsed;
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export async function writeDirectWorkLock(agentplaneDir, lock) {
|
|
31
|
+
const dir = path.dirname(directWorkLockPath(agentplaneDir));
|
|
32
|
+
await mkdir(dir, { recursive: true });
|
|
33
|
+
await writeFile(directWorkLockPath(agentplaneDir), JSON.stringify(lock, null, 2) + "\n", "utf8");
|
|
34
|
+
}
|
|
35
|
+
export async function ensureGitClean(gitRoot) {
|
|
36
|
+
const { stdout } = await execFileAsync("git", ["status", "--porcelain"], {
|
|
37
|
+
cwd: gitRoot,
|
|
38
|
+
env: gitEnv(),
|
|
39
|
+
});
|
|
40
|
+
const lines = stdout
|
|
41
|
+
.split("\n")
|
|
42
|
+
.map((line) => line.trimEnd())
|
|
43
|
+
.filter((line) => line.trim().length > 0);
|
|
44
|
+
if (lines.length === 0)
|
|
45
|
+
return;
|
|
46
|
+
// Allow task workflow artifacts to be dirty. In direct mode we want a single-stream
|
|
47
|
+
// workflow without task branches, but we still expect task docs to change.
|
|
48
|
+
const allowedPrefixes = [
|
|
49
|
+
".agentplane/tasks/",
|
|
50
|
+
".agentplane/tasks.json",
|
|
51
|
+
".agentplane/cache/",
|
|
52
|
+
".agentplane/.upgrade/",
|
|
53
|
+
".agentplane/upgrade/",
|
|
54
|
+
];
|
|
55
|
+
const isAllowed = (p) => allowedPrefixes.some((prefix) => p.startsWith(prefix));
|
|
56
|
+
const dirty = lines
|
|
57
|
+
.map((line) => {
|
|
58
|
+
// Format: XY <path> (we only need the path-ish tail).
|
|
59
|
+
const rest = line.slice(2).trim();
|
|
60
|
+
if (!rest)
|
|
61
|
+
return "";
|
|
62
|
+
// Rename/copy format: "old -> new"
|
|
63
|
+
const arrow = rest.lastIndexOf(" -> ");
|
|
64
|
+
if (arrow === -1)
|
|
65
|
+
return rest;
|
|
66
|
+
return rest.slice(arrow + 4).trim();
|
|
67
|
+
})
|
|
68
|
+
.filter((p) => p.length > 0 && !isAllowed(p));
|
|
69
|
+
if (dirty.length === 0)
|
|
70
|
+
return;
|
|
71
|
+
throw new CliError({
|
|
72
|
+
exitCode: exitCodeForError("E_GIT"),
|
|
73
|
+
code: "E_GIT",
|
|
74
|
+
message: "Working tree has non-task changes. In workflow_mode=direct, agentplane runs tasks in a single stream on the current branch; commit/stash your changes before starting a different task.",
|
|
75
|
+
});
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-start.git.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/work-start.git.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAchG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
2
|
+
import { CliError } from "../../shared/errors.js";
|
|
3
|
+
import { gitAheadBehind } from "@agentplaneorg/core/git";
|
|
4
|
+
import { gitBranchUpstream } from "../shared/git-ops.js";
|
|
5
|
+
export { resolveBaseBranch } from "@agentplaneorg/core/git";
|
|
6
|
+
export async function ensureCurrentBaseBranch(gitRoot, baseBranch) {
|
|
7
|
+
const upstreamBranch = await gitBranchUpstream(gitRoot, baseBranch);
|
|
8
|
+
if (!upstreamBranch)
|
|
9
|
+
return;
|
|
10
|
+
const { behind } = await gitAheadBehind(gitRoot, upstreamBranch, baseBranch);
|
|
11
|
+
if (behind === 0)
|
|
12
|
+
return;
|
|
13
|
+
throw new CliError({
|
|
14
|
+
exitCode: exitCodeForError("E_GIT"),
|
|
15
|
+
code: "E_GIT",
|
|
16
|
+
message: `Base branch ${baseBranch} is behind its upstream ${upstreamBranch} by ${behind} commit(s). ` +
|
|
17
|
+
"Refresh the base branch before `agentplane work start` to avoid DIRTY hosted PRs.",
|
|
18
|
+
});
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-start.hook-shim.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/work-start.hook-shim.ts"],"names":[],"mappings":"AAkCA,wBAAsB,8BAA8B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOxF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { chmod, mkdir, writeFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileExists } from "../../cli/fs-utils.js";
|
|
4
|
+
const HOOK_SHIM_MARKER = "agentplane-hook-shim";
|
|
5
|
+
function repoLocalHookShimText() {
|
|
6
|
+
return [
|
|
7
|
+
"#!/usr/bin/env sh",
|
|
8
|
+
`# ${HOOK_SHIM_MARKER} (do not edit)`,
|
|
9
|
+
"set -e",
|
|
10
|
+
'SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"',
|
|
11
|
+
'REPO_ROOT="$(dirname "$(dirname "$SCRIPT_DIR")")"',
|
|
12
|
+
'LOCAL_BIN="$REPO_ROOT/packages/agentplane/bin/agentplane.js"',
|
|
13
|
+
'if command -v node >/dev/null 2>&1 && [ -f "$LOCAL_BIN" ]; then',
|
|
14
|
+
' exec node "$LOCAL_BIN" "$@"',
|
|
15
|
+
"fi",
|
|
16
|
+
'ENV_BIN="${AGENTPLANE_HOOK_RUNNER:-}"',
|
|
17
|
+
'if [ -n "$ENV_BIN" ] && command -v node >/dev/null 2>&1 && [ -f "$ENV_BIN" ]; then',
|
|
18
|
+
' exec node "$ENV_BIN" "$@"',
|
|
19
|
+
"fi",
|
|
20
|
+
"if command -v agentplane >/dev/null 2>&1; then",
|
|
21
|
+
' exec agentplane "$@"',
|
|
22
|
+
"fi",
|
|
23
|
+
"if command -v npx >/dev/null 2>&1; then",
|
|
24
|
+
' exec npx --yes agentplane "$@"',
|
|
25
|
+
"fi",
|
|
26
|
+
'echo "agentplane shim: runner not found (need env runner, repo-local source, agentplane in PATH, or node+npx)." >&2',
|
|
27
|
+
" exit 127",
|
|
28
|
+
"",
|
|
29
|
+
].join("\n");
|
|
30
|
+
}
|
|
31
|
+
export async function materializeHookShimForWorktree(worktreePath) {
|
|
32
|
+
const shimPath = path.join(worktreePath, ".agentplane", "bin", "agentplane");
|
|
33
|
+
if (await fileExists(shimPath))
|
|
34
|
+
return;
|
|
35
|
+
await mkdir(path.dirname(shimPath), { recursive: true });
|
|
36
|
+
await writeFile(shimPath, repoLocalHookShimText(), "utf8");
|
|
37
|
+
await chmod(shimPath, 0o755);
|
|
38
|
+
}
|
|
@@ -1,249 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mkdir } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { resolveBaseBranch } from "@agentplaneorg/core";
|
|
4
|
-
import { LocalBackend } from "../../backends/task-backend.js";
|
|
5
3
|
import { mapBackendError } from "../../cli/error-map.js";
|
|
6
4
|
import { fileExists } from "../../cli/fs-utils.js";
|
|
7
5
|
import { exitCodeForError } from "../../cli/exit-codes.js";
|
|
8
6
|
import { createCliEmitter } from "../../cli/output.js";
|
|
9
7
|
import { CliError } from "../../shared/errors.js";
|
|
10
|
-
import { execFileAsync
|
|
11
|
-
import {
|
|
12
|
-
import { gitBranchExists,
|
|
8
|
+
import { execFileAsync } from "@agentplaneorg/core/process";
|
|
9
|
+
import { gitEnv } from "@agentplaneorg/core/git";
|
|
10
|
+
import { gitBranchExists, gitCurrentBranch } from "../shared/git-ops.js";
|
|
13
11
|
import { isPathWithin } from "../shared/path.js";
|
|
14
|
-
import { resolveRuntimeSourceInfo } from "../../runtime/shared/runtime-source.js";
|
|
15
12
|
import { loadBackendTask, loadCommandContext, } from "../shared/task-backend.js";
|
|
16
|
-
function isPresentString(value) {
|
|
17
|
-
return value !== null;
|
|
18
|
-
}
|
|
19
13
|
import { ensurePlanApprovedIfRequired } from "../task/shared.js";
|
|
20
14
|
import { validateWorkAgent, validateWorkSlug } from "./internal/work-validate.js";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
`# ${HOOK_SHIM_MARKER} (do not edit)`,
|
|
26
|
-
"set -e",
|
|
27
|
-
'SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"',
|
|
28
|
-
'REPO_ROOT="$(dirname "$(dirname "$SCRIPT_DIR")")"',
|
|
29
|
-
'LOCAL_BIN="$REPO_ROOT/packages/agentplane/bin/agentplane.js"',
|
|
30
|
-
'if command -v node >/dev/null 2>&1 && [ -f "$LOCAL_BIN" ]; then',
|
|
31
|
-
' exec node "$LOCAL_BIN" "$@"',
|
|
32
|
-
"fi",
|
|
33
|
-
'ENV_BIN="${AGENTPLANE_HOOK_RUNNER:-}"',
|
|
34
|
-
'if [ -n "$ENV_BIN" ] && command -v node >/dev/null 2>&1 && [ -f "$ENV_BIN" ]; then',
|
|
35
|
-
' exec node "$ENV_BIN" "$@"',
|
|
36
|
-
"fi",
|
|
37
|
-
"if command -v agentplane >/dev/null 2>&1; then",
|
|
38
|
-
' exec agentplane "$@"',
|
|
39
|
-
"fi",
|
|
40
|
-
"if command -v npx >/dev/null 2>&1; then",
|
|
41
|
-
' exec npx --yes agentplane "$@"',
|
|
42
|
-
"fi",
|
|
43
|
-
'echo "agentplane shim: runner not found (need env runner, repo-local source, agentplane in PATH, or node+npx)." >&2',
|
|
44
|
-
" exit 127",
|
|
45
|
-
"",
|
|
46
|
-
].join("\n");
|
|
47
|
-
}
|
|
48
|
-
function directWorkLockPath(agentplaneDir) {
|
|
49
|
-
// Intentionally under cache/ so it stays out of git by default.
|
|
50
|
-
return path.join(agentplaneDir, "cache", "direct-work.json");
|
|
51
|
-
}
|
|
52
|
-
async function readDirectWorkLock(agentplaneDir) {
|
|
53
|
-
try {
|
|
54
|
-
const text = await readFile(directWorkLockPath(agentplaneDir), "utf8");
|
|
55
|
-
const parsed = JSON.parse(text);
|
|
56
|
-
if (!parsed || typeof parsed !== "object")
|
|
57
|
-
return null;
|
|
58
|
-
if (typeof parsed.task_id !== "string" ||
|
|
59
|
-
typeof parsed.agent !== "string" ||
|
|
60
|
-
typeof parsed.slug !== "string" ||
|
|
61
|
-
typeof parsed.branch !== "string" ||
|
|
62
|
-
typeof parsed.started_at !== "string") {
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
return parsed;
|
|
66
|
-
}
|
|
67
|
-
catch {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
async function writeDirectWorkLock(agentplaneDir, lock) {
|
|
72
|
-
const dir = path.dirname(directWorkLockPath(agentplaneDir));
|
|
73
|
-
await mkdir(dir, { recursive: true });
|
|
74
|
-
await writeFile(directWorkLockPath(agentplaneDir), JSON.stringify(lock, null, 2) + "\n", "utf8");
|
|
75
|
-
}
|
|
76
|
-
async function materializeLocalBackendReadmesForWorktree(opts) {
|
|
77
|
-
if (!(opts.backend instanceof LocalBackend))
|
|
78
|
-
return;
|
|
79
|
-
const sourceRoot = path.resolve(opts.backend.root);
|
|
80
|
-
if (!isPathWithin(opts.repoRoot, sourceRoot))
|
|
81
|
-
return;
|
|
82
|
-
const relativeRoot = path.relative(opts.repoRoot, sourceRoot);
|
|
83
|
-
const targetRoot = path.join(opts.worktreePath, relativeRoot);
|
|
84
|
-
const entries = await readdir(sourceRoot, { withFileTypes: true }).catch(() => []);
|
|
85
|
-
for (const entry of entries) {
|
|
86
|
-
if (!entry.isDirectory())
|
|
87
|
-
continue;
|
|
88
|
-
const sourceTaskRoot = path.join(sourceRoot, entry.name);
|
|
89
|
-
const sourceReadme = path.join(sourceRoot, entry.name, "README.md");
|
|
90
|
-
if (!(await fileExists(sourceReadme)))
|
|
91
|
-
continue;
|
|
92
|
-
const targetReadme = path.join(targetRoot, entry.name, "README.md");
|
|
93
|
-
await mkdir(path.dirname(targetReadme), { recursive: true });
|
|
94
|
-
await copyFile(sourceReadme, targetReadme);
|
|
95
|
-
if (entry.name !== opts.taskId)
|
|
96
|
-
continue;
|
|
97
|
-
// Hand off ownership of the active task README to the task worktree so
|
|
98
|
-
// later merges cannot collide with a stale untracked copy on the base checkout.
|
|
99
|
-
await rm(sourceReadme, { force: true });
|
|
100
|
-
const remainingEntries = await readdir(sourceTaskRoot).catch(() => []);
|
|
101
|
-
if (remainingEntries.length === 0) {
|
|
102
|
-
await rm(sourceTaskRoot, { recursive: true, force: true });
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
async function materializeRepoLocalDistForWorktree(opts) {
|
|
107
|
-
const runtimeSource = resolveRuntimeSourceInfo({ cwd: process.cwd() });
|
|
108
|
-
const sourceRoots = [
|
|
109
|
-
...new Set([
|
|
110
|
-
path.resolve(opts.repoRoot),
|
|
111
|
-
path.resolve(process.cwd()),
|
|
112
|
-
runtimeSource.agentplane.packageRoot
|
|
113
|
-
? path.resolve(runtimeSource.agentplane.packageRoot, "..", "..")
|
|
114
|
-
: null,
|
|
115
|
-
].filter((value) => isPresentString(value))),
|
|
116
|
-
];
|
|
117
|
-
const copyTargets = [
|
|
118
|
-
["packages/core/dist", "packages/core/dist"],
|
|
119
|
-
["packages/agentplane/dist", "packages/agentplane/dist"],
|
|
120
|
-
["packages/agentplane/bin", "packages/agentplane/bin"],
|
|
121
|
-
];
|
|
122
|
-
for (const [sourceRelativePath, targetRelativePath] of copyTargets) {
|
|
123
|
-
let sourcePath = "";
|
|
124
|
-
for (const sourceRoot of sourceRoots) {
|
|
125
|
-
const candidate = path.join(sourceRoot, sourceRelativePath);
|
|
126
|
-
if (await fileExists(candidate)) {
|
|
127
|
-
sourcePath = candidate;
|
|
128
|
-
break;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
if (!sourcePath)
|
|
132
|
-
continue;
|
|
133
|
-
const targetPath = path.join(opts.worktreePath, targetRelativePath);
|
|
134
|
-
if (await fileExists(targetPath))
|
|
135
|
-
continue;
|
|
136
|
-
await mkdir(path.dirname(targetPath), { recursive: true });
|
|
137
|
-
await cp(sourcePath, targetPath, { recursive: true });
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
async function linkDirectoryIntoWorktree(opts) {
|
|
141
|
-
let sourcePath = "";
|
|
142
|
-
for (const sourceRoot of opts.sourceRoots) {
|
|
143
|
-
const candidate = path.join(sourceRoot, opts.relativePath);
|
|
144
|
-
if (await fileExists(candidate)) {
|
|
145
|
-
sourcePath = candidate;
|
|
146
|
-
break;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
if (!sourcePath)
|
|
150
|
-
return false;
|
|
151
|
-
const targetPath = path.join(opts.worktreePath, opts.relativePath);
|
|
152
|
-
if (await fileExists(targetPath))
|
|
153
|
-
return false;
|
|
154
|
-
await mkdir(path.dirname(targetPath), { recursive: true });
|
|
155
|
-
await symlink(sourcePath, targetPath, process.platform === "win32" ? "junction" : "dir");
|
|
156
|
-
return true;
|
|
157
|
-
}
|
|
158
|
-
async function materializeRepoLocalInstallLayoutForWorktree(opts) {
|
|
159
|
-
const runtimeSource = resolveRuntimeSourceInfo({ cwd: process.cwd() });
|
|
160
|
-
const sourceRoots = [
|
|
161
|
-
...new Set([
|
|
162
|
-
path.resolve(opts.repoRoot),
|
|
163
|
-
path.resolve(process.cwd()),
|
|
164
|
-
runtimeSource.agentplane.packageRoot
|
|
165
|
-
? path.resolve(runtimeSource.agentplane.packageRoot, "..", "..")
|
|
166
|
-
: null,
|
|
167
|
-
].filter((value) => isPresentString(value))),
|
|
168
|
-
];
|
|
169
|
-
const linkTargets = [
|
|
170
|
-
"node_modules",
|
|
171
|
-
path.join("packages", "core", "node_modules"),
|
|
172
|
-
path.join("packages", "agentplane", "node_modules"),
|
|
173
|
-
"agentplane-recipes",
|
|
174
|
-
];
|
|
175
|
-
for (const relativePath of linkTargets) {
|
|
176
|
-
await linkDirectoryIntoWorktree({
|
|
177
|
-
sourceRoots,
|
|
178
|
-
worktreePath: opts.worktreePath,
|
|
179
|
-
relativePath,
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
async function materializeHookShimForWorktree(worktreePath) {
|
|
184
|
-
const shimPath = path.join(worktreePath, ".agentplane", "bin", "agentplane");
|
|
185
|
-
if (await fileExists(shimPath))
|
|
186
|
-
return;
|
|
187
|
-
await mkdir(path.dirname(shimPath), { recursive: true });
|
|
188
|
-
await writeFile(shimPath, repoLocalHookShimText(), "utf8");
|
|
189
|
-
await chmod(shimPath, 0o755);
|
|
190
|
-
}
|
|
191
|
-
async function ensureGitClean(gitRoot) {
|
|
192
|
-
const { stdout } = await execFileAsync("git", ["status", "--porcelain"], {
|
|
193
|
-
cwd: gitRoot,
|
|
194
|
-
env: gitEnv(),
|
|
195
|
-
});
|
|
196
|
-
const lines = stdout
|
|
197
|
-
.split("\n")
|
|
198
|
-
.map((line) => line.trimEnd())
|
|
199
|
-
.filter((line) => line.trim().length > 0);
|
|
200
|
-
if (lines.length === 0)
|
|
201
|
-
return;
|
|
202
|
-
// Allow task workflow artifacts to be dirty. In direct mode we want a single-stream
|
|
203
|
-
// workflow without task branches, but we still expect task docs to change.
|
|
204
|
-
const allowedPrefixes = [
|
|
205
|
-
".agentplane/tasks/",
|
|
206
|
-
".agentplane/tasks.json",
|
|
207
|
-
".agentplane/cache/",
|
|
208
|
-
".agentplane/.upgrade/",
|
|
209
|
-
".agentplane/upgrade/",
|
|
210
|
-
];
|
|
211
|
-
const isAllowed = (p) => allowedPrefixes.some((prefix) => p.startsWith(prefix));
|
|
212
|
-
const dirty = lines
|
|
213
|
-
.map((line) => {
|
|
214
|
-
// Format: XY <path> (we only need the path-ish tail).
|
|
215
|
-
const rest = line.slice(2).trim();
|
|
216
|
-
if (!rest)
|
|
217
|
-
return "";
|
|
218
|
-
// Rename/copy format: "old -> new"
|
|
219
|
-
const arrow = rest.lastIndexOf(" -> ");
|
|
220
|
-
if (arrow === -1)
|
|
221
|
-
return rest;
|
|
222
|
-
return rest.slice(arrow + 4).trim();
|
|
223
|
-
})
|
|
224
|
-
.filter((p) => p.length > 0 && !isAllowed(p));
|
|
225
|
-
if (dirty.length === 0)
|
|
226
|
-
return;
|
|
227
|
-
throw new CliError({
|
|
228
|
-
exitCode: exitCodeForError("E_GIT"),
|
|
229
|
-
code: "E_GIT",
|
|
230
|
-
message: "Working tree has non-task changes. In workflow_mode=direct, agentplane runs tasks in a single stream on the current branch; commit/stash your changes before starting a different task.",
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
async function ensureCurrentBaseBranch(gitRoot, baseBranch) {
|
|
234
|
-
const upstreamBranch = await gitBranchUpstream(gitRoot, baseBranch);
|
|
235
|
-
if (!upstreamBranch)
|
|
236
|
-
return;
|
|
237
|
-
const { behind } = await gitAheadBehind(gitRoot, upstreamBranch, baseBranch);
|
|
238
|
-
if (behind === 0)
|
|
239
|
-
return;
|
|
240
|
-
throw new CliError({
|
|
241
|
-
exitCode: exitCodeForError("E_GIT"),
|
|
242
|
-
code: "E_GIT",
|
|
243
|
-
message: `Base branch ${baseBranch} is behind its upstream ${upstreamBranch} by ${behind} commit(s). ` +
|
|
244
|
-
"Refresh the base branch before `agentplane work start` to avoid DIRTY hosted PRs.",
|
|
245
|
-
});
|
|
246
|
-
}
|
|
15
|
+
import { directWorkLockPath, ensureGitClean, readDirectWorkLock, writeDirectWorkLock, } from "./work-start.direct.js";
|
|
16
|
+
import { ensureCurrentBaseBranch, resolveBaseBranch } from "./work-start.git.js";
|
|
17
|
+
import { materializeHookShimForWorktree } from "./work-start.hook-shim.js";
|
|
18
|
+
import { materializeLocalBackendReadmesForWorktree, materializeRepoLocalDistForWorktree, materializeRepoLocalInstallLayoutForWorktree, } from "./work-start.materialize.js";
|
|
247
19
|
export async function cmdWorkStart(opts) {
|
|
248
20
|
try {
|
|
249
21
|
const output = createCliEmitter();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CommandContext } from "../shared/task-backend.js";
|
|
2
|
+
export declare function materializeLocalBackendReadmesForWorktree(opts: {
|
|
3
|
+
backend: CommandContext["taskBackend"];
|
|
4
|
+
repoRoot: string;
|
|
5
|
+
worktreePath: string;
|
|
6
|
+
taskId: string;
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
export declare function materializeRepoLocalDistForWorktree(opts: {
|
|
9
|
+
repoRoot: string;
|
|
10
|
+
worktreePath: string;
|
|
11
|
+
}): Promise<void>;
|
|
12
|
+
export declare function materializeRepoLocalInstallLayoutForWorktree(opts: {
|
|
13
|
+
repoRoot: string;
|
|
14
|
+
worktreePath: string;
|
|
15
|
+
}): Promise<void>;
|
|
16
|
+
//# sourceMappingURL=work-start.materialize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-start.materialize.d.ts","sourceRoot":"","sources":["../../../src/commands/branch/work-start.materialize.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAOhE,wBAAsB,yCAAyC,CAAC,IAAI,EAAE;IACpE,OAAO,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BhB;AAED,wBAAsB,mCAAmC,CAAC,IAAI,EAAE;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BhB;AAyBD,wBAAsB,4CAA4C,CAAC,IAAI,EAAE;IACvE,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CAehB"}
|