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,167 @@
|
|
|
1
|
+
import { DERIVED_FLAG } from '../../shared/flag-rollup.js';
|
|
2
|
+
export { DERIVED_FLAG, isDerivedFlag } from '../../shared/flag-rollup.js';
|
|
3
|
+
/** Attribute value kinds a board config may declare. Deliberately small. */
|
|
4
|
+
export const ATTRIBUTE_TYPES = [
|
|
5
|
+
'string',
|
|
6
|
+
'text',
|
|
7
|
+
'int',
|
|
8
|
+
'float',
|
|
9
|
+
'bool',
|
|
10
|
+
'date',
|
|
11
|
+
'enum',
|
|
12
|
+
'array',
|
|
13
|
+
];
|
|
14
|
+
/**
|
|
15
|
+
* The one type the template registry adds to the issue vocabulary: a container
|
|
16
|
+
* that stands in for a level instead of templatizing it.
|
|
17
|
+
*
|
|
18
|
+
* A template of a feature has to sit at the feature's depth, so something has to
|
|
19
|
+
* occupy the epic's level above it — that is a folder. It is never instantiated
|
|
20
|
+
* and it holds nothing but other folders and the roots of templates.
|
|
21
|
+
*
|
|
22
|
+
* The name is reserved across every namespace (`config/schema.ts` refuses it),
|
|
23
|
+
* because the registry reuses the issue types by name and a board declaring its
|
|
24
|
+
* own `folder` would make "which folder?" unanswerable.
|
|
25
|
+
*/
|
|
26
|
+
export const TEMPLATE_FOLDER_TYPE = 'folder';
|
|
27
|
+
/** The definition the registry uses for its one own type. */
|
|
28
|
+
export const TEMPLATE_FOLDER_DEF = {
|
|
29
|
+
label: 'Folder',
|
|
30
|
+
attributes: {},
|
|
31
|
+
body: '',
|
|
32
|
+
};
|
|
33
|
+
export function hasPeriods(config) {
|
|
34
|
+
return Object.keys(config.period_types).length > 0;
|
|
35
|
+
}
|
|
36
|
+
export function hasResources(config) {
|
|
37
|
+
return Object.keys(config.resource_types).length > 0;
|
|
38
|
+
}
|
|
39
|
+
export function hasSquads(config) {
|
|
40
|
+
return Object.keys(config.squad_types).length > 0;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Frontmatter keys owned by light-plan. Custom attributes may not use these.
|
|
44
|
+
* Fields backed by frontmatter keep the snake_case spelling of the key;
|
|
45
|
+
* fields derived at load time (dir, parentId, depth) are camelCase.
|
|
46
|
+
*/
|
|
47
|
+
export const ISSUE_RESERVED_FIELDS = [
|
|
48
|
+
'id',
|
|
49
|
+
'type',
|
|
50
|
+
'title',
|
|
51
|
+
'status',
|
|
52
|
+
'assignee',
|
|
53
|
+
'period',
|
|
54
|
+
'flag',
|
|
55
|
+
'depends_on',
|
|
56
|
+
'relates_to',
|
|
57
|
+
'related_files',
|
|
58
|
+
'created',
|
|
59
|
+
'updated',
|
|
60
|
+
'author',
|
|
61
|
+
];
|
|
62
|
+
export const PERIOD_RESERVED_FIELDS = [
|
|
63
|
+
'id',
|
|
64
|
+
'type',
|
|
65
|
+
'title',
|
|
66
|
+
'starts',
|
|
67
|
+
'ends',
|
|
68
|
+
'active',
|
|
69
|
+
'squad',
|
|
70
|
+
'created',
|
|
71
|
+
'updated',
|
|
72
|
+
'author',
|
|
73
|
+
];
|
|
74
|
+
export const RESOURCE_RESERVED_FIELDS = [
|
|
75
|
+
'id',
|
|
76
|
+
'type',
|
|
77
|
+
'title',
|
|
78
|
+
'capacity',
|
|
79
|
+
'covers',
|
|
80
|
+
'created',
|
|
81
|
+
'updated',
|
|
82
|
+
'author',
|
|
83
|
+
];
|
|
84
|
+
export const TEMPLATE_RESERVED_FIELDS = [
|
|
85
|
+
'id',
|
|
86
|
+
'type',
|
|
87
|
+
'title',
|
|
88
|
+
'description',
|
|
89
|
+
'params',
|
|
90
|
+
'depends_on',
|
|
91
|
+
'relates_to',
|
|
92
|
+
'related_files',
|
|
93
|
+
'created',
|
|
94
|
+
'updated',
|
|
95
|
+
'author',
|
|
96
|
+
];
|
|
97
|
+
export const SQUAD_RESERVED_FIELDS = [
|
|
98
|
+
'id',
|
|
99
|
+
'type',
|
|
100
|
+
'title',
|
|
101
|
+
'members',
|
|
102
|
+
'created',
|
|
103
|
+
'updated',
|
|
104
|
+
'author',
|
|
105
|
+
];
|
|
106
|
+
/**
|
|
107
|
+
* Why an issue somebody is working on has stopped.
|
|
108
|
+
*
|
|
109
|
+
* A flag is not a status: the work stays where it is, in whatever column the
|
|
110
|
+
* board calls "in progress", and the flag says it is not moving. That is
|
|
111
|
+
* deliberate — a board that had to invent a "blocked" column would lose the
|
|
112
|
+
* distinction between "nobody has started this" and "somebody started it and
|
|
113
|
+
* hit a wall", and only the second one needs anyone's attention today.
|
|
114
|
+
*/
|
|
115
|
+
export const FLAG_REASONS = ['blocked', 'paused', 'help'];
|
|
116
|
+
const FLAG_LABELS = {
|
|
117
|
+
blocked: 'Blocked',
|
|
118
|
+
paused: 'Paused',
|
|
119
|
+
help: 'Needs help',
|
|
120
|
+
[DERIVED_FLAG]: 'Stopped inside',
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* A reason a *person* may raise. `DERIVED_FLAG` is deliberately not one: it is
|
|
124
|
+
* the roll-up's word for "something inside this has stopped", and letting
|
|
125
|
+
* somebody type it would make a container's own flag indistinguishable from one
|
|
126
|
+
* the roll-up may clear. `flagIssue` refuses it for that reason.
|
|
127
|
+
*/
|
|
128
|
+
export function isFlagReason(value) {
|
|
129
|
+
return FLAG_REASONS.includes(value);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* A value that may legitimately sit in a document's `flag` field — the reasons
|
|
133
|
+
* a person may raise, plus the one the roll-up writes.
|
|
134
|
+
*
|
|
135
|
+
* A different question from `isFlagReason`, and `check` asks this one: `--fix`
|
|
136
|
+
* writes `DERIVED_FLAG` onto containers, so validating against the raiseable
|
|
137
|
+
* reasons alone would make the repair produce a board that fails the check that
|
|
138
|
+
* asked for it.
|
|
139
|
+
*/
|
|
140
|
+
export function isValidFlag(value) {
|
|
141
|
+
return isFlagReason(value) || value === DERIVED_FLAG;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* The label a flag is shown with, falling back to whatever the file says — a
|
|
145
|
+
* value this version does not know is still printed rather than swallowed.
|
|
146
|
+
*
|
|
147
|
+
* `src/shared/model.ts` carries the same list and the same function for the
|
|
148
|
+
* browser, which imports nothing from core by design. They must agree, or the
|
|
149
|
+
* canvas and `lpm flag list` will call the same flag two different things.
|
|
150
|
+
*/
|
|
151
|
+
export function flagLabel(flag) {
|
|
152
|
+
return FLAG_LABELS[flag] ?? flag;
|
|
153
|
+
}
|
|
154
|
+
export function reservedFieldsFor(kind) {
|
|
155
|
+
if (kind === 'issue')
|
|
156
|
+
return ISSUE_RESERVED_FIELDS;
|
|
157
|
+
if (kind === 'period')
|
|
158
|
+
return PERIOD_RESERVED_FIELDS;
|
|
159
|
+
if (kind === 'resource')
|
|
160
|
+
return RESOURCE_RESERVED_FIELDS;
|
|
161
|
+
return kind === 'template' ? TEMPLATE_RESERVED_FIELDS : SQUAD_RESERVED_FIELDS;
|
|
162
|
+
}
|
|
163
|
+
/** True for the registry's own container type, which is never instantiated. */
|
|
164
|
+
export function isFolderTemplate(node) {
|
|
165
|
+
return node.type === TEMPLATE_FOLDER_TYPE;
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/model/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG1E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ;IACR,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;CACC,CAAC;AAyJX;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AAE7C,6DAA6D;AAC7D,MAAM,CAAC,MAAM,mBAAmB,GAAY;IAC1C,KAAK,EAAE,QAAQ;IACf,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,EAAE;CACT,CAAC;AA4FF,MAAM,UAAU,UAAU,CAAC,MAAmB;IAC5C,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,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U,CAAC;AAInE,MAAM,WAAW,GAA2B;IAC1C,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,YAAY;IAClB,CAAC,YAAY,CAAC,EAAE,gBAAgB;CACjC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAQ,YAAkC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC7D,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,YAAY,CAAC;AACvD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AACnC,CAAC;AAID,MAAM,UAAU,iBAAiB,CAAC,IAAc;IAC9C,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,qBAAqB,CAAC;IACnD,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,sBAAsB,CAAC;IACrD,IAAI,IAAI,KAAK,UAAU;QAAE,OAAO,wBAAwB,CAAC;IACzD,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,qBAAqB,CAAC;AAChF,CAAC;AAsJD,+EAA+E;AAC/E,MAAM,UAAU,gBAAgB,CAAC,IAAsB;IACrD,OAAO,IAAI,CAAC,IAAI,KAAK,oBAAoB,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turn a zod error into `"path: message"` strings, the same format both schema
|
|
3
|
+
* parsers and the view parser use.
|
|
4
|
+
*/
|
|
5
|
+
export function formatZodIssues(error) {
|
|
6
|
+
return error.issues.map((issue) => {
|
|
7
|
+
const where = issue.path.length ? issue.path.join('.') : '(root)';
|
|
8
|
+
return `${where}: ${issue.message}`;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=zod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.js","sourceRoot":"","sources":["../../../src/core/model/zod.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAe;IAC7C,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAChC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;QAClE,OAAO,GAAG,KAAK,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { LoadedBoard } from '../board/load.js';
|
|
2
|
+
import type { AnyNode } from '../model/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* `.lpm/INDEX.md`: every document in the board, with its id, its title and a
|
|
5
|
+
* link to its file, nested exactly the way the folders are.
|
|
6
|
+
*
|
|
7
|
+
* A folder is named after its id and nothing else, so a file tree no longer
|
|
8
|
+
* says what anything is. This is where that went — one generated page a person
|
|
9
|
+
* can read (and a host can render) instead of walking the tree. It is derived
|
|
10
|
+
* state, never board truth: `load` never opens it, and deleting it costs
|
|
11
|
+
* nothing but a `lpm check --fix`.
|
|
12
|
+
*
|
|
13
|
+
* It is rewritten by the operations that can change it rather than on demand,
|
|
14
|
+
* so it is correct on disk the moment an operation returns. Rendering takes the
|
|
15
|
+
* board the operation ran against plus the one thing it did, because a reload
|
|
16
|
+
* costs a great deal more than a render does.
|
|
17
|
+
*/
|
|
18
|
+
/** What an operation just did, so the stale handle it holds can be corrected. */
|
|
19
|
+
export interface IndexChange {
|
|
20
|
+
/** The document as the operation left it — or, when removed, as it was. */
|
|
21
|
+
node: AnyNode;
|
|
22
|
+
/** Its folder before the operation, when the operation moved it. */
|
|
23
|
+
from?: string;
|
|
24
|
+
/** The operation deleted it, and everything nested under it. */
|
|
25
|
+
removed?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The whole index as markdown. Exported so `check` can tell a stale file from a
|
|
29
|
+
* current one without a second idea of what the file should say.
|
|
30
|
+
*/
|
|
31
|
+
export declare function renderBoardIndex(board: LoadedBoard, change?: IndexChange): string;
|
|
32
|
+
/**
|
|
33
|
+
* Rewrite `.lpm/INDEX.md`. Call it after any write that adds, removes, moves or
|
|
34
|
+
* renames.
|
|
35
|
+
*
|
|
36
|
+
* Normally this renders from the board handle the operation ran against plus
|
|
37
|
+
* the one change it made, because a reload costs a great deal more than a render
|
|
38
|
+
* (~450ms against ~1ms) and the handle is right about everything else. When
|
|
39
|
+
* another process has rewritten the index since that handle was loaded, the
|
|
40
|
+
* cheap path would publish a table of contents missing their work, so this falls
|
|
41
|
+
* back to reading the board — including this operation's own write, which is
|
|
42
|
+
* already on disk by the time it is called, which is why the change is dropped
|
|
43
|
+
* on that path rather than applied twice.
|
|
44
|
+
*/
|
|
45
|
+
export declare function writeBoardIndex(board: LoadedBoard, change?: IndexChange): void;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { loadBoard } from '../board/load.js';
|
|
3
|
+
import { sameStamp, stampOf, writeFileAtomic } from '../storage/atomic.js';
|
|
4
|
+
import { collectionDir, documentFileName } from '../storage/paths.js';
|
|
5
|
+
/** Explorer order: `LP-2` before `LP-10`, which plain string order gets wrong. */
|
|
6
|
+
const byName = new Intl.Collator('en', { numeric: true, sensitivity: 'base' });
|
|
7
|
+
function entriesOf(nodes) {
|
|
8
|
+
return nodes.map((node) => ({ id: node.id, title: node.title, dir: node.dir }));
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Correct a collection's entries for an operation the board handle predates.
|
|
12
|
+
* A folder carries its descendants, so a move rewrites their paths too.
|
|
13
|
+
*/
|
|
14
|
+
function withChange(entries, change, kind) {
|
|
15
|
+
if (!change || change.node.kind !== kind)
|
|
16
|
+
return entries;
|
|
17
|
+
const { node, from, removed } = change;
|
|
18
|
+
if (removed) {
|
|
19
|
+
const inside = node.dir + path.sep;
|
|
20
|
+
return entries.filter((entry) => entry.dir !== node.dir && !entry.dir.startsWith(inside));
|
|
21
|
+
}
|
|
22
|
+
let out = entries;
|
|
23
|
+
if (from !== undefined && from !== node.dir) {
|
|
24
|
+
const inside = from + path.sep;
|
|
25
|
+
out = out.map((entry) => entry.dir === from
|
|
26
|
+
? { ...entry, dir: node.dir }
|
|
27
|
+
: entry.dir.startsWith(inside)
|
|
28
|
+
? { ...entry, dir: node.dir + entry.dir.slice(from.length) }
|
|
29
|
+
: entry);
|
|
30
|
+
}
|
|
31
|
+
const fresh = { id: node.id, title: node.title, dir: node.dir };
|
|
32
|
+
const at = out.findIndex((entry) => entry.id === node.id);
|
|
33
|
+
return at === -1
|
|
34
|
+
? [...out, fresh]
|
|
35
|
+
: out.map((entry, index) => (index === at ? fresh : entry));
|
|
36
|
+
}
|
|
37
|
+
/** A title is one line here whatever the frontmatter said, so a row stays a row. */
|
|
38
|
+
function oneLine(text) {
|
|
39
|
+
return text.replace(/\s+/g, ' ').trim();
|
|
40
|
+
}
|
|
41
|
+
function link(lpmDir, dir, kind) {
|
|
42
|
+
const file = path.join(dir, documentFileName(kind));
|
|
43
|
+
return path.relative(lpmDir, file).split(path.sep).join('/');
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* One collection as a nested list. Parenting comes from the paths themselves —
|
|
47
|
+
* a folder whose parent is not a document of this collection is drawn at the
|
|
48
|
+
* top, which is the forgiving reading `load` takes of the same tree.
|
|
49
|
+
*/
|
|
50
|
+
function renderSection(entries, root, kind, lpmDir) {
|
|
51
|
+
const dirs = new Set(entries.map((entry) => entry.dir));
|
|
52
|
+
const children = new Map();
|
|
53
|
+
for (const entry of entries) {
|
|
54
|
+
const parent = path.dirname(entry.dir);
|
|
55
|
+
const under = dirs.has(parent) ? parent : root;
|
|
56
|
+
const siblings = children.get(under);
|
|
57
|
+
if (siblings)
|
|
58
|
+
siblings.push(entry);
|
|
59
|
+
else
|
|
60
|
+
children.set(under, [entry]);
|
|
61
|
+
}
|
|
62
|
+
for (const siblings of children.values()) {
|
|
63
|
+
siblings.sort((a, b) => byName.compare(path.basename(a.dir), path.basename(b.dir)));
|
|
64
|
+
}
|
|
65
|
+
const lines = [];
|
|
66
|
+
const walk = (under, depth) => {
|
|
67
|
+
for (const entry of children.get(under) ?? []) {
|
|
68
|
+
const indent = ' '.repeat(depth);
|
|
69
|
+
lines.push(`${indent}- [${entry.id}](${link(lpmDir, entry.dir, kind)}) — ${oneLine(entry.title)}`);
|
|
70
|
+
walk(entry.dir, depth + 1);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
walk(root, 0);
|
|
74
|
+
return lines;
|
|
75
|
+
}
|
|
76
|
+
const SECTIONS = [
|
|
77
|
+
{ kind: 'issue', heading: 'Issues', of: (board) => board.issues },
|
|
78
|
+
{ kind: 'period', heading: 'Timeline', of: (board) => board.periods },
|
|
79
|
+
{ kind: 'resource', heading: 'Team', of: (board) => board.resources },
|
|
80
|
+
{ kind: 'squad', heading: 'Squads', of: (board) => board.squads },
|
|
81
|
+
{ kind: 'template', heading: 'Registry', of: (board) => board.templates },
|
|
82
|
+
];
|
|
83
|
+
/**
|
|
84
|
+
* The whole index as markdown. Exported so `check` can tell a stale file from a
|
|
85
|
+
* current one without a second idea of what the file should say.
|
|
86
|
+
*/
|
|
87
|
+
export function renderBoardIndex(board, change) {
|
|
88
|
+
const { paths } = board;
|
|
89
|
+
const out = [
|
|
90
|
+
'# Board index',
|
|
91
|
+
'',
|
|
92
|
+
'<!-- Generated by light-plan. Every document in this board, nested as its',
|
|
93
|
+
' folders are. Rewritten on every change; edits here are overwritten. -->',
|
|
94
|
+
];
|
|
95
|
+
for (const section of SECTIONS) {
|
|
96
|
+
const entries = withChange(entriesOf(section.of(board)), change, section.kind);
|
|
97
|
+
if (!entries.length)
|
|
98
|
+
continue;
|
|
99
|
+
const root = collectionDir(paths, section.kind);
|
|
100
|
+
out.push('', `## ${section.heading}`, '');
|
|
101
|
+
out.push(...renderSection(entries, root, section.kind, paths.lpmDir));
|
|
102
|
+
}
|
|
103
|
+
if (out.length === 4)
|
|
104
|
+
out.push('', 'This board has no documents yet.');
|
|
105
|
+
return out.join('\n') + '\n';
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Whether the index on disk is the one this handle's contents belong to.
|
|
109
|
+
*
|
|
110
|
+
* The incremental render is "these documents, plus the one thing I did", and
|
|
111
|
+
* that is only the whole truth while nobody else has written since. On a shared
|
|
112
|
+
* checkout somebody may have created three issues in between, and rendering
|
|
113
|
+
* from this handle would drop all three — the index is the one file where a
|
|
114
|
+
* lost update costs the *rest* of the board rather than one document.
|
|
115
|
+
*/
|
|
116
|
+
function indexIsOurs(board) {
|
|
117
|
+
const expected = board.stamps.get(board.paths.indexPath);
|
|
118
|
+
const actual = stampOf(board.paths.indexPath);
|
|
119
|
+
if (!expected)
|
|
120
|
+
return actual === null;
|
|
121
|
+
return actual !== null && sameStamp(expected, actual);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Rewrite `.lpm/INDEX.md`. Call it after any write that adds, removes, moves or
|
|
125
|
+
* renames.
|
|
126
|
+
*
|
|
127
|
+
* Normally this renders from the board handle the operation ran against plus
|
|
128
|
+
* the one change it made, because a reload costs a great deal more than a render
|
|
129
|
+
* (~450ms against ~1ms) and the handle is right about everything else. When
|
|
130
|
+
* another process has rewritten the index since that handle was loaded, the
|
|
131
|
+
* cheap path would publish a table of contents missing their work, so this falls
|
|
132
|
+
* back to reading the board — including this operation's own write, which is
|
|
133
|
+
* already on disk by the time it is called, which is why the change is dropped
|
|
134
|
+
* on that path rather than applied twice.
|
|
135
|
+
*/
|
|
136
|
+
export function writeBoardIndex(board, change) {
|
|
137
|
+
const { indexPath } = board.paths;
|
|
138
|
+
const [source, applied] = indexIsOurs(board)
|
|
139
|
+
? [board, change]
|
|
140
|
+
: [loadBoard(board.paths, board.cache ? { cache: board.cache } : undefined), undefined];
|
|
141
|
+
writeFileAtomic(indexPath, renderBoardIndex(source, applied));
|
|
142
|
+
// So a second write in the same operation still takes the cheap path.
|
|
143
|
+
const stamp = stampOf(indexPath);
|
|
144
|
+
if (stamp)
|
|
145
|
+
board.stamps.set(indexPath, stamp);
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=board-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board-index.js","sourceRoot":"","sources":["../../../src/core/operations/board-index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAkCtE,kFAAkF;AAClF,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC;AAE/E,SAAS,SAAS,CAAC,KAA0B;IAC3C,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AAClF,CAAC;AAED;;;GAGG;AACH,SAAS,UAAU,CAAC,OAAgB,EAAE,MAA+B,EAAE,IAAc;IACnF,IAAI,CAAC,MAAM,IAAI,MAAM,CA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AC;IAE1F,eAAe,CAAC,SAAS,EAAE,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAE9D,sEAAsE;IACtE,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,IAAI,KAAK;QAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { LoadedBoard } from '../board/load.js';
|
|
2
|
+
import type { Issue, Resource } from '../model/types.js';
|
|
3
|
+
import type { MoveResult } from './move.js';
|
|
4
|
+
/**
|
|
5
|
+
* Claiming an issue: the one operation that is a test-and-set.
|
|
6
|
+
*
|
|
7
|
+
* Everything else on a board is somebody stating an intention — a title, a
|
|
8
|
+
* dependency, a sprint. This is the one place where two people can want the
|
|
9
|
+
* same thing and only one of them can have it, so "read the board, decide,
|
|
10
|
+
* write" is not good enough: two agents on one checkout both load the board,
|
|
11
|
+
* both see `LP-12` waiting in the pool they cover, and both write their own name
|
|
12
|
+
* on it. The board then says one thing and the two agents believe another, and
|
|
13
|
+
* the work is done twice.
|
|
14
|
+
*
|
|
15
|
+
* So a claim is not `moveNode` with an assignee. It is:
|
|
16
|
+
*
|
|
17
|
+
* 1. take the board lock, so nobody else is mid-write;
|
|
18
|
+
* 2. **re-read the board**, because the handle the caller is holding was loaded
|
|
19
|
+
* before the lock and may already be out of date;
|
|
20
|
+
* 3. check the issue is still free *as it stands on disk* — and refuse if it is
|
|
21
|
+
* not, naming who has it;
|
|
22
|
+
* 4. only then write.
|
|
23
|
+
*
|
|
24
|
+
* Step 2 is what makes this different from every other operation, and it is why
|
|
25
|
+
* this one takes the cost of a reload. Elsewhere a stale handle is *detected*
|
|
26
|
+
* (`requireUnchanged`) and the caller is told to read again; here the caller is
|
|
27
|
+
* a queue runner picking work, and "read again" is something this can do for
|
|
28
|
+
* itself in the same breath.
|
|
29
|
+
*
|
|
30
|
+
* The claim is recorded in the document itself and not only in the frontmatter:
|
|
31
|
+
* an entry goes in the activity section, so the `_issue.md` a person opens in a
|
|
32
|
+
* file tree says who took it and when, and so the git history of the board
|
|
33
|
+
* carries the same fact. `assignee` plus an active status is what withholds the
|
|
34
|
+
* issue from everybody else's queue — `candidatesFor` skips work in an active
|
|
35
|
+
* status and routes the rest by assignee — so writing them *is* the claim, and
|
|
36
|
+
* the activity entry is how a reader finds out about it.
|
|
37
|
+
*
|
|
38
|
+
* What this does not do: it is not permission. `--force` takes work off
|
|
39
|
+
* somebody, exactly as it did before, because light-plan routes work and does
|
|
40
|
+
* not police it — the point is that taking it is now a deliberate act with a
|
|
41
|
+
* line in the document, rather than the accident of writing last.
|
|
42
|
+
*/
|
|
43
|
+
export interface ClaimInput {
|
|
44
|
+
/** Who is taking it: a resource id or name. */
|
|
45
|
+
assignee: string;
|
|
46
|
+
/**
|
|
47
|
+
* The status to move it into. Defaults to the board's first active status,
|
|
48
|
+
* which is what "picked up" means everywhere else.
|
|
49
|
+
*/
|
|
50
|
+
status?: string;
|
|
51
|
+
/** Take it even though somebody else holds it. */
|
|
52
|
+
force?: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface ClaimResult extends MoveResult {
|
|
55
|
+
issue: Issue;
|
|
56
|
+
/** The resource that now holds it. */
|
|
57
|
+
holder: Resource;
|
|
58
|
+
/** Who it was taken off, when `force` took it off somebody. */
|
|
59
|
+
takenFrom?: string;
|
|
60
|
+
/** The issue was already this resource's, in this status — nothing changed. */
|
|
61
|
+
alreadyHeld: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Claim an issue for a resource, atomically.
|
|
65
|
+
*
|
|
66
|
+
* `target` is only used for its id: the issue this actually writes is the one
|
|
67
|
+
* on disk at the moment the lock is held.
|
|
68
|
+
*/
|
|
69
|
+
export declare function claimIssue(board: LoadedBoard, target: Issue, input: ClaimInput): ClaimResult;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { loadBoard } from '../board/load.js';
|
|
2
|
+
import { findIssue, isGenericResource } from '../board/query.js';
|
|
3
|
+
import { isActiveStatus, isTerminalStatus, startStatusId } from '../config/lookup.js';
|
|
4
|
+
import { BoardError, ConflictError } from '../errors.js';
|
|
5
|
+
import { appendActivityEntry } from '../storage/activity.js';
|
|
6
|
+
import { nowIso } from '../storage/document.js';
|
|
7
|
+
import { moveNode } from './move.js';
|
|
8
|
+
import { boardWrite, requireResource } from './shared.js';
|
|
9
|
+
/**
|
|
10
|
+
* Whether `holder` may take an issue that currently sits with `current` without
|
|
11
|
+
* saying `--force`.
|
|
12
|
+
*
|
|
13
|
+
* Work parked in a pool is *waiting* for whoever covers the pool, so picking it
|
|
14
|
+
* up is the ordinary path and not a theft. Work with somebody's name on it is
|
|
15
|
+
* theirs. This is the rule both `lpm task start` and MCP `start_task` used to
|
|
16
|
+
* carry separately, and they did not agree: the CLI let a pool be drawn from and
|
|
17
|
+
* the MCP tool refused. One definition, so a person and an agent working the
|
|
18
|
+
* same board are offered the same deal.
|
|
19
|
+
*/
|
|
20
|
+
function mayTake(board, holder, current) {
|
|
21
|
+
if (current === holder.id)
|
|
22
|
+
return true;
|
|
23
|
+
const owner = board.resourcesById.get(current);
|
|
24
|
+
return Boolean(owner && isGenericResource(board, owner) && holder.covers.includes(current));
|
|
25
|
+
}
|
|
26
|
+
function heldError(board, issue, holder) {
|
|
27
|
+
const owner = issue.assignee ? board.resourcesById.get(issue.assignee) : null;
|
|
28
|
+
const name = owner ? `${owner.title} (${owner.id})` : issue.assignee;
|
|
29
|
+
const active = isActiveStatus(board.config, issue.status);
|
|
30
|
+
return new ConflictError(`${issue.id} is already ${active ? 'being worked on by' : 'assigned to'} ${name}`, [
|
|
31
|
+
// Read off disk a moment ago, which is the point: whoever is reading this
|
|
32
|
+
// lost the race rather than asked for something impossible.
|
|
33
|
+
`It is "${issue.status}" on the board as it stands now, and ${holder.title} (${holder.id}) is asking for it.`,
|
|
34
|
+
active
|
|
35
|
+
? 'Force takes it off somebody who is part-way through it. Take something else instead.'
|
|
36
|
+
: 'Force takes it anyway, if you know it is not being worked on.',
|
|
37
|
+
]);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Claim an issue for a resource, atomically.
|
|
41
|
+
*
|
|
42
|
+
* `target` is only used for its id: the issue this actually writes is the one
|
|
43
|
+
* on disk at the moment the lock is held.
|
|
44
|
+
*/
|
|
45
|
+
export function claimIssue(board, target, input) {
|
|
46
|
+
return boardWrite(board, `claim ${target.id}`, () => claimUnderLock(board, target, input));
|
|
47
|
+
}
|
|
48
|
+
function claimUnderLock(board, target, input) {
|
|
49
|
+
// The board as it is *now*, not as the caller read it. Everything below —
|
|
50
|
+
// who holds the issue, what status it is in, what its body says — has to come
|
|
51
|
+
// from this handle, or the check and the write would be about different
|
|
52
|
+
// versions of the same document.
|
|
53
|
+
const fresh = loadBoard(board.paths, board.cache ? { cache: board.cache } : undefined);
|
|
54
|
+
const issue = findIssue(fresh, target.id);
|
|
55
|
+
if (!issue) {
|
|
56
|
+
throw new ConflictError(`${target.id} is no longer on the board`, [
|
|
57
|
+
'It was deleted while you were reading. Ask for the next task.',
|
|
58
|
+
]);
|
|
59
|
+
}
|
|
60
|
+
const holder = requireResource(fresh, input.assignee);
|
|
61
|
+
const status = input.status ?? startStatusId(fresh.config);
|
|
62
|
+
if (!status) {
|
|
63
|
+
throw new BoardError('This board declares no active status', [
|
|
64
|
+
'Mark one of the statuses in .lpm/config.yml with `active: true`.',
|
|
65
|
+
]);
|
|
66
|
+
}
|
|
67
|
+
if (isTerminalStatus(fresh.config, issue.status)) {
|
|
68
|
+
throw new BoardError(`${issue.id} is already "${issue.status}"`, [
|
|
69
|
+
'Reopen it first if the work is not actually done.',
|
|
70
|
+
]);
|
|
71
|
+
}
|
|
72
|
+
let takenFrom;
|
|
73
|
+
if (issue.assignee && !mayTake(fresh, holder, issue.assignee)) {
|
|
74
|
+
if (!input.force)
|
|
75
|
+
throw heldError(fresh, issue, holder);
|
|
76
|
+
takenFrom = issue.assignee;
|
|
77
|
+
}
|
|
78
|
+
const alreadyHeld = issue.assignee === holder.id && issue.status === status;
|
|
79
|
+
if (alreadyHeld) {
|
|
80
|
+
return {
|
|
81
|
+
node: issue,
|
|
82
|
+
issue,
|
|
83
|
+
holder,
|
|
84
|
+
alreadyHeld: true,
|
|
85
|
+
statusChanged: false,
|
|
86
|
+
periodChanged: false,
|
|
87
|
+
assigneeChanged: false,
|
|
88
|
+
rollups: [],
|
|
89
|
+
flagRollups: [],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
// The claim, written into the document a person reads as well as the
|
|
93
|
+
// frontmatter a tool reads. `moveNode` does the rest — the status, the
|
|
94
|
+
// assignee, and carrying a reopened container up the tree — and it re-checks
|
|
95
|
+
// the file against this handle's stamp on the way in, which is the second
|
|
96
|
+
// line of defence if the lock was ever broken underneath us.
|
|
97
|
+
const claimed = {
|
|
98
|
+
...issue,
|
|
99
|
+
body: appendActivityEntry(issue.body, {
|
|
100
|
+
at: nowIso(),
|
|
101
|
+
author: `${holder.title} (${holder.id})`,
|
|
102
|
+
heading: takenFrom ? `claimed — taken from ${takenFrom}` : 'claimed',
|
|
103
|
+
text: '',
|
|
104
|
+
}),
|
|
105
|
+
};
|
|
106
|
+
const result = moveNode(fresh, claimed, { assignee: holder.id, status });
|
|
107
|
+
return {
|
|
108
|
+
...result,
|
|
109
|
+
issue: result.node,
|
|
110
|
+
holder,
|
|
111
|
+
alreadyHeld: false,
|
|
112
|
+
...(takenFrom ? { takenFrom } : {}),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=claim.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claim.js","sourceRoot":"","sources":["../../../src/core/operations/claim.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,M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AE;YACZ,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC,EAAE,GAAG;YACxC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,wBAAwB,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS;YACpE,IAAI,EAAE,EAAE;SACT,CAAC;KACH,CAAC;IAEF,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACzE,OAAO;QACL,GAAG,MAAM;QACT,KAAK,EAAE,MAAM,CAAC,IAAa;QAC3B,MAAM;QACN,WAAW,EAAE,KAAK;QAClB,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACpC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { LoadedBoard } from '../board/load.js';
|
|
2
|
+
import type { AnyNode } from '../model/types.js';
|
|
3
|
+
import type { Comment } from '../storage/comments.js';
|
|
4
|
+
/**
|
|
5
|
+
* Commenting on a document.
|
|
6
|
+
*
|
|
7
|
+
* The narrative half of a board: what was tried, what broke, what a reviewer
|
|
8
|
+
* asked for. Kept separate from the document's own body, which describes what
|
|
9
|
+
* the work *is* rather than how it went — and separate from the frontmatter,
|
|
10
|
+
* which is the part tools read.
|
|
11
|
+
*
|
|
12
|
+
* Nothing here validates the board, because a comment cannot make one invalid.
|
|
13
|
+
*/
|
|
14
|
+
export interface CommentInput {
|
|
15
|
+
body: string;
|
|
16
|
+
/** Defaults to the git identity of the checkout. */
|
|
17
|
+
author?: string;
|
|
18
|
+
/** Defaults to now. Accepted so an importer can preserve history. */
|
|
19
|
+
at?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface CommentResult {
|
|
22
|
+
node: AnyNode;
|
|
23
|
+
comment: Comment;
|
|
24
|
+
/** How many the document has now. */
|
|
25
|
+
total: number;
|
|
26
|
+
}
|
|
27
|
+
export declare function addComment(board: LoadedBoard, id: string, input: CommentInput): CommentResult;
|
|
28
|
+
export declare function listComments(board: LoadedBoard, id: string): Comment[];
|
|
29
|
+
/** Delete one comment by its position. Numbering starts at 1. */
|
|
30
|
+
export declare function removeComment(board: LoadedBoard, id: string, index: number): Comment;
|