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,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ledger — which remote owns which document, across every declared remote.
|
|
3
|
+
*
|
|
4
|
+
* A board may declare several remotes, and each keeps its own correspondence
|
|
5
|
+
* store (`.lpm/remotes/<name>/links.json`). Read one at a time they answer "is
|
|
6
|
+
* LP-12 on *this* tracker?"; nothing answered the question a person actually
|
|
7
|
+
* asks, which is **"where does LP-12 live?"** — and nothing stopped the same
|
|
8
|
+
* document being filed onto two trackers at once. Two twins of one story is not
|
|
9
|
+
* a mirror of a plan: a status moves on one side, the other keeps its own, and
|
|
10
|
+
* the next sync of each writes a different truth back onto the same document.
|
|
11
|
+
*
|
|
12
|
+
* So: **one document, one remote, at a time.** This module is the whole of that
|
|
13
|
+
* rule. It is deliberately a *derived* index rather than a file of its own —
|
|
14
|
+
* built by reading the stores that already exist, in the same spirit as the
|
|
15
|
+
* dependency inverses the engine derives at load. A committed `ledger.json`
|
|
16
|
+
* would be a second copy of a fact the link stores already hold, free to
|
|
17
|
+
* disagree with them after a merge, and needing its own repair pass to say
|
|
18
|
+
* which copy was right. There is nothing to repair here: the stores *are* the
|
|
19
|
+
* ledger.
|
|
20
|
+
*
|
|
21
|
+
* Where it is enforced, and what happens:
|
|
22
|
+
*
|
|
23
|
+
* - `lpm remote push` — a document another remote owns is never created a
|
|
24
|
+
* second time. It is reported in the plan's `skipped` list with the reason
|
|
25
|
+
* `owned_elsewhere` and the key it already has, exactly as a decoupled
|
|
26
|
+
* document is reported, so a whole-board push to a second remote is a
|
|
27
|
+
* readable report rather than a refusal or a duplicate.
|
|
28
|
+
* - `lpm remote link` — adopting a twin for a document that already has one
|
|
29
|
+
* elsewhere is refused outright, because it is one explicit document and
|
|
30
|
+
* the person is asking for the thing the rule forbids.
|
|
31
|
+
*
|
|
32
|
+
* Nothing here writes. The remedy — `lpm remote decouple <id>` on the remote
|
|
33
|
+
* that holds it — is the operator's, and is named in every message.
|
|
34
|
+
*/
|
|
35
|
+
import { remoteNamed, remoteNames } from '../core/config/lookup.js';
|
|
36
|
+
import { BoardError } from '../core/errors.js';
|
|
37
|
+
import { loadLinkStore } from './links.js';
|
|
38
|
+
/**
|
|
39
|
+
* Build the ledger by reading every declared remote's link store.
|
|
40
|
+
*
|
|
41
|
+
* A remote whose store does not exist yet contributes nothing (the first sync
|
|
42
|
+
* creates it). A document that somehow appears in two stores — a hand-edited
|
|
43
|
+
* file, a merge that took both sides — is reported by `conflicts()` rather than
|
|
44
|
+
* silently resolved: this is a read, and picking a winner is not its call.
|
|
45
|
+
*/
|
|
46
|
+
export function buildLedger(paths, config) {
|
|
47
|
+
const byLocalId = new Map();
|
|
48
|
+
const byRemote = new Map();
|
|
49
|
+
for (const name of remoteNames(config)) {
|
|
50
|
+
const provider = remoteNamed(config, name)?.provider ?? name;
|
|
51
|
+
const store = loadLinkStore(paths, name);
|
|
52
|
+
const entries = [];
|
|
53
|
+
for (const [localId, link] of store.links) {
|
|
54
|
+
const entry = {
|
|
55
|
+
localId,
|
|
56
|
+
remote: name,
|
|
57
|
+
provider,
|
|
58
|
+
remoteId: link.remoteId,
|
|
59
|
+
remoteKey: link.remoteKey,
|
|
60
|
+
remoteUrl: link.remoteUrl,
|
|
61
|
+
syncedAt: link.syncedAt,
|
|
62
|
+
};
|
|
63
|
+
entries.push(entry);
|
|
64
|
+
// First writer wins the index; `conflicts` reports the rest, so a board
|
|
65
|
+
// in this state is told about it rather than quietly given an answer.
|
|
66
|
+
if (!byLocalId.has(localId))
|
|
67
|
+
byLocalId.set(localId, entry);
|
|
68
|
+
}
|
|
69
|
+
entries.sort((a, b) => a.localId.localeCompare(b.localId));
|
|
70
|
+
byRemote.set(name, entries);
|
|
71
|
+
}
|
|
72
|
+
return { byLocalId, byRemote };
|
|
73
|
+
}
|
|
74
|
+
/** Where one document is filed, or `undefined` when it has no twin anywhere. */
|
|
75
|
+
export function ownerOf(ledger, localId) {
|
|
76
|
+
return ledger.byLocalId.get(localId);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The remote a document is filed on, when that is not `remoteName` — the one
|
|
80
|
+
* question every enforcement point asks. `undefined` means the document is free
|
|
81
|
+
* (no twin at all) or already belongs to this remote.
|
|
82
|
+
*/
|
|
83
|
+
export function otherOwner(ledger, localId, remoteName) {
|
|
84
|
+
const entry = ledger.byLocalId.get(localId);
|
|
85
|
+
return entry !== undefined && entry.remote !== remoteName ? entry : undefined;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Every document filed somewhere other than `remoteName`. The push planner
|
|
89
|
+
* takes this as the set it must not create a second twin for.
|
|
90
|
+
*/
|
|
91
|
+
export function idsOwnedElsewhere(ledger, remoteName) {
|
|
92
|
+
const out = new Map();
|
|
93
|
+
for (const [localId, entry] of ledger.byLocalId) {
|
|
94
|
+
if (entry.remote !== remoteName)
|
|
95
|
+
out.set(localId, entry);
|
|
96
|
+
}
|
|
97
|
+
return out;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Documents that appear in more than one remote's store — the state this rule
|
|
101
|
+
* exists to prevent, arrived at by a hand edit or a merge that took both sides.
|
|
102
|
+
* Reported by `lpm remote ledger`, never repaired here.
|
|
103
|
+
*/
|
|
104
|
+
export function conflicts(paths, config) {
|
|
105
|
+
const seen = new Map();
|
|
106
|
+
for (const name of remoteNames(config)) {
|
|
107
|
+
const provider = remoteNamed(config, name)?.provider ?? name;
|
|
108
|
+
const store = loadLinkStore(paths, name);
|
|
109
|
+
for (const [localId, link] of store.links) {
|
|
110
|
+
const entry = {
|
|
111
|
+
localId,
|
|
112
|
+
remote: name,
|
|
113
|
+
provider,
|
|
114
|
+
remoteId: link.remoteId,
|
|
115
|
+
remoteKey: link.remoteKey,
|
|
116
|
+
remoteUrl: link.remoteUrl,
|
|
117
|
+
syncedAt: link.syncedAt,
|
|
118
|
+
};
|
|
119
|
+
const group = seen.get(localId);
|
|
120
|
+
if (group)
|
|
121
|
+
group.push(entry);
|
|
122
|
+
else
|
|
123
|
+
seen.set(localId, [entry]);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return [...seen.values()]
|
|
127
|
+
.filter((group) => group.length > 1)
|
|
128
|
+
.sort((a, b) => a[0].localId.localeCompare(b[0].localId));
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Refuse an operation that would give `localId` a second twin.
|
|
132
|
+
*
|
|
133
|
+
* Used where the request names one document explicitly (`lpm remote link`): the
|
|
134
|
+
* person asked for exactly the thing the rule forbids, so the answer is an
|
|
135
|
+
* error naming the holder and the one command that releases it. A bulk push
|
|
136
|
+
* reports instead — see the module comment.
|
|
137
|
+
*/
|
|
138
|
+
export function requireUnclaimed(ledger, localId, remoteName) {
|
|
139
|
+
const owner = otherOwner(ledger, localId, remoteName);
|
|
140
|
+
if (owner === undefined)
|
|
141
|
+
return;
|
|
142
|
+
throw new BoardError(`${localId} is already mirrored on remote "${owner.remote}" as ${owner.remoteKey}`, [
|
|
143
|
+
'A document is mirrored by one remote at a time, so its status and fields have one upstream.',
|
|
144
|
+
`Release it first: lpm remote decouple ${localId}`,
|
|
145
|
+
`Then file it here: lpm remote push ${localId} --remote ${remoteName}`,
|
|
146
|
+
]);
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=ledger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ledger.js","sourceRoot":"","sources":["../../src/remote/ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAIH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA4B3C;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,MAAmB;IAChE,MAAM,SAAS,GAAG,IAAI,GAAG,EAAuB,CAAC;IACjD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAyB,CAAC;IAElD,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;QACvC,MAAM,QAAQ,GA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AG,CAAC,OAAO,CAAC,CAAC;YAChC,IAAI,KAAK;gBAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;gBACxB,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;SACtB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;SACnC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AAChE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAc,EAAE,OAAe,EAAE,UAAkB;IAClF,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IACtD,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO;IAChC,MAAM,IAAI,UAAU,CAClB,GAAG,OAAO,mCAAmC,KAAK,CAAC,MAAM,QAAQ,KAAK,CAAC,SAAS,EAAE,EAClF;QACE,6FAA6F;QAC7F,0CAA0C,OAAO,EAAE;QACnD,sCAAsC,OAAO,aAAa,UAAU,EAAE;KACvE,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Link lifecycle — the state of each correspondence, and whether it still
|
|
3
|
+
* exists at all (LP-363).
|
|
4
|
+
*
|
|
5
|
+
* A link between a local document and a remote issue is not a boolean; it is a
|
|
6
|
+
* state. The remote side can be deleted, moved, converted or hidden from view
|
|
7
|
+
* at any moment, and light-plan finds out on the next pull, after the fact. So
|
|
8
|
+
* this file is the resolver that names the state: given the board, the link
|
|
9
|
+
* store and the remote issues that were fetched, it reports exactly one state
|
|
10
|
+
* per in-scope correspondence:
|
|
11
|
+
*
|
|
12
|
+
* linked both sides exist and correspond
|
|
13
|
+
* local_only an in-scope document that has never been pushed
|
|
14
|
+
* remote_only an in-scope remote issue with no local document — adoptable
|
|
15
|
+
* orphaned a link one side of which is gone; `side` says which
|
|
16
|
+
* decoupled a human dropped the link on purpose; never re-filed
|
|
17
|
+
* conflicted two sides disagree about existence, and a human must choose
|
|
18
|
+
*
|
|
19
|
+
* ## Pure by construction
|
|
20
|
+
*
|
|
21
|
+
* The resolver is a pure function: board in, links in, remote issues in, states
|
|
22
|
+
* out. It reads no disk and makes no request, so the whole state table is
|
|
23
|
+
* testable from literals and a dry-run is the same code path as a real sync.
|
|
24
|
+
*
|
|
25
|
+
* ## Derived, never stored — except `decoupled`
|
|
26
|
+
*
|
|
27
|
+
* Every state is derived from the three inputs, except `decoupled`. Whether a
|
|
28
|
+
* human once said "forget the remote twin" is a fact, not a computation, so it
|
|
29
|
+
* lives in the link store as a tombstone (`links.ts`, written by LP-366; this
|
|
30
|
+
* resolver only reads it). Deriving it would be guessing, and guessing re-files
|
|
31
|
+
* a document a human deliberately cut loose.
|
|
32
|
+
*
|
|
33
|
+
* ## The two directions of `orphaned`
|
|
34
|
+
*
|
|
35
|
+
* A link whose local document is gone is our own doing and safe to reason
|
|
36
|
+
* about: somebody deleted the document, and the remote twin is simply
|
|
37
|
+
* unanchored. A link whose remote twin is absent from the fetched set is a
|
|
38
|
+
* different matter — it may be deleted, moved, archived, or hidden by a
|
|
39
|
+
* credential that lost scope — and LP-364 tells those apart: a remote-side
|
|
40
|
+
* orphan carries an `absence` of `deleted`, `unreachable` or `out_of_scope`,
|
|
41
|
+
* each with the `evidence` behind it, and a run that is unreachable as a whole
|
|
42
|
+
* sets `runUnreachable` so the caller writes nothing. The resolver records
|
|
43
|
+
* both directions under one `orphaned` state with a `side` that keeps them
|
|
44
|
+
* distinct.
|
|
45
|
+
*
|
|
46
|
+
* ## Scope
|
|
47
|
+
*
|
|
48
|
+
* A document outside the remote's `scope:` subtree is not reported in any state
|
|
49
|
+
* — it is somebody else's board. A linked document that moved out of scope is
|
|
50
|
+
* likewise silent here; LP-366 turns that into a tombstone with reason
|
|
51
|
+
* `out_of_scope`. A fetched remote issue is "in scope" when its remote-parent
|
|
52
|
+
* chain anchors at a linked local document inside the subtree; that anchor walk
|
|
53
|
+
* mirrors `planPull`'s and must stay in step with it.
|
|
54
|
+
*
|
|
55
|
+
* ## Out of scope for this story
|
|
56
|
+
*
|
|
57
|
+
* Acting on a state is not this story's. LP-365 resolves orphaned twins,
|
|
58
|
+
* LP-366 writes tombstones, LP-367 adopts `remote_only` issues, and LP-368
|
|
59
|
+
* reports shape divergence (a remote reparent or retype) — the other way a
|
|
60
|
+
* correspondence reaches `conflicted`. The planners consume this report; this
|
|
61
|
+
* file only names states.
|
|
62
|
+
*/
|
|
63
|
+
import type { BoardView } from '../shared/plans/reading.js';
|
|
64
|
+
import type { LinkStore } from './links.js';
|
|
65
|
+
import type { RemoteSnapshot } from './plan.js';
|
|
66
|
+
import type { ReachabilityResult, RemoteRecord } from './provider.js';
|
|
67
|
+
/** The six lifecycle states a correspondence can be in. */
|
|
68
|
+
export type LifecycleState = 'linked' | 'local_only' | 'remote_only' | 'orphaned' | 'decoupled' | 'conflicted';
|
|
69
|
+
/** Which side of a broken link is gone. */
|
|
70
|
+
export type OrphanedSide = 'local' | 'remote';
|
|
71
|
+
/**
|
|
72
|
+
* Why a linked remote twin is absent from the fetched listing (LP-364). Three
|
|
73
|
+
* answers, and they are never conflated: `deleted` means the twin is genuinely
|
|
74
|
+
* gone; `unreachable` means the remote could not be seen (or the run declined
|
|
75
|
+
* to decide); `out_of_scope` means the twin exists but left the configured
|
|
76
|
+
* scope (moved project, closed milestone, transferred repo).
|
|
77
|
+
*/
|
|
78
|
+
export type RemoteAbsence = 'deleted' | 'unreachable' | 'out_of_scope';
|
|
79
|
+
/**
|
|
80
|
+
* What a direct read of one absent twin saw — the caller already fetched this
|
|
81
|
+
* (the resolver itself makes no request). `not_found` is a 404/410; `found`
|
|
82
|
+
* means the twin exists but is not in the scoped listing, which is
|
|
83
|
+
* `out_of_scope`, never `deleted`; `error` means the read failed, which cannot
|
|
84
|
+
* prove a deletion. Each carries its own evidence, so a surprising
|
|
85
|
+
* classification can be argued with.
|
|
86
|
+
*/
|
|
87
|
+
export type TwinRead = {
|
|
88
|
+
kind: 'not_found';
|
|
89
|
+
evidence: string;
|
|
90
|
+
} | {
|
|
91
|
+
kind: 'found';
|
|
92
|
+
evidence: string;
|
|
93
|
+
} | {
|
|
94
|
+
kind: 'error';
|
|
95
|
+
evidence: string;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* The bulk guard's default: a run where more than half the linked twins are
|
|
99
|
+
* missing at once is treated as unreachable. Real deletions arrive a few at a
|
|
100
|
+
* time; infrastructure failures arrive all at once. Set `bulk_guard` in the
|
|
101
|
+
* remote's config to move it (1 disables the guard — a fraction never exceeds 1).
|
|
102
|
+
*/
|
|
103
|
+
export declare const DEFAULT_BULK_GUARD = 0.5;
|
|
104
|
+
/** One correspondence's state, as the resolver reports it. */
|
|
105
|
+
export interface LifecycleEntry {
|
|
106
|
+
state: LifecycleState;
|
|
107
|
+
/** The local document id, when there is (or was) one. */
|
|
108
|
+
localId?: string;
|
|
109
|
+
/** The remote issue id, when there is (or was) one. */
|
|
110
|
+
remoteId?: string;
|
|
111
|
+
/** Human-readable remote key, carried from the link store when present. */
|
|
112
|
+
remoteKey?: string;
|
|
113
|
+
/** Full URL to the remote issue, carried from the link store when present. */
|
|
114
|
+
remoteUrl?: string;
|
|
115
|
+
/** Which side is missing; present only when `state` is `orphaned`. */
|
|
116
|
+
side?: OrphanedSide;
|
|
117
|
+
/**
|
|
118
|
+
* Why the remote twin is absent; present only when `state` is `orphaned` and
|
|
119
|
+
* `side` is `remote` (LP-364). `deleted`, `unreachable` or `out_of_scope`.
|
|
120
|
+
*/
|
|
121
|
+
absence?: RemoteAbsence;
|
|
122
|
+
/** The evidence behind `absence` — the request and answer that produced it. */
|
|
123
|
+
evidence?: string;
|
|
124
|
+
/** Why the document was decoupled; present only when `state` is `decoupled`. */
|
|
125
|
+
reason?: string;
|
|
126
|
+
}
|
|
127
|
+
/** What `resolveLifecycle` returns: one entry per in-scope correspondence. */
|
|
128
|
+
export interface LifecycleReport {
|
|
129
|
+
entries: LifecycleEntry[];
|
|
130
|
+
/**
|
|
131
|
+
* True when the run as a whole is unreachable — the remote's own probe failed
|
|
132
|
+
* or the bulk guard tripped — and therefore nothing may be written to either
|
|
133
|
+
* side. A caller that writes anyway would be turning an expired credential
|
|
134
|
+
* into a wave of deletions (LP-364).
|
|
135
|
+
*/
|
|
136
|
+
runUnreachable: boolean;
|
|
137
|
+
/** Why the run is unreachable, when it is — the evidence behind the verdict. */
|
|
138
|
+
runUnreachableReason?: string;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The one seam the resolver needs beyond the board, links and remote issues:
|
|
142
|
+
* reading a record's remote parent id, for providers that hold a native
|
|
143
|
+
* hierarchy. Omit it (or return undefined) for a flat remote, and unlinked
|
|
144
|
+
* remote issues with no remote parent are unanchored — which, for a scoped
|
|
145
|
+
* remote, means out of scope.
|
|
146
|
+
*/
|
|
147
|
+
export interface LifecycleOptions {
|
|
148
|
+
parentIdOf?: (record: RemoteRecord) => string | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* The reachability probe's answer, when the caller ran it. A failed probe
|
|
151
|
+
* makes the whole run unreachable — no twin is classified `deleted`.
|
|
152
|
+
*/
|
|
153
|
+
reachability?: ReachabilityResult;
|
|
154
|
+
/**
|
|
155
|
+
* A direct read of one absent twin, when the caller performed one. Absent
|
|
156
|
+
* means the run has no per-twin evidence, so a missing twin is classified
|
|
157
|
+
* conservatively (`unreachable`) rather than `deleted`.
|
|
158
|
+
*/
|
|
159
|
+
readOf?: (remoteId: string) => TwinRead | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* The bulk guard fraction: a run where more than this fraction of linked
|
|
162
|
+
* twins is missing at once is `unreachable` regardless of individual reads.
|
|
163
|
+
* Defaults to {@link DEFAULT_BULK_GUARD}.
|
|
164
|
+
*/
|
|
165
|
+
bulkGuard?: number;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Classify every in-scope correspondence into exactly one lifecycle state.
|
|
169
|
+
*
|
|
170
|
+
* Pure: no disk, no network. `remote.issues` is the listing the caller already
|
|
171
|
+
* fetched (remote id → raw record); for a `direction: push` remote nothing is
|
|
172
|
+
* fetched, so the remote side is not assessed — linked documents stay `linked`,
|
|
173
|
+
* and neither `remote_only` nor a remote-side `orphaned` is reported.
|
|
174
|
+
*/
|
|
175
|
+
export declare function resolveLifecycle(board: BoardView, links: LinkStore, remote: RemoteSnapshot, options?: LifecycleOptions): LifecycleReport;
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Link lifecycle — the state of each correspondence, and whether it still
|
|
3
|
+
* exists at all (LP-363).
|
|
4
|
+
*
|
|
5
|
+
* A link between a local document and a remote issue is not a boolean; it is a
|
|
6
|
+
* state. The remote side can be deleted, moved, converted or hidden from view
|
|
7
|
+
* at any moment, and light-plan finds out on the next pull, after the fact. So
|
|
8
|
+
* this file is the resolver that names the state: given the board, the link
|
|
9
|
+
* store and the remote issues that were fetched, it reports exactly one state
|
|
10
|
+
* per in-scope correspondence:
|
|
11
|
+
*
|
|
12
|
+
* linked both sides exist and correspond
|
|
13
|
+
* local_only an in-scope document that has never been pushed
|
|
14
|
+
* remote_only an in-scope remote issue with no local document — adoptable
|
|
15
|
+
* orphaned a link one side of which is gone; `side` says which
|
|
16
|
+
* decoupled a human dropped the link on purpose; never re-filed
|
|
17
|
+
* conflicted two sides disagree about existence, and a human must choose
|
|
18
|
+
*
|
|
19
|
+
* ## Pure by construction
|
|
20
|
+
*
|
|
21
|
+
* The resolver is a pure function: board in, links in, remote issues in, states
|
|
22
|
+
* out. It reads no disk and makes no request, so the whole state table is
|
|
23
|
+
* testable from literals and a dry-run is the same code path as a real sync.
|
|
24
|
+
*
|
|
25
|
+
* ## Derived, never stored — except `decoupled`
|
|
26
|
+
*
|
|
27
|
+
* Every state is derived from the three inputs, except `decoupled`. Whether a
|
|
28
|
+
* human once said "forget the remote twin" is a fact, not a computation, so it
|
|
29
|
+
* lives in the link store as a tombstone (`links.ts`, written by LP-366; this
|
|
30
|
+
* resolver only reads it). Deriving it would be guessing, and guessing re-files
|
|
31
|
+
* a document a human deliberately cut loose.
|
|
32
|
+
*
|
|
33
|
+
* ## The two directions of `orphaned`
|
|
34
|
+
*
|
|
35
|
+
* A link whose local document is gone is our own doing and safe to reason
|
|
36
|
+
* about: somebody deleted the document, and the remote twin is simply
|
|
37
|
+
* unanchored. A link whose remote twin is absent from the fetched set is a
|
|
38
|
+
* different matter — it may be deleted, moved, archived, or hidden by a
|
|
39
|
+
* credential that lost scope — and LP-364 tells those apart: a remote-side
|
|
40
|
+
* orphan carries an `absence` of `deleted`, `unreachable` or `out_of_scope`,
|
|
41
|
+
* each with the `evidence` behind it, and a run that is unreachable as a whole
|
|
42
|
+
* sets `runUnreachable` so the caller writes nothing. The resolver records
|
|
43
|
+
* both directions under one `orphaned` state with a `side` that keeps them
|
|
44
|
+
* distinct.
|
|
45
|
+
*
|
|
46
|
+
* ## Scope
|
|
47
|
+
*
|
|
48
|
+
* A document outside the remote's `scope:` subtree is not reported in any state
|
|
49
|
+
* — it is somebody else's board. A linked document that moved out of scope is
|
|
50
|
+
* likewise silent here; LP-366 turns that into a tombstone with reason
|
|
51
|
+
* `out_of_scope`. A fetched remote issue is "in scope" when its remote-parent
|
|
52
|
+
* chain anchors at a linked local document inside the subtree; that anchor walk
|
|
53
|
+
* mirrors `planPull`'s and must stay in step with it.
|
|
54
|
+
*
|
|
55
|
+
* ## Out of scope for this story
|
|
56
|
+
*
|
|
57
|
+
* Acting on a state is not this story's. LP-365 resolves orphaned twins,
|
|
58
|
+
* LP-366 writes tombstones, LP-367 adopts `remote_only` issues, and LP-368
|
|
59
|
+
* reports shape divergence (a remote reparent or retype) — the other way a
|
|
60
|
+
* correspondence reaches `conflicted`. The planners consume this report; this
|
|
61
|
+
* file only names states.
|
|
62
|
+
*/
|
|
63
|
+
import { subtreeIds } from '../shared/plans/reading.js';
|
|
64
|
+
import { getTombstone } from './links.js';
|
|
65
|
+
/**
|
|
66
|
+
* The bulk guard's default: a run where more than half the linked twins are
|
|
67
|
+
* missing at once is treated as unreachable. Real deletions arrive a few at a
|
|
68
|
+
* time; infrastructure failures arrive all at once. Set `bulk_guard` in the
|
|
69
|
+
* remote's config to move it (1 disables the guard — a fraction never exceeds 1).
|
|
70
|
+
*/
|
|
71
|
+
export const DEFAULT_BULK_GUARD = 0.5;
|
|
72
|
+
/**
|
|
73
|
+
* Classify every in-scope correspondence into exactly one lifecycle state.
|
|
74
|
+
*
|
|
75
|
+
* Pure: no disk, no network. `remote.issues` is the listing the caller already
|
|
76
|
+
* fetched (remote id → raw record); for a `direction: push` remote nothing is
|
|
77
|
+
* fetched, so the remote side is not assessed — linked documents stay `linked`,
|
|
78
|
+
* and neither `remote_only` nor a remote-side `orphaned` is reported.
|
|
79
|
+
*/
|
|
80
|
+
export function resolveLifecycle(board, links, remote, options = {}) {
|
|
81
|
+
const scopeSet = remote.scope ? new Set(subtreeIds(board, remote.scope)) : null;
|
|
82
|
+
// Absence is only evidence when the listing was exhaustive. A pull that
|
|
83
|
+
// fetched the two issues somebody named (`remote.partial`) says nothing
|
|
84
|
+
// about the other two hundred, so no twin is assessed against it — without
|
|
85
|
+
// this, a targeted pull on a mirrored board reads every other twin as
|
|
86
|
+
// deleted and the bulk guard (correctly) refuses the whole run.
|
|
87
|
+
const assessRemote = remote.direction !== 'push' && remote.partial !== true;
|
|
88
|
+
const entries = [];
|
|
89
|
+
// -- remote ids claimed by more than one live local document ---------------
|
|
90
|
+
// A one-to-many correspondence is an existence disagreement: two documents
|
|
91
|
+
// claim one twin, and neither classification is safe. Marked `conflicted`;
|
|
92
|
+
// LP-367 refuses to create such a link, but a hand-edited or merge-mangled
|
|
93
|
+
// store can still hold one. Only live documents count — a link whose local
|
|
94
|
+
// document is gone is an orphaned link, not a claimant.
|
|
95
|
+
const claimants = new Map();
|
|
96
|
+
for (const [localId, entry] of links.links) {
|
|
97
|
+
const node = board.nodes[localId];
|
|
98
|
+
if (node === undefined || node.kind !== 'issue')
|
|
99
|
+
continue;
|
|
100
|
+
const ids = claimants.get(entry.remoteId);
|
|
101
|
+
if (ids)
|
|
102
|
+
ids.push(localId);
|
|
103
|
+
else
|
|
104
|
+
claimants.set(entry.remoteId, [localId]);
|
|
105
|
+
}
|
|
106
|
+
const collided = new Set();
|
|
107
|
+
for (const ids of claimants.values()) {
|
|
108
|
+
if (ids.length > 1)
|
|
109
|
+
for (const id of ids)
|
|
110
|
+
collided.add(id);
|
|
111
|
+
}
|
|
112
|
+
// -- local documents in scope ----------------------------------------------
|
|
113
|
+
const localIssues = Object.values(board.nodes)
|
|
114
|
+
.filter((node) => node.kind === 'issue')
|
|
115
|
+
.filter((issue) => scopeSet === null || scopeSet.has(issue.id))
|
|
116
|
+
.sort((a, b) => a.id.localeCompare(b.id));
|
|
117
|
+
// -- LP-364: why a remote twin is absent -----------------------------------
|
|
118
|
+
// A linked twin absent from the fetched listing may be deleted, moved out of
|
|
119
|
+
// scope, or hidden by a credential that lost access. Those three are never
|
|
120
|
+
// conflated: first the reachability probe (the whole remote cannot be seen),
|
|
121
|
+
// then the bulk guard (too many vanished at once to be deletions), then the
|
|
122
|
+
// per-twin read (a 404 proves deletion, a live twin proves out-of-scope).
|
|
123
|
+
const reachability = options.reachability;
|
|
124
|
+
const readOf = options.readOf;
|
|
125
|
+
const bulkGuard = options.bulkGuard ?? DEFAULT_BULK_GUARD;
|
|
126
|
+
// The denominator and numerator the bulk guard counts: live, in-scope,
|
|
127
|
+
// non-tombstoned, non-collided linked documents, and the subset whose twin
|
|
128
|
+
// is absent from the listing.
|
|
129
|
+
const missingIds = [];
|
|
130
|
+
let linkedTotal = 0;
|
|
131
|
+
if (assessRemote) {
|
|
132
|
+
for (const issue of localIssues) {
|
|
133
|
+
if (getTombstone(links, issue.id) !== undefined)
|
|
134
|
+
continue;
|
|
135
|
+
const link = links.links.get(issue.id);
|
|
136
|
+
if (link === undefined || collided.has(issue.id))
|
|
137
|
+
continue;
|
|
138
|
+
linkedTotal += 1;
|
|
139
|
+
if (!remote.issues.has(link.remoteId))
|
|
140
|
+
missingIds.push(issue.id);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
let runUnreachable = false;
|
|
144
|
+
let runUnreachableReason;
|
|
145
|
+
if (assessRemote && reachability !== undefined && !reachability.reachable) {
|
|
146
|
+
runUnreachable = true;
|
|
147
|
+
runUnreachableReason = reachability.evidence;
|
|
148
|
+
}
|
|
149
|
+
else if (assessRemote && linkedTotal > 0 && missingIds.length / linkedTotal > bulkGuard) {
|
|
150
|
+
runUnreachable = true;
|
|
151
|
+
runUnreachableReason =
|
|
152
|
+
`bulk guard: ${missingIds.length} of ${linkedTotal} linked twins are missing ` +
|
|
153
|
+
`(threshold ${bulkGuard}) — declined to treat them as deletions`;
|
|
154
|
+
}
|
|
155
|
+
for (const issue of localIssues) {
|
|
156
|
+
const tombstone = getTombstone(links, issue.id);
|
|
157
|
+
if (tombstone !== undefined) {
|
|
158
|
+
// A human decision outranks everything else: never linked, never
|
|
159
|
+
// local_only, never re-filed, whatever either side now looks like.
|
|
160
|
+
entries.push({
|
|
161
|
+
state: 'decoupled',
|
|
162
|
+
localId: issue.id,
|
|
163
|
+
remoteKey: tombstone.remoteKey || undefined,
|
|
164
|
+
reason: tombstone.reason || undefined,
|
|
165
|
+
});
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
const link = links.links.get(issue.id);
|
|
169
|
+
if (link === undefined) {
|
|
170
|
+
entries.push({ state: 'local_only', localId: issue.id });
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
if (collided.has(issue.id)) {
|
|
174
|
+
entries.push(linkEntry('conflicted', issue.id, link));
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
if (!assessRemote || remote.issues.has(link.remoteId)) {
|
|
178
|
+
entries.push(linkEntry('linked', issue.id, link));
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
entries.push(classifyAbsent(issue.id, link, runUnreachable, runUnreachableReason, readOf));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
// -- links whose local document no longer exists ---------------------------
|
|
185
|
+
const orphanedLocal = [];
|
|
186
|
+
for (const [localId, link] of links.links) {
|
|
187
|
+
const node = board.nodes[localId];
|
|
188
|
+
if (node !== undefined && node.kind === 'issue')
|
|
189
|
+
continue; // handled above or out of scope
|
|
190
|
+
orphanedLocal.push({ ...linkEntry('orphaned', localId, link), side: 'local' });
|
|
191
|
+
}
|
|
192
|
+
orphanedLocal.sort((a, b) => a.localId.localeCompare(b.localId));
|
|
193
|
+
entries.push(...orphanedLocal);
|
|
194
|
+
// -- remote issues in scope with no local document -------------------------
|
|
195
|
+
if (assessRemote) {
|
|
196
|
+
// Anchor a remote issue in the local tree: its own twin when it has one,
|
|
197
|
+
// otherwise the anchor of its remote parent. Mirrors `planPull`'s
|
|
198
|
+
// `anchorOf`; a change to one must follow the other.
|
|
199
|
+
const anchorMemo = new Map();
|
|
200
|
+
const anchorOf = (remoteId) => {
|
|
201
|
+
if (anchorMemo.has(remoteId))
|
|
202
|
+
return anchorMemo.get(remoteId);
|
|
203
|
+
anchorMemo.set(remoteId, undefined); // cycle guard
|
|
204
|
+
const linked = links.byRemote.get(remoteId);
|
|
205
|
+
if (linked !== undefined) {
|
|
206
|
+
anchorMemo.set(remoteId, linked);
|
|
207
|
+
return linked;
|
|
208
|
+
}
|
|
209
|
+
const record = remote.issues.get(remoteId);
|
|
210
|
+
const parentRemote = record && options.parentIdOf ? options.parentIdOf(record) : undefined;
|
|
211
|
+
if (parentRemote) {
|
|
212
|
+
const anchored = anchorOf(parentRemote);
|
|
213
|
+
anchorMemo.set(remoteId, anchored);
|
|
214
|
+
return anchored;
|
|
215
|
+
}
|
|
216
|
+
return undefined;
|
|
217
|
+
};
|
|
218
|
+
const inScopeRemote = (remoteId) => {
|
|
219
|
+
if (scopeSet === null)
|
|
220
|
+
return true;
|
|
221
|
+
const anchored = anchorOf(remoteId);
|
|
222
|
+
return anchored !== undefined && scopeSet.has(anchored);
|
|
223
|
+
};
|
|
224
|
+
const remoteOnly = [...remote.issues.keys()]
|
|
225
|
+
.filter((remoteId) => !links.byRemote.has(remoteId) && inScopeRemote(remoteId))
|
|
226
|
+
.sort((a, b) => a.localeCompare(b))
|
|
227
|
+
.map((remoteId) => ({ state: 'remote_only', remoteId }));
|
|
228
|
+
entries.push(...remoteOnly);
|
|
229
|
+
}
|
|
230
|
+
return {
|
|
231
|
+
entries,
|
|
232
|
+
runUnreachable,
|
|
233
|
+
...(runUnreachableReason === undefined ? {} : { runUnreachableReason }),
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Classify one linked, in-scope document whose twin is absent from the fetched
|
|
238
|
+
* listing. A run already judged unreachable (probe or bulk) overrides every
|
|
239
|
+
* per-twin read; otherwise the direct read decides: a 404 is `deleted`, a live
|
|
240
|
+
* twin is `out_of_scope`, anything else is `unreachable`.
|
|
241
|
+
*/
|
|
242
|
+
function classifyAbsent(localId, link, runUnreachable, runUnreachableReason, readOf) {
|
|
243
|
+
const base = { ...linkEntry('orphaned', localId, link), side: 'remote' };
|
|
244
|
+
if (runUnreachable) {
|
|
245
|
+
return { ...base, absence: 'unreachable', evidence: runUnreachableReason };
|
|
246
|
+
}
|
|
247
|
+
const read = readOf ? readOf(link.remoteId) : undefined;
|
|
248
|
+
if (read === undefined) {
|
|
249
|
+
return {
|
|
250
|
+
...base,
|
|
251
|
+
absence: 'unreachable',
|
|
252
|
+
evidence: 'no reachability signal and no direct read of the twin',
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
switch (read.kind) {
|
|
256
|
+
case 'not_found':
|
|
257
|
+
return { ...base, absence: 'deleted', evidence: read.evidence };
|
|
258
|
+
case 'found':
|
|
259
|
+
return { ...base, absence: 'out_of_scope', evidence: read.evidence };
|
|
260
|
+
case 'error':
|
|
261
|
+
return { ...base, absence: 'unreachable', evidence: read.evidence };
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
/** Build an entry that carries a link's remote identity. */
|
|
265
|
+
function linkEntry(state, localId, link) {
|
|
266
|
+
return {
|
|
267
|
+
state,
|
|
268
|
+
localId,
|
|
269
|
+
remoteId: link.remoteId,
|
|
270
|
+
remoteKey: link.remoteKey || undefined,
|
|
271
|
+
remoteUrl: link.remoteUrl || undefined,
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
//# sourceMappingURL=lifecycle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/remote/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAuC1C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAoEtC;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAgB,EAChB,KAAgB,EAChB,MAAsB,EACtB,UAA4B,EAAE;IAE9B,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAChF,wEAAwE;IACxE,wEAAwE;IACxE,2EAA2E;IAC3E,sEAAsE;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