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,133 @@
|
|
|
1
|
+
import { appendFileSync, readFileSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { writeFileAtomic } from './atomic.js';
|
|
4
|
+
import { CREDENTIALS_FILE, LOCAL_FILE, LOCK_FILE, expandHome } from './paths.js';
|
|
5
|
+
const EMPTY = { user: null, profile: null };
|
|
6
|
+
/** Overrides the stored user; handy for CI and shared machines. */
|
|
7
|
+
export const USER_ENV_VAR = 'LPM_USER';
|
|
8
|
+
/** Overrides the stored profile path, for a shell that serves one developer. */
|
|
9
|
+
export const PROFILE_ENV_VAR = 'LPM_PROFILE';
|
|
10
|
+
function text(value) {
|
|
11
|
+
return typeof value === 'string' && value.trim() ? value.trim() : null;
|
|
12
|
+
}
|
|
13
|
+
export function readLocal(paths) {
|
|
14
|
+
try {
|
|
15
|
+
const parsed = JSON.parse(readFileSync(paths.localPath, 'utf8'));
|
|
16
|
+
return { user: text(parsed.user), profile: text(parsed.profile) };
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return { ...EMPTY };
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export function writeLocal(paths, settings) {
|
|
23
|
+
writeFileAtomic(paths.localPath, `${JSON.stringify(settings, null, 2)}\n`);
|
|
24
|
+
ensureLocalIgnored(paths);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Whoever the CLI should act as, as written (an id or a name — the caller
|
|
28
|
+
* resolves it against the roster). The environment wins over the stored value.
|
|
29
|
+
*/
|
|
30
|
+
export function currentUserRef(paths) {
|
|
31
|
+
const fromEnv = process.env[USER_ENV_VAR]?.trim();
|
|
32
|
+
if (fromEnv)
|
|
33
|
+
return fromEnv;
|
|
34
|
+
return readLocal(paths).user;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The profile file to use, as written, and where that answer came from. The
|
|
38
|
+
* environment wins, so one shell can serve a different developer than the
|
|
39
|
+
* checkout is set up for.
|
|
40
|
+
*/
|
|
41
|
+
export function profileRef(paths) {
|
|
42
|
+
const fromEnv = process.env[PROFILE_ENV_VAR]?.trim();
|
|
43
|
+
if (fromEnv)
|
|
44
|
+
return { ref: fromEnv, source: 'env' };
|
|
45
|
+
const stored = readLocal(paths).profile;
|
|
46
|
+
return stored ? { ref: stored, source: 'local' } : null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A stored path, made absolute. `~` is expanded because a profile is a file a
|
|
50
|
+
* developer keeps in their home directory as often as in the repository, and
|
|
51
|
+
* anything relative is resolved against the board root rather than the cwd, so
|
|
52
|
+
* `lpm` gives the same answer from any folder in the checkout.
|
|
53
|
+
*/
|
|
54
|
+
export function resolveProfilePath(paths, ref) {
|
|
55
|
+
return path.resolve(paths.root, expandHome(ref));
|
|
56
|
+
}
|
|
57
|
+
/** Pattern for credential files under `.lpm/remotes/` — never commit these. */
|
|
58
|
+
const CREDENTIALS_PATTERN = 'remotes/*/credentials*';
|
|
59
|
+
/**
|
|
60
|
+
* The entries `.lpm/.gitignore` must carry, each with the comment that
|
|
61
|
+
* precedes it. One source of truth so the heal (`ensureLocalIgnored`) and the
|
|
62
|
+
* check (`checkGitignore`) cannot drift about what belongs in the file.
|
|
63
|
+
*/
|
|
64
|
+
const IGNORED_ENTRIES = [
|
|
65
|
+
{ comment: '# Per-checkout settings (current user)', entries: [LOCAL_FILE] },
|
|
66
|
+
{
|
|
67
|
+
comment: '# Remote credentials (never commit these)',
|
|
68
|
+
entries: [CREDENTIALS_FILE, CREDENTIALS_PATTERN],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
comment: '# Write lock, held only while a change is in flight',
|
|
72
|
+
entries: [LOCK_FILE, `${LOCK_FILE}.stale.*`],
|
|
73
|
+
},
|
|
74
|
+
];
|
|
75
|
+
/** The trimmed lines of `.lpm/.gitignore`, or [] when the file is absent. */
|
|
76
|
+
function gitignoreLines(paths) {
|
|
77
|
+
try {
|
|
78
|
+
return readFileSync(path.join(paths.lpmDir, '.gitignore'), 'utf8')
|
|
79
|
+
.split(/\r?\n/)
|
|
80
|
+
.map((line) => line.trim());
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The ignore entries this board's `.lpm/.gitignore` is still missing, in the
|
|
88
|
+
* order they should appear. The read-only half of `ensureLocalIgnored`; the
|
|
89
|
+
* check reports from this, and the fix calls the writer.
|
|
90
|
+
*/
|
|
91
|
+
export function missingIgnoredEntries(paths) {
|
|
92
|
+
const lines = gitignoreLines(paths);
|
|
93
|
+
const missing = [];
|
|
94
|
+
for (const group of IGNORED_ENTRIES) {
|
|
95
|
+
for (const entry of group.entries) {
|
|
96
|
+
if (!lines.includes(entry))
|
|
97
|
+
missing.push(entry);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return missing;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Add `local.json`, the credentials file, the write lock and remote credential
|
|
104
|
+
* patterns to `.lpm/.gitignore`. Returns true if the file changed.
|
|
105
|
+
*/
|
|
106
|
+
export function ensureLocalIgnored(paths) {
|
|
107
|
+
const file = path.join(paths.lpmDir, '.gitignore');
|
|
108
|
+
let text = '';
|
|
109
|
+
try {
|
|
110
|
+
text = readFileSync(file, 'utf8');
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
// No .gitignore in the board yet; we create it below.
|
|
114
|
+
}
|
|
115
|
+
const lines = text.split(/\r?\n/).map((l) => l.trim());
|
|
116
|
+
const additions = [];
|
|
117
|
+
for (const group of IGNORED_ENTRIES) {
|
|
118
|
+
const missing = group.entries.filter((entry) => !lines.includes(entry));
|
|
119
|
+
if (missing.length === 0)
|
|
120
|
+
continue;
|
|
121
|
+
// A group written over two versions should not grow a second heading: the
|
|
122
|
+
// comment is only added when it is not already in the file.
|
|
123
|
+
if (!lines.includes(group.comment))
|
|
124
|
+
additions.push(group.comment);
|
|
125
|
+
additions.push(...missing, '');
|
|
126
|
+
}
|
|
127
|
+
if (additions.length === 0)
|
|
128
|
+
return false;
|
|
129
|
+
const separator = text === '' ? '' : text.endsWith('\n') ? '' : '\n';
|
|
130
|
+
appendFileSync(file, `${separator}${additions.join('\n')}`, 'utf8');
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=local.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../../src/core/storage/local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAmBjF,MAAM,KAAK,GAAkB,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAE3D,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AACvC,gFAAgF;AAChF,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;AAE7C,SAAS,IAAI,CAAC,KAAc;IAC1B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAiB;IACzC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAA2B,CAAC;QAC3F,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IACpE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC;IACtB,CAAC;AACH,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a time, across processes.
|
|
4
|
+
*
|
|
5
|
+
* `atomic.ts` stops a reader seeing half a document. This stops two writers
|
|
6
|
+
* taking turns *inside* one another — the read-modify-write that every
|
|
7
|
+
* operation is. Without it two agents both load the board, both see `LP-12`
|
|
8
|
+
* unassigned, both write it, and the second one wins with no trace that the
|
|
9
|
+
* first ever claimed anything. With it they queue, and the loser reads what the
|
|
10
|
+
* winner wrote before deciding what to do (`operations/claim.ts` is the worked
|
|
11
|
+
* example).
|
|
12
|
+
*
|
|
13
|
+
* It is a file, because the board is a folder and there is nothing else to be:
|
|
14
|
+
* `.lpm/lock`, created with `O_EXCL` so exactly one process can make it, holding
|
|
15
|
+
* a JSON record of who has it and what they are doing. Git-ignored, like
|
|
16
|
+
* `local.json` — which process is mid-write is not a property of the plan.
|
|
17
|
+
* Nothing here writes that `.gitignore` entry: `init` puts it there and `check`
|
|
18
|
+
* reports a board that predates it, which is where derived, repairable state
|
|
19
|
+
* belongs. A lock primitive with a side effect on the repository would be a
|
|
20
|
+
* surprise in the one place a surprise is least affordable.
|
|
21
|
+
*
|
|
22
|
+
* Four things it has to get right:
|
|
23
|
+
*
|
|
24
|
+
* **Held for the write, never for the work.** An agent may spend twenty minutes
|
|
25
|
+
* on a task; it holds the lock for the milliseconds it takes to record that it
|
|
26
|
+
* started. A lock scoped to anything longer would be a queue of one.
|
|
27
|
+
*
|
|
28
|
+
* **Re-entrant.** Operations call each other — `flagIssue` writes a document and
|
|
29
|
+
* then a comment, `claimIssue` delegates to `moveNode` — so a nested acquire by
|
|
30
|
+
* the same process counts up rather than deadlocking.
|
|
31
|
+
*
|
|
32
|
+
* **A dead holder does not stop the board — but a live one is never robbed.**
|
|
33
|
+
* A process killed mid-operation would otherwise leave its lock behind, and a
|
|
34
|
+
* plan nobody can write to because of a crash last Tuesday is worse than the
|
|
35
|
+
* race. The cheap answer to that is "break a lock whose pid is not running",
|
|
36
|
+
* and it is wrong: see `isStale`, which is where the hard-won half of this file
|
|
37
|
+
* lives. Instead an interrupted process gives the lock up on its way out
|
|
38
|
+
* (`releaseOnExit`), and a lock is only ever broken for being *old*.
|
|
39
|
+
*
|
|
40
|
+
* **Say what it does not do.** Breaking a stale lock cannot be made perfectly
|
|
41
|
+
* safe without a filesystem primitive nobody has: two processes can decide the
|
|
42
|
+
* same lock is dead, and the second may unlink a lock a third has just taken.
|
|
43
|
+
* The rename-then-delete below makes the *breaker* unique, and the token
|
|
44
|
+
* check-back makes a robbed holder notice — but the real backstop is the stamp
|
|
45
|
+
* check in `operations/shared.ts`, which refuses a write whose document moved
|
|
46
|
+
* underneath it whether or not the lock behaved. Two lines of defence, because
|
|
47
|
+
* this one is advisory: nothing stops a text editor writing `_issue.md`.
|
|
48
|
+
*/
|
|
49
|
+
/** How long to wait for another process before giving up. */
|
|
50
|
+
export declare const LOCK_TIMEOUT_ENV = "LPM_LOCK_TIMEOUT_MS";
|
|
51
|
+
/** How old a lock has to be before it is assumed to be a crash. */
|
|
52
|
+
export declare const LOCK_STALE_ENV = "LPM_LOCK_STALE_MS";
|
|
53
|
+
/**
|
|
54
|
+
* Skip locking entirely. The escape hatch for a filesystem where `O_EXCL` does
|
|
55
|
+
* not mean what it says — some network mounts — on which every command would
|
|
56
|
+
* otherwise fail. It removes the first line of defence and leaves the second:
|
|
57
|
+
* a stale write is still refused. Documented rather than hidden, for the same
|
|
58
|
+
* reason `--unsafe` is.
|
|
59
|
+
*/
|
|
60
|
+
export declare const LOCK_DISABLE_ENV = "LPM_NO_LOCK";
|
|
61
|
+
/** Who holds the lock, and what they are doing with it. */
|
|
62
|
+
export interface LockHolder {
|
|
63
|
+
pid: number;
|
|
64
|
+
host: string;
|
|
65
|
+
/** The account the process runs as, so a message names somebody. */
|
|
66
|
+
user: string;
|
|
67
|
+
/** What it is doing — "claim LP-12", "push 14 changes". */
|
|
68
|
+
op: string;
|
|
69
|
+
/** ISO timestamp of the acquisition. */
|
|
70
|
+
at: string;
|
|
71
|
+
/**
|
|
72
|
+
* Random token for this acquisition. A holder writes it and reads it back,
|
|
73
|
+
* which is how it finds out that somebody broke its lock and took over.
|
|
74
|
+
*/
|
|
75
|
+
nonce: string;
|
|
76
|
+
}
|
|
77
|
+
/** Read the record of whoever holds the lock, or null when there is nothing readable. */
|
|
78
|
+
export declare function readLockHolder(file: string): LockHolder | null;
|
|
79
|
+
/**
|
|
80
|
+
* Run `fn` as the board's only writer.
|
|
81
|
+
*
|
|
82
|
+
* `op` is what to tell whoever is waiting — short, and naming the document when
|
|
83
|
+
* there is one ("claim LP-12" reads better than "moveNode").
|
|
84
|
+
*/
|
|
85
|
+
export declare function withBoardLock<T>(paths: BoardPaths, op: string, fn: () => T): T;
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { randomBytes } from 'node:crypto';
|
|
2
|
+
import { closeSync, mkdirSync, openSync, readFileSync, renameSync, rmSync, writeSync } from 'node:fs';
|
|
3
|
+
import { hostname, userInfo } from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { BoardError } from '../errors.js';
|
|
6
|
+
import { sleepSync } from './atomic.js';
|
|
7
|
+
/**
|
|
8
|
+
* The board lock: one writer at a time, across processes.
|
|
9
|
+
*
|
|
10
|
+
* `atomic.ts` stops a reader seeing half a document. This stops two writers
|
|
11
|
+
* taking turns *inside* one another — the read-modify-write that every
|
|
12
|
+
* operation is. Without it two agents both load the board, both see `LP-12`
|
|
13
|
+
* unassigned, both write it, and the second one wins with no trace that the
|
|
14
|
+
* first ever claimed anything. With it they queue, and the loser reads what the
|
|
15
|
+
* winner wrote before deciding what to do (`operations/claim.ts` is the worked
|
|
16
|
+
* example).
|
|
17
|
+
*
|
|
18
|
+
* It is a file, because the board is a folder and there is nothing else to be:
|
|
19
|
+
* `.lpm/lock`, created with `O_EXCL` so exactly one process can make it, holding
|
|
20
|
+
* a JSON record of who has it and what they are doing. Git-ignored, like
|
|
21
|
+
* `local.json` — which process is mid-write is not a property of the plan.
|
|
22
|
+
* Nothing here writes that `.gitignore` entry: `init` puts it there and `check`
|
|
23
|
+
* reports a board that predates it, which is where derived, repairable state
|
|
24
|
+
* belongs. A lock primitive with a side effect on the repository would be a
|
|
25
|
+
* surprise in the one place a surprise is least affordable.
|
|
26
|
+
*
|
|
27
|
+
* Four things it has to get right:
|
|
28
|
+
*
|
|
29
|
+
* **Held for the write, never for the work.** An agent may spend twenty minutes
|
|
30
|
+
* on a task; it holds the lock for the milliseconds it takes to record that it
|
|
31
|
+
* started. A lock scoped to anything longer would be a queue of one.
|
|
32
|
+
*
|
|
33
|
+
* **Re-entrant.** Operations call each other — `flagIssue` writes a document and
|
|
34
|
+
* then a comment, `claimIssue` delegates to `moveNode` — so a nested acquire by
|
|
35
|
+
* the same process counts up rather than deadlocking.
|
|
36
|
+
*
|
|
37
|
+
* **A dead holder does not stop the board — but a live one is never robbed.**
|
|
38
|
+
* A process killed mid-operation would otherwise leave its lock behind, and a
|
|
39
|
+
* plan nobody can write to because of a crash last Tuesday is worse than the
|
|
40
|
+
* race. The cheap answer to that is "break a lock whose pid is not running",
|
|
41
|
+
* and it is wrong: see `isStale`, which is where the hard-won half of this file
|
|
42
|
+
* lives. Instead an interrupted process gives the lock up on its way out
|
|
43
|
+
* (`releaseOnExit`), and a lock is only ever broken for being *old*.
|
|
44
|
+
*
|
|
45
|
+
* **Say what it does not do.** Breaking a stale lock cannot be made perfectly
|
|
46
|
+
* safe without a filesystem primitive nobody has: two processes can decide the
|
|
47
|
+
* same lock is dead, and the second may unlink a lock a third has just taken.
|
|
48
|
+
* The rename-then-delete below makes the *breaker* unique, and the token
|
|
49
|
+
* check-back makes a robbed holder notice — but the real backstop is the stamp
|
|
50
|
+
* check in `operations/shared.ts`, which refuses a write whose document moved
|
|
51
|
+
* underneath it whether or not the lock behaved. Two lines of defence, because
|
|
52
|
+
* this one is advisory: nothing stops a text editor writing `_issue.md`.
|
|
53
|
+
*/
|
|
54
|
+
/** How long to wait for another process before giving up. */
|
|
55
|
+
export const LOCK_TIMEOUT_ENV = 'LPM_LOCK_TIMEOUT_MS';
|
|
56
|
+
/** How old a lock has to be before it is assumed to be a crash. */
|
|
57
|
+
export const LOCK_STALE_ENV = 'LPM_LOCK_STALE_MS';
|
|
58
|
+
/**
|
|
59
|
+
* Skip locking entirely. The escape hatch for a filesystem where `O_EXCL` does
|
|
60
|
+
* not mean what it says — some network mounts — on which every command would
|
|
61
|
+
* otherwise fail. It removes the first line of defence and leaves the second:
|
|
62
|
+
* a stale write is still refused. Documented rather than hidden, for the same
|
|
63
|
+
* reason `--unsafe` is.
|
|
64
|
+
*/
|
|
65
|
+
export const LOCK_DISABLE_ENV = 'LPM_NO_LOCK';
|
|
66
|
+
const DEFAULT_TIMEOUT_MS = 10_000;
|
|
67
|
+
/**
|
|
68
|
+
* Deliberately generous. It is the only thing standing between a live holder
|
|
69
|
+
* and having its lock taken away, so it has to exceed the longest legitimate
|
|
70
|
+
* hold — a push of a few hundred changes reloads the board between each one —
|
|
71
|
+
* rather than be tuned to make recovery from a crash feel quick.
|
|
72
|
+
*/
|
|
73
|
+
const DEFAULT_STALE_MS = 120_000;
|
|
74
|
+
/** How long to wait between attempts. Short: a hold is milliseconds. */
|
|
75
|
+
const POLL_MS = 20;
|
|
76
|
+
function positiveEnv(name, fallback) {
|
|
77
|
+
const raw = process.env[name]?.trim();
|
|
78
|
+
if (!raw)
|
|
79
|
+
return fallback;
|
|
80
|
+
const value = Number(raw);
|
|
81
|
+
return Number.isFinite(value) && value > 0 ? value : fallback;
|
|
82
|
+
}
|
|
83
|
+
function disabled() {
|
|
84
|
+
const raw = process.env[LOCK_DISABLE_ENV]?.trim().toLowerCase();
|
|
85
|
+
return raw === '1' || raw === 'true' || raw === 'yes';
|
|
86
|
+
}
|
|
87
|
+
function whoami() {
|
|
88
|
+
try {
|
|
89
|
+
return userInfo().username;
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return 'unknown';
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/** Read the record of whoever holds the lock, or null when there is nothing readable. */
|
|
96
|
+
export function readLockHolder(file) {
|
|
97
|
+
try {
|
|
98
|
+
const parsed = JSON.parse(readFileSync(file, 'utf8'));
|
|
99
|
+
if (typeof parsed.pid !== 'number' || typeof parsed.nonce !== 'string')
|
|
100
|
+
return null;
|
|
101
|
+
return {
|
|
102
|
+
pid: parsed.pid,
|
|
103
|
+
host: typeof parsed.host === 'string' ? parsed.host : '',
|
|
104
|
+
user: typeof parsed.user === 'string' ? parsed.user : 'unknown',
|
|
105
|
+
op: typeof parsed.op === 'string' ? parsed.op : 'something',
|
|
106
|
+
at: typeof parsed.at === 'string' ? parsed.at : '',
|
|
107
|
+
nonce: parsed.nonce,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
// Missing, unparseable, or caught between the create and the write. The
|
|
112
|
+
// caller decides which, by watching how long it stays that way.
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function ageOf(holder) {
|
|
117
|
+
const at = Date.parse(holder.at);
|
|
118
|
+
// A record with no usable timestamp is treated as brand new, so it expires by
|
|
119
|
+
// the pid check or not at all — guessing "ancient" would break live locks.
|
|
120
|
+
return Number.isFinite(at) ? Date.now() - at : 0;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Whether a lock may be taken away from whoever wrote it.
|
|
124
|
+
*
|
|
125
|
+
* **Age, and nothing else.** The obvious extra test — "is that pid still
|
|
126
|
+
* running?" — was here and had to come out: `process.kill(pid, 0)` returns
|
|
127
|
+
* `ESRCH` for processes that are demonstrably alive, often enough to matter as
|
|
128
|
+
* soon as a machine is loaded, and a false "dead" does not degrade the lock, it
|
|
129
|
+
* *deletes* it. Eight concurrent `lpm new` calls on one board produced duplicate
|
|
130
|
+
* ids exactly this way: one process judged the live holder dead, broke its lock,
|
|
131
|
+
* and both read the same id counter. A false "alive" costs a wait; a false
|
|
132
|
+
* "dead" costs the guarantee. There is no version of that trade worth taking, so
|
|
133
|
+
* liveness is not consulted at all.
|
|
134
|
+
*
|
|
135
|
+
* What is left is a clock, which is why `staleMs` has to be longer than the
|
|
136
|
+
* longest honest hold — a whole push, a whole `check --fix` — rather than
|
|
137
|
+
* tuned down to make crash recovery snappy. Crash recovery is instead handled
|
|
138
|
+
* where it belongs: a process that is interrupted releases the lock on its way
|
|
139
|
+
* out (see `releaseOnExit`), so the window only matters for a kill nothing can
|
|
140
|
+
* catch.
|
|
141
|
+
*/
|
|
142
|
+
function isStale(holder, staleMs) {
|
|
143
|
+
return ageOf(holder) > staleMs;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Take a lock away from a holder judged dead.
|
|
147
|
+
*
|
|
148
|
+
* Renaming first is what makes the breaker unique: two processes can both
|
|
149
|
+
* decide the lock is stale, but only one of them can rename the file, and the
|
|
150
|
+
* other gets `ENOENT` and goes back to competing for a fresh one.
|
|
151
|
+
*/
|
|
152
|
+
function breakLock(file) {
|
|
153
|
+
const victim = `${file}.stale.${randomBytes(4).toString('hex')}`;
|
|
154
|
+
try {
|
|
155
|
+
renameSync(file, victim);
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
// Somebody else broke it first, or it was released while we deliberated.
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
try {
|
|
162
|
+
rmSync(victim, { force: true });
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
// The record is out of the way, which is all that was needed.
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Errors from the exclusive create that mean "somebody else has it this
|
|
170
|
+
* instant", not "this can never work".
|
|
171
|
+
*
|
|
172
|
+
* `EEXIST` is the honest one and the only one on a POSIX filesystem. The rest
|
|
173
|
+
* are Windows: a file another process has just unlinked stays in a
|
|
174
|
+
* *delete-pending* state until its last handle closes, and creating over it
|
|
175
|
+
* returns `ERROR_ACCESS_DENIED`, which libuv reports as `EPERM` — so the
|
|
176
|
+
* ordinary case of "the previous holder released a millisecond ago" arrives
|
|
177
|
+
* here looking like a permissions failure. Letting it out of the loop turned a
|
|
178
|
+
* lost race into a crashed command under load. A genuinely unwritable board
|
|
179
|
+
* still fails, but as a timeout that names the code rather than as a stack
|
|
180
|
+
* trace, which is the difference between waiting and giving up.
|
|
181
|
+
*/
|
|
182
|
+
const CONTENDED = new Set(['EEXIST', 'EPERM', 'EACCES', 'EBUSY']);
|
|
183
|
+
/** What the last failed create said, so a timeout can name it. */
|
|
184
|
+
let lastCreateError = null;
|
|
185
|
+
/** Create the lock file, or report that somebody already has. */
|
|
186
|
+
function tryCreate(file, holder) {
|
|
187
|
+
let fd;
|
|
188
|
+
try {
|
|
189
|
+
fd = openSync(file, 'wx');
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
const code = error.code ?? '';
|
|
193
|
+
if (code === 'ENOENT') {
|
|
194
|
+
// The board folder is not there yet (a board being created). Make it and
|
|
195
|
+
// let the next turn of the loop try again.
|
|
196
|
+
mkdirSync(path.dirname(file), { recursive: true });
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
if (CONTENDED.has(code)) {
|
|
200
|
+
lastCreateError = code;
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
throw error;
|
|
204
|
+
}
|
|
205
|
+
lastCreateError = null;
|
|
206
|
+
try {
|
|
207
|
+
writeSync(fd, JSON.stringify(holder));
|
|
208
|
+
}
|
|
209
|
+
finally {
|
|
210
|
+
closeSync(fd);
|
|
211
|
+
}
|
|
212
|
+
// Read it back: if a process that had judged this board's previous lock stale
|
|
213
|
+
// broke ours between the create and now, the token will not be the one we
|
|
214
|
+
// wrote, and we do not hold what we think we hold.
|
|
215
|
+
return readLockHolder(file)?.nonce === holder.nonce;
|
|
216
|
+
}
|
|
217
|
+
function timedOut(file, op, timeoutMs) {
|
|
218
|
+
const holder = readLockHolder(file);
|
|
219
|
+
const seconds = Math.round(timeoutMs / 100) / 10;
|
|
220
|
+
return new BoardError(holder
|
|
221
|
+
? `The board is busy: ${holder.user} is doing "${holder.op}" (pid ${holder.pid} on ${holder.host || 'this machine'})`
|
|
222
|
+
: 'The board is busy and did not come free', [
|
|
223
|
+
`Gave up waiting after ${seconds}s to ${op}.`,
|
|
224
|
+
'Another person, agent or editor is part-way through a change. Try again in a moment.',
|
|
225
|
+
`If nothing is running, delete ${file} — it is a leftover lock, and nothing on the board depends on it.`,
|
|
226
|
+
// A board nobody can write to at all reads exactly like a busy one from
|
|
227
|
+
// in here, so say which it was rather than leaving somebody to guess.
|
|
228
|
+
...(holder === null && lastCreateError
|
|
229
|
+
? [`The lock file could not be created either (${lastCreateError}); check the folder is writable.`]
|
|
230
|
+
: []),
|
|
231
|
+
]);
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Depth of nesting per lock file, so an operation that calls another operation
|
|
235
|
+
* does not deadlock against itself. Keyed by path rather than by board, because
|
|
236
|
+
* two `BoardPaths` objects for the same folder are the same lock.
|
|
237
|
+
*/
|
|
238
|
+
const held = new Map();
|
|
239
|
+
/**
|
|
240
|
+
* Run `fn` as the board's only writer.
|
|
241
|
+
*
|
|
242
|
+
* `op` is what to tell whoever is waiting — short, and naming the document when
|
|
243
|
+
* there is one ("claim LP-12" reads better than "moveNode").
|
|
244
|
+
*/
|
|
245
|
+
export function withBoardLock(paths, op, fn) {
|
|
246
|
+
if (disabled())
|
|
247
|
+
return fn();
|
|
248
|
+
const file = paths.lockPath;
|
|
249
|
+
const entry = held.get(file);
|
|
250
|
+
if (entry) {
|
|
251
|
+
entry.depth += 1;
|
|
252
|
+
try {
|
|
253
|
+
return fn();
|
|
254
|
+
}
|
|
255
|
+
finally {
|
|
256
|
+
entry.depth -= 1;
|
|
257
|
+
if (entry.depth === 0)
|
|
258
|
+
held.delete(file);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
const timeoutMs = positiveEnv(LOCK_TIMEOUT_ENV, DEFAULT_TIMEOUT_MS);
|
|
262
|
+
const staleMs = positiveEnv(LOCK_STALE_ENV, DEFAULT_STALE_MS);
|
|
263
|
+
const nonce = randomBytes(8).toString('hex');
|
|
264
|
+
const holder = {
|
|
265
|
+
pid: process.pid,
|
|
266
|
+
host: hostname(),
|
|
267
|
+
user: whoami(),
|
|
268
|
+
op,
|
|
269
|
+
at: new Date().toISOString(),
|
|
270
|
+
nonce,
|
|
271
|
+
};
|
|
272
|
+
acquire(file, holder, timeoutMs, staleMs, op);
|
|
273
|
+
held.set(file, { depth: 1, nonce });
|
|
274
|
+
const stopWatching = releaseOnExit(file, nonce);
|
|
275
|
+
try {
|
|
276
|
+
return fn();
|
|
277
|
+
}
|
|
278
|
+
finally {
|
|
279
|
+
const current = held.get(file);
|
|
280
|
+
if (current) {
|
|
281
|
+
current.depth -= 1;
|
|
282
|
+
if (current.depth === 0) {
|
|
283
|
+
held.delete(file);
|
|
284
|
+
stopWatching();
|
|
285
|
+
release(file, nonce);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Give the lock up if this process is interrupted while holding it.
|
|
292
|
+
*
|
|
293
|
+
* Without this, Ctrl-C during any write leaves a lock behind and the board
|
|
294
|
+
* refuses every change until it ages out — and since `isStale` is a clock and
|
|
295
|
+
* nothing else, that wait is long by design. A `finally` does not cover it:
|
|
296
|
+
* Node's default `SIGINT` handling terminates the process without unwinding.
|
|
297
|
+
* So while the lock is held, and only then, the two catchable signals are
|
|
298
|
+
* intercepted, the lock released, and the signal re-raised with the default
|
|
299
|
+
* behaviour so the process still dies the way the caller asked it to.
|
|
300
|
+
*
|
|
301
|
+
* Returns the function that takes the handlers off again.
|
|
302
|
+
*/
|
|
303
|
+
function releaseOnExit(file, nonce) {
|
|
304
|
+
const onExit = () => release(file, nonce);
|
|
305
|
+
const onSignal = (signal) => {
|
|
306
|
+
release(file, nonce);
|
|
307
|
+
process.removeListener('exit', onExit);
|
|
308
|
+
process.removeListener('SIGINT', onSignal);
|
|
309
|
+
process.removeListener('SIGTERM', onSignal);
|
|
310
|
+
// Re-raise with no listener left, so the default action applies and the
|
|
311
|
+
// exit code says what actually happened.
|
|
312
|
+
process.kill(process.pid, signal);
|
|
313
|
+
};
|
|
314
|
+
process.once('exit', onExit);
|
|
315
|
+
process.once('SIGINT', onSignal);
|
|
316
|
+
process.once('SIGTERM', onSignal);
|
|
317
|
+
return () => {
|
|
318
|
+
process.removeListener('exit', onExit);
|
|
319
|
+
process.removeListener('SIGINT', onSignal);
|
|
320
|
+
process.removeListener('SIGTERM', onSignal);
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
function acquire(file, holder, timeoutMs, staleMs, op) {
|
|
324
|
+
const deadline = Date.now() + timeoutMs;
|
|
325
|
+
/** When we first saw a lock file we could not read, for the same expiry. */
|
|
326
|
+
let unreadableSince = null;
|
|
327
|
+
for (;;) {
|
|
328
|
+
if (tryCreate(file, holder))
|
|
329
|
+
return;
|
|
330
|
+
const current = readLockHolder(file);
|
|
331
|
+
if (current) {
|
|
332
|
+
unreadableSince = null;
|
|
333
|
+
if (isStale(current, staleMs)) {
|
|
334
|
+
breakLock(file);
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
// Either a lock caught between its create and its write — microseconds —
|
|
340
|
+
// or a record something truncated. Time decides which.
|
|
341
|
+
unreadableSince ??= Date.now();
|
|
342
|
+
if (Date.now() - unreadableSince > staleMs) {
|
|
343
|
+
breakLock(file);
|
|
344
|
+
unreadableSince = null;
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
if (Date.now() >= deadline)
|
|
349
|
+
throw timedOut(file, op, timeoutMs);
|
|
350
|
+
sleepSync(POLL_MS);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
/** Give the lock up, unless somebody broke it and it is no longer ours to give. */
|
|
354
|
+
function release(file, nonce) {
|
|
355
|
+
if (readLockHolder(file)?.nonce !== nonce)
|
|
356
|
+
return;
|
|
357
|
+
try {
|
|
358
|
+
rmSync(file, { force: true });
|
|
359
|
+
}
|
|
360
|
+
catch {
|
|
361
|
+
// Already gone. Nothing on the board depends on the file existing.
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
//# sourceMappingURL=lock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../../src/core/storage/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACtG,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,6DAA6D;AAC7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AACtD,mEAAmE;AACnE,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAClD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAE9C,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC;;;;;GAKG;AACH,MAAM,gBAAgB,GAAG,OAAO,CAAC;AACjC,wEAAwE;AACxE,MAAM,OAAO,GAAG,EAAE,CAAC;AAmBnB,SAAS,WAAW,CAAC,IAAY,EAAE,QAAgB;IACjD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;IACtC,IAAI,CAAC,GAAG;QAA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