@paradigma-inc/flywheel 0.1.115 → 0.1.134
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/README.md +67 -10
- package/package.json +14 -6
- package/skills/flywheel/SKILL.md +9 -6
- package/skills/flywheel/example-workflows/organizing-exploring-and-iterating-on-a-research-topic.md +38 -46
- package/skills/flywheel/example-workflows/reproducing-papers-on-a-budget.md +34 -36
- package/skills/flywheel/getting-started/flywheel-quickstart.md +2 -5
- package/skills/flywheel/references/INTERFACES.md +2 -2
- package/skills/flywheel/references/experiment-design-protocol.md +32 -25
- package/skills/flywheel/references/flywheel-cli-tool-map.md +120 -76
- package/skills/flywheel/references/flywheel-mcp-tool-map.md +42 -32
- package/skills/flywheel/setting-up-flywheel/claude-code-cli-installation.md +1 -1
- package/skills/flywheel/setting-up-flywheel/codex-cli-installation.md +1 -1
- package/skills/flywheel/setting-up-flywheel/installation-overview.md +2 -6
- package/skills/flywheel/setting-up-flywheel/other-hosts-installation.md +45 -25
- package/skills/flywheel/setting-up-flywheel/updating-flywheel-mcp.md +34 -11
- package/skills/flywheel-auto/SKILL.md +40 -23
- package/skills/flywheel-auto/evals/evals.json +1 -1
- package/skills/flywheel-auto/references/INTERFACES.md +2 -2
- package/skills/flywheel-auto/references/experiment-design-protocol.md +31 -23
- package/skills/flywheel-auto/references/flywheel-cli-tool-map.md +172 -127
- package/skills/flywheel-auto/references/flywheel-mcp-tool-map.md +22 -24
- package/skills/flywheel-lookahead/SKILL.md +47 -28
- package/skills/flywheel-lookahead/agents/openai.yaml +1 -1
- package/skills/flywheel-lookahead/evals/evals.json +6 -6
- package/skills/flywheel-lookahead/references/INTERFACES.md +2 -2
- package/skills/flywheel-lookahead/references/flywheel-cli-tool-map.md +172 -127
- package/skills/flywheel-lookahead/references/flywheel-mcp-tool-map.md +22 -24
- package/skills/flywheel-prove/SKILL.md +2 -2
- package/skills/flywheel-prove/references/workflow.md +21 -2
- package/skills/flywheel-reproduce/SKILL.md +39 -19
- package/skills/flywheel-reproduce/evals/evals.json +1 -1
- package/skills/flywheel-reproduce/references/INTERFACES.md +2 -2
- package/skills/flywheel-reproduce/references/experiment-design-protocol.md +31 -23
- package/skills/flywheel-reproduce/references/flywheel-cli-tool-map.md +172 -127
- package/skills/flywheel-reproduce/references/flywheel-mcp-tool-map.md +22 -24
- package/skills/flywheel-to-graph/SKILL.md +37 -17
- package/skills/flywheel-to-graph/references/INTERFACES.md +2 -2
- package/skills/flywheel-to-graph/references/flywheel-cli-tool-map.md +172 -127
- package/skills/flywheel-to-graph/references/flywheel-mcp-tool-map.md +22 -24
- package/skills/flywheel-tree/references/workflow.md +6 -37
- package/src/cli.mjs +1145 -1141
- package/src/mcp-writer.mjs +413 -435
- package/src/public-command-metadata.mjs +28 -5
- package/src/runtime/delegate.mjs +2 -19
- package/src/runtime/required-runtime-commands.json +80 -28
- package/src/runtime/runtime-config.mjs +39 -60
- package/src/runtime/vendor/flywheel-cli-dist/auth/credentials.js +330 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/credentials.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/login.js +90 -139
- package/src/runtime/vendor/flywheel-cli-dist/auth/login.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.js +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/auth/secure-write.js +116 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/secure-write.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-create.js +248 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-create.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-login.js +65 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-login.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-revoke-api-key.js +17 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-revoke-api-key.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/aliases.js +3 -7
- package/src/runtime/vendor/flywheel-cli-dist/commands/aliases.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-credentials-clear.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-credentials-clear.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-credentials-set.js +29 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-credentials-set.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-login.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-login.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.js +46 -10
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/env.js +17 -40
- package/src/runtime/vendor/flywheel-cli-dist/commands/env.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/graph-operation-resources.js +305 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/graph-operation-resources.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/graph-operation-support.js +72 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/graph-operation-support.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/graph-operation.js +286 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/graph-operation.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/help-metadata.js +30 -5
- package/src/runtime/vendor/flywheel-cli-dist/commands/help-metadata.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/help.js +27 -12
- package/src/runtime/vendor/flywheel-cli-dist/commands/help.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-commit-replay.js +284 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-commit-replay.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-graph.js +169 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-graph.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-lineage-list.js +13 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-lineage-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-repository-snapshot.js +227 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-repository-snapshot.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/index.js +21 -51
- package/src/runtime/vendor/flywheel-cli-dist/commands/index.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/node-create-schema.js +25 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/node-create-schema.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.js +11 -9
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.js +38 -45
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.js +14 -17
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-unset.js +13 -8
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-unset.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/admin.js +34 -3
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/admin.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.js +9 -9
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/hosted.js +76 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/hosted.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.js +4 -138
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.js +8 -13
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/repository.js +362 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/repository.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry.js +45 -183
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/repository-edit.js +47 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/repository-edit.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/repository-operation.js +181 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/repository-operation.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/repository-output.js +163 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/repository-output.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/repository-projection.js +79 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/repository-projection.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/repository-selection.js +80 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/repository-selection.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/retired-command-names.js +78 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/retired-command-names.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/types.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/usage-spec.js +3 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/usage-spec.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/config/index.js +5 -0
- package/src/runtime/vendor/flywheel-cli-dist/config/index.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/config/io.js +139 -0
- package/src/runtime/vendor/flywheel-cli-dist/config/io.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/config/migration.js +299 -0
- package/src/runtime/vendor/flywheel-cli-dist/config/migration.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/config/model.js +214 -0
- package/src/runtime/vendor/flywheel-cli-dist/config/model.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/config/path.js +30 -0
- package/src/runtime/vendor/flywheel-cli-dist/config/path.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/credential-output.js +29 -0
- package/src/runtime/vendor/flywheel-cli-dist/credential-output.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/errors.js +1 -16
- package/src/runtime/vendor/flywheel-cli-dist/errors.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/generatedProductTelemetryContract.js +3 -3
- package/src/runtime/vendor/flywheel-cli-dist/generatedProductTelemetryContract.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/grammar/globals.js +19 -9
- package/src/runtime/vendor/flywheel-cli-dist/grammar/globals.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/grammar/parse.js +33 -4
- package/src/runtime/vendor/flywheel-cli-dist/grammar/parse.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/http/client.js +322 -304
- package/src/runtime/vendor/flywheel-cli-dist/http/client.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/http/debug.js +1 -21
- package/src/runtime/vendor/flywheel-cli-dist/http/debug.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/http/retry.js +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/retry.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/local/adapter.js +244 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/adapter.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/errors.js +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/errors.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/history.js +35 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/history.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/invariants.js +42 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/invariants.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/artifact-properties.js +179 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/artifact-properties.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/commits.js +152 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/commits.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/constants.js +71 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/constants.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/encoding.js +73 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/encoding.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/imported-artifact-properties.js +82 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/imported-artifact-properties.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/operations.js +345 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/operations.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/tags.js +57 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/tags.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/conflicts.js +149 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/conflicts.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/context.js +115 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/context.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/keys.js +44 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/keys.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/pull.js +159 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/pull.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/replay.js +346 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/replay.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/resolve.js +37 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/resolve.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/revert/inverses.js +203 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/revert/inverses.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/revert/plan.js +207 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/revert/plan.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/revert/tag-inverses.js +109 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/revert/tag-inverses.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/commit.js +61 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/commit.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/projection.js +46 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/projection.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/revert.js +203 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/revert.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/staging.js +44 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/staging.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/writes.js +188 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/writes.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/sync/cursors.js +54 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/sync/cursors.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/sync/local-pull.js +25 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/sync/local-pull.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/sync-models.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/domain/sync-models.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/fs/native.js +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/fs/native.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/fs/state.js +129 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/fs/state.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/fs/writer-lock.js +277 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/fs/writer-lock.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/bootstrap.js +183 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/bootstrap.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/context.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/context.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/dispatch.js +121 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/dispatch.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/doctor.js +16 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/doctor.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/identity.js +72 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/identity.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/conflicts.js +59 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/conflicts.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/core.js +125 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/core.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/history.js +129 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/history.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/index.js +31 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/index.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/maintenance.js +49 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/maintenance.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/projections.js +30 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/projections.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/shared.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/shared.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/platform.js +18 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/platform.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/projection.js +125 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/projection.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/clone.js +37 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/clone.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/pull.js +44 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/pull.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/purge.js +58 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/purge.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/push.js +118 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/push.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/transport.js +277 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/transport.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/apply.js +132 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/apply.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/archive.js +372 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/archive.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/backup.js +210 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/backup.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/restore.js +278 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/restore.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/retained-directory.js +192 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/retained-directory.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/commits.js +114 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/commits.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/contract.js +65 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/contract.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/diagnostics-worker.js +145 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/diagnostics-worker.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/diagnostics.js +218 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/diagnostics.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/gc.js +71 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/gc.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/history-validation.js +298 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/history-validation.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/latest-values.js +121 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/latest-values.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migrate.js +69 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migrate.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migration/provenance.js +49 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migration/provenance.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migration/steps.js +424 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migration/steps.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migration/versions.js +10 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migration/versions.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations/001_initial.sql +319 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations/002_staged_latest_values.sql +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations/003_remove_cli_editing_lease.sql +21 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations/004_hosted_association.sql +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations/005_artifact_properties.sql +68 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/objects.js +410 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/objects.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/apply.js +77 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/apply.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/artifacts.js +240 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/artifacts.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/nodes.js +127 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/nodes.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/relations.js +107 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/relations.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/rules.js +80 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/rules.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/tags.js +219 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/tags.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/hosted.js +164 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/hosted.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/read.js +20 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/read.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/replace.js +41 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/replace.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/schema.js +22 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/schema.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/validate.js +188 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/validate.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot.js +5 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/connection.js +214 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/connection.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/errors.js +4 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/errors.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/rows.js +44 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/rows.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/schema.js +38 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/schema.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/store.js +284 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/store.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/verify.js +133 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/verify.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sync-commits.js +98 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sync-commits.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sync.js +161 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/sync.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/workspace-state.js +97 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/workspace-state.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/workspace.js +69 -0
- package/src/runtime/vendor/flywheel-cli-dist/local/store/workspace.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/main.js +651 -376
- package/src/runtime/vendor/flywheel-cli-dist/main.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/output/format.js +18 -11
- package/src/runtime/vendor/flywheel-cli-dist/output/format.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/prebuilds/darwin-arm64/node.napi.node +0 -0
- package/src/runtime/vendor/flywheel-cli-dist/prebuilds/darwin-x64/node.napi.node +0 -0
- package/src/runtime/vendor/flywheel-cli-dist/prebuilds/linux-arm64/node.napi.glibc.node +0 -0
- package/src/runtime/vendor/flywheel-cli-dist/prebuilds/linux-arm64/node.napi.musl.node +0 -0
- package/src/runtime/vendor/flywheel-cli-dist/prebuilds/linux-x64/node.napi.glibc.node +0 -0
- package/src/runtime/vendor/flywheel-cli-dist/prebuilds/linux-x64/node.napi.musl.node +0 -0
- package/src/runtime/vendor/manifest.json +246 -257
- package/src/setup/command.mjs +5 -0
- package/src/setup/io/patchers/json.mjs +1 -1
- package/src/setup/io/patchers/toml.mjs +3 -1
- package/src/setup/io/patchers/yaml.mjs +1 -1
- package/src/setup/modes/cli.mjs +76 -7
- package/src/setup/modes/mcp-command.mjs +802 -793
- package/src/setup/modes/mcp.mjs +7 -3
- package/src/setup/shared/prior-mode-detect.mjs +18 -21
- package/src/setup/test-seams.mjs +25 -0
- package/src/setup-auth.mjs +76 -10
- package/src/toml-lines.mjs +52 -0
- package/src/unified-cli.mjs +31 -16
- package/skills/flywheel-llm-proof-paper/scripts/__pycache__/check_paper.cpython-312.pyc +0 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/active-key-id.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/auth/baseurl.d.ts +0 -35
- package/src/runtime/vendor/flywheel-cli-dist/auth/config.d.ts +0 -34
- package/src/runtime/vendor/flywheel-cli-dist/auth/config.js +0 -92
- package/src/runtime/vendor/flywheel-cli-dist/auth/config.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/auth/fingerprint.d.ts +0 -5
- package/src/runtime/vendor/flywheel-cli-dist/auth/keychain.d.ts +0 -4
- package/src/runtime/vendor/flywheel-cli-dist/auth/keychain.js +0 -31
- package/src/runtime/vendor/flywheel-cli-dist/auth/keychain.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/auth/login.d.ts +0 -24
- package/src/runtime/vendor/flywheel-cli-dist/auth/profile.d.ts +0 -15
- package/src/runtime/vendor/flywheel-cli-dist/auth/profile.js +0 -150
- package/src/runtime/vendor/flywheel-cli-dist/auth/profile.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.d.ts +0 -27
- package/src/runtime/vendor/flywheel-cli-dist/commands/_admin-auth.d.ts +0 -27
- package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.d.ts +0 -32
- package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.js +0 -213
- package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/_browser-handoff.d.ts +0 -35
- package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/_secret-param.d.ts +0 -7
- package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-file-out.d.ts +0 -39
- package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-writer.d.ts +0 -34
- package/src/runtime/vendor/flywheel-cli-dist/commands/_wait-polling.d.ts +0 -50
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-detach.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-add.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-remove.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-set-primary.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-preview.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-proof.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-get.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-set.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export-stream.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-list.d.ts +0 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-nodes-audit-list.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-create.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-delete.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-login.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/aliases.d.ts +0 -13
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-create.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-delete.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.d.ts +0 -18
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-rotate.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-expire.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-heartbeat.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-list.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete-bulk.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete-bulk.js +0 -22
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete-bulk.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.js +0 -8
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-get.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-list.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-note-set.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-note-set.js +0 -9
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-note-set.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-finalize.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-finalize.js +0 -7
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-finalize.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-prepare.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-prepare.js +0 -15
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-prepare.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload.js +0 -5
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-clear.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-clear.js +0 -8
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-clear.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-set.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-set.js +0 -30
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-set.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-login.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-mode.d.ts +0 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/blobs-get.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-create.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-list.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-revoke.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-update.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-snapshot.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-acquire.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-budgets.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-connection.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-funding.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-list.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-request-approval.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-options.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release-all.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-status.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-balance.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-billing-portal.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-purchase.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral-claim.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscribe.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscription.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-transactions.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-usage.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/destructive-confirmation.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/enums.d.ts +0 -22
- package/src/runtime/vendor/flywheel-cli-dist/commands/env.d.ts +0 -8
- package/src/runtime/vendor/flywheel-cli-dist/commands/executions-launch.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/executions-list.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/executions-terminate.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-history.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-subgraph.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-pdf.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-render-pdf.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-stream.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/feedback-create.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/files-list.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-disconnect.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-link.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-refresh-repos.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-status.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/graph-get.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/handler-factory.d.ts +0 -22
- package/src/runtime/vendor/flywheel-cli-dist/commands/help-format.d.ts +0 -31
- package/src/runtime/vendor/flywheel-cli-dist/commands/help-metadata.d.ts +0 -36
- package/src/runtime/vendor/flywheel-cli-dist/commands/help.d.ts +0 -17
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-create.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-delete.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-list.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-runs-list.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-create.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-delete.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-list.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-update.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-set-enabled.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-update.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/import-subgraph.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/index.d.ts +0 -23
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-remove.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-set.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-status.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-remove.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-set.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/machines-list.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.js +0 -15
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-branch.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-branch.js +0 -10
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-branch.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-children.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-children.js +0 -8
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-children.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit-new.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit-new.js +0 -6
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit-new.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit.js +0 -7
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-create.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-create.js +0 -6
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-create.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.js +0 -16
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.js +0 -11
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-files.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-get.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-list.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-merge.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-merge.js +0 -33
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-merge.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-parents.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-parents.js +0 -8
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-parents.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.js +0 -15
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-ancestry.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-summary.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-tree.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-resolve-slug.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-get.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set-bulk.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-summaries.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-acquire.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-heartbeat.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-release.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-unset.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/account.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/admin.d.ts +0 -8
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/api-keys.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/approval.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.js +0 -140
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/budgets.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/credits.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/env.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/executions.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/export.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/github.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/graph.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/hooks.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/integrations.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/sharing.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/tagging.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/tagging.js +0 -98
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/tagging.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/updates.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry.d.ts +0 -27
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-refresh.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-resolve.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-assign.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-assign.js +0 -25
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-assign.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-create.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-create.js +0 -25
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-create.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-delete.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-delete.js +0 -11
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-delete.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-update.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-update.js +0 -28
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-update.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/types.d.ts +0 -30
- package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide-all-active.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/updates-list.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/usage-spec.d.ts +0 -6
- package/src/runtime/vendor/flywheel-cli-dist/commands/utils.d.ts +0 -11
- package/src/runtime/vendor/flywheel-cli-dist/errors.d.ts +0 -86
- package/src/runtime/vendor/flywheel-cli-dist/exit-codes.d.ts +0 -8
- package/src/runtime/vendor/flywheel-cli-dist/generatedFeedbackContract.d.ts +0 -41
- package/src/runtime/vendor/flywheel-cli-dist/generatedProductTelemetryContract.d.ts +0 -13
- package/src/runtime/vendor/flywheel-cli-dist/grammar/globals.d.ts +0 -26
- package/src/runtime/vendor/flywheel-cli-dist/grammar/parse.d.ts +0 -17
- package/src/runtime/vendor/flywheel-cli-dist/http/client.d.ts +0 -91
- package/src/runtime/vendor/flywheel-cli-dist/http/debug.d.ts +0 -5
- package/src/runtime/vendor/flywheel-cli-dist/http/poll.d.ts +0 -18
- package/src/runtime/vendor/flywheel-cli-dist/http/retry.d.ts +0 -30
- package/src/runtime/vendor/flywheel-cli-dist/main.d.ts +0 -33
- package/src/runtime/vendor/flywheel-cli-dist/output/format.d.ts +0 -9
- package/src/runtime/vendor/flywheel-cli-dist/runtime-entry.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/version.d.ts +0 -3
- package/src/secure-write.mjs +0 -43
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/local/runtime/operations/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC7G,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGpE,kFAAkF;AAClF,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAAuB,EACvB,SAAiB,EACjB,UAA6C,EAC7C,eAAqC;IAErC,IAAI,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,SAAS,CAAC;QAAE,OAAO,UAAU,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IACtG,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,SAAS,CAAC,CAAC,OAAO,O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AU,EAAE,eAAe,CAAC,CAAC;QACnE,KAAK,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC1C,OAAO,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACjE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { backupRepository } from "../../store/backup/backup.js";
|
|
3
|
+
import { restoreRepositoryArchive } from "../../store/backup/restore.js";
|
|
4
|
+
import { requireAllowedArguments, requireExactArguments } from "./shared.js";
|
|
5
|
+
export async function backup(context, arguments_) {
|
|
6
|
+
requireAllowedArguments(arguments_, ["destination", "force"]);
|
|
7
|
+
const destination = arguments_.destination;
|
|
8
|
+
const force = arguments_.force ?? false;
|
|
9
|
+
if (typeof destination !== "string" || typeof force !== "boolean")
|
|
10
|
+
throw new Error("invalid internal operation arguments");
|
|
11
|
+
const backup = await backupRepository({
|
|
12
|
+
state: context.state,
|
|
13
|
+
repositoryId: context.repositoryId,
|
|
14
|
+
reachableObjectDigests: async () => context.store.loadReachableObjectDigests(context.repositoryId, (await context.store.loadHead(context.repositoryId)).commitId),
|
|
15
|
+
}, destination, { force });
|
|
16
|
+
const result = {
|
|
17
|
+
archive_digest: backup.archiveDigest,
|
|
18
|
+
repository_id: backup.repositoryId,
|
|
19
|
+
verified: backup.verified,
|
|
20
|
+
};
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
export async function restore(context, arguments_) {
|
|
24
|
+
requireExactArguments(arguments_, ["archive"]);
|
|
25
|
+
const archive = arguments_.archive;
|
|
26
|
+
if (typeof archive !== "string")
|
|
27
|
+
throw new Error("invalid internal operation arguments");
|
|
28
|
+
const result = await restoreRepositoryArchive(resolve(archive), context.state.statePath, {
|
|
29
|
+
databaseRelativePath: "db.sqlite",
|
|
30
|
+
objectsRelativePath: "objects",
|
|
31
|
+
expectedRepositoryId: context.repositoryId,
|
|
32
|
+
});
|
|
33
|
+
return { path: result.path, repository_id: result.repositoryId, client_id: result.clientId };
|
|
34
|
+
}
|
|
35
|
+
export async function gc(context, arguments_) {
|
|
36
|
+
requireAllowedArguments(arguments_, ["dry_run"]);
|
|
37
|
+
const dryRun = arguments_.dry_run ?? true;
|
|
38
|
+
if (typeof dryRun !== "boolean")
|
|
39
|
+
throw new Error("invalid internal operation arguments");
|
|
40
|
+
const result = await context.store.collectLocalObjects(context.repositoryId, { dryRun, now: new Date() });
|
|
41
|
+
return {
|
|
42
|
+
repository_id: result.repositoryId,
|
|
43
|
+
dry_run: result.dryRun,
|
|
44
|
+
reachable: [...result.reachable],
|
|
45
|
+
candidates: [...result.candidates],
|
|
46
|
+
deleted: [...result.deleted],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=maintenance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maintenance.js","sourceRoot":"","sources":["../../../../src/local/runtime/operations/maintenance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE7E,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,OAAuB,EAAE,UAA6C;IACjG,uBAAuB,CAAC,UAAU,EAAE,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9D,MAAM,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;IAC3C,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,KAAK,CAAC;IACxC,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CA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E,CAAC,OAAuB,EAAE,UAA6C;IAC7F,uBAAuB,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,IAAI,IAAI,CAAC;IAC1C,IAAI,OAAO,MAAM,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IACzF,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;IAC1G,OAAO;QACL,aAAa,EAAE,MAAM,CAAC,YAAY;QAClC,OAAO,EAAE,MAAM,CAAC,MAAM;QACtB,SAAS,EAAE,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC;QAChC,UAAU,EAAE,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC;QAClC,OAAO,EAAE,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { renderProjection } from "../projection.js";
|
|
2
|
+
import { requireAllowedArguments } from "./shared.js";
|
|
3
|
+
export const projectionOperations = {
|
|
4
|
+
"node:get": ["node_id", "at_head"],
|
|
5
|
+
"tag:list": ["scope_node_id", "at_head", "after"],
|
|
6
|
+
"lineage:list": ["node_id", "at_head", "after"],
|
|
7
|
+
"node-artifact:list": ["node_id", "at_head", "after"],
|
|
8
|
+
"edge-artifact:list": ["edge_id", "at_head", "after"],
|
|
9
|
+
"artifact:get": ["artifact_id", "at_head"],
|
|
10
|
+
"containment:show": ["containment_id", "at_head"],
|
|
11
|
+
"containment:get": ["child_node_id", "at_head"],
|
|
12
|
+
"containment:list": ["container_node_id", "at_head", "after"],
|
|
13
|
+
"edge:list": ["graph_node_id", "at_head", "after"],
|
|
14
|
+
"edge:get": ["edge_id", "at_head"],
|
|
15
|
+
};
|
|
16
|
+
export async function projection(context, operation, arguments_) {
|
|
17
|
+
requireAllowedArguments(arguments_, projectionOperations[operation]);
|
|
18
|
+
const values = { ...arguments_ };
|
|
19
|
+
const explicitHead = values.at_head;
|
|
20
|
+
delete values.at_head;
|
|
21
|
+
if (values.after !== undefined && values.after !== null && explicitHead === undefined) {
|
|
22
|
+
throw new Error("repository_local_history_changed");
|
|
23
|
+
}
|
|
24
|
+
if (explicitHead !== undefined && typeof explicitHead !== "string") {
|
|
25
|
+
throw new Error("invalid internal operation arguments");
|
|
26
|
+
}
|
|
27
|
+
const head = explicitHead === undefined ? (await context.store.loadHead(context.repositoryId)).commitId : explicitHead;
|
|
28
|
+
return renderProjection(operation, await context.store.loadSnapshot(context.repositoryId, head), values);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=projections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projections.js","sourceRoot":"","sources":["../../../../src/local/runtime/operations/projections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,CAAC,MAAM,oBAAoB,GAAgD;IAC/E,UAAU,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;IAClC,UAAU,EAAE,CAAC,eAAe,EAAE,SAAS,EAAE,OAAO,CAAC;IACjD,cAAc,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC;IAC/C,oBAAoB,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC;IACrD,oBAAoB,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC;IACrD,cAAc,EAAE,CAAC,aAAa,EAAE,SAAS,CAAC;IAC1C,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC;IACjD,iBAAiB,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC;I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ual.length !== required.length || actual.some(name => !required.includes(name))) {
|
|
4
|
+
throw new Error("invalid internal operation arguments");
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export function requireAllowedArguments(arguments_, allowed) {
|
|
8
|
+
if (Object.keys(arguments_).some(name => !allowed.includes(name))) {
|
|
9
|
+
throw new Error("invalid internal operation arguments");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/local/runtime/operations/shared.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,qBAAqB,CACnC,UAA6C,EAC7C,QAA2B;IAE3B,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACvC,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QACvF,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;AACH,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,UAA6C,EAC7C,OAA0B;IAE1B,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAClE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Keep this entry independent of node:sqlite and the filesystem addon.
|
|
2
|
+
export function assertNodeVersion(version = process.versions.node) {
|
|
3
|
+
const match = /^(\d+)\.(\d+)\.(\d+)$/.exec(version);
|
|
4
|
+
const major = match === null ? 0 : Number(match[1]);
|
|
5
|
+
const minor = match === null ? 0 : Number(match[2]);
|
|
6
|
+
if (!((major === 24 && minor >= 15) || (major === 25 && minor >= 7) || major >= 26)) {
|
|
7
|
+
throw new Error(`Node.js ${version} is not supported for local repositories. Use Node.js 24.15.0 through 24.x, or 25.7.0 and newer (^24.15.0 || >=25.7.0). Upgrade Node.js before running this command.`);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export function assertLocalPlatform(platform = process.platform, architecture = process.arch) {
|
|
11
|
+
if (platform === "win32") {
|
|
12
|
+
throw new Error("Local repository commands are not yet verified on Windows. Commands that do not use a local repository remain available.");
|
|
13
|
+
}
|
|
14
|
+
if ((platform !== "darwin" && platform !== "linux") || (architecture !== "arm64" && architecture !== "x64")) {
|
|
15
|
+
throw new Error(`Local repository commands are not supported on ${platform}/${architecture}. Supported platforms: darwin/arm64, darwin/x64, linux/arm64, linux/x64.`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=platform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../src/local/runtime/platform.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,MAAM,UAAU,iBAAiB,CAAC,UAAkB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACvE,MAAM,KAAK,GAAG,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,IAAI,CAAC,CAAC,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC;QACpF,MAAM,IAAI,KAAK,CAAC,WAAW,OAAO,sKAAsK,CAAC,CAAC;IAC5M,CAAC;AACH,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,WAAmB,OAAO,CAAC,QAAQ,EAAE,eAAuB,OAAO,CAAC,IAAI;IAC1G,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,0HAA0H,CAAC,CAAC;IAC9I,CAAC;IACD,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,YAAY,KAAK,OAAO,IAAI,YAAY,KAAK,KAAK,CAAC,EAAE,CAAC;QAC5G,MAAM,IAAI,KAAK,CAAC,kDAAkD,QAAQ,IAAI,YAAY,0EAA0E,CAAC,CAAC;IACxK,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { isRecord } from "../domain/models/constants.js";
|
|
3
|
+
import { canonicalBytes, parseRepositoryJson } from "../domain/models/encoding.js";
|
|
4
|
+
import { SNAPSHOT_TABLES } from "../store/snapshot/schema.js";
|
|
5
|
+
const COLUMNS = new Map(SNAPSHOT_TABLES.map(([name, columns]) => [name, columns]));
|
|
6
|
+
const TARGET_FIELDS = ["node_id", "scope_node_id", "edge_id", "artifact_id", "containment_id", "child_node_id", "container_node_id", "graph_node_id"];
|
|
7
|
+
function digest(value) {
|
|
8
|
+
return `sha256:${createHash("sha256").update(canonicalBytes(value)).digest("hex")}`;
|
|
9
|
+
}
|
|
10
|
+
function tablesFrom(snapshot) {
|
|
11
|
+
try {
|
|
12
|
+
const payload = parseRepositoryJson(new TextDecoder("utf-8", { fatal: true }).decode(snapshot.canonicalBytes));
|
|
13
|
+
if (!isRecord(payload) || !isRecord(payload.tables))
|
|
14
|
+
throw new Error("missing tables");
|
|
15
|
+
return payload.tables;
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
throw new Error("local projection snapshot is invalid", { cause: error });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function rows(tables, table) {
|
|
22
|
+
const rawRows = tables[table];
|
|
23
|
+
const columns = COLUMNS.get(table);
|
|
24
|
+
if (!Array.isArray(rawRows) || rawRows.some(row => !Array.isArray(row) || row.length !== columns.length)) {
|
|
25
|
+
throw new Error("local projection snapshot is invalid");
|
|
26
|
+
}
|
|
27
|
+
return rawRows.map((row) => Object.fromEntries(columns.map((column, index) => [column, row[index]])));
|
|
28
|
+
}
|
|
29
|
+
function matching(tables, table, field, value) {
|
|
30
|
+
return rows(tables, table).filter(row => row[field] === value);
|
|
31
|
+
}
|
|
32
|
+
function one(tables, table, field, value) {
|
|
33
|
+
const values = matching(tables, table, field, value);
|
|
34
|
+
if (values.length !== 1)
|
|
35
|
+
throw new Error("local projection entity is unavailable");
|
|
36
|
+
return values[0];
|
|
37
|
+
}
|
|
38
|
+
function target(arguments_) {
|
|
39
|
+
for (const name of TARGET_FIELDS) {
|
|
40
|
+
const value = arguments_[name];
|
|
41
|
+
if (typeof value === "string" && value.length > 0)
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
throw new Error("local projection target is missing");
|
|
45
|
+
}
|
|
46
|
+
function offset(value) {
|
|
47
|
+
if (value === undefined || value === null)
|
|
48
|
+
return 0n;
|
|
49
|
+
if (typeof value !== "string" || value.length === 0)
|
|
50
|
+
throw new Error("local projection cursor is invalid");
|
|
51
|
+
if (/^[0-9]+$/.test(value))
|
|
52
|
+
return BigInt(value);
|
|
53
|
+
// Python's int() also accepts Unicode decimal digits. Consecutive decimal
|
|
54
|
+
// digit blocks have ten entries, including adjacent mathematical alphabets.
|
|
55
|
+
let digits = "";
|
|
56
|
+
for (const character of value) {
|
|
57
|
+
if (!/^\p{Decimal_Number}$/u.test(character))
|
|
58
|
+
throw new Error("local projection cursor is invalid");
|
|
59
|
+
const code = character.codePointAt(0);
|
|
60
|
+
let first = code;
|
|
61
|
+
while (first > 0 && /^\p{Decimal_Number}$/u.test(String.fromCodePoint(first - 1)))
|
|
62
|
+
first--;
|
|
63
|
+
digits += String((code - first) % 10);
|
|
64
|
+
}
|
|
65
|
+
return BigInt(digits);
|
|
66
|
+
}
|
|
67
|
+
function page(atHead, field, values, arguments_, extra = {}) {
|
|
68
|
+
const requested = offset(arguments_.after);
|
|
69
|
+
const start = requested >= BigInt(values.length) ? values.length : Number(requested);
|
|
70
|
+
return { at_head: atHead, [field]: values.slice(start, start + 256), next_cursor: start + 256 < values.length ? String(start + 256) : null, ...extra };
|
|
71
|
+
}
|
|
72
|
+
/** Render command-facing values from one pinned repository snapshot. */
|
|
73
|
+
export function renderProjection(operation, snapshot, arguments_) {
|
|
74
|
+
const tables = tablesFrom(snapshot);
|
|
75
|
+
const atHead = snapshot.headCommitId;
|
|
76
|
+
const id = target(arguments_);
|
|
77
|
+
switch (operation) {
|
|
78
|
+
case "node:get": {
|
|
79
|
+
const node = one(tables, "repository_nodes", "node_id", id);
|
|
80
|
+
const latest = one(tables, "repository_node_latest_values", "node_id", id);
|
|
81
|
+
return {
|
|
82
|
+
at_head: atHead,
|
|
83
|
+
field_digests: Object.fromEntries(Object.entries(latest).filter(([name]) => name.endsWith("_digest")).map(([name, value]) => [name.slice(0, -7), value])),
|
|
84
|
+
lifecycle_digest: digest(node.lifecycle_state), node: { ...node, ...latest },
|
|
85
|
+
tag_relation_digests: matching(tables, "repository_tag_assignments", "node_id", id).map(digest),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
case "tag:list":
|
|
89
|
+
return page(atHead, "tags", matching(tables, "repository_tag_definitions", "scope_node_id", id), arguments_, {
|
|
90
|
+
holder_digests: matching(tables, "repository_tag_assignments", "scope_node_id", id).map(digest),
|
|
91
|
+
});
|
|
92
|
+
case "lineage:list":
|
|
93
|
+
return page(atHead, "relations", rows(tables, "repository_lineage").filter(row => row.parent_node_id === id || row.child_node_id === id).map(row => ({ ...row, relation_digest: digest(row) })), arguments_);
|
|
94
|
+
case "node-artifact:list":
|
|
95
|
+
case "edge-artifact:list": {
|
|
96
|
+
const kind = operation === "node-artifact:list" ? "node" : "edge";
|
|
97
|
+
const references = rows(tables, "repository_artifact_references").filter(row => row.owner_kind === kind && row.owner_id === id);
|
|
98
|
+
const artifacts = new Map(rows(tables, "repository_artifacts").map(row => [row.artifact_id, row]));
|
|
99
|
+
return page(atHead, "artifacts", references.filter(row => artifacts.has(row.artifact_id)).map(row => ({ ...artifacts.get(row.artifact_id), ...row })), arguments_);
|
|
100
|
+
}
|
|
101
|
+
case "artifact:get": {
|
|
102
|
+
const artifact = one(tables, "repository_artifacts", "artifact_id", id);
|
|
103
|
+
return {
|
|
104
|
+
at_head: atHead,
|
|
105
|
+
artifact,
|
|
106
|
+
availability_digest: digest(artifact.object_digest),
|
|
107
|
+
properties_digest: artifact.properties_digest,
|
|
108
|
+
references: matching(tables, "repository_artifact_references", "artifact_id", id),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
case "containment:show":
|
|
112
|
+
return { at_head: atHead, containment: one(tables, "repository_containments", "containment_id", id) };
|
|
113
|
+
case "containment:get":
|
|
114
|
+
return { at_head: atHead, containment: matching(tables, "repository_containments", "child_node_id", id)[0] ?? null };
|
|
115
|
+
case "containment:list":
|
|
116
|
+
return page(atHead, "containments", matching(tables, "repository_containments", "container_node_id", id), arguments_);
|
|
117
|
+
case "edge:list":
|
|
118
|
+
return page(atHead, "edges", matching(tables, "repository_semantic_edges", "graph_node_id", id), arguments_);
|
|
119
|
+
case "edge:get":
|
|
120
|
+
return { at_head: atHead, edge: one(tables, "repository_semantic_edges", "edge_id", id) };
|
|
121
|
+
default:
|
|
122
|
+
throw new Error("unknown local projection operation");
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=projection.js.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EAAE,gCAAgC,EAAE,aAAa,EAAE,EAAE,CAAC;aAClF,CAAC;QACJ,CAAC;QACD,KAAK,kBAAkB;YACrB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,EAAE,CAAC,EAAE,CAAC;QACxG,KAAK,iBAAiB;YACpB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAC,MAAM,EAAE,yBAAyB,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;QACvH,KAAK,kBAAkB;YACrB,OAAO,IAAI,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAC,MAAM,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;QACxH,KAAK,WAAW;YACd,OAAO,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,2BAA2B,EAAE,eAAe,EAAE,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;QAC/G,KAAK,UAAU;YACb,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,2BAA2B,EAAE,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC;QAC5F;YACE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IAC1D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { applyRemotePull } from "../../domain/sync/local-pull.js";
|
|
2
|
+
import { fetchTransfer, publishedSequence, requestObject } from "./transport.js";
|
|
3
|
+
function objectMode(args) {
|
|
4
|
+
if (Object.keys(args).length !== 1 || (args.object_mode !== "lazy" && args.object_mode !== "all")) {
|
|
5
|
+
throw new Error("invalid internal operation arguments");
|
|
6
|
+
}
|
|
7
|
+
return args.object_mode;
|
|
8
|
+
}
|
|
9
|
+
export async function cloneIntoStore(context, args, connection) {
|
|
10
|
+
if (await context.store.loadHostedAssociation(context.repositoryId) !== null) {
|
|
11
|
+
throw new Error("repository hosted association already exists");
|
|
12
|
+
}
|
|
13
|
+
const mode = objectMode(args);
|
|
14
|
+
const transfer = await fetchTransfer({
|
|
15
|
+
connection,
|
|
16
|
+
kind: "clone",
|
|
17
|
+
repositoryId: context.repositoryId,
|
|
18
|
+
clientId: context.clientId,
|
|
19
|
+
objectMode: mode,
|
|
20
|
+
});
|
|
21
|
+
if (mode === "all") {
|
|
22
|
+
for (const objectDigest of transfer.objectDigests) {
|
|
23
|
+
await context.store.installObject(context.repositoryId, objectDigest, await requestObject(connection, context.repositoryId, objectDigest));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const result = await applyRemotePull(context, transfer.sessionId, mode, transfer, publishedSequence(context.repositoryId, transfer.targetCursor));
|
|
27
|
+
await context.store.setObjectMode(context.repositoryId, mode);
|
|
28
|
+
await context.store.attachHostedAssociation(context.repositoryId, connection.baseUrl, connection.profile);
|
|
29
|
+
return {
|
|
30
|
+
repository_id: context.repositoryId,
|
|
31
|
+
client_id: context.clientId,
|
|
32
|
+
head: result.head,
|
|
33
|
+
cursor: transfer.targetCursor,
|
|
34
|
+
object_mode: mode,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=clone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone.js","sourceRoot":"","sources":["../../../../src/local/runtime/remote/clone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEjF,SAAS,UAAU,CAAC,IAAuC;IACzD,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,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,CAAC;IAC9D,MAAM,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,OAAO,CAAC,YAAY,EAAE,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC1G,OAAO;QACL,aAAa,EAAE,OAAO,CAAC,YAAY;QACnC,SAAS,EAAE,OAAO,CAAC,QAAQ;QAC3B,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,MAAM,EAAE,QAAQ,CAAC,YAAY;QAC7B,WAAW,EAAE,IAAI;KAClB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { applyRemotePull } from "../../domain/sync/local-pull.js";
|
|
2
|
+
import { fetchTransfer, publishedCursor, publishedSequence, requireMatchingAssociation, requestObject } from "./transport.js";
|
|
3
|
+
function pullArguments(args) {
|
|
4
|
+
if (Object.keys(args).length !== 2 || typeof args.pull_id !== "string" ||
|
|
5
|
+
(args.object_mode !== "lazy" && args.object_mode !== "all")) {
|
|
6
|
+
throw new Error("invalid internal operation arguments");
|
|
7
|
+
}
|
|
8
|
+
return { pullId: args.pull_id, objectMode: args.object_mode };
|
|
9
|
+
}
|
|
10
|
+
export async function pullIntoStore(context, args, connection, requiredCommitId = null) {
|
|
11
|
+
const { pullId, objectMode } = pullArguments(args);
|
|
12
|
+
const associationExists = requireMatchingAssociation(await context.store.loadHostedAssociation(context.repositoryId), connection);
|
|
13
|
+
const workspace = await context.store.loadWorkspace(context.repositoryId);
|
|
14
|
+
const afterCursor = workspace.remoteTrackingHeadCommitId === null
|
|
15
|
+
? null
|
|
16
|
+
: publishedCursor(context.repositoryId, workspace.lastPublishedSequence);
|
|
17
|
+
const transfer = await fetchTransfer({
|
|
18
|
+
connection,
|
|
19
|
+
kind: "pull",
|
|
20
|
+
repositoryId: context.repositoryId,
|
|
21
|
+
clientId: context.clientId,
|
|
22
|
+
afterCursor,
|
|
23
|
+
localHead: workspace.remoteTrackingHeadCommitId,
|
|
24
|
+
objectMode,
|
|
25
|
+
});
|
|
26
|
+
if (!associationExists) {
|
|
27
|
+
await context.store.attachHostedAssociation(context.repositoryId, connection.baseUrl, connection.profile);
|
|
28
|
+
}
|
|
29
|
+
if (objectMode === "all") {
|
|
30
|
+
for (const objectDigest of transfer.objectDigests) {
|
|
31
|
+
await context.store.installObject(context.repositoryId, objectDigest, await requestObject(connection, context.repositoryId, objectDigest));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const result = await applyRemotePull(context, pullId, objectMode, transfer, publishedSequence(context.repositoryId, transfer.targetCursor), requiredCommitId);
|
|
35
|
+
await context.store.setObjectMode(context.repositoryId, objectMode);
|
|
36
|
+
return {
|
|
37
|
+
repository_id: context.repositoryId,
|
|
38
|
+
local_head: result.head,
|
|
39
|
+
remote_tracking_head: result.remoteTrackingHead,
|
|
40
|
+
rebase_id: result.rebaseId,
|
|
41
|
+
request_id: pullId,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=pull.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pull.js","sourceRoot":"","sources":["../../../../src/local/runtime/remote/pull.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO9H,SAAS,aAAa,CAAC,IAAuC;IAC5D,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ;QACpE,CAAC,IAAI,CAAC,WAAW,KAAK,MAAM,IAAI,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,IAAI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B,YAAY,EACZ,MAAM,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,YAAY,EAAE,YAAY,CAAC,CACpE,CAAC;QACJ,CAAC;IACH,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,eAAe,CAClC,OAAO,EACP,MAAM,EACN,UAAU,EACV,QAAQ,EACR,iBAAiB,CAAC,OAAO,CAAC,YAAY,EAAE,QAAQ,CAAC,YAAY,CAAC,EAC9D,gBAAgB,CACjB,CAAC;IACF,MAAM,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IACpE,OAAO;QACL,aAAa,EAAE,OAAO,CAAC,YAAY;QACnC,UAAU,EAAE,MAAM,CAAC,IAAI;QACvB,oBAAoB,EAAE,MAAM,CAAC,kBAAkB;QAC/C,SAAS,EAAE,MAAM,CAAC,QAAQ;QAC1B,UAAU,EAAE,MAAM;KACnB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { isDigest, isUuid } from "../../domain/models/constants.js";
|
|
2
|
+
import { pullIntoStore } from "./pull.js";
|
|
3
|
+
import { counter, repositoryOptions, requireMatchingAssociation, responseRecord } from "./transport.js";
|
|
4
|
+
function purgeArguments(args) {
|
|
5
|
+
if (Object.keys(args).length !== 3 || typeof args.purge_id !== "string" ||
|
|
6
|
+
typeof args.node_id !== "string" || typeof args.confirm_node_id !== "string") {
|
|
7
|
+
throw new Error("invalid internal operation arguments");
|
|
8
|
+
}
|
|
9
|
+
if (args.node_id !== args.confirm_node_id)
|
|
10
|
+
throw new Error("repository purge confirmation does not match");
|
|
11
|
+
return { purgeId: args.purge_id, nodeId: args.node_id, confirmationNodeId: args.confirm_node_id };
|
|
12
|
+
}
|
|
13
|
+
function matchingPurgeCommit(commit, repositoryId, purgeId, nodeId, confirmationNodeId) {
|
|
14
|
+
if (commit === null || commit.operations.length !== 1)
|
|
15
|
+
return null;
|
|
16
|
+
const operation = commit.operations[0];
|
|
17
|
+
if (operation.type !== "node.purge.v1" || operation.operationId !== purgeId || operation.repositoryId !== repositoryId ||
|
|
18
|
+
operation.payload.node_id !== nodeId || operation.payload.confirmation_node_id !== confirmationNodeId) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
return commit;
|
|
22
|
+
}
|
|
23
|
+
export async function purgeFromStore(context, args, connection) {
|
|
24
|
+
const { purgeId, nodeId, confirmationNodeId } = purgeArguments(args);
|
|
25
|
+
if (!isUuid(purgeId) || !isUuid(nodeId))
|
|
26
|
+
throw new Error("repository purge request is invalid");
|
|
27
|
+
const workspace = await context.store.loadWorkspace(context.repositoryId);
|
|
28
|
+
const currentHead = workspace.remoteTrackingHeadCommitId;
|
|
29
|
+
if (workspace.staging.operations.length > 0 || workspace.localHeadCommitId === null || currentHead === null ||
|
|
30
|
+
workspace.localHeadCommitId !== currentHead) {
|
|
31
|
+
throw new Error("repository workspace is not purgeable");
|
|
32
|
+
}
|
|
33
|
+
if (!requireMatchingAssociation(await context.store.loadHostedAssociation(context.repositoryId), connection)) {
|
|
34
|
+
throw new Error("repository hosted association does not match credentials");
|
|
35
|
+
}
|
|
36
|
+
const existing = matchingPurgeCommit(await context.store.loadCommitByOperationId(context.repositoryId, purgeId), context.repositoryId, purgeId, nodeId, confirmationNodeId);
|
|
37
|
+
const expectedHead = existing !== null && isDigest(existing.operations[0].payload.expected_head)
|
|
38
|
+
? existing.operations[0].payload.expected_head
|
|
39
|
+
: currentHead;
|
|
40
|
+
const response = responseRecord(await connection.client.requestRepositoryJson("POST", `/repositories/${encodeURIComponent(context.repositoryId)}/purges`, repositoryOptions({
|
|
41
|
+
wire_version: 1,
|
|
42
|
+
purge_id: purgeId,
|
|
43
|
+
node_id: nodeId,
|
|
44
|
+
confirm_node_id: confirmationNodeId,
|
|
45
|
+
expected_head: expectedHead,
|
|
46
|
+
}, purgeId)), "repository purge response is invalid");
|
|
47
|
+
if (response.purge_id !== purgeId || response.node_id !== nodeId || !isDigest(response.head) || typeof response.cursor !== "string") {
|
|
48
|
+
throw new Error("repository purge response is invalid");
|
|
49
|
+
}
|
|
50
|
+
counter(response.receipt_sequence, "repository purge response is invalid");
|
|
51
|
+
const pulled = await pullIntoStore(context, { pull_id: purgeId, object_mode: await context.store.loadObjectMode(context.repositoryId) }, connection, existing === null ? response.head : null);
|
|
52
|
+
const applied = matchingPurgeCommit(await context.store.loadCommitByOperationId(context.repositoryId, purgeId), context.repositoryId, purgeId, nodeId, confirmationNodeId);
|
|
53
|
+
if (pulled.local_head !== pulled.remote_tracking_head || applied === null || applied.commitId !== response.head) {
|
|
54
|
+
throw new Error("repository purge pull result is invalid");
|
|
55
|
+
}
|
|
56
|
+
return { ...pulled, purge_id: purgeId, node_id: nodeId, head: response.head };
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=purge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purge.js","sourceRoot":"","sources":["../../../../src/local/runtime/remote/purge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAQxG,SAAS,cAAc,CAAC,IAAuC;IAC7D,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ;QACrE,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,eAAe,KAAK,QAAQ,EAAE,CAAC;QAC/E,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IACD,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,eAAe;QAAE,MAAM,IAAI,KAAK,CAA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MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,QAAQ,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QACpI,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,EAAE,sCAAsC,CAAC,CAAC;IAC3E,MAAM,MAAM,GAAG,MAAM,aAAa,CAChC,OAAO,EACP,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAC3F,UAAU,EACV,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CACzC,CAAC;IACF,MAAM,OAAO,GAAG,mBAAmB,CACjC,MAAM,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,EAC1E,OAAO,CAAC,YAAY,EACpB,OAAO,EACP,MAAM,EACN,kBAAkB,CACnB,CAAC;IACF,IAAI,MAAM,CAAC,UAAU,KAAK,MAAM,CAAC,oBAAoB,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,IAAI,EAAE,CAAC;QAChH,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;AAChF,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { parseRepositoryJson } from "../../domain/models/encoding.js";
|
|
3
|
+
import { isDigest, isUuid } from "../../domain/models/constants.js";
|
|
4
|
+
import { counter, repositoryOptions, requireMatchingAssociation, responseRecord, uploadObject } from "./transport.js";
|
|
5
|
+
function pushArguments(args) {
|
|
6
|
+
if (Object.keys(args).length !== 2 || typeof args.push_id !== "string" || typeof args.create_remote !== "boolean") {
|
|
7
|
+
throw new Error("invalid internal operation arguments");
|
|
8
|
+
}
|
|
9
|
+
return { pushId: args.push_id, createRemote: args.create_remote };
|
|
10
|
+
}
|
|
11
|
+
export async function pushFromStore(context, args, connection) {
|
|
12
|
+
const { pushId, createRemote } = pushArguments(args);
|
|
13
|
+
if (!isUuid(pushId))
|
|
14
|
+
throw new Error("repository push id is invalid");
|
|
15
|
+
const associationExists = requireMatchingAssociation(await context.store.loadHostedAssociation(context.repositoryId), connection);
|
|
16
|
+
const workspace = await context.store.loadWorkspace(context.repositoryId);
|
|
17
|
+
if (workspace.staging.operations.length > 0)
|
|
18
|
+
throw new Error("repository workspace is not pushable");
|
|
19
|
+
if (createRemote) {
|
|
20
|
+
const created = responseRecord(await connection.client.requestRepositoryJson("POST", "/repositories", repositoryOptions({
|
|
21
|
+
wire_version: 1,
|
|
22
|
+
repository_id: context.repositoryId,
|
|
23
|
+
client_id: context.clientId,
|
|
24
|
+
creation_id: pushId,
|
|
25
|
+
}, pushId)), "repository creation response is invalid");
|
|
26
|
+
if (created.repository_id !== context.repositoryId || created.role !== "owner" || created.head !== null ||
|
|
27
|
+
created.cursor !== null || created.creation_id !== pushId) {
|
|
28
|
+
throw new Error("repository creation response is invalid");
|
|
29
|
+
}
|
|
30
|
+
if (!associationExists)
|
|
31
|
+
await context.store.attachHostedAssociation(context.repositoryId, connection.baseUrl, connection.profile);
|
|
32
|
+
}
|
|
33
|
+
else if (!associationExists) {
|
|
34
|
+
const remoteHead = responseRecord(await connection.client.requestRepositoryJson("GET", `/repositories/${encodeURIComponent(context.repositoryId)}/head`), "repository hosted reattachment verification failed");
|
|
35
|
+
if (remoteHead.repository_id !== context.repositoryId ||
|
|
36
|
+
(remoteHead.head !== null && !isDigest(remoteHead.head)) || remoteHead.head !== workspace.remoteTrackingHeadCommitId) {
|
|
37
|
+
throw new Error("repository hosted reattachment verification failed");
|
|
38
|
+
}
|
|
39
|
+
await context.store.attachHostedAssociation(context.repositoryId, connection.baseUrl, connection.profile);
|
|
40
|
+
}
|
|
41
|
+
const localHead = workspace.localHeadCommitId;
|
|
42
|
+
const remoteHead = workspace.remoteTrackingHeadCommitId;
|
|
43
|
+
if (localHead === remoteHead) {
|
|
44
|
+
return {
|
|
45
|
+
repository_id: context.repositoryId,
|
|
46
|
+
local_head: localHead,
|
|
47
|
+
remote_tracking_head: remoteHead,
|
|
48
|
+
rebase_id: null,
|
|
49
|
+
request_id: pushId,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
const newestFirst = [];
|
|
53
|
+
let after = null;
|
|
54
|
+
let foundRemote = false;
|
|
55
|
+
while (localHead !== null) {
|
|
56
|
+
const page = await context.store.listCommits(context.repositoryId, localHead, after, 256);
|
|
57
|
+
for (const commit of page.commits) {
|
|
58
|
+
if (commit.commitId === remoteHead) {
|
|
59
|
+
foundRemote = true;
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
newestFirst.push(commit);
|
|
63
|
+
}
|
|
64
|
+
if (foundRemote || page.nextCommitId === null)
|
|
65
|
+
break;
|
|
66
|
+
if (page.nextCommitId === after)
|
|
67
|
+
throw new Error("repository history cursor did not advance");
|
|
68
|
+
after = page.nextCommitId;
|
|
69
|
+
}
|
|
70
|
+
if (remoteHead === null) {
|
|
71
|
+
foundRemote = newestFirst.length > 0 && newestFirst.at(-1)?.parentCommitId === null;
|
|
72
|
+
}
|
|
73
|
+
if (!foundRemote)
|
|
74
|
+
throw new Error("repository remote-tracking head is outside local history");
|
|
75
|
+
const commits = newestFirst.reverse();
|
|
76
|
+
const latestValueGroups = await Promise.all(commits.map((commit) => context.store.loadCommitLatestValues(context.repositoryId, commit.commitId)));
|
|
77
|
+
const latestValues = latestValueGroups.flatMap((group) => group.map((raw) => parseRepositoryJson(Buffer.from(raw).toString("utf8"))));
|
|
78
|
+
const references = [...new Set(commits.flatMap((commit) => commit.artifactDigests))].sort();
|
|
79
|
+
if (references.length > 0) {
|
|
80
|
+
const negotiationId = randomUUID();
|
|
81
|
+
const negotiation = responseRecord(await connection.client.requestRepositoryJson("POST", `/repositories/${encodeURIComponent(context.repositoryId)}/objects/prepare`, repositoryOptions({ wire_version: 1, negotiation_id: negotiationId, digests: references }, negotiationId)), "repository object negotiation is invalid");
|
|
82
|
+
if (negotiation.negotiation_id !== negotiationId || !Array.isArray(negotiation.missing_uploads) ||
|
|
83
|
+
!negotiation.missing_uploads.every(isDigest) || negotiation.missing_uploads.join("\0") !== [...new Set(negotiation.missing_uploads)].sort().join("\0") ||
|
|
84
|
+
negotiation.missing_uploads.some((objectDigest) => !references.includes(objectDigest))) {
|
|
85
|
+
throw new Error("repository object negotiation is invalid");
|
|
86
|
+
}
|
|
87
|
+
for (const objectDigest of negotiation.missing_uploads) {
|
|
88
|
+
await uploadObject(connection, context.repositoryId, randomUUID(), objectDigest, await context.store.loadObjectBytes(context.repositoryId, objectDigest));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const response = responseRecord(await connection.client.requestRepositoryJson("POST", `/repositories/${encodeURIComponent(context.repositoryId)}/pushes`, repositoryOptions({
|
|
92
|
+
wire_version: 2,
|
|
93
|
+
push_id: pushId,
|
|
94
|
+
client_id: context.clientId,
|
|
95
|
+
expected_head: remoteHead,
|
|
96
|
+
commits: commits.map((commit, index) => ({
|
|
97
|
+
commit_id: commit.commitId,
|
|
98
|
+
canonical_b64: commit.canonicalBytes.toString("base64"),
|
|
99
|
+
latest_value_count: latestValueGroups[index].length,
|
|
100
|
+
})),
|
|
101
|
+
latest_values: latestValues,
|
|
102
|
+
object_references: references,
|
|
103
|
+
}, pushId)), "repository push response is invalid");
|
|
104
|
+
if (response.push_id !== pushId || response.old_head !== remoteHead || response.head !== localHead ||
|
|
105
|
+
!isDigest(response.head) || typeof response.cursor !== "string") {
|
|
106
|
+
throw new Error("repository push response is invalid");
|
|
107
|
+
}
|
|
108
|
+
const sequence = counter(response.receipt_sequence, "repository push response is invalid");
|
|
109
|
+
await context.store.recordPushResult(context.repositoryId, remoteHead, response.head, sequence);
|
|
110
|
+
return {
|
|
111
|
+
repository_id: context.repositoryId,
|
|
112
|
+
local_head: localHead,
|
|
113
|
+
remote_tracking_head: response.head,
|
|
114
|
+
rebase_id: null,
|
|
115
|
+
request_id: pushId,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=push.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/local/runtime/remote/push.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAOtH,SAAS,aAAa,CAAC,IAAuC;IAC5D,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QAClH,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC;AACpE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAuB,EACvB,IAAuC,EACvC,UAAsC;IAEtC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,aAAa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