light-plan 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +3181 -2
- package/assets/README.md +111 -0
- package/assets/agents/lpm-developer.md +468 -0
- package/assets/agents/lpm-planner.md +532 -0
- package/assets/harnesses/claude.yml +43 -0
- package/assets/harnesses/copilot.yml +54 -0
- package/assets/harnesses/reasonix.yml +49 -0
- package/assets/hcm/light-plan.yml +45 -0
- package/assets/skills/lpm-board-health.md +243 -0
- package/assets/skills/lpm-board-setup.md +354 -0
- package/assets/skills/lpm-delivery.md +344 -0
- package/assets/skills/lpm-planning.md +411 -0
- package/assets/skills/lpm-templates.md +144 -0
- package/assets/skills/lpm.md +267 -0
- package/dist/cli/agent-view.d.ts +27 -0
- package/dist/cli/agent-view.js +247 -0
- package/dist/cli/agent-view.js.map +1 -0
- package/dist/cli/commands/agent/assets.d.ts +64 -0
- package/dist/cli/commands/agent/assets.js +106 -0
- package/dist/cli/commands/agent/assets.js.map +1 -0
- package/dist/cli/commands/agent/glob.d.ts +25 -0
- package/dist/cli/commands/agent/glob.js +82 -0
- package/dist/cli/commands/agent/glob.js.map +1 -0
- package/dist/cli/commands/agent/index.d.ts +11 -0
- package/dist/cli/commands/agent/index.js +284 -0
- package/dist/cli/commands/agent/index.js.map +1 -0
- package/dist/cli/commands/agent/install.d.ts +59 -0
- package/dist/cli/commands/agent/install.js +131 -0
- package/dist/cli/commands/agent/install.js.map +1 -0
- package/dist/cli/commands/agent/mapping.d.ts +175 -0
- package/dist/cli/commands/agent/mapping.js +256 -0
- package/dist/cli/commands/agent/mapping.js.map +1 -0
- package/dist/cli/commands/check.d.ts +2 -0
- package/dist/cli/commands/check.js +81 -0
- package/dist/cli/commands/check.js.map +1 -0
- package/dist/cli/commands/comment.d.ts +2 -0
- package/dist/cli/commands/comment.js +104 -0
- package/dist/cli/commands/comment.js.map +1 -0
- package/dist/cli/commands/convert.d.ts +2 -0
- package/dist/cli/commands/convert.js +115 -0
- package/dist/cli/commands/convert.js.map +1 -0
- package/dist/cli/commands/copy.d.ts +2 -0
- package/dist/cli/commands/copy.js +69 -0
- package/dist/cli/commands/copy.js.map +1 -0
- package/dist/cli/commands/export.d.ts +11 -0
- package/dist/cli/commands/export.js +226 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/flag.d.ts +2 -0
- package/dist/cli/commands/flag.js +172 -0
- package/dist/cli/commands/flag.js.map +1 -0
- package/dist/cli/commands/git.d.ts +11 -0
- package/dist/cli/commands/git.js +357 -0
- package/dist/cli/commands/git.js.map +1 -0
- package/dist/cli/commands/hcm/bundle.d.ts +60 -0
- package/dist/cli/commands/hcm/bundle.js +166 -0
- package/dist/cli/commands/hcm/bundle.js.map +1 -0
- package/dist/cli/commands/hcm/index.d.ts +11 -0
- package/dist/cli/commands/hcm/index.js +162 -0
- package/dist/cli/commands/hcm/index.js.map +1 -0
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.js +81 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/insert.d.ts +2 -0
- package/dist/cli/commands/insert.js +70 -0
- package/dist/cli/commands/insert.js.map +1 -0
- package/dist/cli/commands/instructions.d.ts +7 -0
- package/dist/cli/commands/instructions.js +256 -0
- package/dist/cli/commands/instructions.js.map +1 -0
- package/dist/cli/commands/link.d.ts +2 -0
- package/dist/cli/commands/link.js +121 -0
- package/dist/cli/commands/link.js.map +1 -0
- package/dist/cli/commands/mcp/config.d.ts +71 -0
- package/dist/cli/commands/mcp/config.js +119 -0
- package/dist/cli/commands/mcp/config.js.map +1 -0
- package/dist/cli/commands/mcp/index.d.ts +9 -0
- package/dist/cli/commands/mcp/index.js +92 -0
- package/dist/cli/commands/mcp/index.js.map +1 -0
- package/dist/cli/commands/mcp/serve.d.ts +1 -0
- package/dist/cli/commands/mcp/serve.js +76 -0
- package/dist/cli/commands/mcp/serve.js.map +1 -0
- package/dist/cli/commands/mcp/setup.d.ts +1 -0
- package/dist/cli/commands/mcp/setup.js +83 -0
- package/dist/cli/commands/mcp/setup.js.map +1 -0
- package/dist/cli/commands/me.d.ts +2 -0
- package/dist/cli/commands/me.js +85 -0
- package/dist/cli/commands/me.js.map +1 -0
- package/dist/cli/commands/move.d.ts +2 -0
- package/dist/cli/commands/move.js +81 -0
- package/dist/cli/commands/move.js.map +1 -0
- package/dist/cli/commands/new.d.ts +2 -0
- package/dist/cli/commands/new.js +222 -0
- package/dist/cli/commands/new.js.map +1 -0
- package/dist/cli/commands/open.d.ts +2 -0
- package/dist/cli/commands/open.js +43 -0
- package/dist/cli/commands/open.js.map +1 -0
- package/dist/cli/commands/period.d.ts +10 -0
- package/dist/cli/commands/period.js +165 -0
- package/dist/cli/commands/period.js.map +1 -0
- package/dist/cli/commands/profile.d.ts +2 -0
- package/dist/cli/commands/profile.js +133 -0
- package/dist/cli/commands/profile.js.map +1 -0
- package/dist/cli/commands/queue.d.ts +2 -0
- package/dist/cli/commands/queue.js +582 -0
- package/dist/cli/commands/queue.js.map +1 -0
- package/dist/cli/commands/remote.d.ts +10 -0
- package/dist/cli/commands/remote.js +3142 -0
- package/dist/cli/commands/remote.js.map +1 -0
- package/dist/cli/commands/rm.d.ts +2 -0
- package/dist/cli/commands/rm.js +63 -0
- package/dist/cli/commands/rm.js.map +1 -0
- package/dist/cli/commands/set.d.ts +2 -0
- package/dist/cli/commands/set.js +139 -0
- package/dist/cli/commands/set.js.map +1 -0
- package/dist/cli/commands/split.d.ts +2 -0
- package/dist/cli/commands/split.js +90 -0
- package/dist/cli/commands/split.js.map +1 -0
- package/dist/cli/commands/task.d.ts +2 -0
- package/dist/cli/commands/task.js +298 -0
- package/dist/cli/commands/task.js.map +1 -0
- package/dist/cli/commands/team.d.ts +2 -0
- package/dist/cli/commands/team.js +114 -0
- package/dist/cli/commands/team.js.map +1 -0
- package/dist/cli/commands/template.d.ts +2 -0
- package/dist/cli/commands/template.js +338 -0
- package/dist/cli/commands/template.js.map +1 -0
- package/dist/cli/commands/ui.d.ts +2 -0
- package/dist/cli/commands/ui.js +98 -0
- package/dist/cli/commands/ui.js.map +1 -0
- package/dist/cli/commands/upstream.d.ts +2 -0
- package/dist/cli/commands/upstream.js +218 -0
- package/dist/cli/commands/upstream.js.map +1 -0
- package/dist/cli/context.d.ts +24 -0
- package/dist/cli/context.js +52 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +208 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/live.d.ts +71 -0
- package/dist/cli/live.js +182 -0
- package/dist/cli/live.js.map +1 -0
- package/dist/cli/plan.d.ts +28 -0
- package/dist/cli/plan.js +76 -0
- package/dist/cli/plan.js.map +1 -0
- package/dist/cli/prompt.d.ts +60 -0
- package/dist/cli/prompt.js +185 -0
- package/dist/cli/prompt.js.map +1 -0
- package/dist/cli/ui.d.ts +65 -0
- package/dist/cli/ui.js +79 -0
- package/dist/cli/ui.js.map +1 -0
- package/dist/core/board/dependency-rollup.d.ts +54 -0
- package/dist/core/board/dependency-rollup.js +72 -0
- package/dist/core/board/dependency-rollup.js.map +1 -0
- package/dist/core/board/flag-rollup.d.ts +33 -0
- package/dist/core/board/flag-rollup.js +56 -0
- package/dist/core/board/flag-rollup.js.map +1 -0
- package/dist/core/board/index.d.ts +21 -0
- package/dist/core/board/index.js +22 -0
- package/dist/core/board/index.js.map +1 -0
- package/dist/core/board/load/cache.d.ts +52 -0
- package/dist/core/board/load/cache.js +105 -0
- package/dist/core/board/load/cache.js.map +1 -0
- package/dist/core/board/load/fields.d.ts +33 -0
- package/dist/core/board/load/fields.js +154 -0
- package/dist/core/board/load/fields.js.map +1 -0
- package/dist/core/board/load/scan.d.ts +39 -0
- package/dist/core/board/load/scan.js +88 -0
- package/dist/core/board/load/scan.js.map +1 -0
- package/dist/core/board/load/tree.d.ts +10 -0
- package/dist/core/board/load/tree.js +114 -0
- package/dist/core/board/load/tree.js.map +1 -0
- package/dist/core/board/load.d.ts +69 -0
- package/dist/core/board/load.js +204 -0
- package/dist/core/board/load.js.map +1 -0
- package/dist/core/board/query.d.ts +126 -0
- package/dist/core/board/query.js +291 -0
- package/dist/core/board/query.js.map +1 -0
- package/dist/core/board/registry.d.ts +51 -0
- package/dist/core/board/registry.js +98 -0
- package/dist/core/board/registry.js.map +1 -0
- package/dist/core/board/remote-scopes.d.ts +71 -0
- package/dist/core/board/remote-scopes.js +103 -0
- package/dist/core/board/remote-scopes.js.map +1 -0
- package/dist/core/board/rollup.d.ts +32 -0
- package/dist/core/board/rollup.js +67 -0
- package/dist/core/board/rollup.js.map +1 -0
- package/dist/core/board/scope.d.ts +81 -0
- package/dist/core/board/scope.js +134 -0
- package/dist/core/board/scope.js.map +1 -0
- package/dist/core/board/simulate.d.ts +138 -0
- package/dist/core/board/simulate.js +141 -0
- package/dist/core/board/simulate.js.map +1 -0
- package/dist/core/board/tasks/index.d.ts +25 -0
- package/dist/core/board/tasks/index.js +26 -0
- package/dist/core/board/tasks/index.js.map +1 -0
- package/dist/core/board/tasks/ranking.d.ts +155 -0
- package/dist/core/board/tasks/ranking.js +374 -0
- package/dist/core/board/tasks/ranking.js.map +1 -0
- package/dist/core/board/tasks/roster.d.ts +42 -0
- package/dist/core/board/tasks/roster.js +82 -0
- package/dist/core/board/tasks/roster.js.map +1 -0
- package/dist/core/board/tasks.d.ts +1 -0
- package/dist/core/board/tasks.js +2 -0
- package/dist/core/board/tasks.js.map +1 -0
- package/dist/core/config/index.d.ts +9 -0
- package/dist/core/config/index.js +10 -0
- package/dist/core/config/index.js.map +1 -0
- package/dist/core/config/lookup.d.ts +114 -0
- package/dist/core/config/lookup.js +221 -0
- package/dist/core/config/lookup.js.map +1 -0
- package/dist/core/config/remote-blocks.d.ts +17 -0
- package/dist/core/config/remote-blocks.js +47 -0
- package/dist/core/config/remote-blocks.js.map +1 -0
- package/dist/core/config/schema.d.ts +10 -0
- package/dist/core/config/schema.js +451 -0
- package/dist/core/config/schema.js.map +1 -0
- package/dist/core/errors.d.ts +23 -0
- package/dist/core/errors.js +31 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/gitsync/hosts.d.ts +40 -0
- package/dist/core/gitsync/hosts.js +115 -0
- package/dist/core/gitsync/hosts.js.map +1 -0
- package/dist/core/gitsync/index.d.ts +25 -0
- package/dist/core/gitsync/index.js +25 -0
- package/dist/core/gitsync/index.js.map +1 -0
- package/dist/core/gitsync/integrate.d.ts +72 -0
- package/dist/core/gitsync/integrate.js +115 -0
- package/dist/core/gitsync/integrate.js.map +1 -0
- package/dist/core/gitsync/repo.d.ts +61 -0
- package/dist/core/gitsync/repo.js +213 -0
- package/dist/core/gitsync/repo.js.map +1 -0
- package/dist/core/gitsync/run.d.ts +58 -0
- package/dist/core/gitsync/run.js +102 -0
- package/dist/core/gitsync/run.js.map +1 -0
- package/dist/core/gitsync/status.d.ts +59 -0
- package/dist/core/gitsync/status.js +81 -0
- package/dist/core/gitsync/status.js.map +1 -0
- package/dist/core/gitsync/sync.d.ts +111 -0
- package/dist/core/gitsync/sync.js +275 -0
- package/dist/core/gitsync/sync.js.map +1 -0
- package/dist/core/index.d.ts +31 -0
- package/dist/core/index.js +32 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/instructions/analyze.d.ts +70 -0
- package/dist/core/instructions/analyze.js +275 -0
- package/dist/core/instructions/analyze.js.map +1 -0
- package/dist/core/instructions/builtin.d.ts +21 -0
- package/dist/core/instructions/builtin.js +133 -0
- package/dist/core/instructions/builtin.js.map +1 -0
- package/dist/core/instructions/context.d.ts +155 -0
- package/dist/core/instructions/context.js +209 -0
- package/dist/core/instructions/context.js.map +1 -0
- package/dist/core/instructions/index.d.ts +29 -0
- package/dist/core/instructions/index.js +30 -0
- package/dist/core/instructions/index.js.map +1 -0
- package/dist/core/instructions/instructions.d.ts +90 -0
- package/dist/core/instructions/instructions.js +179 -0
- package/dist/core/instructions/instructions.js.map +1 -0
- package/dist/core/instructions/template.d.ts +108 -0
- package/dist/core/instructions/template.js +252 -0
- package/dist/core/instructions/template.js.map +1 -0
- package/dist/core/model/attributes.d.ts +16 -0
- package/dist/core/model/attributes.js +119 -0
- package/dist/core/model/attributes.js.map +1 -0
- package/dist/core/model/index.d.ts +10 -0
- package/dist/core/model/index.js +11 -0
- package/dist/core/model/index.js.map +1 -0
- package/dist/core/model/links.d.ts +34 -0
- package/dist/core/model/links.js +114 -0
- package/dist/core/model/links.js.map +1 -0
- package/dist/core/model/profile.d.ts +31 -0
- package/dist/core/model/profile.js +8 -0
- package/dist/core/model/profile.js.map +1 -0
- package/dist/core/model/types.d.ts +441 -0
- package/dist/core/model/types.js +167 -0
- package/dist/core/model/types.js.map +1 -0
- package/dist/core/model/zod.d.ts +6 -0
- package/dist/core/model/zod.js +11 -0
- package/dist/core/model/zod.js.map +1 -0
- package/dist/core/operations/board-index.d.ts +45 -0
- package/dist/core/operations/board-index.js +147 -0
- package/dist/core/operations/board-index.js.map +1 -0
- package/dist/core/operations/claim.d.ts +69 -0
- package/dist/core/operations/claim.js +115 -0
- package/dist/core/operations/claim.js.map +1 -0
- package/dist/core/operations/comment.d.ts +30 -0
- package/dist/core/operations/comment.js +46 -0
- package/dist/core/operations/comment.js.map +1 -0
- package/dist/core/operations/create.d.ts +82 -0
- package/dist/core/operations/create.js +306 -0
- package/dist/core/operations/create.js.map +1 -0
- package/dist/core/operations/flag.d.ts +58 -0
- package/dist/core/operations/flag.js +95 -0
- package/dist/core/operations/flag.js.map +1 -0
- package/dist/core/operations/git-sync.d.ts +148 -0
- package/dist/core/operations/git-sync.js +341 -0
- package/dist/core/operations/git-sync.js.map +1 -0
- package/dist/core/operations/index.d.ts +44 -0
- package/dist/core/operations/index.js +45 -0
- package/dist/core/operations/index.js.map +1 -0
- package/dist/core/operations/init.d.ts +25 -0
- package/dist/core/operations/init.js +122 -0
- package/dist/core/operations/init.js.map +1 -0
- package/dist/core/operations/link.d.ts +40 -0
- package/dist/core/operations/link.js +131 -0
- package/dist/core/operations/link.js.map +1 -0
- package/dist/core/operations/move.d.ts +43 -0
- package/dist/core/operations/move.js +103 -0
- package/dist/core/operations/move.js.map +1 -0
- package/dist/core/operations/profile.d.ts +23 -0
- package/dist/core/operations/profile.js +26 -0
- package/dist/core/operations/profile.js.map +1 -0
- package/dist/core/operations/remotes-off.d.ts +12 -0
- package/dist/core/operations/remotes-off.js +67 -0
- package/dist/core/operations/remotes-off.js.map +1 -0
- package/dist/core/operations/remove.d.ts +18 -0
- package/dist/core/operations/remove.js +114 -0
- package/dist/core/operations/remove.js.map +1 -0
- package/dist/core/operations/retype.d.ts +25 -0
- package/dist/core/operations/retype.js +59 -0
- package/dist/core/operations/retype.js.map +1 -0
- package/dist/core/operations/rollup.d.ts +74 -0
- package/dist/core/operations/rollup.js +121 -0
- package/dist/core/operations/rollup.js.map +1 -0
- package/dist/core/operations/shared.d.ts +133 -0
- package/dist/core/operations/shared.js +383 -0
- package/dist/core/operations/shared.js.map +1 -0
- package/dist/core/operations/update.d.ts +43 -0
- package/dist/core/operations/update.js +161 -0
- package/dist/core/operations/update.js.map +1 -0
- package/dist/core/operations/user.d.ts +27 -0
- package/dist/core/operations/user.js +68 -0
- package/dist/core/operations/user.js.map +1 -0
- package/dist/core/profile/current.d.ts +35 -0
- package/dist/core/profile/current.js +31 -0
- package/dist/core/profile/current.js.map +1 -0
- package/dist/core/profile/index.d.ts +14 -0
- package/dist/core/profile/index.js +15 -0
- package/dist/core/profile/index.js.map +1 -0
- package/dist/core/profile/schema.d.ts +9 -0
- package/dist/core/profile/schema.js +100 -0
- package/dist/core/profile/schema.js.map +1 -0
- package/dist/core/storage/activity.d.ts +78 -0
- package/dist/core/storage/activity.js +131 -0
- package/dist/core/storage/activity.js.map +1 -0
- package/dist/core/storage/atomic.d.ts +34 -0
- package/dist/core/storage/atomic.js +117 -0
- package/dist/core/storage/atomic.js.map +1 -0
- package/dist/core/storage/comments.d.ts +39 -0
- package/dist/core/storage/comments.js +88 -0
- package/dist/core/storage/comments.js.map +1 -0
- package/dist/core/storage/document.d.ts +16 -0
- package/dist/core/storage/document.js +98 -0
- package/dist/core/storage/document.js.map +1 -0
- package/dist/core/storage/frontmatter.d.ts +16 -0
- package/dist/core/storage/frontmatter.js +33 -0
- package/dist/core/storage/frontmatter.js.map +1 -0
- package/dist/core/storage/git.d.ts +8 -0
- package/dist/core/storage/git.js +48 -0
- package/dist/core/storage/git.js.map +1 -0
- package/dist/core/storage/index.d.ts +27 -0
- package/dist/core/storage/index.js +28 -0
- package/dist/core/storage/index.js.map +1 -0
- package/dist/core/storage/local.d.ts +57 -0
- package/dist/core/storage/local.js +133 -0
- package/dist/core/storage/local.js.map +1 -0
- package/dist/core/storage/lock.d.ts +85 -0
- package/dist/core/storage/lock.js +364 -0
- package/dist/core/storage/lock.js.map +1 -0
- package/dist/core/storage/paths.d.ts +125 -0
- package/dist/core/storage/paths.js +202 -0
- package/dist/core/storage/paths.js.map +1 -0
- package/dist/core/storage/state.d.ts +32 -0
- package/dist/core/storage/state.js +71 -0
- package/dist/core/storage/state.js.map +1 -0
- package/dist/core/storage/templates.d.ts +29 -0
- package/dist/core/storage/templates.js +62 -0
- package/dist/core/storage/templates.js.map +1 -0
- package/dist/core/storage/views.d.ts +18 -0
- package/dist/core/storage/views.js +62 -0
- package/dist/core/storage/views.js.map +1 -0
- package/dist/core/validation/check.d.ts +4 -0
- package/dist/core/validation/check.js +22 -0
- package/dist/core/validation/check.js.map +1 -0
- package/dist/core/validation/checks/collection.d.ts +4 -0
- package/dist/core/validation/checks/collection.js +152 -0
- package/dist/core/validation/checks/collection.js.map +1 -0
- package/dist/core/validation/checks/counters.d.ts +3 -0
- package/dist/core/validation/checks/counters.js +23 -0
- package/dist/core/validation/checks/counters.js.map +1 -0
- package/dist/core/validation/checks/dependencies.d.ts +3 -0
- package/dist/core/validation/checks/dependencies.js +58 -0
- package/dist/core/validation/checks/dependencies.js.map +1 -0
- package/dist/core/validation/checks/gitignore.d.ts +10 -0
- package/dist/core/validation/checks/gitignore.js +22 -0
- package/dist/core/validation/checks/gitignore.js.map +1 -0
- package/dist/core/validation/checks/index-file.d.ts +8 -0
- package/dist/core/validation/checks/index-file.js +26 -0
- package/dist/core/validation/checks/index-file.js.map +1 -0
- package/dist/core/validation/checks/index.d.ts +20 -0
- package/dist/core/validation/checks/index.js +21 -0
- package/dist/core/validation/checks/index.js.map +1 -0
- package/dist/core/validation/checks/issues.d.ts +3 -0
- package/dist/core/validation/checks/issues.js +152 -0
- package/dist/core/validation/checks/issues.js.map +1 -0
- package/dist/core/validation/checks/periods.d.ts +3 -0
- package/dist/core/validation/checks/periods.js +89 -0
- package/dist/core/validation/checks/periods.js.map +1 -0
- package/dist/core/validation/checks/remotes.d.ts +20 -0
- package/dist/core/validation/checks/remotes.js +42 -0
- package/dist/core/validation/checks/remotes.js.map +1 -0
- package/dist/core/validation/checks/resources.d.ts +3 -0
- package/dist/core/validation/checks/resources.js +77 -0
- package/dist/core/validation/checks/resources.js.map +1 -0
- package/dist/core/validation/checks/rollup.d.ts +27 -0
- package/dist/core/validation/checks/rollup.js +53 -0
- package/dist/core/validation/checks/rollup.js.map +1 -0
- package/dist/core/validation/checks/squads.d.ts +3 -0
- package/dist/core/validation/checks/squads.js +42 -0
- package/dist/core/validation/checks/squads.js.map +1 -0
- package/dist/core/validation/checks/templates.d.ts +14 -0
- package/dist/core/validation/checks/templates.js +119 -0
- package/dist/core/validation/checks/templates.js.map +1 -0
- package/dist/core/validation/fix.d.ts +7 -0
- package/dist/core/validation/fix.js +273 -0
- package/dist/core/validation/fix.js.map +1 -0
- package/dist/core/validation/index.d.ts +7 -0
- package/dist/core/validation/index.js +8 -0
- package/dist/core/validation/index.js.map +1 -0
- package/dist/core/validation/shared.d.ts +47 -0
- package/dist/core/validation/shared.js +66 -0
- package/dist/core/validation/shared.js.map +1 -0
- package/dist/mcp/context.d.ts +70 -0
- package/dist/mcp/context.js +110 -0
- package/dist/mcp/context.js.map +1 -0
- package/dist/mcp/index.d.ts +49 -0
- package/dist/mcp/index.js +90 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/reply.d.ts +28 -0
- package/dist/mcp/reply.js +34 -0
- package/dist/mcp/reply.js.map +1 -0
- package/dist/mcp/tools/plan/create.d.ts +3 -0
- package/dist/mcp/tools/plan/create.js +128 -0
- package/dist/mcp/tools/plan/create.js.map +1 -0
- package/dist/mcp/tools/plan/delete.d.ts +3 -0
- package/dist/mcp/tools/plan/delete.js +35 -0
- package/dist/mcp/tools/plan/delete.js.map +1 -0
- package/dist/mcp/tools/plan/graph.d.ts +3 -0
- package/dist/mcp/tools/plan/graph.js +53 -0
- package/dist/mcp/tools/plan/graph.js.map +1 -0
- package/dist/mcp/tools/plan/index.d.ts +15 -0
- package/dist/mcp/tools/plan/index.js +16 -0
- package/dist/mcp/tools/plan/index.js.map +1 -0
- package/dist/mcp/tools/plan/link.d.ts +3 -0
- package/dist/mcp/tools/plan/link.js +46 -0
- package/dist/mcp/tools/plan/link.js.map +1 -0
- package/dist/mcp/tools/plan/registrar.d.ts +10 -0
- package/dist/mcp/tools/plan/registrar.js +24 -0
- package/dist/mcp/tools/plan/registrar.js.map +1 -0
- package/dist/mcp/tools/plan/reshape.d.ts +3 -0
- package/dist/mcp/tools/plan/reshape.js +95 -0
- package/dist/mcp/tools/plan/reshape.js.map +1 -0
- package/dist/mcp/tools/plan/timeline.d.ts +3 -0
- package/dist/mcp/tools/plan/timeline.js +68 -0
- package/dist/mcp/tools/plan/timeline.js.map +1 -0
- package/dist/mcp/tools/plan/upstream.d.ts +14 -0
- package/dist/mcp/tools/plan/upstream.js +69 -0
- package/dist/mcp/tools/plan/upstream.js.map +1 -0
- package/dist/mcp/tools/plan.d.ts +1 -0
- package/dist/mcp/tools/plan.js +2 -0
- package/dist/mcp/tools/plan.js.map +1 -0
- package/dist/mcp/tools/read.d.ts +3 -0
- package/dist/mcp/tools/read.js +339 -0
- package/dist/mcp/tools/read.js.map +1 -0
- package/dist/mcp/tools/remote.d.ts +3 -0
- package/dist/mcp/tools/remote.js +254 -0
- package/dist/mcp/tools/remote.js.map +1 -0
- package/dist/mcp/tools/templates.d.ts +12 -0
- package/dist/mcp/tools/templates.js +165 -0
- package/dist/mcp/tools/templates.js.map +1 -0
- package/dist/mcp/tools/work.d.ts +16 -0
- package/dist/mcp/tools/work.js +359 -0
- package/dist/mcp/tools/work.js.map +1 -0
- package/dist/remote/accounts.d.ts +158 -0
- package/dist/remote/accounts.js +207 -0
- package/dist/remote/accounts.js.map +1 -0
- package/dist/remote/adopt.d.ts +139 -0
- package/dist/remote/adopt.js +181 -0
- package/dist/remote/adopt.js.map +1 -0
- package/dist/remote/anchor.d.ts +35 -0
- package/dist/remote/anchor.js +53 -0
- package/dist/remote/anchor.js.map +1 -0
- package/dist/remote/attributes.d.ts +103 -0
- package/dist/remote/attributes.js +245 -0
- package/dist/remote/attributes.js.map +1 -0
- package/dist/remote/audit.d.ts +112 -0
- package/dist/remote/audit.js +215 -0
- package/dist/remote/audit.js.map +1 -0
- package/dist/remote/capabilities.d.ts +267 -0
- package/dist/remote/capabilities.js +225 -0
- package/dist/remote/capabilities.js.map +1 -0
- package/dist/remote/check.d.ts +49 -0
- package/dist/remote/check.js +356 -0
- package/dist/remote/check.js.map +1 -0
- package/dist/remote/comments.d.ts +86 -0
- package/dist/remote/comments.js +87 -0
- package/dist/remote/comments.js.map +1 -0
- package/dist/remote/config-file.d.ts +237 -0
- package/dist/remote/config-file.js +640 -0
- package/dist/remote/config-file.js.map +1 -0
- package/dist/remote/conflicts.d.ts +110 -0
- package/dist/remote/conflicts.js +188 -0
- package/dist/remote/conflicts.js.map +1 -0
- package/dist/remote/connection-catalogue.d.ts +65 -0
- package/dist/remote/connection-catalogue.js +66 -0
- package/dist/remote/connection-catalogue.js.map +1 -0
- package/dist/remote/connection.d.ts +84 -0
- package/dist/remote/connection.js +229 -0
- package/dist/remote/connection.js.map +1 -0
- package/dist/remote/coverage.d.ts +65 -0
- package/dist/remote/coverage.js +244 -0
- package/dist/remote/coverage.js.map +1 -0
- package/dist/remote/credentials.d.ts +95 -0
- package/dist/remote/credentials.js +210 -0
- package/dist/remote/credentials.js.map +1 -0
- package/dist/remote/execute.d.ts +178 -0
- package/dist/remote/execute.js +1245 -0
- package/dist/remote/execute.js.map +1 -0
- package/dist/remote/fingerprint.d.ts +172 -0
- package/dist/remote/fingerprint.js +337 -0
- package/dist/remote/fingerprint.js.map +1 -0
- package/dist/remote/fixtures.d.ts +176 -0
- package/dist/remote/fixtures.js +432 -0
- package/dist/remote/fixtures.js.map +1 -0
- package/dist/remote/guard.d.ts +90 -0
- package/dist/remote/guard.js +83 -0
- package/dist/remote/guard.js.map +1 -0
- package/dist/remote/hierarchy.d.ts +141 -0
- package/dist/remote/hierarchy.js +129 -0
- package/dist/remote/hierarchy.js.map +1 -0
- package/dist/remote/index.d.ts +145 -0
- package/dist/remote/index.js +146 -0
- package/dist/remote/index.js.map +1 -0
- package/dist/remote/inspect.d.ts +103 -0
- package/dist/remote/inspect.js +152 -0
- package/dist/remote/inspect.js.map +1 -0
- package/dist/remote/labels.d.ts +75 -0
- package/dist/remote/labels.js +137 -0
- package/dist/remote/labels.js.map +1 -0
- package/dist/remote/ladder.d.ts +145 -0
- package/dist/remote/ladder.js +387 -0
- package/dist/remote/ladder.js.map +1 -0
- package/dist/remote/ledger.d.ts +97 -0
- package/dist/remote/ledger.js +148 -0
- package/dist/remote/ledger.js.map +1 -0
- package/dist/remote/lifecycle.d.ts +175 -0
- package/dist/remote/lifecycle.js +274 -0
- package/dist/remote/lifecycle.js.map +1 -0
- package/dist/remote/links.d.ts +411 -0
- package/dist/remote/links.js +748 -0
- package/dist/remote/links.js.map +1 -0
- package/dist/remote/managed-block.d.ts +182 -0
- package/dist/remote/managed-block.js +406 -0
- package/dist/remote/managed-block.js.map +1 -0
- package/dist/remote/managed-comment.d.ts +104 -0
- package/dist/remote/managed-comment.js +92 -0
- package/dist/remote/managed-comment.js.map +1 -0
- package/dist/remote/mapping.d.ts +282 -0
- package/dist/remote/mapping.js +336 -0
- package/dist/remote/mapping.js.map +1 -0
- package/dist/remote/merge.d.ts +172 -0
- package/dist/remote/merge.js +221 -0
- package/dist/remote/merge.js.map +1 -0
- package/dist/remote/periods.d.ts +209 -0
- package/dist/remote/periods.js +224 -0
- package/dist/remote/periods.js.map +1 -0
- package/dist/remote/plan.d.ts +671 -0
- package/dist/remote/plan.js +1210 -0
- package/dist/remote/plan.js.map +1 -0
- package/dist/remote/policy.d.ts +67 -0
- package/dist/remote/policy.js +67 -0
- package/dist/remote/policy.js.map +1 -0
- package/dist/remote/preflight.d.ts +112 -0
- package/dist/remote/preflight.js +342 -0
- package/dist/remote/preflight.js.map +1 -0
- package/dist/remote/prerequisites.d.ts +113 -0
- package/dist/remote/prerequisites.js +161 -0
- package/dist/remote/prerequisites.js.map +1 -0
- package/dist/remote/provider.d.ts +802 -0
- package/dist/remote/provider.js +27 -0
- package/dist/remote/provider.js.map +1 -0
- package/dist/remote/providers/github/config.d.ts +84 -0
- package/dist/remote/providers/github/config.js +161 -0
- package/dist/remote/providers/github/config.js.map +1 -0
- package/dist/remote/providers/github/connector.d.ts +33 -0
- package/dist/remote/providers/github/connector.js +774 -0
- package/dist/remote/providers/github/connector.js.map +1 -0
- package/dist/remote/providers/github/edges.d.ts +29 -0
- package/dist/remote/providers/github/edges.js +56 -0
- package/dist/remote/providers/github/edges.js.map +1 -0
- package/dist/remote/providers/github/hierarchy.d.ts +21 -0
- package/dist/remote/providers/github/hierarchy.js +46 -0
- package/dist/remote/providers/github/hierarchy.js.map +1 -0
- package/dist/remote/providers/github/index.d.ts +26 -0
- package/dist/remote/providers/github/index.js +69 -0
- package/dist/remote/providers/github/index.js.map +1 -0
- package/dist/remote/providers/github/project-iteration.d.ts +71 -0
- package/dist/remote/providers/github/project-iteration.js +203 -0
- package/dist/remote/providers/github/project-iteration.js.map +1 -0
- package/dist/remote/providers/github/project-provision.d.ts +130 -0
- package/dist/remote/providers/github/project-provision.js +247 -0
- package/dist/remote/providers/github/project-provision.js.map +1 -0
- package/dist/remote/providers/github/project-status.d.ts +115 -0
- package/dist/remote/providers/github/project-status.js +317 -0
- package/dist/remote/providers/github/project-status.js.map +1 -0
- package/dist/remote/providers/github/projects.d.ts +181 -0
- package/dist/remote/providers/github/projects.js +481 -0
- package/dist/remote/providers/github/projects.js.map +1 -0
- package/dist/remote/providers/github/translator.d.ts +103 -0
- package/dist/remote/providers/github/translator.js +400 -0
- package/dist/remote/providers/github/translator.js.map +1 -0
- package/dist/remote/providers/jira/config.d.ts +96 -0
- package/dist/remote/providers/jira/config.js +200 -0
- package/dist/remote/providers/jira/config.js.map +1 -0
- package/dist/remote/providers/jira/connector.d.ts +42 -0
- package/dist/remote/providers/jira/connector.js +1688 -0
- package/dist/remote/providers/jira/connector.js.map +1 -0
- package/dist/remote/providers/jira/fields.d.ts +292 -0
- package/dist/remote/providers/jira/fields.js +463 -0
- package/dist/remote/providers/jira/fields.js.map +1 -0
- package/dist/remote/providers/jira/hierarchy.d.ts +28 -0
- package/dist/remote/providers/jira/hierarchy.js +60 -0
- package/dist/remote/providers/jira/hierarchy.js.map +1 -0
- package/dist/remote/providers/jira/index.d.ts +29 -0
- package/dist/remote/providers/jira/index.js +100 -0
- package/dist/remote/providers/jira/index.js.map +1 -0
- package/dist/remote/providers/jira/links.d.ts +41 -0
- package/dist/remote/providers/jira/links.js +102 -0
- package/dist/remote/providers/jira/links.js.map +1 -0
- package/dist/remote/providers/jira/sprints.d.ts +80 -0
- package/dist/remote/providers/jira/sprints.js +107 -0
- package/dist/remote/providers/jira/sprints.js.map +1 -0
- package/dist/remote/providers/jira/translator.d.ts +61 -0
- package/dist/remote/providers/jira/translator.js +382 -0
- package/dist/remote/providers/jira/translator.js.map +1 -0
- package/dist/remote/providers/jira/types.d.ts +112 -0
- package/dist/remote/providers/jira/types.js +160 -0
- package/dist/remote/providers/jira/types.js.map +1 -0
- package/dist/remote/providers/jira/vocabulary.d.ts +55 -0
- package/dist/remote/providers/jira/vocabulary.js +91 -0
- package/dist/remote/providers/jira/vocabulary.js.map +1 -0
- package/dist/remote/providers/jsonfile/config.d.ts +61 -0
- package/dist/remote/providers/jsonfile/config.js +83 -0
- package/dist/remote/providers/jsonfile/config.js.map +1 -0
- package/dist/remote/providers/jsonfile/connector.d.ts +34 -0
- package/dist/remote/providers/jsonfile/connector.js +251 -0
- package/dist/remote/providers/jsonfile/connector.js.map +1 -0
- package/dist/remote/providers/jsonfile/index.d.ts +38 -0
- package/dist/remote/providers/jsonfile/index.js +90 -0
- package/dist/remote/providers/jsonfile/index.js.map +1 -0
- package/dist/remote/providers/jsonfile/store.d.ts +59 -0
- package/dist/remote/providers/jsonfile/store.js +48 -0
- package/dist/remote/providers/jsonfile/store.js.map +1 -0
- package/dist/remote/providers/jsonfile/translator.d.ts +54 -0
- package/dist/remote/providers/jsonfile/translator.js +199 -0
- package/dist/remote/providers/jsonfile/translator.js.map +1 -0
- package/dist/remote/providers/linear/config.d.ts +83 -0
- package/dist/remote/providers/linear/config.js +140 -0
- package/dist/remote/providers/linear/config.js.map +1 -0
- package/dist/remote/providers/linear/connector.d.ts +36 -0
- package/dist/remote/providers/linear/connector.js +438 -0
- package/dist/remote/providers/linear/connector.js.map +1 -0
- package/dist/remote/providers/linear/estimate.d.ts +63 -0
- package/dist/remote/providers/linear/estimate.js +112 -0
- package/dist/remote/providers/linear/estimate.js.map +1 -0
- package/dist/remote/providers/linear/index.d.ts +31 -0
- package/dist/remote/providers/linear/index.js +75 -0
- package/dist/remote/providers/linear/index.js.map +1 -0
- package/dist/remote/providers/linear/labels.d.ts +51 -0
- package/dist/remote/providers/linear/labels.js +129 -0
- package/dist/remote/providers/linear/labels.js.map +1 -0
- package/dist/remote/providers/linear/states.d.ts +97 -0
- package/dist/remote/providers/linear/states.js +124 -0
- package/dist/remote/providers/linear/states.js.map +1 -0
- package/dist/remote/providers/linear/translator.d.ts +48 -0
- package/dist/remote/providers/linear/translator.js +343 -0
- package/dist/remote/providers/linear/translator.js.map +1 -0
- package/dist/remote/providers/linear/vocabulary.d.ts +27 -0
- package/dist/remote/providers/linear/vocabulary.js +42 -0
- package/dist/remote/providers/linear/vocabulary.js.map +1 -0
- package/dist/remote/provision.d.ts +45 -0
- package/dist/remote/provision.js +81 -0
- package/dist/remote/provision.js.map +1 -0
- package/dist/remote/pull.d.ts +52 -0
- package/dist/remote/pull.js +116 -0
- package/dist/remote/pull.js.map +1 -0
- package/dist/remote/readiness.d.ts +67 -0
- package/dist/remote/readiness.js +336 -0
- package/dist/remote/readiness.js.map +1 -0
- package/dist/remote/rebase.d.ts +157 -0
- package/dist/remote/rebase.js +255 -0
- package/dist/remote/rebase.js.map +1 -0
- package/dist/remote/reconcile.d.ts +115 -0
- package/dist/remote/reconcile.js +140 -0
- package/dist/remote/reconcile.js.map +1 -0
- package/dist/remote/redact.d.ts +70 -0
- package/dist/remote/redact.js +132 -0
- package/dist/remote/redact.js.map +1 -0
- package/dist/remote/registry.d.ts +32 -0
- package/dist/remote/registry.js +54 -0
- package/dist/remote/registry.js.map +1 -0
- package/dist/remote/remotes.d.ts +94 -0
- package/dist/remote/remotes.js +182 -0
- package/dist/remote/remotes.js.map +1 -0
- package/dist/remote/render.d.ts +147 -0
- package/dist/remote/render.js +683 -0
- package/dist/remote/render.js.map +1 -0
- package/dist/remote/report.d.ts +63 -0
- package/dist/remote/report.js +345 -0
- package/dist/remote/report.js.map +1 -0
- package/dist/remote/resolutions.d.ts +115 -0
- package/dist/remote/resolutions.js +217 -0
- package/dist/remote/resolutions.js.map +1 -0
- package/dist/remote/scaffold.d.ts +134 -0
- package/dist/remote/scaffold.js +370 -0
- package/dist/remote/scaffold.js.map +1 -0
- package/dist/remote/scope.d.ts +57 -0
- package/dist/remote/scope.js +91 -0
- package/dist/remote/scope.js.map +1 -0
- package/dist/remote/selection.d.ts +38 -0
- package/dist/remote/selection.js +50 -0
- package/dist/remote/selection.js.map +1 -0
- package/dist/remote/shape.d.ts +141 -0
- package/dist/remote/shape.js +220 -0
- package/dist/remote/shape.js.map +1 -0
- package/dist/remote/status.d.ts +104 -0
- package/dist/remote/status.js +238 -0
- package/dist/remote/status.js.map +1 -0
- package/dist/remote/sync.d.ts +182 -0
- package/dist/remote/sync.js +523 -0
- package/dist/remote/sync.js.map +1 -0
- package/dist/remote/transport/budget.d.ts +48 -0
- package/dist/remote/transport/budget.js +68 -0
- package/dist/remote/transport/budget.js.map +1 -0
- package/dist/remote/transport/connector.d.ts +115 -0
- package/dist/remote/transport/connector.js +21 -0
- package/dist/remote/transport/connector.js.map +1 -0
- package/dist/remote/transport/error.d.ts +88 -0
- package/dist/remote/transport/error.js +196 -0
- package/dist/remote/transport/error.js.map +1 -0
- package/dist/remote/transport/gh.d.ts +20 -0
- package/dist/remote/transport/gh.js +41 -0
- package/dist/remote/transport/gh.js.map +1 -0
- package/dist/remote/transport/graphql.d.ts +25 -0
- package/dist/remote/transport/graphql.js +81 -0
- package/dist/remote/transport/graphql.js.map +1 -0
- package/dist/remote/transport/http.d.ts +47 -0
- package/dist/remote/transport/http.js +195 -0
- package/dist/remote/transport/http.js.map +1 -0
- package/dist/remote/transport/index.d.ts +18 -0
- package/dist/remote/transport/index.js +19 -0
- package/dist/remote/transport/index.js.map +1 -0
- package/dist/remote/transport/process.d.ts +39 -0
- package/dist/remote/transport/process.js +121 -0
- package/dist/remote/transport/process.js.map +1 -0
- package/dist/remote/transport/rest.d.ts +22 -0
- package/dist/remote/transport/rest.js +57 -0
- package/dist/remote/transport/rest.js.map +1 -0
- package/dist/remote/transport/retry.d.ts +91 -0
- package/dist/remote/transport/retry.js +138 -0
- package/dist/remote/transport/retry.js.map +1 -0
- package/dist/remote/transport-error.d.ts +19 -0
- package/dist/remote/transport-error.js +22 -0
- package/dist/remote/transport-error.js.map +1 -0
- package/dist/remote/vocabulary.d.ts +126 -0
- package/dist/remote/vocabulary.js +57 -0
- package/dist/remote/vocabulary.js.map +1 -0
- package/dist/runner/config.d.ts +7 -0
- package/dist/runner/config.js +61 -0
- package/dist/runner/config.js.map +1 -0
- package/dist/runner/git.d.ts +19 -0
- package/dist/runner/git.js +26 -0
- package/dist/runner/git.js.map +1 -0
- package/dist/runner/index.d.ts +20 -0
- package/dist/runner/index.js +21 -0
- package/dist/runner/index.js.map +1 -0
- package/dist/runner/loop.d.ts +46 -0
- package/dist/runner/loop.js +243 -0
- package/dist/runner/loop.js.map +1 -0
- package/dist/runner/pi.d.ts +39 -0
- package/dist/runner/pi.js +276 -0
- package/dist/runner/pi.js.map +1 -0
- package/dist/runner/shell.d.ts +44 -0
- package/dist/runner/shell.js +174 -0
- package/dist/runner/shell.js.map +1 -0
- package/dist/runner/stats.d.ts +19 -0
- package/dist/runner/stats.js +58 -0
- package/dist/runner/stats.js.map +1 -0
- package/dist/runner/types.d.ts +218 -0
- package/dist/runner/types.js +37 -0
- package/dist/runner/types.js.map +1 -0
- package/dist/server/git.d.ts +8 -0
- package/dist/server/git.js +50 -0
- package/dist/server/git.js.map +1 -0
- package/dist/server/http/respond.d.ts +13 -0
- package/dist/server/http/respond.js +59 -0
- package/dist/server/http/respond.js.map +1 -0
- package/dist/server/http/router.d.ts +27 -0
- package/dist/server/http/router.js +48 -0
- package/dist/server/http/router.js.map +1 -0
- package/dist/server/http/static.d.ts +14 -0
- package/dist/server/http/static.js +55 -0
- package/dist/server/http/static.js.map +1 -0
- package/dist/server/index.d.ts +58 -0
- package/dist/server/index.js +124 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/routes/board.d.ts +8 -0
- package/dist/server/routes/board.js +19 -0
- package/dist/server/routes/board.js.map +1 -0
- package/dist/server/routes/comments.d.ts +13 -0
- package/dist/server/routes/comments.js +36 -0
- package/dist/server/routes/comments.js.map +1 -0
- package/dist/server/routes/flags.d.ts +16 -0
- package/dist/server/routes/flags.js +37 -0
- package/dist/server/routes/flags.js.map +1 -0
- package/dist/server/routes/git.d.ts +13 -0
- package/dist/server/routes/git.js +84 -0
- package/dist/server/routes/git.js.map +1 -0
- package/dist/server/routes/remotes.d.ts +36 -0
- package/dist/server/routes/remotes.js +749 -0
- package/dist/server/routes/remotes.js.map +1 -0
- package/dist/server/routes/views.d.ts +10 -0
- package/dist/server/routes/views.js +63 -0
- package/dist/server/routes/views.js.map +1 -0
- package/dist/server/views/schema.d.ts +2 -0
- package/dist/server/views/schema.js +121 -0
- package/dist/server/views/schema.js.map +1 -0
- package/dist/server/views/store.d.ts +17 -0
- package/dist/server/views/store.js +67 -0
- package/dist/server/views/store.js.map +1 -0
- package/dist/shared/adf.d.ts +83 -0
- package/dist/shared/adf.js +795 -0
- package/dist/shared/adf.js.map +1 -0
- package/dist/shared/blocking.d.ts +130 -0
- package/dist/shared/blocking.js +179 -0
- package/dist/shared/blocking.js.map +1 -0
- package/dist/shared/changes.d.ts +100 -0
- package/dist/shared/changes.js +112 -0
- package/dist/shared/changes.js.map +1 -0
- package/dist/shared/cohesion.d.ts +75 -0
- package/dist/shared/cohesion.js +132 -0
- package/dist/shared/cohesion.js.map +1 -0
- package/dist/shared/dependency-rollup.d.ts +91 -0
- package/dist/shared/dependency-rollup.js +132 -0
- package/dist/shared/dependency-rollup.js.map +1 -0
- package/dist/shared/errors.d.ts +23 -0
- package/dist/shared/errors.js +24 -0
- package/dist/shared/errors.js.map +1 -0
- package/dist/shared/flag-rollup.d.ts +88 -0
- package/dist/shared/flag-rollup.js +119 -0
- package/dist/shared/flag-rollup.js.map +1 -0
- package/dist/shared/git-sync.d.ts +90 -0
- package/dist/shared/git-sync.js +9 -0
- package/dist/shared/git-sync.js.map +1 -0
- package/dist/shared/index.d.ts +40 -0
- package/dist/shared/index.js +41 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/model.d.ts +218 -0
- package/dist/shared/model.js +95 -0
- package/dist/shared/model.js.map +1 -0
- package/dist/shared/period-query.d.ts +21 -0
- package/dist/shared/period-query.js +26 -0
- package/dist/shared/period-query.js.map +1 -0
- package/dist/shared/period-stance.d.ts +45 -0
- package/dist/shared/period-stance.js +50 -0
- package/dist/shared/period-stance.js.map +1 -0
- package/dist/shared/plans/breakdown.d.ts +66 -0
- package/dist/shared/plans/breakdown.js +186 -0
- package/dist/shared/plans/breakdown.js.map +1 -0
- package/dist/shared/plans/index.d.ts +21 -0
- package/dist/shared/plans/index.js +22 -0
- package/dist/shared/plans/index.js.map +1 -0
- package/dist/shared/plans/instantiate.d.ts +61 -0
- package/dist/shared/plans/instantiate.js +184 -0
- package/dist/shared/plans/instantiate.js.map +1 -0
- package/dist/shared/plans/reading.d.ts +79 -0
- package/dist/shared/plans/reading.js +149 -0
- package/dist/shared/plans/reading.js.map +1 -0
- package/dist/shared/plans/reparent.d.ts +54 -0
- package/dist/shared/plans/reparent.js +217 -0
- package/dist/shared/plans/reparent.js.map +1 -0
- package/dist/shared/plans/timeline.d.ts +93 -0
- package/dist/shared/plans/timeline.js +224 -0
- package/dist/shared/plans/timeline.js.map +1 -0
- package/dist/shared/plans/upstream.d.ts +67 -0
- package/dist/shared/plans/upstream.js +73 -0
- package/dist/shared/plans/upstream.js.map +1 -0
- package/dist/shared/remote-api.d.ts +413 -0
- package/dist/shared/remote-api.js +11 -0
- package/dist/shared/remote-api.js.map +1 -0
- package/dist/shared/remote-coverage.d.ts +120 -0
- package/dist/shared/remote-coverage.js +98 -0
- package/dist/shared/remote-coverage.js.map +1 -0
- package/dist/shared/remote-readiness.d.ts +162 -0
- package/dist/shared/remote-readiness.js +49 -0
- package/dist/shared/remote-readiness.js.map +1 -0
- package/dist/shared/remote-status.d.ts +268 -0
- package/dist/shared/remote-status.js +79 -0
- package/dist/shared/remote-status.js.map +1 -0
- package/dist/shared/rollup.d.ts +90 -0
- package/dist/shared/rollup.js +119 -0
- package/dist/shared/rollup.js.map +1 -0
- package/dist/shared/static.d.ts +65 -0
- package/dist/shared/static.js +107 -0
- package/dist/shared/static.js.map +1 -0
- package/dist/shared/template-params.d.ts +80 -0
- package/dist/shared/template-params.js +141 -0
- package/dist/shared/template-params.js.map +1 -0
- package/dist/shared/view.d.ts +105 -0
- package/dist/shared/view.js +44 -0
- package/dist/shared/view.js.map +1 -0
- package/dist/shared/work-unit.d.ts +34 -0
- package/dist/shared/work-unit.js +47 -0
- package/dist/shared/work-unit.js.map +1 -0
- package/dist/sync/apply.d.ts +21 -0
- package/dist/sync/apply.js +149 -0
- package/dist/sync/apply.js.map +1 -0
- package/dist/sync/dto.d.ts +9 -0
- package/dist/sync/dto.js +162 -0
- package/dist/sync/dto.js.map +1 -0
- package/dist/sync/index.d.ts +24 -0
- package/dist/sync/index.js +25 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/patch.d.ts +13 -0
- package/dist/sync/patch.js +212 -0
- package/dist/sync/patch.js.map +1 -0
- package/dist/sync/session.d.ts +31 -0
- package/dist/sync/session.js +55 -0
- package/dist/sync/session.js.map +1 -0
- package/dist/sync/static.d.ts +11 -0
- package/dist/sync/static.js +33 -0
- package/dist/sync/static.js.map +1 -0
- package/package.json +95 -4
- package/templates/blank.yml +71 -0
- package/templates/context/bug.md +107 -0
- package/templates/context/default.md +119 -0
- package/templates/context/epic.md +81 -0
- package/templates/context/feature.md +91 -0
- package/templates/context/research.md +87 -0
- package/templates/context/review.md +81 -0
- package/templates/context/story.md +94 -0
- package/templates/context/sub_task.md +108 -0
- package/templates/context/task.md +86 -0
- package/templates/context/test.md +73 -0
- package/templates/context/user_story.md +147 -0
- package/templates/kanban.yml +226 -0
- package/templates/scrum.yml +567 -0
- package/web/dist/assets/index-D0j8OnHq.js +35 -0
- package/web/dist/assets/index-DFL7v8aP.css +1 -0
- package/web/dist/index.html +13 -0
- package/web/dist-viewer/assets/index-Bcns6OuC.css +1 -0
- package/web/dist-viewer/assets/index-vVXzeiFo.js +7 -0
- package/web/dist-viewer/index.html +14 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jira's two-way vocabulary translation.
|
|
3
|
+
*
|
|
4
|
+
* Jira Cloud has *native* issue types, workflow statuses and custom fields, so
|
|
5
|
+
* the mapping names them rather than encoding them onto labels (the GitHub
|
|
6
|
+
* approach). This translator is the Jira-specific bridge, using the remote's
|
|
7
|
+
* `mapping` block:
|
|
8
|
+
*
|
|
9
|
+
* push: a `BoardOp` plus the mapping becomes a `RemoteRequest` carrying
|
|
10
|
+
* `type` (issuetype name), `state` (workflow status name, transition-
|
|
11
|
+
* mediated), `title`, `body`, `assignee` and `parent` key;
|
|
12
|
+
* pull: a Jira issue record plus the mapping becomes a `BoardFieldsPatch`,
|
|
13
|
+
* recovering `type` from `fields.issuetype.name` and `status` from
|
|
14
|
+
* `fields.status.name` when the mapping names them unambiguously.
|
|
15
|
+
*
|
|
16
|
+
* Pure: no I/O. One translator serves every Jira remote. Where a value cannot
|
|
17
|
+
* be mapped back unambiguously, the field is left absent rather than guessed —
|
|
18
|
+
* the pull planner breaks ties with the board's hierarchy (LP-268).
|
|
19
|
+
*
|
|
20
|
+
* Two things are deliberately deferred rather than half-encoded here:
|
|
21
|
+
* **custom fields** (LP-324) — `mapping.attributes` names a field id, but
|
|
22
|
+
* `RemoteRequest` has no field to carry it, so attributes are deferred until
|
|
23
|
+
* that wire shape exists. **Sprints** (LP-328) are carried natively: the
|
|
24
|
+
* period resolves to a `PeriodContainer` on push and the connector writes the
|
|
25
|
+
* sprint field, and on pull the connector's `record.sprint` enrichment resolves
|
|
26
|
+
* back to a period by name.
|
|
27
|
+
*/
|
|
28
|
+
import { adfToMarkdown, markdownToAdf } from '../../../shared/adf.js';
|
|
29
|
+
import { stripManagedBlock } from '../../links.js';
|
|
30
|
+
import { parseManagedBlock } from '../../managed-block.js';
|
|
31
|
+
import { withBlockAssignee } from '../../accounts.js';
|
|
32
|
+
import { boardTypesMatching, mapStatusFromRemote, mapStatusToRemote, mapTypeToRemote, } from '../../mapping.js';
|
|
33
|
+
import { mapAssigneeFromRemote, mapAssigneeToRemote, normalizeAccountMapping, } from '../../accounts.js';
|
|
34
|
+
import { degradedFromBlockFields, degradedTypesOf, mapPeriodFromRemote, mapPeriodToRemote, normalizePeriodMapping, } from '../../periods.js';
|
|
35
|
+
import { isSubtaskType } from './types.js';
|
|
36
|
+
/** A Jira issue's `fields` object, read loosely. */
|
|
37
|
+
function fieldsOf(record) {
|
|
38
|
+
const fields = record['fields'];
|
|
39
|
+
if (fields && typeof fields === 'object' && !Array.isArray(fields)) {
|
|
40
|
+
return fields;
|
|
41
|
+
}
|
|
42
|
+
return {};
|
|
43
|
+
}
|
|
44
|
+
/** The Jira issuetype name, when the record carries one. */
|
|
45
|
+
function issueTypeNameOf(record) {
|
|
46
|
+
const issuetype = fieldsOf(record)['issuetype'];
|
|
47
|
+
if (issuetype && typeof issuetype === 'object') {
|
|
48
|
+
const name = issuetype['name'];
|
|
49
|
+
if (typeof name === 'string')
|
|
50
|
+
return name;
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Whether this record is a Jira **sub-task**, by Jira's own marker.
|
|
56
|
+
*
|
|
57
|
+
* Not the type's *name*, which a project may rename or localise, and not the
|
|
58
|
+
* board's type name, which says nothing about what Jira thinks. `isSubtaskType`
|
|
59
|
+
* is the one definition — it reads the `subtask` boolean and falls back to
|
|
60
|
+
* `hierarchyLevel === -1`, which is the same claim spelled the other way.
|
|
61
|
+
*/
|
|
62
|
+
function isSubtaskRecord(record) {
|
|
63
|
+
const issuetype = fieldsOf(record)['issuetype'];
|
|
64
|
+
if (issuetype === null || typeof issuetype !== 'object')
|
|
65
|
+
return false;
|
|
66
|
+
return isSubtaskType(issuetype);
|
|
67
|
+
}
|
|
68
|
+
/** The Jira status name, when the record carries one. */
|
|
69
|
+
function statusNameOf(record) {
|
|
70
|
+
const status = fieldsOf(record)['status'];
|
|
71
|
+
if (status && typeof status === 'object') {
|
|
72
|
+
const name = status['name'];
|
|
73
|
+
if (typeof name === 'string')
|
|
74
|
+
return name;
|
|
75
|
+
}
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Recover the local markdown body from a Jira `description` field.
|
|
80
|
+
*
|
|
81
|
+
* Jira Cloud returns `description` as an ADF document (an object) — never a
|
|
82
|
+
* markdown string — so this is where ADF → markdown happens. It also accepts
|
|
83
|
+
* the defensive spellings: a client that stringified the ADF, and a plain
|
|
84
|
+
* string left by an older write, both degrade gracefully rather than dropping
|
|
85
|
+
* the prose.
|
|
86
|
+
*/
|
|
87
|
+
export function bodyFromDescription(description) {
|
|
88
|
+
if (description === undefined || description === null)
|
|
89
|
+
return undefined;
|
|
90
|
+
if (typeof description === 'string') {
|
|
91
|
+
const trimmed = description.trim();
|
|
92
|
+
if (trimmed.startsWith('{') || trimmed.startsWith('[')) {
|
|
93
|
+
try {
|
|
94
|
+
const parsed = JSON.parse(trimmed);
|
|
95
|
+
if (parsed !== null && typeof parsed === 'object' && typeof parsed['type'] === 'string') {
|
|
96
|
+
return adfToMarkdown(parsed);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
// Not JSON — fall through and treat the string as literal prose.
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return description;
|
|
104
|
+
}
|
|
105
|
+
if (typeof description === 'object' && typeof description['type'] === 'string') {
|
|
106
|
+
return adfToMarkdown(description);
|
|
107
|
+
}
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
110
|
+
/** The Jira labels as plain strings. */
|
|
111
|
+
function labelsOf(record) {
|
|
112
|
+
const labels = fieldsOf(record)['labels'];
|
|
113
|
+
if (!Array.isArray(labels))
|
|
114
|
+
return [];
|
|
115
|
+
return labels.filter((label) => typeof label === 'string');
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The assignee value the account mapping should match against (LP-329). The
|
|
119
|
+
* generic pull matches the observed value against each person's `via`
|
|
120
|
+
* attribute, so the value must be of the *same kind* as that attribute:
|
|
121
|
+
*
|
|
122
|
+
* - `via: email` matches `assignee.emailAddress` — an email attribute against
|
|
123
|
+
* an email. A privacy-restricted instance hides the address, in which case
|
|
124
|
+
* the value falls back to the account id (which will not match, and the
|
|
125
|
+
* pull reports the assignee as unknown rather than guessing);
|
|
126
|
+
* - any other `via` (a `jira_account_id` attribute) matches the account id.
|
|
127
|
+
*/
|
|
128
|
+
function assigneeValueOf(record, via) {
|
|
129
|
+
const assignee = fieldsOf(record)['assignee'];
|
|
130
|
+
if (!assignee || typeof assignee !== 'object')
|
|
131
|
+
return undefined;
|
|
132
|
+
const a = assignee;
|
|
133
|
+
if (via === 'email') {
|
|
134
|
+
const email = a['emailAddress'];
|
|
135
|
+
if (typeof email === 'string' && email.length > 0)
|
|
136
|
+
return email;
|
|
137
|
+
}
|
|
138
|
+
const accountId = a['accountId'];
|
|
139
|
+
if (typeof accountId === 'string')
|
|
140
|
+
return accountId;
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Push: a board op becomes a Jira request description.
|
|
145
|
+
*
|
|
146
|
+
* `type` is the mapped issuetype name; `state` the mapped workflow status name
|
|
147
|
+
* (a push writes it as a transition, resolved by the connector). A create/update
|
|
148
|
+
* also carries `title`, `body` and the resolved assignee account id. A delete
|
|
149
|
+
* carries only its kind — Jira deletes hard.
|
|
150
|
+
*/
|
|
151
|
+
export function describeRequest(op, mapping, _attributes, roster = new Map(), periods = new Map()) {
|
|
152
|
+
if (op.kind === 'delete') {
|
|
153
|
+
return { request: { kind: 'delete' }, problems: [], resourceGaps: [], periodGaps: [] };
|
|
154
|
+
}
|
|
155
|
+
const m = mapping;
|
|
156
|
+
const resourceGaps = [];
|
|
157
|
+
const periodGaps = [];
|
|
158
|
+
let state;
|
|
159
|
+
let assignee;
|
|
160
|
+
let period;
|
|
161
|
+
let degradedPeriods;
|
|
162
|
+
// Jira has a native issuetype, so the mapped value is written there.
|
|
163
|
+
const type = mapTypeToRemote(m.types ?? {}, op.fields.type);
|
|
164
|
+
const remoteStatus = mapStatusToRemote(m.statuses ?? {}, op.fields.status);
|
|
165
|
+
if (remoteStatus !== undefined)
|
|
166
|
+
state = remoteStatus;
|
|
167
|
+
if (op.fields.assignee !== undefined) {
|
|
168
|
+
const accounts = normalizeAccountMapping(m.accounts);
|
|
169
|
+
const push = mapAssigneeToRemote(roster, accounts, op.fields.assignee);
|
|
170
|
+
assignee = push.account ?? null;
|
|
171
|
+
if (push.gap)
|
|
172
|
+
resourceGaps.push(push.gap);
|
|
173
|
+
}
|
|
174
|
+
// Period: resolve the issue's period to a sprint (the container) plus the
|
|
175
|
+
// degraded levels above it, which ride the managed block (LP-328, LP-313).
|
|
176
|
+
// Absent (`undefined`) means the op does not carry a period, so the remote
|
|
177
|
+
// side is left untouched; a period at a degraded level has no container and
|
|
178
|
+
// clears the sprint, its membership riding on the block instead.
|
|
179
|
+
if (op.fields.period !== undefined) {
|
|
180
|
+
const periodMapping = normalizePeriodMapping(m.periods);
|
|
181
|
+
if (periodMapping) {
|
|
182
|
+
const push = mapPeriodToRemote(periods, periodMapping, op.fields.period);
|
|
183
|
+
if (push.degraded.length > 0)
|
|
184
|
+
degradedPeriods = push.degraded;
|
|
185
|
+
period = push.container ?? null;
|
|
186
|
+
if (push.gap)
|
|
187
|
+
periodGaps.push(push.gap);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
// The body leaves here as **markdown**, with the managed block stripped: the
|
|
191
|
+
// block is the executor's to compose (it knows the degraded parent, the
|
|
192
|
+
// degraded period levels and the edges that landed), and it composes in
|
|
193
|
+
// markdown. Converting to ADF here meant the executor's
|
|
194
|
+
// `typeof body === 'string'` guard skipped the block entirely on create and
|
|
195
|
+
// sent raw markdown on a block rewrite, which Jira refused — so rung 4 did
|
|
196
|
+
// not work on Jira at all. The connector converts at the wire, which is
|
|
197
|
+
// where an encoding belongs.
|
|
198
|
+
let body;
|
|
199
|
+
if (op.fields.body !== undefined) {
|
|
200
|
+
body = stripManagedBlock(op.fields.body);
|
|
201
|
+
}
|
|
202
|
+
return {
|
|
203
|
+
request: {
|
|
204
|
+
kind: op.kind,
|
|
205
|
+
type,
|
|
206
|
+
title: op.fields.title,
|
|
207
|
+
body,
|
|
208
|
+
state,
|
|
209
|
+
assignee,
|
|
210
|
+
period,
|
|
211
|
+
...(degradedPeriods !== undefined ? { degradedPeriods } : {}),
|
|
212
|
+
},
|
|
213
|
+
problems: [],
|
|
214
|
+
resourceGaps,
|
|
215
|
+
periodGaps,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Pull: a Jira issue record becomes board fields.
|
|
220
|
+
*
|
|
221
|
+
* `title` ← `fields.summary`; `body` ← `fields.description` (a string here —
|
|
222
|
+
* Jira Cloud returns ADF, and LP-322 is where the ADF → markdown conversion
|
|
223
|
+
* lands); `type` ← `fields.issuetype.name` matched against the mapping's
|
|
224
|
+
* native type names; `status` ← `fields.status.name`; `assignee` ← the account
|
|
225
|
+
* id matched against the roster.
|
|
226
|
+
*/
|
|
227
|
+
export function fieldsFromRecord(record, mapping, _attributes, roster = new Map(), periods = new Map()) {
|
|
228
|
+
const m = mapping;
|
|
229
|
+
const patch = {};
|
|
230
|
+
const unknownAccounts = [];
|
|
231
|
+
const result = { patch, problems: [], unknownAccounts };
|
|
232
|
+
const summary = fieldsOf(record)['summary'];
|
|
233
|
+
if (typeof summary === 'string')
|
|
234
|
+
patch.title = summary;
|
|
235
|
+
// `description` is ADF on Jira Cloud; ADF → markdown lands here (LP-323).
|
|
236
|
+
//
|
|
237
|
+
// The managed block is the sync layer's own output, never the document's
|
|
238
|
+
// prose, so it is **parsed off** the way GitHub and Linear have always parsed
|
|
239
|
+
// it. Jira used to do neither: the block's markdown was written straight into
|
|
240
|
+
// the local body on every pull, and everything it carried — the degraded
|
|
241
|
+
// period levels, the parent, the assignee a tracker cannot hold — was lost.
|
|
242
|
+
// A board pushed to Jira and pulled back somewhere else came out missing the
|
|
243
|
+
// half of itself that Jira has no field for, which is exactly what the block
|
|
244
|
+
// exists to prevent.
|
|
245
|
+
const body = bodyFromDescription(fieldsOf(record)['description']);
|
|
246
|
+
let managedFields = {};
|
|
247
|
+
if (body !== undefined) {
|
|
248
|
+
const parsed = parseManagedBlock(body);
|
|
249
|
+
patch.body = parsed.found ? parsed.body : body;
|
|
250
|
+
if (parsed.found)
|
|
251
|
+
managedFields = parsed.fields;
|
|
252
|
+
}
|
|
253
|
+
// Type: the native issuetype name matched against the mapping's `type`
|
|
254
|
+
// names. Ambiguity leaves the field absent — the pull planner breaks ties.
|
|
255
|
+
const remoteType = issueTypeNameOf(record);
|
|
256
|
+
if (remoteType !== undefined) {
|
|
257
|
+
const candidates = boardTypesMatching(m.types ?? {}, { remoteType, labels: [] });
|
|
258
|
+
if (candidates.length === 1)
|
|
259
|
+
patch.type = candidates[0];
|
|
260
|
+
}
|
|
261
|
+
// Status: the native status name resolved through the mapping.
|
|
262
|
+
const remoteStatus = statusNameOf(record);
|
|
263
|
+
if (remoteStatus !== undefined) {
|
|
264
|
+
const resolution = mapStatusFromRemote(m.statuses ?? {}, [remoteStatus]);
|
|
265
|
+
if (resolution.status !== undefined)
|
|
266
|
+
patch.status = resolution.status;
|
|
267
|
+
}
|
|
268
|
+
// Period: the sprint (enriched onto the record by the connector as
|
|
269
|
+
// `record.sprint`) resolves to a local period by name among the mapped
|
|
270
|
+
// level's periods; its dates are recovered for the planner to reconcile, and
|
|
271
|
+
// a sprint matching no local period is reported, never invented (LP-328).
|
|
272
|
+
//
|
|
273
|
+
// **A sub-task's sprint is not its own, so it is never read back.** Jira does
|
|
274
|
+
// not let a sub-task be scheduled independently: it reports the *parent's*
|
|
275
|
+
// sprint on the sub-task, the identical object, whether or not anything ever
|
|
276
|
+
// wrote it there. Reading that as the sub-task's own value is a remote edit
|
|
277
|
+
// nobody made — on this repository's board every one of the 13 sub-tasks came
|
|
278
|
+
// back `behind` on `period`, permanently, because the board schedules the
|
|
279
|
+
// story and Jira echoes that sprint onto each of its children. Pulling it
|
|
280
|
+
// would not settle anything either: it would write a derived sprint onto
|
|
281
|
+
// documents the plan deliberately schedules one level up, changing what the
|
|
282
|
+
// periods view and the Gantt add up, and every one of them would drift again
|
|
283
|
+
// the moment the parent moved sprint.
|
|
284
|
+
//
|
|
285
|
+
// Omitting the field is the whole fix, in both directions, because the base
|
|
286
|
+
// snapshot falls back to the *local* value for a field the record does not
|
|
287
|
+
// carry (`baseFromRecord` in execute.ts): board and base agree, so nothing is
|
|
288
|
+
// ahead, and there is no remote value, so nothing is behind. The sprint is
|
|
289
|
+
// still mirrored — by the parent's own twin, which is the document that owns
|
|
290
|
+
// it. Same family as `normalizeBody`: a round trip the remote performs
|
|
291
|
+
// anyway, absorbed rather than reported as drift.
|
|
292
|
+
const periodMapping = normalizePeriodMapping(m.periods);
|
|
293
|
+
if (periodMapping && !isSubtaskRecord(record)) {
|
|
294
|
+
const sprint = record['sprint'];
|
|
295
|
+
let name;
|
|
296
|
+
let starts;
|
|
297
|
+
let ends;
|
|
298
|
+
if (sprint !== null && typeof sprint === 'object') {
|
|
299
|
+
const observed = sprint;
|
|
300
|
+
if (typeof observed['name'] === 'string')
|
|
301
|
+
name = observed['name'];
|
|
302
|
+
if (typeof observed['starts'] === 'string')
|
|
303
|
+
starts = observed['starts'];
|
|
304
|
+
if (typeof observed['ends'] === 'string')
|
|
305
|
+
ends = observed['ends'];
|
|
306
|
+
}
|
|
307
|
+
const pull = mapPeriodFromRemote(periods, periodMapping, {
|
|
308
|
+
container: name,
|
|
309
|
+
starts,
|
|
310
|
+
ends,
|
|
311
|
+
// The levels above the mapped one ride the block, because a Jira sprint is
|
|
312
|
+
// the only native container there is. Reading them back is what lets a
|
|
313
|
+
// fresh board recover the increment an issue sat in.
|
|
314
|
+
degraded: degradedFromBlockFields(managedFields, degradedTypesOf(periods, periodMapping)),
|
|
315
|
+
});
|
|
316
|
+
if (pull.periodId !== undefined)
|
|
317
|
+
patch.period = pull.periodId;
|
|
318
|
+
result.period = pull;
|
|
319
|
+
}
|
|
320
|
+
// Assignee: the account id (or, for `via: email`, the email address) matched
|
|
321
|
+
// against the roster's `via` attribute. An assignee nobody matches is
|
|
322
|
+
// reported, never invented (LP-329).
|
|
323
|
+
const accounts = normalizeAccountMapping(m.accounts);
|
|
324
|
+
const account = assigneeValueOf(record, accounts?.via);
|
|
325
|
+
const labels = labelsOf(record);
|
|
326
|
+
// An assignee the remote could not hold rides the managed block (rung 4), and
|
|
327
|
+
// it is recovered by handing the block's value to the same pool resolution the
|
|
328
|
+
// `pool:` label uses — both carry a board resource id, so one reader serves
|
|
329
|
+
// both and there is no second way for an assignee to come back.
|
|
330
|
+
const resolved = mapAssigneeFromRemote(roster, accounts, {
|
|
331
|
+
account,
|
|
332
|
+
labels: withBlockAssignee(labels, managedFields),
|
|
333
|
+
});
|
|
334
|
+
if (resolved.resourceId !== undefined) {
|
|
335
|
+
patch.assignee = resolved.resourceId;
|
|
336
|
+
}
|
|
337
|
+
else if (resolved.unassigned) {
|
|
338
|
+
patch.assignee = null;
|
|
339
|
+
}
|
|
340
|
+
else if (resolved.unknown) {
|
|
341
|
+
unknownAccounts.push(resolved.unknown);
|
|
342
|
+
}
|
|
343
|
+
return result;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* A board body as Jira will hand it back.
|
|
347
|
+
*
|
|
348
|
+
* Jira's description is ADF, and ADF has paragraphs but no source line breaks:
|
|
349
|
+
* a body hard-wrapped at eighty columns is one paragraph node on the way out
|
|
350
|
+
* and comes back as one long line. The base snapshot records what the remote
|
|
351
|
+
* echoed, so without this every wrapped document is permanently ahead — a push
|
|
352
|
+
* that rewrote all forty-three of them, and did it again on the next run.
|
|
353
|
+
*
|
|
354
|
+
* Running the board's own body through the same round trip makes the comparison
|
|
355
|
+
* like-for-like: re-wrapping stops counting as a change, and a real edit on
|
|
356
|
+
* either side still does.
|
|
357
|
+
*/
|
|
358
|
+
function normalizeBody(markdown) {
|
|
359
|
+
return adfToMarkdown(markdownToAdf(markdown));
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Which of a remote user's fields answers a board attribute.
|
|
363
|
+
*
|
|
364
|
+
* Jira assigns by **account id** and nothing else; an `email` in the mapping
|
|
365
|
+
* is a lookup key the connector resolves by search, not the thing Jira stores.
|
|
366
|
+
* So an `email`-keyed roster wants the user's email and everything else wants
|
|
367
|
+
* the account id — and a user the instance reports without an email (a
|
|
368
|
+
* privacy-restricted site does exactly that) cannot answer an email-keyed
|
|
369
|
+
* attribute at all, which is `undefined` rather than a guess.
|
|
370
|
+
*/
|
|
371
|
+
function accountValue(user, via) {
|
|
372
|
+
if (via === 'email')
|
|
373
|
+
return user.email;
|
|
374
|
+
return user.id;
|
|
375
|
+
}
|
|
376
|
+
export const jiraTranslator = {
|
|
377
|
+
describeRequest,
|
|
378
|
+
fieldsFromRecord,
|
|
379
|
+
normalizeBody,
|
|
380
|
+
accountValue,
|
|
381
|
+
};
|
|
382
|
+
//# sourceMappingURL=translator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translator.js","sourceRoot":"","sources":["../../../../src/remote/providers/jira/translator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAkC,MAAM,wBAAwB,CAAC;AAYtG,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,GAExB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,GAKvB,MAAM,kBAAkB,CAAC;AAE1B,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a,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;AAChD,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,YAAY,CAAC,IAAgB,EAAE,GAAW;IACjD,IAAI,GAAG,KAAK,OAAO;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC;IACvC,OAAO,IAAI,CAAC,EAAE,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAe;IACxC,eAAe;IACf,gBAAgB;IAChB,aAAa;IACb,YAAY;CACb,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Jira issue-type scheme — the project's *actual* types and their
|
|
3
|
+
* hierarchy levels, and what the board's `mapping.types` means against them
|
|
4
|
+
* (LP-324).
|
|
5
|
+
*
|
|
6
|
+
* Jira's issue types are per-project configuration, never platform constants:
|
|
7
|
+
* an org may have renamed "Epic", deleted "Story", or added levels above Epic
|
|
8
|
+
* (a paid Premium feature). So the mapping is validated **by name** against
|
|
9
|
+
* what the project actually reports, and there is no built-in default table —
|
|
10
|
+
* a board's `epic` may be Jira's "Initiative" on one site and "Epic" on the
|
|
11
|
+
* next. This module is the judge: a project's reported types in, a report out.
|
|
12
|
+
* The connector fetches the types (`issueTypes()`); `validateTypeMapping` and
|
|
13
|
+
* `typeSchemeProblems` only judge them, and `preflightTypeScheme` is the one
|
|
14
|
+
* async composition that ties the fetch to the judge — the "fetched at
|
|
15
|
+
* preflight and validated against them" acceptance criterion, ready for the
|
|
16
|
+
* sync command to call before it plans a push.
|
|
17
|
+
*
|
|
18
|
+
* Hierarchy levels, from the Cloud API (`fields.issuetype.hierarchyLevel`):
|
|
19
|
+
*
|
|
20
|
+
* -1 sub-task — must have a parent, never top-level
|
|
21
|
+
* 0 standard — Story, Task, Bug
|
|
22
|
+
* 1 epic — the classic ceiling
|
|
23
|
+
* 2+ levels above epic (Initiative, …) — a paid Premium feature
|
|
24
|
+
*
|
|
25
|
+
* The native *parent* levels a project supports is the span between its lowest
|
|
26
|
+
* and highest level, so "Epic › Story › Sub-task" is 2 and a Premium board
|
|
27
|
+
* with "Initiative" is 3. Detected, never assumed.
|
|
28
|
+
*/
|
|
29
|
+
import { type DegradedLevel } from '../../mapping.js';
|
|
30
|
+
import type { Problem } from '../../../core/model/types.js';
|
|
31
|
+
/** One issue type as the project reports it (`GET /rest/api/3/project/{key}?expand=issueTypes`). */
|
|
32
|
+
export interface JiraIssueType {
|
|
33
|
+
/** The issue type name, e.g. "Story", "Epic", "Sub-task". */
|
|
34
|
+
name: string;
|
|
35
|
+
/** True for sub-task types — they must be created with a parent. */
|
|
36
|
+
subtask?: boolean;
|
|
37
|
+
/** The hierarchy level: -1 sub-task, 0 standard, 1 epic, 2+ above. */
|
|
38
|
+
hierarchyLevel?: number;
|
|
39
|
+
}
|
|
40
|
+
/** True when the type is a sub-task — the `subtask` flag, or a -1 level. */
|
|
41
|
+
export declare function isSubtaskType(type: JiraIssueType): boolean;
|
|
42
|
+
/** The hierarchy level a type sits at: sub-tasks force -1, the rest report theirs (default 0). */
|
|
43
|
+
export declare function hierarchyLevelOf(type: JiraIssueType): number;
|
|
44
|
+
/**
|
|
45
|
+
* The native parent levels a project's scheme supports: the span from its
|
|
46
|
+
* lowest level (sub-task -1, or 0 without sub-tasks) to its highest (0
|
|
47
|
+
* standard, 1 epic, 2+ Premium). A standard-only project is flat (0).
|
|
48
|
+
*/
|
|
49
|
+
export declare function hierarchyDepthOf(types: readonly JiraIssueType[]): number;
|
|
50
|
+
/** A mapped type the project does not have. */
|
|
51
|
+
export interface MissingType {
|
|
52
|
+
/** The board type name, e.g. `feature`. */
|
|
53
|
+
boardType: string;
|
|
54
|
+
/** The Jira issuetype name the mapping points at, e.g. `Feature`. */
|
|
55
|
+
mappedType: string;
|
|
56
|
+
}
|
|
57
|
+
/** The board's `mapping.types` judged against the project's actual scheme. */
|
|
58
|
+
export interface TypeSchemeReport {
|
|
59
|
+
/** The project's issue type names, sorted — the list a bad mapping is shown. */
|
|
60
|
+
available: string[];
|
|
61
|
+
/** Board types whose mapped type the project does not have. */
|
|
62
|
+
missing: MissingType[];
|
|
63
|
+
/** Board types that map to a sub-task type (must always carry a parent). */
|
|
64
|
+
subtasks: string[];
|
|
65
|
+
/** The project's native parent levels, as the hierarchy capability reads. */
|
|
66
|
+
hierarchyDepth: number;
|
|
67
|
+
/** The board levels beyond the project's native depth — their parent degrades. */
|
|
68
|
+
degraded: DegradedLevel[];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Judge the board's `mapping.types` against the project's reported types.
|
|
72
|
+
*
|
|
73
|
+
* Pure: types + mapping + hierarchy in, a report out. A board type whose mapped
|
|
74
|
+
* type is absent is reported with the full `available` list, so a user can fix
|
|
75
|
+
* the mapping before filing anything. Types that map to a sub-task are named so
|
|
76
|
+
* the push knows they must carry a parent. The degraded levels come from
|
|
77
|
+
* `resolveHierarchyEncoding`, the same computation the push uses, so the report
|
|
78
|
+
* and the sync cannot disagree about which nesting degrades to labels plus the
|
|
79
|
+
* managed block.
|
|
80
|
+
*/
|
|
81
|
+
export declare function validateTypeMapping(mapping: Record<string, unknown>, types: readonly JiraIssueType[], hierarchy: string[][]): TypeSchemeReport;
|
|
82
|
+
/**
|
|
83
|
+
* The preflight problems a `TypeSchemeReport` becomes, in the codebase's own
|
|
84
|
+
* report vocabulary (`Problem[]`) — the shape `lpm remote …` prints and
|
|
85
|
+
* `hasErrorProblems` gates on.
|
|
86
|
+
*
|
|
87
|
+
* A mapped type the project does not have is an **error** naming the missing
|
|
88
|
+
* type *and* the list the project does have, so the fix is read off the report
|
|
89
|
+
* rather than guessed. A level beyond the project's native depth is a
|
|
90
|
+
* **warning**: its parent degrades to labels plus the managed block, the push
|
|
91
|
+
* still works.
|
|
92
|
+
*/
|
|
93
|
+
export declare function typeSchemeProblems(report: TypeSchemeReport, remoteName: string, configPath: string): Problem[];
|
|
94
|
+
/**
|
|
95
|
+
* The live preflight for the type scheme (LP-324): fetch the project's issue
|
|
96
|
+
* types through the connector and judge the board's `mapping.types` against
|
|
97
|
+
* them, returning the `Problem[]` a sync gates on (`hasErrorProblems`).
|
|
98
|
+
*
|
|
99
|
+
* This is the one async composition the pure halves cannot do on their own:
|
|
100
|
+
* the connector fetches, `validateTypeMapping` judges, `typeSchemeProblems`
|
|
101
|
+
* reports. A connector without `issueTypes()` — a provider with no native type
|
|
102
|
+
* scheme, or a fake in a test — is a no-op: there is no scheme to validate the
|
|
103
|
+
* mapping against, so there is nothing to report.
|
|
104
|
+
*
|
|
105
|
+
* `hierarchy` is the board's issue hierarchy (`hierarchyFor(config, 'issue')`);
|
|
106
|
+
* the report and the push both read it through `resolveHierarchyEncoding`, so
|
|
107
|
+
* the degraded levels named here are exactly the levels whose parent rides the
|
|
108
|
+
* managed block on the way out.
|
|
109
|
+
*/
|
|
110
|
+
export declare function preflightTypeScheme(connector: {
|
|
111
|
+
issueTypes?(): Promise<readonly JiraIssueType[]>;
|
|
112
|
+
}, mapping: Record<string, unknown>, hierarchy: string[][], remoteName: string, configPath: string): Promise<Problem[]>;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Jira issue-type scheme — the project's *actual* types and their
|
|
3
|
+
* hierarchy levels, and what the board's `mapping.types` means against them
|
|
4
|
+
* (LP-324).
|
|
5
|
+
*
|
|
6
|
+
* Jira's issue types are per-project configuration, never platform constants:
|
|
7
|
+
* an org may have renamed "Epic", deleted "Story", or added levels above Epic
|
|
8
|
+
* (a paid Premium feature). So the mapping is validated **by name** against
|
|
9
|
+
* what the project actually reports, and there is no built-in default table —
|
|
10
|
+
* a board's `epic` may be Jira's "Initiative" on one site and "Epic" on the
|
|
11
|
+
* next. This module is the judge: a project's reported types in, a report out.
|
|
12
|
+
* The connector fetches the types (`issueTypes()`); `validateTypeMapping` and
|
|
13
|
+
* `typeSchemeProblems` only judge them, and `preflightTypeScheme` is the one
|
|
14
|
+
* async composition that ties the fetch to the judge — the "fetched at
|
|
15
|
+
* preflight and validated against them" acceptance criterion, ready for the
|
|
16
|
+
* sync command to call before it plans a push.
|
|
17
|
+
*
|
|
18
|
+
* Hierarchy levels, from the Cloud API (`fields.issuetype.hierarchyLevel`):
|
|
19
|
+
*
|
|
20
|
+
* -1 sub-task — must have a parent, never top-level
|
|
21
|
+
* 0 standard — Story, Task, Bug
|
|
22
|
+
* 1 epic — the classic ceiling
|
|
23
|
+
* 2+ levels above epic (Initiative, …) — a paid Premium feature
|
|
24
|
+
*
|
|
25
|
+
* The native *parent* levels a project supports is the span between its lowest
|
|
26
|
+
* and highest level, so "Epic › Story › Sub-task" is 2 and a Premium board
|
|
27
|
+
* with "Initiative" is 3. Detected, never assumed.
|
|
28
|
+
*/
|
|
29
|
+
import { resolveHierarchyEncoding } from '../../hierarchy.js';
|
|
30
|
+
import { normalizeTypeMappings } from '../../mapping.js';
|
|
31
|
+
/** True when the type is a sub-task — the `subtask` flag, or a -1 level. */
|
|
32
|
+
export function isSubtaskType(type) {
|
|
33
|
+
if (type.subtask !== undefined)
|
|
34
|
+
return type.subtask;
|
|
35
|
+
return type.hierarchyLevel === -1;
|
|
36
|
+
}
|
|
37
|
+
/** The hierarchy level a type sits at: sub-tasks force -1, the rest report theirs (default 0). */
|
|
38
|
+
export function hierarchyLevelOf(type) {
|
|
39
|
+
if (isSubtaskType(type))
|
|
40
|
+
return -1;
|
|
41
|
+
return typeof type.hierarchyLevel === 'number' ? type.hierarchyLevel : 0;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The native parent levels a project's scheme supports: the span from its
|
|
45
|
+
* lowest level (sub-task -1, or 0 without sub-tasks) to its highest (0
|
|
46
|
+
* standard, 1 epic, 2+ Premium). A standard-only project is flat (0).
|
|
47
|
+
*/
|
|
48
|
+
export function hierarchyDepthOf(types) {
|
|
49
|
+
if (types.length === 0)
|
|
50
|
+
return 0;
|
|
51
|
+
let min = Infinity;
|
|
52
|
+
let max = -Infinity;
|
|
53
|
+
for (const type of types) {
|
|
54
|
+
const level = hierarchyLevelOf(type);
|
|
55
|
+
if (level < min)
|
|
56
|
+
min = level;
|
|
57
|
+
if (level > max)
|
|
58
|
+
max = level;
|
|
59
|
+
}
|
|
60
|
+
return Math.max(0, max - min);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Judge the board's `mapping.types` against the project's reported types.
|
|
64
|
+
*
|
|
65
|
+
* Pure: types + mapping + hierarchy in, a report out. A board type whose mapped
|
|
66
|
+
* type is absent is reported with the full `available` list, so a user can fix
|
|
67
|
+
* the mapping before filing anything. Types that map to a sub-task are named so
|
|
68
|
+
* the push knows they must carry a parent. The degraded levels come from
|
|
69
|
+
* `resolveHierarchyEncoding`, the same computation the push uses, so the report
|
|
70
|
+
* and the sync cannot disagree about which nesting degrades to labels plus the
|
|
71
|
+
* managed block.
|
|
72
|
+
*/
|
|
73
|
+
export function validateTypeMapping(mapping, types, hierarchy) {
|
|
74
|
+
const byName = new Map();
|
|
75
|
+
for (const type of types) {
|
|
76
|
+
if (!byName.has(type.name))
|
|
77
|
+
byName.set(type.name, type);
|
|
78
|
+
}
|
|
79
|
+
const missing = [];
|
|
80
|
+
const subtasks = [];
|
|
81
|
+
// Read straight off a remote declaration rather than through the provider
|
|
82
|
+
// schema, so it goes through the same normalizer the schema uses.
|
|
83
|
+
const typeMap = normalizeTypeMappings((mapping['types'] ?? {}));
|
|
84
|
+
for (const [boardType, entry] of Object.entries(typeMap)) {
|
|
85
|
+
// The mapped name is a Jira issuetype name here — the project must have
|
|
86
|
+
// the one it is asked to file against.
|
|
87
|
+
const mappedType = entry.remote;
|
|
88
|
+
const found = byName.get(mappedType);
|
|
89
|
+
if (found === undefined) {
|
|
90
|
+
missing.push({ boardType, mappedType });
|
|
91
|
+
}
|
|
92
|
+
else if (isSubtaskType(found)) {
|
|
93
|
+
subtasks.push(boardType);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const depth = hierarchyDepthOf(types);
|
|
97
|
+
const { degraded } = resolveHierarchyEncoding({ hierarchyDepth: depth }, hierarchy);
|
|
98
|
+
return {
|
|
99
|
+
available: [...byName.keys()].sort(),
|
|
100
|
+
missing: missing.sort((a, b) => a.boardType.localeCompare(b.boardType)),
|
|
101
|
+
subtasks: subtasks.sort(),
|
|
102
|
+
hierarchyDepth: depth,
|
|
103
|
+
degraded,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* The preflight problems a `TypeSchemeReport` becomes, in the codebase's own
|
|
108
|
+
* report vocabulary (`Problem[]`) — the shape `lpm remote …` prints and
|
|
109
|
+
* `hasErrorProblems` gates on.
|
|
110
|
+
*
|
|
111
|
+
* A mapped type the project does not have is an **error** naming the missing
|
|
112
|
+
* type *and* the list the project does have, so the fix is read off the report
|
|
113
|
+
* rather than guessed. A level beyond the project's native depth is a
|
|
114
|
+
* **warning**: its parent degrades to labels plus the managed block, the push
|
|
115
|
+
* still works.
|
|
116
|
+
*/
|
|
117
|
+
export function typeSchemeProblems(report, remoteName, configPath) {
|
|
118
|
+
const problems = [];
|
|
119
|
+
for (const missing of report.missing) {
|
|
120
|
+
problems.push({
|
|
121
|
+
level: 'error',
|
|
122
|
+
path: configPath,
|
|
123
|
+
message: `remotes.${remoteName}.mapping.types.${missing.boardType}: the project has no issue type ` +
|
|
124
|
+
`"${missing.mappedType}" — it has: ${report.available.join(', ')}`,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
for (const level of report.degraded) {
|
|
128
|
+
problems.push({
|
|
129
|
+
level: 'warn',
|
|
130
|
+
path: configPath,
|
|
131
|
+
message: `remotes.${remoteName}.mapping.types: level ${level.depth} (${level.types.join(', ')}) is deeper ` +
|
|
132
|
+
`than the project's ${report.hierarchyDepth} native parent level` +
|
|
133
|
+
`${report.hierarchyDepth === 1 ? '' : 's'} — its parent degrades to labels plus the managed block`,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
return problems;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The live preflight for the type scheme (LP-324): fetch the project's issue
|
|
140
|
+
* types through the connector and judge the board's `mapping.types` against
|
|
141
|
+
* them, returning the `Problem[]` a sync gates on (`hasErrorProblems`).
|
|
142
|
+
*
|
|
143
|
+
* This is the one async composition the pure halves cannot do on their own:
|
|
144
|
+
* the connector fetches, `validateTypeMapping` judges, `typeSchemeProblems`
|
|
145
|
+
* reports. A connector without `issueTypes()` — a provider with no native type
|
|
146
|
+
* scheme, or a fake in a test — is a no-op: there is no scheme to validate the
|
|
147
|
+
* mapping against, so there is nothing to report.
|
|
148
|
+
*
|
|
149
|
+
* `hierarchy` is the board's issue hierarchy (`hierarchyFor(config, 'issue')`);
|
|
150
|
+
* the report and the push both read it through `resolveHierarchyEncoding`, so
|
|
151
|
+
* the degraded levels named here are exactly the levels whose parent rides the
|
|
152
|
+
* managed block on the way out.
|
|
153
|
+
*/
|
|
154
|
+
export async function preflightTypeScheme(connector, mapping, hierarchy, remoteName, configPath) {
|
|
155
|
+
if (typeof connector.issueTypes !== 'function')
|
|
156
|
+
return [];
|
|
157
|
+
const types = await connector.issueTypes();
|
|
158
|
+
return typeSchemeProblems(validateTypeMapping(mapping, types, hierarchy), remoteName, configPath);
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=types.js.map
|