@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
@@ -1,18 +1,19 @@
1
- import { readFile } from 'node:fs/promises';
2
- import { CliUsageError } from '../errors.js';
3
- import { baseUrlsEqual } from './baseurl.js';
4
- import { BUILTIN_PROFILES, BUILTIN_PROFILE_NAMES, } from './profiles.js';
1
+ import { CliUsageError } from "../errors.js";
2
+ import { loadFlywheelConfig } from "../config/index.js";
3
+ import { setCredential } from "./credentials.js";
4
+ import { baseUrlsEqual } from "./baseurl.js";
5
+ import { BUILTIN_PROFILES, BUILTIN_PROFILE_NAMES, } from "./profiles.js";
5
6
  function extractStatusError(error) {
6
- if (typeof error !== 'object' || error === null)
7
+ if (typeof error !== "object" || error === null)
7
8
  return null;
8
9
  const candidate = error;
9
- if (typeof candidate.status === 'number')
10
+ if (typeof candidate.status === "number")
10
11
  return candidate;
11
12
  return null;
12
13
  }
13
14
  function extractErrorBody(statusError) {
14
15
  const raw = statusError.body ?? statusError.errorBody;
15
- if (raw && typeof raw === 'object') {
16
+ if (raw && typeof raw === "object") {
16
17
  return raw;
17
18
  }
18
19
  return null;
@@ -22,7 +23,7 @@ function normalizePollInterval(raw) {
22
23
  // instead of letting them poison the sleep call. The server contract
23
24
  // is a positive integer-seconds value; anything else is a buggy
24
25
  // response and the CLI should keep its last good interval.
25
- if (typeof raw !== 'number')
26
+ if (typeof raw !== "number")
26
27
  return null;
27
28
  if (!Number.isFinite(raw) || raw <= 0)
28
29
  return null;
@@ -39,8 +40,9 @@ function extractPollIntervalSeconds(error) {
39
40
  if (topLevel !== null)
40
41
  return topLevel;
41
42
  const detail = body.detail;
42
- if (detail && typeof detail === 'object') {
43
- const nested = detail.poll_interval_seconds;
43
+ if (detail && typeof detail === "object") {
44
+ const nested = detail
45
+ .poll_interval_seconds;
44
46
  return normalizePollInterval(nested);
45
47
  }
46
48
  return null;
@@ -55,13 +57,13 @@ function extractDeviceFlowError(error) {
55
57
  // Server may wrap the OAuth-style payload under FastAPI's `detail` key or
56
58
  // place it at the top level. Check both so the CLI reads the same error
57
59
  // code either way.
58
- const topLevel = typeof body.error === 'string' ? body.error : null;
60
+ const topLevel = typeof body.error === "string" ? body.error : null;
59
61
  if (topLevel)
60
62
  return topLevel;
61
63
  const detail = body.detail;
62
- if (detail && typeof detail === 'object') {
64
+ if (detail && typeof detail === "object") {
63
65
  const nested = detail.error;
64
- if (typeof nested === 'string')
66
+ if (typeof nested === "string")
65
67
  return nested;
66
68
  }
67
69
  return null;
@@ -70,7 +72,7 @@ function defaultOpenBrowser(url) {
70
72
  // Dynamic import keeps the "open" side-effect out of unit tests that inject
71
73
  // their own openBrowser hook. The native shell-out is only invoked in real
72
74
  // CLI runs.
73
- return import('open').then(async (mod) => {
75
+ return import("open").then(async (mod) => {
74
76
  await mod.default(url);
75
77
  });
76
78
  }
@@ -98,42 +100,9 @@ function deriveVerificationBaseUrl(baseUrl) {
98
100
  return null;
99
101
  }
100
102
  }
101
- // FLY-416 CFG-WIPE: helpers to read the current activeProfile pointer and
102
- // the existing per-profile key map from config.json without going through
103
- // the AuthConfig-shaped loader (which normalises/drops fields we want to
104
- // merge untouched).
105
- async function readRawConfig(configPath) {
106
- try {
107
- const raw = await readFile(configPath, 'utf8');
108
- const parsed = JSON.parse(raw);
109
- if (parsed && typeof parsed === 'object') {
110
- return parsed;
111
- }
112
- }
113
- catch {
114
- // missing or malformed — callers fall back to legacy path
115
- }
116
- return {};
117
- }
118
- async function readExistingProfileKeys(configPath) {
119
- const raw = await readRawConfig(configPath);
120
- const candidate = raw.profileKeys;
121
- if (!candidate || typeof candidate !== 'object')
122
- return {};
123
- const normalized = {};
124
- for (const [name, value] of Object.entries(candidate)) {
125
- if (value && typeof value === 'object') {
126
- const entry = value;
127
- if (typeof entry.apiKey === 'string') {
128
- normalized[name] = { apiKey: entry.apiKey };
129
- }
130
- }
131
- }
132
- return normalized;
133
- }
134
103
  function readOptionalInt(params, key) {
135
104
  const value = params[key];
136
- if (typeof value !== 'string')
105
+ if (typeof value !== "string")
137
106
  return undefined;
138
107
  const trimmed = value.trim();
139
108
  if (!trimmed)
@@ -149,57 +118,57 @@ function readOptionalInt(params, key) {
149
118
  }
150
119
  function readOptionalString(params, key) {
151
120
  const value = params[key];
152
- if (typeof value !== 'string')
121
+ if (typeof value !== "string")
153
122
  return undefined;
154
123
  const trimmed = value.trim();
155
124
  return trimmed ? trimmed : undefined;
156
125
  }
157
126
  function readFlag(params, key) {
158
127
  const value = params[key];
159
- return value === true || value === 'true';
128
+ return value === true || value === "true";
160
129
  }
161
130
  export function formatDenyStdout() {
162
131
  return [
163
- '',
164
- ' ✖ Authorization denied.',
165
- '',
166
- ' Your identity is not on the Flywheel access allowlist.',
167
- ' If you believe this is an error, contact Paradigma support.',
168
- '',
169
- ].join('\n');
132
+ "",
133
+ " ✖ Authorization denied.",
134
+ "",
135
+ " Your identity is not on the Flywheel access allowlist.",
136
+ " If you believe this is an error, contact Paradigma support.",
137
+ "",
138
+ ].join("\n");
170
139
  }
171
140
  function formatStartPromptInteractive(start) {
172
- return [
173
- '',
141
+ return ([
142
+ "",
174
143
  ` One-time code: ${start.user_code}`,
175
- '',
144
+ "",
176
145
  ` Opening ${start.verification_uri} in your browser`,
177
- ' (or visit the URL manually and enter the code above).',
178
- '',
179
- ' Waiting for authorization...',
180
- ].join('\n') + '\n';
146
+ " (or visit the URL manually and enter the code above).",
147
+ "",
148
+ " Waiting for authorization...",
149
+ ].join("\n") + "\n");
181
150
  }
182
151
  function formatStartPromptHeadless(start) {
183
- return [
184
- '',
152
+ return ([
153
+ "",
185
154
  ` One-time code: ${start.user_code}`,
186
- '',
187
- ' On another device, visit:',
155
+ "",
156
+ " On another device, visit:",
188
157
  ` ${start.verification_uri}`,
189
- '',
190
- ' and enter the code above.',
191
- '',
158
+ "",
159
+ " and enter the code above.",
160
+ "",
192
161
  ` Waiting for authorization (expires in ${Math.round(start.expires_in_seconds / 60)}m)...`,
193
- ].join('\n') + '\n';
162
+ ].join("\n") + "\n");
194
163
  }
195
164
  export async function runAuthLogin(args) {
196
165
  const openBrowser = args.openBrowser ?? defaultOpenBrowser;
197
166
  const sleep = args.sleep ?? defaultSleep;
198
167
  const now = args.now ?? defaultNow;
199
168
  const write = args.writeStdout ?? ((chunk) => process.stdout.write(chunk));
200
- const noBrowser = readFlag(args.params, 'no-browser');
201
- const name = readOptionalString(args.params, 'name');
202
- const expiryDays = readOptionalInt(args.params, 'expiry_days');
169
+ const noBrowser = readFlag(args.params, "no-browser");
170
+ const name = readOptionalString(args.params, "name");
171
+ const expiryDays = readOptionalInt(args.params, "expiry_days");
203
172
  const startBody = {};
204
173
  if (name)
205
174
  startBody.name = name;
@@ -218,7 +187,7 @@ export async function runAuthLogin(args) {
218
187
  }
219
188
  let start;
220
189
  try {
221
- start = await args.requestJson('POST', '/auth/mcp-api-keys/setup-device/start', { body: startBody });
190
+ start = await args.requestJson("POST", "/auth/mcp-api-keys/setup-device/start", { body: startBody });
222
191
  }
223
192
  catch (error) {
224
193
  // /setup-device/start does NOT carry the staging allowlist gate — that
@@ -228,9 +197,9 @@ export async function runAuthLogin(args) {
228
197
  // rather than HTTP status so capacity reaches the user as a capacity
229
198
  // error and other 403s are not silently rebranded as staging deny.
230
199
  const deviceFlowError = extractDeviceFlowError(error);
231
- if (deviceFlowError === 'capacity_reached') {
232
- throw new Error('Flywheel capacity reached. Please try `flywheel auth:login` again ' +
233
- 'in a few minutes.', { cause: error });
200
+ if (deviceFlowError === "capacity_reached") {
201
+ throw new Error("Flywheel capacity reached. Please try `flywheel auth:login` again " +
202
+ "in a few minutes.", { cause: error });
234
203
  }
235
204
  throw error;
236
205
  }
@@ -256,25 +225,27 @@ export async function runAuthLogin(args) {
256
225
  // mandated backoff.
257
226
  let slowDownFloorSeconds = 0;
258
227
  for (;;) {
259
- if ((now() / 1000) - startedAtSeconds >= start.expires_in_seconds) {
260
- write(' ✖ Device code expired before authorization was received.\n');
261
- write(' Run `flywheel auth:login` again to start a new flow.\n');
228
+ if (now() / 1000 - startedAtSeconds >= start.expires_in_seconds) {
229
+ write(" ✖ Device code expired before authorization was received.\n");
230
+ write(" Run `flywheel auth:login` again to start a new flow.\n");
262
231
  return { key_id: null, exit_code: 1 };
263
232
  }
264
233
  await sleep(pollIntervalSeconds);
265
234
  let poll;
266
235
  try {
267
- poll = await args.requestJson('POST', '/auth/mcp-api-keys/setup-device/poll', { body: { user_code: start.user_code, device_code: start.device_code } });
236
+ poll = await args.requestJson("POST", "/auth/mcp-api-keys/setup-device/poll", {
237
+ body: { user_code: start.user_code, device_code: start.device_code },
238
+ });
268
239
  }
269
240
  catch (error) {
270
241
  const deviceFlowError = extractDeviceFlowError(error);
271
- if (deviceFlowError === 'slow_down') {
242
+ if (deviceFlowError === "slow_down") {
272
243
  pollIntervalSeconds += 5;
273
244
  slowDownFloorSeconds = pollIntervalSeconds;
274
245
  write(` (poll interval increased to ${pollIntervalSeconds}s per server request)\n`);
275
246
  continue;
276
247
  }
277
- if (deviceFlowError === 'authorization_pending') {
248
+ if (deviceFlowError === "authorization_pending") {
278
249
  // The server can ride an updated `poll_interval_seconds` along
279
250
  // with the pending signal (dynamic throttling, runtime config
280
251
  // change). Honour it so the CLI doesn't keep polling too
@@ -286,22 +257,22 @@ export async function runAuthLogin(args) {
286
257
  }
287
258
  continue;
288
259
  }
289
- if (deviceFlowError === 'expired_token') {
290
- write(' ✖ Device code expired before authorization was received.\n');
291
- write(' Run `flywheel auth:login` again to start a new flow.\n');
260
+ if (deviceFlowError === "expired_token") {
261
+ write(" ✖ Device code expired before authorization was received.\n");
262
+ write(" Run `flywheel auth:login` again to start a new flow.\n");
292
263
  return { key_id: null, exit_code: 1 };
293
264
  }
294
265
  // RFC 8628 §3.5 access_denied: the authorization request was denied
295
266
  // (e.g. a staging-allowlist rejection at /approve). The server
296
267
  // surfaces this via /poll so the CLI can stop polling immediately
297
268
  // instead of waiting for `expires_in` to elapse.
298
- if (deviceFlowError === 'access_denied') {
269
+ if (deviceFlowError === "access_denied") {
299
270
  write(formatDenyStdout());
300
271
  return { key_id: null, exit_code: 3 };
301
272
  }
302
- if (deviceFlowError === 'capacity_reached') {
303
- throw new Error('Flywheel capacity reached. Please try `flywheel auth:login` ' +
304
- 'again in a few minutes.', { cause: error });
273
+ if (deviceFlowError === "capacity_reached") {
274
+ throw new Error("Flywheel capacity reached. Please try `flywheel auth:login` " +
275
+ "again in a few minutes.", { cause: error });
305
276
  }
306
277
  // Server returns 404 when the session row is missing — most
307
278
  // commonly because `expires_at` has just elapsed (the SELECT
@@ -312,13 +283,13 @@ export async function runAuthLogin(args) {
312
283
  // code 1, instead of a misleading transport error and exit 2.
313
284
  const statusError = extractStatusError(error);
314
285
  if (statusError?.status === 404) {
315
- write(' ✖ Device code expired before authorization was received.\n');
316
- write(' Run `flywheel auth:login` again to start a new flow.\n');
286
+ write(" ✖ Device code expired before authorization was received.\n");
287
+ write(" Run `flywheel auth:login` again to start a new flow.\n");
317
288
  return { key_id: null, exit_code: 1 };
318
289
  }
319
290
  throw error;
320
291
  }
321
- if (poll.status === 'pending') {
292
+ if (poll.status === "pending") {
322
293
  // Same contract as the `authorization_pending` error variant above:
323
294
  // if the server advertises a new interval, pick it up so this loop
324
295
  // paces itself as the server instructed on every pending response,
@@ -330,53 +301,33 @@ export async function runAuthLogin(args) {
330
301
  }
331
302
  continue;
332
303
  }
333
- if (poll.status === 'approved') {
334
- // The minted key is scoped to the origin it was issued against.
335
- // Routing therefore depends on `args.baseUrl`, NOT on which
336
- // profile happens to be active: `auth:login --env=staging` while
337
- // `activeProfile=prod` still mints a staging-scoped key and must
338
- // populate `profileKeys.staging` (not the flat fields), otherwise
339
- // the next `env:switch --name staging` resolves to whatever
340
- // `profileKeys.staging` previously held (stale key) and the
341
- // login "silently succeeds" while commands keep failing auth.
342
- //
343
- // Algorithm: if `args.baseUrl` is canonically equal to any
344
- // built-in profile's baseUrl, write into `profileKeys[that
345
- // built-in]`. Otherwise (local dev, ad-hoc origin, custom TOML
346
- // profile), fall through to the legacy flat `{baseUrl, apiKey}`
347
- // shape so the key records its actual origin.
348
- let targetBuiltin = null;
349
- for (const name of BUILTIN_PROFILE_NAMES) {
350
- if (baseUrlsEqual(BUILTIN_PROFILES[name].baseUrl, args.baseUrl)) {
351
- targetBuiltin = name;
352
- break;
353
- }
354
- }
355
- if (targetBuiltin !== null) {
356
- const existing = await readExistingProfileKeys(args.configPath);
357
- const updated = {
358
- ...existing,
359
- [targetBuiltin]: { apiKey: poll.key },
304
+ if (poll.status === "approved") {
305
+ const config = await (args.loadConfig ??
306
+ ((filePath) => loadFlywheelConfig({
307
+ env: { ...process.env, FLYWHEEL_CLI_CONFIG_PATH: filePath },
308
+ credentialFile: args.credentialFile,
309
+ })))(args.configPath);
310
+ await setCredential(args.profileName, args.baseUrl, poll.key, args.credentialFile);
311
+ config.activeProfile = args.profileName;
312
+ if (!BUILTIN_PROFILE_NAMES.some((name) => baseUrlsEqual(BUILTIN_PROFILES[name].baseUrl, args.baseUrl))) {
313
+ config.profiles = {
314
+ ...config.profiles,
315
+ [args.profileName]: {
316
+ ...config.profiles?.[args.profileName],
317
+ baseUrl: args.baseUrl,
318
+ },
360
319
  };
361
- // Built-in baseUrls are runtime constants (never serialised
362
- // into config.json) and the flat `apiKey` has no meaning under
363
- // an active built-in profile. Writing a delta with only
364
- // `profileKeys` preserves that invariant without passing
365
- // `undefined` through a type cast that would break injected
366
- // `saveConfig` implementations relying on the declared
367
- // `AuthConfig` field types.
368
- await args.saveConfig(args.configPath, {
369
- profileKeys: updated,
370
- });
371
320
  }
372
- else {
373
- await args.saveConfig(args.configPath, {
374
- baseUrl: args.baseUrl,
375
- apiKey: poll.key,
376
- });
321
+ try {
322
+ await args.saveConfig(args.configPath, config);
323
+ }
324
+ catch (error) {
325
+ write(` ! API key was saved for profile ${args.profileName}, but configuration could not be saved. ` +
326
+ "Retry the configuration update; the saved credential was retained.\n");
327
+ throw error;
377
328
  }
378
- write(' ✓ Authorization received.\n');
379
- write(` ✓ API key saved to ${args.configPath}\n`);
329
+ write(" ✓ Authorization received.\n");
330
+ write(` ✓ API key saved for profile ${args.profileName}\n`);
380
331
  return { key_id: poll.key_id, exit_code: 0 };
381
332
  }
382
333
  }
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/auth/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAChB,qBAAqB,GAEtB,MAAM,eAAe,CAAC;AA6CvB,SAAS,kBAAkB,CAAC,KAAc;IACxC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC7D,MAAM,SAAS,GAAG,KAAsB,CAAC;IACzC,IAAI,OAAO,SAAS,CAAC,MA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E,CAAC;gBACH,MAAM,CAAC,QAAQ,GAAG;oBACjB,GAAG,MAAM,CAAC,QAAQ;oBAClB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;wBACnB,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC;wBACtC,OAAO,EAAE,IAAI,CAAC,OAAO;qBACrB;iBACD,CAAC;YACH,CAAC;YACD,IAAI,CAAC;gBACJ,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;YAChD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,KAAK,CACJ,qCAAqC,IAAI,CAAC,WAAW,0CAA0C;oBAC/F,sEAAsE,CACtE,CAAC;gBACF,MAAM,KAAK,CAAC;YACb,CAAC;YACD,KAAK,CAAC,+BAA+B,CAAC,CAAC;YACvC,KAAK,CAAC,iCAAiC,IAAI,CAAC,WAAW,IAAI,CAAC,CAAC;YAC7D,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;QAC9C,CAAC;IACF,CAAC;AACF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Built-in CLI profiles. Values here are the runtime source of truth for
3
3
  * prod/staging baseUrls — per the CLI's auth contract they are NEVER
4
- * written into the user's config.json. That way upstream URL changes flow
4
+ * written into the user's config.toml. That way upstream URL changes flow
5
5
  * through to every installed CLI without a config migration.
6
6
  *
7
7
  * NOTE on the `/api` suffix: the CLI targets the JSON API root, which
@@ -1 +1 @@
1
- {"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/auth/profiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,MAAM,CAAC,MAAM,gBAAgB,GAGzB;IACF,IAAI,EAAE,EAAE,OAAO,EAAE,oCAAoC,EAAE;IACvD,OAAO,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE,MAAM,EAAE,IAAI,EAAE;CACjF,CAAC;AAIF,MAAM,CAAC,MAAM,qBAAqB,GAAkC,MAAM,CAAC,MAAM,CAC/E,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAyB,CACtD,CAAC;AAEF,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AACjF,CAAC"}
1
+ {"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/auth/profiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,MAAM,CAAC,MAAM,gBAAgB,GAGzB;IACH,IAAI,EAAE,EAAE,OAAO,EAAE,oCAAoC,EAAE;IACvD,OAAO,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE,MAAM,EAAE,IAAI,EAAE;CAChF,CAAC;AAIF,MAAM,CAAC,MAAM,qBAAqB,GAAkC,MAAM,CAAC,MAAM,CAChF,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAyB,CACrD,CAAC;AAEF,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAChD,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,IAAY;IACjD,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AAChF,CAAC"}
@@ -0,0 +1,116 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import { chmod, lstat, mkdir, open, rename, stat, unlink, writeFile } from "node:fs/promises";
3
+ import path from "node:path";
4
+ const FS = { chmod, lstat, mkdir, open, rename, stat, unlink, writeFile };
5
+ export async function secureFileMode(filePath, fs = FS, platform = process.platform) {
6
+ const targetStat = await fs.stat(filePath);
7
+ if (!targetStat.isFile()) {
8
+ throw new Error(`Credential path is not a regular file: ${filePath}`);
9
+ }
10
+ await fs.chmod(filePath, 0o600);
11
+ // Windows relies on the user-profile ACL; POSIX modes do not describe its access model.
12
+ if (platform === "win32")
13
+ return;
14
+ const fileStat = await fs.stat(filePath);
15
+ if ((fileStat.mode & 0o077) !== 0) {
16
+ throw new Error(`Credential file remains readable by group or others: ${filePath}`);
17
+ }
18
+ }
19
+ export async function writeSecureFile(filePath, contents, fs = FS, platform = process.platform, { atomic = false, preparePrivatePath, beforeRename } = {}) {
20
+ if (atomic) {
21
+ await writeAtomicPrivateFile(filePath, contents, fs, platform, {
22
+ preparePrivatePath,
23
+ beforeRename,
24
+ });
25
+ return;
26
+ }
27
+ await fs.mkdir(path.dirname(filePath), { recursive: true });
28
+ try {
29
+ await secureFileMode(filePath, fs, platform);
30
+ }
31
+ catch (error) {
32
+ if (errorCode(error) !== "ENOENT")
33
+ throw error;
34
+ }
35
+ await fs.writeFile(filePath, contents, { encoding: "utf8", mode: 0o600 });
36
+ await secureFileMode(filePath, fs, platform);
37
+ }
38
+ export async function preparePrivateConfigPath(filePath, fs = FS, platform = process.platform) {
39
+ const directory = path.dirname(filePath);
40
+ await fs.mkdir(directory, { recursive: true, mode: 0o700 });
41
+ const parent = await fs.lstat(directory);
42
+ const uid = process.getuid?.();
43
+ if (!parent.isDirectory() || parent.isSymbolicLink() ||
44
+ (uid !== undefined && parent.uid !== uid)) {
45
+ throw new Error("Private credential directory must be a directory owned by the current user, not a symlink.");
46
+ }
47
+ await fs.chmod(directory, 0o700);
48
+ if (platform !== "win32" && ((await fs.lstat(directory)).mode & 0o777) !== 0o700) {
49
+ throw new Error("Private credential directory could not be secured.");
50
+ }
51
+ let target;
52
+ try {
53
+ target = await fs.lstat(filePath);
54
+ }
55
+ catch (error) {
56
+ if (errorCode(error) === "ENOENT")
57
+ return;
58
+ throw error;
59
+ }
60
+ if (!target.isFile() || target.isSymbolicLink() ||
61
+ (uid !== undefined && target.uid !== uid)) {
62
+ throw new Error("Private credential config must be a regular file owned by the current user, not a symlink.");
63
+ }
64
+ await secureFileMode(filePath, fs, platform);
65
+ }
66
+ function errorCode(error) {
67
+ if (error && typeof error === "object" && "code" in error && typeof error.code === "string") {
68
+ return error.code;
69
+ }
70
+ return undefined;
71
+ }
72
+ async function writeAtomicPrivateFile(filePath, contents, fs, platform, hooks) {
73
+ if (hooks.preparePrivatePath)
74
+ await hooks.preparePrivatePath();
75
+ else
76
+ await preparePrivateConfigPath(filePath, fs, platform);
77
+ const directory = path.dirname(filePath);
78
+ const temporary = path.join(directory, `.${path.basename(filePath)}.${process.pid}.${randomUUID()}.tmp`);
79
+ let created = false;
80
+ let committed = false;
81
+ try {
82
+ const handle = await fs.open(temporary, "wx", 0o600);
83
+ created = true;
84
+ try {
85
+ await handle.writeFile(contents, "utf8");
86
+ await handle.sync();
87
+ }
88
+ finally {
89
+ await handle.close();
90
+ }
91
+ if (hooks.beforeRename)
92
+ await hooks.beforeRename();
93
+ await fs.rename(temporary, filePath);
94
+ committed = true;
95
+ if (platform !== "win32") {
96
+ const parent = await fs.open(directory, "r");
97
+ try {
98
+ await parent.sync();
99
+ }
100
+ finally {
101
+ await parent.close();
102
+ }
103
+ }
104
+ }
105
+ catch (error) {
106
+ if (committed) {
107
+ throw Object.assign(new Error("Credential config commit is uncertain; the complete new file may be installed. Reconcile before retrying."), { code: "credential_commit_uncertain" });
108
+ }
109
+ if (created)
110
+ await fs.unlink(temporary);
111
+ if (errorCode(error)?.startsWith("credential_"))
112
+ throw error;
113
+ throw Object.assign(new Error("Private credential configuration write failed before replacement."), { code: "credential_write_failed" });
114
+ }
115
+ }
116
+ //# sourceMappingURL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