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,51 @@
|
|
|
1
|
+
import type { Template } from '../model/types.js';
|
|
2
|
+
import type { LoadedBoard } from './load.js';
|
|
3
|
+
/**
|
|
4
|
+
* Reading the template registry.
|
|
5
|
+
*
|
|
6
|
+
* The registry is a collection like any other, so loading, checking, moving and
|
|
7
|
+
* deleting come for free. What it adds is one distinction the other collections
|
|
8
|
+
* do not have: some of its documents are *containers* and the rest are the
|
|
9
|
+
* things somebody instantiates. Everything that depends on that distinction is
|
|
10
|
+
* here, so no front end has to re-derive it.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* A template somebody can instantiate: one whose parent is a folder, or nothing.
|
|
14
|
+
*
|
|
15
|
+
* Anything else is *inside* a template — the three stories under a feature
|
|
16
|
+
* template are part of the feature, not three separate offers — and a folder is
|
|
17
|
+
* scaffolding. So this is exactly the list the registry shows and exactly the
|
|
18
|
+
* set of ids `instantiate` accepts.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isTemplateRoot(board: LoadedBoard, template: Template): boolean;
|
|
21
|
+
/** Every template that can be instantiated, in registry order. */
|
|
22
|
+
export declare function templateRoots(board: LoadedBoard): Template[];
|
|
23
|
+
/** Resolve a template by id, case-insensitively, so `tpl-3` finds `TPL-3`. */
|
|
24
|
+
export declare function findTemplate(board: LoadedBoard, id: string): Template | null;
|
|
25
|
+
/** A template and everything nested under it, parents first. */
|
|
26
|
+
export declare function templateSubtree(board: LoadedBoard, root: Template): Template[];
|
|
27
|
+
/**
|
|
28
|
+
* The folder path a template sits under, outermost first — "Delivery / Backend".
|
|
29
|
+
* What makes a listing of forty templates readable.
|
|
30
|
+
*/
|
|
31
|
+
export declare function templatePath(board: LoadedBoard, template: Template): string[];
|
|
32
|
+
/**
|
|
33
|
+
* Why this template may not sit under that parent, or null when it may.
|
|
34
|
+
*
|
|
35
|
+
* The depth rules are the hierarchy's and are checked everywhere else; this is
|
|
36
|
+
* the one rule the registry adds. A folder stands in for a level nobody
|
|
37
|
+
* templatized, so it belongs beside templates and never inside one — a folder
|
|
38
|
+
* halfway down a feature template would be a level of the produced issue tree
|
|
39
|
+
* with nothing to put in it.
|
|
40
|
+
*/
|
|
41
|
+
export declare function placementProblem(type: string, parent: {
|
|
42
|
+
type: string;
|
|
43
|
+
id: string;
|
|
44
|
+
} | null): string | null;
|
|
45
|
+
/** Throw when a placement breaks the rule above. */
|
|
46
|
+
export declare function requirePlacement(type: string, parent: {
|
|
47
|
+
type: string;
|
|
48
|
+
id: string;
|
|
49
|
+
} | null): void;
|
|
50
|
+
/** Resolve a template that must exist, with a message naming the registry. */
|
|
51
|
+
export declare function requireTemplate(board: LoadedBoard, id: string): Template;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { BoardError } from '../errors.js';
|
|
2
|
+
import { TEMPLATE_FOLDER_TYPE, isFolderTemplate } from '../model/types.js';
|
|
3
|
+
import { subtreeOf } from './query.js';
|
|
4
|
+
/**
|
|
5
|
+
* Reading the template registry.
|
|
6
|
+
*
|
|
7
|
+
* The registry is a collection like any other, so loading, checking, moving and
|
|
8
|
+
* deleting come for free. What it adds is one distinction the other collections
|
|
9
|
+
* do not have: some of its documents are *containers* and the rest are the
|
|
10
|
+
* things somebody instantiates. Everything that depends on that distinction is
|
|
11
|
+
* here, so no front end has to re-derive it.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* A template somebody can instantiate: one whose parent is a folder, or nothing.
|
|
15
|
+
*
|
|
16
|
+
* Anything else is *inside* a template — the three stories under a feature
|
|
17
|
+
* template are part of the feature, not three separate offers — and a folder is
|
|
18
|
+
* scaffolding. So this is exactly the list the registry shows and exactly the
|
|
19
|
+
* set of ids `instantiate` accepts.
|
|
20
|
+
*/
|
|
21
|
+
export function isTemplateRoot(board, template) {
|
|
22
|
+
if (isFolderTemplate(template))
|
|
23
|
+
return false;
|
|
24
|
+
if (!template.parentId)
|
|
25
|
+
return true;
|
|
26
|
+
const parent = board.templatesById.get(template.parentId);
|
|
27
|
+
return parent ? isFolderTemplate(parent) : true;
|
|
28
|
+
}
|
|
29
|
+
/** Every template that can be instantiated, in registry order. */
|
|
30
|
+
export function templateRoots(board) {
|
|
31
|
+
return board.templates.filter((template) => isTemplateRoot(board, template));
|
|
32
|
+
}
|
|
33
|
+
/** Resolve a template by id, case-insensitively, so `tpl-3` finds `TPL-3`. */
|
|
34
|
+
export function findTemplate(board, id) {
|
|
35
|
+
const exact = board.templatesById.get(id);
|
|
36
|
+
if (exact)
|
|
37
|
+
return exact;
|
|
38
|
+
const wanted = id.toLowerCase();
|
|
39
|
+
return board.templates.find((template) => template.id.toLowerCase() === wanted) ?? null;
|
|
40
|
+
}
|
|
41
|
+
/** A template and everything nested under it, parents first. */
|
|
42
|
+
export function templateSubtree(board, root) {
|
|
43
|
+
return subtreeOf(board.templates, root);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The folder path a template sits under, outermost first — "Delivery / Backend".
|
|
47
|
+
* What makes a listing of forty templates readable.
|
|
48
|
+
*/
|
|
49
|
+
export function templatePath(board, template) {
|
|
50
|
+
const names = [];
|
|
51
|
+
const seen = new Set([template.id]);
|
|
52
|
+
let current = template.parentId ? board.templatesById.get(template.parentId) : undefined;
|
|
53
|
+
while (current && !seen.has(current.id)) {
|
|
54
|
+
seen.add(current.id);
|
|
55
|
+
names.unshift(current.title);
|
|
56
|
+
current = current.parentId ? board.templatesById.get(current.parentId) : undefined;
|
|
57
|
+
}
|
|
58
|
+
return names;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Why this template may not sit under that parent, or null when it may.
|
|
62
|
+
*
|
|
63
|
+
* The depth rules are the hierarchy's and are checked everywhere else; this is
|
|
64
|
+
* the one rule the registry adds. A folder stands in for a level nobody
|
|
65
|
+
* templatized, so it belongs beside templates and never inside one — a folder
|
|
66
|
+
* halfway down a feature template would be a level of the produced issue tree
|
|
67
|
+
* with nothing to put in it.
|
|
68
|
+
*/
|
|
69
|
+
export function placementProblem(type, parent) {
|
|
70
|
+
if (type !== TEMPLATE_FOLDER_TYPE)
|
|
71
|
+
return null;
|
|
72
|
+
if (parent && parent.type !== TEMPLATE_FOLDER_TYPE) {
|
|
73
|
+
return `A folder cannot sit inside the template ${parent.id}`;
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
/** Throw when a placement breaks the rule above. */
|
|
78
|
+
export function requirePlacement(type, parent) {
|
|
79
|
+
const problem = placementProblem(type, parent);
|
|
80
|
+
if (problem) {
|
|
81
|
+
throw new BoardError(problem, [
|
|
82
|
+
'Folders group templates; only templates and other folders go inside one.',
|
|
83
|
+
]);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/** Resolve a template that must exist, with a message naming the registry. */
|
|
87
|
+
export function requireTemplate(board, id) {
|
|
88
|
+
const template = findTemplate(board, id);
|
|
89
|
+
if (!template) {
|
|
90
|
+
throw new BoardError(`No template with id "${id}"`, [
|
|
91
|
+
board.templates.length
|
|
92
|
+
? 'Run `lpm template list` to see the registry.'
|
|
93
|
+
: 'The registry is empty; add one with `lpm template new <type> -t "..."`.',
|
|
94
|
+
]);
|
|
95
|
+
}
|
|
96
|
+
return template;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/core/board/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvC;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,KAAkB,EAAE,QAAkB;IACnE,IAAI,gBAAgB,CAAC,QAAQ,CAAC;QAAE,OAAO,KAAK,CAAC;IAC7C,IAAI,CAAC,QAAQ,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IA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yE;SAC9E,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which documents each declared remote claims — and where two remotes claim
|
|
3
|
+
* the same ones.
|
|
4
|
+
*
|
|
5
|
+
* A remote mirrors a subtree (`scope: LP-10`) or, with no `scope`, the whole
|
|
6
|
+
* board. **Two remotes may never claim the same document.** A document
|
|
7
|
+
* mirrored to two trackers at once is filed twice, closed twice, and edited
|
|
8
|
+
* from two directions into a conflict nobody asked for — and no `on_delete`
|
|
9
|
+
* policy or three-way merge can dig it back out, because the two remotes have
|
|
10
|
+
* no idea the other exists.
|
|
11
|
+
*
|
|
12
|
+
* Half of that rule is already enforced where it can be answered from the
|
|
13
|
+
* config alone (`checkRemotes` in `config/schema.ts`): two equal scopes are
|
|
14
|
+
* the same subtree, and an absent scope contains every other. The other half
|
|
15
|
+
* needs the board tree, because "is LP-42 inside LP-10?" is a question about
|
|
16
|
+
* parenting, not about config — and that is this file. `config/schema.ts`
|
|
17
|
+
* says so in as many words and this is the check it points at.
|
|
18
|
+
*
|
|
19
|
+
* Pure: no disk, no network. It takes the issues and the declared scopes and
|
|
20
|
+
* returns a value, so `lpm check` (reporting a board that drifted into this
|
|
21
|
+
* state through a reparent, a hand edit or a merge) and `lpm remote add`
|
|
22
|
+
* (refusing to write one in the first place) enforce one rule rather than two
|
|
23
|
+
* that can disagree.
|
|
24
|
+
*/
|
|
25
|
+
import type { Issue } from '../model/types.js';
|
|
26
|
+
/** One remote's claim, as the config declares it. */
|
|
27
|
+
export interface DeclaredScope {
|
|
28
|
+
/** The remote's name, for naming it in a message. */
|
|
29
|
+
name: string;
|
|
30
|
+
/** The scope id, or undefined for the whole board. */
|
|
31
|
+
scope: string | undefined;
|
|
32
|
+
}
|
|
33
|
+
/** Two remotes claiming the same documents, and why. */
|
|
34
|
+
export interface ScopeOverlap {
|
|
35
|
+
/** The remote whose scope contains the other's. */
|
|
36
|
+
outer: string;
|
|
37
|
+
/** The remote nested inside it. */
|
|
38
|
+
inner: string;
|
|
39
|
+
/** The outer remote's scope id (`undefined` — the whole board — never reaches here). */
|
|
40
|
+
outerScope: string;
|
|
41
|
+
/** The inner remote's scope id. */
|
|
42
|
+
innerScope: string;
|
|
43
|
+
}
|
|
44
|
+
/** A `scope:` naming a document the board does not have. */
|
|
45
|
+
export interface StaleScope {
|
|
46
|
+
name: string;
|
|
47
|
+
scope: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Every pair of declared remotes whose scopes claim the same documents through
|
|
51
|
+
* *nesting* — one scope sitting at or inside the other.
|
|
52
|
+
*
|
|
53
|
+
* Equal scopes and an absent scope are left to `config/schema.ts`, which
|
|
54
|
+
* refuses them before a board with them can load at all; reporting them again
|
|
55
|
+
* here would say the same thing twice in different words. A scope naming no
|
|
56
|
+
* document claims nothing and cannot overlap — `staleScopes` reports it
|
|
57
|
+
* instead.
|
|
58
|
+
*
|
|
59
|
+
* Pairs come back in declaration order, outer remote first.
|
|
60
|
+
*/
|
|
61
|
+
export declare function scopeOverlaps(issues: readonly Issue[], remotes: readonly DeclaredScope[]): ScopeOverlap[];
|
|
62
|
+
/**
|
|
63
|
+
* Declared scopes naming a document the board does not have — a subtree that
|
|
64
|
+
* was deleted, renamed or never existed. Such a remote mirrors nothing, which
|
|
65
|
+
* is worth saying out loud before somebody wonders why a sync is empty.
|
|
66
|
+
*/
|
|
67
|
+
export declare function staleScopes(issues: readonly Issue[], remotes: readonly DeclaredScope[]): StaleScope[];
|
|
68
|
+
/** The declared scopes of a board's remotes, in declaration order. */
|
|
69
|
+
export declare function declaredScopes(remotes: Record<string, {
|
|
70
|
+
scope?: string;
|
|
71
|
+
}>): DeclaredScope[];
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which documents each declared remote claims — and where two remotes claim
|
|
3
|
+
* the same ones.
|
|
4
|
+
*
|
|
5
|
+
* A remote mirrors a subtree (`scope: LP-10`) or, with no `scope`, the whole
|
|
6
|
+
* board. **Two remotes may never claim the same document.** A document
|
|
7
|
+
* mirrored to two trackers at once is filed twice, closed twice, and edited
|
|
8
|
+
* from two directions into a conflict nobody asked for — and no `on_delete`
|
|
9
|
+
* policy or three-way merge can dig it back out, because the two remotes have
|
|
10
|
+
* no idea the other exists.
|
|
11
|
+
*
|
|
12
|
+
* Half of that rule is already enforced where it can be answered from the
|
|
13
|
+
* config alone (`checkRemotes` in `config/schema.ts`): two equal scopes are
|
|
14
|
+
* the same subtree, and an absent scope contains every other. The other half
|
|
15
|
+
* needs the board tree, because "is LP-42 inside LP-10?" is a question about
|
|
16
|
+
* parenting, not about config — and that is this file. `config/schema.ts`
|
|
17
|
+
* says so in as many words and this is the check it points at.
|
|
18
|
+
*
|
|
19
|
+
* Pure: no disk, no network. It takes the issues and the declared scopes and
|
|
20
|
+
* returns a value, so `lpm check` (reporting a board that drifted into this
|
|
21
|
+
* state through a reparent, a hand edit or a merge) and `lpm remote add`
|
|
22
|
+
* (refusing to write one in the first place) enforce one rule rather than two
|
|
23
|
+
* that can disagree.
|
|
24
|
+
*/
|
|
25
|
+
/** Issue id → its parent's id, for walking ancestry upward. */
|
|
26
|
+
function parentIndex(issues) {
|
|
27
|
+
const parents = new Map();
|
|
28
|
+
for (const issue of issues)
|
|
29
|
+
parents.set(issue.id, issue.parentId ?? undefined);
|
|
30
|
+
return parents;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* True when `ancestorId` is `id` itself or sits above it in the tree. The walk
|
|
34
|
+
* is bounded by the number of issues, so a parent cycle arriving by hand edit
|
|
35
|
+
* or merge terminates rather than hanging the check that would report it.
|
|
36
|
+
*/
|
|
37
|
+
function isAtOrUnder(parents, id, ancestorId) {
|
|
38
|
+
let current = id;
|
|
39
|
+
for (let steps = 0; current !== undefined && steps <= parents.size; steps += 1) {
|
|
40
|
+
if (current === ancestorId)
|
|
41
|
+
return true;
|
|
42
|
+
current = parents.get(current);
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Every pair of declared remotes whose scopes claim the same documents through
|
|
48
|
+
* *nesting* — one scope sitting at or inside the other.
|
|
49
|
+
*
|
|
50
|
+
* Equal scopes and an absent scope are left to `config/schema.ts`, which
|
|
51
|
+
* refuses them before a board with them can load at all; reporting them again
|
|
52
|
+
* here would say the same thing twice in different words. A scope naming no
|
|
53
|
+
* document claims nothing and cannot overlap — `staleScopes` reports it
|
|
54
|
+
* instead.
|
|
55
|
+
*
|
|
56
|
+
* Pairs come back in declaration order, outer remote first.
|
|
57
|
+
*/
|
|
58
|
+
export function scopeOverlaps(issues, remotes) {
|
|
59
|
+
const known = new Set(issues.map((issue) => issue.id));
|
|
60
|
+
const scoped = remotes.filter((remote) => remote.scope !== undefined && known.has(remote.scope));
|
|
61
|
+
if (scoped.length < 2)
|
|
62
|
+
return [];
|
|
63
|
+
const parents = parentIndex(issues);
|
|
64
|
+
const overlaps = [];
|
|
65
|
+
for (let i = 0; i < scoped.length; i += 1) {
|
|
66
|
+
for (let j = i + 1; j < scoped.length; j += 1) {
|
|
67
|
+
const a = scoped[i];
|
|
68
|
+
const b = scoped[j];
|
|
69
|
+
if (a.scope === b.scope)
|
|
70
|
+
continue; // config/schema.ts already refuses this
|
|
71
|
+
const bInsideA = isAtOrUnder(parents, b.scope, a.scope);
|
|
72
|
+
const aInsideB = isAtOrUnder(parents, a.scope, b.scope);
|
|
73
|
+
if (!bInsideA && !aInsideB)
|
|
74
|
+
continue;
|
|
75
|
+
const outer = bInsideA ? a : b;
|
|
76
|
+
const inner = bInsideA ? b : a;
|
|
77
|
+
overlaps.push({
|
|
78
|
+
outer: outer.name,
|
|
79
|
+
inner: inner.name,
|
|
80
|
+
outerScope: outer.scope,
|
|
81
|
+
innerScope: inner.scope,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return overlaps;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Declared scopes naming a document the board does not have — a subtree that
|
|
89
|
+
* was deleted, renamed or never existed. Such a remote mirrors nothing, which
|
|
90
|
+
* is worth saying out loud before somebody wonders why a sync is empty.
|
|
91
|
+
*/
|
|
92
|
+
export function staleScopes(issues, remotes) {
|
|
93
|
+
const known = new Set(issues.map((issue) => issue.id));
|
|
94
|
+
return remotes
|
|
95
|
+
.filter((remote) => remote.scope !== undefined)
|
|
96
|
+
.filter((remote) => !known.has(remote.scope))
|
|
97
|
+
.map((remote) => ({ name: remote.name, scope: remote.scope }));
|
|
98
|
+
}
|
|
99
|
+
/** The declared scopes of a board's remotes, in declaration order. */
|
|
100
|
+
export function declaredScopes(remotes) {
|
|
101
|
+
return Object.entries(remotes).map(([name, remote]) => ({ name, scope: remote.scope }));
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=remote-scopes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-scopes.js","sourceRoot":"","sources":["../../../src/core/board/remote-scopes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA8BH,+DAA+D;AAC/D,SAAS,WAAW,CAAC,MAAwB;IAC3C,MAAM,OAAO,GAAG,IAAI,GAAG,EAA8B,CAAC;IACtD,KAAK,MAAM,KAAK,IAAI,MAAM;QAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,QAAQ,IAAI,SAAS,CAAC,CAAC;IAC/E,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,SAAS,WAAW,CAClB,OAAwC,EACxC,EAAU,EACV,UAAkB;IAElB,IAAI,OAAO,GAAuB,EAAE,CAAC;IACrC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,OAAO,KAAK,SAAS,IAAI,KAAK,IAAI,OAAO,CAAC,IAAI,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;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CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AAC1F,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Issue } from '../model/types.js';
|
|
2
|
+
import type { LoadedBoard } from './load.js';
|
|
3
|
+
/**
|
|
4
|
+
* Reading a board for the status roll-up: which parents disagree with the work
|
|
5
|
+
* inside them.
|
|
6
|
+
*
|
|
7
|
+
* Read-only, like the rest of `board/`. `operations/rollup.ts` is what writes
|
|
8
|
+
* the answer, and `validation/checks/rollup.ts` is what reports it.
|
|
9
|
+
*
|
|
10
|
+
* @see src/shared/rollup.ts for the rule itself and why it is that way.
|
|
11
|
+
*/
|
|
12
|
+
/** An ancestor that has to move, resolved to the document a caller can write. */
|
|
13
|
+
export interface IssueRollup {
|
|
14
|
+
issue: Issue;
|
|
15
|
+
from: string;
|
|
16
|
+
to: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The ancestors of `issue` that its new status carries with it, nearest first.
|
|
20
|
+
*
|
|
21
|
+
* `issue` is the document as it now stands and `status` the status it now
|
|
22
|
+
* holds — pass both, because the board handle still shows what was there before
|
|
23
|
+
* the operation wrote, including the parent it sat under.
|
|
24
|
+
*/
|
|
25
|
+
export declare function rollupsFor(board: LoadedBoard, issue: Issue, status: string): IssueRollup[];
|
|
26
|
+
/**
|
|
27
|
+
* Every parent on the board whose status disagrees with what is inside it.
|
|
28
|
+
*
|
|
29
|
+
* Deepest first, so one pass carries a closed story up through its feature to
|
|
30
|
+
* the epic above it, and the list can be written in the order it is returned.
|
|
31
|
+
*/
|
|
32
|
+
export declare function boardRollups(board: LoadedBoard): IssueRollup[];
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { statusRulesFor } from '../config/lookup.js';
|
|
2
|
+
import { rollupsAcross, rollupsUpward } from '../../shared/rollup.js';
|
|
3
|
+
/**
|
|
4
|
+
* Adapt a `LoadedBoard` to the id-based lookup `src/shared/rollup.ts` reads.
|
|
5
|
+
*
|
|
6
|
+
* Both overlays carry facts that are true but not yet on the board handle: core
|
|
7
|
+
* operations write straight to disk, so the issue `moveNode` just closed is
|
|
8
|
+
* still open in memory, one it reparented in the same call still sits where it
|
|
9
|
+
* was, and one `createIssue` just wrote is not there at all. Anything not named
|
|
10
|
+
* in an overlay is read off the board.
|
|
11
|
+
*/
|
|
12
|
+
function rollupLookupFor(board, status, parent) {
|
|
13
|
+
// `has`, not `??`: a node moved to the top level has a parent of `null`, and
|
|
14
|
+
// that is an answer rather than a miss.
|
|
15
|
+
const parentOf = (id) => parent.has(id) ? parent.get(id) : (board.byId.get(id)?.parentId ?? null);
|
|
16
|
+
// The overlay's own ids as well, so an issue written a moment ago counts
|
|
17
|
+
// among its parent's contents even though the handle has never seen it.
|
|
18
|
+
const ids = [...board.issues.map((issue) => issue.id), ...parent.keys()];
|
|
19
|
+
const children = new Map();
|
|
20
|
+
for (const id of new Set(ids)) {
|
|
21
|
+
const above = parentOf(id);
|
|
22
|
+
if (!above)
|
|
23
|
+
continue;
|
|
24
|
+
const list = children.get(above);
|
|
25
|
+
if (list)
|
|
26
|
+
list.push(id);
|
|
27
|
+
else
|
|
28
|
+
children.set(above, [id]);
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
parentOf,
|
|
32
|
+
childIdsOf: (id) => children.get(id) ?? [],
|
|
33
|
+
statusOf: (id) => status.get(id) ?? board.byId.get(id)?.status ?? '',
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function resolve(board, rollups) {
|
|
37
|
+
const out = [];
|
|
38
|
+
for (const rollup of rollups) {
|
|
39
|
+
const issue = board.byId.get(rollup.id);
|
|
40
|
+
if (issue)
|
|
41
|
+
out.push({ issue, from: rollup.from, to: rollup.to });
|
|
42
|
+
}
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The ancestors of `issue` that its new status carries with it, nearest first.
|
|
47
|
+
*
|
|
48
|
+
* `issue` is the document as it now stands and `status` the status it now
|
|
49
|
+
* holds — pass both, because the board handle still shows what was there before
|
|
50
|
+
* the operation wrote, including the parent it sat under.
|
|
51
|
+
*/
|
|
52
|
+
export function rollupsFor(board, issue, status) {
|
|
53
|
+
return resolve(board, rollupsUpward(issue.id, rollupLookupFor(board, new Map([[issue.id, status]]), new Map([[issue.id, issue.parentId]])), statusRulesFor(board.config)));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Every parent on the board whose status disagrees with what is inside it.
|
|
57
|
+
*
|
|
58
|
+
* Deepest first, so one pass carries a closed story up through its feature to
|
|
59
|
+
* the epic above it, and the list can be written in the order it is returned.
|
|
60
|
+
*/
|
|
61
|
+
export function boardRollups(board) {
|
|
62
|
+
const ids = [...board.issues]
|
|
63
|
+
.sort((a, b) => b.depth - a.depth)
|
|
64
|
+
.map((issue) => issue.id);
|
|
65
|
+
return resolve(board, rollupsAcross(ids, rollupLookupFor(board, new Map(), new Map()), statusRulesFor(board.config)));
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=rollup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rollup.js","sourceRoot":"","sources":["../../../src/core/board/rollup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAoBtE;;;;;;;;GAQG;AACH,SAAS,eAAe,CACtB,KAAkB,EAClB,MAA2B,EAC3B,MAAkC;IAElC,6EAA6E;IAC7E,wCAAwC;IACxC,MAAM,QAAQ,GAAG,CAAC,EAAU,EAAiB,EAAE,CAC7C,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAA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
|
|
1
|
+
import type { ProfileScope } from '../model/profile.js';
|
|
2
|
+
import type { Issue } from '../model/types.js';
|
|
3
|
+
import type { LoadedBoard } from './load.js';
|
|
4
|
+
/**
|
|
5
|
+
* Narrowing the board to one person's part of it.
|
|
6
|
+
*
|
|
7
|
+
* A `ProfileScope` names documents; a `ResolvedScope` is what that means on
|
|
8
|
+
* *this* board — the actual issues, the periods with their children folded in,
|
|
9
|
+
* and the names that matched nothing. Resolving once and asking many times is
|
|
10
|
+
* what keeps the filter cheap enough to sit inside `nextTasks`.
|
|
11
|
+
*
|
|
12
|
+
* One rule governs where this may be used: **scope decides what the board
|
|
13
|
+
* offers you, never what is reachable.** It filters recommendations and
|
|
14
|
+
* listings; it never hides a document you asked for by id, and it never hides
|
|
15
|
+
* work you have already picked up. Anything else and a dependency would point
|
|
16
|
+
* at something that, as far as you could tell, did not exist.
|
|
17
|
+
*
|
|
18
|
+
* It is routing, not access control. The board is a folder of markdown that the
|
|
19
|
+
* person holding the profile can read; this decides what gets handed to them,
|
|
20
|
+
* not what they are permitted to see.
|
|
21
|
+
*/
|
|
22
|
+
export interface ResolvedScope {
|
|
23
|
+
/** Issues everything must sit at or below. `null` when unrestricted. */
|
|
24
|
+
under: Issue[] | null;
|
|
25
|
+
/** Issues nothing may sit at or below. Empty when nothing is excluded. */
|
|
26
|
+
exclude: Issue[];
|
|
27
|
+
/** Issue types allowed, or `null` when unrestricted. */
|
|
28
|
+
types: string[] | null;
|
|
29
|
+
/** Period ids allowed, child periods included, or `null` when unrestricted. */
|
|
30
|
+
periods: Set<string> | null;
|
|
31
|
+
/** Names in the profile this board has nothing for. Reported, never fatal. */
|
|
32
|
+
unknown: string[];
|
|
33
|
+
/** False when nothing is declared, so every issue is in scope. */
|
|
34
|
+
active: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** A scope that excludes nothing — what every caller without a profile gets. */
|
|
37
|
+
export declare function fullScope(): ResolvedScope;
|
|
38
|
+
/**
|
|
39
|
+
* What a profile's scope means on this board.
|
|
40
|
+
*
|
|
41
|
+
* A name that resolves to nothing is dropped and reported rather than throwing:
|
|
42
|
+
* one profile may well be pointed at a board that has moved on, and a developer
|
|
43
|
+
* whose CLI refuses to run because an epic was renamed is worse served than one
|
|
44
|
+
* who is told about it. What it does *not* do is quietly widen the scope — a
|
|
45
|
+
* declared list that resolves to nothing matches nothing, so a stale `under`
|
|
46
|
+
* fails closed and says so.
|
|
47
|
+
*/
|
|
48
|
+
export declare function resolveScope(board: LoadedBoard, scope: ProfileScope): ResolvedScope;
|
|
49
|
+
export declare function inScope(scope: ResolvedScope, issue: Issue): boolean;
|
|
50
|
+
/** The issues a scope leaves, in board order. */
|
|
51
|
+
export declare function scopedIssues(board: LoadedBoard, scope: ResolvedScope): Issue[];
|
|
52
|
+
/** One line saying what is being applied, for the CLI and for an agent to read. */
|
|
53
|
+
export declare function describeScope(scope: ResolvedScope): string;
|
|
54
|
+
/**
|
|
55
|
+
* A squad's member resource ids, resolved against the current roster.
|
|
56
|
+
*
|
|
57
|
+
* A member id the board no longer has is dropped and reported rather than
|
|
58
|
+
* throwing — a squad that named someone who has since left the roster is a fact
|
|
59
|
+
* the board should know, not a reason to stop loading. An empty squad matches
|
|
60
|
+
* nothing, never everything: the "stale scope fails closed" rule.
|
|
61
|
+
*/
|
|
62
|
+
export interface ResolvedSquad {
|
|
63
|
+
/** Resource ids that are on the roster. */
|
|
64
|
+
members: string[];
|
|
65
|
+
/** Member ids the board has nothing for. Reported, never fatal. */
|
|
66
|
+
unknown: string[];
|
|
67
|
+
/** False when the squad has no members, so nothing is matched. */
|
|
68
|
+
active: boolean;
|
|
69
|
+
}
|
|
70
|
+
/** A squad that has nothing to match — what every call falling through gets. */
|
|
71
|
+
export declare function emptySquad(): ResolvedSquad;
|
|
72
|
+
/**
|
|
73
|
+
* Resolve a squad to its current member resource ids.
|
|
74
|
+
*
|
|
75
|
+
* Follows the same "resolve once, ask many times" pattern as `resolveScope`:
|
|
76
|
+
* the result can be cached and reused for every issue in a period. A stale
|
|
77
|
+
* member id is dropped and reported in `unknown` — the "stale scope fails
|
|
78
|
+
* closed" rule — so a squad whose every member has left the roster matches
|
|
79
|
+
* nothing rather than everything.
|
|
80
|
+
*/
|
|
81
|
+
export declare function resolveSquad(board: LoadedBoard, squadId: string): ResolvedSquad;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { isEmptyScope } from '../model/profile.js';
|
|
3
|
+
import { findIssue, findPeriod, subtreeOf } from './query.js';
|
|
4
|
+
/** A scope that excludes nothing — what every caller without a profile gets. */
|
|
5
|
+
export function fullScope() {
|
|
6
|
+
return { under: null, exclude: [], types: null, periods: null, unknown: [], active: false };
|
|
7
|
+
}
|
|
8
|
+
function isAtOrBelow(issue, root) {
|
|
9
|
+
return issue.dir === root.dir || issue.dir.startsWith(root.dir + path.sep);
|
|
10
|
+
}
|
|
11
|
+
function resolveIssues(board, ids, unknown) {
|
|
12
|
+
const issues = [];
|
|
13
|
+
for (const id of ids) {
|
|
14
|
+
const issue = findIssue(board, id);
|
|
15
|
+
if (issue)
|
|
16
|
+
issues.push(issue);
|
|
17
|
+
else
|
|
18
|
+
unknown.push(id);
|
|
19
|
+
}
|
|
20
|
+
return issues;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A period holds work scheduled in it *and* in the periods below it, the same
|
|
24
|
+
* way `issuesInPeriod` does — naming an increment must not mean "the sprints
|
|
25
|
+
* inside it do not count".
|
|
26
|
+
*/
|
|
27
|
+
function resolvePeriods(board, ids, unknown) {
|
|
28
|
+
const allowed = new Set();
|
|
29
|
+
for (const id of ids) {
|
|
30
|
+
const period = findPeriod(board, id);
|
|
31
|
+
if (!period) {
|
|
32
|
+
unknown.push(id);
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
for (const node of subtreeOf(board.periods, period))
|
|
36
|
+
allowed.add(node.id);
|
|
37
|
+
}
|
|
38
|
+
return allowed;
|
|
39
|
+
}
|
|
40
|
+
function resolveTypes(board, names, unknown) {
|
|
41
|
+
const types = [];
|
|
42
|
+
for (const name of names) {
|
|
43
|
+
if (board.config.issue_types[name])
|
|
44
|
+
types.push(name);
|
|
45
|
+
else
|
|
46
|
+
unknown.push(name);
|
|
47
|
+
}
|
|
48
|
+
return types;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* What a profile's scope means on this board.
|
|
52
|
+
*
|
|
53
|
+
* A name that resolves to nothing is dropped and reported rather than throwing:
|
|
54
|
+
* one profile may well be pointed at a board that has moved on, and a developer
|
|
55
|
+
* whose CLI refuses to run because an epic was renamed is worse served than one
|
|
56
|
+
* who is told about it. What it does *not* do is quietly widen the scope — a
|
|
57
|
+
* declared list that resolves to nothing matches nothing, so a stale `under`
|
|
58
|
+
* fails closed and says so.
|
|
59
|
+
*/
|
|
60
|
+
export function resolveScope(board, scope) {
|
|
61
|
+
if (isEmptyScope(scope))
|
|
62
|
+
return fullScope();
|
|
63
|
+
const unknown = [];
|
|
64
|
+
return {
|
|
65
|
+
under: scope.under ? resolveIssues(board, scope.under, unknown) : null,
|
|
66
|
+
exclude: scope.exclude ? resolveIssues(board, scope.exclude, unknown) : [],
|
|
67
|
+
types: scope.types ? resolveTypes(board, scope.types, unknown) : null,
|
|
68
|
+
periods: scope.periods ? resolvePeriods(board, scope.periods, unknown) : null,
|
|
69
|
+
unknown,
|
|
70
|
+
active: true,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export function inScope(scope, issue) {
|
|
74
|
+
if (!scope.active)
|
|
75
|
+
return true;
|
|
76
|
+
if (scope.exclude.some((root) => isAtOrBelow(issue, root)))
|
|
77
|
+
return false;
|
|
78
|
+
if (scope.under && !scope.under.some((root) => isAtOrBelow(issue, root)))
|
|
79
|
+
return false;
|
|
80
|
+
if (scope.types && !scope.types.includes(issue.type))
|
|
81
|
+
return false;
|
|
82
|
+
if (scope.periods && !(issue.period && scope.periods.has(issue.period)))
|
|
83
|
+
return false;
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
/** The issues a scope leaves, in board order. */
|
|
87
|
+
export function scopedIssues(board, scope) {
|
|
88
|
+
return scope.active ? board.issues.filter((issue) => inScope(scope, issue)) : board.issues;
|
|
89
|
+
}
|
|
90
|
+
/** One line saying what is being applied, for the CLI and for an agent to read. */
|
|
91
|
+
export function describeScope(scope) {
|
|
92
|
+
if (!scope.active)
|
|
93
|
+
return 'the whole board';
|
|
94
|
+
const parts = [];
|
|
95
|
+
if (scope.under)
|
|
96
|
+
parts.push(`under ${scope.under.map((issue) => issue.id).join(', ') || 'nothing'}`);
|
|
97
|
+
if (scope.exclude.length)
|
|
98
|
+
parts.push(`not ${scope.exclude.map((issue) => issue.id).join(', ')}`);
|
|
99
|
+
if (scope.types)
|
|
100
|
+
parts.push(scope.types.join('/') || 'no type');
|
|
101
|
+
if (scope.periods)
|
|
102
|
+
parts.push(`in ${[...scope.periods].join(', ') || 'no period'}`);
|
|
103
|
+
return parts.join(' · ');
|
|
104
|
+
}
|
|
105
|
+
/** A squad that has nothing to match — what every call falling through gets. */
|
|
106
|
+
export function emptySquad() {
|
|
107
|
+
return { members: [], unknown: [], active: false };
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Resolve a squad to its current member resource ids.
|
|
111
|
+
*
|
|
112
|
+
* Follows the same "resolve once, ask many times" pattern as `resolveScope`:
|
|
113
|
+
* the result can be cached and reused for every issue in a period. A stale
|
|
114
|
+
* member id is dropped and reported in `unknown` — the "stale scope fails
|
|
115
|
+
* closed" rule — so a squad whose every member has left the roster matches
|
|
116
|
+
* nothing rather than everything.
|
|
117
|
+
*/
|
|
118
|
+
export function resolveSquad(board, squadId) {
|
|
119
|
+
const squad = board.squadsById.get(squadId);
|
|
120
|
+
if (!squad)
|
|
121
|
+
return emptySquad();
|
|
122
|
+
const members = [];
|
|
123
|
+
const unknown = [];
|
|
124
|
+
for (const id of squad.members) {
|
|
125
|
+
if (board.resourcesById.has(id)) {
|
|
126
|
+
members.push(id);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
unknown.push(id);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return { members, unknown, active: members.length > 0 };
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=scope.js.map
|