@software-dlc/cli 0.157.2
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/CHANGELOG.md +11 -0
- package/LICENSE +105 -0
- package/README.md +31 -0
- package/dist/checkout.d.ts +43 -0
- package/dist/checkout.d.ts.map +1 -0
- package/dist/checkout.js +92 -0
- package/dist/checkout.js.map +1 -0
- package/dist/cli-arguments.d.ts +13 -0
- package/dist/cli-arguments.d.ts.map +1 -0
- package/dist/cli-arguments.js +67 -0
- package/dist/cli-arguments.js.map +1 -0
- package/dist/cli-branch-history.d.ts +48 -0
- package/dist/cli-branch-history.d.ts.map +1 -0
- package/dist/cli-branch-history.js +319 -0
- package/dist/cli-branch-history.js.map +1 -0
- package/dist/cli-branches.d.ts +22 -0
- package/dist/cli-branches.d.ts.map +1 -0
- package/dist/cli-branches.js +59 -0
- package/dist/cli-branches.js.map +1 -0
- package/dist/cli-deploy.d.ts +14 -0
- package/dist/cli-deploy.d.ts.map +1 -0
- package/dist/cli-deploy.js +164 -0
- package/dist/cli-deploy.js.map +1 -0
- package/dist/cli-health.d.ts +3 -0
- package/dist/cli-health.d.ts.map +1 -0
- package/dist/cli-health.js +73 -0
- package/dist/cli-health.js.map +1 -0
- package/dist/cli-help.d.ts +21 -0
- package/dist/cli-help.d.ts.map +1 -0
- package/dist/cli-help.js +176 -0
- package/dist/cli-help.js.map +1 -0
- package/dist/cli-login.d.ts +76 -0
- package/dist/cli-login.d.ts.map +1 -0
- package/dist/cli-login.js +634 -0
- package/dist/cli-login.js.map +1 -0
- package/dist/cli-operation.d.ts +2 -0
- package/dist/cli-operation.d.ts.map +1 -0
- package/dist/cli-operation.js +66 -0
- package/dist/cli-operation.js.map +1 -0
- package/dist/cli-org.d.ts +12 -0
- package/dist/cli-org.d.ts.map +1 -0
- package/dist/cli-org.js +218 -0
- package/dist/cli-org.js.map +1 -0
- package/dist/cli-rebuild.d.ts +20 -0
- package/dist/cli-rebuild.d.ts.map +1 -0
- package/dist/cli-rebuild.js +29 -0
- package/dist/cli-rebuild.js.map +1 -0
- package/dist/cli-reset.d.ts +27 -0
- package/dist/cli-reset.d.ts.map +1 -0
- package/dist/cli-reset.js +44 -0
- package/dist/cli-reset.js.map +1 -0
- package/dist/cli-snapshot.d.ts +398 -0
- package/dist/cli-snapshot.d.ts.map +1 -0
- package/dist/cli-snapshot.js +45 -0
- package/dist/cli-snapshot.js.map +1 -0
- package/dist/cli-task-context.d.ts +3 -0
- package/dist/cli-task-context.d.ts.map +1 -0
- package/dist/cli-task-context.js +112 -0
- package/dist/cli-task-context.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +1004 -0
- package/dist/cli.js.map +1 -0
- package/dist/graph-packages-lock.d.ts +169 -0
- package/dist/graph-packages-lock.d.ts.map +1 -0
- package/dist/graph-packages-lock.js +503 -0
- package/dist/graph-packages-lock.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/local/aggregate-preflight.d.ts +12 -0
- package/dist/local/aggregate-preflight.d.ts.map +1 -0
- package/dist/local/aggregate-preflight.js +22 -0
- package/dist/local/aggregate-preflight.js.map +1 -0
- package/dist/local/allow-mcp.d.ts +77 -0
- package/dist/local/allow-mcp.d.ts.map +1 -0
- package/dist/local/allow-mcp.js +394 -0
- package/dist/local/allow-mcp.js.map +1 -0
- package/dist/local/api-client.d.ts +15 -0
- package/dist/local/api-client.d.ts.map +1 -0
- package/dist/local/api-client.js +87 -0
- package/dist/local/api-client.js.map +1 -0
- package/dist/local/app-contract-readers.d.ts +229 -0
- package/dist/local/app-contract-readers.d.ts.map +1 -0
- package/dist/local/app-contract-readers.js +450 -0
- package/dist/local/app-contract-readers.js.map +1 -0
- package/dist/local/app-org-reader.d.ts +21 -0
- package/dist/local/app-org-reader.d.ts.map +1 -0
- package/dist/local/app-org-reader.js +66 -0
- package/dist/local/app-org-reader.js.map +1 -0
- package/dist/local/app-shell-readers.d.ts +96 -0
- package/dist/local/app-shell-readers.d.ts.map +1 -0
- package/dist/local/app-shell-readers.js +381 -0
- package/dist/local/app-shell-readers.js.map +1 -0
- package/dist/local/app-tasks-read.d.ts +202 -0
- package/dist/local/app-tasks-read.d.ts.map +1 -0
- package/dist/local/app-tasks-read.js +290 -0
- package/dist/local/app-tasks-read.js.map +1 -0
- package/dist/local/app-worktrees.d.ts +69 -0
- package/dist/local/app-worktrees.d.ts.map +1 -0
- package/dist/local/app-worktrees.js +554 -0
- package/dist/local/app-worktrees.js.map +1 -0
- package/dist/local/base-sync-manifest.d.ts +12 -0
- package/dist/local/base-sync-manifest.d.ts.map +1 -0
- package/dist/local/base-sync-manifest.js +57 -0
- package/dist/local/base-sync-manifest.js.map +1 -0
- package/dist/local/blast-radius.d.ts +191 -0
- package/dist/local/blast-radius.d.ts.map +1 -0
- package/dist/local/blast-radius.js +585 -0
- package/dist/local/blast-radius.js.map +1 -0
- package/dist/local/canonical.d.ts +2 -0
- package/dist/local/canonical.d.ts.map +1 -0
- package/dist/local/canonical.js +2 -0
- package/dist/local/canonical.js.map +1 -0
- package/dist/local/config.d.ts +22 -0
- package/dist/local/config.d.ts.map +1 -0
- package/dist/local/config.js +57 -0
- package/dist/local/config.js.map +1 -0
- package/dist/local/document-commands.d.ts +163 -0
- package/dist/local/document-commands.d.ts.map +1 -0
- package/dist/local/document-commands.js +620 -0
- package/dist/local/document-commands.js.map +1 -0
- package/dist/local/document-embeds.d.ts +21 -0
- package/dist/local/document-embeds.d.ts.map +1 -0
- package/dist/local/document-embeds.js +38 -0
- package/dist/local/document-embeds.js.map +1 -0
- package/dist/local/environment-context.d.ts +39 -0
- package/dist/local/environment-context.d.ts.map +1 -0
- package/dist/local/environment-context.js +193 -0
- package/dist/local/environment-context.js.map +1 -0
- package/dist/local/environment-exclude.d.ts +7 -0
- package/dist/local/environment-exclude.d.ts.map +1 -0
- package/dist/local/environment-exclude.js +82 -0
- package/dist/local/environment-exclude.js.map +1 -0
- package/dist/local/environment-sidecar.d.ts +126 -0
- package/dist/local/environment-sidecar.d.ts.map +1 -0
- package/dist/local/environment-sidecar.js +442 -0
- package/dist/local/environment-sidecar.js.map +1 -0
- package/dist/local/environment-switch.d.ts +22 -0
- package/dist/local/environment-switch.d.ts.map +1 -0
- package/dist/local/environment-switch.js +385 -0
- package/dist/local/environment-switch.js.map +1 -0
- package/dist/local/exact-remote-projection.d.ts +17 -0
- package/dist/local/exact-remote-projection.d.ts.map +1 -0
- package/dist/local/exact-remote-projection.js +53 -0
- package/dist/local/exact-remote-projection.js.map +1 -0
- package/dist/local/experimental/path-object-store.d.ts +66 -0
- package/dist/local/experimental/path-object-store.d.ts.map +1 -0
- package/dist/local/experimental/path-object-store.js +135 -0
- package/dist/local/experimental/path-object-store.js.map +1 -0
- package/dist/local/external-worktree-binding.d.ts +21 -0
- package/dist/local/external-worktree-binding.d.ts.map +1 -0
- package/dist/local/external-worktree-binding.js +56 -0
- package/dist/local/external-worktree-binding.js.map +1 -0
- package/dist/local/folder-members.d.ts +34 -0
- package/dist/local/folder-members.d.ts.map +1 -0
- package/dist/local/folder-members.js +168 -0
- package/dist/local/folder-members.js.map +1 -0
- package/dist/local/git-ref-authority.d.ts +11 -0
- package/dist/local/git-ref-authority.d.ts.map +1 -0
- package/dist/local/git-ref-authority.js +76 -0
- package/dist/local/git-ref-authority.js.map +1 -0
- package/dist/local/git.d.ts +88 -0
- package/dist/local/git.d.ts.map +1 -0
- package/dist/local/git.js +413 -0
- package/dist/local/git.js.map +1 -0
- package/dist/local/graph-read.d.ts +168 -0
- package/dist/local/graph-read.d.ts.map +1 -0
- package/dist/local/graph-read.js +360 -0
- package/dist/local/graph-read.js.map +1 -0
- package/dist/local/graph-sync.d.ts +39 -0
- package/dist/local/graph-sync.d.ts.map +1 -0
- package/dist/local/graph-sync.js +186 -0
- package/dist/local/graph-sync.js.map +1 -0
- package/dist/local/guide-commands.d.ts +79 -0
- package/dist/local/guide-commands.d.ts.map +1 -0
- package/dist/local/guide-commands.js +247 -0
- package/dist/local/guide-commands.js.map +1 -0
- package/dist/local/health-files.d.ts +24 -0
- package/dist/local/health-files.d.ts.map +1 -0
- package/dist/local/health-files.js +133 -0
- package/dist/local/health-files.js.map +1 -0
- package/dist/local/health-inspection.d.ts +12 -0
- package/dist/local/health-inspection.d.ts.map +1 -0
- package/dist/local/health-inspection.js +407 -0
- package/dist/local/health-inspection.js.map +1 -0
- package/dist/local/health-policy.d.ts +11 -0
- package/dist/local/health-policy.d.ts.map +1 -0
- package/dist/local/health-policy.js +257 -0
- package/dist/local/health-policy.js.map +1 -0
- package/dist/local/health-projection.d.ts +14 -0
- package/dist/local/health-projection.d.ts.map +1 -0
- package/dist/local/health-projection.js +102 -0
- package/dist/local/health-projection.js.map +1 -0
- package/dist/local/health-schema.d.ts +338 -0
- package/dist/local/health-schema.d.ts.map +1 -0
- package/dist/local/health-schema.js +213 -0
- package/dist/local/health-schema.js.map +1 -0
- package/dist/local/health-store.d.ts +61 -0
- package/dist/local/health-store.d.ts.map +1 -0
- package/dist/local/health-store.js +218 -0
- package/dist/local/health-store.js.map +1 -0
- package/dist/local/index.d.ts +66 -0
- package/dist/local/index.d.ts.map +1 -0
- package/dist/local/index.js +66 -0
- package/dist/local/index.js.map +1 -0
- package/dist/local/journey-commands.d.ts +65 -0
- package/dist/local/journey-commands.d.ts.map +1 -0
- package/dist/local/journey-commands.js +138 -0
- package/dist/local/journey-commands.js.map +1 -0
- package/dist/local/local-org-store.d.ts +46 -0
- package/dist/local/local-org-store.d.ts.map +1 -0
- package/dist/local/local-org-store.js +132 -0
- package/dist/local/local-org-store.js.map +1 -0
- package/dist/local/local-org.d.ts +389 -0
- package/dist/local/local-org.d.ts.map +1 -0
- package/dist/local/local-org.js +855 -0
- package/dist/local/local-org.js.map +1 -0
- package/dist/local/media-upload.d.ts +5 -0
- package/dist/local/media-upload.d.ts.map +1 -0
- package/dist/local/media-upload.js +41 -0
- package/dist/local/media-upload.js.map +1 -0
- package/dist/local/operation.d.ts +155 -0
- package/dist/local/operation.d.ts.map +1 -0
- package/dist/local/operation.js +340 -0
- package/dist/local/operation.js.map +1 -0
- package/dist/local/ownership-reader-schema.d.ts +117 -0
- package/dist/local/ownership-reader-schema.d.ts.map +1 -0
- package/dist/local/ownership-reader-schema.js +105 -0
- package/dist/local/ownership-reader-schema.js.map +1 -0
- package/dist/local/ownership-reader-worker.d.ts +2 -0
- package/dist/local/ownership-reader-worker.d.ts.map +1 -0
- package/dist/local/ownership-reader-worker.js +341 -0
- package/dist/local/ownership-reader-worker.js.map +1 -0
- package/dist/local/ownership-reader.d.ts +10 -0
- package/dist/local/ownership-reader.d.ts.map +1 -0
- package/dist/local/ownership-reader.js +93 -0
- package/dist/local/ownership-reader.js.map +1 -0
- package/dist/local/package-uses-check.d.ts +33 -0
- package/dist/local/package-uses-check.d.ts.map +1 -0
- package/dist/local/package-uses-check.js +62 -0
- package/dist/local/package-uses-check.js.map +1 -0
- package/dist/local/pending-recovery.d.ts +22 -0
- package/dist/local/pending-recovery.d.ts.map +1 -0
- package/dist/local/pending-recovery.js +171 -0
- package/dist/local/pending-recovery.js.map +1 -0
- package/dist/local/portable-commit-store.d.ts +28 -0
- package/dist/local/portable-commit-store.d.ts.map +1 -0
- package/dist/local/portable-commit-store.js +187 -0
- package/dist/local/portable-commit-store.js.map +1 -0
- package/dist/local/portable-commit.d.ts +109 -0
- package/dist/local/portable-commit.d.ts.map +1 -0
- package/dist/local/portable-commit.js +209 -0
- package/dist/local/portable-commit.js.map +1 -0
- package/dist/local/portable-remote.d.ts +432 -0
- package/dist/local/portable-remote.d.ts.map +1 -0
- package/dist/local/portable-remote.js +280 -0
- package/dist/local/portable-remote.js.map +1 -0
- package/dist/local/project-deleted.d.ts +4 -0
- package/dist/local/project-deleted.d.ts.map +1 -0
- package/dist/local/project-deleted.js +13 -0
- package/dist/local/project-deleted.js.map +1 -0
- package/dist/local/projection.d.ts +166 -0
- package/dist/local/projection.d.ts.map +1 -0
- package/dist/local/projection.js +709 -0
- package/dist/local/projection.js.map +1 -0
- package/dist/local/read-operation.d.ts +3 -0
- package/dist/local/read-operation.d.ts.map +1 -0
- package/dist/local/read-operation.js +19 -0
- package/dist/local/read-operation.js.map +1 -0
- package/dist/local/rebuild.d.ts +11 -0
- package/dist/local/rebuild.d.ts.map +1 -0
- package/dist/local/rebuild.js +42 -0
- package/dist/local/rebuild.js.map +1 -0
- package/dist/local/remote-base.d.ts +25 -0
- package/dist/local/remote-base.d.ts.map +1 -0
- package/dist/local/remote-base.js +68 -0
- package/dist/local/remote-base.js.map +1 -0
- package/dist/local/save-layout-worker.d.ts +19 -0
- package/dist/local/save-layout-worker.d.ts.map +1 -0
- package/dist/local/save-layout-worker.js +28 -0
- package/dist/local/save-layout-worker.js.map +1 -0
- package/dist/local/save-layout.d.ts +84 -0
- package/dist/local/save-layout.d.ts.map +1 -0
- package/dist/local/save-layout.js +221 -0
- package/dist/local/save-layout.js.map +1 -0
- package/dist/local/scope-impact.d.ts +31 -0
- package/dist/local/scope-impact.d.ts.map +1 -0
- package/dist/local/scope-impact.js +32 -0
- package/dist/local/scope-impact.js.map +1 -0
- package/dist/local/source-evidence/filesystem-worker.d.ts +2 -0
- package/dist/local/source-evidence/filesystem-worker.d.ts.map +1 -0
- package/dist/local/source-evidence/filesystem-worker.js +139 -0
- package/dist/local/source-evidence/filesystem-worker.js.map +1 -0
- package/dist/local/source-evidence/processes.d.ts +20 -0
- package/dist/local/source-evidence/processes.d.ts.map +1 -0
- package/dist/local/source-evidence/processes.js +133 -0
- package/dist/local/source-evidence/processes.js.map +1 -0
- package/dist/local/source-evidence/protocol.d.ts +52 -0
- package/dist/local/source-evidence/protocol.d.ts.map +1 -0
- package/dist/local/source-evidence/protocol.js +72 -0
- package/dist/local/source-evidence/protocol.js.map +1 -0
- package/dist/local/source-evidence/reader.d.ts +14 -0
- package/dist/local/source-evidence/reader.d.ts.map +1 -0
- package/dist/local/source-evidence/reader.js +308 -0
- package/dist/local/source-evidence/reader.js.map +1 -0
- package/dist/local/source-evidence/schema.d.ts +2504 -0
- package/dist/local/source-evidence/schema.d.ts.map +1 -0
- package/dist/local/source-evidence/schema.js +99 -0
- package/dist/local/source-evidence/schema.js.map +1 -0
- package/dist/local/source-policy/loader.d.ts +29 -0
- package/dist/local/source-policy/loader.d.ts.map +1 -0
- package/dist/local/source-policy/loader.js +209 -0
- package/dist/local/source-policy/loader.js.map +1 -0
- package/dist/local/source-policy/process.d.ts +7 -0
- package/dist/local/source-policy/process.d.ts.map +1 -0
- package/dist/local/source-policy/process.js +53 -0
- package/dist/local/source-policy/process.js.map +1 -0
- package/dist/local/source-policy/protocol.d.ts +27 -0
- package/dist/local/source-policy/protocol.d.ts.map +1 -0
- package/dist/local/source-policy/protocol.js +48 -0
- package/dist/local/source-policy/protocol.js.map +1 -0
- package/dist/local/source-policy/worker.d.ts +2 -0
- package/dist/local/source-policy/worker.d.ts.map +1 -0
- package/dist/local/source-policy/worker.js +100 -0
- package/dist/local/source-policy/worker.js.map +1 -0
- package/dist/local/state-directory.d.ts +17 -0
- package/dist/local/state-directory.d.ts.map +1 -0
- package/dist/local/state-directory.js +68 -0
- package/dist/local/state-directory.js.map +1 -0
- package/dist/local/store-database.d.ts +13 -0
- package/dist/local/store-database.d.ts.map +1 -0
- package/dist/local/store-database.js +187 -0
- package/dist/local/store-database.js.map +1 -0
- package/dist/local/store.d.ts +181 -0
- package/dist/local/store.d.ts.map +1 -0
- package/dist/local/store.js +585 -0
- package/dist/local/store.js.map +1 -0
- package/dist/local/sync.d.ts +47 -0
- package/dist/local/sync.d.ts.map +1 -0
- package/dist/local/sync.js +518 -0
- package/dist/local/sync.js.map +1 -0
- package/dist/local/task-context-inspection.d.ts +23 -0
- package/dist/local/task-context-inspection.d.ts.map +1 -0
- package/dist/local/task-context-inspection.js +165 -0
- package/dist/local/task-context-inspection.js.map +1 -0
- package/dist/local/task-context-observations.d.ts +9553 -0
- package/dist/local/task-context-observations.d.ts.map +1 -0
- package/dist/local/task-context-observations.js +232 -0
- package/dist/local/task-context-observations.js.map +1 -0
- package/dist/local/task-context-provider.d.ts +18 -0
- package/dist/local/task-context-provider.d.ts.map +1 -0
- package/dist/local/task-context-provider.js +231 -0
- package/dist/local/task-context-provider.js.map +1 -0
- package/dist/local/task-context-schema.d.ts +847 -0
- package/dist/local/task-context-schema.d.ts.map +1 -0
- package/dist/local/task-context-schema.js +305 -0
- package/dist/local/task-context-schema.js.map +1 -0
- package/dist/local/task-context-source.d.ts +16 -0
- package/dist/local/task-context-source.d.ts.map +1 -0
- package/dist/local/task-context-source.js +45 -0
- package/dist/local/task-context-source.js.map +1 -0
- package/dist/local/task-context.d.ts +14 -0
- package/dist/local/task-context.d.ts.map +1 -0
- package/dist/local/task-context.js +570 -0
- package/dist/local/task-context.js.map +1 -0
- package/dist/local/test-commands.d.ts +71 -0
- package/dist/local/test-commands.d.ts.map +1 -0
- package/dist/local/test-commands.js +292 -0
- package/dist/local/test-commands.js.map +1 -0
- package/dist/local/tree-save.d.ts +117 -0
- package/dist/local/tree-save.d.ts.map +1 -0
- package/dist/local/tree-save.js +615 -0
- package/dist/local/tree-save.js.map +1 -0
- package/dist/local/variants.d.ts +125 -0
- package/dist/local/variants.d.ts.map +1 -0
- package/dist/local/variants.js +267 -0
- package/dist/local/variants.js.map +1 -0
- package/dist/local/workspace-admission.d.ts +61 -0
- package/dist/local/workspace-admission.d.ts.map +1 -0
- package/dist/local/workspace-admission.js +112 -0
- package/dist/local/workspace-admission.js.map +1 -0
- package/dist/local/workspace-authority-guard.d.ts +18 -0
- package/dist/local/workspace-authority-guard.d.ts.map +1 -0
- package/dist/local/workspace-authority-guard.js +69 -0
- package/dist/local/workspace-authority-guard.js.map +1 -0
- package/dist/local/workspace-authority.d.ts +33 -0
- package/dist/local/workspace-authority.d.ts.map +1 -0
- package/dist/local/workspace-authority.js +33 -0
- package/dist/local/workspace-authority.js.map +1 -0
- package/dist/local/workspace-branch-runtime.d.ts +61 -0
- package/dist/local/workspace-branch-runtime.d.ts.map +1 -0
- package/dist/local/workspace-branch-runtime.js +216 -0
- package/dist/local/workspace-branch-runtime.js.map +1 -0
- package/dist/local/workspace-built-content.d.ts +137 -0
- package/dist/local/workspace-built-content.d.ts.map +1 -0
- package/dist/local/workspace-built-content.js +393 -0
- package/dist/local/workspace-built-content.js.map +1 -0
- package/dist/local/workspace-claim-status-read.d.ts +53 -0
- package/dist/local/workspace-claim-status-read.d.ts.map +1 -0
- package/dist/local/workspace-claim-status-read.js +118 -0
- package/dist/local/workspace-claim-status-read.js.map +1 -0
- package/dist/local/workspace-claim-status.d.ts +172 -0
- package/dist/local/workspace-claim-status.d.ts.map +1 -0
- package/dist/local/workspace-claim-status.js +721 -0
- package/dist/local/workspace-claim-status.js.map +1 -0
- package/dist/local/workspace-claim-views.d.ts +45 -0
- package/dist/local/workspace-claim-views.d.ts.map +1 -0
- package/dist/local/workspace-claim-views.js +45 -0
- package/dist/local/workspace-claim-views.js.map +1 -0
- package/dist/local/workspace-cli.d.ts +46 -0
- package/dist/local/workspace-cli.d.ts.map +1 -0
- package/dist/local/workspace-cli.js +1524 -0
- package/dist/local/workspace-cli.js.map +1 -0
- package/dist/local/workspace-commit-resolver.d.ts +19 -0
- package/dist/local/workspace-commit-resolver.d.ts.map +1 -0
- package/dist/local/workspace-commit-resolver.js +47 -0
- package/dist/local/workspace-commit-resolver.js.map +1 -0
- package/dist/local/workspace-decision-store.d.ts +184 -0
- package/dist/local/workspace-decision-store.d.ts.map +1 -0
- package/dist/local/workspace-decision-store.js +510 -0
- package/dist/local/workspace-decision-store.js.map +1 -0
- package/dist/local/workspace-environment-runtime.d.ts +107 -0
- package/dist/local/workspace-environment-runtime.d.ts.map +1 -0
- package/dist/local/workspace-environment-runtime.js +135 -0
- package/dist/local/workspace-environment-runtime.js.map +1 -0
- package/dist/local/workspace-evidence-drop.d.ts +21 -0
- package/dist/local/workspace-evidence-drop.d.ts.map +1 -0
- package/dist/local/workspace-evidence-drop.js +58 -0
- package/dist/local/workspace-evidence-drop.js.map +1 -0
- package/dist/local/workspace-evidence-sign-tool.d.ts +20 -0
- package/dist/local/workspace-evidence-sign-tool.d.ts.map +1 -0
- package/dist/local/workspace-evidence-sign-tool.js +85 -0
- package/dist/local/workspace-evidence-sign-tool.js.map +1 -0
- package/dist/local/workspace-evidence-status.d.ts +89 -0
- package/dist/local/workspace-evidence-status.d.ts.map +1 -0
- package/dist/local/workspace-evidence-status.js +141 -0
- package/dist/local/workspace-evidence-status.js.map +1 -0
- package/dist/local/workspace-evidence.d.ts +145 -0
- package/dist/local/workspace-evidence.d.ts.map +1 -0
- package/dist/local/workspace-evidence.js +347 -0
- package/dist/local/workspace-evidence.js.map +1 -0
- package/dist/local/workspace-graph-store.d.ts +32 -0
- package/dist/local/workspace-graph-store.d.ts.map +1 -0
- package/dist/local/workspace-graph-store.js +249 -0
- package/dist/local/workspace-graph-store.js.map +1 -0
- package/dist/local/workspace-handoff.d.ts +32 -0
- package/dist/local/workspace-handoff.d.ts.map +1 -0
- package/dist/local/workspace-handoff.js +144 -0
- package/dist/local/workspace-handoff.js.map +1 -0
- package/dist/local/workspace-history-journal.d.ts +70 -0
- package/dist/local/workspace-history-journal.d.ts.map +1 -0
- package/dist/local/workspace-history-journal.js +131 -0
- package/dist/local/workspace-history-journal.js.map +1 -0
- package/dist/local/workspace-history-store.d.ts +98 -0
- package/dist/local/workspace-history-store.d.ts.map +1 -0
- package/dist/local/workspace-history-store.js +632 -0
- package/dist/local/workspace-history-store.js.map +1 -0
- package/dist/local/workspace-history-types.d.ts +307 -0
- package/dist/local/workspace-history-types.d.ts.map +1 -0
- package/dist/local/workspace-history-types.js +2 -0
- package/dist/local/workspace-history-types.js.map +1 -0
- package/dist/local/workspace-integration-runtime.d.ts +48 -0
- package/dist/local/workspace-integration-runtime.d.ts.map +1 -0
- package/dist/local/workspace-integration-runtime.js +419 -0
- package/dist/local/workspace-integration-runtime.js.map +1 -0
- package/dist/local/workspace-lock.d.ts +7 -0
- package/dist/local/workspace-lock.d.ts.map +1 -0
- package/dist/local/workspace-lock.js +211 -0
- package/dist/local/workspace-lock.js.map +1 -0
- package/dist/local/workspace-merge.d.ts +77 -0
- package/dist/local/workspace-merge.d.ts.map +1 -0
- package/dist/local/workspace-merge.js +703 -0
- package/dist/local/workspace-merge.js.map +1 -0
- package/dist/local/workspace-mixed-history.d.ts +33 -0
- package/dist/local/workspace-mixed-history.d.ts.map +1 -0
- package/dist/local/workspace-mixed-history.js +107 -0
- package/dist/local/workspace-mixed-history.js.map +1 -0
- package/dist/local/workspace-overlap-allocation.d.ts +33 -0
- package/dist/local/workspace-overlap-allocation.d.ts.map +1 -0
- package/dist/local/workspace-overlap-allocation.js +69 -0
- package/dist/local/workspace-overlap-allocation.js.map +1 -0
- package/dist/local/workspace-overlap-impact.d.ts +46 -0
- package/dist/local/workspace-overlap-impact.d.ts.map +1 -0
- package/dist/local/workspace-overlap-impact.js +162 -0
- package/dist/local/workspace-overlap-impact.js.map +1 -0
- package/dist/local/workspace-overlap.d.ts +109 -0
- package/dist/local/workspace-overlap.d.ts.map +1 -0
- package/dist/local/workspace-overlap.js +327 -0
- package/dist/local/workspace-overlap.js.map +1 -0
- package/dist/local/workspace-paths.d.ts +4 -0
- package/dist/local/workspace-paths.d.ts.map +1 -0
- package/dist/local/workspace-paths.js +8 -0
- package/dist/local/workspace-paths.js.map +1 -0
- package/dist/local/workspace-pick-runtime.d.ts +70 -0
- package/dist/local/workspace-pick-runtime.d.ts.map +1 -0
- package/dist/local/workspace-pick-runtime.js +177 -0
- package/dist/local/workspace-pick-runtime.js.map +1 -0
- package/dist/local/workspace-pick-store.d.ts +33 -0
- package/dist/local/workspace-pick-store.d.ts.map +1 -0
- package/dist/local/workspace-pick-store.js +43 -0
- package/dist/local/workspace-pick-store.js.map +1 -0
- package/dist/local/workspace-pick.d.ts +73 -0
- package/dist/local/workspace-pick.d.ts.map +1 -0
- package/dist/local/workspace-pick.js +253 -0
- package/dist/local/workspace-pick.js.map +1 -0
- package/dist/local/workspace-portable-authoring.d.ts +43 -0
- package/dist/local/workspace-portable-authoring.d.ts.map +1 -0
- package/dist/local/workspace-portable-authoring.js +128 -0
- package/dist/local/workspace-portable-authoring.js.map +1 -0
- package/dist/local/workspace-prune.d.ts +63 -0
- package/dist/local/workspace-prune.d.ts.map +1 -0
- package/dist/local/workspace-prune.js +267 -0
- package/dist/local/workspace-prune.js.map +1 -0
- package/dist/local/workspace-remote-fetch.d.ts +82 -0
- package/dist/local/workspace-remote-fetch.d.ts.map +1 -0
- package/dist/local/workspace-remote-fetch.js +409 -0
- package/dist/local/workspace-remote-fetch.js.map +1 -0
- package/dist/local/workspace-remote-provider.d.ts +97 -0
- package/dist/local/workspace-remote-provider.d.ts.map +1 -0
- package/dist/local/workspace-remote-provider.js +400 -0
- package/dist/local/workspace-remote-provider.js.map +1 -0
- package/dist/local/workspace-remote-pull-request-journal.d.ts +49 -0
- package/dist/local/workspace-remote-pull-request-journal.d.ts.map +1 -0
- package/dist/local/workspace-remote-pull-request-journal.js +63 -0
- package/dist/local/workspace-remote-pull-request-journal.js.map +1 -0
- package/dist/local/workspace-remote-pull-request.d.ts +36 -0
- package/dist/local/workspace-remote-pull-request.d.ts.map +1 -0
- package/dist/local/workspace-remote-pull-request.js +158 -0
- package/dist/local/workspace-remote-pull-request.js.map +1 -0
- package/dist/local/workspace-remote-push.d.ts +88 -0
- package/dist/local/workspace-remote-push.d.ts.map +1 -0
- package/dist/local/workspace-remote-push.js +297 -0
- package/dist/local/workspace-remote-push.js.map +1 -0
- package/dist/local/workspace-remote-topic-journal.d.ts +56 -0
- package/dist/local/workspace-remote-topic-journal.d.ts.map +1 -0
- package/dist/local/workspace-remote-topic-journal.js +121 -0
- package/dist/local/workspace-remote-topic-journal.js.map +1 -0
- package/dist/local/workspace-remote-topic.d.ts +45 -0
- package/dist/local/workspace-remote-topic.d.ts.map +1 -0
- package/dist/local/workspace-remote-topic.js +204 -0
- package/dist/local/workspace-remote-topic.js.map +1 -0
- package/dist/local/workspace-remote-transfer.d.ts +76 -0
- package/dist/local/workspace-remote-transfer.d.ts.map +1 -0
- package/dist/local/workspace-remote-transfer.js +270 -0
- package/dist/local/workspace-remote-transfer.js.map +1 -0
- package/dist/local/workspace-resolution.d.ts +145 -0
- package/dist/local/workspace-resolution.d.ts.map +1 -0
- package/dist/local/workspace-resolution.js +479 -0
- package/dist/local/workspace-resolution.js.map +1 -0
- package/dist/local/workspace-resolver-provider.d.ts +72 -0
- package/dist/local/workspace-resolver-provider.d.ts.map +1 -0
- package/dist/local/workspace-resolver-provider.js +312 -0
- package/dist/local/workspace-resolver-provider.js.map +1 -0
- package/dist/local/workspace-runtime-handoff.d.ts +52 -0
- package/dist/local/workspace-runtime-handoff.d.ts.map +1 -0
- package/dist/local/workspace-runtime-handoff.js +237 -0
- package/dist/local/workspace-runtime-handoff.js.map +1 -0
- package/dist/local/workspace-runtime-lease.d.ts +26 -0
- package/dist/local/workspace-runtime-lease.d.ts.map +1 -0
- package/dist/local/workspace-runtime-lease.js +123 -0
- package/dist/local/workspace-runtime-lease.js.map +1 -0
- package/dist/local/workspace-runtime.d.ts +690 -0
- package/dist/local/workspace-runtime.d.ts.map +1 -0
- package/dist/local/workspace-runtime.js +2124 -0
- package/dist/local/workspace-runtime.js.map +1 -0
- package/dist/local/workspace-scope.d.ts +70 -0
- package/dist/local/workspace-scope.d.ts.map +1 -0
- package/dist/local/workspace-scope.js +206 -0
- package/dist/local/workspace-scope.js.map +1 -0
- package/dist/local/workspace-sources.d.ts +159 -0
- package/dist/local/workspace-sources.d.ts.map +1 -0
- package/dist/local/workspace-sources.js +570 -0
- package/dist/local/workspace-sources.js.map +1 -0
- package/dist/local/workspace-store-database.d.ts +5 -0
- package/dist/local/workspace-store-database.d.ts.map +1 -0
- package/dist/local/workspace-store-database.js +726 -0
- package/dist/local/workspace-store-database.js.map +1 -0
- package/dist/local/workspace-store.d.ts +261 -0
- package/dist/local/workspace-store.d.ts.map +1 -0
- package/dist/local/workspace-store.js +831 -0
- package/dist/local/workspace-store.js.map +1 -0
- package/dist/local/workspace-topology-runtime.d.ts +27 -0
- package/dist/local/workspace-topology-runtime.d.ts.map +1 -0
- package/dist/local/workspace-topology-runtime.js +396 -0
- package/dist/local/workspace-topology-runtime.js.map +1 -0
- package/dist/local/workspace-topology.d.ts +140 -0
- package/dist/local/workspace-topology.d.ts.map +1 -0
- package/dist/local/workspace-topology.js +359 -0
- package/dist/local/workspace-topology.js.map +1 -0
- package/dist/local/workspace-upstream-inspection.d.ts +60 -0
- package/dist/local/workspace-upstream-inspection.d.ts.map +1 -0
- package/dist/local/workspace-upstream-inspection.js +189 -0
- package/dist/local/workspace-upstream-inspection.js.map +1 -0
- package/dist/local/workspace-upstream-runtime.d.ts +91 -0
- package/dist/local/workspace-upstream-runtime.d.ts.map +1 -0
- package/dist/local/workspace-upstream-runtime.js +270 -0
- package/dist/local/workspace-upstream-runtime.js.map +1 -0
- package/dist/local/workspace-upstream-store.d.ts +51 -0
- package/dist/local/workspace-upstream-store.d.ts.map +1 -0
- package/dist/local/workspace-upstream-store.js +475 -0
- package/dist/local/workspace-upstream-store.js.map +1 -0
- package/dist/local/workspace-viewer-server.d.ts +136 -0
- package/dist/local/workspace-viewer-server.d.ts.map +1 -0
- package/dist/local/workspace-viewer-server.js +1097 -0
- package/dist/local/workspace-viewer-server.js.map +1 -0
- package/dist/local/workspace-viewer-snapshot.d.ts +49 -0
- package/dist/local/workspace-viewer-snapshot.d.ts.map +1 -0
- package/dist/local/workspace-viewer-snapshot.js +91 -0
- package/dist/local/workspace-viewer-snapshot.js.map +1 -0
- package/dist/local/worktree-projection.d.ts +76 -0
- package/dist/local/worktree-projection.d.ts.map +1 -0
- package/dist/local/worktree-projection.js +470 -0
- package/dist/local/worktree-projection.js.map +1 -0
- package/dist/mcp/client-identity.d.ts +8 -0
- package/dist/mcp/client-identity.d.ts.map +1 -0
- package/dist/mcp/client-identity.js +33 -0
- package/dist/mcp/client-identity.js.map +1 -0
- package/dist/mcp/graph-to-code.d.ts +53 -0
- package/dist/mcp/graph-to-code.d.ts.map +1 -0
- package/dist/mcp/graph-to-code.js +1624 -0
- package/dist/mcp/graph-to-code.js.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +3 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/stdio/graph-to-code.d.ts +3 -0
- package/dist/mcp/stdio/graph-to-code.d.ts.map +1 -0
- package/dist/mcp/stdio/graph-to-code.js +55 -0
- package/dist/mcp/stdio/graph-to-code.js.map +1 -0
- package/dist/mcp/stdio/worktree.d.ts +3 -0
- package/dist/mcp/stdio/worktree.d.ts.map +1 -0
- package/dist/mcp/stdio/worktree.js +67 -0
- package/dist/mcp/stdio/worktree.js.map +1 -0
- package/dist/mcp/worktree-claim-status.d.ts +162 -0
- package/dist/mcp/worktree-claim-status.d.ts.map +1 -0
- package/dist/mcp/worktree-claim-status.js +113 -0
- package/dist/mcp/worktree-claim-status.js.map +1 -0
- package/dist/mcp/worktree-dispatch.d.ts +13 -0
- package/dist/mcp/worktree-dispatch.d.ts.map +1 -0
- package/dist/mcp/worktree-dispatch.js +52 -0
- package/dist/mcp/worktree-dispatch.js.map +1 -0
- package/dist/mcp/worktree-errors.d.ts +15 -0
- package/dist/mcp/worktree-errors.d.ts.map +1 -0
- package/dist/mcp/worktree-errors.js +17 -0
- package/dist/mcp/worktree-errors.js.map +1 -0
- package/dist/mcp/worktree-health.d.ts +12 -0
- package/dist/mcp/worktree-health.d.ts.map +1 -0
- package/dist/mcp/worktree-health.js +32 -0
- package/dist/mcp/worktree-health.js.map +1 -0
- package/dist/mcp/worktree-results.d.ts +15 -0
- package/dist/mcp/worktree-results.d.ts.map +1 -0
- package/dist/mcp/worktree-results.js +12 -0
- package/dist/mcp/worktree-results.js.map +1 -0
- package/dist/mcp/worktree-task-context.d.ts +57 -0
- package/dist/mcp/worktree-task-context.d.ts.map +1 -0
- package/dist/mcp/worktree-task-context.js +45 -0
- package/dist/mcp/worktree-task-context.js.map +1 -0
- package/dist/mcp/worktree-tools.d.ts +2648 -0
- package/dist/mcp/worktree-tools.d.ts.map +1 -0
- package/dist/mcp/worktree-tools.js +192 -0
- package/dist/mcp/worktree-tools.js.map +1 -0
- package/dist/mcp/worktree.d.ts +33 -0
- package/dist/mcp/worktree.d.ts.map +1 -0
- package/dist/mcp/worktree.js +551 -0
- package/dist/mcp/worktree.js.map +1 -0
- package/dist/own-package.d.ts +13 -0
- package/dist/own-package.d.ts.map +1 -0
- package/dist/own-package.js +32 -0
- package/dist/own-package.js.map +1 -0
- package/dist/packages-browse.d.ts +107 -0
- package/dist/packages-browse.d.ts.map +1 -0
- package/dist/packages-browse.js +646 -0
- package/dist/packages-browse.js.map +1 -0
- package/dist/packages-cli.d.ts +8 -0
- package/dist/packages-cli.d.ts.map +1 -0
- package/dist/packages-cli.js +184 -0
- package/dist/packages-cli.js.map +1 -0
- package/dist/packages-uses.d.ts +46 -0
- package/dist/packages-uses.d.ts.map +1 -0
- package/dist/packages-uses.js +737 -0
- package/dist/packages-uses.js.map +1 -0
- package/dist/portable.d.ts +7 -0
- package/dist/portable.d.ts.map +1 -0
- package/dist/portable.js +14 -0
- package/dist/portable.js.map +1 -0
- package/dist/quiet-warnings.d.ts +3 -0
- package/dist/quiet-warnings.d.ts.map +1 -0
- package/dist/quiet-warnings.js +21 -0
- package/dist/quiet-warnings.js.map +1 -0
- package/dist/view-seam.d.ts +62 -0
- package/dist/view-seam.d.ts.map +1 -0
- package/dist/view-seam.js +70 -0
- package/dist/view-seam.js.map +1 -0
- package/generated/graph-packages/index.json +5 -0
- package/graph-packages.lock.json +4 -0
- package/package.json +81 -0
- package/viewer/assets/index-BZKGDARF.css +1 -0
- package/viewer/assets/index-DWu0CbZZ.js +272 -0
- package/viewer/index.html +13 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/** Local experimental object storage only. No production sync/manifest wiring. */
|
|
2
|
+
import { randomUUID } from 'node:crypto';
|
|
3
|
+
import { constants } from 'node:fs';
|
|
4
|
+
import { link, lstat, mkdir, open, unlink } from 'node:fs/promises';
|
|
5
|
+
import { dirname, isAbsolute, join } from 'node:path';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { canonicalGraphSyncBytes, hashGraphSyncObjectSync } from '@software-dlc/graph/schema/canonical';
|
|
8
|
+
import { graph_sync_hash_schema } from '@software-dlc/graph/schema/sync';
|
|
9
|
+
import { experimental_path_object_schema } from '@software-dlc/graph/schema/experimental/path-portable';
|
|
10
|
+
import { hashExperimentalPathRoute } from '@software-dlc/graph/schema/experimental/path-route';
|
|
11
|
+
const supported_versions_schema = z
|
|
12
|
+
.array(z.union([z.literal(1), z.literal(2), z.literal(3)]))
|
|
13
|
+
.min(1);
|
|
14
|
+
const MAX_OBJECT_BYTES = 1048576;
|
|
15
|
+
function sameBytes(left, right) {
|
|
16
|
+
return (left.length === right.length &&
|
|
17
|
+
left.every((byte, index) => byte === right[index]));
|
|
18
|
+
}
|
|
19
|
+
function verifyObject(bytes, object_hash, versions) {
|
|
20
|
+
graph_sync_hash_schema.parse(object_hash);
|
|
21
|
+
if (bytes.length > MAX_OBJECT_BYTES)
|
|
22
|
+
throw new Error('Path object exceeds the 1 MiB limit.');
|
|
23
|
+
const value = JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(bytes));
|
|
24
|
+
const object = experimental_path_object_schema.parse(value);
|
|
25
|
+
if (!versions.includes(object.schema_version))
|
|
26
|
+
throw new Error(`Unsupported Path schema version ${object.schema_version}.`);
|
|
27
|
+
if (!sameBytes(bytes, canonicalGraphSyncBytes(object)))
|
|
28
|
+
throw new Error('Path object bytes are not canonical.');
|
|
29
|
+
const actual_hash = object.schema_version === 3
|
|
30
|
+
? hashExperimentalPathRoute(object)
|
|
31
|
+
: hashGraphSyncObjectSync(object);
|
|
32
|
+
if (actual_hash !== object_hash)
|
|
33
|
+
throw new Error('Path object hash verification failed.');
|
|
34
|
+
return object;
|
|
35
|
+
}
|
|
36
|
+
async function syncDirectory(directory) {
|
|
37
|
+
const handle = await open(directory, constants.O_RDONLY);
|
|
38
|
+
try {
|
|
39
|
+
await handle.sync();
|
|
40
|
+
}
|
|
41
|
+
finally {
|
|
42
|
+
await handle.close();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Caller owns an existing private root. No live-sidecar default is provided.
|
|
47
|
+
* Capabilities describe format support, not authorization or graph validity.
|
|
48
|
+
*/
|
|
49
|
+
export class ExperimentalPathObjectStore {
|
|
50
|
+
directory;
|
|
51
|
+
supported_versions;
|
|
52
|
+
constructor(input) {
|
|
53
|
+
this.directory = join(z
|
|
54
|
+
.string()
|
|
55
|
+
.min(1)
|
|
56
|
+
.refine(isAbsolute, 'An absolute private root is required.')
|
|
57
|
+
.parse(input.directory), 'experimental-path-objects-v1');
|
|
58
|
+
this.supported_versions = supported_versions_schema.parse(input.supported_versions);
|
|
59
|
+
}
|
|
60
|
+
objectPath(object_hash) {
|
|
61
|
+
graph_sync_hash_schema.parse(object_hash);
|
|
62
|
+
const digest = object_hash.slice('sha256:'.length);
|
|
63
|
+
return join(this.directory, digest.slice(0, 2), digest);
|
|
64
|
+
}
|
|
65
|
+
async read(object_hash) {
|
|
66
|
+
const handle = await open(this.objectPath(object_hash), constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
67
|
+
let bytes;
|
|
68
|
+
try {
|
|
69
|
+
const stat = await handle.stat();
|
|
70
|
+
if (!stat.isFile() || stat.size > MAX_OBJECT_BYTES)
|
|
71
|
+
throw new Error('Invalid or oversized Path object file.');
|
|
72
|
+
// Bound allocation/read even if an external writer grows a corrupt file.
|
|
73
|
+
const buffer = new Uint8Array(MAX_OBJECT_BYTES + 1);
|
|
74
|
+
let length = 0;
|
|
75
|
+
while (length < buffer.length) {
|
|
76
|
+
const result = await handle.read(buffer, length, buffer.length - length, null);
|
|
77
|
+
if (result.bytesRead === 0)
|
|
78
|
+
break;
|
|
79
|
+
length += result.bytesRead;
|
|
80
|
+
}
|
|
81
|
+
bytes = buffer.slice(0, length);
|
|
82
|
+
}
|
|
83
|
+
finally {
|
|
84
|
+
await handle.close();
|
|
85
|
+
}
|
|
86
|
+
const object = verifyObject(bytes, object_hash, this.supported_versions);
|
|
87
|
+
return { object_hash, object, bytes };
|
|
88
|
+
}
|
|
89
|
+
async put(input) {
|
|
90
|
+
if (input.bytes.byteLength > MAX_OBJECT_BYTES)
|
|
91
|
+
throw new Error('Path object exceeds the 1 MiB limit.');
|
|
92
|
+
// Copy before the first await so caller mutation cannot change publication.
|
|
93
|
+
const bytes = input.bytes.slice();
|
|
94
|
+
const object_hash = input.object_hash;
|
|
95
|
+
verifyObject(bytes, object_hash, this.supported_versions);
|
|
96
|
+
const destination = this.objectPath(object_hash);
|
|
97
|
+
const directory = dirname(destination);
|
|
98
|
+
const root = await lstat(dirname(this.directory));
|
|
99
|
+
if (!root.isDirectory())
|
|
100
|
+
throw new Error('Path object root must be an existing private directory.');
|
|
101
|
+
await mkdir(directory, { recursive: true, mode: 0o700 });
|
|
102
|
+
const temporary = join(directory, `.pending-${randomUUID()}`);
|
|
103
|
+
const handle = await open(temporary, 'wx', 0o600);
|
|
104
|
+
try {
|
|
105
|
+
try {
|
|
106
|
+
await handle.writeFile(bytes);
|
|
107
|
+
await handle.sync();
|
|
108
|
+
}
|
|
109
|
+
finally {
|
|
110
|
+
await handle.close();
|
|
111
|
+
}
|
|
112
|
+
try {
|
|
113
|
+
// A hard link publishes complete bytes atomically without replacement.
|
|
114
|
+
await link(temporary, destination);
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
if (!(error instanceof Error) ||
|
|
118
|
+
!('code' in error) ||
|
|
119
|
+
error.code !== 'EEXIST')
|
|
120
|
+
throw error;
|
|
121
|
+
const existing = await this.read(object_hash);
|
|
122
|
+
if (!sameBytes(existing.bytes, bytes))
|
|
123
|
+
throw new Error('Immutable Path object storage mismatch.');
|
|
124
|
+
}
|
|
125
|
+
await syncDirectory(directory);
|
|
126
|
+
await syncDirectory(this.directory);
|
|
127
|
+
await syncDirectory(dirname(this.directory));
|
|
128
|
+
}
|
|
129
|
+
finally {
|
|
130
|
+
// Only this invocation's staging file is eligible for cleanup.
|
|
131
|
+
await unlink(temporary);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=path-object-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-object-store.js","sourceRoot":"","sources":["../../../src/local/experimental/path-object-store.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,+BAA+B,EAAE,MAAM,uDAAuD,CAAC;AACxG,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAE/F,MAAM,yBAAyB,GAAG,CAAC;KAChC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC1D,GAAG,CAA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,KAAK,EAAE,KAAK,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;YAC/D,CAAC;YACD,MAAM,aAAa,CAAC,SAAS,CAAC,CAAC;YAC/B,MAAM,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACpC,MAAM,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;QAC/C,CAAC;gBAAS,CAAC;YACT,+DAA+D;YAC/D,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const EXTERNAL_WORKTREE_BINDING_FILENAME: "softwaredlc.project.json";
|
|
3
|
+
export declare const external_worktree_remote_id_schema: z.ZodString;
|
|
4
|
+
export declare const external_worktree_binding_schema: z.ZodObject<{
|
|
5
|
+
schema_version: z.ZodLiteral<"1">;
|
|
6
|
+
remote: z.ZodObject<{
|
|
7
|
+
remote_id: z.ZodString;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
binding: z.ZodObject<{
|
|
10
|
+
worktree_id: z.ZodString;
|
|
11
|
+
repository_id: z.ZodOptional<z.ZodString>;
|
|
12
|
+
branch_id: z.ZodOptional<z.ZodString>;
|
|
13
|
+
expected_source_ref: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
preferences: z.ZodOptional<z.ZodObject<{
|
|
16
|
+
save_after_coherent_change: z.ZodBoolean;
|
|
17
|
+
}, z.core.$strict>>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
export type ExternalWorktreeBinding = z.infer<typeof external_worktree_binding_schema>;
|
|
20
|
+
export declare function parseExternalWorktreeBinding(value: unknown): ExternalWorktreeBinding;
|
|
21
|
+
//# sourceMappingURL=external-worktree-binding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-worktree-binding.d.ts","sourceRoot":"","sources":["../../src/local/external-worktree-binding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kCAAkC,EAC7C,0BAAmC,CAAC;AAKtC,eAAO,MAAM,kCAAkC,aAKpB,CAAC;AA4C5B,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;kBAOlC,CAAC;AAEZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,gCAAgC,CACxC,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,OAAO,GACb,uBAAuB,CAEzB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const EXTERNAL_WORKTREE_BINDING_FILENAME = 'softwaredlc.project.json';
|
|
3
|
+
const REMOTE_ID_PATTERN = /^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$/i;
|
|
4
|
+
const GIT_REF_PATTERN = /^refs\/[A-Za-z0-9._\/-]+$/;
|
|
5
|
+
export const external_worktree_remote_id_schema = z
|
|
6
|
+
.string()
|
|
7
|
+
.trim()
|
|
8
|
+
.min(1)
|
|
9
|
+
.max(128)
|
|
10
|
+
.regex(REMOTE_ID_PATTERN);
|
|
11
|
+
const external_worktree_remote_schema = z
|
|
12
|
+
.object({
|
|
13
|
+
remote_id: external_worktree_remote_id_schema
|
|
14
|
+
})
|
|
15
|
+
.strict();
|
|
16
|
+
const expected_source_ref_schema = z
|
|
17
|
+
.string()
|
|
18
|
+
.trim()
|
|
19
|
+
.min(6)
|
|
20
|
+
.max(1_024)
|
|
21
|
+
.regex(GIT_REF_PATTERN)
|
|
22
|
+
.refine((value) => !value.includes('..'), {
|
|
23
|
+
message: 'Git refs must not contain consecutive dots.'
|
|
24
|
+
})
|
|
25
|
+
.refine((value) => !value.includes('//'), {
|
|
26
|
+
message: 'Git refs must not contain consecutive slashes.'
|
|
27
|
+
})
|
|
28
|
+
.refine((value) => !value.includes('@{'), {
|
|
29
|
+
message: 'Git refs must not contain reflog syntax.'
|
|
30
|
+
})
|
|
31
|
+
.refine((value) => !value.endsWith('/') && !value.endsWith('.') && !value.endsWith('.lock'), { message: 'Git refs must have a valid terminal component.' });
|
|
32
|
+
const external_worktree_binding_identity_schema = z
|
|
33
|
+
.object({
|
|
34
|
+
worktree_id: z.string().uuid(),
|
|
35
|
+
repository_id: z.string().uuid().optional(),
|
|
36
|
+
branch_id: z.string().uuid().optional(),
|
|
37
|
+
expected_source_ref: expected_source_ref_schema.optional()
|
|
38
|
+
})
|
|
39
|
+
.strict();
|
|
40
|
+
const external_worktree_preferences_schema = z
|
|
41
|
+
.object({
|
|
42
|
+
save_after_coherent_change: z.boolean()
|
|
43
|
+
})
|
|
44
|
+
.strict();
|
|
45
|
+
export const external_worktree_binding_schema = z
|
|
46
|
+
.object({
|
|
47
|
+
schema_version: z.literal('1'),
|
|
48
|
+
remote: external_worktree_remote_schema,
|
|
49
|
+
binding: external_worktree_binding_identity_schema,
|
|
50
|
+
preferences: external_worktree_preferences_schema.optional()
|
|
51
|
+
})
|
|
52
|
+
.strict();
|
|
53
|
+
export function parseExternalWorktreeBinding(value) {
|
|
54
|
+
return external_worktree_binding_schema.parse(value);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=external-worktree-binding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-worktree-binding.js","sourceRoot":"","sources":["../../src/local/external-worktree-binding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,kCAAkC,GAC7C,0BAAmC,CAAC;AAEtC,MAAM,iBAAiB,GAAG,sCAAsC,CAAC;AACjE,MAAM,eAAe,GAAG,2BAA2B,CAAC;AAEpD,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC;KAChD,MAAM,EAAE;KACR,IAAI,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CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACvC,mBAAmB,EAAE,0BAA0B,CAAC,QAAQ,EAAE;CAC3D,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,oCAAoC,GAAG,CAAC;KAC3C,MAAM,CAAC;IACN,0BAA0B,EAAE,CAAC,CAAC,OAAO,EAAE;CACxC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC;KAC9C,MAAM,CAAC;IACN,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IAC9B,MAAM,EAAE,+BAA+B;IACvC,OAAO,EAAE,yCAAyC;IAClD,WAAW,EAAE,oCAAoC,CAAC,QAAQ,EAAE;CAC7D,CAAC;KACD,MAAM,EAAE,CAAC;AAMZ,MAAM,UAAU,4BAA4B,CAC1C,KAAc;IAEd,OAAO,gCAAgC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { PortableGraph } from '@software-dlc/graph/types';
|
|
2
|
+
import type { LocalWorkspaceTaskScope } from './workspace-scope.js';
|
|
3
|
+
/**
|
|
4
|
+
* A folder's members, read as the coordination engine's folder.py reads them:
|
|
5
|
+
* the home's `sdlc-executions/folder.json` lists each member by a path relative
|
|
6
|
+
* to the folder, and a member counts only when its own `sdlc-folder.json`
|
|
7
|
+
* pointer names it and this home, so a membership entry alone joins nothing.
|
|
8
|
+
*/
|
|
9
|
+
export type FolderMember = {
|
|
10
|
+
name: string;
|
|
11
|
+
path: string;
|
|
12
|
+
};
|
|
13
|
+
export type SkippedFolderMember = FolderMember & {
|
|
14
|
+
reason: string;
|
|
15
|
+
};
|
|
16
|
+
export type FolderMembers = {
|
|
17
|
+
folder: string;
|
|
18
|
+
home: string;
|
|
19
|
+
members: FolderMember[];
|
|
20
|
+
skipped: SkippedFolderMember[];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The members of the folder whose home holds `git_common_dir`, but the home
|
|
24
|
+
* itself; refuses when this repository is not a folder's home.
|
|
25
|
+
*/
|
|
26
|
+
export declare function readFolderMembers(git_common_dir: string): Promise<FolderMembers>;
|
|
27
|
+
/**
|
|
28
|
+
* A repository's whole-repository task scope: every node whose source
|
|
29
|
+
* references name one of `repository_names` (compared case-insensitively, as
|
|
30
|
+
* GitHub names are), and every edge touching one of them; null when no node
|
|
31
|
+
* cites the repository. A reference naming no repository belongs to none.
|
|
32
|
+
*/
|
|
33
|
+
export declare function repositoryTaskScope(graph: PortableGraph, repository_names: readonly string[]): LocalWorkspaceTaskScope | null;
|
|
34
|
+
//# sourceMappingURL=folder-members.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folder-members.d.ts","sourceRoot":"","sources":["../../src/local/folder-members.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC1D,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AACpE,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC,CAAC;AAkGF;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,aAAa,CAAC,CA0DxB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,aAAa,EACpB,gBAAgB,EAAE,SAAS,MAAM,EAAE,GAClC,uBAAuB,GAAG,IAAI,CA8BhC"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { lstat, open, realpath } from 'node:fs/promises';
|
|
2
|
+
import { dirname, isAbsolute, join, resolve } from 'node:path';
|
|
3
|
+
import { sourceFiles } from './blast-radius.js';
|
|
4
|
+
const STATE = 'sdlc-executions';
|
|
5
|
+
const MEMBERSHIP = 'folder.json';
|
|
6
|
+
const POINTER = 'sdlc-folder.json';
|
|
7
|
+
const SCHEMA_VERSION = 1;
|
|
8
|
+
const READ_LIMIT = 64 << 10;
|
|
9
|
+
const NAME = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
|
|
10
|
+
/** A folder file's JSON object, or null when it is missing; a link, an oversized or non-object file refuses. */
|
|
11
|
+
async function readFolderFile(path) {
|
|
12
|
+
let info;
|
|
13
|
+
try {
|
|
14
|
+
info = await lstat(path);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
if (error.code === 'ENOENT')
|
|
18
|
+
return null;
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
if (!info.isFile() || info.size > READ_LIMIT) {
|
|
22
|
+
throw new Error(`${path} is not a regular file of at most ${READ_LIMIT} bytes`);
|
|
23
|
+
}
|
|
24
|
+
const handle = await open(path, 'r');
|
|
25
|
+
let doc;
|
|
26
|
+
try {
|
|
27
|
+
doc = JSON.parse(await handle.readFile('utf8'));
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
throw new Error(`${path} is not valid JSON`);
|
|
31
|
+
}
|
|
32
|
+
finally {
|
|
33
|
+
await handle.close();
|
|
34
|
+
}
|
|
35
|
+
if (doc === null ||
|
|
36
|
+
typeof doc !== 'object' ||
|
|
37
|
+
Array.isArray(doc) ||
|
|
38
|
+
doc.schema_version !== SCHEMA_VERSION) {
|
|
39
|
+
throw new Error(`${path} is not a schema_version ${SCHEMA_VERSION} folder file`);
|
|
40
|
+
}
|
|
41
|
+
return doc;
|
|
42
|
+
}
|
|
43
|
+
function relativePath(value, what, path) {
|
|
44
|
+
if (typeof value !== 'string' ||
|
|
45
|
+
!value ||
|
|
46
|
+
value.includes('\\') ||
|
|
47
|
+
value.includes('\0') ||
|
|
48
|
+
isAbsolute(value)) {
|
|
49
|
+
throw new Error(`${path}: ${what} must be a relative path`);
|
|
50
|
+
}
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
/** Why the checkout at `checkout` is not the member `name` of the home at `home`, or null when it is. */
|
|
54
|
+
async function notAMember(checkout, name, home) {
|
|
55
|
+
const git_dir = join(checkout, '.git');
|
|
56
|
+
try {
|
|
57
|
+
if (!(await lstat(git_dir)).isDirectory())
|
|
58
|
+
return `${checkout} is not a primary checkout`;
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return `nothing at ${checkout}`;
|
|
62
|
+
}
|
|
63
|
+
let pointer;
|
|
64
|
+
try {
|
|
65
|
+
pointer = await readFolderFile(join(git_dir, POINTER));
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
return error.message;
|
|
69
|
+
}
|
|
70
|
+
if (!pointer)
|
|
71
|
+
return `${checkout} has no folder pointer: it left the folder`;
|
|
72
|
+
if (pointer.name !== name)
|
|
73
|
+
return `${join(git_dir, POINTER)} names another repository`;
|
|
74
|
+
let pointed;
|
|
75
|
+
try {
|
|
76
|
+
pointed = await realpath(resolve(checkout, relativePath(pointer.home, 'home', join(git_dir, POINTER))));
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
return error.message;
|
|
80
|
+
}
|
|
81
|
+
return pointed === home
|
|
82
|
+
? null
|
|
83
|
+
: `${join(git_dir, POINTER)} names another home`;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The members of the folder whose home holds `git_common_dir`, but the home
|
|
87
|
+
* itself; refuses when this repository is not a folder's home.
|
|
88
|
+
*/
|
|
89
|
+
export async function readFolderMembers(git_common_dir) {
|
|
90
|
+
const path = join(git_common_dir, STATE, MEMBERSHIP);
|
|
91
|
+
const doc = await readFolderFile(path);
|
|
92
|
+
if (!doc) {
|
|
93
|
+
throw new Error(`This repository is not the home of a folder of repositories (no ${path}): run attach --all-members in the plan coordinator of the folder's home, after sdlc-agents setup in the folder.`);
|
|
94
|
+
}
|
|
95
|
+
const { folder, home, members } = doc;
|
|
96
|
+
if (typeof folder !== 'string' || !isAbsolute(folder)) {
|
|
97
|
+
throw new Error(`${path}: folder must be an absolute path`);
|
|
98
|
+
}
|
|
99
|
+
if (members === null ||
|
|
100
|
+
typeof members !== 'object' ||
|
|
101
|
+
Array.isArray(members)) {
|
|
102
|
+
throw new Error(`${path}: members must name at least the home`);
|
|
103
|
+
}
|
|
104
|
+
const listed = Object.entries(members).map(([name, rel]) => {
|
|
105
|
+
if (!NAME.test(name)) {
|
|
106
|
+
throw new Error(`${path}: a repository name is 1-64 letters, digits, '.', '_' or '-'`);
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
name,
|
|
110
|
+
path: resolve(folder, relativePath(rel, `member ${name}`, path))
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
if (typeof home !== 'string' ||
|
|
114
|
+
!listed.some((member) => member.name === home)) {
|
|
115
|
+
throw new Error(`${path}: the home ${String(home)} is not a member`);
|
|
116
|
+
}
|
|
117
|
+
const home_checkout = await realpath(dirname(resolve(git_common_dir)));
|
|
118
|
+
const recorded = listed.find((member) => member.name === home).path;
|
|
119
|
+
if ((await realpath(recorded).catch(() => null)) !== home_checkout) {
|
|
120
|
+
// As folder.py locate refuses: the folder moved since it was recorded
|
|
121
|
+
throw new Error(`${path} places the home at ${recorded}, not ${home_checkout}: run sdlc-agents folder relocate.`);
|
|
122
|
+
}
|
|
123
|
+
const result = { folder, home, members: [], skipped: [] };
|
|
124
|
+
for (const member of listed.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
125
|
+
if (member.name === home)
|
|
126
|
+
continue;
|
|
127
|
+
const reason = await notAMember(member.path, member.name, home_checkout);
|
|
128
|
+
if (reason)
|
|
129
|
+
result.skipped.push({ ...member, reason });
|
|
130
|
+
else
|
|
131
|
+
result.members.push(member);
|
|
132
|
+
}
|
|
133
|
+
return result;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* A repository's whole-repository task scope: every node whose source
|
|
137
|
+
* references name one of `repository_names` (compared case-insensitively, as
|
|
138
|
+
* GitHub names are), and every edge touching one of them; null when no node
|
|
139
|
+
* cites the repository. A reference naming no repository belongs to none.
|
|
140
|
+
*/
|
|
141
|
+
export function repositoryTaskScope(graph, repository_names) {
|
|
142
|
+
const names = new Set(repository_names.map((name) => name.toLowerCase()));
|
|
143
|
+
const nodes = graph.nodes
|
|
144
|
+
.filter((node) => sourceFiles(node).some((file) => file.repository !== null && names.has(file.repository.toLowerCase())))
|
|
145
|
+
.map((node) => node.id);
|
|
146
|
+
if (nodes.length === 0)
|
|
147
|
+
return null;
|
|
148
|
+
const cited = new Set(nodes);
|
|
149
|
+
const edges = graph.edges
|
|
150
|
+
.filter((edge) => cited.has(edge.source) || cited.has(edge.target))
|
|
151
|
+
.map((edge) => edge.id);
|
|
152
|
+
return {
|
|
153
|
+
version: 1,
|
|
154
|
+
rules: [
|
|
155
|
+
...nodes.sort().map((entity_id) => ({
|
|
156
|
+
entity_kind: 'node',
|
|
157
|
+
entity_id,
|
|
158
|
+
field_path: '/'
|
|
159
|
+
})),
|
|
160
|
+
...edges.sort().map((entity_id) => ({
|
|
161
|
+
entity_kind: 'edge',
|
|
162
|
+
entity_id,
|
|
163
|
+
field_path: '/'
|
|
164
|
+
}))
|
|
165
|
+
]
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=folder-members.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folder-members.js","sourceRoot":"","sources":["../../src/local/folder-members.ts"],"names":[],"mappings":"AAAA,OAAO,E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,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IAC7B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK;SACtB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAClE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1B,OAAO;QACL,OAAO,EAAE,CAAC;QACV,KAAK,EAAE;YACL,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;gBAClC,WAAW,EAAE,MAAe;gBAC5B,SAAS;gBACT,UAAU,EAAE,GAAG;aAChB,CAAC,CAAC;YACH,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;gBAClC,WAAW,EAAE,MAAe;gBAC5B,SAAS;gBACT,UAAU,EAAE,GAAG;aAChB,CAAC,CAAC;SACJ;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type GitRefNamespace = 'detached' | 'local_branch' | 'remote_tracking' | 'tag' | 'other';
|
|
2
|
+
export type GitRefAuthority = {
|
|
3
|
+
version: 1;
|
|
4
|
+
status: 'mutable_local_ref' | 'read_only_ref' | 'unauthorized_ref';
|
|
5
|
+
ref_name: string | null;
|
|
6
|
+
namespace: GitRefNamespace;
|
|
7
|
+
reason: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function inspectGitRefAuthority(ref_name: string | null): GitRefAuthority;
|
|
10
|
+
export declare function requireMutableLocalBranchRef(ref_name: string, label: string): string;
|
|
11
|
+
//# sourceMappingURL=git-ref-authority.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-ref-authority.d.ts","sourceRoot":"","sources":["../../src/local/git-ref-authority.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,cAAc,GACd,iBAAiB,GACjB,KAAK,GACL,OAAO,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,CAAC,CAAC;IACX,MAAM,EAAE,mBAAmB,GAAG,eAAe,GAAG,kBAAkB,CAAC;IACnE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAiCF,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,eAAe,CA0CjB;AAED,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ,MAAM,CAQR"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
function gitRefNamespace(ref_name) {
|
|
2
|
+
if (ref_name === null)
|
|
3
|
+
return 'detached';
|
|
4
|
+
if (ref_name.startsWith('refs/heads/'))
|
|
5
|
+
return 'local_branch';
|
|
6
|
+
if (ref_name.startsWith('refs/remotes/'))
|
|
7
|
+
return 'remote_tracking';
|
|
8
|
+
if (ref_name.startsWith('refs/tags/'))
|
|
9
|
+
return 'tag';
|
|
10
|
+
return 'other';
|
|
11
|
+
}
|
|
12
|
+
function validGitRefPath(ref_name) {
|
|
13
|
+
if (ref_name.length === 0 ||
|
|
14
|
+
ref_name.startsWith('/') ||
|
|
15
|
+
ref_name.endsWith('/') ||
|
|
16
|
+
ref_name.endsWith('.') ||
|
|
17
|
+
ref_name.includes('..') ||
|
|
18
|
+
ref_name.includes('@{') ||
|
|
19
|
+
ref_name.includes('//') ||
|
|
20
|
+
/[\u0000-\u0020\u007f~^:?*\[\\]/.test(ref_name)) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
return ref_name
|
|
24
|
+
.split('/')
|
|
25
|
+
.every((component) => component.length > 0 &&
|
|
26
|
+
!component.startsWith('.') &&
|
|
27
|
+
!component.endsWith('.lock'));
|
|
28
|
+
}
|
|
29
|
+
export function inspectGitRefAuthority(ref_name) {
|
|
30
|
+
const namespace = gitRefNamespace(ref_name);
|
|
31
|
+
if (namespace === 'detached') {
|
|
32
|
+
return {
|
|
33
|
+
version: 1,
|
|
34
|
+
status: 'read_only_ref',
|
|
35
|
+
ref_name,
|
|
36
|
+
namespace,
|
|
37
|
+
reason: 'Detached Git state has no mutable attached ref.'
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
if (namespace === 'remote_tracking' || namespace === 'tag') {
|
|
41
|
+
return {
|
|
42
|
+
version: 1,
|
|
43
|
+
status: 'read_only_ref',
|
|
44
|
+
ref_name,
|
|
45
|
+
namespace,
|
|
46
|
+
reason: 'Remote-tracking refs and tags are immutable inputs.'
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
if (namespace === 'local_branch' &&
|
|
50
|
+
ref_name !== null &&
|
|
51
|
+
ref_name.length > 'refs/heads/'.length &&
|
|
52
|
+
validGitRefPath(ref_name)) {
|
|
53
|
+
return {
|
|
54
|
+
version: 1,
|
|
55
|
+
status: 'mutable_local_ref',
|
|
56
|
+
ref_name,
|
|
57
|
+
namespace,
|
|
58
|
+
reason: 'Only this local branch namespace may back a mutable local SDLC ref.'
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
version: 1,
|
|
63
|
+
status: 'unauthorized_ref',
|
|
64
|
+
ref_name,
|
|
65
|
+
namespace,
|
|
66
|
+
reason: 'The ref is not a valid mutable local branch ref.'
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export function requireMutableLocalBranchRef(ref_name, label) {
|
|
70
|
+
const authority = inspectGitRefAuthority(ref_name);
|
|
71
|
+
if (authority.status !== 'mutable_local_ref') {
|
|
72
|
+
throw new Error(`${label} is unauthorized: ${authority.namespace} refs cannot back mutable local workspace history.`);
|
|
73
|
+
}
|
|
74
|
+
return ref_name;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=git-ref-authority.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-ref-authority.js","sourceRoot":"","sources":["../../src/local/git-ref-authority.ts"],"names":[],"mappings":"AAeA,SAAS,eAAe,CAAC,QAAuB;IAC9C,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,UAAU,CAAC;IACzC,IAAI,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC;QAAE,OAAO,cAAc,CAAC;IAC9D,IAAI,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC;QAAE,OAAO,iBAAiB,CAAC;IACnE,IAAI,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC;QAAE,OAAO,KAAK,CAAC;IACpD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,eAAe,CAAC,QAAgB;IACvC,IACE,QAAQ,CAAC,MAAM,KAAK,CAAC;QACrB,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC;QACxB,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC;QACtB,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC;QACtB,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;QACvB,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;QACvB,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;QACvB,gCAAgC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAC/C,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,QAAQ;SACZ,KAAK,CAAC,GAAG,CAAC;SACV,KAAK,CACJ,CAAC,SAAS,EAAE,EAAE,CACZ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,CACb,GAAG,KAAK,qBAAqB,SAAS,CAAC,SAAS,oDAAoD,CACrG,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export type GitWorktreeContext = {
|
|
2
|
+
repository_root: string;
|
|
3
|
+
git_dir: string;
|
|
4
|
+
git_common_dir: string;
|
|
5
|
+
ref: string | null;
|
|
6
|
+
head: string;
|
|
7
|
+
is_dirty: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type GitRemoteIdentity = {
|
|
10
|
+
remote_name: string;
|
|
11
|
+
remote_url: string;
|
|
12
|
+
repository_identity: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function discoverGitWorktree(cwd?: string): Promise<GitWorktreeContext>;
|
|
15
|
+
export declare function canonicalGitRepositoryIdentity(remote_url: string, cwd?: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* The project's integration branch (project.py INTEGRATION_BRANCH), from the
|
|
18
|
+
* coordination engine's project.json where engine_config.py finds it: beside
|
|
19
|
+
* an engine inside the repository (scripts/agent-coordination/), else in the
|
|
20
|
+
* worktree's sdlc-coordination/, else in the Git common dir's (a no-footprint
|
|
21
|
+
* repository's), which a repository the user's setup registered reads first.
|
|
22
|
+
* A file that is missing, unreadable, or names no valid branch gives main,
|
|
23
|
+
* the engine's default.
|
|
24
|
+
*/
|
|
25
|
+
export declare function integrationBranch(cwd?: string): Promise<string>;
|
|
26
|
+
/**
|
|
27
|
+
* The remote a source reference's repository is named from: the one the local
|
|
28
|
+
* integration branch (integrationBranch), else main, else master tracks, else
|
|
29
|
+
* the one the current branch tracks, else origin (sources.py tracked_remote).
|
|
30
|
+
* In a fork setup origin is the developer's fork and the integration branch
|
|
31
|
+
* tracks upstream. Branch configuration is shared by every worktree, so a
|
|
32
|
+
* detached child workspace or an untracked thread branch names the repository
|
|
33
|
+
* as the main checkout does.
|
|
34
|
+
*/
|
|
35
|
+
export declare function trackedRemoteName(cwd?: string): Promise<string>;
|
|
36
|
+
/**
|
|
37
|
+
* `owner/name` from a hosted remote URL (https or ssh), or null for a local
|
|
38
|
+
* path or file URL, whose last two directories name no repository
|
|
39
|
+
* (sources.py owner_name). A hosted URL always has a colon (scheme or
|
|
40
|
+
* host:path); a relative path has none.
|
|
41
|
+
*/
|
|
42
|
+
export declare function remoteOwnerName(url: string): string | null;
|
|
43
|
+
/**
|
|
44
|
+
* Every `owner/name` the repository at `cwd` goes by at `commit`, the one
|
|
45
|
+
* source references record first (sources.py repository_names, the same set).
|
|
46
|
+
* The remotes, in order, are its tracked remote (trackedRemoteName), origin,
|
|
47
|
+
* the other remotes a local branch tracks, then any other whose
|
|
48
|
+
* remote-tracking branches contain `commit` or its first-parent root commit
|
|
49
|
+
* (they share its history); the first of them naming an `owner/name` whose branches
|
|
50
|
+
* contain `commit` comes first, else the first naming one; origin, when first,
|
|
51
|
+
* gives way to a remote named upstream (Git's name for a fork's parent) when
|
|
52
|
+
* its main line (origin/HEAD, else main, else master) holds nothing past
|
|
53
|
+
* upstream's branches. A fork (origin, however it is named)
|
|
54
|
+
* and its upstream are one repository here: a fork whose only branch tracks
|
|
55
|
+
* the fork while upstream holds the commit, or whose main line sits level
|
|
56
|
+
* with or behind upstream, pushed feature branches or not, is named from
|
|
57
|
+
* upstream; a fork whose main line has commits upstream lacks, and a
|
|
58
|
+
* canonical origin beside a fork of another name, keep their own, and a
|
|
59
|
+
* commit no remote holds yet names origin first, upstream still one of its
|
|
60
|
+
* names.
|
|
61
|
+
* A remote that neither a branch tracks nor shares the commit's history is not.
|
|
62
|
+
*/
|
|
63
|
+
export declare function repositoryNames(cwd?: string, commit?: string): Promise<string[]>;
|
|
64
|
+
/**
|
|
65
|
+
* The remote whose `owner/name` source references record first
|
|
66
|
+
* (repositoryNames), or null when no remote names one. A source binding made
|
|
67
|
+
* with no remote named uses it, so a workspace commit's remote identity names
|
|
68
|
+
* the repository its references name.
|
|
69
|
+
*/
|
|
70
|
+
export declare function namingRemote(cwd?: string, commit?: string): Promise<string | null>;
|
|
71
|
+
/** The names of the repository's remotes. */
|
|
72
|
+
export declare function gitRemoteNames(cwd?: string): Promise<string[]>;
|
|
73
|
+
export declare function discoverGitRemoteIdentity(cwd?: string, remote_name?: string): Promise<GitRemoteIdentity>;
|
|
74
|
+
export declare function assertLocalWorkspacePathsIgnored(cwd: string): Promise<void>;
|
|
75
|
+
export declare function createDetachedGitWorktree(input: {
|
|
76
|
+
source_cwd: string;
|
|
77
|
+
target_path: string;
|
|
78
|
+
commit_id: string;
|
|
79
|
+
}): Promise<GitWorktreeContext>;
|
|
80
|
+
export declare function removeGitWorktree(input: {
|
|
81
|
+
repository_cwd: string;
|
|
82
|
+
target_path: string;
|
|
83
|
+
force?: boolean;
|
|
84
|
+
}): Promise<void>;
|
|
85
|
+
export declare function listGitWorktreeStatus(cwd: string, input?: {
|
|
86
|
+
include_ignored?: boolean;
|
|
87
|
+
}): Promise<string[]>;
|
|
88
|
+
//# sourceMappingURL=git.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/local/git.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAkCF,wBAAsB,mBAAmB,CACvC,GAAG,SAAgB,GAClB,OAAO,CAAC,kBAAkB,CAAC,CA8B7B;AAED,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM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