@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,115 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { RepositoryCommit } from "../models/commits.js";
|
|
3
|
+
export class RepositoryRebaseError extends Error {
|
|
4
|
+
name = "RepositoryRebaseError";
|
|
5
|
+
}
|
|
6
|
+
function base64(bytes) {
|
|
7
|
+
return Buffer.from(bytes).toString("base64");
|
|
8
|
+
}
|
|
9
|
+
function decodeBase64(value) {
|
|
10
|
+
if (typeof value !== "string")
|
|
11
|
+
throw new RepositoryRebaseError("repository rebase context is corrupt");
|
|
12
|
+
const decoded = Buffer.from(value, "base64");
|
|
13
|
+
if (decoded.toString("base64") !== value) {
|
|
14
|
+
throw new RepositoryRebaseError("repository rebase context is corrupt");
|
|
15
|
+
}
|
|
16
|
+
return decoded;
|
|
17
|
+
}
|
|
18
|
+
function commitFromBase64(value) {
|
|
19
|
+
const bytes = decodeBase64(value);
|
|
20
|
+
const commitId = `sha256:${createHash("sha256").update("flywheel.commit.v1\0").update(bytes).digest("hex")}`;
|
|
21
|
+
return RepositoryCommit.fromCanonicalBytes(commitId, bytes);
|
|
22
|
+
}
|
|
23
|
+
function contextInteger(value, minimum) {
|
|
24
|
+
if (typeof value === "boolean" ||
|
|
25
|
+
(typeof value !== "bigint" && (typeof value !== "number" || !Number.isSafeInteger(value)))) {
|
|
26
|
+
throw new RepositoryRebaseError("repository rebase context is corrupt");
|
|
27
|
+
}
|
|
28
|
+
const result = BigInt(value);
|
|
29
|
+
if (minimum !== undefined && result < minimum) {
|
|
30
|
+
throw new RepositoryRebaseError("repository rebase context is corrupt");
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
function record(value) {
|
|
35
|
+
if (value === null || typeof value !== "object" || Array.isArray(value) || JSON.isRawJSON(value)) {
|
|
36
|
+
throw new RepositoryRebaseError("repository rebase context is corrupt");
|
|
37
|
+
}
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
export function parseRebaseContext(repositoryId, value) {
|
|
41
|
+
try {
|
|
42
|
+
const payload = record(value);
|
|
43
|
+
const remoteRaw = payload.remote_commits;
|
|
44
|
+
const localRaw = payload.local_commits;
|
|
45
|
+
const latestRaw = payload.remote_latest_values;
|
|
46
|
+
if (!Array.isArray(remoteRaw) || !Array.isArray(localRaw) || !Array.isArray(latestRaw)) {
|
|
47
|
+
throw new RepositoryRebaseError("repository rebase context is corrupt");
|
|
48
|
+
}
|
|
49
|
+
const remoteCommits = remoteRaw.map(commitFromBase64);
|
|
50
|
+
const localCommits = localRaw.map(commitFromBase64);
|
|
51
|
+
const remoteLatestValues = latestRaw.map((writes) => {
|
|
52
|
+
if (!Array.isArray(writes))
|
|
53
|
+
throw new RepositoryRebaseError("repository rebase context is corrupt");
|
|
54
|
+
return writes.map(decodeBase64);
|
|
55
|
+
});
|
|
56
|
+
const targetHead = payload.target_head;
|
|
57
|
+
const targetCursor = payload.target_cursor;
|
|
58
|
+
const manifestDigest = payload.manifest_digest;
|
|
59
|
+
const oldManifestDigest = payload.old_manifest_digest;
|
|
60
|
+
const oldRemoteHead = payload.old_remote_head;
|
|
61
|
+
const objectMode = payload.object_mode;
|
|
62
|
+
if (typeof targetHead !== "string" || typeof targetCursor !== "string" ||
|
|
63
|
+
typeof manifestDigest !== "string" ||
|
|
64
|
+
(oldManifestDigest !== null && typeof oldManifestDigest !== "string") ||
|
|
65
|
+
(oldRemoteHead !== null && typeof oldRemoteHead !== "string") ||
|
|
66
|
+
(objectMode !== "lazy" && objectMode !== "all") ||
|
|
67
|
+
remoteLatestValues.length !== remoteCommits.length) {
|
|
68
|
+
throw new RepositoryRebaseError("repository rebase context is corrupt");
|
|
69
|
+
}
|
|
70
|
+
const publishedSequence = contextInteger(payload.published_sequence);
|
|
71
|
+
const oldPublishedSequence = contextInteger(payload.old_published_sequence, 0n);
|
|
72
|
+
return {
|
|
73
|
+
oldRemoteHead,
|
|
74
|
+
targetHead,
|
|
75
|
+
targetCursor,
|
|
76
|
+
publishedSequence,
|
|
77
|
+
manifestDigest,
|
|
78
|
+
oldPublishedSequence,
|
|
79
|
+
oldManifestDigest,
|
|
80
|
+
objectMode,
|
|
81
|
+
remoteCommits,
|
|
82
|
+
remoteLatestValues,
|
|
83
|
+
remoteSnapshot: { repositoryId, headCommitId: targetHead, canonicalBytes: decodeBase64(payload.remote_snapshot) },
|
|
84
|
+
localCommits,
|
|
85
|
+
localSnapshot: {
|
|
86
|
+
repositoryId,
|
|
87
|
+
headCommitId: localCommits.at(-1)?.commitId ?? oldRemoteHead,
|
|
88
|
+
canonicalBytes: decodeBase64(payload.local_snapshot),
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if (error instanceof RepositoryRebaseError)
|
|
94
|
+
throw error;
|
|
95
|
+
throw new RepositoryRebaseError("repository rebase context is corrupt", { cause: error });
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
export function serializeRebaseContext(context) {
|
|
99
|
+
return {
|
|
100
|
+
local_commits: context.localCommits.map((commit) => base64(commit.canonicalBytes)),
|
|
101
|
+
old_manifest_digest: context.oldManifestDigest,
|
|
102
|
+
old_published_sequence: context.oldPublishedSequence,
|
|
103
|
+
local_snapshot: base64(context.localSnapshot.canonicalBytes),
|
|
104
|
+
manifest_digest: context.manifestDigest,
|
|
105
|
+
object_mode: context.objectMode,
|
|
106
|
+
old_remote_head: context.oldRemoteHead,
|
|
107
|
+
published_sequence: context.publishedSequence,
|
|
108
|
+
remote_commits: context.remoteCommits.map((commit) => base64(commit.canonicalBytes)),
|
|
109
|
+
remote_latest_values: context.remoteLatestValues.map((writes) => writes.map(base64)),
|
|
110
|
+
remote_snapshot: base64(context.remoteSnapshot.canonicalBytes),
|
|
111
|
+
target_cursor: context.targetCursor,
|
|
112
|
+
target_head: context.targetHead,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/local/domain/rebase/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IACrC,IAAI,GAAG,uBAAuB,CAAC;CACzC;AAkBD,SAAS,MAAM,CAAC,KAAiB;IAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,MAAM,IAAI,qBAAqB,CAAC,sCAAsC,CAAC,CAAC;IACvG,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC7C,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,KAAK,EAAE,CAAC;QACzC,MAAM,IAAI,qBAAqB,CAAC,sCAAsC,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,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mB,EAAE,OAAO,CAAC,iBAAiB;QAC9C,sBAAsB,EAAE,OAAO,CAAC,oBAAoB;QACpD,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC;QAC5D,eAAe,EAAE,OAAO,CAAC,cAAc;QACvC,WAAW,EAAE,OAAO,CAAC,UAAU;QAC/B,eAAe,EAAE,OAAO,CAAC,aAAa;QACtC,kBAAkB,EAAE,OAAO,CAAC,iBAAiB;QAC7C,cAAc,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACpF,oBAAoB,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpF,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC;QAC9D,aAAa,EAAE,OAAO,CAAC,YAAY;QACnC,WAAW,EAAE,OAAO,CAAC,UAAU;KAChC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export function operationKey(operation) {
|
|
2
|
+
const payload = operation.payload;
|
|
3
|
+
if (operation.type === "node.field.set.v1") {
|
|
4
|
+
return ["node-field", String(payload.node_id), String(payload.field)];
|
|
5
|
+
}
|
|
6
|
+
if (operation.type.startsWith("node."))
|
|
7
|
+
return ["node", String(payload.node_id ?? "")];
|
|
8
|
+
if (operation.type.startsWith("containment."))
|
|
9
|
+
return ["containment", String(payload.child_node_id ?? "")];
|
|
10
|
+
if (operation.type.startsWith("edge."))
|
|
11
|
+
return ["edge", String(payload.edge_id ?? "")];
|
|
12
|
+
if (operation.type === "artifact.metadata.set.v1") {
|
|
13
|
+
return ["artifact-field", String(payload.artifact_id), String(payload.field)];
|
|
14
|
+
}
|
|
15
|
+
if (operation.type === "artifact.properties.set.v1")
|
|
16
|
+
return ["artifact-properties", String(payload.artifact_id)];
|
|
17
|
+
if (operation.type === "artifact.content.set.v1")
|
|
18
|
+
return ["artifact-content", String(payload.artifact_id)];
|
|
19
|
+
if (operation.type.startsWith("artifact."))
|
|
20
|
+
return ["artifact", String(payload.artifact_id ?? "")];
|
|
21
|
+
if (operation.type.startsWith("node.tag.")) {
|
|
22
|
+
return ["tag-holder", String(payload.scope_node_id ?? ""), String(payload.tag_id ?? "")];
|
|
23
|
+
}
|
|
24
|
+
if (operation.type.startsWith("tag.")) {
|
|
25
|
+
return ["tag-definition", String(payload.scope_node_id ?? ""), String(payload.tag_id ?? "")];
|
|
26
|
+
}
|
|
27
|
+
return [operation.type, operation.operationId];
|
|
28
|
+
}
|
|
29
|
+
export function keysConflict(left, right) {
|
|
30
|
+
if (left.length === right.length && left.every((part, index) => part === right[index]))
|
|
31
|
+
return true;
|
|
32
|
+
if (left[0] === "node" && right[0] === "node-field")
|
|
33
|
+
return left[1] === right[1];
|
|
34
|
+
if (right[0] === "node" && left[0] === "node-field")
|
|
35
|
+
return right[1] === left[1];
|
|
36
|
+
if (left[0] === "artifact-properties" && right[0] === "artifact-field")
|
|
37
|
+
return left[1] === right[1];
|
|
38
|
+
if (right[0] === "artifact-properties" && left[0] === "artifact-field")
|
|
39
|
+
return left[1] === right[1];
|
|
40
|
+
if (left[0] === "artifact" && (right[0] === "artifact-field" || right[0] === "artifact-properties" || right[0] === "artifact-content"))
|
|
41
|
+
return left[1] === right[1];
|
|
42
|
+
return right[0] === "artifact" && (left[0] === "artifact-field" || left[0] === "artifact-properties" || left[0] === "artifact-content") && right[1] === left[1];
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../../src/local/domain/rebase/keys.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,YAAY,CAAC,SAA8B;IACzD,MAAM,OAAO,GAAG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;QAAE,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;IACpG,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,qBAAqB,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB;QAAE,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;IACpG,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,gBAAgB,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,qBAAqB,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,kBAAkB,CAAC;QAAE,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;IACpK,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,UAAU,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,qBAAqB,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,kBAAkB,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC;AAClK,CAAC"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { RepositoryServiceError } from "../errors.js";
|
|
2
|
+
import { isDigest, isUuid } from "../models/constants.js";
|
|
3
|
+
import { buildConflicts } from "./conflicts.js";
|
|
4
|
+
import { loadRebaseLatestValues, rebaseLocalCommits } from "./replay.js";
|
|
5
|
+
const EMPTY_MANUAL_VALUES = {};
|
|
6
|
+
const NO_CONFLICTS = [];
|
|
7
|
+
export async function applyPull(store, repositoryId, clientId, pullId, sessionManifest, clock = () => new Date()) {
|
|
8
|
+
if (!isUuid(pullId))
|
|
9
|
+
throw new RepositoryServiceError("pull_id must be UUIDv4");
|
|
10
|
+
const workspace = await store.loadWorkspace(repositoryId);
|
|
11
|
+
if (workspace.staging.operations.length > 0 || workspace.rebase !== null || workspace.conflicts.length > 0) {
|
|
12
|
+
throw new RepositoryServiceError("repository workspace is not pullable");
|
|
13
|
+
}
|
|
14
|
+
validatePullManifest(repositoryId, workspace.remoteTrackingHeadCommitId, sessionManifest);
|
|
15
|
+
if (sessionManifest.targetHead === workspace.remoteTrackingHeadCommitId) {
|
|
16
|
+
return { repositoryId, pullId, rebaseId: null, head: workspace.localHeadCommitId, remoteTrackingHead: workspace.remoteTrackingHeadCommitId, conflicts: [] };
|
|
17
|
+
}
|
|
18
|
+
const localCommits = await localUnpublishedCommits(store, workspace);
|
|
19
|
+
const localSnapshot = await store.loadSnapshot(repositoryId, workspace.localHeadCommitId);
|
|
20
|
+
const context = {
|
|
21
|
+
oldRemoteHead: workspace.remoteTrackingHeadCommitId,
|
|
22
|
+
targetHead: requirePullTarget(sessionManifest),
|
|
23
|
+
oldPublishedSequence: workspace.lastPublishedSequence,
|
|
24
|
+
oldManifestDigest: workspace.lastSyncManifestDigest,
|
|
25
|
+
targetCursor: sessionManifest.targetCursor ?? "",
|
|
26
|
+
objectMode: sessionManifest.objectMode,
|
|
27
|
+
publishedSequence: sessionManifest.publishedSequence,
|
|
28
|
+
manifestDigest: sessionManifest.manifestDigest,
|
|
29
|
+
remoteCommits: sessionManifest.commits,
|
|
30
|
+
remoteLatestValues: sessionManifest.latestValuesByCommit,
|
|
31
|
+
remoteSnapshot: sessionManifest.snapshot,
|
|
32
|
+
localCommits,
|
|
33
|
+
localSnapshot,
|
|
34
|
+
};
|
|
35
|
+
if (localCommits.length === 0) {
|
|
36
|
+
const result = await store.applyAtomic(pullBatch({
|
|
37
|
+
mode: "fast_forward", workspace, context,
|
|
38
|
+
commits: sessionManifest.commits, latestValues: sessionManifest.latestValuesByCommit,
|
|
39
|
+
resultingHead: sessionManifest.targetHead,
|
|
40
|
+
}));
|
|
41
|
+
return { repositoryId, pullId, rebaseId: null, head: result.head.commitId, remoteTrackingHead: sessionManifest.targetHead, conflicts: [] };
|
|
42
|
+
}
|
|
43
|
+
const conflicts = buildConflicts({
|
|
44
|
+
repositoryId, rebaseId: pullId, localCommitsNewestFirst: localCommits,
|
|
45
|
+
remoteCommits: sessionManifest.commits, context,
|
|
46
|
+
});
|
|
47
|
+
if (conflicts.length > 0) {
|
|
48
|
+
const rebase = {
|
|
49
|
+
repositoryId, rebaseId: pullId, state: "open", baseCommitId: requirePullTarget(sessionManifest), pendingResolutionDigest: null,
|
|
50
|
+
};
|
|
51
|
+
await store.applyAtomic(pullBatch({
|
|
52
|
+
mode: "conflict", workspace, context,
|
|
53
|
+
commits: sessionManifest.commits, latestValues: sessionManifest.latestValuesByCommit,
|
|
54
|
+
resultingHead: workspace.localHeadCommitId, rebase, conflicts,
|
|
55
|
+
}));
|
|
56
|
+
return { repositoryId, pullId, rebaseId: pullId, head: workspace.localHeadCommitId, remoteTrackingHead: sessionManifest.targetHead, conflicts };
|
|
57
|
+
}
|
|
58
|
+
const rebased = rebaseLocalCommits(localCommits, sessionManifest.targetHead, clientId, pullId, new Map(), clock, context.remoteSnapshot, await loadRebaseLatestValues(store, repositoryId, localCommits));
|
|
59
|
+
const result = await store.applyAtomic(pullBatch({
|
|
60
|
+
mode: "fast_forward", workspace, context,
|
|
61
|
+
commits: [...sessionManifest.commits, ...rebased.commits],
|
|
62
|
+
latestValues: [...sessionManifest.latestValuesByCommit, ...rebased.latestValuesByCommit],
|
|
63
|
+
manualValues: rebased.manualValues,
|
|
64
|
+
resultingHead: rebased.commits.at(-1)?.commitId ?? sessionManifest.targetHead,
|
|
65
|
+
}));
|
|
66
|
+
return { repositoryId, pullId, rebaseId: null, head: result.head.commitId, remoteTrackingHead: sessionManifest.targetHead, conflicts: [] };
|
|
67
|
+
}
|
|
68
|
+
export async function listConflicts(store, repositoryId) {
|
|
69
|
+
const workspace = await store.loadWorkspace(repositoryId);
|
|
70
|
+
if (workspace.rebase === null && workspace.conflicts.length > 0) {
|
|
71
|
+
throw new RepositoryServiceError("repository conflict state is corrupt");
|
|
72
|
+
}
|
|
73
|
+
return workspace.conflicts;
|
|
74
|
+
}
|
|
75
|
+
export async function loadConflict(store, repositoryId, conflictId) {
|
|
76
|
+
const conflict = (await listConflicts(store, repositoryId)).find(candidate => candidate.conflictId === conflictId);
|
|
77
|
+
if (conflict === undefined)
|
|
78
|
+
throw new RepositoryServiceError("repository conflict is not active");
|
|
79
|
+
return conflict;
|
|
80
|
+
}
|
|
81
|
+
export async function localUnpublishedCommits(store, workspace) {
|
|
82
|
+
if (workspace.localHeadCommitId === workspace.remoteTrackingHeadCommitId)
|
|
83
|
+
return [];
|
|
84
|
+
const commits = [];
|
|
85
|
+
let afterCommitId = null;
|
|
86
|
+
while (true) {
|
|
87
|
+
const page = await store.listCommits(workspace.repositoryId, workspace.localHeadCommitId, afterCommitId, 256);
|
|
88
|
+
for (const commit of page.commits) {
|
|
89
|
+
if (commit.commitId === workspace.remoteTrackingHeadCommitId)
|
|
90
|
+
return commits;
|
|
91
|
+
commits.push(commit);
|
|
92
|
+
}
|
|
93
|
+
if (page.nextCommitId === null)
|
|
94
|
+
break;
|
|
95
|
+
if (page.nextCommitId === afterCommitId)
|
|
96
|
+
throw new RepositoryServiceError("repository history cursor did not advance");
|
|
97
|
+
afterCommitId = page.nextCommitId;
|
|
98
|
+
}
|
|
99
|
+
if (workspace.remoteTrackingHeadCommitId !== null) {
|
|
100
|
+
throw new RepositoryServiceError("repository remote-tracking head is outside local history");
|
|
101
|
+
}
|
|
102
|
+
return commits;
|
|
103
|
+
}
|
|
104
|
+
export function validatePullManifest(repositoryId, expectedRemoteHead, manifest) {
|
|
105
|
+
if (manifest.repositoryId !== repositoryId || manifest.snapshot.repositoryId !== repositoryId ||
|
|
106
|
+
manifest.snapshot.headCommitId !== manifest.targetHead ||
|
|
107
|
+
manifest.commits.length !== manifest.latestValuesByCommit.length ||
|
|
108
|
+
typeof manifest.publishedSequence !== "bigint" || manifest.publishedSequence < 0n ||
|
|
109
|
+
(manifest.objectMode !== "lazy" && manifest.objectMode !== "all") || !isDigest(manifest.manifestDigest)) {
|
|
110
|
+
throw new RepositoryServiceError("repository pull manifest is invalid");
|
|
111
|
+
}
|
|
112
|
+
let parent = expectedRemoteHead;
|
|
113
|
+
for (const commit of manifest.commits) {
|
|
114
|
+
if (commit.repositoryId !== repositoryId || commit.parentCommitId !== parent ||
|
|
115
|
+
(commit.authorKind !== "client" && commit.authorKind !== "principal")) {
|
|
116
|
+
throw new RepositoryServiceError("repository pull history is invalid");
|
|
117
|
+
}
|
|
118
|
+
parent = commit.commitId;
|
|
119
|
+
}
|
|
120
|
+
if (parent !== manifest.targetHead)
|
|
121
|
+
throw new RepositoryServiceError("repository pull history is incomplete");
|
|
122
|
+
}
|
|
123
|
+
export function requirePullTarget(manifest) {
|
|
124
|
+
if (manifest.targetHead === null)
|
|
125
|
+
throw new RepositoryServiceError("repository pull target is empty");
|
|
126
|
+
return manifest.targetHead;
|
|
127
|
+
}
|
|
128
|
+
export function pullBatch(input) {
|
|
129
|
+
const { mode, workspace, context, commits, latestValues, resultingHead, manualValues = EMPTY_MANUAL_VALUES, rebase = null, conflicts = NO_CONFLICTS, clearRebase = false, } = input;
|
|
130
|
+
return {
|
|
131
|
+
repositoryId: workspace.repositoryId,
|
|
132
|
+
expectedHead: workspace.localHeadCommitId,
|
|
133
|
+
canonicalCommits: commits,
|
|
134
|
+
latestValueWrites: [],
|
|
135
|
+
clearStaging: false,
|
|
136
|
+
localWorkspaceHead: resultingHead,
|
|
137
|
+
syncState: {
|
|
138
|
+
mode,
|
|
139
|
+
remoteCount: mode === "abort" ? 0 : context.remoteCommits.length,
|
|
140
|
+
publishedSequence: context.publishedSequence,
|
|
141
|
+
restoreSequence: context.oldPublishedSequence,
|
|
142
|
+
targetHead: context.targetHead,
|
|
143
|
+
expectedRemoteHead: mode === "continue" || mode === "abort" ? context.targetHead : context.oldRemoteHead,
|
|
144
|
+
restoreRemoteHead: context.oldRemoteHead,
|
|
145
|
+
manifestDigest: context.manifestDigest,
|
|
146
|
+
restoreManifestDigest: context.oldManifestDigest,
|
|
147
|
+
objectMode: context.objectMode,
|
|
148
|
+
latestGroups: latestValues,
|
|
149
|
+
manualValues,
|
|
150
|
+
snapshotBytes: context.remoteSnapshot.canonicalBytes,
|
|
151
|
+
localSnapshotBytes: context.localSnapshot.canonicalBytes,
|
|
152
|
+
clearRebase,
|
|
153
|
+
rebase,
|
|
154
|
+
conflicts,
|
|
155
|
+
},
|
|
156
|
+
resultingHead,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=pull.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pull.js","sourceRoot":"","sources":["../../../../src/local/domain/rebase/pull.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAK1D,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACzE,MAAM,mBAAmB,GAAqC,EAAE,CAAC;AACjE,MAAM,YAAY,GAA8B,EAAE,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,KAAwB,EACxB,YAAoB,EACpB,QAAgB,EAChB,MAAc,EACd,eAAoC,EACpC,QAAoB,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;IAEpC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QAAE,MAAM,IAAI,sBAAsB,CAAC,wBAAwB,CAAC,CAAC;IAChF,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAC1D,IAAI,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,CAAC,MAAM,KAAK,IAAI,IAAI,SAAS,CAAC,SAAS,CAAC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