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,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Projects v2 field and option provisioning (LP-311): what `lpm remote
|
|
3
|
+
* provision` creates beyond the labels LP-308 already handles.
|
|
4
|
+
*
|
|
5
|
+
* A mapping that names a Project field which does not exist is the single most
|
|
6
|
+
* common setup failure, and creating it is one GraphQL mutation — so this
|
|
7
|
+
* module computes the fields the mapping needs, compares them against the
|
|
8
|
+
* Project's *current* state (as resolved and cached by LP-310), and produces a
|
|
9
|
+
* plan of mutations. It is idempotent by construction: the plan is always
|
|
10
|
+
* "desired minus current", so a second run against an unchanged Project is
|
|
11
|
+
* empty.
|
|
12
|
+
*
|
|
13
|
+
* ## Field types, from board vocabulary
|
|
14
|
+
*
|
|
15
|
+
* - the status column, and any `enum` attribute → `SINGLE_SELECT`, with its
|
|
16
|
+
* options in board order (the status field reads left-to-right the way the
|
|
17
|
+
* config writes it);
|
|
18
|
+
* - the effort attribute (and any other `int` / `float` attribute) → `NUMBER`;
|
|
19
|
+
* - a `date` attribute → `DATE`;
|
|
20
|
+
* - everything else → `TEXT`.
|
|
21
|
+
*
|
|
22
|
+
* ## Adding options re-sends the whole list
|
|
23
|
+
*
|
|
24
|
+
* GitHub has no "add one option" mutation. `updateProjectV2Field` *replaces*
|
|
25
|
+
* the option list, so adding a missing option means sending the existing
|
|
26
|
+
* options back — each carrying its `id`, which is what preserves the option's
|
|
27
|
+
* identity and stops existing item values from being cleared — followed by the
|
|
28
|
+
* missing ones in desired order. The existing options are untouched: same
|
|
29
|
+
* names, same ids.
|
|
30
|
+
*
|
|
31
|
+
* ## Pure vs I/O
|
|
32
|
+
*
|
|
33
|
+
* `desiredProjectFields` and `planProjectProvision` are pure (no disk, no
|
|
34
|
+
* network); `provisionProjectGraphql` is the network half, driven through the
|
|
35
|
+
* same `graphql` connector entry point LP-310 added, so a dry-run prints the
|
|
36
|
+
* plan and never reaches this function.
|
|
37
|
+
*/
|
|
38
|
+
import type { LoadedBoard } from '../../../core/board/load.js';
|
|
39
|
+
import type { AttributeDefs } from '../../provider.js';
|
|
40
|
+
import type { OpenedRemote } from '../../remotes.js';
|
|
41
|
+
import type { ProjectGraphqlConnector, ProjectIds } from './projects.js';
|
|
42
|
+
/** The `ProjectV2CustomFieldType` values a mapping can produce. */
|
|
43
|
+
export type ProjectDataType = 'TEXT' | 'NUMBER' | 'DATE' | 'SINGLE_SELECT' | 'ITERATION';
|
|
44
|
+
/** One field the mapping needs, in Project vocabulary. */
|
|
45
|
+
export interface DesiredProjectField {
|
|
46
|
+
/** The Project field name, as written in `mapping.fields`. */
|
|
47
|
+
name: string;
|
|
48
|
+
/** What kind of field to create. */
|
|
49
|
+
dataType: ProjectDataType;
|
|
50
|
+
/** Ordered option names — only for `SINGLE_SELECT`, empty otherwise. */
|
|
51
|
+
options: string[];
|
|
52
|
+
}
|
|
53
|
+
/** One field to create — its name does not exist in the Project today. */
|
|
54
|
+
export interface CreateProjectFieldPlan {
|
|
55
|
+
name: string;
|
|
56
|
+
dataType: ProjectDataType;
|
|
57
|
+
options: string[];
|
|
58
|
+
}
|
|
59
|
+
/** Options to add to one existing single-select field. */
|
|
60
|
+
export interface AddProjectOptionsPlan {
|
|
61
|
+
fieldName: string;
|
|
62
|
+
fieldId: string;
|
|
63
|
+
/**
|
|
64
|
+
* The full option list to send — `updateProjectV2Field` replaces the list,
|
|
65
|
+
* so the existing options are sent back (each with its id, to preserve its
|
|
66
|
+
* identity) followed by the missing ones in desired order.
|
|
67
|
+
*/
|
|
68
|
+
options: Array<{
|
|
69
|
+
name: string;
|
|
70
|
+
id?: string;
|
|
71
|
+
}>;
|
|
72
|
+
/** Just the missing option names, for the report. */
|
|
73
|
+
missing: string[];
|
|
74
|
+
}
|
|
75
|
+
/** What a push would (or did) create before filing: fields and options. */
|
|
76
|
+
export interface ProjectProvisionPlan {
|
|
77
|
+
createFields: CreateProjectFieldPlan[];
|
|
78
|
+
addOptions: AddProjectOptionsPlan[];
|
|
79
|
+
/** True when nothing needs creating — the second-run, nothing-to-do case. */
|
|
80
|
+
empty: boolean;
|
|
81
|
+
}
|
|
82
|
+
/** What one `provisionProjectGraphql` run actually created. */
|
|
83
|
+
export interface ProjectProvisionOutcome {
|
|
84
|
+
/** Project field names created. */
|
|
85
|
+
created: string[];
|
|
86
|
+
/** Options added per field, each with the names that were missing. */
|
|
87
|
+
optionsAdded: Array<{
|
|
88
|
+
field: string;
|
|
89
|
+
added: string[];
|
|
90
|
+
}>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The Project field type a board field needs. `status` is a single select (the
|
|
94
|
+
* board's columns); `title` is text; `period` is an iteration field when the
|
|
95
|
+
* carrier is an iteration (LP-313); a declared attribute maps by its type —
|
|
96
|
+
* enum to a single select, int/float to a number, date to a date — and
|
|
97
|
+
* anything else (an unknown key, a string/bool/array attribute) is text.
|
|
98
|
+
*/
|
|
99
|
+
export declare function projectDataTypeOf(boardField: string, defs: AttributeDefs): ProjectDataType;
|
|
100
|
+
/**
|
|
101
|
+
* The fields the mapping names, each with its Project type and — for a single
|
|
102
|
+
* select — its ordered options.
|
|
103
|
+
*
|
|
104
|
+
* `status` options are the remote status labels in board order (`mapping.
|
|
105
|
+
* statuses` is the source of the label, so a renamed remote status is used,
|
|
106
|
+
* not the board's own label); an enum attribute's options are its declared
|
|
107
|
+
* `values`, in declaration order. Deduplicated by Project field name (two
|
|
108
|
+
* board fields mapping to one Project field is a config mistake; the first
|
|
109
|
+
* spelling wins rather than provisioning twice).
|
|
110
|
+
*/
|
|
111
|
+
export declare function desiredProjectFields(board: LoadedBoard, remote: OpenedRemote): DesiredProjectField[];
|
|
112
|
+
/**
|
|
113
|
+
* Compare the mapping's desired fields against the Project's current state and
|
|
114
|
+
* return what is missing. A field whose name is absent is created; a
|
|
115
|
+
* single-select field that exists but lacks options gains exactly the missing
|
|
116
|
+
* ones (existing options are re-sent, never dropped or renamed). Idempotent:
|
|
117
|
+
* an unchanged Project yields an empty plan.
|
|
118
|
+
*/
|
|
119
|
+
export declare function planProjectProvision(current: ProjectIds, desired: DesiredProjectField[]): ProjectProvisionPlan;
|
|
120
|
+
/**
|
|
121
|
+
* Execute a provisioning plan against the live Project, one mutation at a
|
|
122
|
+
* time: create each missing field (with its options), then add the missing
|
|
123
|
+
* options to each existing single-select. Returns what was created; a failed
|
|
124
|
+
* mutation throws a `BoardError` naming the operation and — for a permission
|
|
125
|
+
* failure — the required scope.
|
|
126
|
+
*
|
|
127
|
+
* The caller re-resolves and re-caches the ids afterwards (LP-310), so the
|
|
128
|
+
* new field and option node ids land in `.lpm/remotes/<name>/github.json`.
|
|
129
|
+
*/
|
|
130
|
+
export declare function provisionProjectGraphql(connector: ProjectGraphqlConnector, projectId: string, plan: ProjectProvisionPlan): Promise<ProjectProvisionOutcome>;
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Projects v2 field and option provisioning (LP-311): what `lpm remote
|
|
3
|
+
* provision` creates beyond the labels LP-308 already handles.
|
|
4
|
+
*
|
|
5
|
+
* A mapping that names a Project field which does not exist is the single most
|
|
6
|
+
* common setup failure, and creating it is one GraphQL mutation — so this
|
|
7
|
+
* module computes the fields the mapping needs, compares them against the
|
|
8
|
+
* Project's *current* state (as resolved and cached by LP-310), and produces a
|
|
9
|
+
* plan of mutations. It is idempotent by construction: the plan is always
|
|
10
|
+
* "desired minus current", so a second run against an unchanged Project is
|
|
11
|
+
* empty.
|
|
12
|
+
*
|
|
13
|
+
* ## Field types, from board vocabulary
|
|
14
|
+
*
|
|
15
|
+
* - the status column, and any `enum` attribute → `SINGLE_SELECT`, with its
|
|
16
|
+
* options in board order (the status field reads left-to-right the way the
|
|
17
|
+
* config writes it);
|
|
18
|
+
* - the effort attribute (and any other `int` / `float` attribute) → `NUMBER`;
|
|
19
|
+
* - a `date` attribute → `DATE`;
|
|
20
|
+
* - everything else → `TEXT`.
|
|
21
|
+
*
|
|
22
|
+
* ## Adding options re-sends the whole list
|
|
23
|
+
*
|
|
24
|
+
* GitHub has no "add one option" mutation. `updateProjectV2Field` *replaces*
|
|
25
|
+
* the option list, so adding a missing option means sending the existing
|
|
26
|
+
* options back — each carrying its `id`, which is what preserves the option's
|
|
27
|
+
* identity and stops existing item values from being cleared — followed by the
|
|
28
|
+
* missing ones in desired order. The existing options are untouched: same
|
|
29
|
+
* names, same ids.
|
|
30
|
+
*
|
|
31
|
+
* ## Pure vs I/O
|
|
32
|
+
*
|
|
33
|
+
* `desiredProjectFields` and `planProjectProvision` are pure (no disk, no
|
|
34
|
+
* network); `provisionProjectGraphql` is the network half, driven through the
|
|
35
|
+
* same `graphql` connector entry point LP-310 added, so a dry-run prints the
|
|
36
|
+
* plan and never reaches this function.
|
|
37
|
+
*/
|
|
38
|
+
import { BoardError } from '../../../core/errors.js';
|
|
39
|
+
import { mapStatusToRemote, normalizeStatusMappings } from '../../mapping.js';
|
|
40
|
+
import { attributeDefsOf } from '../../preflight.js';
|
|
41
|
+
// ---------------------------------------------------------------------------
|
|
42
|
+
// Field types, from board vocabulary
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
/** A loose record read off a mapping block. */
|
|
45
|
+
function asRecord(value) {
|
|
46
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The Project field type a board field needs. `status` is a single select (the
|
|
53
|
+
* board's columns); `title` is text; `period` is an iteration field when the
|
|
54
|
+
* carrier is an iteration (LP-313); a declared attribute maps by its type —
|
|
55
|
+
* enum to a single select, int/float to a number, date to a date — and
|
|
56
|
+
* anything else (an unknown key, a string/bool/array attribute) is text.
|
|
57
|
+
*/
|
|
58
|
+
export function projectDataTypeOf(boardField, defs) {
|
|
59
|
+
if (boardField === 'status')
|
|
60
|
+
return 'SINGLE_SELECT';
|
|
61
|
+
if (boardField === 'title')
|
|
62
|
+
return 'TEXT';
|
|
63
|
+
if (boardField === 'period')
|
|
64
|
+
return 'ITERATION';
|
|
65
|
+
switch (defs[boardField]?.type) {
|
|
66
|
+
case 'enum':
|
|
67
|
+
return 'SINGLE_SELECT';
|
|
68
|
+
case 'int':
|
|
69
|
+
case 'float':
|
|
70
|
+
return 'NUMBER';
|
|
71
|
+
case 'date':
|
|
72
|
+
return 'DATE';
|
|
73
|
+
default:
|
|
74
|
+
return 'TEXT';
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The fields the mapping names, each with its Project type and — for a single
|
|
79
|
+
* select — its ordered options.
|
|
80
|
+
*
|
|
81
|
+
* `status` options are the remote status labels in board order (`mapping.
|
|
82
|
+
* statuses` is the source of the label, so a renamed remote status is used,
|
|
83
|
+
* not the board's own label); an enum attribute's options are its declared
|
|
84
|
+
* `values`, in declaration order. Deduplicated by Project field name (two
|
|
85
|
+
* board fields mapping to one Project field is a config mistake; the first
|
|
86
|
+
* spelling wins rather than provisioning twice).
|
|
87
|
+
*/
|
|
88
|
+
export function desiredProjectFields(board, remote) {
|
|
89
|
+
const fields = asRecord(remote.mapping['fields']);
|
|
90
|
+
const defs = attributeDefsOf(board);
|
|
91
|
+
const statusMappings = normalizeStatusMappings(asRecord(remote.mapping['statuses']));
|
|
92
|
+
const statusOptions = board.config.statuses
|
|
93
|
+
.map((status) => mapStatusToRemote(statusMappings, status.id))
|
|
94
|
+
.filter((label) => typeof label === 'string');
|
|
95
|
+
const byName = new Map();
|
|
96
|
+
for (const [boardField, rawName] of Object.entries(fields)) {
|
|
97
|
+
const name = String(rawName);
|
|
98
|
+
if (name === '' || byName.has(name))
|
|
99
|
+
continue;
|
|
100
|
+
const dataType = projectDataTypeOf(boardField, defs);
|
|
101
|
+
let options = [];
|
|
102
|
+
if (boardField === 'status') {
|
|
103
|
+
options = statusOptions;
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
const def = defs[boardField];
|
|
107
|
+
if (def?.type === 'enum')
|
|
108
|
+
options = [...(def.values ?? [])];
|
|
109
|
+
}
|
|
110
|
+
// GitHub requires at least one option for a single-select field; a
|
|
111
|
+
// single-select with nothing to select cannot be created, so it is skipped
|
|
112
|
+
// rather than sent as a doomed mutation.
|
|
113
|
+
if (dataType === 'SINGLE_SELECT' && options.length === 0)
|
|
114
|
+
continue;
|
|
115
|
+
byName.set(name, { name, dataType, options });
|
|
116
|
+
}
|
|
117
|
+
return [...byName.values()];
|
|
118
|
+
}
|
|
119
|
+
// ---------------------------------------------------------------------------
|
|
120
|
+
// The plan: desired minus current
|
|
121
|
+
// ---------------------------------------------------------------------------
|
|
122
|
+
/**
|
|
123
|
+
* Compare the mapping's desired fields against the Project's current state and
|
|
124
|
+
* return what is missing. A field whose name is absent is created; a
|
|
125
|
+
* single-select field that exists but lacks options gains exactly the missing
|
|
126
|
+
* ones (existing options are re-sent, never dropped or renamed). Idempotent:
|
|
127
|
+
* an unchanged Project yields an empty plan.
|
|
128
|
+
*/
|
|
129
|
+
export function planProjectProvision(current, desired) {
|
|
130
|
+
const createFields = [];
|
|
131
|
+
const addOptions = [];
|
|
132
|
+
for (const field of [...desired].sort((a, b) => a.name.localeCompare(b.name))) {
|
|
133
|
+
const existing = current.fields[field.name];
|
|
134
|
+
if (existing === undefined) {
|
|
135
|
+
createFields.push({ name: field.name, dataType: field.dataType, options: field.options });
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
// The field exists; only a single-select can gain options, and only when
|
|
139
|
+
// the desired type and the live type both say so — a wrong-typed field is
|
|
140
|
+
// reported by the id cache's mismatch detection, not re-created.
|
|
141
|
+
if (field.dataType !== 'SINGLE_SELECT' || existing.type !== 'SINGLE_SELECT') {
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
const missing = field.options.filter((name) => existing.options[name] === undefined);
|
|
145
|
+
if (missing.length === 0)
|
|
146
|
+
continue;
|
|
147
|
+
const options = [
|
|
148
|
+
...Object.keys(existing.options).map((name) => ({ name, id: existing.options[name] })),
|
|
149
|
+
...missing.map((name) => ({ name })),
|
|
150
|
+
];
|
|
151
|
+
addOptions.push({ fieldName: field.name, fieldId: existing.id, options, missing });
|
|
152
|
+
}
|
|
153
|
+
return { createFields, addOptions, empty: createFields.length === 0 && addOptions.length === 0 };
|
|
154
|
+
}
|
|
155
|
+
// ---------------------------------------------------------------------------
|
|
156
|
+
// The network half
|
|
157
|
+
// ---------------------------------------------------------------------------
|
|
158
|
+
/** Create a field (with its options, for a single-select). */
|
|
159
|
+
const CREATE_FIELD_MUTATION = `
|
|
160
|
+
mutation($input: CreateProjectV2FieldInput!) {
|
|
161
|
+
createProjectV2Field(input: $input) {
|
|
162
|
+
projectV2Field { id }
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
`;
|
|
166
|
+
/** Replace a single-select's options — the only way to add one (LP-311). */
|
|
167
|
+
const UPDATE_FIELD_MUTATION = `
|
|
168
|
+
mutation($input: UpdateProjectV2FieldInput!) {
|
|
169
|
+
updateProjectV2Field(input: $input) {
|
|
170
|
+
projectV2Field { id }
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
`;
|
|
174
|
+
/** The `graphql` entry point, or a `BoardError` when the connector has none. */
|
|
175
|
+
function graphqlOf(connector) {
|
|
176
|
+
if (typeof connector.graphql !== 'function') {
|
|
177
|
+
throw new BoardError(`The ${connector.name} connector has no GraphQL API`, [
|
|
178
|
+
'Projects v2 fields are GraphQL-only, so this provider must expose a GraphQL entry point to provision them.',
|
|
179
|
+
]);
|
|
180
|
+
}
|
|
181
|
+
return connector.graphql.bind(connector);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* The scope a Project-write needs, in both token vocabularies. Named in the
|
|
185
|
+
* error so an operator knows exactly what to grant, rather than guessing at a
|
|
186
|
+
* bare 403.
|
|
187
|
+
*/
|
|
188
|
+
const PROJECT_SCOPE = 'write:project (a fine-grained token) or project (a classic token)';
|
|
189
|
+
/**
|
|
190
|
+
* Turn a GraphQL `errors` payload into a `BoardError`. A permission-shaped
|
|
191
|
+
* failure (FORBIDDEN / INSUFFICIENT_SCOPES / "not accessible" and friends)
|
|
192
|
+
* names the required scope; anything else reports the raw message.
|
|
193
|
+
*
|
|
194
|
+
* `operation` is the human-readable thing that failed, e.g.
|
|
195
|
+
* `create Project field "Priority"` — it is the "what could not be created".
|
|
196
|
+
*/
|
|
197
|
+
function mutationError(operation, errors) {
|
|
198
|
+
const first = errors[0];
|
|
199
|
+
const message = typeof first?.message === 'string' ? first.message : JSON.stringify(errors[0]);
|
|
200
|
+
const type = typeof first?.type === 'string' ? first.type : '';
|
|
201
|
+
const denied = /permission|not accessible|forbidden|insufficient|scope|authoriz/i.test(`${type} ${message}`);
|
|
202
|
+
if (denied) {
|
|
203
|
+
return new BoardError(`Cannot ${operation}: the credential lacks the scope to write Project structure`, [`GitHub said: ${message}`, `Required scope: ${PROJECT_SCOPE}`]);
|
|
204
|
+
}
|
|
205
|
+
return new BoardError(`Cannot ${operation}`, [`GitHub GraphQL said: ${message}`]);
|
|
206
|
+
}
|
|
207
|
+
/** Send one mutation, throwing a `BoardError` on a GraphQL error. */
|
|
208
|
+
async function mutate(graphql, query, variables, operation) {
|
|
209
|
+
const body = await graphql(query, variables);
|
|
210
|
+
const errors = body && typeof body === 'object' ? body['errors'] : undefined;
|
|
211
|
+
if (Array.isArray(errors) && errors.length > 0) {
|
|
212
|
+
throw mutationError(operation, errors);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Execute a provisioning plan against the live Project, one mutation at a
|
|
217
|
+
* time: create each missing field (with its options), then add the missing
|
|
218
|
+
* options to each existing single-select. Returns what was created; a failed
|
|
219
|
+
* mutation throws a `BoardError` naming the operation and — for a permission
|
|
220
|
+
* failure — the required scope.
|
|
221
|
+
*
|
|
222
|
+
* The caller re-resolves and re-caches the ids afterwards (LP-310), so the
|
|
223
|
+
* new field and option node ids land in `.lpm/remotes/<name>/github.json`.
|
|
224
|
+
*/
|
|
225
|
+
export async function provisionProjectGraphql(connector, projectId, plan) {
|
|
226
|
+
const graphql = graphqlOf(connector);
|
|
227
|
+
const created = [];
|
|
228
|
+
const optionsAdded = [];
|
|
229
|
+
for (const field of plan.createFields) {
|
|
230
|
+
const input = {
|
|
231
|
+
projectId,
|
|
232
|
+
dataType: field.dataType,
|
|
233
|
+
name: field.name,
|
|
234
|
+
};
|
|
235
|
+
if (field.dataType === 'SINGLE_SELECT') {
|
|
236
|
+
input['singleSelectOptions'] = field.options.map((name) => ({ name }));
|
|
237
|
+
}
|
|
238
|
+
await mutate(graphql, CREATE_FIELD_MUTATION, { input }, `create Project field "${field.name}"`);
|
|
239
|
+
created.push(field.name);
|
|
240
|
+
}
|
|
241
|
+
for (const entry of plan.addOptions) {
|
|
242
|
+
await mutate(graphql, UPDATE_FIELD_MUTATION, { input: { fieldId: entry.fieldId, singleSelectOptions: entry.options } }, `add ${entry.missing.length === 1 ? 'an option to' : `${entry.missing.length} options to`} Project field "${entry.fieldName}"`);
|
|
243
|
+
optionsAdded.push({ field: entry.fieldName, added: entry.missing });
|
|
244
|
+
}
|
|
245
|
+
return { created, optionsAdded };
|
|
246
|
+
}
|
|
247
|
+
//# sourceMappingURL=project-provision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-provision.js","sourceRoot":"","sources":["../../../../src/remote/providers/github/project-provision.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA2DrD,8EAA8E;AAC9E,qCAAqC;AACrC,8EAA8E;AAE9E,+CAA+C;AAC/C,SAAS,QAAQ,CAAC,KAAc;IAC9B,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAChE,OAAO,KAAgC,CAAC;IAC1C,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;A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CAAC;QACzE,CAAC;QACD,MAAM,MAAM,CACV,OAAO,EACP,qBAAqB,EACrB,EAAE,KAAK,EAAE,EACT,yBAAyB,KAAK,CAAC,IAAI,GAAG,CACvC,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;QACpC,MAAM,MAAM,CACV,OAAO,EACP,qBAAqB,EACrB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,mBAAmB,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,EACzE,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,aAAa,mBAAmB,KAAK,CAAC,SAAS,GAAG,CAC/H,CAAC;QACF,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Projects v2 status-field read/write (LP-312).
|
|
3
|
+
*
|
|
4
|
+
* Where the board's `status` becomes a Project single-select column, and back
|
|
5
|
+
* again. LP-310 resolves and caches the project/field/option node ids; LP-311
|
|
6
|
+
* provisions the field and its options; this module uses both to move a board
|
|
7
|
+
* status across the wire as a Project column.
|
|
8
|
+
*
|
|
9
|
+
* GitHub has **two** independent sources of truth for "is this done": the
|
|
10
|
+
* issue's own `state` (`open`/`closed`) and the Project single-select column.
|
|
11
|
+
* They are not one fact stored twice — a human can close an issue without
|
|
12
|
+
* moving the column, or drag the column without closing the issue. So this
|
|
13
|
+
* module treats them as two observations and reconciles them by a configured
|
|
14
|
+
* precedence (`mapping.status_precedence`), reporting the disagreement rather
|
|
15
|
+
* than silently choosing.
|
|
16
|
+
*
|
|
17
|
+
* ## Push vs pull
|
|
18
|
+
*
|
|
19
|
+
* Push: a status label (the same remote status label the translator writes as
|
|
20
|
+
* a label, LP-269) becomes a Project column value. The issue is added to the
|
|
21
|
+
* Project first when it is not already an item — `addProjectV2ItemById` —
|
|
22
|
+
* because a field value cannot be set on an item that does not exist.
|
|
23
|
+
*
|
|
24
|
+
* Pull: the column's option name and the issue's state are resolved back to a
|
|
25
|
+
* board status. A `closed` issue is the terminal status whatever the column
|
|
26
|
+
* says (default `issue` precedence); a column moved to a non-terminal value
|
|
27
|
+
* while the issue is closed is reported as a discrepancy.
|
|
28
|
+
*
|
|
29
|
+
* ## Pure vs I/O
|
|
30
|
+
*
|
|
31
|
+
* `planProjectStatusWrite` and `resolveProjectStatus` are pure (no disk, no
|
|
32
|
+
* network); the GraphQL documents below them are the network half, driven
|
|
33
|
+
* through the same `connector.graphql` entry point LP-310 added, so a dry-run
|
|
34
|
+
* prints the plan and never reaches them.
|
|
35
|
+
*/
|
|
36
|
+
import type { StatusDiscrepancy } from '../../provider.js';
|
|
37
|
+
import type { ProjectGraphqlConnector, ProjectIds } from './projects.js';
|
|
38
|
+
/** Which of GitHub's two "done" signals wins when they disagree. */
|
|
39
|
+
export type StatusPrecedence = 'issue' | 'project';
|
|
40
|
+
/** What the two GitHub signals observed for one issue. */
|
|
41
|
+
export interface ProjectStatusObservation {
|
|
42
|
+
/** The Project single-select's option name, when the item has one. */
|
|
43
|
+
column?: string;
|
|
44
|
+
/** The issue's state — `open` or `closed` — when the record carries it. */
|
|
45
|
+
state?: string;
|
|
46
|
+
}
|
|
47
|
+
/** The resolved board status, plus the disagreement when one was overridden. */
|
|
48
|
+
export interface ProjectStatusResolution {
|
|
49
|
+
/** The resolved board status id, when either signal resolved one. */
|
|
50
|
+
status?: string;
|
|
51
|
+
/** A disagreement between the two signals, when one overrode the other. */
|
|
52
|
+
discrepancy?: StatusDiscrepancy;
|
|
53
|
+
}
|
|
54
|
+
/** What a push needs to write the status column for one issue. */
|
|
55
|
+
export interface ProjectStatusWrite {
|
|
56
|
+
/** The Project field name (`mapping.fields.status`). */
|
|
57
|
+
field: string;
|
|
58
|
+
/** The remote status label to write — the column's option name. */
|
|
59
|
+
value: string;
|
|
60
|
+
/** The option id resolved for the value, when the Project field has it. */
|
|
61
|
+
optionId?: string;
|
|
62
|
+
/** True when the field has no option by that name (provision first). */
|
|
63
|
+
missingOption: boolean;
|
|
64
|
+
}
|
|
65
|
+
/** The Project field name carrying the board's status, or `undefined` when the
|
|
66
|
+
* mapping does not put status in a Project field. */
|
|
67
|
+
export declare function projectStatusFieldOf(mapping: Record<string, unknown>): string | undefined;
|
|
68
|
+
/** The configured precedence, defaulting to `issue`. */
|
|
69
|
+
export declare function statusPrecedenceOf(mapping: Record<string, unknown>): StatusPrecedence;
|
|
70
|
+
/** The board status whose mapping says `closed: true`, or `undefined`. */
|
|
71
|
+
export declare function terminalStatusOf(mapping: Record<string, unknown>): string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* The Project status write a push needs for one status label: the field name,
|
|
74
|
+
* the value, and the option id resolved from the cached ids. A value with no
|
|
75
|
+
* matching option is a `missingOption` — reported, never written — because a
|
|
76
|
+
* write against a non-existent option would be a silent no-op or an error, and
|
|
77
|
+
* the remedy is the push itself, which creates the field first (LP-311).
|
|
78
|
+
*/
|
|
79
|
+
export declare function planProjectStatusWrite(ids: ProjectIds, fieldName: string, value: string): ProjectStatusWrite;
|
|
80
|
+
/**
|
|
81
|
+
* Resolve the two GitHub signals — the Project column and the issue state —
|
|
82
|
+
* back to one board status.
|
|
83
|
+
*
|
|
84
|
+
* The column names the specific status (its option names are the remote status
|
|
85
|
+
* labels LP-311 provisioned, resolved through the status mapping). The issue
|
|
86
|
+
* state only names terminality: `closed` is the terminal status, `open` is
|
|
87
|
+
* "not terminal" but names no specific status. So:
|
|
88
|
+
*
|
|
89
|
+
* - `closed` with no usable column → terminal status (the issue was closed
|
|
90
|
+
* on GitHub and the column was never moved);
|
|
91
|
+
* - a column with an `open` or unknown state → the column's status;
|
|
92
|
+
* - the two disagreeing about terminality → the configured precedence
|
|
93
|
+
* decides, and the disagreement is reported.
|
|
94
|
+
*
|
|
95
|
+
* A column and state that agree (both terminal, or both non-terminal) resolve
|
|
96
|
+
* with no discrepancy.
|
|
97
|
+
*/
|
|
98
|
+
export declare function resolveProjectStatus(mapping: Record<string, unknown>, observation: ProjectStatusObservation, precedence?: StatusPrecedence): ProjectStatusResolution;
|
|
99
|
+
/** The Project item id for an issue already in the project, or `null`. */
|
|
100
|
+
export declare function findProjectItemId(connector: ProjectGraphqlConnector, projectId: string, issueNodeId: string): Promise<string | null>;
|
|
101
|
+
/** Add an issue to a Project, returning the new item's id. */
|
|
102
|
+
export declare function addProjectItem(connector: ProjectGraphqlConnector, projectId: string, issueNodeId: string): Promise<string>;
|
|
103
|
+
/** Set one single-select field value on an item. */
|
|
104
|
+
export declare function setProjectItemFieldValue(connector: ProjectGraphqlConnector, projectId: string, itemId: string, fieldId: string, optionId: string): Promise<void>;
|
|
105
|
+
/** Read one single-select field's option name off an item, or `undefined`. */
|
|
106
|
+
export declare function readProjectItemFieldValue(connector: ProjectGraphqlConnector, itemId: string, fieldId: string): Promise<string | undefined>;
|
|
107
|
+
/**
|
|
108
|
+
* Set the status column for one issue: resolve the option id, add the issue to
|
|
109
|
+
* the Project when it is not already an item, then write the field value.
|
|
110
|
+
*
|
|
111
|
+
* A missing option (a status label the Project does not have) is a `BoardError`
|
|
112
|
+
* naming the remedy — the write is refused rather than silently dropped, which
|
|
113
|
+
* is exactly the setup failure the push's prerequisite step (LP-311) fixes.
|
|
114
|
+
*/
|
|
115
|
+
export declare function setProjectStatusField(connector: ProjectGraphqlConnector, ids: ProjectIds, fieldName: string, issueNodeId: string, value: string): Promise<void>;
|