@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,424 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { lstatSync, readFileSync } from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { RepositoryCommit } from "../../domain/models/commits.js";
|
|
5
|
+
import { artifactPropertiesJson, legacyArtifactProperties, parseArtifactProperties } from "../../domain/models/artifact-properties.js";
|
|
6
|
+
import { isDigest, isRecord, isUuid } from "../../domain/models/constants.js";
|
|
7
|
+
import { canonicalBytes, parseRepositoryJson, valueDigest } from "../../domain/models/encoding.js";
|
|
8
|
+
import { validateCanonicalHistoryIn } from "../history-validation.js";
|
|
9
|
+
import { loadMigration } from "../migrations.js";
|
|
10
|
+
import { stagingState, workspaceStateIn } from "../workspace-state.js";
|
|
11
|
+
import { RepositoryStoreError } from "../sqlite/errors.js";
|
|
12
|
+
import { allRows, runSql } from "../sqlite/rows.js";
|
|
13
|
+
import { APPLICATION_ID, validateRepositoryDatabase, validateRepositoryIdentity, } from "../sqlite/verify.js";
|
|
14
|
+
import { CURRENT_REPOSITORY_USER_VERSION, isPredecessorRepositoryUserVersion, migrationNameForVersion, } from "./versions.js";
|
|
15
|
+
import { configureWriteConnection } from "../sqlite/connection.js";
|
|
16
|
+
import { importedBaselineArtifactProperties } from "./provenance.js";
|
|
17
|
+
import { DatabaseSync } from "node:sqlite";
|
|
18
|
+
const SIDEBAND_OPERATION_TYPES = {
|
|
19
|
+
"node.field.set.v1": true,
|
|
20
|
+
"edge.add.v1": true,
|
|
21
|
+
"edge.field.set.v1": true,
|
|
22
|
+
"artifact.attach.v1": true,
|
|
23
|
+
"artifact.metadata.set.v1": true,
|
|
24
|
+
};
|
|
25
|
+
const strictUtf8 = new TextDecoder("utf-8", { fatal: true });
|
|
26
|
+
function identityInvalid(cause) {
|
|
27
|
+
return new RepositoryStoreError("repository database identity is invalid", cause === undefined ? undefined : { cause });
|
|
28
|
+
}
|
|
29
|
+
function migrationStatements(version, expectedCount) {
|
|
30
|
+
const statements = loadMigration(migrationNameForVersion(version)).split(";")
|
|
31
|
+
.map((statement) => statement.trim()).filter(Boolean);
|
|
32
|
+
if (statements.length !== expectedCount)
|
|
33
|
+
throw new RepositoryStoreError("repository migration script is invalid");
|
|
34
|
+
return statements;
|
|
35
|
+
}
|
|
36
|
+
function transaction(database, work) {
|
|
37
|
+
configureWriteConnection(database);
|
|
38
|
+
database.exec("BEGIN IMMEDIATE");
|
|
39
|
+
try {
|
|
40
|
+
work();
|
|
41
|
+
database.exec("COMMIT");
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
database.exec("ROLLBACK");
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function validatePredecessorCanonicalHistoryIn(database, repositoryId) {
|
|
49
|
+
try {
|
|
50
|
+
const commits = new Map();
|
|
51
|
+
for (const row of allRows(database.prepare("SELECT commit_id, canonical_bytes FROM repository_commits WHERE repository_id = ? ORDER BY commit_id"), repositoryId)) {
|
|
52
|
+
if (typeof row.commit_id !== "string" || !(row.canonical_bytes instanceof Uint8Array)) {
|
|
53
|
+
throw new TypeError("stored history row is invalid");
|
|
54
|
+
}
|
|
55
|
+
commits.set(row.commit_id, RepositoryCommit.fromCanonicalBytes(row.commit_id, row.canonical_bytes));
|
|
56
|
+
}
|
|
57
|
+
const expected = new Map();
|
|
58
|
+
for (const [commitId, commit] of commits) {
|
|
59
|
+
for (const operation of commit.operations) {
|
|
60
|
+
expected.set(`${commitId}\u0000${operation.operationId}`, operation.canonicalBytes);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const actual = new Map();
|
|
64
|
+
for (const row of allRows(database.prepare("SELECT commit_id, operation_id, canonical_bytes FROM repository_operations WHERE repository_id = ? ORDER BY commit_id, operation_position"), repositoryId)) {
|
|
65
|
+
if (typeof row.commit_id !== "string" || typeof row.operation_id !== "string" ||
|
|
66
|
+
!(row.canonical_bytes instanceof Uint8Array)) {
|
|
67
|
+
throw new TypeError("stored operation row is invalid");
|
|
68
|
+
}
|
|
69
|
+
actual.set(`${row.commit_id}\u0000${row.operation_id}`, row.canonical_bytes);
|
|
70
|
+
}
|
|
71
|
+
if (actual.size !== expected.size || [...expected].some(([key, value]) => {
|
|
72
|
+
const stored = actual.get(key);
|
|
73
|
+
return stored === undefined || !Buffer.from(stored).equals(value);
|
|
74
|
+
})) {
|
|
75
|
+
throw new RepositoryStoreError("repository canonical history is invalid");
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
if (error instanceof RepositoryStoreError && error.message === "repository canonical history is invalid")
|
|
80
|
+
throw error;
|
|
81
|
+
throw new RepositoryStoreError("repository canonical history is invalid", { cause: error });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function validateWorkspaceAtVersion(databasePath, repositoryId) {
|
|
85
|
+
let database;
|
|
86
|
+
try {
|
|
87
|
+
database = new DatabaseSync(databasePath, { allowExtension: false, defensive: true, readOnly: true });
|
|
88
|
+
validateCanonicalHistoryIn(database, repositoryId, aggregateDigest => readFileSync(join(dirname(databasePath), "objects", "sha256", aggregateDigest.slice("sha256:".length))));
|
|
89
|
+
workspaceStateIn(database, repositoryId);
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
if (error instanceof RepositoryStoreError)
|
|
93
|
+
throw error;
|
|
94
|
+
throw identityInvalid(error);
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
database?.close();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function validateMigratedStaging(databasePath, repositoryId) {
|
|
101
|
+
let database;
|
|
102
|
+
try {
|
|
103
|
+
database = new DatabaseSync(databasePath, { allowExtension: false, defensive: true, readOnly: true });
|
|
104
|
+
for (const row of allRows(database.prepare("SELECT state, staging_digest, operations_bytes, latest_values_bytes FROM repository_staging WHERE repository_id = ?"), repositoryId)) {
|
|
105
|
+
if (typeof row.state !== "string" || typeof row.staging_digest !== "string" ||
|
|
106
|
+
!(row.operations_bytes instanceof Uint8Array) || !(row.latest_values_bytes instanceof Uint8Array)) {
|
|
107
|
+
throw new RepositoryStoreError("repository staging is corrupt");
|
|
108
|
+
}
|
|
109
|
+
stagingState(repositoryId, row.state, row.staging_digest, row.operations_bytes, row.latest_values_bytes);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
if (error instanceof RepositoryStoreError)
|
|
114
|
+
throw error;
|
|
115
|
+
throw new RepositoryStoreError("repository staging is corrupt", { cause: error });
|
|
116
|
+
}
|
|
117
|
+
finally {
|
|
118
|
+
database?.close();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function applyV2(databasePath) {
|
|
122
|
+
const statements = migrationStatements(1, 4);
|
|
123
|
+
const database = new DatabaseSync(databasePath, { allowExtension: false, defensive: true });
|
|
124
|
+
try {
|
|
125
|
+
transaction(database, () => {
|
|
126
|
+
const staged = allRows(database.prepare("SELECT repository_id, operations_bytes FROM repository_staging")).map((row) => {
|
|
127
|
+
if (typeof row.repository_id !== "string" || !(row.operations_bytes instanceof Uint8Array)) {
|
|
128
|
+
throw new RepositoryStoreError("repository migration staging is invalid");
|
|
129
|
+
}
|
|
130
|
+
let operations;
|
|
131
|
+
try {
|
|
132
|
+
operations = parseRepositoryJson(strictUtf8.decode(row.operations_bytes));
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
throw new RepositoryStoreError("repository migration staging is invalid", { cause: error });
|
|
136
|
+
}
|
|
137
|
+
if (!Array.isArray(operations))
|
|
138
|
+
throw new RepositoryStoreError("repository migration staging is invalid");
|
|
139
|
+
if (operations.some((operation) => isRecord(operation) && typeof operation.type === "string" &&
|
|
140
|
+
Object.hasOwn(SIDEBAND_OPERATION_TYPES, operation.type))) {
|
|
141
|
+
throw new RepositoryStoreError("repository_migration_staged_values_unavailable");
|
|
142
|
+
}
|
|
143
|
+
return { repositoryId: row.repository_id, operations };
|
|
144
|
+
});
|
|
145
|
+
database.exec(statements[0]);
|
|
146
|
+
database.exec(statements[1]);
|
|
147
|
+
database.exec(statements[2]);
|
|
148
|
+
for (const { repositoryId, operations } of staged) {
|
|
149
|
+
const payload = canonicalBytes({ operations, latest_values: [] });
|
|
150
|
+
const digest = `sha256:${createHash("sha256").update("flywheel.staging.v2\0").update(payload).digest("hex")}`;
|
|
151
|
+
runSql(database.prepare("UPDATE repository_staging SET staging_digest = ?, latest_values_bytes = X'5b5d' WHERE repository_id = ?"), digest, repositoryId);
|
|
152
|
+
}
|
|
153
|
+
database.exec(statements[3]);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
finally {
|
|
157
|
+
database.close();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function checkpoint(database) {
|
|
161
|
+
const rows = allRows(database.prepare("PRAGMA wal_checkpoint(TRUNCATE)"));
|
|
162
|
+
const row = rows[0];
|
|
163
|
+
const accepted = row !== undefined && row.busy === 0 && (row.log === 0 && row.checkpointed === 0 ||
|
|
164
|
+
row.log === -1 && row.checkpointed === -1);
|
|
165
|
+
if (!accepted)
|
|
166
|
+
throw new RepositoryStoreError("repository migration checkpoint failed");
|
|
167
|
+
}
|
|
168
|
+
function applySqlMigration(databasePath, version, expectedCount) {
|
|
169
|
+
const statements = migrationStatements(version, expectedCount);
|
|
170
|
+
const database = new DatabaseSync(databasePath, { allowExtension: false, defensive: true });
|
|
171
|
+
try {
|
|
172
|
+
transaction(database, () => {
|
|
173
|
+
for (const statement of statements)
|
|
174
|
+
database.exec(statement);
|
|
175
|
+
});
|
|
176
|
+
checkpoint(database);
|
|
177
|
+
}
|
|
178
|
+
finally {
|
|
179
|
+
database.close();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
function foldReachableLegacyEdits(database, repositoryId, artifactId, createdByCommitId, properties, currentMetadata) {
|
|
183
|
+
const head = database.prepare("SELECT workspace_head_commit_id FROM repository_heads WHERE repository_id = ?").get(repositoryId);
|
|
184
|
+
let cursor = typeof head?.workspace_head_commit_id === "string" ? head.workspace_head_commit_id : null;
|
|
185
|
+
const chain = [];
|
|
186
|
+
while (cursor !== null) {
|
|
187
|
+
chain.push(cursor);
|
|
188
|
+
const parent = database.prepare("SELECT parent_commit_id FROM repository_commit_parents WHERE repository_id = ? AND commit_id = ? AND parent_position = 0")
|
|
189
|
+
.get(repositoryId, cursor);
|
|
190
|
+
cursor = typeof parent?.parent_commit_id === "string" ? parent.parent_commit_id : null;
|
|
191
|
+
}
|
|
192
|
+
const ordered = chain.reverse();
|
|
193
|
+
const start = ordered.indexOf(createdByCommitId);
|
|
194
|
+
if (start < 0)
|
|
195
|
+
throw new RepositoryStoreError("repository artifact provenance commit is unreachable");
|
|
196
|
+
const initial = parseArtifactProperties(properties);
|
|
197
|
+
const legacyValue = (value) => {
|
|
198
|
+
if (value === undefined || value === null || typeof value === "string")
|
|
199
|
+
return value ?? null;
|
|
200
|
+
throw new RepositoryStoreError("repository artifact provenance history is invalid");
|
|
201
|
+
};
|
|
202
|
+
const finalValue = (field) => {
|
|
203
|
+
switch (field) {
|
|
204
|
+
case "name": return legacyValue(currentMetadata.name);
|
|
205
|
+
case "media_type": return legacyValue(currentMetadata.media_type);
|
|
206
|
+
case "notes": return legacyValue(currentMetadata.notes);
|
|
207
|
+
case "tags": return legacyValue(currentMetadata.tags);
|
|
208
|
+
default: throw new RepositoryStoreError("repository artifact provenance history is invalid");
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
const terminalDigests = {};
|
|
212
|
+
for (const commitId of ordered.slice(start + 1)) {
|
|
213
|
+
const row = database.prepare("SELECT canonical_bytes, latest_values_bytes FROM repository_commits WHERE repository_id = ? AND commit_id = ?")
|
|
214
|
+
.get(repositoryId, commitId);
|
|
215
|
+
if (!(row?.canonical_bytes instanceof Uint8Array) || !(row.latest_values_bytes instanceof Uint8Array)) {
|
|
216
|
+
throw new RepositoryStoreError("repository artifact provenance history is invalid");
|
|
217
|
+
}
|
|
218
|
+
const commit = RepositoryCommit.fromCanonicalBytes(commitId, row.canonical_bytes);
|
|
219
|
+
const values = parseRepositoryJson(strictUtf8.decode(row.latest_values_bytes));
|
|
220
|
+
if (!Array.isArray(values) || !canonicalBytes(values).equals(row.latest_values_bytes))
|
|
221
|
+
throw new RepositoryStoreError("repository artifact provenance history is invalid");
|
|
222
|
+
for (const operation of commit.operations) {
|
|
223
|
+
if (operation.type !== "artifact.metadata.set.v1" || operation.payload.artifact_id !== artifactId)
|
|
224
|
+
continue;
|
|
225
|
+
const field = operation.payload.field;
|
|
226
|
+
if (field !== "name" && field !== "media_type" && field !== "notes" && field !== "tags")
|
|
227
|
+
continue;
|
|
228
|
+
const write = values.find(value => isRecord(value) && value.owner_type === "artifact" && value.owner_id === artifactId && value.field === field);
|
|
229
|
+
if (write !== undefined) {
|
|
230
|
+
const writeValue = write.value;
|
|
231
|
+
if ((writeValue !== null && typeof writeValue !== "string") ||
|
|
232
|
+
write.value_digest !== valueDigest(writeValue) ||
|
|
233
|
+
write.value_digest !== operation.payload.new_digest) {
|
|
234
|
+
throw new RepositoryStoreError("repository artifact provenance history is invalid");
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
const priorDigest = terminalDigests[field];
|
|
238
|
+
const expectedDigest = operation.payload.expected_digest;
|
|
239
|
+
const newDigest = operation.payload.new_digest;
|
|
240
|
+
if (typeof expectedDigest !== "string" || typeof newDigest !== "string" ||
|
|
241
|
+
(priorDigest !== undefined && expectedDigest !== priorDigest)) {
|
|
242
|
+
throw new RepositoryStoreError("repository artifact provenance history is invalid");
|
|
243
|
+
}
|
|
244
|
+
terminalDigests[field] = newDigest;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
const finalFields = Object.entries(terminalDigests);
|
|
248
|
+
if (finalFields.length === 0)
|
|
249
|
+
return properties;
|
|
250
|
+
const metadata = { ...initial.metadata };
|
|
251
|
+
const replacement = { ...initial, metadata };
|
|
252
|
+
for (const [field, finalDigest] of finalFields) {
|
|
253
|
+
if (typeof finalDigest !== "string")
|
|
254
|
+
throw new RepositoryStoreError("repository artifact provenance history is invalid");
|
|
255
|
+
const value = finalValue(field);
|
|
256
|
+
if (valueDigest(value) !== finalDigest)
|
|
257
|
+
throw new RepositoryStoreError("repository artifact provenance history is invalid");
|
|
258
|
+
if (field === "name")
|
|
259
|
+
replacement.name = value;
|
|
260
|
+
else if (field === "media_type") {
|
|
261
|
+
replacement.media_type = value;
|
|
262
|
+
metadata.media_type = value;
|
|
263
|
+
}
|
|
264
|
+
else
|
|
265
|
+
metadata[field] = value;
|
|
266
|
+
}
|
|
267
|
+
return artifactPropertiesJson(replacement);
|
|
268
|
+
}
|
|
269
|
+
function applyV5(databasePath) {
|
|
270
|
+
const statements = migrationStatements(4, 22);
|
|
271
|
+
const database = new DatabaseSync(databasePath, { allowExtension: false, defensive: true });
|
|
272
|
+
try {
|
|
273
|
+
transaction(database, () => {
|
|
274
|
+
for (const statement of statements.slice(0, 7))
|
|
275
|
+
database.exec(statement);
|
|
276
|
+
for (const row of allRows(database.prepare(`
|
|
277
|
+
SELECT repository_id, artifact_id, object_digest, name, media_type, notes, tags,
|
|
278
|
+
metadata_digest, name_digest, media_type_digest, notes_digest, tags_digest, created_by_commit_id
|
|
279
|
+
FROM repository_artifacts
|
|
280
|
+
`))) {
|
|
281
|
+
const metadata = { name: row.name, media_type: row.media_type, notes: row.notes, tags: row.tags };
|
|
282
|
+
if (typeof row.repository_id !== "string" || typeof row.artifact_id !== "string" ||
|
|
283
|
+
!isDigest(row.object_digest) || typeof row.created_by_commit_id !== "string" ||
|
|
284
|
+
!isDigest(row.metadata_digest) ||
|
|
285
|
+
Object.values(metadata).some(value => value !== null && typeof value !== "string") ||
|
|
286
|
+
row.name_digest !== valueDigest(metadata.name) ||
|
|
287
|
+
row.media_type_digest !== valueDigest(metadata.media_type) ||
|
|
288
|
+
row.notes_digest !== valueDigest(metadata.notes) ||
|
|
289
|
+
row.tags_digest !== valueDigest(metadata.tags) ||
|
|
290
|
+
row.metadata_digest !== `sha256:${createHash("sha256").update(canonicalBytes(metadata)).digest("hex")}`) {
|
|
291
|
+
throw new RepositoryStoreError("repository artifact migration source is invalid");
|
|
292
|
+
}
|
|
293
|
+
const properties = importedBaselineArtifactProperties(database, row.repository_id, row.artifact_id, row.object_digest, row.created_by_commit_id, aggregateDigest => readFileSync(join(dirname(databasePath), "objects", "sha256", aggregateDigest.slice("sha256:".length)))) ?? legacyArtifactProperties(metadata);
|
|
294
|
+
const foldedProperties = foldReachableLegacyEdits(database, row.repository_id, row.artifact_id, row.created_by_commit_id, properties, metadata);
|
|
295
|
+
runSql(database.prepare(`
|
|
296
|
+
INSERT INTO repository_artifacts_v5 (
|
|
297
|
+
repository_id, artifact_id, object_digest, properties, properties_digest, created_by_commit_id
|
|
298
|
+
) VALUES (?, ?, ?, ?, ?, ?)
|
|
299
|
+
`), row.repository_id, row.artifact_id, row.object_digest, foldedProperties, valueDigest(foldedProperties), row.created_by_commit_id);
|
|
300
|
+
}
|
|
301
|
+
database.exec(`
|
|
302
|
+
INSERT INTO repository_artifact_references_v5 (
|
|
303
|
+
repository_id, artifact_id, owner_kind, owner_id, node_owner_id, edge_owner_id, reference_order, attached_by_commit_id
|
|
304
|
+
)
|
|
305
|
+
SELECT repository_id, artifact_id, owner_kind, owner_id, node_owner_id, edge_owner_id, reference_order, attached_by_commit_id
|
|
306
|
+
FROM repository_artifact_references
|
|
307
|
+
`);
|
|
308
|
+
database.exec(`
|
|
309
|
+
INSERT INTO repository_gc_roots_v5 (repository_id, root_kind, root_id, digest)
|
|
310
|
+
SELECT repository_id, root_kind, root_id, digest FROM repository_gc_roots
|
|
311
|
+
`);
|
|
312
|
+
for (const row of allRows(database.prepare("SELECT repository_id, commit_id, canonical_bytes FROM repository_commits"))) {
|
|
313
|
+
if (typeof row.repository_id !== "string" || typeof row.commit_id !== "string" || !(row.canonical_bytes instanceof Uint8Array)) {
|
|
314
|
+
throw new RepositoryStoreError("repository artifact provenance commit is invalid");
|
|
315
|
+
}
|
|
316
|
+
const commit = RepositoryCommit.fromCanonicalBytes(row.commit_id, row.canonical_bytes);
|
|
317
|
+
if (commit.repositoryId !== row.repository_id || commit.parentCommitId !== null || commit.operations.length !== 1 ||
|
|
318
|
+
commit.operations[0].type !== "imported_baseline.v1")
|
|
319
|
+
continue;
|
|
320
|
+
const aggregateDigest = commit.operations[0].payload.aggregate_digest;
|
|
321
|
+
if (!isDigest(aggregateDigest))
|
|
322
|
+
throw new RepositoryStoreError("repository artifact provenance operation is invalid");
|
|
323
|
+
runSql(database.prepare(`
|
|
324
|
+
INSERT OR IGNORE INTO repository_gc_roots_v5 (repository_id, root_kind, root_id, digest)
|
|
325
|
+
VALUES (?, 'artifact_history', ?, ?)
|
|
326
|
+
`), row.repository_id, commit.commitId, aggregateDigest);
|
|
327
|
+
}
|
|
328
|
+
database.exec(`
|
|
329
|
+
INSERT INTO repository_containments_v5 (
|
|
330
|
+
repository_id, containment_id, container_node_id, child_node_id, relation_digest, ordinal, source_artifact_id, created_by_commit_id
|
|
331
|
+
)
|
|
332
|
+
SELECT repository_id, containment_id, container_node_id, child_node_id, relation_digest, ordinal, source_artifact_id, created_by_commit_id
|
|
333
|
+
FROM repository_containments
|
|
334
|
+
`);
|
|
335
|
+
for (const statement of statements.slice(7))
|
|
336
|
+
database.exec(statement);
|
|
337
|
+
});
|
|
338
|
+
checkpoint(database);
|
|
339
|
+
}
|
|
340
|
+
finally {
|
|
341
|
+
database.close();
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
export function readRepositoryIdentity(databasePath) {
|
|
345
|
+
let database;
|
|
346
|
+
try {
|
|
347
|
+
const status = lstatSync(databasePath);
|
|
348
|
+
if (!status.isFile() || status.isSymbolicLink())
|
|
349
|
+
throw identityInvalid();
|
|
350
|
+
database = new DatabaseSync(databasePath, { allowExtension: false, defensive: true, readOnly: true });
|
|
351
|
+
const application = allRows(database.prepare("PRAGMA application_id"))[0];
|
|
352
|
+
const version = allRows(database.prepare("PRAGMA user_version"))[0];
|
|
353
|
+
const rows = allRows(database.prepare("SELECT repository_id, client_id FROM repository_metadata"));
|
|
354
|
+
const applicationId = application?.application_id;
|
|
355
|
+
const userVersion = version?.user_version;
|
|
356
|
+
if (applicationId !== APPLICATION_ID ||
|
|
357
|
+
typeof userVersion !== "number" ||
|
|
358
|
+
!Number.isSafeInteger(userVersion) || rows.length !== 1 ||
|
|
359
|
+
typeof rows[0].repository_id !== "string" || typeof rows[0].client_id !== "string" ||
|
|
360
|
+
!isUuid(rows[0].repository_id) || !isUuid(rows[0].client_id)) {
|
|
361
|
+
throw identityInvalid();
|
|
362
|
+
}
|
|
363
|
+
return { repositoryId: rows[0].repository_id, clientId: rows[0].client_id, userVersion };
|
|
364
|
+
}
|
|
365
|
+
catch (error) {
|
|
366
|
+
if (error instanceof RepositoryStoreError)
|
|
367
|
+
throw error;
|
|
368
|
+
throw identityInvalid(error);
|
|
369
|
+
}
|
|
370
|
+
finally {
|
|
371
|
+
database?.close();
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
export function validateRepositoryAtVersion(databasePath, repositoryId, expectedVersion) {
|
|
375
|
+
validateRepositoryDatabase(databasePath);
|
|
376
|
+
const identity = readRepositoryIdentity(databasePath);
|
|
377
|
+
if (identity.repositoryId !== repositoryId || identity.userVersion !== expectedVersion)
|
|
378
|
+
throw identityInvalid();
|
|
379
|
+
let database;
|
|
380
|
+
try {
|
|
381
|
+
database = new DatabaseSync(databasePath, { allowExtension: false, defensive: true, readOnly: true });
|
|
382
|
+
validatePredecessorCanonicalHistoryIn(database, repositoryId);
|
|
383
|
+
}
|
|
384
|
+
finally {
|
|
385
|
+
database?.close();
|
|
386
|
+
}
|
|
387
|
+
if (expectedVersion === CURRENT_REPOSITORY_USER_VERSION)
|
|
388
|
+
validateWorkspaceAtVersion(databasePath, repositoryId);
|
|
389
|
+
}
|
|
390
|
+
export function replaceClientIdAtVersion(databasePath, repositoryId, clientId, expectedVersion) {
|
|
391
|
+
validateRepositoryAtVersion(databasePath, repositoryId, expectedVersion);
|
|
392
|
+
const database = new DatabaseSync(databasePath, { allowExtension: false, defensive: true });
|
|
393
|
+
try {
|
|
394
|
+
transaction(database, () => {
|
|
395
|
+
if (runSql(database.prepare("UPDATE repository_metadata SET client_id = ? WHERE repository_id = ?"), clientId, repositoryId).changes !== 1) {
|
|
396
|
+
throw new RepositoryStoreError("repository predecessor identity is invalid");
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
finally {
|
|
401
|
+
database.close();
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
export function applyForwardMigrations(databasePath, fromVersion) {
|
|
405
|
+
if (!isPredecessorRepositoryUserVersion(fromVersion))
|
|
406
|
+
throw new RepositoryStoreError("repository_schema_unsupported");
|
|
407
|
+
const identity = readRepositoryIdentity(databasePath);
|
|
408
|
+
if (identity.userVersion !== fromVersion)
|
|
409
|
+
throw identityInvalid();
|
|
410
|
+
validateRepositoryAtVersion(databasePath, identity.repositoryId, fromVersion);
|
|
411
|
+
if (fromVersion === 1)
|
|
412
|
+
applyV2(databasePath);
|
|
413
|
+
if (fromVersion <= 2)
|
|
414
|
+
applySqlMigration(databasePath, 2, 6);
|
|
415
|
+
if (fromVersion <= 3)
|
|
416
|
+
applySqlMigration(databasePath, 3, 2);
|
|
417
|
+
applyV5(databasePath);
|
|
418
|
+
validateRepositoryIdentity(databasePath, identity.repositoryId);
|
|
419
|
+
validateMigratedStaging(databasePath, identity.repositoryId);
|
|
420
|
+
if (readRepositoryIdentity(databasePath).userVersion !== CURRENT_REPOSITORY_USER_VERSION) {
|
|
421
|
+
throw identityInvalid();
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
//# sourceMappingURL=steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../../../src/local/store/migration/steps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACvI,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnG,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,+BAA+B,EAC/B,kCAAkC,EAClC,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10 @@
|
|
|
1
|
+
import { migrationNames } from "../migrations.js";
|
|
2
|
+
export const CURRENT_REPOSITORY_USER_VERSION = 5;
|
|
3
|
+
export const PREDECESSOR_REPOSITORY_USER_VERSIONS = [1, 2, 3, 4];
|
|
4
|
+
export function isPredecessorRepositoryUserVersion(value) {
|
|
5
|
+
return PREDECESSOR_REPOSITORY_USER_VERSIONS.includes(value);
|
|
6
|
+
}
|
|
7
|
+
export function migrationNameForVersion(version) {
|
|
8
|
+
return migrationNames[version];
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=versions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../src/local/store/migration/versions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC;AACjD,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CAAC;AAI1E,MAAM,UAAU,kCAAkC,CAAC,KAAa;IAC9D,OAAO,oCAAoC,CAAC,QAAQ,CAAC,KAAyC,CAAC,CAAC;AAClG,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAAyC;IAC/E,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC"}
|