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,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The degradation ladder as a report (LP-275): for every board construct a
|
|
3
|
+
* remote must carry, which rung of the ladder it lands on and why the rung
|
|
4
|
+
* above was not available.
|
|
5
|
+
*
|
|
6
|
+
* The ladder (LP-255) is the ordered set of carriers a field may use, best
|
|
7
|
+
* first:
|
|
8
|
+
*
|
|
9
|
+
* 1. native the remote has a real place for it
|
|
10
|
+
* 2. custom field the remote can be *given* one (the push creates it)
|
|
11
|
+
* 3. label a low-fidelity native carrier for enums and types
|
|
12
|
+
* 4. managed block a delimited region in the issue body
|
|
13
|
+
* 5. comment the same block as a comment, when the body is not writable
|
|
14
|
+
* 6. refuse a `required` field with none of the above — the sync stops
|
|
15
|
+
*
|
|
16
|
+
* `preflight.ts` collects the *values* one remote cannot carry, per document,
|
|
17
|
+
* offline, as a `Problem[]`. This module is the other half: the *constructs*
|
|
18
|
+
* (hierarchy, type, status, each edge, each attribute, each period level) and
|
|
19
|
+
* their rungs, read from the **resolved** capabilities — probes answered —
|
|
20
|
+
* which is what `preflight.ts` cannot do offline. The two are complementary:
|
|
21
|
+
* the value problems gate the push, the rungs are the report a person reads
|
|
22
|
+
* before deciding whether to fix the tracker or accept the encoding. Nothing
|
|
23
|
+
* prints these rows yet — the module has no caller outside the barrel export.
|
|
24
|
+
*
|
|
25
|
+
* A construct is refused (rung 6) when it is `required` and rungs 1-5 are all
|
|
26
|
+
* unavailable. Only attributes carry `required`, so the bottom rung is theirs.
|
|
27
|
+
* The same attribute without `required` is `dropped` instead — a warning, not
|
|
28
|
+
* a stop. `refusalProblems` turns those two outcomes into the `Problem[]` a
|
|
29
|
+
* sync gates on: a `refused` row is an error (a warning under `--force`), a
|
|
30
|
+
* `dropped` row a warning, and both name the field, the missing capability and
|
|
31
|
+
* (for a refusal) the config change that resolves it (LP-279).
|
|
32
|
+
* The push is named whenever a carrier can be created through the
|
|
33
|
+
* provider's API (`provisioning.customFields` / `provisioning.periods`).
|
|
34
|
+
*
|
|
35
|
+
* Constructs the ladder does not cover, deliberately: `comments` and
|
|
36
|
+
* `incrementalRead` are sync *mechanics*, not fields, and the assignee
|
|
37
|
+
* (`accounts.ts`) has no capability cell of its own — a generic pool's label
|
|
38
|
+
* degradation is LP-271's, not the ladder's. Attributes are never reported
|
|
39
|
+
* `native`: the capability table declares no native attribute fields, and the
|
|
40
|
+
* providers implemented so far have none (GitHub); a provider with native
|
|
41
|
+
* fields (Jira) will add a cell before that rung lights up.
|
|
42
|
+
*
|
|
43
|
+
* Pure: no disk, no network. The board, the opened remote and the resolved
|
|
44
|
+
* capability table are passed in, so a dry-run is this exact code path.
|
|
45
|
+
*/
|
|
46
|
+
import type { LoadedBoard } from '../core/board/load.js';
|
|
47
|
+
import type { Problem } from '../core/model/types.js';
|
|
48
|
+
import type { ResolvedCapabilities } from './capabilities.js';
|
|
49
|
+
import type { OpenedRemote } from './remotes.js';
|
|
50
|
+
/**
|
|
51
|
+
* One rung of the degradation ladder, best first — plus `dropped`, the outcome
|
|
52
|
+
* off the bottom of the ladder: a field with no carrier that is *not*
|
|
53
|
+
* `required`, so it is lost with a warning rather than refused.
|
|
54
|
+
*/
|
|
55
|
+
export type Rung = 'native' | 'custom_field' | 'label' | 'managed_block' | 'comment' | 'refused' | 'dropped';
|
|
56
|
+
/** A carrier that does not exist on the remote yet, and is created for you. */
|
|
57
|
+
export interface ProvisionHint {
|
|
58
|
+
/** The command that creates it — the push, which does this before it files. */
|
|
59
|
+
command: string;
|
|
60
|
+
/** What that command would create. */
|
|
61
|
+
description: string;
|
|
62
|
+
}
|
|
63
|
+
/** One construct and where it landed. */
|
|
64
|
+
export interface LadderRow {
|
|
65
|
+
/** The construct: `hierarchy`, `type`, `status`, an edge, an attribute, a period type. */
|
|
66
|
+
construct: string;
|
|
67
|
+
/** The board side, human-readable — the chain, the statuses, the mapped carrier. */
|
|
68
|
+
board: string;
|
|
69
|
+
/** The rung the field landed on. */
|
|
70
|
+
rung: Rung;
|
|
71
|
+
/** Why the rung above was not available. */
|
|
72
|
+
reason: string;
|
|
73
|
+
/** Present when the carrier can be created through the API. */
|
|
74
|
+
provision?: ProvisionHint;
|
|
75
|
+
}
|
|
76
|
+
/** Options for `preflightLadder`. */
|
|
77
|
+
export interface LadderOptions {
|
|
78
|
+
/**
|
|
79
|
+
* Whether the remote body can carry a managed block (rung 4). Defaults to
|
|
80
|
+
* true. `encoding: comment` on the remote is the declared spelling of
|
|
81
|
+
* `false` — derive it with `bodyWritableFor(remote)`.
|
|
82
|
+
*/
|
|
83
|
+
bodyWritable?: boolean;
|
|
84
|
+
}
|
|
85
|
+
/** The report this module renders, for whatever comes to print it. */
|
|
86
|
+
export interface PreflightReport {
|
|
87
|
+
remoteName: string;
|
|
88
|
+
/** Provider name and its coordinates: `github: acme/payments`. */
|
|
89
|
+
connection: string;
|
|
90
|
+
rows: LadderRow[];
|
|
91
|
+
/** Every row landed on rung 1. */
|
|
92
|
+
lossless: boolean;
|
|
93
|
+
/** Some `required` construct reached rung 6 — the sync must stop. */
|
|
94
|
+
refused: boolean;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* True when a remote's `encoding` keeps degraded fields in the body (rung 4).
|
|
98
|
+
* `encoding: comment` is the declared spelling of "the body is not writable"
|
|
99
|
+
* and pushes degraded fields down to the managed comment (rung 5) instead.
|
|
100
|
+
*/
|
|
101
|
+
export declare function bodyWritableFor(remote: OpenedRemote): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Compute the rung every board construct lands on, against one remote's
|
|
104
|
+
* resolved capabilities.
|
|
105
|
+
*
|
|
106
|
+
* The remote must already have been opened (`openRemote`), so `remote.mapping`
|
|
107
|
+
* carries the provider-validated shape; the capabilities must already have
|
|
108
|
+
* been resolved (`resolveCapabilities`), so probes are answered. Both are
|
|
109
|
+
* handed in rather than derived here — this function stays pure and a
|
|
110
|
+
* dry-run is the exact code path a real check runs.
|
|
111
|
+
*/
|
|
112
|
+
export declare function preflightLadder(board: LoadedBoard, remote: OpenedRemote, capabilities: ResolvedCapabilities, options?: LadderOptions): PreflightReport;
|
|
113
|
+
/**
|
|
114
|
+
* Render the report as text. Lossless boards get the short form — a single
|
|
115
|
+
* line saying nothing is degraded (the story's third criterion). Otherwise one
|
|
116
|
+
* row per construct: name, board side, rung, and the reason the rung above was
|
|
117
|
+
* not available, naming the command that creates a carrier where one can be.
|
|
118
|
+
*/
|
|
119
|
+
export declare function renderLadderReport(report: PreflightReport): string;
|
|
120
|
+
/** Options for `refusalProblems`. */
|
|
121
|
+
export interface RefusalOptions {
|
|
122
|
+
/**
|
|
123
|
+
* When true, a `refused` field is a warning rather than an error — the
|
|
124
|
+
* `--force` escape hatch, which lets the sync proceed once while the caller
|
|
125
|
+
* lists the dropped fields in its summary and audit log.
|
|
126
|
+
*/
|
|
127
|
+
force?: boolean;
|
|
128
|
+
/** The config file path each problem is reported against. Defaults to `.lpm/config.yml`. */
|
|
129
|
+
configPath?: string;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The problems a ladder report raises for the sync gate (LP-279): the bottom
|
|
133
|
+
* of the ladder, where a field has nowhere to go, must never be silent loss.
|
|
134
|
+
*
|
|
135
|
+
* A `refused` row — a `required` attribute with no carrier at all — is an
|
|
136
|
+
* error that stops the sync, unless `force` downgrades it to a warning. A
|
|
137
|
+
* `dropped` row — the same attribute without `required` — is always a warning
|
|
138
|
+
* and the sync proceeds. Both name the field, the capability the remote lacks,
|
|
139
|
+
* and (for a refusal) the concrete config change that resolves it: mapping the
|
|
140
|
+
* attribute to a label, the one carrier every provider has.
|
|
141
|
+
*
|
|
142
|
+
* Pure: it reads the report already computed by `preflightLadder` against
|
|
143
|
+
* resolved capabilities, so a dry-run and a real sync run the exact same code.
|
|
144
|
+
*/
|
|
145
|
+
export declare function refusalProblems(report: PreflightReport, options?: RefusalOptions): Problem[];
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The degradation ladder as a report (LP-275): for every board construct a
|
|
3
|
+
* remote must carry, which rung of the ladder it lands on and why the rung
|
|
4
|
+
* above was not available.
|
|
5
|
+
*
|
|
6
|
+
* The ladder (LP-255) is the ordered set of carriers a field may use, best
|
|
7
|
+
* first:
|
|
8
|
+
*
|
|
9
|
+
* 1. native the remote has a real place for it
|
|
10
|
+
* 2. custom field the remote can be *given* one (the push creates it)
|
|
11
|
+
* 3. label a low-fidelity native carrier for enums and types
|
|
12
|
+
* 4. managed block a delimited region in the issue body
|
|
13
|
+
* 5. comment the same block as a comment, when the body is not writable
|
|
14
|
+
* 6. refuse a `required` field with none of the above — the sync stops
|
|
15
|
+
*
|
|
16
|
+
* `preflight.ts` collects the *values* one remote cannot carry, per document,
|
|
17
|
+
* offline, as a `Problem[]`. This module is the other half: the *constructs*
|
|
18
|
+
* (hierarchy, type, status, each edge, each attribute, each period level) and
|
|
19
|
+
* their rungs, read from the **resolved** capabilities — probes answered —
|
|
20
|
+
* which is what `preflight.ts` cannot do offline. The two are complementary:
|
|
21
|
+
* the value problems gate the push, the rungs are the report a person reads
|
|
22
|
+
* before deciding whether to fix the tracker or accept the encoding. Nothing
|
|
23
|
+
* prints these rows yet — the module has no caller outside the barrel export.
|
|
24
|
+
*
|
|
25
|
+
* A construct is refused (rung 6) when it is `required` and rungs 1-5 are all
|
|
26
|
+
* unavailable. Only attributes carry `required`, so the bottom rung is theirs.
|
|
27
|
+
* The same attribute without `required` is `dropped` instead — a warning, not
|
|
28
|
+
* a stop. `refusalProblems` turns those two outcomes into the `Problem[]` a
|
|
29
|
+
* sync gates on: a `refused` row is an error (a warning under `--force`), a
|
|
30
|
+
* `dropped` row a warning, and both name the field, the missing capability and
|
|
31
|
+
* (for a refusal) the config change that resolves it (LP-279).
|
|
32
|
+
* The push is named whenever a carrier can be created through the
|
|
33
|
+
* provider's API (`provisioning.customFields` / `provisioning.periods`).
|
|
34
|
+
*
|
|
35
|
+
* Constructs the ladder does not cover, deliberately: `comments` and
|
|
36
|
+
* `incrementalRead` are sync *mechanics*, not fields, and the assignee
|
|
37
|
+
* (`accounts.ts`) has no capability cell of its own — a generic pool's label
|
|
38
|
+
* degradation is LP-271's, not the ladder's. Attributes are never reported
|
|
39
|
+
* `native`: the capability table declares no native attribute fields, and the
|
|
40
|
+
* providers implemented so far have none (GitHub); a provider with native
|
|
41
|
+
* fields (Jira) will add a cell before that rung lights up.
|
|
42
|
+
*
|
|
43
|
+
* Pure: no disk, no network. The board, the opened remote and the resolved
|
|
44
|
+
* capability table are passed in, so a dry-run is this exact code path.
|
|
45
|
+
*/
|
|
46
|
+
import { hierarchyFor } from '../core/config/lookup.js';
|
|
47
|
+
import { hasPeriods } from '../core/model/types.js';
|
|
48
|
+
import { attributeDefsOf } from './preflight.js';
|
|
49
|
+
import { normalizePeriodMapping } from './periods.js';
|
|
50
|
+
/** The rung's display name. */
|
|
51
|
+
const RUNG_LABEL = {
|
|
52
|
+
native: 'native',
|
|
53
|
+
custom_field: 'custom field',
|
|
54
|
+
label: 'label',
|
|
55
|
+
managed_block: 'managed block',
|
|
56
|
+
comment: 'comment',
|
|
57
|
+
refused: 'refused',
|
|
58
|
+
dropped: 'dropped',
|
|
59
|
+
};
|
|
60
|
+
// ---------------------------------------------------------------------------
|
|
61
|
+
// Helpers
|
|
62
|
+
// ---------------------------------------------------------------------------
|
|
63
|
+
/**
|
|
64
|
+
* True when a remote's `encoding` keeps degraded fields in the body (rung 4).
|
|
65
|
+
* `encoding: comment` is the declared spelling of "the body is not writable"
|
|
66
|
+
* and pushes degraded fields down to the managed comment (rung 5) instead.
|
|
67
|
+
*/
|
|
68
|
+
export function bodyWritableFor(remote) {
|
|
69
|
+
return remote.encoding !== 'comment';
|
|
70
|
+
}
|
|
71
|
+
function asRecord(value) {
|
|
72
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
return {};
|
|
76
|
+
}
|
|
77
|
+
/** A phrase naming the remote's native nesting, for hierarchy reasons. */
|
|
78
|
+
function depthPhrase(hierarchyDepth) {
|
|
79
|
+
if (hierarchyDepth === 0)
|
|
80
|
+
return 'the remote is flat';
|
|
81
|
+
if (hierarchyDepth === 1)
|
|
82
|
+
return 'one native sub-issue level';
|
|
83
|
+
return `${hierarchyDepth} native sub-issue levels`;
|
|
84
|
+
}
|
|
85
|
+
/** The hint for a carrier the push creates, when the provider can create fields. */
|
|
86
|
+
function customFieldHint(capabilities) {
|
|
87
|
+
if (!capabilities.provisioning.customFields)
|
|
88
|
+
return undefined;
|
|
89
|
+
return {
|
|
90
|
+
command: 'lpm remote push',
|
|
91
|
+
description: 'creates the missing fields and options before it files',
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
// Per-construct decisions
|
|
96
|
+
// ---------------------------------------------------------------------------
|
|
97
|
+
/** The issue hierarchy chain, for the `board` column. */
|
|
98
|
+
function issueChain(board) {
|
|
99
|
+
return hierarchyFor(board.config, 'issue')
|
|
100
|
+
.map((level) => level.join('/'))
|
|
101
|
+
.join(' > ');
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Nesting: native while the board is no deeper than the remote's native depth
|
|
105
|
+
* (`hierarchyDepth` parent edges + the root); the extra levels' parent rides
|
|
106
|
+
* the managed block. The types at those levels are the `type` row's business.
|
|
107
|
+
*/
|
|
108
|
+
function hierarchyRow(board, capabilities) {
|
|
109
|
+
const hierarchy = hierarchyFor(board.config, 'issue');
|
|
110
|
+
const chain = issueChain(board);
|
|
111
|
+
const nativeDepth = capabilities.hierarchyDepth + 1;
|
|
112
|
+
if (hierarchy.length <= nativeDepth) {
|
|
113
|
+
return {
|
|
114
|
+
construct: 'hierarchy',
|
|
115
|
+
board: chain,
|
|
116
|
+
rung: 'native',
|
|
117
|
+
reason: 'fits within the remote native depth',
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
construct: 'hierarchy',
|
|
122
|
+
board: chain,
|
|
123
|
+
rung: 'managed_block',
|
|
124
|
+
reason: `${depthPhrase(capabilities.hierarchyDepth)}; deeper nesting is carried in the managed block`,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
/** Issue type: native where the provider has one, else a label. */
|
|
128
|
+
function typeRow(board, capabilities) {
|
|
129
|
+
const types = hierarchyFor(board.config, 'issue').flat().join(' ');
|
|
130
|
+
return capabilities.nativeTypes
|
|
131
|
+
? { construct: 'type', board: types, rung: 'native', reason: 'the remote has native issue types' }
|
|
132
|
+
: { construct: 'type', board: types, rung: 'label', reason: 'no native issue type' };
|
|
133
|
+
}
|
|
134
|
+
/** Status: named workflow states are native; open/closed degrades to a field or labels. */
|
|
135
|
+
function statusRow(board, capabilities) {
|
|
136
|
+
const statuses = board.config.statuses.map((status) => status.id).join(' ');
|
|
137
|
+
if (capabilities.status.kind !== 'binary') {
|
|
138
|
+
return { construct: 'status', board: statuses, rung: 'native', reason: 'native workflow states' };
|
|
139
|
+
}
|
|
140
|
+
const base = { construct: 'status', board: statuses };
|
|
141
|
+
if (capabilities.customFields !== null) {
|
|
142
|
+
return {
|
|
143
|
+
...base,
|
|
144
|
+
rung: 'custom_field',
|
|
145
|
+
reason: 'only open/closed natively; richer states ride a custom field',
|
|
146
|
+
provision: customFieldHint(capabilities),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
return {
|
|
150
|
+
...base,
|
|
151
|
+
rung: 'label',
|
|
152
|
+
reason: 'only open/closed natively, and no custom fields — labels carry the state',
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
/** A dependency edge: native where the remote holds one, else the managed block. */
|
|
156
|
+
function edgeRow(kind, native) {
|
|
157
|
+
if (native) {
|
|
158
|
+
return {
|
|
159
|
+
construct: kind,
|
|
160
|
+
board: '',
|
|
161
|
+
rung: 'native',
|
|
162
|
+
reason: kind === 'depends_on' ? 'native blocking edge' : 'native relates edge',
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
construct: kind,
|
|
167
|
+
board: '',
|
|
168
|
+
rung: 'managed_block',
|
|
169
|
+
reason: kind === 'depends_on'
|
|
170
|
+
? 'the remote has no blocking edge'
|
|
171
|
+
: 'the remote has no relates edge',
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/** One declared issue attribute, walked down the ladder. */
|
|
175
|
+
function attributeRow(name, def, mappedTo, capabilities, bodyWritable) {
|
|
176
|
+
const mapped = mappedTo !== undefined && mappedTo !== '';
|
|
177
|
+
const board = mapped ? `-> "${mappedTo}"` : '';
|
|
178
|
+
// Rung 3: a mapped attribute rides the mapping's carrier, which for the
|
|
179
|
+
// implemented provider (GitHub) is a label prefix. Rung 1 never lights up —
|
|
180
|
+
// no capability cell declares native attribute fields. Rung 2 is skipped
|
|
181
|
+
// because the mapping pinned the carrier to a label.
|
|
182
|
+
if (mapped) {
|
|
183
|
+
return {
|
|
184
|
+
construct: name,
|
|
185
|
+
board,
|
|
186
|
+
rung: 'label',
|
|
187
|
+
reason: 'no native field; the mapping carries attributes as labels',
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
// Rung 2: an unmapped attribute can be given a custom field, when the
|
|
191
|
+
// provider holds them.
|
|
192
|
+
if (capabilities.customFields !== null) {
|
|
193
|
+
return {
|
|
194
|
+
construct: name,
|
|
195
|
+
board,
|
|
196
|
+
rung: 'custom_field',
|
|
197
|
+
reason: 'not mapped; carried as a custom field',
|
|
198
|
+
provision: customFieldHint(capabilities),
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
// Rungs 4-6: the managed block, its comment fallback, or the stop.
|
|
202
|
+
if (bodyWritable) {
|
|
203
|
+
return {
|
|
204
|
+
construct: name,
|
|
205
|
+
board,
|
|
206
|
+
rung: 'managed_block',
|
|
207
|
+
reason: 'not mapped and no custom fields — carried in the managed block',
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
if (capabilities.comments.native) {
|
|
211
|
+
return {
|
|
212
|
+
construct: name,
|
|
213
|
+
board,
|
|
214
|
+
rung: 'comment',
|
|
215
|
+
reason: 'not mapped, and the body is not writable — carried as a managed comment',
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
// Rung 6: a `required` field with none of the above is refused — the sync
|
|
219
|
+
// stops rather than dropping it in silence. The same field, not required,
|
|
220
|
+
// is dropped with a warning instead (the `dropped` outcome off the ladder).
|
|
221
|
+
if (def.required === true) {
|
|
222
|
+
return {
|
|
223
|
+
construct: name,
|
|
224
|
+
board,
|
|
225
|
+
rung: 'refused',
|
|
226
|
+
reason: 'required, and no carrier is available (no custom fields, no writable body, no comments)',
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
return {
|
|
230
|
+
construct: name,
|
|
231
|
+
board,
|
|
232
|
+
rung: 'dropped',
|
|
233
|
+
reason: 'not required, and no carrier is available (no custom fields, no writable body, no comments)',
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
/** One declared period type: the container level vs the degraded levels. */
|
|
237
|
+
function periodContainerRow(type, capabilities, carrier) {
|
|
238
|
+
if (capabilities.periods.native || capabilities.periods.creatable) {
|
|
239
|
+
const provision = capabilities.periods.native
|
|
240
|
+
? undefined
|
|
241
|
+
: { command: 'lpm remote push', description: 'creates the period container before it files' };
|
|
242
|
+
return {
|
|
243
|
+
construct: type,
|
|
244
|
+
board: `-> ${carrier}`,
|
|
245
|
+
rung: 'native',
|
|
246
|
+
reason: 'native period container (milestone, sprint, cycle)',
|
|
247
|
+
...(provision ? { provision } : {}),
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
return {
|
|
251
|
+
construct: type,
|
|
252
|
+
board: '',
|
|
253
|
+
rung: 'managed_block',
|
|
254
|
+
reason: 'no native container — carried in the managed block',
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
// ---------------------------------------------------------------------------
|
|
258
|
+
// The report
|
|
259
|
+
// ---------------------------------------------------------------------------
|
|
260
|
+
/**
|
|
261
|
+
* Compute the rung every board construct lands on, against one remote's
|
|
262
|
+
* resolved capabilities.
|
|
263
|
+
*
|
|
264
|
+
* The remote must already have been opened (`openRemote`), so `remote.mapping`
|
|
265
|
+
* carries the provider-validated shape; the capabilities must already have
|
|
266
|
+
* been resolved (`resolveCapabilities`), so probes are answered. Both are
|
|
267
|
+
* handed in rather than derived here — this function stays pure and a
|
|
268
|
+
* dry-run is the exact code path a real check runs.
|
|
269
|
+
*/
|
|
270
|
+
export function preflightLadder(board, remote, capabilities, options = {}) {
|
|
271
|
+
// `encoding: comment` is the declared spelling of "the body is not
|
|
272
|
+
// writable"; the option overrides it for a caller that probed a runtime
|
|
273
|
+
// fact instead (a body write the remote refused).
|
|
274
|
+
const bodyWritable = options.bodyWritable ?? bodyWritableFor(remote);
|
|
275
|
+
const rows = [
|
|
276
|
+
hierarchyRow(board, capabilities),
|
|
277
|
+
typeRow(board, capabilities),
|
|
278
|
+
statusRow(board, capabilities),
|
|
279
|
+
edgeRow('depends_on', capabilities.edges.dependsOn),
|
|
280
|
+
edgeRow('relates_to', capabilities.edges.relatesTo),
|
|
281
|
+
];
|
|
282
|
+
const defs = attributeDefsOf(board);
|
|
283
|
+
const attributeMapping = asRecord(remote.mapping['attributes']);
|
|
284
|
+
for (const name of Object.keys(defs).sort()) {
|
|
285
|
+
const mappedTo = attributeMapping[name];
|
|
286
|
+
rows.push(attributeRow(name, defs[name], typeof mappedTo === 'string' ? mappedTo : undefined, capabilities, bodyWritable));
|
|
287
|
+
}
|
|
288
|
+
if (hasPeriods(board.config)) {
|
|
289
|
+
const periodMapping = normalizePeriodMapping(remote.mapping['periods']);
|
|
290
|
+
for (const type of board.config.period_hierarchy.flat()) {
|
|
291
|
+
if (periodMapping && type === periodMapping.container) {
|
|
292
|
+
rows.push(periodContainerRow(type, capabilities, periodMapping.carrier));
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
rows.push({
|
|
296
|
+
construct: type,
|
|
297
|
+
board: '',
|
|
298
|
+
rung: 'managed_block',
|
|
299
|
+
reason: 'not the container level — carried as a `period:<type>` row in the managed block',
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
const providerName = board.config.remotes[remote.name]?.provider ?? '';
|
|
305
|
+
const repo = remote.connection['repo'];
|
|
306
|
+
const connection = typeof repo === 'string' && repo !== ''
|
|
307
|
+
? providerName !== ''
|
|
308
|
+
? `${providerName}: ${repo}`
|
|
309
|
+
: repo
|
|
310
|
+
: providerName;
|
|
311
|
+
return {
|
|
312
|
+
remoteName: remote.name,
|
|
313
|
+
connection,
|
|
314
|
+
rows,
|
|
315
|
+
lossless: rows.every((row) => row.rung === 'native'),
|
|
316
|
+
refused: rows.some((row) => row.rung === 'refused'),
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
// ---------------------------------------------------------------------------
|
|
320
|
+
// The text form
|
|
321
|
+
// ---------------------------------------------------------------------------
|
|
322
|
+
function pad(text, width) {
|
|
323
|
+
return text.length >= width ? `${text} ` : text + ' '.repeat(width - text.length);
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Render the report as text. Lossless boards get the short form — a single
|
|
327
|
+
* line saying nothing is degraded (the story's third criterion). Otherwise one
|
|
328
|
+
* row per construct: name, board side, rung, and the reason the rung above was
|
|
329
|
+
* not available, naming the command that creates a carrier where one can be.
|
|
330
|
+
*/
|
|
331
|
+
export function renderLadderReport(report) {
|
|
332
|
+
const header = `Remote "${report.remoteName}" (${report.connection})`;
|
|
333
|
+
if (report.lossless) {
|
|
334
|
+
return `${header} — every field round-trips losslessly.\n`;
|
|
335
|
+
}
|
|
336
|
+
const constructWidth = Math.max(...report.rows.map((row) => row.construct.length));
|
|
337
|
+
const boardWidth = Math.max(0, ...report.rows.map((row) => row.board.length));
|
|
338
|
+
const rungWidth = Math.max(...report.rows.map((row) => RUNG_LABEL[row.rung].length));
|
|
339
|
+
const lines = [header, ''];
|
|
340
|
+
for (const row of report.rows) {
|
|
341
|
+
const provision = row.provision
|
|
342
|
+
? ` — ${row.provision.command} (${row.provision.description})`
|
|
343
|
+
: '';
|
|
344
|
+
lines.push(` ${pad(row.construct, constructWidth)} ${pad(row.board, boardWidth)} ${pad(RUNG_LABEL[row.rung], rungWidth)} ${row.reason}${provision}`);
|
|
345
|
+
}
|
|
346
|
+
return `${lines.join('\n')}\n`;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* The problems a ladder report raises for the sync gate (LP-279): the bottom
|
|
350
|
+
* of the ladder, where a field has nowhere to go, must never be silent loss.
|
|
351
|
+
*
|
|
352
|
+
* A `refused` row — a `required` attribute with no carrier at all — is an
|
|
353
|
+
* error that stops the sync, unless `force` downgrades it to a warning. A
|
|
354
|
+
* `dropped` row — the same attribute without `required` — is always a warning
|
|
355
|
+
* and the sync proceeds. Both name the field, the capability the remote lacks,
|
|
356
|
+
* and (for a refusal) the concrete config change that resolves it: mapping the
|
|
357
|
+
* attribute to a label, the one carrier every provider has.
|
|
358
|
+
*
|
|
359
|
+
* Pure: it reads the report already computed by `preflightLadder` against
|
|
360
|
+
* resolved capabilities, so a dry-run and a real sync run the exact same code.
|
|
361
|
+
*/
|
|
362
|
+
export function refusalProblems(report, options = {}) {
|
|
363
|
+
const force = options.force ?? false;
|
|
364
|
+
const path = options.configPath ?? '.lpm/config.yml';
|
|
365
|
+
const problems = [];
|
|
366
|
+
for (const row of report.rows) {
|
|
367
|
+
if (row.rung !== 'refused' && row.rung !== 'dropped')
|
|
368
|
+
continue;
|
|
369
|
+
const key = `remotes.${report.remoteName}.mapping.attributes.${row.construct}`;
|
|
370
|
+
if (row.rung === 'refused') {
|
|
371
|
+
problems.push({
|
|
372
|
+
level: force ? 'warn' : 'error',
|
|
373
|
+
path,
|
|
374
|
+
message: `${key}: attribute "${row.construct}" is ${row.reason} — map it to a label so the value is carried: ${key}: "<label>"`,
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
else {
|
|
378
|
+
problems.push({
|
|
379
|
+
level: 'warn',
|
|
380
|
+
path,
|
|
381
|
+
message: `${key}: attribute "${row.construct}" is ${row.reason} — the value will be dropped`,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
return problems;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AQ,CAAC,IAAI,CAAC;gBACZ,KAAK,EAAE,MAAM;gBACb,IAAI;gBACJ,OAAO,EAAE,GAAG,GAAG,gBAAgB,GAAG,CAAC,SAAS,QAAQ,GAAG,CAAC,MAAM,8BAA8B;aAC7F,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ledger — which remote owns which document, across every declared remote.
|
|
3
|
+
*
|
|
4
|
+
* A board may declare several remotes, and each keeps its own correspondence
|
|
5
|
+
* store (`.lpm/remotes/<name>/links.json`). Read one at a time they answer "is
|
|
6
|
+
* LP-12 on *this* tracker?"; nothing answered the question a person actually
|
|
7
|
+
* asks, which is **"where does LP-12 live?"** — and nothing stopped the same
|
|
8
|
+
* document being filed onto two trackers at once. Two twins of one story is not
|
|
9
|
+
* a mirror of a plan: a status moves on one side, the other keeps its own, and
|
|
10
|
+
* the next sync of each writes a different truth back onto the same document.
|
|
11
|
+
*
|
|
12
|
+
* So: **one document, one remote, at a time.** This module is the whole of that
|
|
13
|
+
* rule. It is deliberately a *derived* index rather than a file of its own —
|
|
14
|
+
* built by reading the stores that already exist, in the same spirit as the
|
|
15
|
+
* dependency inverses the engine derives at load. A committed `ledger.json`
|
|
16
|
+
* would be a second copy of a fact the link stores already hold, free to
|
|
17
|
+
* disagree with them after a merge, and needing its own repair pass to say
|
|
18
|
+
* which copy was right. There is nothing to repair here: the stores *are* the
|
|
19
|
+
* ledger.
|
|
20
|
+
*
|
|
21
|
+
* Where it is enforced, and what happens:
|
|
22
|
+
*
|
|
23
|
+
* - `lpm remote push` — a document another remote owns is never created a
|
|
24
|
+
* second time. It is reported in the plan's `skipped` list with the reason
|
|
25
|
+
* `owned_elsewhere` and the key it already has, exactly as a decoupled
|
|
26
|
+
* document is reported, so a whole-board push to a second remote is a
|
|
27
|
+
* readable report rather than a refusal or a duplicate.
|
|
28
|
+
* - `lpm remote link` — adopting a twin for a document that already has one
|
|
29
|
+
* elsewhere is refused outright, because it is one explicit document and
|
|
30
|
+
* the person is asking for the thing the rule forbids.
|
|
31
|
+
*
|
|
32
|
+
* Nothing here writes. The remedy — `lpm remote decouple <id>` on the remote
|
|
33
|
+
* that holds it — is the operator's, and is named in every message.
|
|
34
|
+
*/
|
|
35
|
+
import type { BoardConfig } from '../core/model/types.js';
|
|
36
|
+
import type { BoardPaths } from '../core/storage/paths.js';
|
|
37
|
+
/** Where one document is filed: the remote that holds it, and the twin's key. */
|
|
38
|
+
export interface LedgerEntry {
|
|
39
|
+
/** The local document id. */
|
|
40
|
+
localId: string;
|
|
41
|
+
/** The declared remote's name (`jira`, `upstream`). */
|
|
42
|
+
remote: string;
|
|
43
|
+
/** That remote's provider (`jira`, `github`, `linear`, `jsonfile`). */
|
|
44
|
+
provider: string;
|
|
45
|
+
/** The remote system's opaque id. */
|
|
46
|
+
remoteId: string;
|
|
47
|
+
/** The human-readable key, e.g. `acme/payments#418` or `PAY-31`. */
|
|
48
|
+
remoteKey: string;
|
|
49
|
+
/** Full URL to the twin, when the store recorded one. */
|
|
50
|
+
remoteUrl: string;
|
|
51
|
+
/** When the link was last written (ISO-8601). */
|
|
52
|
+
syncedAt: string;
|
|
53
|
+
}
|
|
54
|
+
/** Every document that has a twin, keyed by local id. */
|
|
55
|
+
export interface Ledger {
|
|
56
|
+
/** Local id → where it is filed. */
|
|
57
|
+
byLocalId: ReadonlyMap<string, LedgerEntry>;
|
|
58
|
+
/** Remote name → the documents that remote holds, in id order. */
|
|
59
|
+
byRemote: ReadonlyMap<string, readonly LedgerEntry[]>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Build the ledger by reading every declared remote's link store.
|
|
63
|
+
*
|
|
64
|
+
* A remote whose store does not exist yet contributes nothing (the first sync
|
|
65
|
+
* creates it). A document that somehow appears in two stores — a hand-edited
|
|
66
|
+
* file, a merge that took both sides — is reported by `conflicts()` rather than
|
|
67
|
+
* silently resolved: this is a read, and picking a winner is not its call.
|
|
68
|
+
*/
|
|
69
|
+
export declare function buildLedger(paths: BoardPaths, config: BoardConfig): Ledger;
|
|
70
|
+
/** Where one document is filed, or `undefined` when it has no twin anywhere. */
|
|
71
|
+
export declare function ownerOf(ledger: Ledger, localId: string): LedgerEntry | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* The remote a document is filed on, when that is not `remoteName` — the one
|
|
74
|
+
* question every enforcement point asks. `undefined` means the document is free
|
|
75
|
+
* (no twin at all) or already belongs to this remote.
|
|
76
|
+
*/
|
|
77
|
+
export declare function otherOwner(ledger: Ledger, localId: string, remoteName: string): LedgerEntry | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Every document filed somewhere other than `remoteName`. The push planner
|
|
80
|
+
* takes this as the set it must not create a second twin for.
|
|
81
|
+
*/
|
|
82
|
+
export declare function idsOwnedElsewhere(ledger: Ledger, remoteName: string): Map<string, LedgerEntry>;
|
|
83
|
+
/**
|
|
84
|
+
* Documents that appear in more than one remote's store — the state this rule
|
|
85
|
+
* exists to prevent, arrived at by a hand edit or a merge that took both sides.
|
|
86
|
+
* Reported by `lpm remote ledger`, never repaired here.
|
|
87
|
+
*/
|
|
88
|
+
export declare function conflicts(paths: BoardPaths, config: BoardConfig): LedgerEntry[][];
|
|
89
|
+
/**
|
|
90
|
+
* Refuse an operation that would give `localId` a second twin.
|
|
91
|
+
*
|
|
92
|
+
* Used where the request names one document explicitly (`lpm remote link`): the
|
|
93
|
+
* person asked for exactly the thing the rule forbids, so the answer is an
|
|
94
|
+
* error naming the holder and the one command that releases it. A bulk push
|
|
95
|
+
* reports instead — see the module comment.
|
|
96
|
+
*/
|
|
97
|
+
export declare function requireUnclaimed(ledger: Ledger, localId: string, remoteName: string): void;
|