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,481 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Projects v2 node-id resolution and caching (LP-310).
|
|
3
|
+
*
|
|
4
|
+
* Projects v2 is GraphQL-only and everything in it is a node id: the project,
|
|
5
|
+
* every field, and every option of a single-select field. A config that names
|
|
6
|
+
* a Project as `project: 7` or a title, and its fields in plain words, must
|
|
7
|
+
* not have to carry a `PVT_...` identifier — and nobody should have to read
|
|
8
|
+
* one. This module resolves those names to node ids once, caches the result
|
|
9
|
+
* under `.lpm/remotes/<name>/github.json` (committed, so a teammate's first
|
|
10
|
+
* sync is a read rather than a full re-resolution), and detects a field or
|
|
11
|
+
* option renamed upstream — reported with both names, never treated as
|
|
12
|
+
* "missing", which is exactly the mistake that would send `provision` off to
|
|
13
|
+
* create a duplicate.
|
|
14
|
+
*
|
|
15
|
+
* ## Cache by name, verify by id
|
|
16
|
+
*
|
|
17
|
+
* The cache keys fields and options by *name*, because a name is the only key
|
|
18
|
+
* a person writes. When the ids are re-resolved (a `--refresh`, or a cache
|
|
19
|
+
* miss) the fresh ids are compared against the cached ones: a cached id that
|
|
20
|
+
* survives under a new name is a rename, and is reported rather than dropped.
|
|
21
|
+
*
|
|
22
|
+
* ## Pure vs I/O
|
|
23
|
+
*
|
|
24
|
+
* The split mirrors `capabilities.ts`: `resolveProjectGraphql` is the network
|
|
25
|
+
* half (no disk), `loadProjectCache` / `saveProjectCache` the disk half, and
|
|
26
|
+
* `resolveProjectIds` the orchestrator that decides when a cache hit is good
|
|
27
|
+
* enough and when a fresh resolution must run.
|
|
28
|
+
*/
|
|
29
|
+
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
30
|
+
import path from 'node:path';
|
|
31
|
+
import { BoardError } from '../../../core/errors.js';
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
// GraphQL documents
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
/** Resolve a Project by its number: `projectV2(number:)` is the one exact read. */
|
|
36
|
+
const PROJECT_BY_NUMBER_QUERY = `
|
|
37
|
+
query($owner: String!, $repo: String!, $number: Int!) {
|
|
38
|
+
repository(owner: $owner, name: $repo) {
|
|
39
|
+
projectV2(number: $number) {
|
|
40
|
+
id
|
|
41
|
+
number
|
|
42
|
+
title
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
/** Resolve a Project by its title: list the repo's projects and match the name. */
|
|
48
|
+
const PROJECTS_BY_TITLE_QUERY = `
|
|
49
|
+
query($owner: String!, $repo: String!) {
|
|
50
|
+
repository(owner: $owner, name: $repo) {
|
|
51
|
+
projectsV2(first: 100) {
|
|
52
|
+
nodes {
|
|
53
|
+
id
|
|
54
|
+
number
|
|
55
|
+
title
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
/** Resolve every field of a Project, with each single-select's options and
|
|
62
|
+
* each iteration field's iterations. */
|
|
63
|
+
const FIELDS_QUERY = `
|
|
64
|
+
query($projectId: ID!) {
|
|
65
|
+
node(id: $projectId) {
|
|
66
|
+
... on ProjectV2 {
|
|
67
|
+
fields(first: 100) {
|
|
68
|
+
nodes {
|
|
69
|
+
id
|
|
70
|
+
name
|
|
71
|
+
... on ProjectV2Field {
|
|
72
|
+
dataType
|
|
73
|
+
}
|
|
74
|
+
... on ProjectV2SingleSelectField {
|
|
75
|
+
options(first: 50) {
|
|
76
|
+
nodes {
|
|
77
|
+
id
|
|
78
|
+
name
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
... on ProjectV2IterationField {
|
|
83
|
+
configuration {
|
|
84
|
+
iterations {
|
|
85
|
+
id
|
|
86
|
+
title
|
|
87
|
+
startDate
|
|
88
|
+
duration
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
pageInfo {
|
|
94
|
+
hasNextPage
|
|
95
|
+
endCursor
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
// The network half
|
|
104
|
+
// ---------------------------------------------------------------------------
|
|
105
|
+
/** Split `owner/repo` into its two parts. */
|
|
106
|
+
function repoParts(repo) {
|
|
107
|
+
const slash = repo.indexOf('/');
|
|
108
|
+
if (slash <= 0 || slash === repo.length - 1) {
|
|
109
|
+
throw new BoardError(`Not an owner/repo: "${repo}"`, [
|
|
110
|
+
'The GitHub connection.repo must be "owner/repo".',
|
|
111
|
+
]);
|
|
112
|
+
}
|
|
113
|
+
return { owner: repo.slice(0, slash), name: repo.slice(slash + 1) };
|
|
114
|
+
}
|
|
115
|
+
/** The `graphql` entry point, or a `BoardError` when the connector has none. */
|
|
116
|
+
function graphqlOf(connector) {
|
|
117
|
+
if (typeof connector.graphql !== 'function') {
|
|
118
|
+
throw new BoardError(`The ${connector.name} connector has no GraphQL API`, [
|
|
119
|
+
'Projects v2 ids are GraphQL-only, so this provider must expose a GraphQL entry point to resolve them.',
|
|
120
|
+
]);
|
|
121
|
+
}
|
|
122
|
+
return connector.graphql.bind(connector);
|
|
123
|
+
}
|
|
124
|
+
/** Read `body.data` as a plain record, or throw when the platform answered
|
|
125
|
+
* with errors (a missing repository, a permission loss). */
|
|
126
|
+
function dataOf(body) {
|
|
127
|
+
if (body && typeof body === 'object') {
|
|
128
|
+
const errors = body['errors'];
|
|
129
|
+
if (Array.isArray(errors) && errors.length > 0) {
|
|
130
|
+
const first = errors[0]?.message;
|
|
131
|
+
throw new BoardError('GitHub GraphQL answered with errors', [
|
|
132
|
+
typeof first === 'string' ? first : JSON.stringify(errors[0]),
|
|
133
|
+
]);
|
|
134
|
+
}
|
|
135
|
+
const data = body['data'];
|
|
136
|
+
if (data && typeof data === 'object')
|
|
137
|
+
return data;
|
|
138
|
+
}
|
|
139
|
+
return {};
|
|
140
|
+
}
|
|
141
|
+
/** Read a field's `dataType`, defaulting to a plain name when absent. */
|
|
142
|
+
function fieldTypeOf(node) {
|
|
143
|
+
const dataType = node['dataType'];
|
|
144
|
+
return typeof dataType === 'string' ? dataType : '';
|
|
145
|
+
}
|
|
146
|
+
/** Read a single-select's options as a name → id map. */
|
|
147
|
+
function optionsOf(node) {
|
|
148
|
+
const options = node['options'];
|
|
149
|
+
const out = {};
|
|
150
|
+
if (!options || typeof options !== 'object')
|
|
151
|
+
return out;
|
|
152
|
+
const nodes = options.nodes;
|
|
153
|
+
if (!Array.isArray(nodes))
|
|
154
|
+
return out;
|
|
155
|
+
for (const option of nodes) {
|
|
156
|
+
if (!option || typeof option !== 'object')
|
|
157
|
+
continue;
|
|
158
|
+
const record = option;
|
|
159
|
+
const id = record['id'];
|
|
160
|
+
const name = record['name'];
|
|
161
|
+
if (typeof id === 'string' && typeof name === 'string')
|
|
162
|
+
out[name] = id;
|
|
163
|
+
}
|
|
164
|
+
return out;
|
|
165
|
+
}
|
|
166
|
+
/** Read an iteration field's iterations, in the field's own order. Returns
|
|
167
|
+
* `undefined` for a field with no iteration configuration (every non-iteration
|
|
168
|
+
* field), so the resolved ids stay free of empty keys a caller must ignore. */
|
|
169
|
+
function iterationsOf(node) {
|
|
170
|
+
const configuration = node['configuration'];
|
|
171
|
+
if (!configuration || typeof configuration !== 'object')
|
|
172
|
+
return undefined;
|
|
173
|
+
const iterations = configuration.iterations;
|
|
174
|
+
if (!Array.isArray(iterations))
|
|
175
|
+
return undefined;
|
|
176
|
+
const out = [];
|
|
177
|
+
for (const entry of iterations) {
|
|
178
|
+
if (!entry || typeof entry !== 'object')
|
|
179
|
+
continue;
|
|
180
|
+
const record = entry;
|
|
181
|
+
const id = record['id'];
|
|
182
|
+
const title = record['title'];
|
|
183
|
+
const startDate = record['startDate'];
|
|
184
|
+
const duration = record['duration'];
|
|
185
|
+
if (typeof id === 'string' && typeof title === 'string') {
|
|
186
|
+
out.push({
|
|
187
|
+
id,
|
|
188
|
+
title,
|
|
189
|
+
startDate: typeof startDate === 'string' ? startDate : '',
|
|
190
|
+
duration: typeof duration === 'number' ? duration : 0,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return out;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Resolve one Project's ids over GraphQL: the project node, then every field
|
|
198
|
+
* (and each single-select's options). Pure network — no disk.
|
|
199
|
+
*
|
|
200
|
+
* `input.project` is a number (resolve by `projectV2(number:)`) or a title
|
|
201
|
+
* (resolve by name among the repository's projects). A title that matches
|
|
202
|
+
* nothing, or a number naming no project, is a `BoardError` naming what was
|
|
203
|
+
* asked for.
|
|
204
|
+
*/
|
|
205
|
+
export async function resolveProjectGraphql(connector, input) {
|
|
206
|
+
if (input.project === undefined) {
|
|
207
|
+
throw new BoardError('No Project declared', [
|
|
208
|
+
'Set mapping.project to a Project number or title before resolving its fields.',
|
|
209
|
+
]);
|
|
210
|
+
}
|
|
211
|
+
const graphql = graphqlOf(connector);
|
|
212
|
+
const { owner, name } = repoParts(input.repo);
|
|
213
|
+
let project;
|
|
214
|
+
if (typeof input.project === 'number') {
|
|
215
|
+
const body = await graphql(PROJECT_BY_NUMBER_QUERY, { owner, name, number: input.project });
|
|
216
|
+
const repository = dataOf(body)['repository'] ?? {};
|
|
217
|
+
const node = repository['projectV2'] ?? {};
|
|
218
|
+
const id = node['id'];
|
|
219
|
+
const title = node['title'];
|
|
220
|
+
if (typeof id !== 'string') {
|
|
221
|
+
throw new BoardError(`No Project #${input.project} in ${input.repo}`, [
|
|
222
|
+
'The repository has no Projects v2 project with that number, or the credential cannot see it.',
|
|
223
|
+
]);
|
|
224
|
+
}
|
|
225
|
+
project = {
|
|
226
|
+
id,
|
|
227
|
+
number: typeof node['number'] === 'number' ? node['number'] : input.project,
|
|
228
|
+
title: typeof title === 'string' ? title : '',
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
const body = await graphql(PROJECTS_BY_TITLE_QUERY, { owner, name });
|
|
233
|
+
const repository = dataOf(body)['repository'] ?? {};
|
|
234
|
+
const projects = repository['projectsV2'] ?? {};
|
|
235
|
+
const nodes = Array.isArray(projects.nodes) ? projects.nodes : [];
|
|
236
|
+
const match = nodes.find((entry) => {
|
|
237
|
+
if (!entry || typeof entry !== 'object')
|
|
238
|
+
return false;
|
|
239
|
+
return entry['title'] === input.project;
|
|
240
|
+
});
|
|
241
|
+
if (!match || typeof match['id'] !== 'string') {
|
|
242
|
+
throw new BoardError(`No Project named "${input.project}" in ${input.repo}`, [
|
|
243
|
+
'The title must match a Projects v2 project in this repository exactly.',
|
|
244
|
+
]);
|
|
245
|
+
}
|
|
246
|
+
project = {
|
|
247
|
+
id: match['id'],
|
|
248
|
+
number: typeof match['number'] === 'number' ? match['number'] : null,
|
|
249
|
+
title: input.project,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
const body = await graphql(FIELDS_QUERY, { projectId: project.id });
|
|
253
|
+
const node = dataOf(body)['node'] ?? {};
|
|
254
|
+
const fieldsConnection = node['fields'] ?? {};
|
|
255
|
+
const fields = {};
|
|
256
|
+
const rawFields = Array.isArray(fieldsConnection.nodes) ? fieldsConnection.nodes : [];
|
|
257
|
+
for (const entry of rawFields) {
|
|
258
|
+
if (!entry || typeof entry !== 'object')
|
|
259
|
+
continue;
|
|
260
|
+
const field = entry;
|
|
261
|
+
const id = field['id'];
|
|
262
|
+
const fieldName = field['name'];
|
|
263
|
+
if (typeof id !== 'string' || typeof fieldName !== 'string')
|
|
264
|
+
continue;
|
|
265
|
+
fields[fieldName] = {
|
|
266
|
+
id,
|
|
267
|
+
name: fieldName,
|
|
268
|
+
type: fieldTypeOf(field),
|
|
269
|
+
options: optionsOf(field),
|
|
270
|
+
...(iterationsOf(field) !== undefined ? { iterations: iterationsOf(field) } : {}),
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
return { project, fields };
|
|
274
|
+
}
|
|
275
|
+
// ---------------------------------------------------------------------------
|
|
276
|
+
// The cache on disk
|
|
277
|
+
// ---------------------------------------------------------------------------
|
|
278
|
+
/** The path to one remote's Project ids cache. */
|
|
279
|
+
export function projectCachePath(paths, remoteName) {
|
|
280
|
+
return path.join(paths.remotesDir, remoteName, 'github.json');
|
|
281
|
+
}
|
|
282
|
+
/** Sort an object's keys, for byte-stable cache writes. */
|
|
283
|
+
function sortedRecord(value) {
|
|
284
|
+
const out = {};
|
|
285
|
+
for (const key of Object.keys(value).sort())
|
|
286
|
+
out[key] = value[key];
|
|
287
|
+
return out;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Read the Project ids cache, or `undefined` when none has been recorded yet.
|
|
291
|
+
* A file that exists but is malformed (or a newer version) is a `BoardError`
|
|
292
|
+
* naming the path; delete it to re-resolve.
|
|
293
|
+
*/
|
|
294
|
+
export function loadProjectCache(paths, remoteName) {
|
|
295
|
+
const file = projectCachePath(paths, remoteName);
|
|
296
|
+
let raw;
|
|
297
|
+
try {
|
|
298
|
+
raw = readFileSync(file, 'utf8');
|
|
299
|
+
}
|
|
300
|
+
catch {
|
|
301
|
+
return undefined;
|
|
302
|
+
}
|
|
303
|
+
let parsed;
|
|
304
|
+
try {
|
|
305
|
+
parsed = JSON.parse(raw);
|
|
306
|
+
}
|
|
307
|
+
catch (error) {
|
|
308
|
+
throw new BoardError(`Cannot parse Project cache: ${file}`, [
|
|
309
|
+
error.message,
|
|
310
|
+
'Delete it to re-resolve the Project ids, or repair the JSON.',
|
|
311
|
+
]);
|
|
312
|
+
}
|
|
313
|
+
const cache = parsed;
|
|
314
|
+
if (cache.version !== 1) {
|
|
315
|
+
throw new BoardError(`Unsupported Project cache version in ${file}`, [
|
|
316
|
+
`Found version ${JSON.stringify(cache.version)}; expected 1.`,
|
|
317
|
+
'Delete it to re-resolve the Project ids.',
|
|
318
|
+
]);
|
|
319
|
+
}
|
|
320
|
+
const project = cache.project;
|
|
321
|
+
if (!project || typeof project.id !== 'string') {
|
|
322
|
+
throw new BoardError(`Invalid Project cache: ${file}`, [
|
|
323
|
+
'The cache is missing a valid project id.',
|
|
324
|
+
'Delete it to re-resolve the Project ids.',
|
|
325
|
+
]);
|
|
326
|
+
}
|
|
327
|
+
const fields = cache.fields;
|
|
328
|
+
if (!fields || typeof fields !== 'object' || Array.isArray(fields)) {
|
|
329
|
+
throw new BoardError(`Invalid Project cache: ${file}`, [
|
|
330
|
+
'The cache is missing a valid fields object.',
|
|
331
|
+
'Delete it to re-resolve the Project ids.',
|
|
332
|
+
]);
|
|
333
|
+
}
|
|
334
|
+
// A cache written before iterations were cached (LP-313) still loads — the
|
|
335
|
+
// iteration list is absent, which a fresh resolution refills.
|
|
336
|
+
const normalized = {};
|
|
337
|
+
for (const [name, field] of Object.entries(fields)) {
|
|
338
|
+
normalized[name] = {
|
|
339
|
+
...field,
|
|
340
|
+
options: field.options ?? {},
|
|
341
|
+
...(field.iterations !== undefined ? { iterations: field.iterations } : {}),
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
return {
|
|
345
|
+
version: 1,
|
|
346
|
+
resolvedAt: typeof cache.resolvedAt === 'string' ? cache.resolvedAt : '',
|
|
347
|
+
project: {
|
|
348
|
+
id: project.id,
|
|
349
|
+
number: typeof project['number'] === 'number' ? project['number'] : null,
|
|
350
|
+
title: typeof project['title'] === 'string' ? project['title'] : '',
|
|
351
|
+
},
|
|
352
|
+
fields: normalized,
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Write the Project ids cache to disk, creating the per-remote folder if
|
|
357
|
+
* needed. Field keys and option keys are written sorted so two teammates
|
|
358
|
+
* resolving the same ids on different branches produce a non-overlapping diff.
|
|
359
|
+
*/
|
|
360
|
+
export function saveProjectCache(paths, remoteName, cache) {
|
|
361
|
+
const file = projectCachePath(paths, remoteName);
|
|
362
|
+
mkdirSync(path.dirname(file), { recursive: true });
|
|
363
|
+
const fields = {};
|
|
364
|
+
for (const [name, field] of Object.entries(sortedRecord(cache.fields))) {
|
|
365
|
+
fields[name] = { ...field, options: sortedRecord(field.options) };
|
|
366
|
+
}
|
|
367
|
+
const onDisk = {
|
|
368
|
+
version: 1,
|
|
369
|
+
resolvedAt: cache.resolvedAt,
|
|
370
|
+
project: cache.project,
|
|
371
|
+
fields,
|
|
372
|
+
};
|
|
373
|
+
writeFileSync(file, `${JSON.stringify(onDisk, null, 2)}\n`, 'utf8');
|
|
374
|
+
}
|
|
375
|
+
// ---------------------------------------------------------------------------
|
|
376
|
+
// Mismatch detection
|
|
377
|
+
// ---------------------------------------------------------------------------
|
|
378
|
+
/** Index a field collection by id, so a rename can be traced from the id. */
|
|
379
|
+
function byId(fields) {
|
|
380
|
+
const out = new Map();
|
|
381
|
+
for (const field of Object.values(fields))
|
|
382
|
+
out.set(field.id, field);
|
|
383
|
+
return out;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Compare a fresh resolution against the previous cache, for the fields the
|
|
387
|
+
* mapping names. A cached id that survives under a new name is a rename; a
|
|
388
|
+
* name with no match and no surviving id is missing. Option names are checked
|
|
389
|
+
* the same way, within the fields that still match by id.
|
|
390
|
+
*/
|
|
391
|
+
export function detectMismatches(previous, fresh, mappedFields) {
|
|
392
|
+
const fieldFindings = [];
|
|
393
|
+
const optionFindings = [];
|
|
394
|
+
const freshById = byId(fresh.fields);
|
|
395
|
+
for (const name of new Set(Object.values(mappedFields))) {
|
|
396
|
+
if (name === '')
|
|
397
|
+
continue;
|
|
398
|
+
const prev = previous?.fields[name];
|
|
399
|
+
const current = fresh.fields[name];
|
|
400
|
+
if (current !== undefined) {
|
|
401
|
+
// The name resolves today. When it also resolved before, and to the same
|
|
402
|
+
// id, its options are worth checking for renames.
|
|
403
|
+
if (prev !== undefined && prev.id === current.id) {
|
|
404
|
+
const optionById = new Map(Object.entries(current.options).map(([optionName, optionId]) => [optionId, optionName]));
|
|
405
|
+
for (const [optionName, optionId] of Object.entries(prev.options)) {
|
|
406
|
+
if (current.options[optionName] === optionId)
|
|
407
|
+
continue;
|
|
408
|
+
const renamed = optionById.get(optionId);
|
|
409
|
+
if (renamed !== undefined) {
|
|
410
|
+
optionFindings.push({
|
|
411
|
+
kind: 'renamed',
|
|
412
|
+
field: name,
|
|
413
|
+
name: optionName,
|
|
414
|
+
id: optionId,
|
|
415
|
+
newName: renamed,
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
optionFindings.push({ kind: 'missing', field: name, name: optionName });
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
continue;
|
|
424
|
+
}
|
|
425
|
+
// The name does not resolve. A previous id that still exists under another
|
|
426
|
+
// name is a rename; otherwise the field is genuinely absent.
|
|
427
|
+
if (prev !== undefined) {
|
|
428
|
+
const renamed = freshById.get(prev.id);
|
|
429
|
+
if (renamed !== undefined && renamed.name !== name) {
|
|
430
|
+
fieldFindings.push({ kind: 'renamed', name, id: prev.id, newName: renamed.name });
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
fieldFindings.push({ kind: 'missing', name });
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
else {
|
|
437
|
+
fieldFindings.push({ kind: 'missing', name });
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
return { fieldFindings, optionFindings };
|
|
441
|
+
}
|
|
442
|
+
// ---------------------------------------------------------------------------
|
|
443
|
+
// The orchestrator
|
|
444
|
+
// ---------------------------------------------------------------------------
|
|
445
|
+
/**
|
|
446
|
+
* Resolve one Project's ids, reading the cache when it exists and re-resolving
|
|
447
|
+
* on a cache miss or `refresh`.
|
|
448
|
+
*
|
|
449
|
+
* The cache is the committed `.lpm/remotes/<name>/github.json`, so a teammate
|
|
450
|
+
* who pulls the board reads the ids instead of re-resolving them; only a cache
|
|
451
|
+
* miss or an explicit `--refresh` reaches the network. When a resolution runs
|
|
452
|
+
* against a previous cache, renamed fields and options are reported with both
|
|
453
|
+
* names (never treated as missing), and the cache is rewritten.
|
|
454
|
+
*/
|
|
455
|
+
export async function resolveProjectIds(connector, input, paths, remoteName, opts = {}) {
|
|
456
|
+
const previous = loadProjectCache(paths, remoteName);
|
|
457
|
+
if (previous !== undefined && opts.refresh !== true) {
|
|
458
|
+
return {
|
|
459
|
+
ids: { project: previous.project, fields: previous.fields },
|
|
460
|
+
refreshed: false,
|
|
461
|
+
fieldFindings: [],
|
|
462
|
+
optionFindings: [],
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
const fresh = await resolveProjectGraphql(connector, input);
|
|
466
|
+
const { fieldFindings, optionFindings } = detectMismatches(previous, fresh, input.fields);
|
|
467
|
+
const cache = {
|
|
468
|
+
version: 1,
|
|
469
|
+
resolvedAt: new Date(opts.now ? opts.now() : Date.now()).toISOString(),
|
|
470
|
+
project: fresh.project,
|
|
471
|
+
fields: fresh.fields,
|
|
472
|
+
};
|
|
473
|
+
saveProjectCache(paths, remoteName, cache);
|
|
474
|
+
return {
|
|
475
|
+
ids: fresh,
|
|
476
|
+
refreshed: true,
|
|
477
|
+
fieldFindings,
|
|
478
|
+
optionFindings,
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
//# sourceMappingURL=projects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../../../src/remote/providers/github/projects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAoGrD,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,mFAAmF;AACnF,MAAM,uBAAuB,GAAG;;;;;;;;;;CAU/B,CAAC;AAEF,mFAAmF;AACnF,MAAM,uBAAuB,GAAG;;;;;;;;;;;;CAY/B,CAAC;AAEF;wCACwC;AACxC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCpB,CAAC;AAEF,8EAA8E;AA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,KAAyB,EACzB,KAAiB,EACjB,UAAkB,EAClB,OAA8B,EAAE;IAEhC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAErD,IAAI,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;QACpD,OAAO;YACL,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE;YAC3D,SAAS,EAAE,KAAK;YAChB,aAAa,EAAE,EAAE;YACjB,cAAc,EAAE,EAAE;SACnB,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,qBAAqB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5D,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,gBAAgB,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE1F,MAAM,KAAK,GAAqB;QAC9B,OAAO,EAAE,CAAC;QACV,UAAU,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,WAAW,EAAE;QACtE,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC;IACF,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IAE3C,OAAO;QACL,GAAG,EAAE,KAAK;QACV,SAAS,EAAE,IAAI;QACf,aAAa;QACb,cAAc;KACf,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub's two-way vocabulary translation.
|
|
3
|
+
*
|
|
4
|
+
* GitHub has no native issue types, no custom fields, and no workflow state
|
|
5
|
+
* beyond open/closed — so everything the board distinguishes rides on labels.
|
|
6
|
+
* This translator is the GitHub-specific bridge between the board vocabulary
|
|
7
|
+
* and the GitHub one, using the remote's `mapping` block:
|
|
8
|
+
*
|
|
9
|
+
* push: a `BoardOp` plus the mapping becomes a `RemoteRequest` carrying
|
|
10
|
+
* title, body and the labels that stand in for type / status /
|
|
11
|
+
* attributes;
|
|
12
|
+
* pull: a GitHub issue record plus the mapping becomes `BoardFieldsPatch`,
|
|
13
|
+
* recovering type and status from labels when the mapping names them
|
|
14
|
+
* unambiguously.
|
|
15
|
+
*
|
|
16
|
+
* Pure: no I/O. One translator serves every GitHub remote; the mapping and the
|
|
17
|
+
* board's attribute definitions are passed per call. Where a value cannot be
|
|
18
|
+
* mapped back unambiguously, the field is left absent rather than guessed —
|
|
19
|
+
* the pull planner, which sees the whole board and its hierarchy, is the layer
|
|
20
|
+
* that breaks ties (LP-268).
|
|
21
|
+
*
|
|
22
|
+
* Statuses are the one vocabulary element that is fully two-way here: the
|
|
23
|
+
* status engine (`mapping.ts`, LP-269) resolves a board status to the remote
|
|
24
|
+
* label a push writes, resolves the observed labels back to a board status,
|
|
25
|
+
* and carries the `closed` flag that maps a terminal status onto GitHub's
|
|
26
|
+
* open/closed state.
|
|
27
|
+
*
|
|
28
|
+
* Attributes go through the coercion engine (`attributes.ts`, LP-270): a value
|
|
29
|
+
* is coerced to its label form on the way out and back to its board type on
|
|
30
|
+
* the way in, with a reported failure when it cannot — an enum value with no
|
|
31
|
+
* matching option, a number field holding free text. On this provider the
|
|
32
|
+
* remote field kind is derived from the board type, because GitHub's only
|
|
33
|
+
* carrier is a label: an `array` attribute claims one label per item, every
|
|
34
|
+
* other type claims one label holding the value as text. A label the mapping
|
|
35
|
+
* does not claim is never read into an attribute, and is left for the executor
|
|
36
|
+
* to preserve — labels are shared with humans.
|
|
37
|
+
*
|
|
38
|
+
* Assignees go through the account mapping (`accounts.ts`, LP-271): a person
|
|
39
|
+
* whose `via` attribute holds a login becomes that login, a person with no
|
|
40
|
+
* login and a generic pool both go unassigned — the pool also carries a
|
|
41
|
+
* `pool:` label so the pull can restore it — and a login nobody on the roster
|
|
42
|
+
* matches is reported with the `lpm new person` that would add them, never
|
|
43
|
+
* invented.
|
|
44
|
+
*
|
|
45
|
+
* Periods go through the period mapping (`periods.ts`, LP-272, LP-313): the
|
|
46
|
+
* mapped level becomes the native carrier — a milestone or a Project iteration
|
|
47
|
+
* field — and every other level a `period:<type>` row in the managed block.
|
|
48
|
+
* The pull resolves the carrier's title back to a local period — recovering
|
|
49
|
+
* the dates for the planner to reconcile — and reads the degraded levels back
|
|
50
|
+
* out of the block.
|
|
51
|
+
*/
|
|
52
|
+
import { type Roster } from '../../accounts.js';
|
|
53
|
+
import type { AttributeDefs, BoardOp, DescribeResult, FieldsFromRecordResult, RemoteRecord, Translator } from '../../provider.js';
|
|
54
|
+
import { type LabelClaim } from '../../labels.js';
|
|
55
|
+
import { type PeriodIndex } from '../../periods.js';
|
|
56
|
+
import type { GithubMapping } from './config.js';
|
|
57
|
+
/**
|
|
58
|
+
* The labels a mapping claims, derived from its declaration (LP-308). Exact
|
|
59
|
+
* labels are the type labels and status states; prefixes are the attribute
|
|
60
|
+
* prefixes and the reserved `pool:` prefix (a pool assignment degrades to a
|
|
61
|
+
* label even when no account mapping is declared). Degraded period levels no
|
|
62
|
+
* longer ride labels — they ride the managed block (LP-313) — so the claim
|
|
63
|
+
* derives nothing from the timeline. Derived from the mapping rather than a
|
|
64
|
+
* convention, so a board that maps an attribute onto real label names still
|
|
65
|
+
* owns exactly those names and nothing else.
|
|
66
|
+
*/
|
|
67
|
+
export declare function labelClaimFromMapping(mapping: GithubMapping, _periods?: PeriodIndex): LabelClaim;
|
|
68
|
+
/**
|
|
69
|
+
* Push: turn a board op into a GitHub request description.
|
|
70
|
+
*
|
|
71
|
+
* A create/update carries `title`, `body` and the labels derived from the
|
|
72
|
+
* mapping: the type's labels, the status's label, and one `<prefix>:<value>`
|
|
73
|
+
* label per mapped attribute (several for an `array`). An attribute value that
|
|
74
|
+
* will not coerce is omitted and reported in `problems` — nothing is written
|
|
75
|
+
* for it. The assignee is resolved through the account mapping (a login, or
|
|
76
|
+
* unassigned for a pool / a gap). A delete carries only its kind — GitHub
|
|
77
|
+
* issues cannot be hard-deleted, so the connector closes them.
|
|
78
|
+
*
|
|
79
|
+
* Every non-delete request also carries the label claim, so the connector can
|
|
80
|
+
* reconcile the list against the labels already on the issue (LP-308).
|
|
81
|
+
*/
|
|
82
|
+
export declare function describeRequest(op: BoardOp, mapping: Record<string, unknown>, attributes: AttributeDefs, roster?: Roster, periods?: PeriodIndex): DescribeResult;
|
|
83
|
+
/**
|
|
84
|
+
* Pull: turn a GitHub issue record into board fields.
|
|
85
|
+
*
|
|
86
|
+
* `title` and `body` pass through; `type` is recovered when exactly one board
|
|
87
|
+
* type's mapped labels match the issue's labels; `status` when a mapped label
|
|
88
|
+
* names it; `attributes` from `<prefix>:<value>` labels, coerced back to each
|
|
89
|
+
* attribute's board type. A label value that will not coerce back (free text
|
|
90
|
+
* in a number field) is reported in `problems` and the attribute is left
|
|
91
|
+
* alone. Ambiguity leaves the field absent — the pull planner breaks ties with
|
|
92
|
+
* the board's hierarchy. The assignee is recovered through the account
|
|
93
|
+
* mapping: the `pool:` label restores a pool, a login restores a person, an
|
|
94
|
+
* unassigned issue clears it, and a login nobody matches is reported. The
|
|
95
|
+
* period is recovered through the period mapping (LP-272, LP-313): the
|
|
96
|
+
* carrier's title — a milestone or a Project iteration — resolves to a local
|
|
97
|
+
* period, its dates are passed through for the planner to reconcile, a
|
|
98
|
+
* carrier nobody on the timeline matches is reported in `result.period.missing`
|
|
99
|
+
* rather than invented, and the degraded levels ride back out of the managed
|
|
100
|
+
* block.
|
|
101
|
+
*/
|
|
102
|
+
export declare function fieldsFromRecord(record: RemoteRecord, mapping: Record<string, unknown>, attributes: AttributeDefs, roster?: Roster, periods?: PeriodIndex): FieldsFromRecordResult;
|
|
103
|
+
export declare const githubTranslator: Translator;
|