@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.
Files changed (623) hide show
  1. package/README.md +67 -10
  2. package/package.json +14 -6
  3. package/skills/flywheel/SKILL.md +9 -6
  4. package/skills/flywheel/example-workflows/organizing-exploring-and-iterating-on-a-research-topic.md +38 -46
  5. package/skills/flywheel/example-workflows/reproducing-papers-on-a-budget.md +34 -36
  6. package/skills/flywheel/getting-started/flywheel-quickstart.md +2 -5
  7. package/skills/flywheel/references/INTERFACES.md +2 -2
  8. package/skills/flywheel/references/experiment-design-protocol.md +32 -25
  9. package/skills/flywheel/references/flywheel-cli-tool-map.md +120 -76
  10. package/skills/flywheel/references/flywheel-mcp-tool-map.md +42 -32
  11. package/skills/flywheel/setting-up-flywheel/claude-code-cli-installation.md +1 -1
  12. package/skills/flywheel/setting-up-flywheel/codex-cli-installation.md +1 -1
  13. package/skills/flywheel/setting-up-flywheel/installation-overview.md +2 -6
  14. package/skills/flywheel/setting-up-flywheel/other-hosts-installation.md +45 -25
  15. package/skills/flywheel/setting-up-flywheel/updating-flywheel-mcp.md +34 -11
  16. package/skills/flywheel-auto/SKILL.md +40 -23
  17. package/skills/flywheel-auto/evals/evals.json +1 -1
  18. package/skills/flywheel-auto/references/INTERFACES.md +2 -2
  19. package/skills/flywheel-auto/references/experiment-design-protocol.md +31 -23
  20. package/skills/flywheel-auto/references/flywheel-cli-tool-map.md +172 -127
  21. package/skills/flywheel-auto/references/flywheel-mcp-tool-map.md +22 -24
  22. package/skills/flywheel-lookahead/SKILL.md +47 -28
  23. package/skills/flywheel-lookahead/agents/openai.yaml +1 -1
  24. package/skills/flywheel-lookahead/evals/evals.json +6 -6
  25. package/skills/flywheel-lookahead/references/INTERFACES.md +2 -2
  26. package/skills/flywheel-lookahead/references/flywheel-cli-tool-map.md +172 -127
  27. package/skills/flywheel-lookahead/references/flywheel-mcp-tool-map.md +22 -24
  28. package/skills/flywheel-prove/SKILL.md +2 -2
  29. package/skills/flywheel-prove/references/workflow.md +21 -2
  30. package/skills/flywheel-reproduce/SKILL.md +39 -19
  31. package/skills/flywheel-reproduce/evals/evals.json +1 -1
  32. package/skills/flywheel-reproduce/references/INTERFACES.md +2 -2
  33. package/skills/flywheel-reproduce/references/experiment-design-protocol.md +31 -23
  34. package/skills/flywheel-reproduce/references/flywheel-cli-tool-map.md +172 -127
  35. package/skills/flywheel-reproduce/references/flywheel-mcp-tool-map.md +22 -24
  36. package/skills/flywheel-to-graph/SKILL.md +37 -17
  37. package/skills/flywheel-to-graph/references/INTERFACES.md +2 -2
  38. package/skills/flywheel-to-graph/references/flywheel-cli-tool-map.md +172 -127
  39. package/skills/flywheel-to-graph/references/flywheel-mcp-tool-map.md +22 -24
  40. package/skills/flywheel-tree/references/workflow.md +6 -37
  41. package/src/cli.mjs +1145 -1141
  42. package/src/mcp-writer.mjs +413 -435
  43. package/src/public-command-metadata.mjs +28 -5
  44. package/src/runtime/delegate.mjs +2 -19
  45. package/src/runtime/required-runtime-commands.json +80 -28
  46. package/src/runtime/runtime-config.mjs +39 -60
  47. package/src/runtime/vendor/flywheel-cli-dist/auth/credentials.js +330 -0
  48. package/src/runtime/vendor/flywheel-cli-dist/auth/credentials.js.map +1 -0
  49. package/src/runtime/vendor/flywheel-cli-dist/auth/login.js +90 -139
  50. package/src/runtime/vendor/flywheel-cli-dist/auth/login.js.map +1 -1
  51. package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.js +1 -1
  52. package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.js.map +1 -1
  53. package/src/runtime/vendor/flywheel-cli-dist/auth/secure-write.js +116 -0
  54. package/src/runtime/vendor/flywheel-cli-dist/auth/secure-write.js.map +1 -0
  55. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-create.js +248 -1
  56. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-create.js.map +1 -1
  57. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-login.js +65 -1
  58. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-login.js.map +1 -1
  59. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-revoke-api-key.js +17 -0
  60. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-revoke-api-key.js.map +1 -0
  61. package/src/runtime/vendor/flywheel-cli-dist/commands/aliases.js +3 -7
  62. package/src/runtime/vendor/flywheel-cli-dist/commands/aliases.js.map +1 -1
  63. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-credentials-clear.js +12 -0
  64. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-credentials-clear.js.map +1 -0
  65. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-credentials-set.js +29 -0
  66. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-credentials-set.js.map +1 -0
  67. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-login.js +12 -0
  68. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-login.js.map +1 -1
  69. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.js +46 -10
  70. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.js.map +1 -1
  71. package/src/runtime/vendor/flywheel-cli-dist/commands/env.js +17 -40
  72. package/src/runtime/vendor/flywheel-cli-dist/commands/env.js.map +1 -1
  73. package/src/runtime/vendor/flywheel-cli-dist/commands/graph-operation-resources.js +305 -0
  74. package/src/runtime/vendor/flywheel-cli-dist/commands/graph-operation-resources.js.map +1 -0
  75. package/src/runtime/vendor/flywheel-cli-dist/commands/graph-operation-support.js +72 -0
  76. package/src/runtime/vendor/flywheel-cli-dist/commands/graph-operation-support.js.map +1 -0
  77. package/src/runtime/vendor/flywheel-cli-dist/commands/graph-operation.js +286 -0
  78. package/src/runtime/vendor/flywheel-cli-dist/commands/graph-operation.js.map +1 -0
  79. package/src/runtime/vendor/flywheel-cli-dist/commands/help-metadata.js +30 -5
  80. package/src/runtime/vendor/flywheel-cli-dist/commands/help-metadata.js.map +1 -1
  81. package/src/runtime/vendor/flywheel-cli-dist/commands/help.js +27 -12
  82. package/src/runtime/vendor/flywheel-cli-dist/commands/help.js.map +1 -1
  83. package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-commit-replay.js +284 -0
  84. package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-commit-replay.js.map +1 -0
  85. package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-graph.js +169 -0
  86. package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-graph.js.map +1 -0
  87. package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-lineage-list.js +13 -0
  88. package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-lineage-list.js.map +1 -0
  89. package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-repository-snapshot.js +227 -0
  90. package/src/runtime/vendor/flywheel-cli-dist/commands/hosted-repository-snapshot.js.map +1 -0
  91. package/src/runtime/vendor/flywheel-cli-dist/commands/index.js +21 -51
  92. package/src/runtime/vendor/flywheel-cli-dist/commands/index.js.map +1 -1
  93. package/src/runtime/vendor/flywheel-cli-dist/commands/node-create-schema.js +25 -0
  94. package/src/runtime/vendor/flywheel-cli-dist/commands/node-create-schema.js.map +1 -0
  95. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.js +11 -9
  96. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.js.map +1 -1
  97. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.js +38 -45
  98. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.js.map +1 -1
  99. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.js +14 -17
  100. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.js.map +1 -1
  101. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-unset.js +13 -8
  102. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-unset.js.map +1 -1
  103. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/admin.js +34 -3
  104. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/admin.js.map +1 -1
  105. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.js +9 -9
  106. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.js.map +1 -1
  107. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/hosted.js +76 -0
  108. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/hosted.js.map +1 -0
  109. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.js +4 -138
  110. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.js.map +1 -1
  111. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.js +8 -13
  112. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.js.map +1 -1
  113. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/repository.js +362 -0
  114. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/repository.js.map +1 -0
  115. package/src/runtime/vendor/flywheel-cli-dist/commands/registry.js +45 -183
  116. package/src/runtime/vendor/flywheel-cli-dist/commands/registry.js.map +1 -1
  117. package/src/runtime/vendor/flywheel-cli-dist/commands/repository-edit.js +47 -0
  118. package/src/runtime/vendor/flywheel-cli-dist/commands/repository-edit.js.map +1 -0
  119. package/src/runtime/vendor/flywheel-cli-dist/commands/repository-operation.js +181 -0
  120. package/src/runtime/vendor/flywheel-cli-dist/commands/repository-operation.js.map +1 -0
  121. package/src/runtime/vendor/flywheel-cli-dist/commands/repository-output.js +163 -0
  122. package/src/runtime/vendor/flywheel-cli-dist/commands/repository-output.js.map +1 -0
  123. package/src/runtime/vendor/flywheel-cli-dist/commands/repository-projection.js +79 -0
  124. package/src/runtime/vendor/flywheel-cli-dist/commands/repository-projection.js.map +1 -0
  125. package/src/runtime/vendor/flywheel-cli-dist/commands/repository-selection.js +80 -0
  126. package/src/runtime/vendor/flywheel-cli-dist/commands/repository-selection.js.map +1 -0
  127. package/src/runtime/vendor/flywheel-cli-dist/commands/retired-command-names.js +78 -0
  128. package/src/runtime/vendor/flywheel-cli-dist/commands/retired-command-names.js.map +1 -0
  129. package/src/runtime/vendor/flywheel-cli-dist/commands/types.js.map +1 -1
  130. package/src/runtime/vendor/flywheel-cli-dist/commands/usage-spec.js +3 -2
  131. package/src/runtime/vendor/flywheel-cli-dist/commands/usage-spec.js.map +1 -1
  132. package/src/runtime/vendor/flywheel-cli-dist/config/index.js +5 -0
  133. package/src/runtime/vendor/flywheel-cli-dist/config/index.js.map +1 -0
  134. package/src/runtime/vendor/flywheel-cli-dist/config/io.js +139 -0
  135. package/src/runtime/vendor/flywheel-cli-dist/config/io.js.map +1 -0
  136. package/src/runtime/vendor/flywheel-cli-dist/config/migration.js +299 -0
  137. package/src/runtime/vendor/flywheel-cli-dist/config/migration.js.map +1 -0
  138. package/src/runtime/vendor/flywheel-cli-dist/config/model.js +214 -0
  139. package/src/runtime/vendor/flywheel-cli-dist/config/model.js.map +1 -0
  140. package/src/runtime/vendor/flywheel-cli-dist/config/path.js +30 -0
  141. package/src/runtime/vendor/flywheel-cli-dist/config/path.js.map +1 -0
  142. package/src/runtime/vendor/flywheel-cli-dist/credential-output.js +29 -0
  143. package/src/runtime/vendor/flywheel-cli-dist/credential-output.js.map +1 -0
  144. package/src/runtime/vendor/flywheel-cli-dist/errors.js +1 -16
  145. package/src/runtime/vendor/flywheel-cli-dist/errors.js.map +1 -1
  146. package/src/runtime/vendor/flywheel-cli-dist/generatedProductTelemetryContract.js +3 -3
  147. package/src/runtime/vendor/flywheel-cli-dist/generatedProductTelemetryContract.js.map +1 -1
  148. package/src/runtime/vendor/flywheel-cli-dist/grammar/globals.js +19 -9
  149. package/src/runtime/vendor/flywheel-cli-dist/grammar/globals.js.map +1 -1
  150. package/src/runtime/vendor/flywheel-cli-dist/grammar/parse.js +33 -4
  151. package/src/runtime/vendor/flywheel-cli-dist/grammar/parse.js.map +1 -1
  152. package/src/runtime/vendor/flywheel-cli-dist/http/client.js +322 -304
  153. package/src/runtime/vendor/flywheel-cli-dist/http/client.js.map +1 -1
  154. package/src/runtime/vendor/flywheel-cli-dist/http/debug.js +1 -21
  155. package/src/runtime/vendor/flywheel-cli-dist/http/debug.js.map +1 -1
  156. package/src/runtime/vendor/flywheel-cli-dist/http/retry.js +1 -0
  157. package/src/runtime/vendor/flywheel-cli-dist/http/retry.js.map +1 -1
  158. package/src/runtime/vendor/flywheel-cli-dist/local/adapter.js +244 -0
  159. package/src/runtime/vendor/flywheel-cli-dist/local/adapter.js.map +1 -0
  160. package/src/runtime/vendor/flywheel-cli-dist/local/domain/errors.js +7 -0
  161. package/src/runtime/vendor/flywheel-cli-dist/local/domain/errors.js.map +1 -0
  162. package/src/runtime/vendor/flywheel-cli-dist/local/domain/history.js +35 -0
  163. package/src/runtime/vendor/flywheel-cli-dist/local/domain/history.js.map +1 -0
  164. package/src/runtime/vendor/flywheel-cli-dist/local/domain/invariants.js +42 -0
  165. package/src/runtime/vendor/flywheel-cli-dist/local/domain/invariants.js.map +1 -0
  166. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/artifact-properties.js +179 -0
  167. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/artifact-properties.js.map +1 -0
  168. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/commits.js +152 -0
  169. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/commits.js.map +1 -0
  170. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/constants.js +71 -0
  171. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/constants.js.map +1 -0
  172. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/encoding.js +73 -0
  173. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/encoding.js.map +1 -0
  174. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/imported-artifact-properties.js +82 -0
  175. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/imported-artifact-properties.js.map +1 -0
  176. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/operations.js +345 -0
  177. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/operations.js.map +1 -0
  178. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/tags.js +57 -0
  179. package/src/runtime/vendor/flywheel-cli-dist/local/domain/models/tags.js.map +1 -0
  180. package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/conflicts.js +149 -0
  181. package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/conflicts.js.map +1 -0
  182. package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/context.js +115 -0
  183. package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/context.js.map +1 -0
  184. package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/keys.js +44 -0
  185. package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/keys.js.map +1 -0
  186. package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/pull.js +159 -0
  187. package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/pull.js.map +1 -0
  188. package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/replay.js +346 -0
  189. package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/replay.js.map +1 -0
  190. package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/resolve.js +37 -0
  191. package/src/runtime/vendor/flywheel-cli-dist/local/domain/rebase/resolve.js.map +1 -0
  192. package/src/runtime/vendor/flywheel-cli-dist/local/domain/revert/inverses.js +203 -0
  193. package/src/runtime/vendor/flywheel-cli-dist/local/domain/revert/inverses.js.map +1 -0
  194. package/src/runtime/vendor/flywheel-cli-dist/local/domain/revert/plan.js +207 -0
  195. package/src/runtime/vendor/flywheel-cli-dist/local/domain/revert/plan.js.map +1 -0
  196. package/src/runtime/vendor/flywheel-cli-dist/local/domain/revert/tag-inverses.js +109 -0
  197. package/src/runtime/vendor/flywheel-cli-dist/local/domain/revert/tag-inverses.js.map +1 -0
  198. package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/commit.js +61 -0
  199. package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/commit.js.map +1 -0
  200. package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/projection.js +46 -0
  201. package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/projection.js.map +1 -0
  202. package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/revert.js +203 -0
  203. package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/revert.js.map +1 -0
  204. package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/staging.js +44 -0
  205. package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/staging.js.map +1 -0
  206. package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/writes.js +188 -0
  207. package/src/runtime/vendor/flywheel-cli-dist/local/domain/service/writes.js.map +1 -0
  208. package/src/runtime/vendor/flywheel-cli-dist/local/domain/sync/cursors.js +54 -0
  209. package/src/runtime/vendor/flywheel-cli-dist/local/domain/sync/cursors.js.map +1 -0
  210. package/src/runtime/vendor/flywheel-cli-dist/local/domain/sync/local-pull.js +25 -0
  211. package/src/runtime/vendor/flywheel-cli-dist/local/domain/sync/local-pull.js.map +1 -0
  212. package/src/runtime/vendor/flywheel-cli-dist/local/domain/sync-models.js +2 -0
  213. package/src/runtime/vendor/flywheel-cli-dist/local/domain/sync-models.js.map +1 -0
  214. package/src/runtime/vendor/flywheel-cli-dist/local/fs/native.js +7 -0
  215. package/src/runtime/vendor/flywheel-cli-dist/local/fs/native.js.map +1 -0
  216. package/src/runtime/vendor/flywheel-cli-dist/local/fs/state.js +129 -0
  217. package/src/runtime/vendor/flywheel-cli-dist/local/fs/state.js.map +1 -0
  218. package/src/runtime/vendor/flywheel-cli-dist/local/fs/writer-lock.js +277 -0
  219. package/src/runtime/vendor/flywheel-cli-dist/local/fs/writer-lock.js.map +1 -0
  220. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/bootstrap.js +183 -0
  221. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/bootstrap.js.map +1 -0
  222. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/context.js +2 -0
  223. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/context.js.map +1 -0
  224. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/dispatch.js +121 -0
  225. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/dispatch.js.map +1 -0
  226. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/doctor.js +16 -0
  227. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/doctor.js.map +1 -0
  228. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/identity.js +72 -0
  229. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/identity.js.map +1 -0
  230. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/conflicts.js +59 -0
  231. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/conflicts.js.map +1 -0
  232. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/core.js +125 -0
  233. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/core.js.map +1 -0
  234. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/history.js +129 -0
  235. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/history.js.map +1 -0
  236. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/index.js +31 -0
  237. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/index.js.map +1 -0
  238. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/maintenance.js +49 -0
  239. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/maintenance.js.map +1 -0
  240. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/projections.js +30 -0
  241. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/projections.js.map +1 -0
  242. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/shared.js +12 -0
  243. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/operations/shared.js.map +1 -0
  244. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/platform.js +18 -0
  245. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/platform.js.map +1 -0
  246. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/projection.js +125 -0
  247. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/projection.js.map +1 -0
  248. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/clone.js +37 -0
  249. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/clone.js.map +1 -0
  250. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/pull.js +44 -0
  251. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/pull.js.map +1 -0
  252. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/purge.js +58 -0
  253. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/purge.js.map +1 -0
  254. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/push.js +118 -0
  255. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/push.js.map +1 -0
  256. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/transport.js +277 -0
  257. package/src/runtime/vendor/flywheel-cli-dist/local/runtime/remote/transport.js.map +1 -0
  258. package/src/runtime/vendor/flywheel-cli-dist/local/store/apply.js +132 -0
  259. package/src/runtime/vendor/flywheel-cli-dist/local/store/apply.js.map +1 -0
  260. package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/archive.js +372 -0
  261. package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/archive.js.map +1 -0
  262. package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/backup.js +210 -0
  263. package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/backup.js.map +1 -0
  264. package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/restore.js +278 -0
  265. package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/restore.js.map +1 -0
  266. package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/retained-directory.js +192 -0
  267. package/src/runtime/vendor/flywheel-cli-dist/local/store/backup/retained-directory.js.map +1 -0
  268. package/src/runtime/vendor/flywheel-cli-dist/local/store/commits.js +114 -0
  269. package/src/runtime/vendor/flywheel-cli-dist/local/store/commits.js.map +1 -0
  270. package/src/runtime/vendor/flywheel-cli-dist/local/store/contract.js +65 -0
  271. package/src/runtime/vendor/flywheel-cli-dist/local/store/contract.js.map +1 -0
  272. package/src/runtime/vendor/flywheel-cli-dist/local/store/diagnostics-worker.js +145 -0
  273. package/src/runtime/vendor/flywheel-cli-dist/local/store/diagnostics-worker.js.map +1 -0
  274. package/src/runtime/vendor/flywheel-cli-dist/local/store/diagnostics.js +218 -0
  275. package/src/runtime/vendor/flywheel-cli-dist/local/store/diagnostics.js.map +1 -0
  276. package/src/runtime/vendor/flywheel-cli-dist/local/store/gc.js +71 -0
  277. package/src/runtime/vendor/flywheel-cli-dist/local/store/gc.js.map +1 -0
  278. package/src/runtime/vendor/flywheel-cli-dist/local/store/history-validation.js +298 -0
  279. package/src/runtime/vendor/flywheel-cli-dist/local/store/history-validation.js.map +1 -0
  280. package/src/runtime/vendor/flywheel-cli-dist/local/store/latest-values.js +121 -0
  281. package/src/runtime/vendor/flywheel-cli-dist/local/store/latest-values.js.map +1 -0
  282. package/src/runtime/vendor/flywheel-cli-dist/local/store/migrate.js +69 -0
  283. package/src/runtime/vendor/flywheel-cli-dist/local/store/migrate.js.map +1 -0
  284. package/src/runtime/vendor/flywheel-cli-dist/local/store/migration/provenance.js +49 -0
  285. package/src/runtime/vendor/flywheel-cli-dist/local/store/migration/provenance.js.map +1 -0
  286. package/src/runtime/vendor/flywheel-cli-dist/local/store/migration/steps.js +424 -0
  287. package/src/runtime/vendor/flywheel-cli-dist/local/store/migration/steps.js.map +1 -0
  288. package/src/runtime/vendor/flywheel-cli-dist/local/store/migration/versions.js +10 -0
  289. package/src/runtime/vendor/flywheel-cli-dist/local/store/migration/versions.js.map +1 -0
  290. package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations/001_initial.sql +319 -0
  291. package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations/002_staged_latest_values.sql +8 -0
  292. package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations/003_remove_cli_editing_lease.sql +21 -0
  293. package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations/004_hosted_association.sql +7 -0
  294. package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations/005_artifact_properties.sql +68 -0
  295. package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations.js +12 -0
  296. package/src/runtime/vendor/flywheel-cli-dist/local/store/migrations.js.map +1 -0
  297. package/src/runtime/vendor/flywheel-cli-dist/local/store/objects.js +410 -0
  298. package/src/runtime/vendor/flywheel-cli-dist/local/store/objects.js.map +1 -0
  299. package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/apply.js +77 -0
  300. package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/apply.js.map +1 -0
  301. package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/artifacts.js +240 -0
  302. package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/artifacts.js.map +1 -0
  303. package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/nodes.js +127 -0
  304. package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/nodes.js.map +1 -0
  305. package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/relations.js +107 -0
  306. package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/relations.js.map +1 -0
  307. package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/rules.js +80 -0
  308. package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/rules.js.map +1 -0
  309. package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/tags.js +219 -0
  310. package/src/runtime/vendor/flywheel-cli-dist/local/store/projection/tags.js.map +1 -0
  311. package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/hosted.js +164 -0
  312. package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/hosted.js.map +1 -0
  313. package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/read.js +20 -0
  314. package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/read.js.map +1 -0
  315. package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/replace.js +41 -0
  316. package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/replace.js.map +1 -0
  317. package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/schema.js +22 -0
  318. package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/schema.js.map +1 -0
  319. package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/validate.js +188 -0
  320. package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot/validate.js.map +1 -0
  321. package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot.js +5 -0
  322. package/src/runtime/vendor/flywheel-cli-dist/local/store/snapshot.js.map +1 -0
  323. package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/connection.js +214 -0
  324. package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/connection.js.map +1 -0
  325. package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/errors.js +4 -0
  326. package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/errors.js.map +1 -0
  327. package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/rows.js +44 -0
  328. package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/rows.js.map +1 -0
  329. package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/schema.js +38 -0
  330. package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/schema.js.map +1 -0
  331. package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/store.js +284 -0
  332. package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/store.js.map +1 -0
  333. package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/verify.js +133 -0
  334. package/src/runtime/vendor/flywheel-cli-dist/local/store/sqlite/verify.js.map +1 -0
  335. package/src/runtime/vendor/flywheel-cli-dist/local/store/sync-commits.js +98 -0
  336. package/src/runtime/vendor/flywheel-cli-dist/local/store/sync-commits.js.map +1 -0
  337. package/src/runtime/vendor/flywheel-cli-dist/local/store/sync.js +161 -0
  338. package/src/runtime/vendor/flywheel-cli-dist/local/store/sync.js.map +1 -0
  339. package/src/runtime/vendor/flywheel-cli-dist/local/store/workspace-state.js +97 -0
  340. package/src/runtime/vendor/flywheel-cli-dist/local/store/workspace-state.js.map +1 -0
  341. package/src/runtime/vendor/flywheel-cli-dist/local/store/workspace.js +69 -0
  342. package/src/runtime/vendor/flywheel-cli-dist/local/store/workspace.js.map +1 -0
  343. package/src/runtime/vendor/flywheel-cli-dist/main.js +651 -376
  344. package/src/runtime/vendor/flywheel-cli-dist/main.js.map +1 -1
  345. package/src/runtime/vendor/flywheel-cli-dist/output/format.js +18 -11
  346. package/src/runtime/vendor/flywheel-cli-dist/output/format.js.map +1 -1
  347. package/src/runtime/vendor/flywheel-cli-dist/prebuilds/darwin-arm64/node.napi.node +0 -0
  348. package/src/runtime/vendor/flywheel-cli-dist/prebuilds/darwin-x64/node.napi.node +0 -0
  349. package/src/runtime/vendor/flywheel-cli-dist/prebuilds/linux-arm64/node.napi.glibc.node +0 -0
  350. package/src/runtime/vendor/flywheel-cli-dist/prebuilds/linux-arm64/node.napi.musl.node +0 -0
  351. package/src/runtime/vendor/flywheel-cli-dist/prebuilds/linux-x64/node.napi.glibc.node +0 -0
  352. package/src/runtime/vendor/flywheel-cli-dist/prebuilds/linux-x64/node.napi.musl.node +0 -0
  353. package/src/runtime/vendor/manifest.json +246 -257
  354. package/src/setup/command.mjs +5 -0
  355. package/src/setup/io/patchers/json.mjs +1 -1
  356. package/src/setup/io/patchers/toml.mjs +3 -1
  357. package/src/setup/io/patchers/yaml.mjs +1 -1
  358. package/src/setup/modes/cli.mjs +76 -7
  359. package/src/setup/modes/mcp-command.mjs +802 -793
  360. package/src/setup/modes/mcp.mjs +7 -3
  361. package/src/setup/shared/prior-mode-detect.mjs +18 -21
  362. package/src/setup/test-seams.mjs +25 -0
  363. package/src/setup-auth.mjs +76 -10
  364. package/src/toml-lines.mjs +52 -0
  365. package/src/unified-cli.mjs +31 -16
  366. package/skills/flywheel-llm-proof-paper/scripts/__pycache__/check_paper.cpython-312.pyc +0 -0
  367. package/src/runtime/vendor/flywheel-cli-dist/auth/active-key-id.d.ts +0 -1
  368. package/src/runtime/vendor/flywheel-cli-dist/auth/baseurl.d.ts +0 -35
  369. package/src/runtime/vendor/flywheel-cli-dist/auth/config.d.ts +0 -34
  370. package/src/runtime/vendor/flywheel-cli-dist/auth/config.js +0 -92
  371. package/src/runtime/vendor/flywheel-cli-dist/auth/config.js.map +0 -1
  372. package/src/runtime/vendor/flywheel-cli-dist/auth/fingerprint.d.ts +0 -5
  373. package/src/runtime/vendor/flywheel-cli-dist/auth/keychain.d.ts +0 -4
  374. package/src/runtime/vendor/flywheel-cli-dist/auth/keychain.js +0 -31
  375. package/src/runtime/vendor/flywheel-cli-dist/auth/keychain.js.map +0 -1
  376. package/src/runtime/vendor/flywheel-cli-dist/auth/login.d.ts +0 -24
  377. package/src/runtime/vendor/flywheel-cli-dist/auth/profile.d.ts +0 -15
  378. package/src/runtime/vendor/flywheel-cli-dist/auth/profile.js +0 -150
  379. package/src/runtime/vendor/flywheel-cli-dist/auth/profile.js.map +0 -1
  380. package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.d.ts +0 -27
  381. package/src/runtime/vendor/flywheel-cli-dist/commands/_admin-auth.d.ts +0 -27
  382. package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.d.ts +0 -32
  383. package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.js +0 -213
  384. package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.js.map +0 -1
  385. package/src/runtime/vendor/flywheel-cli-dist/commands/_browser-handoff.d.ts +0 -35
  386. package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.d.ts +0 -2
  387. package/src/runtime/vendor/flywheel-cli-dist/commands/_secret-param.d.ts +0 -7
  388. package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-file-out.d.ts +0 -39
  389. package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-writer.d.ts +0 -34
  390. package/src/runtime/vendor/flywheel-cli-dist/commands/_wait-polling.d.ts +0 -50
  391. package/src/runtime/vendor/flywheel-cli-dist/commands/account-detach.d.ts +0 -2
  392. package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-add.d.ts +0 -2
  393. package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-remove.d.ts +0 -2
  394. package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-set-primary.d.ts +0 -2
  395. package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.d.ts +0 -2
  396. package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-preview.d.ts +0 -2
  397. package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-proof.d.ts +0 -2
  398. package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge.d.ts +0 -2
  399. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-get.d.ts +0 -2
  400. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-set.d.ts +0 -2
  401. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export-stream.d.ts +0 -2
  402. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export.d.ts +0 -2
  403. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-list.d.ts +0 -4
  404. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-nodes-audit-list.d.ts +0 -2
  405. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-create.d.ts +0 -2
  406. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-delete.d.ts +0 -2
  407. package/src/runtime/vendor/flywheel-cli-dist/commands/admin-test-users-login.d.ts +0 -2
  408. package/src/runtime/vendor/flywheel-cli-dist/commands/aliases.d.ts +0 -13
  409. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-create.d.ts +0 -2
  410. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-delete.d.ts +0 -2
  411. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.d.ts +0 -18
  412. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-rotate.d.ts +0 -2
  413. package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-expire.d.ts +0 -2
  414. package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-heartbeat.d.ts +0 -2
  415. package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-list.d.ts +0 -2
  416. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete-bulk.d.ts +0 -2
  417. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete-bulk.js +0 -22
  418. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete-bulk.js.map +0 -1
  419. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.d.ts +0 -2
  420. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.js +0 -8
  421. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.js.map +0 -1
  422. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-get.d.ts +0 -2
  423. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-list.d.ts +0 -2
  424. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-note-set.d.ts +0 -2
  425. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-note-set.js +0 -9
  426. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-note-set.js.map +0 -1
  427. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-finalize.d.ts +0 -2
  428. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-finalize.js +0 -7
  429. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-finalize.js.map +0 -1
  430. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-prepare.d.ts +0 -2
  431. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-prepare.js +0 -15
  432. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-prepare.js.map +0 -1
  433. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload.d.ts +0 -2
  434. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload.js +0 -5
  435. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload.js.map +0 -1
  436. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-clear.d.ts +0 -2
  437. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-clear.js +0 -8
  438. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-clear.js.map +0 -1
  439. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-set.d.ts +0 -2
  440. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-set.js +0 -30
  441. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-set.js.map +0 -1
  442. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-login.d.ts +0 -2
  443. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-mode.d.ts +0 -4
  444. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.d.ts +0 -2
  445. package/src/runtime/vendor/flywheel-cli-dist/commands/blobs-get.d.ts +0 -2
  446. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-create.d.ts +0 -2
  447. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-list.d.ts +0 -1
  448. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-revoke.d.ts +0 -1
  449. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-update.d.ts +0 -2
  450. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-snapshot.d.ts +0 -1
  451. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-acquire.d.ts +0 -2
  452. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-budgets.d.ts +0 -2
  453. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-connection.d.ts +0 -2
  454. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-funding.d.ts +0 -2
  455. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-list.d.ts +0 -2
  456. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-request-approval.d.ts +0 -2
  457. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-options.d.ts +0 -2
  458. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release-all.d.ts +0 -2
  459. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release.d.ts +0 -2
  460. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-status.d.ts +0 -2
  461. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-balance.d.ts +0 -1
  462. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-billing-portal.d.ts +0 -2
  463. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-purchase.d.ts +0 -2
  464. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral-claim.d.ts +0 -2
  465. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral.d.ts +0 -1
  466. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscribe.d.ts +0 -2
  467. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscription.d.ts +0 -1
  468. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-transactions.d.ts +0 -2
  469. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-usage.d.ts +0 -2
  470. package/src/runtime/vendor/flywheel-cli-dist/commands/destructive-confirmation.d.ts +0 -2
  471. package/src/runtime/vendor/flywheel-cli-dist/commands/enums.d.ts +0 -22
  472. package/src/runtime/vendor/flywheel-cli-dist/commands/env.d.ts +0 -8
  473. package/src/runtime/vendor/flywheel-cli-dist/commands/executions-launch.d.ts +0 -2
  474. package/src/runtime/vendor/flywheel-cli-dist/commands/executions-list.d.ts +0 -1
  475. package/src/runtime/vendor/flywheel-cli-dist/commands/executions-terminate.d.ts +0 -2
  476. package/src/runtime/vendor/flywheel-cli-dist/commands/export-history.d.ts +0 -2
  477. package/src/runtime/vendor/flywheel-cli-dist/commands/export-subgraph.d.ts +0 -2
  478. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-pdf.d.ts +0 -2
  479. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-render-pdf.d.ts +0 -2
  480. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-stream.d.ts +0 -2
  481. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary.d.ts +0 -2
  482. package/src/runtime/vendor/flywheel-cli-dist/commands/feedback-create.d.ts +0 -2
  483. package/src/runtime/vendor/flywheel-cli-dist/commands/files-list.d.ts +0 -2
  484. package/src/runtime/vendor/flywheel-cli-dist/commands/github-disconnect.d.ts +0 -1
  485. package/src/runtime/vendor/flywheel-cli-dist/commands/github-link.d.ts +0 -2
  486. package/src/runtime/vendor/flywheel-cli-dist/commands/github-refresh-repos.d.ts +0 -1
  487. package/src/runtime/vendor/flywheel-cli-dist/commands/github-status.d.ts +0 -1
  488. package/src/runtime/vendor/flywheel-cli-dist/commands/graph-get.d.ts +0 -2
  489. package/src/runtime/vendor/flywheel-cli-dist/commands/handler-factory.d.ts +0 -22
  490. package/src/runtime/vendor/flywheel-cli-dist/commands/help-format.d.ts +0 -31
  491. package/src/runtime/vendor/flywheel-cli-dist/commands/help-metadata.d.ts +0 -36
  492. package/src/runtime/vendor/flywheel-cli-dist/commands/help.d.ts +0 -17
  493. package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-create.d.ts +0 -2
  494. package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-delete.d.ts +0 -1
  495. package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-list.d.ts +0 -2
  496. package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-runs-list.d.ts +0 -2
  497. package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-create.d.ts +0 -2
  498. package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-delete.d.ts +0 -1
  499. package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-list.d.ts +0 -1
  500. package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-update.d.ts +0 -2
  501. package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-set-enabled.d.ts +0 -2
  502. package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-update.d.ts +0 -2
  503. package/src/runtime/vendor/flywheel-cli-dist/commands/import-subgraph.d.ts +0 -2
  504. package/src/runtime/vendor/flywheel-cli-dist/commands/index.d.ts +0 -23
  505. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-remove.d.ts +0 -1
  506. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-set.d.ts +0 -2
  507. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-status.d.ts +0 -1
  508. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-remove.d.ts +0 -1
  509. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-set.d.ts +0 -2
  510. package/src/runtime/vendor/flywheel-cli-dist/commands/machines-list.d.ts +0 -1
  511. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.d.ts +0 -2
  512. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.js +0 -15
  513. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.js.map +0 -1
  514. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-branch.d.ts +0 -2
  515. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-branch.js +0 -10
  516. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-branch.js.map +0 -1
  517. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-children.d.ts +0 -2
  518. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-children.js +0 -8
  519. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-children.js.map +0 -1
  520. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit-new.d.ts +0 -2
  521. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit-new.js +0 -6
  522. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit-new.js.map +0 -1
  523. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit.d.ts +0 -2
  524. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit.js +0 -7
  525. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit.js.map +0 -1
  526. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-create.d.ts +0 -2
  527. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-create.js +0 -6
  528. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-create.js.map +0 -1
  529. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.d.ts +0 -2
  530. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.js +0 -16
  531. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.js.map +0 -1
  532. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.d.ts +0 -2
  533. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.js +0 -11
  534. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.js.map +0 -1
  535. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-files.d.ts +0 -1
  536. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-get.d.ts +0 -2
  537. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-list.d.ts +0 -2
  538. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-merge.d.ts +0 -2
  539. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-merge.js +0 -33
  540. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-merge.js.map +0 -1
  541. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-parents.d.ts +0 -2
  542. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-parents.js +0 -8
  543. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-parents.js.map +0 -1
  544. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.d.ts +0 -2
  545. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.js +0 -15
  546. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.js.map +0 -1
  547. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-ancestry.d.ts +0 -2
  548. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-summary.d.ts +0 -2
  549. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-tree.d.ts +0 -2
  550. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-resolve-slug.d.ts +0 -2
  551. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-get.d.ts +0 -1
  552. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set-bulk.d.ts +0 -2
  553. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set.d.ts +0 -2
  554. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-summaries.d.ts +0 -2
  555. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-acquire.d.ts +0 -2
  556. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-heartbeat.d.ts +0 -2
  557. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-release.d.ts +0 -2
  558. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.d.ts +0 -2
  559. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.d.ts +0 -2
  560. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.d.ts +0 -2
  561. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-unset.d.ts +0 -2
  562. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/account.d.ts +0 -2
  563. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/admin.d.ts +0 -8
  564. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/api-keys.d.ts +0 -2
  565. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/approval.d.ts +0 -2
  566. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.d.ts +0 -2
  567. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.js +0 -140
  568. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.js.map +0 -1
  569. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.d.ts +0 -2
  570. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/budgets.d.ts +0 -2
  571. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.d.ts +0 -2
  572. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/credits.d.ts +0 -2
  573. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/env.d.ts +0 -2
  574. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/executions.d.ts +0 -2
  575. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/export.d.ts +0 -2
  576. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/github.d.ts +0 -2
  577. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/graph.d.ts +0 -2
  578. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/hooks.d.ts +0 -2
  579. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/integrations.d.ts +0 -2
  580. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.d.ts +0 -2
  581. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.d.ts +0 -2
  582. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.d.ts +0 -2
  583. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/sharing.d.ts +0 -2
  584. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/tagging.d.ts +0 -2
  585. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/tagging.js +0 -98
  586. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/tagging.js.map +0 -1
  587. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/updates.d.ts +0 -2
  588. package/src/runtime/vendor/flywheel-cli-dist/commands/registry.d.ts +0 -27
  589. package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-refresh.d.ts +0 -2
  590. package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-resolve.d.ts +0 -2
  591. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-assign.d.ts +0 -2
  592. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-assign.js +0 -25
  593. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-assign.js.map +0 -1
  594. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-create.d.ts +0 -2
  595. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-create.js +0 -25
  596. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-create.js.map +0 -1
  597. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-delete.d.ts +0 -2
  598. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-delete.js +0 -11
  599. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-delete.js.map +0 -1
  600. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-update.d.ts +0 -2
  601. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-update.js +0 -28
  602. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-update.js.map +0 -1
  603. package/src/runtime/vendor/flywheel-cli-dist/commands/types.d.ts +0 -30
  604. package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide-all-active.d.ts +0 -1
  605. package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide.d.ts +0 -2
  606. package/src/runtime/vendor/flywheel-cli-dist/commands/updates-list.d.ts +0 -2
  607. package/src/runtime/vendor/flywheel-cli-dist/commands/usage-spec.d.ts +0 -6
  608. package/src/runtime/vendor/flywheel-cli-dist/commands/utils.d.ts +0 -11
  609. package/src/runtime/vendor/flywheel-cli-dist/errors.d.ts +0 -86
  610. package/src/runtime/vendor/flywheel-cli-dist/exit-codes.d.ts +0 -8
  611. package/src/runtime/vendor/flywheel-cli-dist/generatedFeedbackContract.d.ts +0 -41
  612. package/src/runtime/vendor/flywheel-cli-dist/generatedProductTelemetryContract.d.ts +0 -13
  613. package/src/runtime/vendor/flywheel-cli-dist/grammar/globals.d.ts +0 -26
  614. package/src/runtime/vendor/flywheel-cli-dist/grammar/parse.d.ts +0 -17
  615. package/src/runtime/vendor/flywheel-cli-dist/http/client.d.ts +0 -91
  616. package/src/runtime/vendor/flywheel-cli-dist/http/debug.d.ts +0 -5
  617. package/src/runtime/vendor/flywheel-cli-dist/http/poll.d.ts +0 -18
  618. package/src/runtime/vendor/flywheel-cli-dist/http/retry.d.ts +0 -30
  619. package/src/runtime/vendor/flywheel-cli-dist/main.d.ts +0 -33
  620. package/src/runtime/vendor/flywheel-cli-dist/output/format.d.ts +0 -9
  621. package/src/runtime/vendor/flywheel-cli-dist/runtime-entry.d.ts +0 -1
  622. package/src/runtime/vendor/flywheel-cli-dist/version.d.ts +0 -3
  623. package/src/secure-write.mjs +0 -43
@@ -0,0 +1,410 @@
1
+ import { createHash, randomBytes } from "node:crypto";
2
+ import { fstatSync, futimesSync, readFileSync, readdirSync, writeSync } from "node:fs";
3
+ import { join } from "node:path";
4
+ import { close, createFileExclusiveAt, fchmod, fsync, fstat, mkdirAt, openDirectoryAt, renameReplaceAt, statAt, unlinkAt, openFileAt, } from "../fs/native.js";
5
+ import { RepositoryStoreError } from "./sqlite/errors.js";
6
+ const DIRECTORY_TYPE = 0o040000;
7
+ const REGULAR_FILE_TYPE = 0o100000;
8
+ const FILE_TYPE_MASK = 0o170000;
9
+ const PRIVATE_DIRECTORY_MODE = 0o700;
10
+ const PRIVATE_FILE_MODE = 0o600;
11
+ function hasCode(error, code) {
12
+ return typeof error === "object" && error !== null && "code" in error && error.code === code;
13
+ }
14
+ function isDirectory(stat) {
15
+ return (stat.mode & FILE_TYPE_MASK) === DIRECTORY_TYPE;
16
+ }
17
+ function isRegularFile(stat) {
18
+ return (stat.mode & FILE_TYPE_MASK) === REGULAR_FILE_TYPE;
19
+ }
20
+ function sameIdentity(left, right) {
21
+ return left.dev === right.dev && left.ino === right.ino;
22
+ }
23
+ function objectStoreError(message, cause) {
24
+ return new RepositoryStoreError(message, cause === undefined ? undefined : { cause });
25
+ }
26
+ function digestName(digest) {
27
+ if (!/^sha256:[0-9a-f]{64}$/.test(digest)) {
28
+ throw new RepositoryStoreError("local object key must be a canonical sha256 digest");
29
+ }
30
+ return digest.slice("sha256:".length);
31
+ }
32
+ function missingObject(digest) {
33
+ return Object.assign(new Error(`Blob not found: ${digest}`), { name: "FileNotFoundError", code: "ENOENT" });
34
+ }
35
+ function preserveOperationError(operation, cleanup) {
36
+ let failed = false;
37
+ let operationError;
38
+ let result;
39
+ try {
40
+ result = operation();
41
+ }
42
+ catch (error) {
43
+ failed = true;
44
+ operationError = error;
45
+ }
46
+ let cleanupError;
47
+ try {
48
+ cleanup();
49
+ }
50
+ catch (error) {
51
+ cleanupError = error;
52
+ }
53
+ if (failed)
54
+ throw operationError;
55
+ if (cleanupError !== undefined)
56
+ throw cleanupError;
57
+ return result;
58
+ }
59
+ /** Immutable repository-object authority rooted in one command's retained state. */
60
+ export class RepositoryObjectStorage {
61
+ #state;
62
+ constructor(state) {
63
+ this.#state = state;
64
+ }
65
+ async upload(digest, data, _contentType) {
66
+ void _contentType;
67
+ const name = digestName(digest);
68
+ if (`sha256:${createHash("sha256").update(data).digest("hex")}` !== digest) {
69
+ throw new RepositoryStoreError("object bytes do not match digest key");
70
+ }
71
+ this.#withDirectories((open) => {
72
+ const objects = open(this.#state.stateFd, "objects", true);
73
+ const sha256 = open(objects.fd, "sha256", true);
74
+ this.#install(sha256, name, data);
75
+ });
76
+ }
77
+ async download(digest) {
78
+ const name = digestName(digest);
79
+ return this.#withDirectories((open) => {
80
+ const objects = open(this.#state.stateFd, "objects", false);
81
+ if (objects === undefined)
82
+ throw missingObject(digest);
83
+ const sha256 = open(objects.fd, "sha256", false);
84
+ if (sha256 === undefined)
85
+ throw missingObject(digest);
86
+ const file = this.#openRegularFile(sha256.fd, name);
87
+ if (file === undefined)
88
+ throw missingObject(digest);
89
+ return preserveOperationError(() => Buffer.from(readFileSync(file.fd)), () => this.#finishRegularFile(sha256.fd, name, file));
90
+ });
91
+ }
92
+ async collectRepositoryGarbage(reachable, options) {
93
+ for (const digest of reachable)
94
+ digestName(digest);
95
+ const cutoff = options.now.getTime() - options.retentionSeconds * 1_000;
96
+ return this.#withDirectories((open) => {
97
+ const objects = open(this.#state.stateFd, "objects", !options.dryRun);
98
+ if (objects === undefined)
99
+ return { candidates: [], deleted: [] };
100
+ const sha256 = open(objects.fd, "sha256", false);
101
+ const candidatesDirectory = open(objects.fd, ".gc-candidates", !options.dryRun);
102
+ if (candidatesDirectory !== undefined)
103
+ this.#repairDirectoryChildren(candidatesDirectory);
104
+ const digests = sha256 === undefined ? [] : this.#listDigests(sha256);
105
+ const candidates = digests.filter((digest) => !reachable.has(digest));
106
+ const deleted = candidates.filter((digest) => candidatesDirectory !== undefined
107
+ && this.#markerIsExpired(candidatesDirectory, digestName(digest), cutoff));
108
+ if (options.dryRun)
109
+ return { candidates, deleted };
110
+ const markers = candidatesDirectory;
111
+ for (const digest of reachable)
112
+ this.#deleteFile(markers, digestName(digest));
113
+ for (const digest of candidates) {
114
+ const name = digestName(digest);
115
+ if (deleted.includes(digest)) {
116
+ if (sha256 !== undefined)
117
+ this.#deleteFile(sha256, name);
118
+ this.#deleteFile(markers, name);
119
+ }
120
+ else {
121
+ this.#touchMarker(markers, name, options.now);
122
+ }
123
+ }
124
+ return { candidates, deleted };
125
+ });
126
+ }
127
+ #withDirectories(operation) {
128
+ const directories = [];
129
+ const open = (parentFd, name, create) => {
130
+ const directory = this.#openDirectory(parentFd, name, create);
131
+ if (directory !== undefined)
132
+ directories.push(directory);
133
+ return directory;
134
+ };
135
+ return preserveOperationError(() => {
136
+ this.#state.assertValid();
137
+ return operation(open);
138
+ }, () => {
139
+ let cleanupError;
140
+ for (const directory of directories.toReversed()) {
141
+ try {
142
+ this.#assertDirectory(directory);
143
+ }
144
+ catch (error) {
145
+ cleanupError ??= error;
146
+ }
147
+ try {
148
+ close(directory.fd);
149
+ }
150
+ catch (error) {
151
+ cleanupError ??= error;
152
+ }
153
+ }
154
+ try {
155
+ this.#state.assertValid();
156
+ }
157
+ catch (error) {
158
+ cleanupError ??= error;
159
+ }
160
+ if (cleanupError !== undefined)
161
+ throw cleanupError;
162
+ });
163
+ }
164
+ #openDirectory(parentFd, name, create) {
165
+ let entry;
166
+ try {
167
+ entry = statAt(parentFd, name);
168
+ }
169
+ catch (error) {
170
+ if (!hasCode(error, "ENOENT"))
171
+ throw objectStoreError("repository object directory cannot be inspected", error);
172
+ if (!create)
173
+ return undefined;
174
+ try {
175
+ mkdirAt(parentFd, name, PRIVATE_DIRECTORY_MODE);
176
+ }
177
+ catch (createError) {
178
+ if (!hasCode(createError, "EEXIST"))
179
+ throw objectStoreError("repository object directory is invalid", createError);
180
+ }
181
+ try {
182
+ entry = statAt(parentFd, name);
183
+ }
184
+ catch (inspectError) {
185
+ throw objectStoreError("repository object directory cannot be inspected", inspectError);
186
+ }
187
+ }
188
+ if ((entry.mode & FILE_TYPE_MASK) === 0o120000) {
189
+ throw objectStoreError("repository object directory cannot be a symbolic link");
190
+ }
191
+ if (!isDirectory(entry))
192
+ throw objectStoreError("repository object directory is invalid");
193
+ let fd = -1;
194
+ return preserveOperationError(() => {
195
+ try {
196
+ fd = openDirectoryAt(parentFd, name);
197
+ const metadata = fstat(fd);
198
+ if (!isDirectory(metadata) || !sameIdentity(metadata, entry)) {
199
+ throw objectStoreError("repository object directory is invalid");
200
+ }
201
+ fchmod(fd, PRIVATE_DIRECTORY_MODE);
202
+ const directory = { fd, parentFd, name, identity: { dev: metadata.dev, ino: metadata.ino } };
203
+ this.#assertDirectory(directory);
204
+ fd = -1;
205
+ return directory;
206
+ }
207
+ catch (error) {
208
+ if (error instanceof RepositoryStoreError)
209
+ throw error;
210
+ throw objectStoreError("repository object directory is invalid", error);
211
+ }
212
+ }, () => {
213
+ if (fd >= 0)
214
+ close(fd);
215
+ });
216
+ }
217
+ #assertDirectory(directory) {
218
+ const current = statAt(directory.parentFd, directory.name);
219
+ if (!isDirectory(current) || !sameIdentity(current, directory.identity)) {
220
+ throw objectStoreError("repository object directory is invalid");
221
+ }
222
+ const metadata = fstat(directory.fd);
223
+ if (!isDirectory(metadata) || !sameIdentity(metadata, directory.identity)) {
224
+ throw objectStoreError("repository object directory is invalid");
225
+ }
226
+ }
227
+ #openRegularFile(parentFd, name) {
228
+ let entry;
229
+ try {
230
+ entry = statAt(parentFd, name);
231
+ }
232
+ catch (error) {
233
+ if (hasCode(error, "ENOENT"))
234
+ return undefined;
235
+ throw objectStoreError("repository object file cannot be inspected", error);
236
+ }
237
+ if ((entry.mode & FILE_TYPE_MASK) === 0o120000) {
238
+ throw objectStoreError("repository object file cannot be a symbolic link");
239
+ }
240
+ if (!isRegularFile(entry))
241
+ throw objectStoreError("repository object file is invalid");
242
+ let fd = -1;
243
+ return preserveOperationError(() => {
244
+ try {
245
+ fd = openFileAt(parentFd, name);
246
+ const metadata = fstat(fd);
247
+ if (!isRegularFile(metadata) || !sameIdentity(metadata, entry)) {
248
+ throw objectStoreError("repository object file is invalid");
249
+ }
250
+ fchmod(fd, PRIVATE_FILE_MODE);
251
+ this.#assertRegularFile(parentFd, name, { dev: metadata.dev, ino: metadata.ino });
252
+ const identity = { dev: metadata.dev, ino: metadata.ino };
253
+ const result = { fd, identity };
254
+ fd = -1;
255
+ return result;
256
+ }
257
+ catch (error) {
258
+ if (error instanceof RepositoryStoreError)
259
+ throw error;
260
+ throw objectStoreError("repository object file is invalid", error);
261
+ }
262
+ }, () => {
263
+ if (fd >= 0)
264
+ close(fd);
265
+ });
266
+ }
267
+ #assertRegularFile(parentFd, name, identity) {
268
+ const current = statAt(parentFd, name);
269
+ if (!isRegularFile(current) || !sameIdentity(current, identity)) {
270
+ throw objectStoreError("repository object file is invalid");
271
+ }
272
+ }
273
+ #finishRegularFile(parentFd, name, file) {
274
+ preserveOperationError(() => this.#assertRegularFile(parentFd, name, file.identity), () => close(file.fd));
275
+ }
276
+ #install(directory, name, data) {
277
+ let temporaryFd = -1;
278
+ let temporaryName;
279
+ let published = false;
280
+ preserveOperationError(() => {
281
+ for (let attempt = 0; attempt < 8; attempt += 1) {
282
+ temporaryName = `.install-${randomBytes(16).toString("hex")}`;
283
+ try {
284
+ temporaryFd = createFileExclusiveAt(directory.fd, temporaryName, PRIVATE_FILE_MODE);
285
+ break;
286
+ }
287
+ catch (error) {
288
+ if (!hasCode(error, "EEXIST"))
289
+ throw objectStoreError("repository object file is invalid", error);
290
+ }
291
+ }
292
+ if (temporaryFd < 0 || temporaryName === undefined)
293
+ throw objectStoreError("repository object file is invalid");
294
+ fchmod(temporaryFd, PRIVATE_FILE_MODE);
295
+ let offset = 0;
296
+ while (offset < data.byteLength)
297
+ offset += writeSync(temporaryFd, data, offset, data.byteLength - offset);
298
+ fsync(temporaryFd);
299
+ close(temporaryFd);
300
+ temporaryFd = -1;
301
+ this.#assertDirectory(directory);
302
+ renameReplaceAt(directory.fd, temporaryName, directory.fd, name);
303
+ published = true;
304
+ fsync(directory.fd);
305
+ const installed = this.#openRegularFile(directory.fd, name);
306
+ if (installed === undefined)
307
+ throw objectStoreError("repository object file is invalid");
308
+ preserveOperationError(() => undefined, () => this.#finishRegularFile(directory.fd, name, installed));
309
+ }, () => {
310
+ let cleanupError;
311
+ if (temporaryFd >= 0) {
312
+ try {
313
+ close(temporaryFd);
314
+ }
315
+ catch (error) {
316
+ cleanupError ??= error;
317
+ }
318
+ }
319
+ if (!published && temporaryName !== undefined) {
320
+ try {
321
+ unlinkAt(directory.fd, temporaryName);
322
+ fsync(directory.fd);
323
+ }
324
+ catch (error) {
325
+ if (!hasCode(error, "ENOENT"))
326
+ cleanupError ??= error;
327
+ }
328
+ }
329
+ if (cleanupError !== undefined)
330
+ throw cleanupError;
331
+ });
332
+ }
333
+ #deleteFile(directory, name) {
334
+ const file = this.#openRegularFile(directory.fd, name);
335
+ if (file === undefined)
336
+ return;
337
+ preserveOperationError(() => {
338
+ this.#assertRegularFile(directory.fd, name, file.identity);
339
+ unlinkAt(directory.fd, name);
340
+ fsync(directory.fd);
341
+ }, () => close(file.fd));
342
+ }
343
+ #listDigests(directory) {
344
+ this.#repairDirectoryChildren(directory);
345
+ const names = readdirSync(join(this.#state.statePath, "objects", "sha256"));
346
+ this.#assertDirectory(directory);
347
+ return names.filter((name) => /^[0-9a-f]{64}$/.test(name)).flatMap((name) => {
348
+ const file = this.#openRegularFile(directory.fd, name);
349
+ if (file === undefined)
350
+ return [];
351
+ return preserveOperationError(() => [`sha256:${name}`], () => this.#finishRegularFile(directory.fd, name, file));
352
+ }).sort();
353
+ }
354
+ #repairDirectoryChildren(directory) {
355
+ const path = directory.name === "sha256"
356
+ ? join(this.#state.statePath, "objects", "sha256")
357
+ : join(this.#state.statePath, "objects", ".gc-candidates");
358
+ for (const name of readdirSync(path)) {
359
+ const entry = statAt(directory.fd, name);
360
+ if ((entry.mode & FILE_TYPE_MASK) === 0o120000) {
361
+ throw objectStoreError("repository object file cannot be a symbolic link");
362
+ }
363
+ if (isRegularFile(entry)) {
364
+ const file = this.#openRegularFile(directory.fd, name);
365
+ if (file !== undefined) {
366
+ preserveOperationError(() => undefined, () => this.#finishRegularFile(directory.fd, name, file));
367
+ }
368
+ }
369
+ }
370
+ this.#assertDirectory(directory);
371
+ }
372
+ #markerIsExpired(directory, name, cutoff) {
373
+ const file = this.#openRegularFile(directory.fd, name);
374
+ if (file === undefined)
375
+ return false;
376
+ return preserveOperationError(() => fstatSync(file.fd).mtimeMs <= cutoff, () => this.#finishRegularFile(directory.fd, name, file));
377
+ }
378
+ #touchMarker(directory, name, now) {
379
+ const existing = this.#openRegularFile(directory.fd, name);
380
+ if (existing !== undefined) {
381
+ preserveOperationError(() => undefined, () => this.#finishRegularFile(directory.fd, name, existing));
382
+ return;
383
+ }
384
+ let fd = -1;
385
+ preserveOperationError(() => {
386
+ try {
387
+ fd = createFileExclusiveAt(directory.fd, name, PRIVATE_FILE_MODE);
388
+ }
389
+ catch (error) {
390
+ if (hasCode(error, "EEXIST")) {
391
+ this.#touchMarker(directory, name, now);
392
+ return;
393
+ }
394
+ throw objectStoreError("repository object file is invalid", error);
395
+ }
396
+ fchmod(fd, PRIVATE_FILE_MODE);
397
+ const identity = fstat(fd);
398
+ if (!isRegularFile(identity))
399
+ throw objectStoreError("repository object file is invalid");
400
+ this.#assertRegularFile(directory.fd, name, identity);
401
+ futimesSync(fd, now, now);
402
+ fsync(fd);
403
+ fsync(directory.fd);
404
+ }, () => {
405
+ if (fd >= 0)
406
+ close(fd);
407
+ });
408
+ }
409
+ }
410
+ //# sourceMappingURL=objects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objects.js","sourceRoot":"","sources":["../../../src/local/store/objects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACvF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EACL,KAAK,EACL,qBAAqB,EACrB,MAAM,EACN,KAAK,EACL,KAAK,EACL,OAAO,EACP,eAAe,EACf,eAAe,EACf,MAAM,EACN,QAAQ,EAER,UAAU,GACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,cAAc,GAAG,QAAQ,CAAC;AAChC,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AACnC,MAAM,cAAc,GAAG,QAAQ,CAAC;AAChC,MAAM,sBAAsB,GAAG,KAAK,CAAC;AACrC,MAAM,iBAAiB,GAAG,KAAK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AC;YACpE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC;oBAC7B,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;oBACxC,OAAO;gBACT,CAAC;gBACD,MAAM,gBAAgB,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAC;YACrE,CAAC;YACD,MAAM,CAAC,EAAE,EAAE,iBAAiB,CAAC,CAAC;YAC9B,MAAM,QAAQ,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC;YAC3B,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC;gBAAE,MAAM,gBAAgB,CAAC,mCAAmC,CAAC,CAAC;YAC1F,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;YACtD,WAAW,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;YAC1B,KAAK,CAAC,EAAE,CAAC,CAAC;YACV,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACtB,CAAC,EACD,GAAG,EAAE;YACH,IAAI,EAAE,IAAI,CAAC;gBAAE,KAAK,CAAC,EAAE,CAAC,CAAC;QACzB,CAAC,CACF,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,77 @@
1
+ import { canonicalBytes } from "../../domain/models/encoding.js";
2
+ import { RepositoryStoreError } from "../sqlite/errors.js";
3
+ import { getRow } from "../sqlite/rows.js";
4
+ import { applyArtifact } from "./artifacts.js";
5
+ import { applyNodeCreate, applyNodeFieldSet, applyNodeLifecycle, applyNodePurge } from "./nodes.js";
6
+ import { applyContainment, applyEdge, applyLineage } from "./relations.js";
7
+ import { applyTag, applyTagAssignment } from "./tags.js";
8
+ function latestValue(latestValues, ownerType, ownerId, field) {
9
+ const value = latestValues.get(canonicalBytes([ownerType, ownerId, field]).toString("utf8"));
10
+ if (!value)
11
+ throw new RepositoryStoreError("projection latest value is missing");
12
+ return value;
13
+ }
14
+ function applyImportedBaseline(database, commit) {
15
+ const row = getRow(database.prepare("SELECT COUNT(*) AS count FROM repository_operations WHERE repository_id = ?", { readBigInts: true }), commit.repositoryId);
16
+ if (commit.expectedHead !== null || !row || row.count !== 1n) {
17
+ throw new RepositoryStoreError("imported baseline history is not empty");
18
+ }
19
+ }
20
+ export function applyProjection(database, commit, operation, latestValues) {
21
+ switch (operation.type) {
22
+ case "node.create.v1":
23
+ applyNodeCreate(database, commit, operation);
24
+ return;
25
+ case "node.field.set.v1": {
26
+ const nodeId = operation.payload.node_id;
27
+ const field = operation.payload.field;
28
+ if (typeof nodeId !== "string" || typeof field !== "string")
29
+ throw new RepositoryStoreError("invalid node field operation");
30
+ applyNodeFieldSet(database, commit, operation, latestValue(latestValues, "node", nodeId, field));
31
+ return;
32
+ }
33
+ case "node.tombstone.v1":
34
+ case "node.restore.v1":
35
+ applyNodeLifecycle(database, commit, operation);
36
+ return;
37
+ case "node.purge.v1":
38
+ applyNodePurge(database, commit, operation);
39
+ return;
40
+ case "tag.define.v1":
41
+ case "tag.update.v1":
42
+ case "tag.retire.v1":
43
+ applyTag(database, commit, operation);
44
+ return;
45
+ case "node.tag.assign.v1":
46
+ case "node.tag.remove.v1":
47
+ applyTagAssignment(database, commit, operation);
48
+ return;
49
+ case "lineage.add.v1":
50
+ case "lineage.remove.v1":
51
+ applyLineage(database, commit, operation);
52
+ return;
53
+ case "containment.assign.v1":
54
+ case "containment.remove.v1":
55
+ applyContainment(database, commit, operation);
56
+ return;
57
+ case "edge.add.v1":
58
+ case "edge.field.set.v1":
59
+ case "edge.remove.v1":
60
+ applyEdge(database, commit, operation, latestValues);
61
+ return;
62
+ case "artifact.attach.v1":
63
+ case "artifact.attach.v2":
64
+ case "artifact.detach.v1":
65
+ case "artifact.metadata.set.v1":
66
+ case "artifact.properties.set.v1":
67
+ case "artifact.content.set.v1":
68
+ applyArtifact(database, commit, operation, latestValues);
69
+ return;
70
+ case "imported_baseline.v1":
71
+ applyImportedBaseline(database, commit);
72
+ return;
73
+ default:
74
+ throw new RepositoryStoreError("unsupported repository operation projection");
75
+ }
76
+ }
77
+ //# sourceMappingURL=apply.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply.js","sourceRoot":"","sources":["../../../../src/local/store/projection/apply.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAIjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEzD,SAAS,WAAW,CACnB,YAAmD,EACnD,SAAuC,EACvC,OAAe,EACf,KAAa;IAEb,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7F,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,oBAAoB,CAAC,oCAAoC,CAAC,CAAC;IACjF,OAAO,KAAK,CAAC;AACd,CAAC;AAED,SAAS,qBAAqB,CAAC,QAAsB,EAAE,MAAwB;IAC9E,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,6EAA6E,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IAChK,IAAI,MAAM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