agentplane 0.3.6 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/AGENTS.md +11 -1
- package/assets/RUNNER.md +17 -0
- package/bin/agentplane.js +16 -7
- package/bin/framework-dev-contract.d.ts +6 -0
- package/bin/framework-dev-contract.js +13 -0
- package/bin/stale-dist-policy.js +6 -1
- package/dist/.build-manifest.json +724 -359
- package/dist/adapters/task-backend/task-backend-adapter.d.ts +4 -2
- package/dist/adapters/task-backend/task-backend-adapter.d.ts.map +1 -1
- package/dist/adapters/task-backend/task-backend-adapter.js +15 -2
- package/dist/backends/task-backend/local-backend-doc.d.ts +5 -0
- package/dist/backends/task-backend/local-backend-doc.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-doc.js +98 -0
- package/dist/backends/task-backend/local-backend-read.d.ts +7 -0
- package/dist/backends/task-backend/local-backend-read.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-read.js +186 -0
- package/dist/backends/task-backend/local-backend-state.d.ts +17 -0
- package/dist/backends/task-backend/local-backend-state.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-state.js +50 -0
- package/dist/backends/task-backend/local-backend-write.d.ts +15 -0
- package/dist/backends/task-backend/local-backend-write.d.ts.map +1 -0
- package/dist/backends/task-backend/local-backend-write.js +254 -0
- package/dist/backends/task-backend/local-backend.d.ts +10 -6
- package/dist/backends/task-backend/local-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend.js +32 -337
- package/dist/backends/task-backend/redmine/backend-cache-doc.d.ts +40 -0
- package/dist/backends/task-backend/redmine/backend-cache-doc.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-cache-doc.js +178 -0
- package/dist/backends/task-backend/redmine/backend-report.d.ts +10 -0
- package/dist/backends/task-backend/redmine/backend-report.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-report.js +43 -0
- package/dist/backends/task-backend/redmine/backend-sync.d.ts +67 -0
- package/dist/backends/task-backend/redmine/backend-sync.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/backend-sync.js +367 -0
- package/dist/backends/task-backend/redmine/env.d.ts +1 -1
- package/dist/backends/task-backend/redmine/env.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/env.js +3 -0
- package/dist/backends/task-backend/redmine/inspect.d.ts +11 -0
- package/dist/backends/task-backend/redmine/inspect.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/inspect.js +75 -0
- package/dist/backends/task-backend/redmine/mapping.d.ts +2 -1
- package/dist/backends/task-backend/redmine/mapping.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/mapping.js +32 -3
- package/dist/backends/task-backend/redmine/parse.d.ts +2 -1
- package/dist/backends/task-backend/redmine/parse.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine/parse.js +5 -3
- package/dist/backends/task-backend/redmine/state.d.ts +19 -0
- package/dist/backends/task-backend/redmine/state.d.ts.map +1 -0
- package/dist/backends/task-backend/redmine/state.js +109 -0
- package/dist/backends/task-backend/redmine-backend.d.ts +14 -17
- package/dist/backends/task-backend/redmine-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine-backend.js +121 -379
- package/dist/backends/task-backend/shared/constants.d.ts +2 -1
- package/dist/backends/task-backend/shared/constants.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/constants.js +1 -1
- package/dist/backends/task-backend/shared/doc.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/doc.js +25 -39
- package/dist/backends/task-backend/shared/export.d.ts +2 -9
- package/dist/backends/task-backend/shared/export.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/export.js +73 -8
- package/dist/backends/task-backend/shared/normalize.d.ts +5 -1
- package/dist/backends/task-backend/shared/normalize.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/normalize.js +166 -0
- package/dist/backends/task-backend/shared/record.d.ts +1 -1
- package/dist/backends/task-backend/shared/record.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/record.js +27 -3
- package/dist/backends/task-backend/shared/types.d.ts +76 -36
- package/dist/backends/task-backend/shared/types.d.ts.map +1 -1
- package/dist/backends/task-backend/shared.d.ts +2 -2
- package/dist/backends/task-backend/shared.d.ts.map +1 -1
- package/dist/backends/task-backend/shared.js +1 -1
- package/dist/backends/task-backend.d.ts +1 -1
- package/dist/backends/task-backend.d.ts.map +1 -1
- package/dist/backends/task-backend.js +1 -1
- package/dist/backends/task-index.d.ts +2 -2
- package/dist/backends/task-index.d.ts.map +1 -1
- package/dist/backends/task-index.js +9 -5
- package/dist/cli/bootstrap-guide.d.ts +2 -2
- package/dist/cli/bootstrap-guide.d.ts.map +1 -1
- package/dist/cli/bootstrap-guide.js +10 -10
- package/dist/cli/command-guide.d.ts.map +1 -1
- package/dist/cli/command-guide.js +11 -9
- package/dist/cli/command-invocations.d.ts +4 -0
- package/dist/cli/command-invocations.d.ts.map +1 -0
- package/dist/cli/command-invocations.js +35 -0
- package/dist/cli/command-snippets.d.ts +12 -8
- package/dist/cli/command-snippets.d.ts.map +1 -1
- package/dist/cli/command-snippets.js +14 -8
- package/dist/cli/exit-codes.d.ts.map +1 -1
- package/dist/cli/exit-codes.js +1 -0
- package/dist/cli/group-command.d.ts +18 -0
- package/dist/cli/group-command.d.ts.map +1 -0
- package/dist/cli/group-command.js +45 -0
- package/dist/cli/output.d.ts +29 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +76 -0
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +5 -1
- package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/core.js +38 -29
- package/dist/cli/run-cli/command-catalog/lifecycle.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/lifecycle.js +9 -6
- package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/project.js +11 -7
- package/dist/cli/run-cli/command-catalog/shared.d.ts +12 -3
- package/dist/cli/run-cli/command-catalog/shared.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/shared.js +6 -3
- package/dist/cli/run-cli/command-catalog/task.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/task.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/task.js +46 -11
- package/dist/cli/run-cli/command-catalog.d.ts +11 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog.js +29 -0
- package/dist/cli/run-cli/commands/config.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/config.js +52 -6
- package/dist/cli/run-cli/commands/core/agent-profiles.d.ts +34 -0
- package/dist/cli/run-cli/commands/core/agent-profiles.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/agent-profiles.js +97 -0
- package/dist/cli/run-cli/commands/core/agents.d.ts +7 -0
- package/dist/cli/run-cli/commands/core/agents.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/agents.js +97 -0
- package/dist/cli/run-cli/commands/core/preflight.d.ts +10 -0
- package/dist/cli/run-cli/commands/core/preflight.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/preflight.js +286 -0
- package/dist/cli/run-cli/commands/core/quickstart.d.ts +8 -0
- package/dist/cli/run-cli/commands/core/quickstart.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/quickstart.js +43 -0
- package/dist/cli/run-cli/commands/core/role.d.ts +9 -0
- package/dist/cli/run-cli/commands/core/role.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/core/role.js +128 -0
- package/dist/cli/run-cli/commands/core.d.ts +4 -24
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core.js +4 -630
- package/dist/cli/run-cli/commands/init/write-env.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-env.js +12 -0
- package/dist/cli/run-cli/error-guidance.js +10 -0
- package/dist/cli/run-cli/globals.d.ts +5 -2
- package/dist/cli/run-cli/globals.d.ts.map +1 -1
- package/dist/cli/run-cli/globals.js +82 -86
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +137 -100
- package/dist/cli/run-cli.test-helpers.d.ts +21 -0
- package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
- package/dist/cli/run-cli.test-helpers.js +90 -4
- package/dist/cli/spec/help.d.ts +10 -2
- package/dist/cli/spec/help.d.ts.map +1 -1
- package/dist/cli/spec/help.js +7 -5
- package/dist/cli/spec/registry.d.ts +27 -1
- package/dist/cli/spec/registry.d.ts.map +1 -1
- package/dist/cli/spec/registry.js +98 -25
- package/dist/commands/backend/sync.command.d.ts +8 -6
- package/dist/commands/backend/sync.command.d.ts.map +1 -1
- package/dist/commands/backend/sync.command.js +75 -14
- package/dist/commands/backend.d.ts +22 -0
- package/dist/commands/backend.d.ts.map +1 -1
- package/dist/commands/backend.js +111 -1
- package/dist/commands/branch/base.command.d.ts +2 -3
- package/dist/commands/branch/base.command.d.ts.map +1 -1
- package/dist/commands/branch/base.command.js +8 -12
- package/dist/commands/branch/base.d.ts.map +1 -1
- package/dist/commands/branch/base.js +11 -7
- package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
- package/dist/commands/branch/cleanup-merged.js +9 -8
- package/dist/commands/branch/remove.d.ts.map +1 -1
- package/dist/commands/branch/remove.js +4 -3
- package/dist/commands/branch/status.d.ts.map +1 -1
- package/dist/commands/branch/status.js +4 -3
- package/dist/commands/branch/work-start.d.ts.map +1 -1
- package/dist/commands/branch/work-start.js +48 -5
- package/dist/commands/cleanup/merged.command.d.ts +2 -3
- package/dist/commands/cleanup/merged.command.d.ts.map +1 -1
- package/dist/commands/cleanup/merged.command.js +8 -12
- package/dist/commands/commit.spec.d.ts.map +1 -1
- package/dist/commands/commit.spec.js +30 -6
- package/dist/commands/docs/cli.command.js +2 -2
- package/dist/commands/doctor/runtime.js +1 -1
- package/dist/commands/doctor/workflow.d.ts.map +1 -1
- package/dist/commands/doctor/workflow.js +10 -1
- package/dist/commands/doctor/workspace.d.ts +8 -0
- package/dist/commands/doctor/workspace.d.ts.map +1 -1
- package/dist/commands/doctor/workspace.js +127 -3
- package/dist/commands/finish.spec.d.ts.map +1 -1
- package/dist/commands/finish.spec.js +7 -0
- package/dist/commands/guard/commit.command.d.ts.map +1 -1
- package/dist/commands/guard/commit.command.js +30 -6
- package/dist/commands/guard/guard.command.d.ts +3 -3
- package/dist/commands/guard/guard.command.d.ts.map +1 -1
- package/dist/commands/guard/guard.command.js +9 -14
- package/dist/commands/guard/impl/allow.d.ts +4 -0
- package/dist/commands/guard/impl/allow.d.ts.map +1 -1
- package/dist/commands/guard/impl/allow.js +14 -3
- package/dist/commands/guard/impl/commands.d.ts +2 -0
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +66 -9
- package/dist/commands/guard/impl/policy.d.ts +1 -0
- package/dist/commands/guard/impl/policy.d.ts.map +1 -1
- package/dist/commands/guard/impl/policy.js +9 -6
- package/dist/commands/hooks/hooks.command.d.ts +3 -3
- package/dist/commands/hooks/hooks.command.d.ts.map +1 -1
- package/dist/commands/hooks/hooks.command.js +9 -11
- package/dist/commands/pr/check.d.ts.map +1 -1
- package/dist/commands/pr/check.js +90 -18
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
- package/dist/commands/pr/integrate/cmd.js +31 -3
- package/dist/commands/pr/integrate/internal/cleanup.d.ts +12 -0
- package/dist/commands/pr/integrate/internal/cleanup.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/cleanup.js +46 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts +4 -0
- package/dist/commands/pr/integrate/internal/finalize.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/finalize.js +34 -40
- package/dist/commands/pr/integrate/internal/merge.d.ts +6 -0
- package/dist/commands/pr/integrate/internal/merge.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/merge.js +92 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts +1 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/prepare.js +1 -0
- package/dist/commands/pr/integrate/verify.d.ts.map +1 -1
- package/dist/commands/pr/integrate/verify.js +4 -3
- package/dist/commands/pr/note.d.ts.map +1 -1
- package/dist/commands/pr/note.js +3 -2
- package/dist/commands/pr/open.d.ts.map +1 -1
- package/dist/commands/pr/open.js +9 -12
- package/dist/commands/pr/pr.command.d.ts +3 -4
- package/dist/commands/pr/pr.command.d.ts.map +1 -1
- package/dist/commands/pr/pr.command.js +6 -11
- package/dist/commands/pr/update.d.ts.map +1 -1
- package/dist/commands/pr/update.js +5 -10
- package/dist/commands/recipes/cache.command.d.ts +3 -4
- package/dist/commands/recipes/cache.command.d.ts.map +1 -1
- package/dist/commands/recipes/cache.command.js +8 -26
- package/dist/commands/recipes/impl/apply.d.ts +1 -1
- package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
- package/dist/commands/recipes/impl/apply.js +1 -1
- package/dist/commands/recipes/impl/commands/explain.js +1 -1
- package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/install.js +1 -2
- package/dist/commands/recipes/impl/installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/installed-recipes.js +1 -2
- package/dist/commands/recipes/impl/manifest.d.ts.map +1 -1
- package/dist/commands/recipes/impl/manifest.js +0 -10
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.js +1 -2
- package/dist/commands/recipes/impl/resolver.d.ts +1 -1
- package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
- package/dist/commands/recipes/impl/resolver.js +26 -16
- package/dist/commands/recipes/impl/scenario.d.ts.map +1 -1
- package/dist/commands/recipes/impl/scenario.js +80 -0
- package/dist/commands/recipes/impl/types.d.ts +27 -13
- package/dist/commands/recipes/impl/types.d.ts.map +1 -1
- package/dist/commands/recipes/recipes.command.d.ts +3 -4
- package/dist/commands/recipes/recipes.command.d.ts.map +1 -1
- package/dist/commands/recipes/recipes.command.js +8 -34
- package/dist/commands/recipes.d.ts +4 -4
- package/dist/commands/recipes.d.ts.map +1 -1
- package/dist/commands/recipes.js +3 -3
- package/dist/commands/recipes.test-helpers.d.ts +17 -0
- package/dist/commands/recipes.test-helpers.d.ts.map +1 -1
- package/dist/commands/recipes.test-helpers.js +56 -2
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +77 -56
- package/dist/commands/release/plan.command.d.ts.map +1 -1
- package/dist/commands/release/plan.command.js +7 -3
- package/dist/commands/release/release.command.d.ts +3 -3
- package/dist/commands/release/release.command.d.ts.map +1 -1
- package/dist/commands/release/release.command.js +9 -11
- package/dist/commands/release.test-helpers.d.ts +20 -0
- package/dist/commands/release.test-helpers.d.ts.map +1 -0
- package/dist/commands/release.test-helpers.js +37 -0
- package/dist/commands/runtime.command.d.ts +7 -7
- package/dist/commands/runtime.command.d.ts.map +1 -1
- package/dist/commands/runtime.command.js +29 -33
- package/dist/commands/scenario/execute.command.d.ts +8 -0
- package/dist/commands/scenario/execute.command.d.ts.map +1 -0
- package/dist/commands/scenario/execute.command.js +117 -0
- package/dist/commands/scenario/impl/commands.d.ts.map +1 -1
- package/dist/commands/scenario/impl/commands.js +45 -32
- package/dist/commands/scenario/run.command.js +2 -2
- package/dist/commands/scenario/scenario.command.d.ts +3 -4
- package/dist/commands/scenario/scenario.command.d.ts.map +1 -1
- package/dist/commands/scenario/scenario.command.js +8 -26
- package/dist/commands/shared/git-context.d.ts +1 -0
- package/dist/commands/shared/git-context.d.ts.map +1 -1
- package/dist/commands/shared/git-context.js +4 -2
- package/dist/commands/shared/git-ops.d.ts +1 -0
- package/dist/commands/shared/git-ops.d.ts.map +1 -1
- package/dist/commands/shared/git-ops.js +13 -0
- package/dist/commands/shared/operator-pipeline.d.ts +10 -0
- package/dist/commands/shared/operator-pipeline.d.ts.map +1 -0
- package/dist/commands/shared/operator-pipeline.js +16 -0
- package/dist/commands/shared/pr-meta.d.ts +32 -12
- package/dist/commands/shared/pr-meta.d.ts.map +1 -1
- package/dist/commands/shared/pr-meta.js +49 -14
- package/dist/commands/shared/reconcile-check.d.ts.map +1 -1
- package/dist/commands/shared/reconcile-check.js +28 -3
- package/dist/commands/shared/task-backend.d.ts +11 -7
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +107 -24
- package/dist/commands/shared/task-handoff.d.ts +64 -0
- package/dist/commands/shared/task-handoff.d.ts.map +1 -0
- package/dist/commands/shared/task-handoff.js +151 -0
- package/dist/commands/shared/task-mutation.d.ts +36 -0
- package/dist/commands/shared/task-mutation.d.ts.map +1 -0
- package/dist/commands/shared/task-mutation.js +67 -0
- package/dist/commands/shared/task-store.d.ts +65 -2
- package/dist/commands/shared/task-store.d.ts.map +1 -1
- package/dist/commands/shared/task-store.js +309 -91
- package/dist/commands/task/add.d.ts.map +1 -1
- package/dist/commands/task/add.js +41 -39
- package/dist/commands/task/block.d.ts.map +1 -1
- package/dist/commands/task/block.js +31 -89
- package/dist/commands/task/close-duplicate.d.ts.map +1 -1
- package/dist/commands/task/close-duplicate.js +0 -7
- package/dist/commands/task/close-noop.d.ts.map +1 -1
- package/dist/commands/task/close-noop.js +0 -21
- package/dist/commands/task/close-shared.d.ts +0 -2
- package/dist/commands/task/close-shared.d.ts.map +1 -1
- package/dist/commands/task/close-shared.js +24 -57
- package/dist/commands/task/comment.d.ts.map +1 -1
- package/dist/commands/task/comment.js +48 -42
- package/dist/commands/task/derive.command.d.ts +1 -0
- package/dist/commands/task/derive.command.d.ts.map +1 -1
- package/dist/commands/task/derive.command.js +15 -2
- package/dist/commands/task/derive.d.ts +1 -0
- package/dist/commands/task/derive.d.ts.map +1 -1
- package/dist/commands/task/derive.js +37 -7
- package/dist/commands/task/doc.command.d.ts.map +1 -1
- package/dist/commands/task/doc.command.js +7 -6
- package/dist/commands/task/doc.d.ts.map +1 -1
- package/dist/commands/task/doc.js +68 -61
- package/dist/commands/task/finish-shared.d.ts +60 -0
- package/dist/commands/task/finish-shared.d.ts.map +1 -0
- package/dist/commands/task/finish-shared.js +181 -0
- package/dist/commands/task/finish.d.ts +1 -0
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +73 -204
- package/dist/commands/task/handoff-record.command.d.ts +17 -0
- package/dist/commands/task/handoff-record.command.d.ts.map +1 -0
- package/dist/commands/task/handoff-record.command.js +140 -0
- package/dist/commands/task/handoff-show.command.d.ts +8 -0
- package/dist/commands/task/handoff-show.command.d.ts.map +1 -0
- package/dist/commands/task/handoff-show.command.js +77 -0
- package/dist/commands/task/handoff.command.d.ts +7 -0
- package/dist/commands/task/handoff.command.d.ts.map +1 -0
- package/dist/commands/task/handoff.command.js +21 -0
- package/dist/commands/task/handoff.shared.d.ts +39 -0
- package/dist/commands/task/handoff.shared.d.ts.map +1 -0
- package/dist/commands/task/handoff.shared.js +134 -0
- package/dist/commands/task/hosted-close.command.d.ts +9 -0
- package/dist/commands/task/hosted-close.command.d.ts.map +1 -0
- package/dist/commands/task/hosted-close.command.js +190 -0
- package/dist/commands/task/hosted-merge-sync.d.ts +40 -0
- package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -0
- package/dist/commands/task/hosted-merge-sync.js +277 -0
- package/dist/commands/task/list.d.ts.map +1 -1
- package/dist/commands/task/list.js +7 -24
- package/dist/commands/task/migrate-doc.d.ts +15 -0
- package/dist/commands/task/migrate-doc.d.ts.map +1 -1
- package/dist/commands/task/migrate-doc.js +126 -35
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +26 -4
- package/dist/commands/task/next.d.ts.map +1 -1
- package/dist/commands/task/next.js +10 -28
- package/dist/commands/task/normalize.command.d.ts +1 -0
- package/dist/commands/task/normalize.command.d.ts.map +1 -1
- package/dist/commands/task/normalize.command.js +12 -0
- package/dist/commands/task/normalize.d.ts +1 -0
- package/dist/commands/task/normalize.d.ts.map +1 -1
- package/dist/commands/task/normalize.js +21 -9
- package/dist/commands/task/plan.command.d.ts +3 -4
- package/dist/commands/task/plan.command.d.ts.map +1 -1
- package/dist/commands/task/plan.command.js +6 -12
- package/dist/commands/task/plan.d.ts.map +1 -1
- package/dist/commands/task/plan.js +118 -125
- package/dist/commands/task/reclaim.command.d.ts +11 -0
- package/dist/commands/task/reclaim.command.d.ts.map +1 -0
- package/dist/commands/task/reclaim.command.js +102 -0
- package/dist/commands/task/resume-context.command.d.ts +9 -0
- package/dist/commands/task/resume-context.command.d.ts.map +1 -0
- package/dist/commands/task/resume-context.command.js +60 -0
- package/dist/commands/task/run-cancel.command.d.ts +6 -0
- package/dist/commands/task/run-cancel.command.d.ts.map +1 -0
- package/dist/commands/task/run-cancel.command.js +45 -0
- package/dist/commands/task/run-cancel.spec.d.ts +7 -0
- package/dist/commands/task/run-cancel.spec.d.ts.map +1 -0
- package/dist/commands/task/run-cancel.spec.js +20 -0
- package/dist/commands/task/run-resume.command.d.ts +6 -0
- package/dist/commands/task/run-resume.command.d.ts.map +1 -0
- package/dist/commands/task/run-resume.command.js +55 -0
- package/dist/commands/task/run-resume.spec.d.ts +7 -0
- package/dist/commands/task/run-resume.spec.d.ts.map +1 -0
- package/dist/commands/task/run-resume.spec.js +20 -0
- package/dist/commands/task/run-retry.command.d.ts +6 -0
- package/dist/commands/task/run-retry.command.d.ts.map +1 -0
- package/dist/commands/task/run-retry.command.js +56 -0
- package/dist/commands/task/run-retry.spec.d.ts +7 -0
- package/dist/commands/task/run-retry.spec.d.ts.map +1 -0
- package/dist/commands/task/run-retry.spec.js +20 -0
- package/dist/commands/task/run-show.command.d.ts +6 -0
- package/dist/commands/task/run-show.command.d.ts.map +1 -0
- package/dist/commands/task/run-show.command.js +133 -0
- package/dist/commands/task/run-show.spec.d.ts +8 -0
- package/dist/commands/task/run-show.spec.d.ts.map +1 -0
- package/dist/commands/task/run-show.spec.js +44 -0
- package/dist/commands/task/run-tail.command.d.ts +6 -0
- package/dist/commands/task/run-tail.command.d.ts.map +1 -0
- package/dist/commands/task/run-tail.command.js +26 -0
- package/dist/commands/task/run-tail.spec.d.ts +8 -0
- package/dist/commands/task/run-tail.spec.d.ts.map +1 -0
- package/dist/commands/task/run-tail.spec.js +51 -0
- package/dist/commands/task/run-trace.command.d.ts +6 -0
- package/dist/commands/task/run-trace.command.d.ts.map +1 -0
- package/dist/commands/task/run-trace.command.js +25 -0
- package/dist/commands/task/run-trace.spec.d.ts +7 -0
- package/dist/commands/task/run-trace.spec.d.ts.map +1 -0
- package/dist/commands/task/run-trace.spec.js +31 -0
- package/dist/commands/task/run.command.d.ts +6 -0
- package/dist/commands/task/run.command.d.ts.map +1 -0
- package/dist/commands/task/run.command.js +74 -0
- package/dist/commands/task/run.spec.d.ts +7 -0
- package/dist/commands/task/run.spec.d.ts.map +1 -0
- package/dist/commands/task/run.spec.js +26 -0
- package/dist/commands/task/scaffold.d.ts.map +1 -1
- package/dist/commands/task/scaffold.js +4 -2
- package/dist/commands/task/scrub.d.ts.map +1 -1
- package/dist/commands/task/scrub.js +27 -24
- package/dist/commands/task/search.d.ts.map +1 -1
- package/dist/commands/task/search.js +21 -31
- package/dist/commands/task/set-status.d.ts.map +1 -1
- package/dist/commands/task/set-status.js +38 -111
- package/dist/commands/task/shared/dependencies.d.ts +5 -4
- package/dist/commands/task/shared/dependencies.d.ts.map +1 -1
- package/dist/commands/task/shared/dependencies.js +20 -2
- package/dist/commands/task/shared/docs.d.ts +6 -1
- package/dist/commands/task/shared/docs.d.ts.map +1 -1
- package/dist/commands/task/shared/docs.js +14 -1
- package/dist/commands/task/shared/listing.d.ts +16 -2
- package/dist/commands/task/shared/listing.d.ts.map +1 -1
- package/dist/commands/task/shared/listing.js +56 -0
- package/dist/commands/task/shared/transition-command.d.ts +15 -0
- package/dist/commands/task/shared/transition-command.d.ts.map +1 -0
- package/dist/commands/task/shared/transition-command.js +43 -0
- package/dist/commands/task/shared/transitions.d.ts +56 -0
- package/dist/commands/task/shared/transitions.d.ts.map +1 -1
- package/dist/commands/task/shared/transitions.js +82 -8
- package/dist/commands/task/shared/workflow-transition-service.d.ts +75 -0
- package/dist/commands/task/shared/workflow-transition-service.d.ts.map +1 -0
- package/dist/commands/task/shared/workflow-transition-service.js +226 -0
- package/dist/commands/task/shared.d.ts +6 -4
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +6 -4
- package/dist/commands/task/show.d.ts.map +1 -1
- package/dist/commands/task/show.js +37 -3
- package/dist/commands/task/start.d.ts.map +1 -1
- package/dist/commands/task/start.js +32 -113
- package/dist/commands/task/task.command.d.ts +3 -4
- package/dist/commands/task/task.command.d.ts.map +1 -1
- package/dist/commands/task/task.command.js +22 -37
- package/dist/commands/task/verify-record.d.ts.map +1 -1
- package/dist/commands/task/verify-record.js +21 -146
- package/dist/commands/task/verify.command.d.ts.map +1 -1
- package/dist/commands/task/verify.command.js +7 -6
- package/dist/commands/task.test-helpers.d.ts +13 -0
- package/dist/commands/task.test-helpers.d.ts.map +1 -0
- package/dist/commands/task.test-helpers.js +65 -0
- package/dist/commands/upgrade/apply.d.ts +2 -0
- package/dist/commands/upgrade/apply.d.ts.map +1 -1
- package/dist/commands/upgrade/apply.js +33 -1
- package/dist/commands/upgrade/materialize.d.ts +28 -0
- package/dist/commands/upgrade/materialize.d.ts.map +1 -0
- package/dist/commands/upgrade/materialize.js +154 -0
- package/dist/commands/upgrade/plan.d.ts +18 -0
- package/dist/commands/upgrade/plan.d.ts.map +1 -0
- package/dist/commands/upgrade/plan.js +219 -0
- package/dist/commands/upgrade/policy.d.ts +24 -0
- package/dist/commands/upgrade/policy.d.ts.map +1 -0
- package/dist/commands/upgrade/policy.js +182 -0
- package/dist/commands/upgrade/report.d.ts.map +1 -1
- package/dist/commands/upgrade/report.js +7 -5
- package/dist/commands/upgrade.command.d.ts.map +1 -1
- package/dist/commands/upgrade.command.js +25 -0
- package/dist/commands/upgrade.d.ts +1 -0
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +164 -618
- package/dist/commands/workflow.command.d.ts +3 -4
- package/dist/commands/workflow.command.d.ts.map +1 -1
- package/dist/commands/workflow.command.js +8 -25
- package/dist/policy/rules/allowlist.d.ts.map +1 -1
- package/dist/policy/rules/allowlist.js +12 -9
- package/dist/ports/task-backend-port.d.ts +4 -2
- package/dist/ports/task-backend-port.d.ts.map +1 -1
- package/dist/runner/adapters/codex.d.ts +9 -0
- package/dist/runner/adapters/codex.d.ts.map +1 -0
- package/dist/runner/adapters/codex.js +414 -0
- package/dist/runner/adapters/custom.d.ts +12 -0
- package/dist/runner/adapters/custom.d.ts.map +1 -0
- package/dist/runner/adapters/custom.js +512 -0
- package/dist/runner/adapters/index.d.ts +8 -0
- package/dist/runner/adapters/index.d.ts.map +1 -0
- package/dist/runner/adapters/index.js +15 -0
- package/dist/runner/adapters/recipe-run-profile.d.ts +8 -0
- package/dist/runner/adapters/recipe-run-profile.d.ts.map +1 -0
- package/dist/runner/adapters/recipe-run-profile.js +53 -0
- package/dist/runner/adapters/shared.d.ts +45 -0
- package/dist/runner/adapters/shared.d.ts.map +1 -0
- package/dist/runner/adapters/shared.js +58 -0
- package/dist/runner/artifacts.d.ts +31 -0
- package/dist/runner/artifacts.d.ts.map +1 -0
- package/dist/runner/artifacts.js +153 -0
- package/dist/runner/codex-approval-probe.d.ts +23 -0
- package/dist/runner/codex-approval-probe.d.ts.map +1 -0
- package/dist/runner/codex-approval-probe.js +55 -0
- package/dist/runner/codex-smoke.d.ts +11 -0
- package/dist/runner/codex-smoke.d.ts.map +1 -0
- package/dist/runner/codex-smoke.js +45 -0
- package/dist/runner/config.d.ts +6 -0
- package/dist/runner/config.d.ts.map +1 -0
- package/dist/runner/config.js +15 -0
- package/dist/runner/context/base-prompts.d.ts +10 -0
- package/dist/runner/context/base-prompts.d.ts.map +1 -0
- package/dist/runner/context/base-prompts.js +255 -0
- package/dist/runner/context/recipe-context.d.ts +17 -0
- package/dist/runner/context/recipe-context.d.ts.map +1 -0
- package/dist/runner/context/recipe-context.js +48 -0
- package/dist/runner/context/task-context.d.ts +24 -0
- package/dist/runner/context/task-context.d.ts.map +1 -0
- package/dist/runner/context/task-context.js +266 -0
- package/dist/runner/index.d.ts +12 -0
- package/dist/runner/index.d.ts.map +1 -0
- package/dist/runner/index.js +11 -0
- package/dist/runner/policy-decision.d.ts +12 -0
- package/dist/runner/policy-decision.d.ts.map +1 -0
- package/dist/runner/policy-decision.js +89 -0
- package/dist/runner/policy-display.d.ts +4 -0
- package/dist/runner/policy-display.d.ts.map +1 -0
- package/dist/runner/policy-display.js +41 -0
- package/dist/runner/process-supervision.d.ts +48 -0
- package/dist/runner/process-supervision.d.ts.map +1 -0
- package/dist/runner/process-supervision.js +490 -0
- package/dist/runner/result-manifest-policy.d.ts +9 -0
- package/dist/runner/result-manifest-policy.d.ts.map +1 -0
- package/dist/runner/result-manifest-policy.js +96 -0
- package/dist/runner/result-manifest.d.ts +30 -0
- package/dist/runner/result-manifest.d.ts.map +1 -0
- package/dist/runner/result-manifest.js +322 -0
- package/dist/runner/run-id.d.ts +2 -0
- package/dist/runner/run-id.d.ts.map +1 -0
- package/dist/runner/run-id.js +3 -0
- package/dist/runner/run-repository.d.ts +51 -0
- package/dist/runner/run-repository.d.ts.map +1 -0
- package/dist/runner/run-repository.js +222 -0
- package/dist/runner/task-run-paths.d.ts +19 -0
- package/dist/runner/task-run-paths.d.ts.map +1 -0
- package/dist/runner/task-run-paths.js +25 -0
- package/dist/runner/task-state.d.ts +9 -0
- package/dist/runner/task-state.d.ts.map +1 -0
- package/dist/runner/task-state.js +354 -0
- package/dist/runner/test-helpers.d.ts +30 -0
- package/dist/runner/test-helpers.d.ts.map +1 -0
- package/dist/runner/test-helpers.js +97 -0
- package/dist/runner/trace-artifacts.d.ts +14 -0
- package/dist/runner/trace-artifacts.d.ts.map +1 -0
- package/dist/runner/trace-artifacts.js +80 -0
- package/dist/runner/trace.d.ts +10 -0
- package/dist/runner/trace.d.ts.map +1 -0
- package/dist/runner/trace.js +37 -0
- package/dist/runner/types.d.ts +317 -0
- package/dist/runner/types.d.ts.map +1 -0
- package/dist/runner/types.js +3 -0
- package/dist/runner/usecases/scenario-materialize-task.d.ts +29 -0
- package/dist/runner/usecases/scenario-materialize-task.d.ts.map +1 -0
- package/dist/runner/usecases/scenario-materialize-task.js +151 -0
- package/dist/runner/usecases/task-run-inspect.d.ts +41 -0
- package/dist/runner/usecases/task-run-inspect.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-inspect.js +74 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.d.ts +10 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-cancel.js +172 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.d.ts +18 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-replay.js +128 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.d.ts +45 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle-shared.js +172 -0
- package/dist/runner/usecases/task-run-lifecycle.d.ts +4 -0
- package/dist/runner/usecases/task-run-lifecycle.d.ts.map +1 -0
- package/dist/runner/usecases/task-run-lifecycle.js +2 -0
- package/dist/runner/usecases/task-run.d.ts +32 -0
- package/dist/runner/usecases/task-run.d.ts.map +1 -0
- package/dist/runner/usecases/task-run.js +278 -0
- package/dist/shared/agent-emoji.d.ts.map +1 -1
- package/dist/shared/agent-emoji.js +1 -0
- package/dist/shared/errors.d.ts +1 -1
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/guards.d.ts.map +1 -1
- package/dist/shared/guards.js +1 -0
- package/dist/shared/protected-paths.d.ts +10 -0
- package/dist/shared/protected-paths.d.ts.map +1 -1
- package/dist/shared/protected-paths.js +33 -0
- package/dist/shared/repo-cli-version.d.ts.map +1 -1
- package/dist/shared/repo-cli-version.js +7 -5
- package/dist/shared/task-doc-conflicts.d.ts +12 -0
- package/dist/shared/task-doc-conflicts.d.ts.map +1 -0
- package/dist/shared/task-doc-conflicts.js +40 -0
- package/dist/shared/task-doc-state.d.ts +10 -0
- package/dist/shared/task-doc-state.d.ts.map +1 -0
- package/dist/shared/task-doc-state.js +15 -0
- package/dist/test-helpers/fs.d.ts +2 -0
- package/dist/test-helpers/fs.d.ts.map +1 -0
- package/dist/test-helpers/fs.js +9 -0
- package/dist/usecases/context/resolve-context.d.ts +2 -0
- package/dist/usecases/context/resolve-context.d.ts.map +1 -1
- package/dist/usecases/context/resolve-context.js +4 -1
- package/dist/usecases/task/task-list-usecase.d.ts.map +1 -1
- package/dist/usecases/task/task-list-usecase.js +2 -8
- package/dist/workflow-runtime/fix.d.ts +9 -1
- package/dist/workflow-runtime/fix.d.ts.map +1 -1
- package/dist/workflow-runtime/fix.js +9 -1
- package/package.json +3 -2
- package/dist/backends/task-backend.test-helpers.d.ts +0 -4
- package/dist/backends/task-backend.test-helpers.d.ts.map +0 -1
- package/dist/backends/task-backend.test-helpers.js +0 -33
- package/dist/cli/run-cli/catalog.d.ts +0 -7
- package/dist/cli/run-cli/catalog.d.ts.map +0 -1
- package/dist/cli/run-cli/catalog.js +0 -22
- package/dist/cli/run-cli.core.pr-flow.test-helpers.d.ts +0 -3
- package/dist/cli/run-cli.core.pr-flow.test-helpers.d.ts.map +0 -1
- package/dist/cli/run-cli.core.pr-flow.test-helpers.js +0 -41
- package/dist/cli/run-cli.core.tasks.test-helpers.d.ts +0 -2
- package/dist/cli/run-cli.core.tasks.test-helpers.d.ts.map +0 -1
- package/dist/cli/run-cli.core.tasks.test-helpers.js +0 -6
- package/dist/commands/block.command.d.ts +0 -4
- package/dist/commands/block.command.d.ts.map +0 -1
- package/dist/commands/block.command.js +0 -2
- package/dist/commands/doctor.command.d.ts +0 -3
- package/dist/commands/doctor.command.d.ts.map +0 -1
- package/dist/commands/doctor.command.js +0 -2
- package/dist/commands/finish.command.d.ts +0 -4
- package/dist/commands/finish.command.d.ts.map +0 -1
- package/dist/commands/finish.command.js +0 -2
- package/dist/commands/recipes/install.command.d.ts +0 -3
- package/dist/commands/recipes/install.command.d.ts.map +0 -1
- package/dist/commands/recipes/install.command.js +0 -2
- package/dist/commands/start.command.d.ts +0 -4
- package/dist/commands/start.command.d.ts.map +0 -1
- package/dist/commands/start.command.js +0 -2
- package/dist/commands/task/list.command.d.ts +0 -4
- package/dist/commands/task/list.command.d.ts.map +0 -1
- package/dist/commands/task/list.command.js +0 -2
- package/dist/commands/task/next.command.d.ts +0 -4
- package/dist/commands/task/next.command.d.ts.map +0 -1
- package/dist/commands/task/next.command.js +0 -2
- package/dist/commands/task/search.command.d.ts +0 -4
- package/dist/commands/task/search.command.d.ts.map +0 -1
- package/dist/commands/task/search.command.js +0 -2
- package/dist/commands/task/show.command.d.ts +0 -4
- package/dist/commands/task/show.command.d.ts.map +0 -1
- package/dist/commands/task/show.command.js +0 -2
- package/dist/commands/verify.command.d.ts +0 -4
- package/dist/commands/verify.command.d.ts.map +0 -1
- package/dist/commands/verify.command.js +0 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { canonicalizeJson } from "@agentplaneorg/core";
|
|
2
|
+
import { detectConfiguredFieldNameDrift, inferVisibleCanonicalStateFieldId, inspectVisibleCustomFields, } from "./inspect.js";
|
|
3
|
+
export async function inspectRedmineConfiguration(context) {
|
|
4
|
+
const visibleCustomFields = await inspectVisibleCustomFields({
|
|
5
|
+
projectId: context.projectId,
|
|
6
|
+
requestJson: async (method, reqPath, payload, params) => await context.requestJson(method, reqPath, payload, params),
|
|
7
|
+
});
|
|
8
|
+
const visibleCanonicalStateFieldId = inferVisibleCanonicalStateFieldId(visibleCustomFields);
|
|
9
|
+
return {
|
|
10
|
+
backendId: "redmine",
|
|
11
|
+
visibleCustomFields,
|
|
12
|
+
canonicalState: {
|
|
13
|
+
configuredFieldId: typeof context.customFields.canonical_state === "number"
|
|
14
|
+
? context.customFields.canonical_state
|
|
15
|
+
: null,
|
|
16
|
+
visibleFieldId: visibleCanonicalStateFieldId,
|
|
17
|
+
},
|
|
18
|
+
configuredFieldNameDrift: detectConfiguredFieldNameDrift({
|
|
19
|
+
configuredFields: context.customFields,
|
|
20
|
+
visibleFields: visibleCustomFields,
|
|
21
|
+
}),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export function diffRedmineTasks(localTask, remoteTask) {
|
|
25
|
+
const localText = JSON.stringify(canonicalizeJson(localTask), null, 2).split("\n");
|
|
26
|
+
const remoteText = JSON.stringify(canonicalizeJson(remoteTask), null, 2).split("\n");
|
|
27
|
+
const diff = ["--- remote", "+++ local"];
|
|
28
|
+
const max = Math.max(localText.length, remoteText.length);
|
|
29
|
+
for (let i = 0; i < max; i++) {
|
|
30
|
+
const localLine = localText[i];
|
|
31
|
+
const remoteLine = remoteText[i];
|
|
32
|
+
if (localLine === remoteLine)
|
|
33
|
+
continue;
|
|
34
|
+
if (remoteLine !== undefined)
|
|
35
|
+
diff.push(`- ${remoteLine}`);
|
|
36
|
+
if (localLine !== undefined)
|
|
37
|
+
diff.push(`+ ${localLine}`);
|
|
38
|
+
}
|
|
39
|
+
return diff.join("\n");
|
|
40
|
+
}
|
|
41
|
+
export function redmineTasksDiffer(localTask, remoteTask) {
|
|
42
|
+
return (JSON.stringify(canonicalizeJson(localTask)) !== JSON.stringify(canonicalizeJson(remoteTask)));
|
|
43
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type TaskCanonicalStateMigrationResult, type TaskData, type TaskDocMeta, type TaskWriteOptions } from "../shared.js";
|
|
2
|
+
import { type TaskComment } from "./comments.js";
|
|
3
|
+
type RedmineCachePort = {
|
|
4
|
+
listTasks: () => Promise<TaskData[]>;
|
|
5
|
+
writeTask: (task: TaskData, opts?: TaskWriteOptions) => Promise<void>;
|
|
6
|
+
};
|
|
7
|
+
export type RedmineSyncContext = {
|
|
8
|
+
cache: RedmineCachePort | null;
|
|
9
|
+
customFields: Record<string, unknown>;
|
|
10
|
+
ownerAgent: string;
|
|
11
|
+
projectId: string;
|
|
12
|
+
batchSize: number;
|
|
13
|
+
batchPauseMs: number;
|
|
14
|
+
statusMap: Record<string, unknown>;
|
|
15
|
+
issueCache: Map<string, Record<string, unknown>>;
|
|
16
|
+
inferredStatusByTaskStatus: Map<string, number> | null;
|
|
17
|
+
setInferredStatusByTaskStatus: (next: Map<string, number> | null) => void;
|
|
18
|
+
listTasksRemote: () => Promise<TaskData[]>;
|
|
19
|
+
writeTask: (task: TaskData, opts?: TaskWriteOptions) => Promise<void>;
|
|
20
|
+
writeTasks: (tasks: TaskData[], opts?: TaskWriteOptions) => Promise<void>;
|
|
21
|
+
findIssueByTaskId: (taskId: string) => Promise<Record<string, unknown> | null>;
|
|
22
|
+
issueToTask: (issue: Record<string, unknown>, taskIdOverride?: string) => TaskData | null;
|
|
23
|
+
taskToIssuePayload: (task: TaskData, existingIssue?: Record<string, unknown>) => Record<string, unknown>;
|
|
24
|
+
appendCustomField: (fields: Record<string, unknown>[], key: string, value: unknown) => void;
|
|
25
|
+
customFieldValue: (issue: Record<string, unknown>, fieldId: unknown) => string | null;
|
|
26
|
+
maybeParseJson: (value: unknown) => unknown;
|
|
27
|
+
normalizeComments: (value: unknown) => TaskComment[];
|
|
28
|
+
appendCommentNotes: (issueId: string, existingComments: TaskComment[], desiredComments: TaskComment[]) => Promise<void>;
|
|
29
|
+
cacheTask: (task: TaskData, dirty: boolean) => Promise<void>;
|
|
30
|
+
assertExpectedRevisionSupported: (taskId: string, opts?: TaskWriteOptions) => void;
|
|
31
|
+
assertExpectedRevision: (taskId: string, expectedRevision: number | undefined, currentRevision: number) => void;
|
|
32
|
+
ensureDocMetadata: (task: TaskDocMeta) => void;
|
|
33
|
+
diffTasks: (localTask: TaskData, remoteTask: TaskData) => string;
|
|
34
|
+
tasksDiffer: (localTask: TaskData, remoteTask: TaskData) => boolean;
|
|
35
|
+
taskIdFieldId: () => unknown;
|
|
36
|
+
setIssueCustomFieldValue: (issue: Record<string, unknown>, fieldId: unknown, value: unknown) => void;
|
|
37
|
+
requestJson: (method: string, reqPath: string, payload?: Record<string, unknown>, params?: Record<string, unknown>, opts?: {
|
|
38
|
+
attempts?: number;
|
|
39
|
+
backoff?: number;
|
|
40
|
+
}) => Promise<Record<string, unknown>>;
|
|
41
|
+
};
|
|
42
|
+
export declare function generateRedmineTaskId(context: RedmineSyncContext, opts: {
|
|
43
|
+
length: number;
|
|
44
|
+
attempts: number;
|
|
45
|
+
}): Promise<string>;
|
|
46
|
+
export declare function migrateRedmineCanonicalState(context: RedmineSyncContext): Promise<TaskCanonicalStateMigrationResult>;
|
|
47
|
+
export declare function writeRedmineTask(context: RedmineSyncContext, task: TaskData, opts?: TaskWriteOptions): Promise<void>;
|
|
48
|
+
export declare function writeRedmineTasks(context: RedmineSyncContext, tasks: TaskData[], opts?: TaskWriteOptions): Promise<void>;
|
|
49
|
+
export declare function syncRedmine(context: RedmineSyncContext, opts: {
|
|
50
|
+
direction: "push" | "pull";
|
|
51
|
+
conflict: "diff" | "prefer-local" | "prefer-remote" | "fail";
|
|
52
|
+
quiet: boolean;
|
|
53
|
+
confirm: boolean;
|
|
54
|
+
}): Promise<void>;
|
|
55
|
+
export declare function syncPushRedmine(context: RedmineSyncContext, quiet: boolean, confirm: boolean): Promise<void>;
|
|
56
|
+
export declare function syncPullRedmine(context: RedmineSyncContext, conflict: "diff" | "prefer-local" | "prefer-remote" | "fail", quiet: boolean): Promise<void>;
|
|
57
|
+
export declare function handleRedmineConflict(context: RedmineSyncContext, taskId: string, localTask: TaskData, remoteTask: TaskData, conflict: "diff" | "prefer-local" | "prefer-remote" | "fail"): Promise<void>;
|
|
58
|
+
export declare function inferRedmineStatusIdForTaskStatus(context: RedmineSyncContext, statusRaw: unknown): Promise<number | null>;
|
|
59
|
+
export declare function loadRedmineInferredStatusByTaskStatus(context: RedmineSyncContext): Promise<Map<string, number>>;
|
|
60
|
+
export declare function selectRedmineInferredStatus(statuses: {
|
|
61
|
+
id: number;
|
|
62
|
+
name: string;
|
|
63
|
+
isClosed: boolean;
|
|
64
|
+
isDefault: boolean;
|
|
65
|
+
}[], target: "TODO" | "DOING" | "DONE"): number | null;
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=backend-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend-sync.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/redmine/backend-sync.ts"],"names":[],"mappings":"AAEA,OAAO,EAUL,KAAK,iCAAiC,EACtC,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,KAAK,gBAAgB,GAAG;IACtB,SAAS,EAAE,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrC,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACvE,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,0BAA0B,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACvD,6BAA6B,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1E,eAAe,EAAE,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3C,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,UAAU,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;IAC/E,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,CAAC,EAAE,MAAM,KAAK,QAAQ,GAAG,IAAI,CAAC;IAC1F,kBAAkB,EAAE,CAClB,IAAI,EAAE,QAAQ,EACd,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACpC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5F,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,KAAK,MAAM,GAAG,IAAI,CAAC;IACtF,cAAc,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IAC5C,iBAAiB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,WAAW,EAAE,CAAC;IACrD,kBAAkB,EAAE,CAClB,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,WAAW,EAAE,EAC/B,eAAe,EAAE,WAAW,EAAE,KAC3B,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,+BAA+B,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACnF,sBAAsB,EAAE,CACtB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,GAAG,SAAS,EACpC,eAAe,EAAE,MAAM,KACpB,IAAI,CAAC;IACV,iBAAiB,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C,SAAS,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,KAAK,MAAM,CAAC;IACjE,WAAW,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,KAAK,OAAO,CAAC;IACpE,aAAa,EAAE,MAAM,OAAO,CAAC;IAC7B,wBAAwB,EAAE,CACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,OAAO,KACX,IAAI,CAAC;IACV,WAAW,EAAE,CACX,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAC3C,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACvC,CAAC;AAYF,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,kBAAkB,EAC3B,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACzC,OAAO,CAAC,MAAM,CAAC,CAgBjB;AAED,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iCAAiC,CAAC,CA6G5C;AAED,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,kBAAkB,EAC3B,IAAI,EAAE,QAAQ,EACd,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,IAAI,CAAC,CA4Ff;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,kBAAkB,EAC3B,KAAK,EAAE,QAAQ,EAAE,EACjB,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,IAAI,CAAC,CAWf;AAED,wBAAsB,WAAW,CAC/B,OAAO,EAAE,kBAAkB,EAC3B,IAAI,EAAE;IACJ,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,GAAG,cAAc,GAAG,eAAe,GAAG,MAAM,CAAC;IAC7D,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,GACA,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,wBAAsB,eAAe,CACnC,OAAO,EAAE,kBAAkB,EAC3B,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC,CAkBf;AAED,wBAAsB,eAAe,CACnC,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,MAAM,GAAG,cAAc,GAAG,eAAe,GAAG,MAAM,EAC5D,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,IAAI,CAAC,CA+Bf;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,kBAAkB,EAC3B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,UAAU,EAAE,QAAQ,EACpB,QAAQ,EAAE,MAAM,GAAG,cAAc,GAAG,eAAe,GAAG,MAAM,GAC3D,OAAO,CAAC,IAAI,CAAC,CAcf;AAED,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"}
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { taskDocToSectionMap } from "@agentplaneorg/core";
|
|
2
|
+
import { BackendError, RedmineUnavailable, generateTaskId, missingTaskIdMessage, redmineConfigMissingEnvMessage, redmineIssueIdMissingMessage, sleep, toStringSafe, validateTaskId, } from "../shared.js";
|
|
3
|
+
import { buildRedmineCanonicalStateWithOptions, parseRedmineCanonicalState } from "./state.js";
|
|
4
|
+
function revisionNumber(value) {
|
|
5
|
+
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
6
|
+
}
|
|
7
|
+
function issueFromPayload(payload) {
|
|
8
|
+
return payload.issue && typeof payload.issue === "object" && !Array.isArray(payload.issue)
|
|
9
|
+
? payload.issue
|
|
10
|
+
: null;
|
|
11
|
+
}
|
|
12
|
+
export async function generateRedmineTaskId(context, opts) {
|
|
13
|
+
let existingIds = new Set();
|
|
14
|
+
try {
|
|
15
|
+
const tasks = await context.listTasksRemote();
|
|
16
|
+
existingIds = new Set(tasks.map((task) => toStringSafe(task.id)).filter(Boolean));
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
if (!(err instanceof RedmineUnavailable))
|
|
20
|
+
throw err;
|
|
21
|
+
if (!context.cache)
|
|
22
|
+
throw err;
|
|
23
|
+
const cached = await context.cache.listTasks();
|
|
24
|
+
existingIds = new Set(cached.map((task) => toStringSafe(task.id)).filter(Boolean));
|
|
25
|
+
}
|
|
26
|
+
return await generateTaskId({
|
|
27
|
+
length: opts.length,
|
|
28
|
+
attempts: opts.attempts,
|
|
29
|
+
isAvailable: (taskId) => !existingIds.has(taskId),
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export async function migrateRedmineCanonicalState(context) {
|
|
33
|
+
if (!context.customFields.canonical_state) {
|
|
34
|
+
throw new BackendError(redmineConfigMissingEnvMessage("AGENTPLANE_REDMINE_CUSTOM_FIELDS_CANONICAL_STATE"), "E_BACKEND");
|
|
35
|
+
}
|
|
36
|
+
const tasks = await context.listTasksRemote();
|
|
37
|
+
const result = {
|
|
38
|
+
scanned: tasks.length,
|
|
39
|
+
migrated: [],
|
|
40
|
+
skippedStructured: [],
|
|
41
|
+
skippedNoDoc: [],
|
|
42
|
+
failed: [],
|
|
43
|
+
};
|
|
44
|
+
for (const [index, task] of tasks.entries()) {
|
|
45
|
+
const taskId = toStringSafe(task.id).trim();
|
|
46
|
+
if (!taskId)
|
|
47
|
+
continue;
|
|
48
|
+
const issue = context.issueCache.get(taskId);
|
|
49
|
+
if (!issue) {
|
|
50
|
+
result.failed.push({
|
|
51
|
+
taskId,
|
|
52
|
+
reason: "Redmine issue payload was not cached during remote list refresh",
|
|
53
|
+
});
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const currentState = parseRedmineCanonicalState(context.customFieldValue(issue, context.customFields.canonical_state));
|
|
57
|
+
if (currentState) {
|
|
58
|
+
result.skippedStructured.push(taskId);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const sections = task.sections && Object.keys(task.sections).length > 0
|
|
62
|
+
? task.sections
|
|
63
|
+
: task.doc
|
|
64
|
+
? taskDocToSectionMap(task.doc)
|
|
65
|
+
: undefined;
|
|
66
|
+
if (!sections || Object.keys(sections).length === 0) {
|
|
67
|
+
result.skippedNoDoc.push(taskId);
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
const issueIdText = toStringSafe(issue.id);
|
|
71
|
+
if (!issueIdText) {
|
|
72
|
+
result.failed.push({ taskId, reason: redmineIssueIdMissingMessage() });
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
const nextRevision = Math.max(revisionNumber(task.revision), 0, 1);
|
|
76
|
+
const nextCanonicalState = buildRedmineCanonicalStateWithOptions({
|
|
77
|
+
...task,
|
|
78
|
+
sections,
|
|
79
|
+
revision: nextRevision,
|
|
80
|
+
}, { base: currentState, revision: nextRevision });
|
|
81
|
+
if (!nextCanonicalState) {
|
|
82
|
+
result.skippedNoDoc.push(taskId);
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
const customFields = [];
|
|
86
|
+
context.appendCustomField(customFields, "canonical_state", nextCanonicalState);
|
|
87
|
+
try {
|
|
88
|
+
await context.requestJson("PUT", `issues/${issueIdText}.json`, {
|
|
89
|
+
issue: { custom_fields: customFields },
|
|
90
|
+
});
|
|
91
|
+
context.setIssueCustomFieldValue(issue, context.customFields.canonical_state, nextCanonicalState);
|
|
92
|
+
context.issueCache.set(taskId, issue);
|
|
93
|
+
await context.cacheTask({
|
|
94
|
+
...task,
|
|
95
|
+
sections,
|
|
96
|
+
revision: nextRevision,
|
|
97
|
+
dirty: false,
|
|
98
|
+
}, false);
|
|
99
|
+
result.migrated.push(taskId);
|
|
100
|
+
}
|
|
101
|
+
catch (err) {
|
|
102
|
+
result.failed.push({
|
|
103
|
+
taskId,
|
|
104
|
+
reason: err instanceof Error ? err.message : "Unknown Redmine canonical_state migration failure",
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
if (context.batchPauseMs > 0 &&
|
|
108
|
+
context.batchSize > 0 &&
|
|
109
|
+
(index + 1) % context.batchSize === 0) {
|
|
110
|
+
await sleep(context.batchPauseMs);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
115
|
+
export async function writeRedmineTask(context, task, opts) {
|
|
116
|
+
const taskId = toStringSafe(task.id).trim();
|
|
117
|
+
if (!taskId)
|
|
118
|
+
throw new Error(missingTaskIdMessage());
|
|
119
|
+
validateTaskId(taskId);
|
|
120
|
+
try {
|
|
121
|
+
context.ensureDocMetadata(task);
|
|
122
|
+
let issue = await context.findIssueByTaskId(taskId);
|
|
123
|
+
let issueId = issue?.id;
|
|
124
|
+
let issueIdText = issueId ? toStringSafe(issueId) : "";
|
|
125
|
+
let existingIssue = issue ?? null;
|
|
126
|
+
if (issueIdText && !existingIssue) {
|
|
127
|
+
const payload = await context.requestJson("GET", `issues/${issueIdText}.json`);
|
|
128
|
+
existingIssue = issueFromPayload(payload);
|
|
129
|
+
}
|
|
130
|
+
const currentState = existingIssue && context.customFields.canonical_state
|
|
131
|
+
? parseRedmineCanonicalState(context.customFieldValue(existingIssue, context.customFields.canonical_state))
|
|
132
|
+
: null;
|
|
133
|
+
context.assertExpectedRevisionSupported(taskId, opts);
|
|
134
|
+
context.assertExpectedRevision(taskId, opts?.expectedRevision, currentState?.revision ?? 0);
|
|
135
|
+
const nextRevision = issueIdText
|
|
136
|
+
? Math.max(revisionNumber(task.revision), revisionNumber(currentState?.revision), 0) + 1
|
|
137
|
+
: Math.max(revisionNumber(task.revision), revisionNumber(currentState?.revision), 1);
|
|
138
|
+
const taskForWrite = {
|
|
139
|
+
...task,
|
|
140
|
+
revision: nextRevision,
|
|
141
|
+
sections: task.sections && Object.keys(task.sections).length > 0
|
|
142
|
+
? task.sections
|
|
143
|
+
: task.doc
|
|
144
|
+
? taskDocToSectionMap(task.doc)
|
|
145
|
+
: undefined,
|
|
146
|
+
};
|
|
147
|
+
const payload = context.taskToIssuePayload(taskForWrite, existingIssue ?? undefined);
|
|
148
|
+
if (payload.status_id === undefined) {
|
|
149
|
+
const inferredStatusId = await inferRedmineStatusIdForTaskStatus(context, taskForWrite.status);
|
|
150
|
+
if (inferredStatusId !== null)
|
|
151
|
+
payload.status_id = inferredStatusId;
|
|
152
|
+
}
|
|
153
|
+
if (issueIdText) {
|
|
154
|
+
await context.requestJson("PUT", `issues/${issueIdText}.json`, { issue: payload });
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
const createPayload = { ...payload, project_id: context.projectId };
|
|
158
|
+
const created = await context.requestJson("POST", "issues.json", { issue: createPayload });
|
|
159
|
+
const createdIssue = issueFromPayload(created);
|
|
160
|
+
issueId = createdIssue?.id;
|
|
161
|
+
issueIdText = issueId ? toStringSafe(issueId) : "";
|
|
162
|
+
if (issueIdText) {
|
|
163
|
+
const updatePayload = { ...payload };
|
|
164
|
+
delete updatePayload.project_id;
|
|
165
|
+
await context.requestJson("PUT", `issues/${issueIdText}.json`, { issue: updatePayload });
|
|
166
|
+
const refreshed = await context.requestJson("GET", `issues/${issueIdText}.json`);
|
|
167
|
+
existingIssue = issueFromPayload(refreshed);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (issueIdText) {
|
|
171
|
+
const existingComments = existingIssue && context.customFields.comments
|
|
172
|
+
? context.normalizeComments(context.maybeParseJson(context.customFieldValue(existingIssue, context.customFields.comments)))
|
|
173
|
+
: [];
|
|
174
|
+
const desiredComments = context.normalizeComments(taskForWrite.comments);
|
|
175
|
+
await context.appendCommentNotes(issueIdText, existingComments, desiredComments);
|
|
176
|
+
}
|
|
177
|
+
taskForWrite.dirty = false;
|
|
178
|
+
await context.cacheTask(taskForWrite, false);
|
|
179
|
+
context.issueCache.clear();
|
|
180
|
+
}
|
|
181
|
+
catch (err) {
|
|
182
|
+
if (!(err instanceof RedmineUnavailable))
|
|
183
|
+
throw err;
|
|
184
|
+
if (!context.cache)
|
|
185
|
+
throw err;
|
|
186
|
+
context.assertExpectedRevisionSupported(taskId, opts);
|
|
187
|
+
const taskForCache = {
|
|
188
|
+
...task,
|
|
189
|
+
revision: Math.max(revisionNumber(task.revision), 1),
|
|
190
|
+
sections: task.sections && Object.keys(task.sections).length > 0
|
|
191
|
+
? task.sections
|
|
192
|
+
: task.doc
|
|
193
|
+
? taskDocToSectionMap(task.doc)
|
|
194
|
+
: undefined,
|
|
195
|
+
dirty: true,
|
|
196
|
+
};
|
|
197
|
+
await context.cache.writeTask(taskForCache, opts);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
export async function writeRedmineTasks(context, tasks, opts) {
|
|
201
|
+
for (const [index, task] of tasks.entries()) {
|
|
202
|
+
await context.writeTask(task, opts);
|
|
203
|
+
if (context.batchPauseMs > 0 &&
|
|
204
|
+
context.batchSize > 0 &&
|
|
205
|
+
(index + 1) % context.batchSize === 0) {
|
|
206
|
+
await sleep(context.batchPauseMs);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
export async function syncRedmine(context, opts) {
|
|
211
|
+
if (opts.direction === "push") {
|
|
212
|
+
await syncPushRedmine(context, opts.quiet, opts.confirm);
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
if (opts.direction === "pull") {
|
|
216
|
+
await syncPullRedmine(context, opts.conflict, opts.quiet);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
throw new BackendError("Invalid sync direction (expected push|pull)", "E_BACKEND");
|
|
220
|
+
}
|
|
221
|
+
export async function syncPushRedmine(context, quiet, confirm) {
|
|
222
|
+
if (!context.cache) {
|
|
223
|
+
throw new BackendError("Redmine cache is disabled; sync push is unavailable", "E_BACKEND");
|
|
224
|
+
}
|
|
225
|
+
const tasks = await context.cache.listTasks();
|
|
226
|
+
const dirty = tasks.filter((task) => task.dirty);
|
|
227
|
+
if (dirty.length === 0) {
|
|
228
|
+
if (!quiet)
|
|
229
|
+
process.stdout.write("ℹ️ no local task changes to push\n");
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (!confirm) {
|
|
233
|
+
for (const task of dirty) {
|
|
234
|
+
process.stdout.write(`- pending push: ${task.id}\n`);
|
|
235
|
+
}
|
|
236
|
+
throw new BackendError("Refusing to push without --yes (preview above)", "E_BACKEND");
|
|
237
|
+
}
|
|
238
|
+
await context.writeTasks(dirty);
|
|
239
|
+
if (!quiet)
|
|
240
|
+
process.stdout.write(`✅ pushed ${dirty.length} task(s) (dirty)\n`);
|
|
241
|
+
}
|
|
242
|
+
export async function syncPullRedmine(context, conflict, quiet) {
|
|
243
|
+
if (!context.cache) {
|
|
244
|
+
throw new BackendError("Redmine cache is disabled; sync pull is unavailable", "E_BACKEND");
|
|
245
|
+
}
|
|
246
|
+
const remoteTasks = await context.listTasksRemote();
|
|
247
|
+
const remoteById = new Map();
|
|
248
|
+
for (const task of remoteTasks) {
|
|
249
|
+
const taskId = toStringSafe(task.id);
|
|
250
|
+
if (taskId)
|
|
251
|
+
remoteById.set(taskId, task);
|
|
252
|
+
}
|
|
253
|
+
const localTasks = await context.cache.listTasks();
|
|
254
|
+
const localById = new Map();
|
|
255
|
+
for (const task of localTasks) {
|
|
256
|
+
const taskId = toStringSafe(task.id);
|
|
257
|
+
if (taskId)
|
|
258
|
+
localById.set(taskId, task);
|
|
259
|
+
}
|
|
260
|
+
for (const [taskId, remoteTask] of remoteById.entries()) {
|
|
261
|
+
const localTask = localById.get(taskId);
|
|
262
|
+
if (localTask?.dirty) {
|
|
263
|
+
if (context.tasksDiffer(localTask, remoteTask)) {
|
|
264
|
+
await handleRedmineConflict(context, taskId, localTask, remoteTask, conflict);
|
|
265
|
+
continue;
|
|
266
|
+
}
|
|
267
|
+
localTask.dirty = false;
|
|
268
|
+
await context.cacheTask(localTask, false);
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
await context.cacheTask(remoteTask, false);
|
|
272
|
+
}
|
|
273
|
+
if (!quiet)
|
|
274
|
+
process.stdout.write(`✅ pulled ${remoteById.size} task(s) (remote)\n`);
|
|
275
|
+
}
|
|
276
|
+
export async function handleRedmineConflict(context, taskId, localTask, remoteTask, conflict) {
|
|
277
|
+
if (conflict === "prefer-local") {
|
|
278
|
+
await context.writeTask(localTask);
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
if (conflict === "prefer-remote") {
|
|
282
|
+
await context.cacheTask(remoteTask, false);
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
if (conflict === "diff") {
|
|
286
|
+
process.stdout.write(`${context.diffTasks(localTask, remoteTask)}\n`);
|
|
287
|
+
throw new BackendError(`Conflict detected for ${taskId}`, "E_BACKEND");
|
|
288
|
+
}
|
|
289
|
+
throw new BackendError(`Conflict detected for ${taskId}`, "E_BACKEND");
|
|
290
|
+
}
|
|
291
|
+
export async function inferRedmineStatusIdForTaskStatus(context, statusRaw) {
|
|
292
|
+
const status = toStringSafe(statusRaw).trim().toUpperCase();
|
|
293
|
+
if (!status)
|
|
294
|
+
return null;
|
|
295
|
+
const explicit = context.statusMap?.[status];
|
|
296
|
+
if (typeof explicit === "number" && Number.isFinite(explicit))
|
|
297
|
+
return explicit;
|
|
298
|
+
const inferred = await loadRedmineInferredStatusByTaskStatus(context);
|
|
299
|
+
return inferred.get(status) ?? null;
|
|
300
|
+
}
|
|
301
|
+
export async function loadRedmineInferredStatusByTaskStatus(context) {
|
|
302
|
+
if (context.inferredStatusByTaskStatus)
|
|
303
|
+
return context.inferredStatusByTaskStatus;
|
|
304
|
+
const map = new Map();
|
|
305
|
+
context.setInferredStatusByTaskStatus(map);
|
|
306
|
+
try {
|
|
307
|
+
const payload = await context.requestJson("GET", "issue_statuses.json");
|
|
308
|
+
const statuses = Array.isArray(payload.issue_statuses) ? payload.issue_statuses : [];
|
|
309
|
+
const parsed = [];
|
|
310
|
+
for (const item of statuses) {
|
|
311
|
+
if (!item || typeof item !== "object" || Array.isArray(item))
|
|
312
|
+
continue;
|
|
313
|
+
const status = item;
|
|
314
|
+
const id = typeof status.id === "number" ? status.id : null;
|
|
315
|
+
if (!id || !Number.isFinite(id))
|
|
316
|
+
continue;
|
|
317
|
+
parsed.push({
|
|
318
|
+
id,
|
|
319
|
+
name: toStringSafe(status.name).trim().toLowerCase(),
|
|
320
|
+
isClosed: status.is_closed === true,
|
|
321
|
+
isDefault: status.is_default === true,
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
const done = selectRedmineInferredStatus(parsed, "DONE");
|
|
325
|
+
const doing = selectRedmineInferredStatus(parsed, "DOING");
|
|
326
|
+
const todo = selectRedmineInferredStatus(parsed, "TODO");
|
|
327
|
+
if (done !== null)
|
|
328
|
+
map.set("DONE", done);
|
|
329
|
+
if (doing !== null)
|
|
330
|
+
map.set("DOING", doing);
|
|
331
|
+
if (todo !== null)
|
|
332
|
+
map.set("TODO", todo);
|
|
333
|
+
}
|
|
334
|
+
catch {
|
|
335
|
+
// Best effort: keep previous behavior when status discovery is unavailable.
|
|
336
|
+
}
|
|
337
|
+
return map;
|
|
338
|
+
}
|
|
339
|
+
export function selectRedmineInferredStatus(statuses, target) {
|
|
340
|
+
if (statuses.length === 0)
|
|
341
|
+
return null;
|
|
342
|
+
if (target === "DOING") {
|
|
343
|
+
const byId = statuses.find((item) => item.id === 2);
|
|
344
|
+
if (byId)
|
|
345
|
+
return byId.id;
|
|
346
|
+
const byName = statuses.find((item) => item.name.includes("progress") || item.name.includes("doing"));
|
|
347
|
+
return byName?.id ?? null;
|
|
348
|
+
}
|
|
349
|
+
if (target === "DONE") {
|
|
350
|
+
const closed = statuses.find((item) => item.isClosed);
|
|
351
|
+
if (closed)
|
|
352
|
+
return closed.id;
|
|
353
|
+
const byId = statuses.find((item) => item.id === 5 || item.id === 3 || item.id === 6);
|
|
354
|
+
if (byId)
|
|
355
|
+
return byId.id;
|
|
356
|
+
const byName = statuses.find((item) => item.name.includes("done") ||
|
|
357
|
+
item.name.includes("closed") ||
|
|
358
|
+
item.name.includes("resolved") ||
|
|
359
|
+
item.name.includes("complete"));
|
|
360
|
+
return byName?.id ?? null;
|
|
361
|
+
}
|
|
362
|
+
const byDefault = statuses.find((item) => item.isDefault);
|
|
363
|
+
if (byDefault)
|
|
364
|
+
return byDefault.id;
|
|
365
|
+
const byId = statuses.find((item) => item.id === 1);
|
|
366
|
+
return byId?.id ?? statuses[0]?.id ?? null;
|
|
367
|
+
}
|
|
@@ -10,7 +10,7 @@ export type RedmineEnvConfig = {
|
|
|
10
10
|
pauseMs?: number;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
type RedmineCustomFieldKey = "task_id" | "doc" | "doc_version" | "doc_updated_at" | "doc_updated_by" | "tags" | "priority" | "owner";
|
|
13
|
+
type RedmineCustomFieldKey = "task_id" | "canonical_state" | "doc" | "doc_version" | "doc_updated_at" | "doc_updated_by" | "tags" | "priority" | "owner";
|
|
14
14
|
export declare function readRedmineEnv(): RedmineEnvConfig;
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=env.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/redmine/env.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7D,KAAK,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,KAAK,qBAAqB,GACtB,SAAS,GACT,KAAK,GACL,aAAa,GACb,gBAAgB,GAChB,gBAAgB,GAChB,MAAM,GACN,UAAU,GACV,OAAO,CAAC;AA6BZ,wBAAgB,cAAc,IAAI,gBAAgB,
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/redmine/env.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7D,KAAK,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,KAAK,qBAAqB,GACtB,SAAS,GACT,iBAAiB,GACjB,KAAK,GACL,aAAa,GACb,gBAAgB,GAChB,gBAAgB,GAChB,MAAM,GACN,UAAU,GACV,OAAO,CAAC;AA6BZ,wBAAgB,cAAc,IAAI,gBAAgB,CAmCjD"}
|
|
@@ -25,6 +25,9 @@ export function readRedmineEnv() {
|
|
|
25
25
|
const taskId = parsePositiveIntEnv("AGENTPLANE_REDMINE_CUSTOM_FIELDS_TASK_ID");
|
|
26
26
|
if (taskId !== undefined)
|
|
27
27
|
customFields.task_id = taskId;
|
|
28
|
+
const canonicalState = parsePositiveIntEnv("AGENTPLANE_REDMINE_CUSTOM_FIELDS_CANONICAL_STATE");
|
|
29
|
+
if (canonicalState !== undefined)
|
|
30
|
+
customFields.canonical_state = canonicalState;
|
|
28
31
|
const doc = parsePositiveIntEnv("AGENTPLANE_REDMINE_CUSTOM_FIELDS_DOC");
|
|
29
32
|
if (doc !== undefined)
|
|
30
33
|
customFields.doc = doc;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type TaskBackendFieldNameDrift, type TaskBackendVisibleField } from "../shared.js";
|
|
2
|
+
export declare function inspectVisibleCustomFields(opts: {
|
|
3
|
+
projectId: string;
|
|
4
|
+
requestJson: (method: string, reqPath: string, payload?: Record<string, unknown>, params?: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
5
|
+
}): Promise<TaskBackendVisibleField[]>;
|
|
6
|
+
export declare function inferVisibleCanonicalStateFieldId(visibleFields: TaskBackendVisibleField[]): number | null;
|
|
7
|
+
export declare function detectConfiguredFieldNameDrift(opts: {
|
|
8
|
+
configuredFields: Record<string, unknown>;
|
|
9
|
+
visibleFields: TaskBackendVisibleField[];
|
|
10
|
+
}): TaskBackendFieldNameDrift[];
|
|
11
|
+
//# sourceMappingURL=inspect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/redmine/inspect.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC7B,MAAM,cAAc,CAAC;AAYtB,wBAAsB,0BAA0B,CAAC,IAAI,EAAE;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,CACX,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACvC,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC,CA6CrC;AAED,wBAAgB,iCAAiC,CAC/C,aAAa,EAAE,uBAAuB,EAAE,GACvC,MAAM,GAAG,IAAI,CAGf;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE;IACnD,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,aAAa,EAAE,uBAAuB,EAAE,CAAC;CAC1C,GAAG,yBAAyB,EAAE,CAkB9B"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { isRecord } from "../../../shared/guards.js";
|
|
2
|
+
import { toStringSafe, } from "../shared.js";
|
|
3
|
+
function expectedFieldNameForKey(key) {
|
|
4
|
+
return key;
|
|
5
|
+
}
|
|
6
|
+
export async function inspectVisibleCustomFields(opts) {
|
|
7
|
+
const fields = new Map();
|
|
8
|
+
let offset = 0;
|
|
9
|
+
const limit = 100;
|
|
10
|
+
while (true) {
|
|
11
|
+
const payload = await opts.requestJson("GET", "issues.json", undefined, {
|
|
12
|
+
project_id: opts.projectId,
|
|
13
|
+
limit,
|
|
14
|
+
offset,
|
|
15
|
+
status_id: "*",
|
|
16
|
+
});
|
|
17
|
+
const issues = Array.isArray(payload.issues) ? payload.issues : [];
|
|
18
|
+
const pageIssues = issues.filter((issue) => isRecord(issue));
|
|
19
|
+
for (const issue of pageIssues) {
|
|
20
|
+
const customFields = Array.isArray(issue.custom_fields) ? issue.custom_fields : [];
|
|
21
|
+
for (const field of customFields) {
|
|
22
|
+
if (!isRecord(field) || typeof field.id !== "number")
|
|
23
|
+
continue;
|
|
24
|
+
const name = toStringSafe(field.name).trim();
|
|
25
|
+
if (!name)
|
|
26
|
+
continue;
|
|
27
|
+
const current = fields.get(field.id) ?? {
|
|
28
|
+
id: field.id,
|
|
29
|
+
name,
|
|
30
|
+
nonEmptyCount: 0,
|
|
31
|
+
};
|
|
32
|
+
const value = field.value;
|
|
33
|
+
if (value !== undefined && value !== null && toStringSafe(value).trim().length > 0) {
|
|
34
|
+
current.nonEmptyCount += 1;
|
|
35
|
+
}
|
|
36
|
+
fields.set(field.id, current);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const total = Number(payload.total_count ?? 0);
|
|
40
|
+
if (total === 0 || offset + limit >= total)
|
|
41
|
+
break;
|
|
42
|
+
offset += limit;
|
|
43
|
+
}
|
|
44
|
+
return [...fields.values()]
|
|
45
|
+
.toSorted((a, b) => a.id - b.id)
|
|
46
|
+
.map((field) => ({
|
|
47
|
+
id: field.id,
|
|
48
|
+
name: field.name,
|
|
49
|
+
nonEmptyCount: field.nonEmptyCount,
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
export function inferVisibleCanonicalStateFieldId(visibleFields) {
|
|
53
|
+
const field = visibleFields.find((entry) => entry.name.trim() === "canonical_state");
|
|
54
|
+
return field?.id ?? null;
|
|
55
|
+
}
|
|
56
|
+
export function detectConfiguredFieldNameDrift(opts) {
|
|
57
|
+
const byId = new Map(opts.visibleFields.map((field) => [field.id, field]));
|
|
58
|
+
const drift = [];
|
|
59
|
+
for (const [key, rawId] of Object.entries(opts.configuredFields)) {
|
|
60
|
+
if (typeof rawId !== "number")
|
|
61
|
+
continue;
|
|
62
|
+
const visible = byId.get(rawId);
|
|
63
|
+
if (!visible)
|
|
64
|
+
continue;
|
|
65
|
+
const expectedName = expectedFieldNameForKey(key);
|
|
66
|
+
if (visible.name.trim() === expectedName)
|
|
67
|
+
continue;
|
|
68
|
+
drift.push({
|
|
69
|
+
key,
|
|
70
|
+
configuredId: rawId,
|
|
71
|
+
visibleName: visible.name,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
return drift.toSorted((a, b) => a.configuredId - b.configuredId || a.key.localeCompare(b.key));
|
|
75
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type TaskDocVersion } from "@agentplaneorg/core";
|
|
1
2
|
import { type TaskData } from "../shared.js";
|
|
2
3
|
export declare function startDateFromTaskId(taskId: string): string | null;
|
|
3
4
|
export declare function doneRatioForStatus(status: string): number | null;
|
|
@@ -7,7 +8,7 @@ export declare function issueToTask(opts: {
|
|
|
7
8
|
reverseStatus: Map<number, string>;
|
|
8
9
|
customFields: Record<string, unknown>;
|
|
9
10
|
ownerAgent: string;
|
|
10
|
-
defaultDocVersion:
|
|
11
|
+
defaultDocVersion: TaskDocVersion;
|
|
11
12
|
}): TaskData | null;
|
|
12
13
|
export declare function taskToIssuePayload(opts: {
|
|
13
14
|
task: TaskData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/redmine/mapping.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../../../src/backends/task-backend/redmine/mapping.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAI7B,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"}
|