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,117 @@
|
|
|
1
|
+
import { randomBytes } from 'node:crypto';
|
|
2
|
+
import { renameSync, rmSync, statSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
/**
|
|
5
|
+
* The three primitives that make a board safe to share.
|
|
6
|
+
*
|
|
7
|
+
* A `.lpm` folder has no server in front of it: two people, a web session and a
|
|
8
|
+
* swarm of agents can all be writing to one checkout at the same moment, and
|
|
9
|
+
* every one of them is a separate process holding its own `LoadedBoard`. Three
|
|
10
|
+
* things have to be true for that to work, and this file is the first two of
|
|
11
|
+
* them.
|
|
12
|
+
*
|
|
13
|
+
* **Nobody reads half a document.** `writeFileAtomic` writes a temporary file
|
|
14
|
+
* beside the target and renames it into place. `rename` over an existing file is
|
|
15
|
+
* atomic on POSIX and on Windows (`MoveFileEx` with replace), so a concurrent
|
|
16
|
+
* reader sees either the whole old document or the whole new one — never the
|
|
17
|
+
* torn middle, which on a YAML frontmatter file reads as a corrupt board.
|
|
18
|
+
*
|
|
19
|
+
* **A writer can tell whether the file moved underneath it.** A `DocStamp` is
|
|
20
|
+
* the identity of a file as it was read: modification time to nanosecond
|
|
21
|
+
* precision plus size. `loadBoard` records one per document, and an operation
|
|
22
|
+
* compares it against disk before writing, so a stale handle is refused rather
|
|
23
|
+
* than silently winning. This is the same evidence `DocumentCache` trusts, and
|
|
24
|
+
* it carries the same caveat — see `sameStamp`.
|
|
25
|
+
*
|
|
26
|
+
* The third is `lock.ts`, which serializes the writers so the compare and the
|
|
27
|
+
* write cannot be interleaved.
|
|
28
|
+
*
|
|
29
|
+
* Deliberately *not* here: `fsync`. The failure this guards against is another
|
|
30
|
+
* process reading at the wrong moment, not the machine losing power; a board is
|
|
31
|
+
* versioned in git, and paying a flush on every status change would make the
|
|
32
|
+
* common case slower to defend against the case git already covers.
|
|
33
|
+
*/
|
|
34
|
+
/** How long to keep retrying a rename a virus scanner or indexer is holding. */
|
|
35
|
+
const RENAME_RETRY_MS = 200;
|
|
36
|
+
/** Errors a Windows filesystem raises when something else has the file open. */
|
|
37
|
+
const TRANSIENT = new Set(['EPERM', 'EACCES', 'EBUSY']);
|
|
38
|
+
/**
|
|
39
|
+
* Block the calling thread for `ms`. Everything in the engine is synchronous —
|
|
40
|
+
* operations are called from a CLI process that then exits — so the lock's
|
|
41
|
+
* retry loop and the rename retry below need a wait that does not need an event
|
|
42
|
+
* loop turn. `Atomics.wait` is the only one Node offers on the main thread.
|
|
43
|
+
*/
|
|
44
|
+
export function sleepSync(ms) {
|
|
45
|
+
if (ms <= 0)
|
|
46
|
+
return;
|
|
47
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
48
|
+
}
|
|
49
|
+
function tempNameFor(file) {
|
|
50
|
+
const base = path.basename(file);
|
|
51
|
+
// Leading dot so a temporary that outlives a killed process is hidden from a
|
|
52
|
+
// file tree and from `scanDir`, which skips dot-entries.
|
|
53
|
+
return path.join(path.dirname(file), `.${base}.tmp.${process.pid}.${randomBytes(4).toString('hex')}`);
|
|
54
|
+
}
|
|
55
|
+
function renameWithRetry(from, to) {
|
|
56
|
+
const until = Date.now() + RENAME_RETRY_MS;
|
|
57
|
+
for (;;) {
|
|
58
|
+
try {
|
|
59
|
+
renameSync(from, to);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
const code = error.code ?? '';
|
|
64
|
+
if (!TRANSIENT.has(code) || Date.now() >= until)
|
|
65
|
+
throw error;
|
|
66
|
+
sleepSync(10);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Write `data` to `file` so that no reader ever observes a partial write.
|
|
72
|
+
*
|
|
73
|
+
* The temporary lands in the same directory as the target, because a rename is
|
|
74
|
+
* only atomic within one filesystem and `.lpm` may well be a mount of its own.
|
|
75
|
+
* A failed write takes its temporary with it.
|
|
76
|
+
*/
|
|
77
|
+
export function writeFileAtomic(file, data) {
|
|
78
|
+
const temp = tempNameFor(file);
|
|
79
|
+
try {
|
|
80
|
+
writeFileSync(temp, data, 'utf8');
|
|
81
|
+
renameWithRetry(temp, file);
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
try {
|
|
85
|
+
rmSync(temp, { force: true });
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
// The temporary is already gone, or the directory is unwritable — either
|
|
89
|
+
// way the original error is the one worth reporting.
|
|
90
|
+
}
|
|
91
|
+
throw error;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/** Stamp `file` as it stands now, or null when it does not exist. */
|
|
95
|
+
export function stampOf(file) {
|
|
96
|
+
try {
|
|
97
|
+
const stat = statSync(file, { bigint: true });
|
|
98
|
+
return { mtimeNs: stat.mtimeNs, size: Number(stat.size) };
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Whether two stamps describe the same version of a file.
|
|
106
|
+
*
|
|
107
|
+
* Say what it does not do: a filesystem with a coarse clock (FAT, and some
|
|
108
|
+
* network mounts) can give two rewrites inside one tick the same timestamp, so
|
|
109
|
+
* a same-size rewrite in that window compares equal. That is the same racy-index
|
|
110
|
+
* hole git guards against and `DocumentCache` closes with a two-second window,
|
|
111
|
+
* and it is why this is the *second* line of defence rather than the only one:
|
|
112
|
+
* the board lock is what makes two writers take turns in the first place.
|
|
113
|
+
*/
|
|
114
|
+
export function sameStamp(a, b) {
|
|
115
|
+
return a.mtimeNs === b.mtimeNs && a.size === b.size;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=atomic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomic.js","sourceRoot":"","sources":["../../../src/core/storage/atomic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;;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ACH,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,IAAY;IACxD,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,CAAC;QACH,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAClC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC;YACH,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAChC,CAAC;QAAC,MAAM,CAAC;YACP,yEAAyE;YACzE,qDAAqD;QACvD,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AASD,qEAAqE;AACrE,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9C,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAC5D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,SAAS,CAAC,CAAW,EAAE,CAAW;IAChD,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The work log on a document.
|
|
3
|
+
*
|
|
4
|
+
* Comments live in a `_comments.md` beside the document's own file, as a flat
|
|
5
|
+
* append-only list. That shape is chosen for the two things that actually
|
|
6
|
+
* happen to them: an agent or a person adds one at the end, and two people do
|
|
7
|
+
* that on different branches. Appends merge; a growing YAML list in the
|
|
8
|
+
* frontmatter would not, and it would push the fields anyone reads down the
|
|
9
|
+
* page.
|
|
10
|
+
*
|
|
11
|
+
* `load.ts` only ever opens `_issue.md` / `_period.md` / `_resource.md`, and it
|
|
12
|
+
* only walks directories, so an extra file here is invisible to the engine.
|
|
13
|
+
* Comments are read on demand rather than with the board.
|
|
14
|
+
*/
|
|
15
|
+
export declare const COMMENTS_FILE = "_comments.md";
|
|
16
|
+
export interface Comment {
|
|
17
|
+
/** 1-based position in the file, which is also the order it was written. */
|
|
18
|
+
index: number;
|
|
19
|
+
/** ISO timestamp. */
|
|
20
|
+
at: string;
|
|
21
|
+
author: string;
|
|
22
|
+
body: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function commentsFile(dir: string): string;
|
|
25
|
+
/** Read a document's comments, oldest first. A missing file means none. */
|
|
26
|
+
export declare function readComments(dir: string): Comment[];
|
|
27
|
+
/** Append one comment, creating the file if this is the first. */
|
|
28
|
+
export declare function appendComment(dir: string, comment: {
|
|
29
|
+
at: string;
|
|
30
|
+
author: string;
|
|
31
|
+
body: string;
|
|
32
|
+
}): void;
|
|
33
|
+
/**
|
|
34
|
+
* Rewrite the whole log. Used to delete one entry; nothing else needs it.
|
|
35
|
+
*
|
|
36
|
+
* Atomic, unlike the append above: this one replaces the file, so a reader
|
|
37
|
+
* catching it mid-write would see a truncated log rather than a shorter one.
|
|
38
|
+
*/
|
|
39
|
+
export declare function writeComments(dir: string, comments: Comment[]): void;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { appendFileSync, existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { writeFileAtomic } from './atomic.js';
|
|
4
|
+
/**
|
|
5
|
+
* The work log on a document.
|
|
6
|
+
*
|
|
7
|
+
* Comments live in a `_comments.md` beside the document's own file, as a flat
|
|
8
|
+
* append-only list. That shape is chosen for the two things that actually
|
|
9
|
+
* happen to them: an agent or a person adds one at the end, and two people do
|
|
10
|
+
* that on different branches. Appends merge; a growing YAML list in the
|
|
11
|
+
* frontmatter would not, and it would push the fields anyone reads down the
|
|
12
|
+
* page.
|
|
13
|
+
*
|
|
14
|
+
* `load.ts` only ever opens `_issue.md` / `_period.md` / `_resource.md`, and it
|
|
15
|
+
* only walks directories, so an extra file here is invisible to the engine.
|
|
16
|
+
* Comments are read on demand rather than with the board.
|
|
17
|
+
*/
|
|
18
|
+
export const COMMENTS_FILE = '_comments.md';
|
|
19
|
+
/**
|
|
20
|
+
* A heading strict enough that prose cannot be mistaken for it: the timestamp
|
|
21
|
+
* has to come first. Anything else in the body is left alone.
|
|
22
|
+
*/
|
|
23
|
+
const HEADING = /^##[ \t]+(\d{4}-\d{2}-\d{2}T[0-9:.]+Z)[ \t]+—[ \t]+(.*)$/;
|
|
24
|
+
export function commentsFile(dir) {
|
|
25
|
+
return path.join(dir, COMMENTS_FILE);
|
|
26
|
+
}
|
|
27
|
+
function formatEntry(comment) {
|
|
28
|
+
return `## ${comment.at} — ${comment.author}\n\n${comment.body.trim()}\n`;
|
|
29
|
+
}
|
|
30
|
+
/** Read a document's comments, oldest first. A missing file means none. */
|
|
31
|
+
export function readComments(dir) {
|
|
32
|
+
const file = commentsFile(dir);
|
|
33
|
+
if (!existsSync(file))
|
|
34
|
+
return [];
|
|
35
|
+
let raw;
|
|
36
|
+
try {
|
|
37
|
+
raw = readFileSync(file, 'utf8');
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
const comments = [];
|
|
43
|
+
let current = null;
|
|
44
|
+
const lines = [];
|
|
45
|
+
const flush = () => {
|
|
46
|
+
if (!current)
|
|
47
|
+
return;
|
|
48
|
+
current.body = lines.join('\n').trim();
|
|
49
|
+
comments.push(current);
|
|
50
|
+
lines.length = 0;
|
|
51
|
+
};
|
|
52
|
+
for (const line of raw.split(/\r?\n/)) {
|
|
53
|
+
const match = HEADING.exec(line);
|
|
54
|
+
if (match) {
|
|
55
|
+
flush();
|
|
56
|
+
current = {
|
|
57
|
+
index: comments.length + 1,
|
|
58
|
+
at: match[1],
|
|
59
|
+
author: match[2].trim(),
|
|
60
|
+
body: '',
|
|
61
|
+
};
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
if (current)
|
|
65
|
+
lines.push(line);
|
|
66
|
+
}
|
|
67
|
+
flush();
|
|
68
|
+
return comments;
|
|
69
|
+
}
|
|
70
|
+
/** Append one comment, creating the file if this is the first. */
|
|
71
|
+
export function appendComment(dir, comment) {
|
|
72
|
+
const file = commentsFile(dir);
|
|
73
|
+
const entry = formatEntry(comment);
|
|
74
|
+
if (existsSync(file))
|
|
75
|
+
appendFileSync(file, `\n${entry}`, 'utf8');
|
|
76
|
+
else
|
|
77
|
+
writeFileSync(file, entry, 'utf8');
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Rewrite the whole log. Used to delete one entry; nothing else needs it.
|
|
81
|
+
*
|
|
82
|
+
* Atomic, unlike the append above: this one replaces the file, so a reader
|
|
83
|
+
* catching it mid-write would see a truncated log rather than a shorter one.
|
|
84
|
+
*/
|
|
85
|
+
export function writeComments(dir, comments) {
|
|
86
|
+
writeFileAtomic(commentsFile(dir), comments.map(formatEntry).join('\n'));
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=comments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments.js","sourceRoot":"","sources":["../../../src/core/storage/comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClF,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;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K,EAAE,CAAC;YACR,OAAO,GAAG;gBACR,KAAK,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC;gBAC1B,EAAE,EAAE,KAAK,CAAC,CAAC,CAAE;gBACb,MAAM,EAAE,KAAK,CAAC,CAAC,CAAE,CAAC,IAAI,EAAE;gBACxB,IAAI,EAAE,EAAE;aACT,CAAC;YACF,SAAS;QACX,CAAC;QACD,IAAI,OAAO;YAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IACD,KAAK,EAAE,CAAC;IAER,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,aAAa,CAC3B,GAAW,EACX,OAAqD;IAErD,MAAM,IAAI,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IACnC,IAAI,UAAU,CAAC,IAAI,CAAC;QAAE,cAAc,CAAC,IAAI,EAAE,KAAK,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;;QAC5D,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,QAAmB;IAC5D,eAAe,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AnyNode, BoardConfig } from '../model/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Render a document to markdown. Frontmatter key order is stable: reserved
|
|
4
|
+
* fields first, then attributes in the order the config declares them, then any
|
|
5
|
+
* extra keys the user added by hand (preserved rather than dropped).
|
|
6
|
+
*/
|
|
7
|
+
export declare function serializeNode(node: AnyNode, config: BoardConfig): string;
|
|
8
|
+
/**
|
|
9
|
+
* Write a document. Atomically, because another process may be reading this
|
|
10
|
+
* very file: half a YAML frontmatter block reads as a corrupt board, and a
|
|
11
|
+
* board is read far more often than it is written.
|
|
12
|
+
*/
|
|
13
|
+
export declare function writeNode(node: AnyNode, config: BoardConfig): void;
|
|
14
|
+
export declare function nowIso(): string;
|
|
15
|
+
/** File mtime, used as a last-resort `created` timestamp. */
|
|
16
|
+
export declare function fileTimestamp(file: string): string;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { statSync } from 'node:fs';
|
|
2
|
+
import { typesFor } from '../config/lookup.js';
|
|
3
|
+
import { writeFileAtomic } from './atomic.js';
|
|
4
|
+
import { stringifyFrontmatter } from './frontmatter.js';
|
|
5
|
+
/**
|
|
6
|
+
* Render a document to markdown. Frontmatter key order is stable: reserved
|
|
7
|
+
* fields first, then attributes in the order the config declares them, then any
|
|
8
|
+
* extra keys the user added by hand (preserved rather than dropped).
|
|
9
|
+
*/
|
|
10
|
+
export function serializeNode(node, config) {
|
|
11
|
+
const data = { id: node.id };
|
|
12
|
+
// An unresolved type is left out rather than written as an empty string, so
|
|
13
|
+
// `check` keeps reporting it instead of the file gaining a bogus value.
|
|
14
|
+
if (node.type)
|
|
15
|
+
data.type = node.type;
|
|
16
|
+
data.title = node.title;
|
|
17
|
+
if (node.kind === 'issue') {
|
|
18
|
+
data.status = node.status;
|
|
19
|
+
data.assignee = node.assignee;
|
|
20
|
+
data.period = node.period;
|
|
21
|
+
// Only written once somebody has raised one. An absent key is the ordinary
|
|
22
|
+
// case, and `flag: null` on every issue on the board would bury the few
|
|
23
|
+
// that are actually asking for something.
|
|
24
|
+
if (node.flag)
|
|
25
|
+
data.flag = node.flag;
|
|
26
|
+
data.depends_on = node.depends_on;
|
|
27
|
+
data.relates_to = node.relates_to;
|
|
28
|
+
data.related_files = node.related_files;
|
|
29
|
+
}
|
|
30
|
+
else if (node.kind === 'period') {
|
|
31
|
+
if (node.starts !== undefined)
|
|
32
|
+
data.starts = node.starts;
|
|
33
|
+
if (node.ends !== undefined)
|
|
34
|
+
data.ends = node.ends;
|
|
35
|
+
// Only written once somebody has held the switch: an absent key is what
|
|
36
|
+
// says "the dates decide", and writing `active: null` would blur that.
|
|
37
|
+
if (node.active !== undefined)
|
|
38
|
+
data.active = node.active;
|
|
39
|
+
data.squad = node.squad;
|
|
40
|
+
}
|
|
41
|
+
else if (node.kind === 'resource') {
|
|
42
|
+
data.capacity = node.capacity;
|
|
43
|
+
data.covers = node.covers;
|
|
44
|
+
}
|
|
45
|
+
else if (node.kind === 'template') {
|
|
46
|
+
data.description = node.description;
|
|
47
|
+
// Only a root declares parameters, and only when it has any: `params: {}`
|
|
48
|
+
// on every folder in the registry would bury the templates that ask for
|
|
49
|
+
// something. @see src/shared/template-params.ts
|
|
50
|
+
if (Object.keys(node.params).length)
|
|
51
|
+
data.params = node.params;
|
|
52
|
+
data.depends_on = node.depends_on;
|
|
53
|
+
data.relates_to = node.relates_to;
|
|
54
|
+
data.related_files = node.related_files;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
data.members = node.members;
|
|
58
|
+
}
|
|
59
|
+
if (node.created)
|
|
60
|
+
data.created = node.created;
|
|
61
|
+
if (node.updated)
|
|
62
|
+
data.updated = node.updated;
|
|
63
|
+
if (node.author)
|
|
64
|
+
data.author = node.author;
|
|
65
|
+
const types = typesFor(config, node.kind);
|
|
66
|
+
const declared = Object.keys(types[node.type]?.attributes ?? {});
|
|
67
|
+
for (const key of declared) {
|
|
68
|
+
if (key in node.attributes)
|
|
69
|
+
data[key] = node.attributes[key];
|
|
70
|
+
}
|
|
71
|
+
for (const [key, value] of Object.entries(node.attributes)) {
|
|
72
|
+
if (!declared.includes(key))
|
|
73
|
+
data[key] = value;
|
|
74
|
+
}
|
|
75
|
+
return stringifyFrontmatter(data, node.body);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Write a document. Atomically, because another process may be reading this
|
|
79
|
+
* very file: half a YAML frontmatter block reads as a corrupt board, and a
|
|
80
|
+
* board is read far more often than it is written.
|
|
81
|
+
*/
|
|
82
|
+
export function writeNode(node, config) {
|
|
83
|
+
writeFileAtomic(node.file, serializeNode(node, config));
|
|
84
|
+
}
|
|
85
|
+
export function nowIso() {
|
|
86
|
+
return new Date().toISOString();
|
|
87
|
+
}
|
|
88
|
+
/** File mtime, used as a last-resort `created` timestamp. */
|
|
89
|
+
export function fileTimestamp(file) {
|
|
90
|
+
try {
|
|
91
|
+
const stats = statSync(file);
|
|
92
|
+
return (stats.birthtimeMs > 0 ? stats.birthtime : stats.mtime).toISOString();
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
return new Date().toISOString();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.js","sourceRoot":"","sources":["../../../src/core/storage/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,IAAa,EAAE,MAAmB;IAC9D,MAAM,IAAI,GAA4B,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;IACtD,4EAA4E;IAC5E,wEAAwE;IACxE,IAAI,IAAI,CAAC,IAAI;QAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACrC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IAExB,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,QAAQ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CAAC,IAAI,CAAC,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,IAAa,EAAE,MAAmB;IAC1D,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,MAAM;IACpB,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC7B,OAAO,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ParsedDocument {
|
|
2
|
+
data: Record<string, unknown>;
|
|
3
|
+
body: string;
|
|
4
|
+
hadFrontmatter: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Split a markdown document into YAML frontmatter and body.
|
|
8
|
+
* Throws if the frontmatter block exists but is not valid YAML.
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseFrontmatter(raw: string): ParsedDocument;
|
|
11
|
+
export declare function stringifyFrontmatter(data: Record<string, unknown>, body: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* First level-1 heading in a markdown body, used to recover a missing title.
|
|
14
|
+
* Deliberately h1-only: issue body templates open with h2 section headings.
|
|
15
|
+
*/
|
|
16
|
+
export declare function firstHeading(body: string): string | null;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import YAML from 'yaml';
|
|
2
|
+
const BOM = '\\uFEFF';
|
|
3
|
+
const FRONTMATTER_RE = new RegExp(`^${BOM}?---[ \\t]*\\r?\\n([\\s\\S]*?)(?:\\r?\\n)?---[ \\t]*(?:\\r?\\n|$)`);
|
|
4
|
+
const LEADING_BOM_RE = new RegExp(`^${BOM}`);
|
|
5
|
+
/**
|
|
6
|
+
* Split a markdown document into YAML frontmatter and body.
|
|
7
|
+
* Throws if the frontmatter block exists but is not valid YAML.
|
|
8
|
+
*/
|
|
9
|
+
export function parseFrontmatter(raw) {
|
|
10
|
+
const match = FRONTMATTER_RE.exec(raw);
|
|
11
|
+
if (!match) {
|
|
12
|
+
return { data: {}, body: raw.replace(LEADING_BOM_RE, ''), hadFrontmatter: false };
|
|
13
|
+
}
|
|
14
|
+
const parsed = YAML.parse(match[1]);
|
|
15
|
+
const data = parsed && typeof parsed === 'object' && !Array.isArray(parsed)
|
|
16
|
+
? parsed
|
|
17
|
+
: {};
|
|
18
|
+
return { data, body: raw.slice(match[0].length), hadFrontmatter: true };
|
|
19
|
+
}
|
|
20
|
+
export function stringifyFrontmatter(data, body) {
|
|
21
|
+
const yaml = YAML.stringify(data, { lineWidth: 0 }).trimEnd();
|
|
22
|
+
const trimmed = body.replace(/^\s+/, '').trimEnd();
|
|
23
|
+
return trimmed ? `---\n${yaml}\n---\n\n${trimmed}\n` : `---\n${yaml}\n---\n`;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* First level-1 heading in a markdown body, used to recover a missing title.
|
|
27
|
+
* Deliberately h1-only: issue body templates open with h2 section headings.
|
|
28
|
+
*/
|
|
29
|
+
export function firstHeading(body) {
|
|
30
|
+
const match = /^#[ \t]+(.+?)[ \t]*$/m.exec(body);
|
|
31
|
+
return match ? match[1] : null;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=frontmatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.js","sourceRoot":"","sources":["../../../src/core/storage/fr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AAO,OAAO,CAAC,CAAC,CAAC,QAAQ,IAAI,YAAY,OAAO,IAAI,CAAC,CAAC,CAAC,QAAQ,IAAI,SAAS,CAAC;AAC/E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,MAAM,KAAK,GAAG,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function isGitRepo(dir: string): boolean;
|
|
2
|
+
/** The root of the git work tree `dir` sits in, or null outside one. */
|
|
3
|
+
export declare function gitTopLevel(dir: string): string | null;
|
|
4
|
+
export declare function gitInit(dir: string): boolean;
|
|
5
|
+
/** `Name <email>` from git config, falling back to the OS user. */
|
|
6
|
+
export declare function gitIdentity(cwd: string): string;
|
|
7
|
+
/** ISO date of the commit that added `file`, if it is tracked. */
|
|
8
|
+
export declare function gitFileCreationDate(file: string): string | null;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import os from 'node:os';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
function git(cwd, args) {
|
|
5
|
+
try {
|
|
6
|
+
return execFileSync('git', args, {
|
|
7
|
+
cwd,
|
|
8
|
+
encoding: 'utf8',
|
|
9
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
10
|
+
}).trim();
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export function isGitRepo(dir) {
|
|
17
|
+
return git(dir, ['rev-parse', '--is-inside-work-tree']) === 'true';
|
|
18
|
+
}
|
|
19
|
+
/** The root of the git work tree `dir` sits in, or null outside one. */
|
|
20
|
+
export function gitTopLevel(dir) {
|
|
21
|
+
const top = git(dir, ['rev-parse', '--show-toplevel']);
|
|
22
|
+
return top ? path.resolve(top) : null;
|
|
23
|
+
}
|
|
24
|
+
export function gitInit(dir) {
|
|
25
|
+
return git(dir, ['init']) !== null;
|
|
26
|
+
}
|
|
27
|
+
/** `Name <email>` from git config, falling back to the OS user. */
|
|
28
|
+
export function gitIdentity(cwd) {
|
|
29
|
+
const name = git(cwd, ['config', 'user.name']);
|
|
30
|
+
const email = git(cwd, ['config', 'user.email']);
|
|
31
|
+
if (name && email)
|
|
32
|
+
return `${name} <${email}>`;
|
|
33
|
+
if (name)
|
|
34
|
+
return name;
|
|
35
|
+
try {
|
|
36
|
+
return os.userInfo().username;
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return 'unknown';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** ISO date of the commit that added `file`, if it is tracked. */
|
|
43
|
+
export function gitFileCreationDate(file) {
|
|
44
|
+
const dir = path.dirname(file);
|
|
45
|
+
const out = git(dir, ['log', '--diff-filter=A', '--format=%aI', '-1', '--', file]);
|
|
46
|
+
return out ? out.split('\n')[0] : null;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=git.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../../src/core/storage/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,SAAS,GAAG,CAAC,GAAW,EAAE,IAAc;IACtC,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE;YAC/B,GAAG;YACH,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;SACpC,CAAC,CAAC,IAAI,EAAE,CAAC;IACZ,CAAC;IAAC,MAAM,CAAC;QACP,O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CAAC,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IACnF,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The filesystem and git adapters — everything that knows how a board is laid
|
|
3
|
+
* out on disk: where things live (paths), how a document is encoded
|
|
4
|
+
* (frontmatter, document), the work log beside it (comments), the activity
|
|
5
|
+
* section inside a document's body (activity), the id counters (state),
|
|
6
|
+
* per-checkout settings (local), saved views (views), the context templates a
|
|
7
|
+
* brief is rendered with (templates), and authorship (git). Nothing here knows
|
|
8
|
+
* what a valid board looks like; that is validation's job.
|
|
9
|
+
*
|
|
10
|
+
* Two of them are about sharing the folder rather than laying it out: `atomic`
|
|
11
|
+
* (a write nobody can see half of, and the stamp that says whether a file moved
|
|
12
|
+
* underneath a reader) and `lock` (one writer at a time, across processes).
|
|
13
|
+
* Every write in this folder goes through the first; every operation that
|
|
14
|
+
* changes a board goes through the second.
|
|
15
|
+
*/
|
|
16
|
+
export * from './activity.js';
|
|
17
|
+
export * from './atomic.js';
|
|
18
|
+
export * from './comments.js';
|
|
19
|
+
export * from './document.js';
|
|
20
|
+
export * from './frontmatter.js';
|
|
21
|
+
export * from './git.js';
|
|
22
|
+
export * from './local.js';
|
|
23
|
+
export * from './lock.js';
|
|
24
|
+
export * from './paths.js';
|
|
25
|
+
export * from './state.js';
|
|
26
|
+
export * from './templates.js';
|
|
27
|
+
export * from './views.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The filesystem and git adapters — everything that knows how a board is laid
|
|
3
|
+
* out on disk: where things live (paths), how a document is encoded
|
|
4
|
+
* (frontmatter, document), the work log beside it (comments), the activity
|
|
5
|
+
* section inside a document's body (activity), the id counters (state),
|
|
6
|
+
* per-checkout settings (local), saved views (views), the context templates a
|
|
7
|
+
* brief is rendered with (templates), and authorship (git). Nothing here knows
|
|
8
|
+
* what a valid board looks like; that is validation's job.
|
|
9
|
+
*
|
|
10
|
+
* Two of them are about sharing the folder rather than laying it out: `atomic`
|
|
11
|
+
* (a write nobody can see half of, and the stamp that says whether a file moved
|
|
12
|
+
* underneath a reader) and `lock` (one writer at a time, across processes).
|
|
13
|
+
* Every write in this folder goes through the first; every operation that
|
|
14
|
+
* changes a board goes through the second.
|
|
15
|
+
*/
|
|
16
|
+
export * from './activity.js';
|
|
17
|
+
export * from './atomic.js';
|
|
18
|
+
export * from './comments.js';
|
|
19
|
+
export * from './document.js';
|
|
20
|
+
export * from './frontmatter.js';
|
|
21
|
+
export * from './git.js';
|
|
22
|
+
export * from './local.js';
|
|
23
|
+
export * from './lock.js';
|
|
24
|
+
export * from './paths.js';
|
|
25
|
+
export * from './state.js';
|
|
26
|
+
export * from './templates.js';
|
|
27
|
+
export * from './views.js';
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/storage/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { BoardPaths } from './paths.js';
|
|
2
|
+
/**
|
|
3
|
+
* Per-checkout settings, kept in `.lpm/local.json` and deliberately not
|
|
4
|
+
* committed: who is sitting at this machine is not a property of the board.
|
|
5
|
+
* `.lpm/.gitignore` excludes the file; `ensureLocalIgnored` adds the entry to
|
|
6
|
+
* boards created before this existed.
|
|
7
|
+
*/
|
|
8
|
+
export interface LocalSettings {
|
|
9
|
+
/** Id of the resource driving the CLI, or null when nobody is set. */
|
|
10
|
+
user: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Path to this developer's profile file, or null. Stored as it was given, so
|
|
13
|
+
* a path relative to the board root survives the checkout moving; read
|
|
14
|
+
* through `profileRef`, which is what resolves it.
|
|
15
|
+
*/
|
|
16
|
+
profile: string | null;
|
|
17
|
+
}
|
|
18
|
+
/** Overrides the stored user; handy for CI and shared machines. */
|
|
19
|
+
export declare const USER_ENV_VAR = "LPM_USER";
|
|
20
|
+
/** Overrides the stored profile path, for a shell that serves one developer. */
|
|
21
|
+
export declare const PROFILE_ENV_VAR = "LPM_PROFILE";
|
|
22
|
+
export declare function readLocal(paths: BoardPaths): LocalSettings;
|
|
23
|
+
export declare function writeLocal(paths: BoardPaths, settings: LocalSettings): void;
|
|
24
|
+
/**
|
|
25
|
+
* Whoever the CLI should act as, as written (an id or a name — the caller
|
|
26
|
+
* resolves it against the roster). The environment wins over the stored value.
|
|
27
|
+
*/
|
|
28
|
+
export declare function currentUserRef(paths: BoardPaths): string | null;
|
|
29
|
+
/** Where a reference to a profile file came from, so the CLI can say. */
|
|
30
|
+
export type ProfileSource = 'env' | 'local';
|
|
31
|
+
/**
|
|
32
|
+
* The profile file to use, as written, and where that answer came from. The
|
|
33
|
+
* environment wins, so one shell can serve a different developer than the
|
|
34
|
+
* checkout is set up for.
|
|
35
|
+
*/
|
|
36
|
+
export declare function profileRef(paths: BoardPaths): {
|
|
37
|
+
ref: string;
|
|
38
|
+
source: ProfileSource;
|
|
39
|
+
} | null;
|
|
40
|
+
/**
|
|
41
|
+
* A stored path, made absolute. `~` is expanded because a profile is a file a
|
|
42
|
+
* developer keeps in their home directory as often as in the repository, and
|
|
43
|
+
* anything relative is resolved against the board root rather than the cwd, so
|
|
44
|
+
* `lpm` gives the same answer from any folder in the checkout.
|
|
45
|
+
*/
|
|
46
|
+
export declare function resolveProfilePath(paths: BoardPaths, ref: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* The ignore entries this board's `.lpm/.gitignore` is still missing, in the
|
|
49
|
+
* order they should appear. The read-only half of `ensureLocalIgnored`; the
|
|
50
|
+
* check reports from this, and the fix calls the writer.
|
|
51
|
+
*/
|
|
52
|
+
export declare function missingIgnoredEntries(paths: BoardPaths): string[];
|
|
53
|
+
/**
|
|
54
|
+
* Add `local.json`, the credentials file, the write lock and remote credential
|
|
55
|
+
* patterns to `.lpm/.gitignore`. Returns true if the file changed.
|
|
56
|
+
*/
|
|
57
|
+
export declare function ensureLocalIgnored(paths: BoardPaths): boolean;
|