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,258 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { doneRatioForStatus, issueToTask as issueToTaskImpl, startDateFromTaskId, taskToIssuePayload as taskToIssuePayloadImpl, } from "./mapping.js";
|
|
6
|
-
import { maybeParseJson as maybeParseRedmineJson } from "./parse.js";
|
|
7
|
-
import { findIssueByTaskId as findIssueByTaskIdImpl, listTasksRemote as listTasksRemoteImpl, } from "./remote.js";
|
|
8
|
-
import { diffRedmineTasks, redmineTasksDiffer } from "./backend-report.js";
|
|
9
|
-
export function createRedmineCacheDocContext(host) {
|
|
10
|
-
return {
|
|
11
|
-
cache: host.cache,
|
|
12
|
-
customFields: host.customFields,
|
|
13
|
-
ownerAgent: host.ownerAgent,
|
|
14
|
-
batchSize: host.batchSize,
|
|
15
|
-
findIssueByTaskId: async (taskId) => await host.findIssueByTaskId(taskId),
|
|
16
|
-
issueToTask: (issue, taskIdOverride) => host.issueToTask(issue, taskIdOverride),
|
|
17
|
-
customFieldValue: (issue, fieldId) => host.customFieldValue(issue, fieldId),
|
|
18
|
-
appendCustomField: (fields, key, value) => host.appendCustomField(fields, key, value),
|
|
19
|
-
requestJson: async (method, reqPath, payload, params) => await host.requestJson(method, reqPath, payload, params),
|
|
20
|
-
assertExpectedRevisionSupported: (taskId, opts) => host.assertExpectedRevisionSupported(taskId, opts),
|
|
21
|
-
assertExpectedRevision: (taskId, expectedRevision, currentRevision) => host.assertExpectedRevision(taskId, expectedRevision, currentRevision),
|
|
22
|
-
cacheTask: async (task, dirty) => await host.cacheTask(task, dirty),
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export function createRedmineReportContext(host) {
|
|
26
|
-
return {
|
|
27
|
-
projectId: host.projectId,
|
|
28
|
-
customFields: host.customFields,
|
|
29
|
-
requestJson: async (method, reqPath, payload, params) => await host.requestJson(method, reqPath, payload, params),
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
export function createRedmineSyncContext(host) {
|
|
33
|
-
return {
|
|
34
|
-
cache: host.cache,
|
|
35
|
-
customFields: host.customFields,
|
|
36
|
-
ownerAgent: host.ownerAgent,
|
|
37
|
-
projectId: host.projectId,
|
|
38
|
-
batchSize: host.batchSize,
|
|
39
|
-
batchPauseMs: host.batchPauseMs,
|
|
40
|
-
statusMap: host.statusMap,
|
|
41
|
-
issueCache: host.issueCache,
|
|
42
|
-
inferredStatusByTaskStatus: host.inferredStatusByTaskStatus,
|
|
43
|
-
setInferredStatusByTaskStatus: host.setInferredStatusByTaskStatus,
|
|
44
|
-
listTasksRemote: async () => await host.listTasksRemote(),
|
|
45
|
-
writeTask: async (task, opts) => await host.writeTask(task, opts),
|
|
46
|
-
writeTasks: async (tasks, opts) => await host.writeTasks(tasks, opts),
|
|
47
|
-
findIssueByTaskId: async (taskId) => await host.findIssueByTaskId(taskId),
|
|
48
|
-
issueToTask: (issue, taskIdOverride) => host.issueToTask(issue, taskIdOverride),
|
|
49
|
-
taskToIssuePayload: (task, existingIssue) => host.taskToIssuePayload(task, existingIssue),
|
|
50
|
-
appendCustomField: (fields, key, value) => host.appendCustomField(fields, key, value),
|
|
51
|
-
customFieldValue: (issue, fieldId) => host.customFieldValue(issue, fieldId),
|
|
52
|
-
maybeParseJson: (value) => host.maybeParseJson(value),
|
|
53
|
-
normalizeComments: (value) => host.normalizeComments(value),
|
|
54
|
-
appendCommentNotes: async (issueId, existingComments, desiredComments) => await host.appendCommentNotes(issueId, existingComments, desiredComments),
|
|
55
|
-
cacheTask: async (task, dirty) => await host.cacheTask(task, dirty),
|
|
56
|
-
assertExpectedRevisionSupported: (taskId, opts) => host.assertExpectedRevisionSupported(taskId, opts),
|
|
57
|
-
assertExpectedRevision: (taskId, expectedRevision, currentRevision) => host.assertExpectedRevision(taskId, expectedRevision, currentRevision),
|
|
58
|
-
ensureDocMetadata: (task) => host.ensureDocMetadata(task),
|
|
59
|
-
diffTasks: (localTask, remoteTask) => host.diffTasks(localTask, remoteTask),
|
|
60
|
-
tasksDiffer: (localTask, remoteTask) => host.tasksDiffer(localTask, remoteTask),
|
|
61
|
-
taskIdFieldId: () => host.taskIdFieldId(),
|
|
62
|
-
setIssueCustomFieldValue: (issue, fieldId, value) => host.setIssueCustomFieldValue(issue, fieldId, value),
|
|
63
|
-
requestJson: async (method, reqPath, payload, params, opts) => await host.requestJson(method, reqPath, payload, params, opts),
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
export function ensureRedmineDocMetadata(task) {
|
|
67
|
-
if (task.doc === undefined)
|
|
68
|
-
return;
|
|
69
|
-
task.doc_version = normalizeDocVersion(task.doc_version);
|
|
70
|
-
task.doc_updated_at ??= nowIso();
|
|
71
|
-
task.doc_updated_by ??= DEFAULT_DOC_UPDATED_BY;
|
|
72
|
-
}
|
|
73
|
-
export async function cacheRedmineTask(host, task, dirty) {
|
|
74
|
-
if (!host.cache)
|
|
75
|
-
return;
|
|
76
|
-
const next = { ...task, dirty };
|
|
77
|
-
await host.cache.writeTask(next);
|
|
78
|
-
}
|
|
79
|
-
export function assertRedmineExpectedRevisionSupported(host, taskId, opts) {
|
|
80
|
-
if (opts?.expectedRevision === undefined)
|
|
81
|
-
return;
|
|
82
|
-
if (host.capabilities.supports_revision_guarded_writes)
|
|
83
|
-
return;
|
|
84
|
-
throw new BackendError(`Task revision guarding is unavailable for ${taskId} without AGENTPLANE_REDMINE_CUSTOM_FIELDS_CANONICAL_STATE`, "E_BACKEND");
|
|
85
|
-
}
|
|
86
|
-
export function assertRedmineExpectedRevision(taskId, expectedRevision, currentRevision) {
|
|
87
|
-
if (expectedRevision === undefined)
|
|
88
|
-
return;
|
|
89
|
-
const expected = Math.trunc(expectedRevision);
|
|
90
|
-
if (expected <= 0 || expected === currentRevision)
|
|
91
|
-
return;
|
|
92
|
-
throw new BackendError(`Task revision changed concurrently: ${taskId} ` +
|
|
93
|
-
`(expected revision ${expected}, current revision ${currentRevision})`, "E_BACKEND");
|
|
94
|
-
}
|
|
95
|
-
export function redmineTaskIdFieldId(host) {
|
|
96
|
-
const fieldId = host.customFields?.task_id;
|
|
97
|
-
if (fieldId)
|
|
98
|
-
return fieldId;
|
|
99
|
-
throw new BackendError(redmineConfigMissingEnvMessage("AGENTPLANE_REDMINE_CUSTOM_FIELDS_TASK_ID"), "E_BACKEND");
|
|
100
|
-
}
|
|
101
|
-
export function setRedmineIssueCustomField(issue, fieldId, value) {
|
|
102
|
-
setRedmineIssueCustomFieldValue(issue, fieldId, value);
|
|
103
|
-
}
|
|
104
|
-
export async function listRedmineRemoteTasks(host) {
|
|
105
|
-
const taskFieldId = redmineTaskIdFieldId(host);
|
|
106
|
-
return await listTasksRemoteImpl({
|
|
107
|
-
projectId: host.projectId,
|
|
108
|
-
taskFieldId,
|
|
109
|
-
issueCache: host.issueCache,
|
|
110
|
-
requestJson: async (method, reqPath, payload, params) => await host.requestJson(method, reqPath, payload, params),
|
|
111
|
-
customFieldValue: (issue, fieldId) => host.customFieldValue(issue, fieldId),
|
|
112
|
-
issueToTask: (issue, taskIdOverride) => host.issueToTask(issue, taskIdOverride),
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
export async function findRedmineIssueByTaskId(host, taskId) {
|
|
116
|
-
const taskFieldId = redmineTaskIdFieldId(host);
|
|
117
|
-
return await findIssueByTaskIdImpl({
|
|
118
|
-
taskId,
|
|
119
|
-
projectId: host.projectId,
|
|
120
|
-
taskFieldId,
|
|
121
|
-
issueCache: host.issueCache,
|
|
122
|
-
requestJson: async (method, reqPath, payload, params) => await host.requestJson(method, reqPath, payload, params),
|
|
123
|
-
customFieldValue: (issue, fieldId) => host.customFieldValue(issue, fieldId),
|
|
124
|
-
refreshList: async () => {
|
|
125
|
-
await host.listTasksRemote();
|
|
126
|
-
},
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
export function redmineIssueToTask(host, issue, taskIdOverride) {
|
|
130
|
-
return issueToTaskImpl({
|
|
131
|
-
issue,
|
|
132
|
-
taskIdOverride,
|
|
133
|
-
reverseStatus: host.reverseStatus,
|
|
134
|
-
customFields: host.customFields,
|
|
135
|
-
ownerAgent: host.ownerAgent,
|
|
136
|
-
defaultDocVersion: DOC_VERSION,
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
export function redmineTaskToIssuePayload(host, task, existingIssue) {
|
|
140
|
-
return taskToIssuePayloadImpl({
|
|
141
|
-
task,
|
|
142
|
-
existingIssue,
|
|
143
|
-
statusMap: host.statusMap,
|
|
144
|
-
assigneeId: host.assigneeId,
|
|
145
|
-
customFields: host.customFields,
|
|
146
|
-
appendCustomField: (fields, key, value) => appendRedmineBackendCustomField(host, fields, key, value),
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
export function appendRedmineBackendCustomField(host, fields, key, value) {
|
|
150
|
-
appendRedmineCustomField({ customFields: host.customFields, fields, key, value });
|
|
151
|
-
}
|
|
152
|
-
export function normalizeRedmineBackendComments(value) {
|
|
153
|
-
return normalizeCommentsImpl(value);
|
|
154
|
-
}
|
|
155
|
-
export async function appendRedmineBackendCommentNotes(host, issueId, existingComments, desiredComments) {
|
|
156
|
-
await appendCommentNotesImpl({
|
|
157
|
-
issueId,
|
|
158
|
-
existingComments,
|
|
159
|
-
desiredComments,
|
|
160
|
-
requestJson: async (method, reqPath, payload, params) => await requestRedmineBackendJson(host, method, reqPath, payload, params),
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
export function redmineBackendCustomFieldValue(issue, fieldId) {
|
|
164
|
-
return redmineCustomFieldValue(issue, fieldId);
|
|
165
|
-
}
|
|
166
|
-
export function maybeParseRedmineBackendJson(value) {
|
|
167
|
-
return maybeParseRedmineJson(value);
|
|
168
|
-
}
|
|
169
|
-
export function coerceRedmineBackendDocVersion(value) {
|
|
170
|
-
if (value === 2 || value === 3)
|
|
171
|
-
return value;
|
|
172
|
-
return null;
|
|
173
|
-
}
|
|
174
|
-
export async function requestRedmineBackendJson(host, method, reqPath, payload, params, opts) {
|
|
175
|
-
return await requestRedmineJson({ baseUrl: host.baseUrl, apiKey: host.apiKey }, method, reqPath, payload, params, opts);
|
|
176
|
-
}
|
|
177
|
-
export const redmineBackendRuntimeMethods = {
|
|
178
|
-
setInferredStatusByTaskStatus(next) {
|
|
179
|
-
this.inferredStatusByTaskStatus = next;
|
|
180
|
-
},
|
|
181
|
-
ensureDocMetadata(task) {
|
|
182
|
-
ensureRedmineDocMetadata(task);
|
|
183
|
-
},
|
|
184
|
-
async cacheTask(task, dirty) {
|
|
185
|
-
await cacheRedmineTask(this, task, dirty);
|
|
186
|
-
},
|
|
187
|
-
assertExpectedRevisionSupported(taskId, opts) {
|
|
188
|
-
assertRedmineExpectedRevisionSupported(this, taskId, opts);
|
|
189
|
-
},
|
|
190
|
-
assertExpectedRevision(taskId, expectedRevision, currentRevision) {
|
|
191
|
-
assertRedmineExpectedRevision(taskId, expectedRevision, currentRevision);
|
|
192
|
-
},
|
|
193
|
-
taskIdFieldId() {
|
|
194
|
-
return redmineTaskIdFieldId(this);
|
|
195
|
-
},
|
|
196
|
-
setIssueCustomFieldValue(issue, fieldId, value) {
|
|
197
|
-
setRedmineIssueCustomField(issue, fieldId, value);
|
|
198
|
-
},
|
|
199
|
-
async listTasksRemote() {
|
|
200
|
-
return await listRedmineRemoteTasks(this);
|
|
201
|
-
},
|
|
202
|
-
async findIssueByTaskId(taskId) {
|
|
203
|
-
return await findRedmineIssueByTaskId(this, taskId);
|
|
204
|
-
},
|
|
205
|
-
issueToTask(issue, taskIdOverride) {
|
|
206
|
-
return redmineIssueToTask(this, issue, taskIdOverride);
|
|
207
|
-
},
|
|
208
|
-
taskToIssuePayload(task, existingIssue) {
|
|
209
|
-
return redmineTaskToIssuePayload(this, task, existingIssue);
|
|
210
|
-
},
|
|
211
|
-
appendCustomField(fields, key, value) {
|
|
212
|
-
appendRedmineBackendCustomField(this, fields, key, value);
|
|
213
|
-
},
|
|
214
|
-
normalizeComments(value) {
|
|
215
|
-
return normalizeRedmineBackendComments(value);
|
|
216
|
-
},
|
|
217
|
-
commentsToPairs(comments) {
|
|
218
|
-
const pairs = [];
|
|
219
|
-
for (const comment of comments) {
|
|
220
|
-
const author = toStringSafe(comment.author).trim();
|
|
221
|
-
const body = toStringSafe(comment.body).trim();
|
|
222
|
-
if (!author && !body)
|
|
223
|
-
continue;
|
|
224
|
-
pairs.push([author, body]);
|
|
225
|
-
}
|
|
226
|
-
return pairs;
|
|
227
|
-
},
|
|
228
|
-
formatCommentNote(author = "unknown", body = "") {
|
|
229
|
-
return `[comment] ${author}: ${body}`.trim();
|
|
230
|
-
},
|
|
231
|
-
async appendCommentNotes(issueId, existingComments, desiredComments) {
|
|
232
|
-
await appendRedmineBackendCommentNotes(this, issueId, existingComments, desiredComments);
|
|
233
|
-
},
|
|
234
|
-
startDateFromTaskId(taskId) {
|
|
235
|
-
return startDateFromTaskId(taskId);
|
|
236
|
-
},
|
|
237
|
-
doneRatioForStatus(status) {
|
|
238
|
-
return doneRatioForStatus(status);
|
|
239
|
-
},
|
|
240
|
-
customFieldValue(issue, fieldId) {
|
|
241
|
-
return redmineBackendCustomFieldValue(issue, fieldId);
|
|
242
|
-
},
|
|
243
|
-
maybeParseJson(value) {
|
|
244
|
-
return maybeParseRedmineBackendJson(value);
|
|
245
|
-
},
|
|
246
|
-
coerceDocVersion(value) {
|
|
247
|
-
return coerceRedmineBackendDocVersion(value);
|
|
248
|
-
},
|
|
249
|
-
diffTasks(localTask, remoteTask) {
|
|
250
|
-
return diffRedmineTasks(localTask, remoteTask);
|
|
251
|
-
},
|
|
252
|
-
tasksDiffer(localTask, remoteTask) {
|
|
253
|
-
return redmineTasksDiffer(localTask, remoteTask);
|
|
254
|
-
},
|
|
255
|
-
async requestJson(method, reqPath, payload, params, opts) {
|
|
256
|
-
return await requestRedmineBackendJson(this, method, reqPath, payload, params, opts);
|
|
257
|
-
},
|
|
258
|
-
};
|
|
1
|
+
export { createRedmineCacheDocContext, createRedmineReportContext, createRedmineSyncContext, } from "./runtime-context.js";
|
|
2
|
+
export { redmineBackendRuntimeMethods } from "./runtime-methods.js";
|
|
3
|
+
export { appendRedmineBackendCommentNotes, appendRedmineBackendCustomField, diffRedmineBackendTasks, findRedmineIssueByTaskId, listRedmineRemoteTasks, maybeParseRedmineBackendJson, normalizeRedmineBackendComments, redmineBackendCustomFieldValue, redmineBackendTasksDiffer, redmineIssueToTask, redmineTaskToIssuePayload, requestRedmineBackendJson, } from "./runtime-operations.js";
|
|
4
|
+
export { assertRedmineExpectedRevision, assertRedmineExpectedRevisionSupported, cacheRedmineTask, coerceRedmineBackendDocVersion, ensureRedmineDocMetadata, redmineTaskIdFieldId, setRedmineIssueCustomField, } from "./runtime-state.js";
|
|
@@ -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";
|
|
@@ -139,13 +139,13 @@ export function issueToTask(opts) {
|
|
|
139
139
|
task.doc = derivedDoc;
|
|
140
140
|
task.sections = canonicalSections ?? (derivedDoc ? taskDocToSectionMap(derivedDoc) : undefined);
|
|
141
141
|
const docVersion = coerceDocVersion(docVersionVal);
|
|
142
|
-
task.doc_version = docVersion
|
|
142
|
+
task.doc_version = docVersion === opts.defaultDocVersion ? docVersion : opts.defaultDocVersion;
|
|
143
143
|
task.doc_updated_at = docUpdatedAtVal ? toStringSafe(docUpdatedAtVal) : (updatedOn ?? nowIso());
|
|
144
144
|
task.doc_updated_by = docUpdatedByVal ? toStringSafe(docUpdatedByVal) : opts.ownerAgent;
|
|
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"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { LocalBackend } from "../local-backend.js";
|
|
2
|
+
import type { TaskBackend, TaskData, TaskDocMeta, TaskWriteOptions } from "../shared.js";
|
|
3
|
+
import type { TaskComment } from "./comments.js";
|
|
4
|
+
export type RedmineBackendRuntimeHost = {
|
|
5
|
+
baseUrl: string;
|
|
6
|
+
apiKey: string;
|
|
7
|
+
projectId: string;
|
|
8
|
+
assigneeId: number | null;
|
|
9
|
+
ownerAgent: string;
|
|
10
|
+
statusMap: Record<string, unknown>;
|
|
11
|
+
customFields: Record<string, unknown>;
|
|
12
|
+
batchSize: number;
|
|
13
|
+
batchPauseMs: number;
|
|
14
|
+
cache: LocalBackend | null;
|
|
15
|
+
issueCache: Map<string, Record<string, unknown>>;
|
|
16
|
+
reverseStatus: Map<number, string>;
|
|
17
|
+
inferredStatusByTaskStatus: Map<string, number> | null;
|
|
18
|
+
capabilities: TaskBackend["capabilities"];
|
|
19
|
+
setInferredStatusByTaskStatus: (next: Map<string, number> | null) => void;
|
|
20
|
+
ensureDocMetadata: (task: TaskDocMeta) => void;
|
|
21
|
+
cacheTask: (task: TaskData, dirty: boolean) => Promise<void>;
|
|
22
|
+
assertExpectedRevisionSupported: (taskId: string, opts?: TaskWriteOptions) => void;
|
|
23
|
+
assertExpectedRevision: (taskId: string, expectedRevision: number | undefined, currentRevision: number) => void;
|
|
24
|
+
taskIdFieldId: () => unknown;
|
|
25
|
+
setIssueCustomFieldValue: (issue: Record<string, unknown>, fieldId: unknown, value: unknown) => void;
|
|
26
|
+
listTasksRemote: () => Promise<TaskData[]>;
|
|
27
|
+
findIssueByTaskId: (taskId: string) => Promise<Record<string, unknown> | null>;
|
|
28
|
+
issueToTask: (issue: Record<string, unknown>, taskIdOverride?: string) => TaskData | null;
|
|
29
|
+
taskToIssuePayload: (task: TaskData, existingIssue?: Record<string, unknown>) => Record<string, unknown>;
|
|
30
|
+
appendCustomField: (fields: Record<string, unknown>[], key: string, value: unknown) => void;
|
|
31
|
+
normalizeComments: (value: unknown) => TaskComment[];
|
|
32
|
+
appendCommentNotes: (issueId: string, existingComments: TaskComment[], desiredComments: TaskComment[]) => Promise<void>;
|
|
33
|
+
customFieldValue: (issue: Record<string, unknown>, fieldId: unknown) => string | null;
|
|
34
|
+
maybeParseJson: (value: unknown) => unknown;
|
|
35
|
+
requestJson: (method: string, reqPath: string, payload?: Record<string, unknown>, params?: Record<string, unknown>, opts?: {
|
|
36
|
+
attempts?: number;
|
|
37
|
+
backoff?: number;
|
|
38
|
+
}) => Promise<Record<string, unknown>>;
|
|
39
|
+
diffTasks: (localTask: TaskData, remoteTask: TaskData) => string;
|
|
40
|
+
tasksDiffer: (localTask: TaskData, remoteTask: TaskData) => boolean;
|
|
41
|
+
writeTask: (task: TaskData, opts?: TaskWriteOptions) => Promise<void>;
|
|
42
|
+
writeTasks: (tasks: TaskData[], opts?: TaskWriteOptions) => Promise<void>;
|
|
43
|
+
};
|
|
44
|
+
export declare function createRedmineCacheDocContext(host: RedmineBackendRuntimeHost): {
|
|
45
|
+
cache: LocalBackend | null;
|
|
46
|
+
customFields: Record<string, unknown>;
|
|
47
|
+
ownerAgent: string;
|
|
48
|
+
batchSize: number;
|
|
49
|
+
findIssueByTaskId: (taskId: string) => Promise<Record<string, unknown> | null>;
|
|
50
|
+
issueToTask: (issue: Record<string, unknown>, taskIdOverride?: string) => TaskData | null;
|
|
51
|
+
customFieldValue: (issue: Record<string, unknown>, fieldId: unknown) => string | null;
|
|
52
|
+
appendCustomField: (fields: Record<string, unknown>[], key: string, value: unknown) => void;
|
|
53
|
+
requestJson: (method: string, reqPath: string, payload?: Record<string, unknown>, params?: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
54
|
+
assertExpectedRevisionSupported: (taskId: string, opts?: TaskWriteOptions) => void;
|
|
55
|
+
assertExpectedRevision: (taskId: string, expectedRevision: number | undefined, currentRevision: number) => void;
|
|
56
|
+
cacheTask: (task: TaskData, dirty: boolean) => Promise<void>;
|
|
57
|
+
};
|
|
58
|
+
export declare function createRedmineReportContext(host: RedmineBackendRuntimeHost): {
|
|
59
|
+
projectId: string;
|
|
60
|
+
customFields: Record<string, unknown>;
|
|
61
|
+
requestJson: (method: string, reqPath: string, payload?: Record<string, unknown>, params?: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
62
|
+
};
|
|
63
|
+
export declare function createRedmineSyncContext(host: RedmineBackendRuntimeHost): {
|
|
64
|
+
cache: LocalBackend | null;
|
|
65
|
+
customFields: Record<string, unknown>;
|
|
66
|
+
ownerAgent: string;
|
|
67
|
+
projectId: string;
|
|
68
|
+
batchSize: number;
|
|
69
|
+
batchPauseMs: number;
|
|
70
|
+
statusMap: Record<string, unknown>;
|
|
71
|
+
issueCache: Map<string, Record<string, unknown>>;
|
|
72
|
+
inferredStatusByTaskStatus: Map<string, number> | null;
|
|
73
|
+
setInferredStatusByTaskStatus: (next: Map<string, number> | null) => void;
|
|
74
|
+
listTasksRemote: () => Promise<TaskData[]>;
|
|
75
|
+
writeTask: (task: TaskData, opts?: TaskWriteOptions) => Promise<void>;
|
|
76
|
+
writeTasks: (tasks: TaskData[], opts?: TaskWriteOptions) => Promise<void>;
|
|
77
|
+
findIssueByTaskId: (taskId: string) => Promise<Record<string, unknown> | null>;
|
|
78
|
+
issueToTask: (issue: Record<string, unknown>, taskIdOverride?: string) => TaskData | null;
|
|
79
|
+
taskToIssuePayload: (task: TaskData, existingIssue?: Record<string, unknown>) => Record<string, unknown>;
|
|
80
|
+
appendCustomField: (fields: Record<string, unknown>[], key: string, value: unknown) => void;
|
|
81
|
+
customFieldValue: (issue: Record<string, unknown>, fieldId: unknown) => string | null;
|
|
82
|
+
maybeParseJson: (value: unknown) => unknown;
|
|
83
|
+
normalizeComments: (value: unknown) => TaskComment[];
|
|
84
|
+
appendCommentNotes: (issueId: string, existingComments: TaskComment[], desiredComments: TaskComment[]) => Promise<void>;
|
|
85
|
+
cacheTask: (task: TaskData, dirty: boolean) => Promise<void>;
|
|
86
|
+
assertExpectedRevisionSupported: (taskId: string, opts?: TaskWriteOptions) => void;
|
|
87
|
+
assertExpectedRevision: (taskId: string, expectedRevision: number | undefined, currentRevision: number) => void;
|
|
88
|
+
ensureDocMetadata: (task: TaskDocMeta) => void;
|
|
89
|
+
diffTasks: (localTask: TaskData, remoteTask: TaskData) => string;
|
|
90
|
+
tasksDiffer: (localTask: TaskData, remoteTask: TaskData) => boolean;
|
|
91
|
+
taskIdFieldId: () => unknown;
|
|
92
|
+
setIssueCustomFieldValue: (issue: Record<string, unknown>, fieldId: unknown, value: unknown) => void;
|
|
93
|
+
requestJson: (method: string, reqPath: string, payload?: Record<string, unknown>, params?: Record<string, unknown>, opts?: {
|
|
94
|
+
attempts?: number;
|
|
95
|
+
backoff?: number;
|
|
96
|
+
}) => Promise<Record<string, unknown>>;
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=runtime-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-context.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/redmine/runtime-context.ts"],"names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AAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;EAGnD"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export function createRedmineCacheDocContext(host) {
|
|
2
|
+
return {
|
|
3
|
+
cache: host.cache,
|
|
4
|
+
customFields: host.customFields,
|
|
5
|
+
ownerAgent: host.ownerAgent,
|
|
6
|
+
batchSize: host.batchSize,
|
|
7
|
+
findIssueByTaskId: async (taskId) => await host.findIssueByTaskId(taskId),
|
|
8
|
+
issueToTask: (issue, taskIdOverride) => host.issueToTask(issue, taskIdOverride),
|
|
9
|
+
customFieldValue: (issue, fieldId) => host.customFieldValue(issue, fieldId),
|
|
10
|
+
appendCustomField: (fields, key, value) => host.appendCustomField(fields, key, value),
|
|
11
|
+
requestJson: async (method, reqPath, payload, params) => await host.requestJson(method, reqPath, payload, params),
|
|
12
|
+
assertExpectedRevisionSupported: (taskId, opts) => host.assertExpectedRevisionSupported(taskId, opts),
|
|
13
|
+
assertExpectedRevision: (taskId, expectedRevision, currentRevision) => host.assertExpectedRevision(taskId, expectedRevision, currentRevision),
|
|
14
|
+
cacheTask: async (task, dirty) => await host.cacheTask(task, dirty),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export function createRedmineReportContext(host) {
|
|
18
|
+
return {
|
|
19
|
+
projectId: host.projectId,
|
|
20
|
+
customFields: host.customFields,
|
|
21
|
+
requestJson: async (method, reqPath, payload, params) => await host.requestJson(method, reqPath, payload, params),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export function createRedmineSyncContext(host) {
|
|
25
|
+
return {
|
|
26
|
+
cache: host.cache,
|
|
27
|
+
customFields: host.customFields,
|
|
28
|
+
ownerAgent: host.ownerAgent,
|
|
29
|
+
projectId: host.projectId,
|
|
30
|
+
batchSize: host.batchSize,
|
|
31
|
+
batchPauseMs: host.batchPauseMs,
|
|
32
|
+
statusMap: host.statusMap,
|
|
33
|
+
issueCache: host.issueCache,
|
|
34
|
+
inferredStatusByTaskStatus: host.inferredStatusByTaskStatus,
|
|
35
|
+
setInferredStatusByTaskStatus: host.setInferredStatusByTaskStatus,
|
|
36
|
+
listTasksRemote: async () => await host.listTasksRemote(),
|
|
37
|
+
writeTask: async (task, opts) => await host.writeTask(task, opts),
|
|
38
|
+
writeTasks: async (tasks, opts) => await host.writeTasks(tasks, opts),
|
|
39
|
+
findIssueByTaskId: async (taskId) => await host.findIssueByTaskId(taskId),
|
|
40
|
+
issueToTask: (issue, taskIdOverride) => host.issueToTask(issue, taskIdOverride),
|
|
41
|
+
taskToIssuePayload: (task, existingIssue) => host.taskToIssuePayload(task, existingIssue),
|
|
42
|
+
appendCustomField: (fields, key, value) => host.appendCustomField(fields, key, value),
|
|
43
|
+
customFieldValue: (issue, fieldId) => host.customFieldValue(issue, fieldId),
|
|
44
|
+
maybeParseJson: (value) => host.maybeParseJson(value),
|
|
45
|
+
normalizeComments: (value) => host.normalizeComments(value),
|
|
46
|
+
appendCommentNotes: async (issueId, existingComments, desiredComments) => await host.appendCommentNotes(issueId, existingComments, desiredComments),
|
|
47
|
+
cacheTask: async (task, dirty) => await host.cacheTask(task, dirty),
|
|
48
|
+
assertExpectedRevisionSupported: (taskId, opts) => host.assertExpectedRevisionSupported(taskId, opts),
|
|
49
|
+
assertExpectedRevision: (taskId, expectedRevision, currentRevision) => host.assertExpectedRevision(taskId, expectedRevision, currentRevision),
|
|
50
|
+
ensureDocMetadata: (task) => host.ensureDocMetadata(task),
|
|
51
|
+
diffTasks: (localTask, remoteTask) => host.diffTasks(localTask, remoteTask),
|
|
52
|
+
tasksDiffer: (localTask, remoteTask) => host.tasksDiffer(localTask, remoteTask),
|
|
53
|
+
taskIdFieldId: () => host.taskIdFieldId(),
|
|
54
|
+
setIssueCustomFieldValue: (issue, fieldId, value) => host.setIssueCustomFieldValue(issue, fieldId, value),
|
|
55
|
+
requestJson: async (method, reqPath, payload, params, opts) => await host.requestJson(method, reqPath, payload, params, opts),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type TaskData, type TaskDocMeta, type TaskWriteOptions } from "../shared.js";
|
|
2
|
+
import type { TaskComment } from "./comments.js";
|
|
3
|
+
import type { RedmineBackendRuntimeHost } from "./runtime-context.js";
|
|
4
|
+
export declare const redmineBackendRuntimeMethods: {
|
|
5
|
+
setInferredStatusByTaskStatus(this: RedmineBackendRuntimeHost, next: Map<string, number> | null): void;
|
|
6
|
+
ensureDocMetadata(this: RedmineBackendRuntimeHost, task: TaskDocMeta): void;
|
|
7
|
+
cacheTask(this: RedmineBackendRuntimeHost, task: TaskData, dirty: boolean): Promise<void>;
|
|
8
|
+
assertExpectedRevisionSupported(this: RedmineBackendRuntimeHost, taskId: string, opts?: TaskWriteOptions): void;
|
|
9
|
+
assertExpectedRevision(this: RedmineBackendRuntimeHost, taskId: string, expectedRevision: number | undefined, currentRevision: number): void;
|
|
10
|
+
taskIdFieldId(this: RedmineBackendRuntimeHost): unknown;
|
|
11
|
+
setIssueCustomFieldValue(this: RedmineBackendRuntimeHost, issue: Record<string, unknown>, fieldId: unknown, value: unknown): void;
|
|
12
|
+
listTasksRemote(this: RedmineBackendRuntimeHost): Promise<TaskData[]>;
|
|
13
|
+
findIssueByTaskId(this: RedmineBackendRuntimeHost, taskId: string): Promise<Record<string, unknown> | null>;
|
|
14
|
+
issueToTask(this: RedmineBackendRuntimeHost, issue: Record<string, unknown>, taskIdOverride?: string): TaskData | null;
|
|
15
|
+
taskToIssuePayload(this: RedmineBackendRuntimeHost, task: TaskData, existingIssue?: Record<string, unknown>): Record<string, unknown>;
|
|
16
|
+
appendCustomField(this: RedmineBackendRuntimeHost, fields: Record<string, unknown>[], key: string, value: unknown): void;
|
|
17
|
+
normalizeComments(this: RedmineBackendRuntimeHost, value: unknown): TaskComment[];
|
|
18
|
+
commentsToPairs(this: RedmineBackendRuntimeHost, comments: TaskComment[]): [string, string][];
|
|
19
|
+
formatCommentNote(this: RedmineBackendRuntimeHost, author?: string, body?: string): string;
|
|
20
|
+
appendCommentNotes(this: RedmineBackendRuntimeHost, issueId: string, existingComments: TaskComment[], desiredComments: TaskComment[]): Promise<void>;
|
|
21
|
+
startDateFromTaskId(this: RedmineBackendRuntimeHost, taskId: string): string | null;
|
|
22
|
+
doneRatioForStatus(this: RedmineBackendRuntimeHost, status: string): number | null;
|
|
23
|
+
customFieldValue(this: RedmineBackendRuntimeHost, issue: Record<string, unknown>, fieldId: unknown): string | null;
|
|
24
|
+
maybeParseJson(this: RedmineBackendRuntimeHost, value: unknown): unknown;
|
|
25
|
+
coerceDocVersion(this: RedmineBackendRuntimeHost, value: unknown): 2 | 3 | null;
|
|
26
|
+
diffTasks(this: RedmineBackendRuntimeHost, localTask: TaskData, remoteTask: TaskData): string;
|
|
27
|
+
tasksDiffer(this: RedmineBackendRuntimeHost, localTask: TaskData, remoteTask: TaskData): boolean;
|
|
28
|
+
requestJson(this: RedmineBackendRuntimeHost, method: string, reqPath: string, payload?: Record<string, unknown>, params?: Record<string, unknown>, opts?: {
|
|
29
|
+
attempts?: number;
|
|
30
|
+
backoff?: number;
|
|
31
|
+
}): Promise<Record<string, unknown>>;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=runtime-methods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-methods.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/redmine/runtime-methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEpG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAwBjD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,eAAO,MAAM,4BAA4B;wCAE/B,yBAAyB,QACzB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GA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,MAAM,EAAE,OAAO,CAAC,WACrB,OAAO,GACf,MAAM,GAAG,IAAI;yBAIK,yBAAyB,SAAS,OAAO,GAAG,OAAO;2BAIjD,yBAAyB,SAAS,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI;oBAI/D,yBAAyB,aAAa,QAAQ,cAAc,QAAQ,GAAG,MAAM;sBAI3E,yBAAyB,aAAa,QAAQ,cAAc,QAAQ,GAAG,OAAO;sBAKxF,yBAAyB,UACvB,MAAM,WACL,MAAM,YACL,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,WACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,SACzB;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAC7C,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAGpC,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { toStringSafe } from "../shared.js";
|
|
2
|
+
import { doneRatioForStatus, startDateFromTaskId } from "./mapping.js";
|
|
3
|
+
import { appendRedmineBackendCommentNotes, appendRedmineBackendCustomField, diffRedmineBackendTasks, findRedmineIssueByTaskId, listRedmineRemoteTasks, maybeParseRedmineBackendJson, normalizeRedmineBackendComments, redmineBackendCustomFieldValue, redmineBackendTasksDiffer, redmineIssueToTask, redmineTaskToIssuePayload, requestRedmineBackendJson, } from "./runtime-operations.js";
|
|
4
|
+
import { assertRedmineExpectedRevision, assertRedmineExpectedRevisionSupported, cacheRedmineTask, coerceRedmineBackendDocVersion, ensureRedmineDocMetadata, redmineTaskIdFieldId, setRedmineIssueCustomField, } from "./runtime-state.js";
|
|
5
|
+
export const redmineBackendRuntimeMethods = {
|
|
6
|
+
setInferredStatusByTaskStatus(next) {
|
|
7
|
+
this.inferredStatusByTaskStatus = next;
|
|
8
|
+
},
|
|
9
|
+
ensureDocMetadata(task) {
|
|
10
|
+
ensureRedmineDocMetadata(task);
|
|
11
|
+
},
|
|
12
|
+
async cacheTask(task, dirty) {
|
|
13
|
+
await cacheRedmineTask(this, task, dirty);
|
|
14
|
+
},
|
|
15
|
+
assertExpectedRevisionSupported(taskId, opts) {
|
|
16
|
+
assertRedmineExpectedRevisionSupported(this, taskId, opts);
|
|
17
|
+
},
|
|
18
|
+
assertExpectedRevision(taskId, expectedRevision, currentRevision) {
|
|
19
|
+
assertRedmineExpectedRevision(taskId, expectedRevision, currentRevision);
|
|
20
|
+
},
|
|
21
|
+
taskIdFieldId() {
|
|
22
|
+
return redmineTaskIdFieldId(this);
|
|
23
|
+
},
|
|
24
|
+
setIssueCustomFieldValue(issue, fieldId, value) {
|
|
25
|
+
setRedmineIssueCustomField(issue, fieldId, value);
|
|
26
|
+
},
|
|
27
|
+
async listTasksRemote() {
|
|
28
|
+
return await listRedmineRemoteTasks(this);
|
|
29
|
+
},
|
|
30
|
+
async findIssueByTaskId(taskId) {
|
|
31
|
+
return await findRedmineIssueByTaskId(this, taskId);
|
|
32
|
+
},
|
|
33
|
+
issueToTask(issue, taskIdOverride) {
|
|
34
|
+
return redmineIssueToTask(this, issue, taskIdOverride);
|
|
35
|
+
},
|
|
36
|
+
taskToIssuePayload(task, existingIssue) {
|
|
37
|
+
return redmineTaskToIssuePayload(this, task, existingIssue);
|
|
38
|
+
},
|
|
39
|
+
appendCustomField(fields, key, value) {
|
|
40
|
+
appendRedmineBackendCustomField(this, fields, key, value);
|
|
41
|
+
},
|
|
42
|
+
normalizeComments(value) {
|
|
43
|
+
return normalizeRedmineBackendComments(value);
|
|
44
|
+
},
|
|
45
|
+
commentsToPairs(comments) {
|
|
46
|
+
const pairs = [];
|
|
47
|
+
for (const comment of comments) {
|
|
48
|
+
const author = toStringSafe(comment.author).trim();
|
|
49
|
+
const body = toStringSafe(comment.body).trim();
|
|
50
|
+
if (!author && !body)
|
|
51
|
+
continue;
|
|
52
|
+
pairs.push([author, body]);
|
|
53
|
+
}
|
|
54
|
+
return pairs;
|
|
55
|
+
},
|
|
56
|
+
formatCommentNote(author = "unknown", body = "") {
|
|
57
|
+
return `[comment] ${author}: ${body}`.trim();
|
|
58
|
+
},
|
|
59
|
+
async appendCommentNotes(issueId, existingComments, desiredComments) {
|
|
60
|
+
await appendRedmineBackendCommentNotes(this, issueId, existingComments, desiredComments);
|
|
61
|
+
},
|
|
62
|
+
startDateFromTaskId(taskId) {
|
|
63
|
+
return startDateFromTaskId(taskId);
|
|
64
|
+
},
|
|
65
|
+
doneRatioForStatus(status) {
|
|
66
|
+
return doneRatioForStatus(status);
|
|
67
|
+
},
|
|
68
|
+
customFieldValue(issue, fieldId) {
|
|
69
|
+
return redmineBackendCustomFieldValue(issue, fieldId);
|
|
70
|
+
},
|
|
71
|
+
maybeParseJson(value) {
|
|
72
|
+
return maybeParseRedmineBackendJson(value);
|
|
73
|
+
},
|
|
74
|
+
coerceDocVersion(value) {
|
|
75
|
+
return coerceRedmineBackendDocVersion(value);
|
|
76
|
+
},
|
|
77
|
+
diffTasks(localTask, remoteTask) {
|
|
78
|
+
return diffRedmineBackendTasks(localTask, remoteTask);
|
|
79
|
+
},
|
|
80
|
+
tasksDiffer(localTask, remoteTask) {
|
|
81
|
+
return redmineBackendTasksDiffer(localTask, remoteTask);
|
|
82
|
+
},
|
|
83
|
+
async requestJson(method, reqPath, payload, params, opts) {
|
|
84
|
+
return await requestRedmineBackendJson(this, method, reqPath, payload, params, opts);
|
|
85
|
+
},
|
|
86
|
+
};
|