agentplane 0.3.17 → 0.3.19
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 +683 -593
- 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-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 +2 -2
- 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/state.js +1 -1
- package/dist/backends/task-backend/shared/constants.d.ts +1 -1
- package/dist/backends/task-backend/shared/constants.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/constants.js +1 -1
- package/dist/backends/task-backend/shared/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/cli/archive.d.ts.map +1 -1
- package/dist/cli/archive.js +1 -1
- 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/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 +266 -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 +18 -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 +50 -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.js +684 -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.map +1 -1
- package/dist/commands/branch/work-start.direct.js +2 -1
- package/dist/commands/branch/work-start.git.d.ts +1 -1
- package/dist/commands/branch/work-start.git.d.ts.map +1 -1
- package/dist/commands/branch/work-start.git.js +2 -2
- package/dist/commands/branch/work-start.js +2 -1
- package/dist/commands/branch/work-start.materialize.d.ts.map +1 -1
- package/dist/commands/branch/work-start.materialize.js +2 -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/runtime.d.ts +1 -1
- package/dist/commands/doctor/runtime.d.ts.map +1 -1
- package/dist/commands/doctor/workflow.js +1 -1
- 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 +2 -1
- 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 +1 -1
- package/dist/commands/hooks/index.d.ts.map +1 -1
- package/dist/commands/hooks/install.js +1 -1
- package/dist/commands/hooks/run.commit-msg.d.ts.map +1 -1
- package/dist/commands/hooks/run.commit-msg.js +3 -2
- package/dist/commands/hooks/run.post-merge.js +1 -1
- package/dist/commands/hooks/run.pre-commit.d.ts.map +1 -1
- package/dist/commands/hooks/run.pre-commit.js +3 -2
- package/dist/commands/hooks/run.pre-push.d.ts.map +1 -1
- package/dist/commands/hooks/run.pre-push.js +4 -3
- 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/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 +4 -0
- package/dist/commands/task/hosted-close-pr.command.d.ts.map +1 -1
- package/dist/commands/task/hosted-close-pr.command.js +4 -0
- package/dist/commands/task/hosted-close-pr.precheck.d.ts.map +1 -1
- package/dist/commands/task/hosted-close-pr.precheck.js +4 -4
- 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 -1
- 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/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 +22 -9
- 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/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/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.js +1 -1
- package/dist/workflow-runtime/markdown.js +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 -170
- 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,5 +1,5 @@
|
|
|
1
|
+
import type { GitContext } from "@agentplaneorg/core/git";
|
|
1
2
|
import type { GitPort } from "../../ports/git-port.js";
|
|
2
|
-
import type { GitContext } from "../../commands/shared/git-context.js";
|
|
3
3
|
export declare class GitContextAdapter implements GitPort {
|
|
4
4
|
private readonly inner;
|
|
5
5
|
constructor(inner: GitContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-context-adapter.d.ts","sourceRoot":"","sources":["../../../src/adapters/git/git-context-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"git-context-adapter.d.ts","sourceRoot":"","sources":["../../../src/adapters/git/git-context-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAEvD,qBAAa,iBAAkB,YAAW,OAAO;IAC/C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;gBAEvB,KAAK,EAAE,UAAU;IAI7B,kBAAkB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAIvC,iBAAiB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAItC,0BAA0B,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAI/C,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAI7B,eAAe;;;;IAIf,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrC,MAAM,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-template.d.ts","sourceRoot":"","sources":["../../src/agents/agents-template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agents-template.d.ts","sourceRoot":"","sources":["../../src/agents/agents-template.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,6BAA6B,CAAC;AAWrC,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,WAAW,CAAC;AAElD,KAAK,aAAa,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAC5D,MAAM,MAAM,cAAc,GAAG;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AA2CxE,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,CAE1D;AAiBD,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC,CAGnE;AAsBD,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CAerE;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM,CASvF;AAQD,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAM5F"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { readdir, readFile } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
3
|
import { policyGatewayFileName, renderPolicyGatewayTemplateText, } from "../shared/policy-gateway.js";
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
import { resolveAgentplaneAssetPath } from "../shared/package-paths.js";
|
|
5
|
+
const AGENTS_TEMPLATE_PATH = resolveAgentplaneAssetPath("AGENTS.md");
|
|
6
|
+
const AGENTS_DIR_PATH = resolveAgentplaneAssetPath("agents");
|
|
7
|
+
const POLICY_DIR_PATH = resolveAgentplaneAssetPath("policy");
|
|
8
8
|
const HEADING_RE = /^(#+)\s+(.*)$/;
|
|
9
|
+
let agentTemplatesCache = null;
|
|
10
|
+
const policyGatewayTemplateCache = new Map();
|
|
9
11
|
function ensureTrailingNewline(text) {
|
|
10
12
|
return text.endsWith("\n") ? text : `${text}\n`;
|
|
11
13
|
}
|
|
@@ -45,8 +47,8 @@ function removeSections(lines, titles) {
|
|
|
45
47
|
export async function loadAgentsTemplate() {
|
|
46
48
|
return loadPolicyGatewayTemplate("codex");
|
|
47
49
|
}
|
|
48
|
-
|
|
49
|
-
const dirPath =
|
|
50
|
+
async function readAgentTemplates() {
|
|
51
|
+
const dirPath = AGENTS_DIR_PATH;
|
|
50
52
|
const entries = await readdir(dirPath);
|
|
51
53
|
const jsonFiles = entries.filter((entry) => entry.endsWith(".json"));
|
|
52
54
|
const templates = [];
|
|
@@ -57,6 +59,10 @@ export async function loadAgentTemplates() {
|
|
|
57
59
|
}
|
|
58
60
|
return templates;
|
|
59
61
|
}
|
|
62
|
+
export async function loadAgentTemplates() {
|
|
63
|
+
agentTemplatesCache ??= readAgentTemplates();
|
|
64
|
+
return agentTemplatesCache;
|
|
65
|
+
}
|
|
60
66
|
async function listFilesRecursive(dirPath, relPrefix = "") {
|
|
61
67
|
const entries = await readdir(dirPath, { withFileTypes: true });
|
|
62
68
|
const sorted = entries.toSorted((a, b) => a.name.localeCompare(b.name));
|
|
@@ -77,7 +83,7 @@ async function listFilesRecursive(dirPath, relPrefix = "") {
|
|
|
77
83
|
return files;
|
|
78
84
|
}
|
|
79
85
|
export async function loadPolicyTemplates() {
|
|
80
|
-
const dirPath =
|
|
86
|
+
const dirPath = POLICY_DIR_PATH;
|
|
81
87
|
const relFiles = await listFilesRecursive(dirPath);
|
|
82
88
|
const templates = [];
|
|
83
89
|
for (const relFile of relFiles) {
|
|
@@ -98,8 +104,16 @@ export function filterAgentsByWorkflow(template, workflow) {
|
|
|
98
104
|
const filtered = removeSections(lines, removeTitles);
|
|
99
105
|
return ensureTrailingNewline(filtered.join("\n").trimEnd());
|
|
100
106
|
}
|
|
101
|
-
|
|
102
|
-
const text = await readFile(
|
|
107
|
+
async function readPolicyGatewayTemplate(flavor) {
|
|
108
|
+
const text = await readFile(AGENTS_TEMPLATE_PATH, "utf8");
|
|
103
109
|
const rendered = renderPolicyGatewayTemplateText(text, policyGatewayFileName(flavor));
|
|
104
110
|
return ensureTrailingNewline(rendered.trimEnd());
|
|
105
111
|
}
|
|
112
|
+
export async function loadPolicyGatewayTemplate(flavor) {
|
|
113
|
+
const cached = policyGatewayTemplateCache.get(flavor);
|
|
114
|
+
if (cached)
|
|
115
|
+
return cached;
|
|
116
|
+
const template = readPolicyGatewayTemplate(flavor);
|
|
117
|
+
policyGatewayTemplateCache.set(flavor, template);
|
|
118
|
+
return template;
|
|
119
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AgentplaneConfig } from "@agentplaneorg/core/config";
|
|
2
|
+
import { type ResolvedProject } from "@agentplaneorg/core/project";
|
|
2
3
|
import { type TaskBackend } from "./shared.js";
|
|
3
4
|
export declare function loadTaskBackend(opts: {
|
|
4
5
|
cwd: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../src/backends/task-backend/load.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../src/backends/task-backend/load.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAWnF,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAwH7D,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B,GAAG,OAAO,CAAC;IACV,OAAO,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,eAAe,CAAC;IAC1B,MAAM,EAAE,gBAAgB,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC,CAUD"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { resolveProject } from "@agentplaneorg/core/project";
|
|
1
2
|
import { readFile } from "node:fs/promises";
|
|
2
3
|
import path from "node:path";
|
|
3
|
-
import { loadConfig
|
|
4
|
+
import { loadConfig } from "@agentplaneorg/core/config";
|
|
4
5
|
import { loadDotEnv } from "../../shared/env.js";
|
|
5
6
|
import { isRecord } from "../../shared/guards.js";
|
|
6
7
|
import { LocalBackend } from "./local-backend.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-backend-doc.d.ts","sourceRoot":"","sources":["../../../src/backends/task-backend/local-backend-doc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-backend-doc.d.ts","sourceRoot":"","sources":["../../../src/backends/task-backend/local-backend-doc.ts"],"names":[],"mappings":"AAiBA,OAAO,EAML,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAElC,wBAAsB,eAAe,CACnC,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,SAAS,CAAC,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,IAAI,CAAC,CAmEf;AAED,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,IAAI,CAAC,CAuCf"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
|
-
import { applyTaskDocMutations, docChanged, parseTaskReadme, renderTaskReadme, taskDocToSectionMap, taskReadmePath,
|
|
2
|
+
import { applyTaskDocMutations, docChanged, parseTaskReadme, renderTaskReadme, taskDocToSectionMap, taskReadmePath, } from "@agentplaneorg/core/tasks";
|
|
3
|
+
import { validateTaskReadmeFrontmatter, withTaskReadmeFrontmatterDefaults, } from "@agentplaneorg/core/schemas";
|
|
3
4
|
import { assertExpectedTaskDoc, assertExpectedTaskSection } from "../../task-doc/conflicts.js";
|
|
4
5
|
import { writeTextIfChanged } from "../../shared/write-if-changed.js";
|
|
5
6
|
import { normalizeDocVersion, nowIso, resolveDocUpdatedByFromFrontmatter, BackendError, mergeTaskDoc, } from "./shared.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-backend-read.d.ts","sourceRoot":"","sources":["../../../src/backends/task-backend/local-backend-read.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-backend-read.d.ts","sourceRoot":"","sources":["../../../src/backends/task-backend/local-backend-read.ts"],"names":[],"mappings":"AAkBA,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AA2CpE,wBAAsB,cAAc,CAClC,OAAO,EAAE,mBAAmB,EAC5B,IAAI,EAAE,MAAM,GAAG,YAAY,GAC1B,OAAO,CAAC,QAAQ,EAAE,GAAG,WAAW,EAAE,CAAC,CAkIrC;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAiB1B;AAED,wBAAsB,aAAa,CACjC,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,CAE9B;AAED,wBAAsB,eAAe,CACnC,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,CAGjB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readdir, readFile, stat } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { parseTaskReadme, taskReadmePath
|
|
3
|
+
import { parseTaskReadme, taskReadmePath } from "@agentplaneorg/core/tasks";
|
|
4
|
+
import { validateTaskReadmeFrontmatter, withTaskReadmeFrontmatterDefaults, } from "@agentplaneorg/core/schemas";
|
|
4
5
|
import { isRecord } from "../../shared/guards.js";
|
|
5
6
|
import { buildTaskIndexEntry, loadTaskIndex, resolveTaskIndexPath, saveTaskIndex, } from "../task-index.js";
|
|
6
7
|
import { mapLimit, taskRecordToData, validateTaskId, } from "./shared.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-backend-state.d.ts","sourceRoot":"","sources":["../../../src/backends/task-backend/local-backend-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"local-backend-state.d.ts","sourceRoot":"","sources":["../../../src/backends/task-backend/local-backend-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAItE,OAAO,EAAgC,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACpD,CAAC;AAEF,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,QAAQ,EAAE,MAAM,GACf,MAAM,CAMR;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;CACzB,GAAG,IAAI,CASP;AAED,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,OAAO,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAW7F;AAED,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,IAAI,EAAE,MAAM,GACX,oBAAoB,CAQtB;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,gBAAgB,GAAG,aAAa,GAAG,OAAO,CAAC,EAC7E,GAAG,EAAE,MAAM,GACV,oBAAoB,CAQtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-backend-write.d.ts","sourceRoot":"","sources":["../../../src/backends/task-backend/local-backend-write.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-backend-write.d.ts","sourceRoot":"","sources":["../../../src/backends/task-backend/local-backend-write.ts"],"names":[],"mappings":"AAoBA,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAgBL,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AAErB,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC,EAC1C,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACzC,OAAO,CAAC,MAAM,CAAC,CAmBjB;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,mBAAmB,EAC5B,IAAI,EAAE,QAAQ,EACd,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,IAAI,CAAC,CAuIf;AAED,wBAAsB,eAAe,CACnC,OAAO,EAAE,mBAAmB,EAC5B,KAAK,EAAE,QAAQ,EAAE,EACjB,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAuH/C;AAED,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAGf;AAED,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mkdir, readdir, readFile } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { applyTaskDocMutations, docChanged, parseTaskReadme, renderTaskReadme, taskDocToSectionMap, taskReadmePath,
|
|
3
|
+
import { applyTaskDocMutations, docChanged, parseTaskReadme, renderTaskReadme, taskDocToSectionMap, taskReadmePath, } from "@agentplaneorg/core/tasks";
|
|
4
|
+
import { validateTaskReadmeFrontmatter, withTaskReadmeFrontmatterDefaults, } from "@agentplaneorg/core/schemas";
|
|
4
5
|
import { isRecord } from "../../shared/guards.js";
|
|
5
6
|
import { writeTextIfChanged } from "../../shared/write-if-changed.js";
|
|
6
7
|
import { listLocalTasks } from "./local-backend-read.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { taskDocToSectionMap } from "@agentplaneorg/core";
|
|
1
|
+
import { taskDocToSectionMap } from "@agentplaneorg/core/tasks";
|
|
2
2
|
import { BackendError, RedmineUnavailable, ensureDocMetadata, mapLimit, redmineConfigMissingEnvMessage, redmineIssueIdMissingMessage, toStringSafe, toTaskSummaries, unknownTaskIdMessage, writeTasksExportFromTasks, } from "../shared.js";
|
|
3
3
|
import { buildRedmineCanonicalStateWithOptions, parseRedmineCanonicalState } from "./state.js";
|
|
4
4
|
function revisionNumber(value) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { canonicalizeJson } from "@agentplaneorg/core";
|
|
1
|
+
import { canonicalizeJson } from "@agentplaneorg/core/tasks";
|
|
2
2
|
import { detectConfiguredFieldNameDrift, inferVisibleCanonicalStateFieldId, inspectVisibleCustomFields, } from "./inspect.js";
|
|
3
3
|
export async function inspectRedmineConfiguration(context) {
|
|
4
4
|
const visibleCustomFields = await inspectVisibleCustomFields({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { taskDocToSectionMap } from "@agentplaneorg/core";
|
|
1
|
+
import { taskDocToSectionMap } from "@agentplaneorg/core/tasks";
|
|
2
2
|
import { BackendError, redmineConfigMissingEnvMessage, redmineIssueIdMissingMessage, sleep, toStringSafe, } from "../../shared.js";
|
|
3
3
|
import { buildRedmineCanonicalStateWithOptions, parseRedmineCanonicalState } from "../state.js";
|
|
4
4
|
import { revisionNumber } from "./context.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../../../src/backends/task-backend/redmine/backend-sync/status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../../../src/backends/task-backend/redmine/backend-sync/status.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,wBAAsB,iCAAiC,CACrD,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CASxB;AAED,wBAAsB,qCAAqC,CACzD,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAuC9B;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,EAAE,EAC/E,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAChC,MAAM,GAAG,IAAI,CA6Bf"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { normalizeTaskStatus } from "@agentplaneorg/core/tasks";
|
|
1
2
|
import { toStringSafe } from "../../shared.js";
|
|
2
3
|
export async function inferRedmineStatusIdForTaskStatus(context, statusRaw) {
|
|
3
|
-
const status = toStringSafe(statusRaw)
|
|
4
|
+
const status = normalizeTaskStatus(toStringSafe(statusRaw));
|
|
4
5
|
if (!status)
|
|
5
6
|
return null;
|
|
6
7
|
const explicit = context.statusMap?.[status];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { taskDocToSectionMap } from "@agentplaneorg/core";
|
|
1
|
+
import { taskDocToSectionMap } from "@agentplaneorg/core/tasks";
|
|
2
2
|
import { missingTaskIdMessage, RedmineUnavailable, sleep, toStringSafe, validateTaskId, } from "../../shared.js";
|
|
3
3
|
import { parseRedmineCanonicalState } from "../state.js";
|
|
4
4
|
import { issueFromPayload, revisionNumber } from "./context.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TaskDocVersion } from "@agentplaneorg/core/tasks";
|
|
2
2
|
import { type TaskData } from "../shared.js";
|
|
3
3
|
export declare function startDateFromTaskId(taskId: string): string | null;
|
|
4
4
|
export declare function doneRatioForStatus(status: string): number | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/redmine/mapping.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/redmine/mapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAShE,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,cAAc,CAAC;AAOtB,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CASjE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIhE;AA2BD,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,cAAc,CAAC;CACnC,GAAG,QAAQ,GAAG,IAAI,CAgGlB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,IAAI,EAAE,QAAQ,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7F,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA6C1B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { renderTaskDocFromSections, taskDocToSectionMap, } from "@agentplaneorg/core";
|
|
1
|
+
import { normalizeTaskStatus, renderTaskDocFromSections, taskDocToSectionMap, } from "@agentplaneorg/core/tasks";
|
|
2
2
|
import { isRecord } from "../../../shared/guards.js";
|
|
3
3
|
import { ensureDocMetadata, normalizeTaskOrigin, normalizePriority, nowIso, toStringSafe, } from "../shared.js";
|
|
4
4
|
import { customFieldValue } from "./fields.js";
|
|
@@ -145,7 +145,7 @@ export function issueToTask(opts) {
|
|
|
145
145
|
return task;
|
|
146
146
|
}
|
|
147
147
|
export function taskToIssuePayload(opts) {
|
|
148
|
-
const status =
|
|
148
|
+
const status = normalizeTaskStatus(opts.task.status);
|
|
149
149
|
const payload = {
|
|
150
150
|
subject: toStringSafe(opts.task.title),
|
|
151
151
|
description: toStringSafe(opts.task.description),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TaskDocVersion } from "@agentplaneorg/core/tasks";
|
|
2
2
|
export declare function maybeParseJson(value: unknown): unknown;
|
|
3
3
|
export declare function coerceDocVersion(value: unknown): TaskDocVersion | null;
|
|
4
4
|
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/redmine/parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/redmine/parse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAYtD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,GAAG,IAAI,CAOtE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { taskDocToSectionMap } from "@agentplaneorg/core";
|
|
1
|
+
import { taskDocToSectionMap } from "@agentplaneorg/core/tasks";
|
|
2
2
|
import { isRecord } from "../../../shared/guards.js";
|
|
3
3
|
import { normalizeEvents } from "../shared/events.js";
|
|
4
4
|
import { normalizePlanApproval, normalizeTaskOrigin, normalizeTaskRunnerOutcome, normalizeVerificationResult, } from "../shared/normalize.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TaskDocVersion } from "@agentplaneorg/core/tasks";
|
|
2
2
|
export declare const TASK_ID_RE: RegExp;
|
|
3
3
|
export declare const DEFAULT_DOC_UPDATED_BY = "agentplane";
|
|
4
4
|
export declare const DOC_VERSION: TaskDocVersion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/shared/constants.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/shared/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,eAAO,MAAM,UAAU,QAA6D,CAAC;AACrF,eAAO,MAAM,sBAAsB,eAAe,CAAC;AACnD,eAAO,MAAM,WAAW,EAAE,cAAkB,CAAC;AAC7C,eAAO,MAAM,sBAAsB,cAAe,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TASK_ID_ALPHABET } from "@agentplaneorg/core";
|
|
1
|
+
import { TASK_ID_ALPHABET } from "@agentplaneorg/core/tasks";
|
|
2
2
|
export const TASK_ID_RE = new RegExp(String.raw `^\d{12}-[${TASK_ID_ALPHABET}]{4,}$`);
|
|
3
3
|
export const DEFAULT_DOC_UPDATED_BY = "agentplane";
|
|
4
4
|
export const DOC_VERSION = 3;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractTaskDoc as extractTaskDocCore, mergeTaskDoc as mergeTaskDocCore, normalizeTaskDocVersion as normalizeTaskDocVersionCore, resolveTaskDocUpdatedBy, } from "@agentplaneorg/core";
|
|
1
|
+
import { extractTaskDoc as extractTaskDocCore, mergeTaskDoc as mergeTaskDocCore, normalizeTaskDocVersion as normalizeTaskDocVersionCore, resolveTaskDocUpdatedBy, } from "@agentplaneorg/core/tasks";
|
|
2
2
|
import { isRecord } from "../../../shared/guards.js";
|
|
3
3
|
import { DEFAULT_DOC_UPDATED_BY, DOC_VERSION } from "./constants.js";
|
|
4
4
|
const extractTaskDoc = extractTaskDocCore;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type TasksExportSnapshot } from "@agentplaneorg/core";
|
|
1
|
+
import { type TasksExportSnapshot } from "@agentplaneorg/core/tasks";
|
|
2
2
|
import type { TaskData } from "./types.js";
|
|
3
3
|
export declare function buildTasksExportSnapshotFromTasks(tasks: TaskData[]): TasksExportSnapshot;
|
|
4
4
|
export declare function writeTasksExportFromTasks(opts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/shared/export.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/shared/export.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAC;AASnC,OAAO,KAAK,EAAE,QAAQ,EAAa,MAAM,YAAY,CAAC;AAqGtD,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,mBAAmB,CAcxF;AAED,wBAAsB,yBAAyB,CAAC,IAAI,EAAE;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { mkdir } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { canonicalizeJson,
|
|
4
|
+
import { canonicalizeJson, normalizeTaskStatus, } from "@agentplaneorg/core/tasks";
|
|
5
|
+
import { validateTasksExportSnapshot } from "@agentplaneorg/core/schemas";
|
|
5
6
|
import { writeJsonStableIfChanged } from "../../../shared/write-if-changed.js";
|
|
6
7
|
import { DEFAULT_DOC_UPDATED_BY } from "./constants.js";
|
|
7
8
|
import { normalizeDocVersion, resolveDocUpdatedByFromTask } from "./doc.js";
|
|
@@ -13,18 +14,6 @@ const DEFAULT_EXPORT_OWNER = "UNKNOWN";
|
|
|
13
14
|
function normalizeExportTitle(value) {
|
|
14
15
|
return typeof value === "string" && value.trim().length > 0 ? value.trim() : DEFAULT_EXPORT_TITLE;
|
|
15
16
|
}
|
|
16
|
-
function normalizeExportStatus(value) {
|
|
17
|
-
if (typeof value === "string") {
|
|
18
|
-
const normalized = value.trim().toUpperCase();
|
|
19
|
-
if (normalized === "TODO" ||
|
|
20
|
-
normalized === "DOING" ||
|
|
21
|
-
normalized === "DONE" ||
|
|
22
|
-
normalized === "BLOCKED") {
|
|
23
|
-
return normalized;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return "TODO";
|
|
27
|
-
}
|
|
28
17
|
function normalizeExportOwner(value) {
|
|
29
18
|
return typeof value === "string" && value.trim().length > 0 ? value.trim() : DEFAULT_EXPORT_OWNER;
|
|
30
19
|
}
|
|
@@ -55,7 +44,7 @@ function taskDataToExport(task) {
|
|
|
55
44
|
id: task.id,
|
|
56
45
|
title: normalizeExportTitle(task.title),
|
|
57
46
|
description: task.description ?? "",
|
|
58
|
-
status:
|
|
47
|
+
status: normalizeTaskStatus(task.status),
|
|
59
48
|
priority: normalizeExportPriority(task.priority),
|
|
60
49
|
owner: normalizeExportOwner(task.owner),
|
|
61
50
|
result_summary: typeof task.result_summary === "string" ? task.result_summary : undefined,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { generateTaskId as generateTaskIdCore } from "@agentplaneorg/core";
|
|
1
|
+
import { generateTaskId as generateTaskIdCore } from "@agentplaneorg/core/tasks";
|
|
2
2
|
import { TASK_ID_RE } from "./constants.js";
|
|
3
3
|
export const generateTaskId = generateTaskIdCore;
|
|
4
4
|
export function validateTaskId(taskId) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TaskRecord } from "@agentplaneorg/core/tasks";
|
|
2
2
|
import type { TaskData } from "./types.js";
|
|
3
3
|
export declare function taskRecordToData(record: TaskRecord): TaskData;
|
|
4
4
|
//# sourceMappingURL=record.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/shared/record.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/shared/record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAoB5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAiB3C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,QAAQ,CAgE7D"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { normalizeTaskDocVersion } from "@agentplaneorg/core";
|
|
1
|
+
import { normalizeTaskStatus, normalizeTaskDocVersion, renderTaskDocFromSections, taskDocToSectionMap, } from "@agentplaneorg/core/tasks";
|
|
2
2
|
import { isRecord } from "../../../shared/guards.js";
|
|
3
3
|
import { extractTaskDoc } from "./doc.js";
|
|
4
4
|
import { normalizeEvents } from "./events.js";
|
|
5
5
|
import { normalizeDependsOn, normalizePlanApproval, normalizeTaskOrigin, normalizeTaskRunnerOutcome, normalizeVerificationResult, } from "./normalize.js";
|
|
6
6
|
import { toStringArray } from "./strings.js";
|
|
7
|
-
import { renderTaskDocFromSections, taskDocToSectionMap } from "@agentplaneorg/core";
|
|
8
7
|
function normalizeRevision(value) {
|
|
9
8
|
return Number.isInteger(value) && Number(value) > 0 ? Number(value) : undefined;
|
|
10
9
|
}
|
|
@@ -50,7 +49,7 @@ export function taskRecordToData(record) {
|
|
|
50
49
|
: undefined,
|
|
51
50
|
breaking: typeof fm.breaking === "boolean" ? fm.breaking : undefined,
|
|
52
51
|
description: typeof fm.description === "string" ? fm.description : "",
|
|
53
|
-
status:
|
|
52
|
+
status: normalizeTaskStatus(fm.status),
|
|
54
53
|
priority: typeof fm.priority === "string" || typeof fm.priority === "number" ? fm.priority : "",
|
|
55
54
|
owner: typeof fm.owner === "string" ? fm.owner : "",
|
|
56
55
|
revision: normalizeRevision(fm.revision) ?? 1,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PlanApproval, TaskDocSections, TaskDocVersion, TaskEvent, TaskOrigin, TaskRunnerOutcome, VerificationResult } from "@agentplaneorg/core";
|
|
2
|
-
export
|
|
1
|
+
import type { PlanApproval, TaskDocSections, TaskDocVersion, TaskEvent, TaskOrigin, TaskRunnerOutcome, VerificationResult } from "@agentplaneorg/core/tasks";
|
|
2
|
+
export { PlanApproval, PlanApprovalState, TaskEvent, TaskEventType, TaskOrigin, TaskRunnerEvidence, TaskRunnerExecutionMetrics, TaskRunnerHistoryEntry, TaskRunnerOutcome, TaskRunnerOutcomeStatus, TaskRunnerTarget, VerificationResult, VerificationState, } from "@agentplaneorg/core/tasks";
|
|
3
3
|
export type TaskData = {
|
|
4
4
|
id: string;
|
|
5
5
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/shared/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,cAAc,EACd,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/shared/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,cAAc,EACd,SAAS,EACT,UAAU,EACV,iBAAiB,EACj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G;IAClC,wBAAwB,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,eAAe,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,UAAU,CAAC,CACT,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,SAAS,CAAC,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,oBAAoB,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnG,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,cAAc,CAAC,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9E,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,eAAe,GACvC,oBAAoB,GACpB,yBAAyB,GACzB,uBAAuB,GACvB,mBAAmB,GACnB,yBAAyB,GACzB,qBAAqB,GACrB,kBAAkB,GAClB,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../src/cli/archive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../src/cli/archive.ts"],"names":[],"mappings":"AASA,KAAK,WAAW,GAAG,KAAK,GAAG,KAAK,CAAC;AAOjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,WAAW,GAChB,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAS9B;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAKtE;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBhB;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CA2BjG"}
|
package/dist/cli/archive.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { gunzipSync } from "node:zlib";
|
|
4
|
-
import { runProcess } from "@agentplaneorg/core";
|
|
4
|
+
import { runProcess } from "@agentplaneorg/core/process";
|
|
5
5
|
import yauzl from "yauzl";
|
|
6
6
|
import { CliError } from "../shared/errors.js";
|
|
7
7
|
import { exitCodeForError } from "./exit-codes.js";
|
|
@@ -5,6 +5,7 @@ export type GroupCommandParsed = {
|
|
|
5
5
|
export declare function parseGroupCommand(raw: ParsedRaw, argName?: string): GroupCommandParsed;
|
|
6
6
|
export declare function directSubcommandNames(prefix: CommandId, specs: readonly CommandSpec<unknown>[]): string[];
|
|
7
7
|
export declare function directSubcommandNamesFromIds(prefix: CommandId, ids: readonly CommandId[]): string[];
|
|
8
|
+
export declare function setDirectSubcommandNamesLoader(loader: (prefix: CommandId) => Promise<readonly string[]>): void;
|
|
8
9
|
export declare function loadDirectSubcommandNames(prefix: CommandId): Promise<readonly string[]>;
|
|
9
10
|
export declare function throwGroupCommandUsage(opts: {
|
|
10
11
|
spec: CommandSpec<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-command.d.ts","sourceRoot":"","sources":["../../src/cli/group-command.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAExE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,MAAM,EAAE,CAAC;CACf,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,SAAQ,GAAG,kBAAkB,CAKrF;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,SAAS,WAAW,CAAC,OAAO,CAAC,EAAE,GACrC,MAAM,EAAE,CAKV;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,SAAS,EACjB,GAAG,EAAE,SAAS,SAAS,EAAE,GACxB,MAAM,EAAE,CASV;AAED,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"group-command.d.ts","sourceRoot":"","sources":["../../src/cli/group-command.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAExE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,MAAM,EAAE,CAAC;CACf,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,SAAQ,GAAG,kBAAkB,CAKrF;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,SAAS,WAAW,CAAC,OAAO,CAAC,EAAE,GACrC,MAAM,EAAE,CAKV;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,SAAS,EACjB,GAAG,EAAE,SAAS,SAAS,EAAE,GACxB,MAAM,EAAE,CASV;AAID,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,GACxD,IAAI,CAEN;AAED,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAG7F;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAC3C,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC3B,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;CACjD,GAAG,KAAK,CAcR"}
|
|
@@ -24,10 +24,14 @@ export function directSubcommandNamesFromIds(prefix, ids) {
|
|
|
24
24
|
}
|
|
25
25
|
return [...names].toSorted((left, right) => left.localeCompare(right));
|
|
26
26
|
}
|
|
27
|
+
let directSubcommandNamesLoader = null;
|
|
28
|
+
export function setDirectSubcommandNamesLoader(loader) {
|
|
29
|
+
directSubcommandNamesLoader = loader;
|
|
30
|
+
}
|
|
27
31
|
export async function loadDirectSubcommandNames(prefix) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return
|
|
32
|
+
if (!directSubcommandNamesLoader)
|
|
33
|
+
return [];
|
|
34
|
+
return await directSubcommandNamesLoader(prefix);
|
|
31
35
|
}
|
|
32
36
|
export function throwGroupCommandUsage(opts) {
|
|
33
37
|
const input = opts.cmd.join(" ");
|
package/dist/cli/output.d.ts
CHANGED
package/dist/cli/output.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../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AgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExF;AA4BD,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE;IACzC,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,UAAU,CAsEb;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CA2BlF;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,IAAI,CAI9F"}
|
package/dist/cli/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/cli/prompts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/cli/prompts.ts"],"names":[],"mappings":"AAqBA,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EAAE,EACjB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,CAAC,CA0BjB;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAuBzF;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAejE"}
|
package/dist/cli/prompts.js
CHANGED
|
@@ -4,13 +4,15 @@ function shouldUseClackPrompts() {
|
|
|
4
4
|
process.stdin.isTTY === true &&
|
|
5
5
|
process.stdout.isTTY === true);
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
let clackPromptsPromise = null;
|
|
8
|
+
function getClackPrompts() {
|
|
8
9
|
if (!shouldUseClackPrompts())
|
|
9
|
-
return null;
|
|
10
|
-
|
|
10
|
+
return Promise.resolve(null);
|
|
11
|
+
clackPromptsPromise ??= import("@clack/prompts");
|
|
12
|
+
return clackPromptsPromise;
|
|
11
13
|
}
|
|
12
14
|
export async function promptChoice(prompt, choices, defaultValue) {
|
|
13
|
-
const clack = await
|
|
15
|
+
const clack = await getClackPrompts();
|
|
14
16
|
if (clack) {
|
|
15
17
|
const answer = await clack.select({
|
|
16
18
|
message: prompt,
|
|
@@ -37,7 +39,7 @@ export async function promptChoice(prompt, choices, defaultValue) {
|
|
|
37
39
|
return trimmed;
|
|
38
40
|
}
|
|
39
41
|
export async function promptYesNo(prompt, defaultValue) {
|
|
40
|
-
const clack = await
|
|
42
|
+
const clack = await getClackPrompts();
|
|
41
43
|
if (clack) {
|
|
42
44
|
const answer = await clack.confirm({
|
|
43
45
|
message: prompt,
|
|
@@ -63,7 +65,7 @@ export async function promptYesNo(prompt, defaultValue) {
|
|
|
63
65
|
return defaultValue;
|
|
64
66
|
}
|
|
65
67
|
export async function promptInput(prompt) {
|
|
66
|
-
const clack = await
|
|
68
|
+
const clack = await getClackPrompts();
|
|
67
69
|
if (clack) {
|
|
68
70
|
const answer = await clack.text({ message: prompt });
|
|
69
71
|
if (clack.isCancel(answer)) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type CommandEntry } from "./
|
|
1
|
+
import { type CommandEntry } from "./kernel.js";
|
|
2
2
|
export declare const CORE_COMMANDS: readonly [CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry];
|
|
3
3
|
//# sourceMappingURL=core.d.ts.map
|