@paradigma-inc/flywheel 0.1.26 → 0.1.51

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 (566) hide show
  1. package/README.md +117 -60
  2. package/bin/flywheel.js +10 -3
  3. package/package.json +5 -1
  4. package/skills/flywheel/SKILL.md +13 -1
  5. package/skills/flywheel/campaigns/participating-in-a-campaign.md +2 -2
  6. package/skills/flywheel/compute/managed-compute.md +26 -7
  7. package/skills/flywheel/example-workflows/organizing-exploring-and-iterating-on-a-research-topic.md +11 -11
  8. package/skills/flywheel/example-workflows/reproducing-papers-on-a-budget.md +8 -8
  9. package/skills/flywheel/getting-started/flywheel-tutorial-overview.md +2 -1
  10. package/skills/flywheel/references/ARTIFACTS.md +48 -0
  11. package/skills/flywheel/references/INTERFACES.md +208 -0
  12. package/skills/flywheel/references/experiment-design-protocol.md +5 -5
  13. package/skills/flywheel/references/flywheel-cli-tool-map.md +244 -0
  14. package/skills/flywheel/references/flywheel-mcp-tool-map.md +109 -63
  15. package/skills/flywheel/setting-up-flywheel/claude-code-cli-installation.md +1 -1
  16. package/skills/flywheel/setting-up-flywheel/codex-cli-installation.md +1 -1
  17. package/skills/flywheel/setting-up-flywheel/how-can-i-get-an-authorized-client_id-for-the-oauth-flow.md +3 -3
  18. package/skills/flywheel/setting-up-flywheel/installation-overview.md +19 -4
  19. package/skills/flywheel/setting-up-flywheel/other-hosts-installation.md +1 -1
  20. package/skills/flywheel/usage-and-workflows/what-to-do-with-flywheel.md +28 -1
  21. package/skills/flywheel/web-ui/the-flywheel-web-ui.md +1 -1
  22. package/skills/flywheel-auto/SKILL.md +23 -12
  23. package/skills/flywheel-auto/references/ARTIFACTS.md +1 -1
  24. package/skills/flywheel-auto/references/INTERFACES.md +61 -59
  25. package/skills/flywheel-auto/references/experiment-design-protocol.md +5 -5
  26. package/skills/flywheel-auto/references/flywheel-cli-tool-map.md +244 -0
  27. package/skills/flywheel-auto/references/flywheel-mcp-tool-map.md +76 -63
  28. package/skills/flywheel-lookahead/SKILL.md +22 -11
  29. package/skills/flywheel-lookahead/references/ARTIFACTS.md +1 -1
  30. package/skills/flywheel-lookahead/references/INTERFACES.md +61 -59
  31. package/skills/flywheel-lookahead/references/flywheel-cli-tool-map.md +244 -0
  32. package/skills/flywheel-lookahead/references/flywheel-mcp-tool-map.md +76 -63
  33. package/skills/flywheel-prove/SKILL.md +17 -0
  34. package/skills/flywheel-reproduce/SKILL.md +23 -12
  35. package/skills/flywheel-reproduce/references/ARTIFACTS.md +1 -1
  36. package/skills/flywheel-reproduce/references/INTERFACES.md +61 -59
  37. package/skills/flywheel-reproduce/references/experiment-design-protocol.md +5 -5
  38. package/skills/flywheel-reproduce/references/flywheel-cli-tool-map.md +244 -0
  39. package/skills/flywheel-reproduce/references/flywheel-mcp-tool-map.md +76 -63
  40. package/skills/flywheel-to-graph/SKILL.md +20 -9
  41. package/skills/flywheel-to-graph/references/ARTIFACTS.md +1 -1
  42. package/skills/flywheel-to-graph/references/INTERFACES.md +61 -59
  43. package/skills/flywheel-to-graph/references/flywheel-cli-tool-map.md +244 -0
  44. package/skills/flywheel-to-graph/references/flywheel-mcp-tool-map.md +76 -63
  45. package/skills/flywheel-tree/SKILL.md +70 -0
  46. package/skills/flywheel-tree/agents/interface.yaml +4 -0
  47. package/skills/flywheel-tree/assets/ansi_palette.json +29 -0
  48. package/skills/flywheel-tree/references/workflow.md +108 -0
  49. package/skills/flywheel-tree/scripts/render_tree.py +407 -0
  50. package/skills/flywheel-tree/scripts/render_tree_via_mcp.py +694 -0
  51. package/src/cli.mjs +204 -582
  52. package/src/mcp-writer.mjs +2 -2
  53. package/src/runtime/delegate.mjs +21 -0
  54. package/src/runtime/required-runtime-commands.json +117 -0
  55. package/src/runtime/runtime-config.mjs +84 -0
  56. package/src/runtime/vendor/.gitkeep +1 -0
  57. package/src/runtime/vendor/flywheel-cli-dist/auth/active-key-id.d.ts +1 -0
  58. package/src/runtime/vendor/flywheel-cli-dist/auth/active-key-id.js +22 -0
  59. package/src/runtime/vendor/flywheel-cli-dist/auth/active-key-id.js.map +1 -0
  60. package/src/runtime/vendor/flywheel-cli-dist/auth/baseurl.d.ts +35 -0
  61. package/src/runtime/vendor/flywheel-cli-dist/auth/baseurl.js +64 -0
  62. package/src/runtime/vendor/flywheel-cli-dist/auth/baseurl.js.map +1 -0
  63. package/src/runtime/vendor/flywheel-cli-dist/auth/config.d.ts +34 -0
  64. package/src/runtime/vendor/flywheel-cli-dist/auth/config.js +92 -0
  65. package/src/runtime/vendor/flywheel-cli-dist/auth/config.js.map +1 -0
  66. package/src/runtime/vendor/flywheel-cli-dist/auth/fingerprint.d.ts +5 -0
  67. package/src/runtime/vendor/flywheel-cli-dist/auth/fingerprint.js +12 -0
  68. package/src/runtime/vendor/flywheel-cli-dist/auth/fingerprint.js.map +1 -0
  69. package/src/runtime/vendor/flywheel-cli-dist/auth/keychain.d.ts +4 -0
  70. package/src/runtime/vendor/flywheel-cli-dist/auth/keychain.js +31 -0
  71. package/src/runtime/vendor/flywheel-cli-dist/auth/keychain.js.map +1 -0
  72. package/src/runtime/vendor/flywheel-cli-dist/auth/login.d.ts +23 -0
  73. package/src/runtime/vendor/flywheel-cli-dist/auth/login.js +387 -0
  74. package/src/runtime/vendor/flywheel-cli-dist/auth/login.js.map +1 -0
  75. package/src/runtime/vendor/flywheel-cli-dist/auth/profile.d.ts +15 -0
  76. package/src/runtime/vendor/flywheel-cli-dist/auth/profile.js +150 -0
  77. package/src/runtime/vendor/flywheel-cli-dist/auth/profile.js.map +1 -0
  78. package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.d.ts +26 -0
  79. package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.js +27 -0
  80. package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.js.map +1 -0
  81. package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.d.ts +32 -0
  82. package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.js +171 -0
  83. package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.js.map +1 -0
  84. package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.d.ts +2 -0
  85. package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.js +26 -0
  86. package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.js.map +1 -0
  87. package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-writer.d.ts +34 -0
  88. package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-writer.js +63 -0
  89. package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-writer.js.map +1 -0
  90. package/src/runtime/vendor/flywheel-cli-dist/commands/_wait-polling.d.ts +29 -0
  91. package/src/runtime/vendor/flywheel-cli-dist/commands/_wait-polling.js +75 -0
  92. package/src/runtime/vendor/flywheel-cli-dist/commands/_wait-polling.js.map +1 -0
  93. package/src/runtime/vendor/flywheel-cli-dist/commands/account-detach.d.ts +2 -0
  94. package/src/runtime/vendor/flywheel-cli-dist/commands/account-detach.js +13 -0
  95. package/src/runtime/vendor/flywheel-cli-dist/commands/account-detach.js.map +1 -0
  96. package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-add.d.ts +2 -0
  97. package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-add.js +6 -0
  98. package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-add.js.map +1 -0
  99. package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-remove.d.ts +2 -0
  100. package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-remove.js +6 -0
  101. package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-remove.js.map +1 -0
  102. package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-set-primary.d.ts +2 -0
  103. package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-set-primary.js +6 -0
  104. package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-set-primary.js.map +1 -0
  105. package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.d.ts +1 -0
  106. package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.js +6 -0
  107. package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.js.map +1 -0
  108. package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-preview.d.ts +2 -0
  109. package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-preview.js +6 -0
  110. package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-preview.js.map +1 -0
  111. package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-proof.d.ts +2 -0
  112. package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-proof.js +8 -0
  113. package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-proof.js.map +1 -0
  114. package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge.d.ts +2 -0
  115. package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge.js +11 -0
  116. package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge.js.map +1 -0
  117. package/src/runtime/vendor/flywheel-cli-dist/commands/aliases.d.ts +13 -0
  118. package/src/runtime/vendor/flywheel-cli-dist/commands/aliases.js +13 -0
  119. package/src/runtime/vendor/flywheel-cli-dist/commands/aliases.js.map +1 -0
  120. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-create.d.ts +2 -0
  121. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-create.js +12 -0
  122. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-create.js.map +1 -0
  123. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-delete.d.ts +2 -0
  124. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-delete.js +20 -0
  125. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-delete.js.map +1 -0
  126. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.d.ts +1 -0
  127. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.js +6 -0
  128. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.js.map +1 -0
  129. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-rotate.d.ts +2 -0
  130. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-rotate.js +21 -0
  131. package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-rotate.js.map +1 -0
  132. package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-expire.d.ts +2 -0
  133. package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-expire.js +8 -0
  134. package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-expire.js.map +1 -0
  135. package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-heartbeat.d.ts +2 -0
  136. package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-heartbeat.js +29 -0
  137. package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-heartbeat.js.map +1 -0
  138. package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-list.d.ts +2 -0
  139. package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-list.js +10 -0
  140. package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-list.js.map +1 -0
  141. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.d.ts +2 -0
  142. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.js +8 -0
  143. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.js.map +1 -0
  144. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-get.d.ts +2 -0
  145. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-get.js +7 -0
  146. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-get.js.map +1 -0
  147. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-list.d.ts +2 -0
  148. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-list.js +8 -0
  149. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-list.js.map +1 -0
  150. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-note-set.d.ts +2 -0
  151. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-note-set.js +9 -0
  152. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-note-set.js.map +1 -0
  153. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-finalize.d.ts +2 -0
  154. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-finalize.js +7 -0
  155. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-finalize.js.map +1 -0
  156. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-prepare.d.ts +2 -0
  157. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-prepare.js +15 -0
  158. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-prepare.js.map +1 -0
  159. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload.d.ts +2 -0
  160. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload.js +5 -0
  161. package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload.js.map +1 -0
  162. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-clear.d.ts +2 -0
  163. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-clear.js +8 -0
  164. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-clear.js.map +1 -0
  165. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-set.d.ts +2 -0
  166. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-set.js +30 -0
  167. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-set.js.map +1 -0
  168. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-login.d.ts +2 -0
  169. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-login.js +34 -0
  170. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-login.js.map +1 -0
  171. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.d.ts +2 -0
  172. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.js +4 -0
  173. package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.js.map +1 -0
  174. package/src/runtime/vendor/flywheel-cli-dist/commands/blobs-get.d.ts +2 -0
  175. package/src/runtime/vendor/flywheel-cli-dist/commands/blobs-get.js +18 -0
  176. package/src/runtime/vendor/flywheel-cli-dist/commands/blobs-get.js.map +1 -0
  177. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-create.d.ts +2 -0
  178. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-create.js +11 -0
  179. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-create.js.map +1 -0
  180. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-list.d.ts +1 -0
  181. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-list.js +6 -0
  182. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-list.js.map +1 -0
  183. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-revoke.d.ts +1 -0
  184. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-revoke.js +6 -0
  185. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-revoke.js.map +1 -0
  186. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-update.d.ts +2 -0
  187. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-update.js +22 -0
  188. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-update.js.map +1 -0
  189. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-snapshot.d.ts +1 -0
  190. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-snapshot.js +6 -0
  191. package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-snapshot.js.map +1 -0
  192. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-acquire.d.ts +2 -0
  193. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-acquire.js +39 -0
  194. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-acquire.js.map +1 -0
  195. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-budgets.d.ts +2 -0
  196. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-budgets.js +14 -0
  197. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-budgets.js.map +1 -0
  198. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-connection.d.ts +2 -0
  199. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-connection.js +13 -0
  200. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-connection.js.map +1 -0
  201. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-funding.d.ts +2 -0
  202. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-funding.js +10 -0
  203. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-funding.js.map +1 -0
  204. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-list.d.ts +2 -0
  205. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-list.js +13 -0
  206. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-list.js.map +1 -0
  207. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-request-approval.d.ts +2 -0
  208. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-request-approval.js +53 -0
  209. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-request-approval.js.map +1 -0
  210. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-options.d.ts +2 -0
  211. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-options.js +17 -0
  212. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-options.js.map +1 -0
  213. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-get.d.ts +1 -0
  214. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-get.js +6 -0
  215. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-get.js.map +1 -0
  216. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-set.d.ts +2 -0
  217. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-set.js +19 -0
  218. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-set.js.map +1 -0
  219. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release-all.d.ts +2 -0
  220. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release-all.js +39 -0
  221. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release-all.js.map +1 -0
  222. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release.d.ts +2 -0
  223. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release.js +28 -0
  224. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release.js.map +1 -0
  225. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-status.d.ts +2 -0
  226. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-status.js +8 -0
  227. package/src/runtime/vendor/flywheel-cli-dist/commands/compute-status.js.map +1 -0
  228. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-balance.d.ts +1 -0
  229. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-balance.js +6 -0
  230. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-balance.js.map +1 -0
  231. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-billing-portal.d.ts +2 -0
  232. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-billing-portal.js +8 -0
  233. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-billing-portal.js.map +1 -0
  234. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-purchase.d.ts +2 -0
  235. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-purchase.js +10 -0
  236. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-purchase.js.map +1 -0
  237. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral-claim.d.ts +2 -0
  238. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral-claim.js +6 -0
  239. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral-claim.js.map +1 -0
  240. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral.d.ts +1 -0
  241. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral.js +6 -0
  242. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral.js.map +1 -0
  243. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscribe.d.ts +2 -0
  244. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscribe.js +14 -0
  245. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscribe.js.map +1 -0
  246. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscription.d.ts +1 -0
  247. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscription.js +6 -0
  248. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscription.js.map +1 -0
  249. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-transactions.d.ts +2 -0
  250. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-transactions.js +12 -0
  251. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-transactions.js.map +1 -0
  252. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-usage.d.ts +2 -0
  253. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-usage.js +9 -0
  254. package/src/runtime/vendor/flywheel-cli-dist/commands/credits-usage.js.map +1 -0
  255. package/src/runtime/vendor/flywheel-cli-dist/commands/enums.d.ts +16 -0
  256. package/src/runtime/vendor/flywheel-cli-dist/commands/enums.js +12 -0
  257. package/src/runtime/vendor/flywheel-cli-dist/commands/enums.js.map +1 -0
  258. package/src/runtime/vendor/flywheel-cli-dist/commands/env.d.ts +12 -0
  259. package/src/runtime/vendor/flywheel-cli-dist/commands/env.js +65 -0
  260. package/src/runtime/vendor/flywheel-cli-dist/commands/env.js.map +1 -0
  261. package/src/runtime/vendor/flywheel-cli-dist/commands/executions-launch.d.ts +2 -0
  262. package/src/runtime/vendor/flywheel-cli-dist/commands/executions-launch.js +11 -0
  263. package/src/runtime/vendor/flywheel-cli-dist/commands/executions-launch.js.map +1 -0
  264. package/src/runtime/vendor/flywheel-cli-dist/commands/executions-list.d.ts +1 -0
  265. package/src/runtime/vendor/flywheel-cli-dist/commands/executions-list.js +6 -0
  266. package/src/runtime/vendor/flywheel-cli-dist/commands/executions-list.js.map +1 -0
  267. package/src/runtime/vendor/flywheel-cli-dist/commands/executions-terminate.d.ts +2 -0
  268. package/src/runtime/vendor/flywheel-cli-dist/commands/executions-terminate.js +8 -0
  269. package/src/runtime/vendor/flywheel-cli-dist/commands/executions-terminate.js.map +1 -0
  270. package/src/runtime/vendor/flywheel-cli-dist/commands/export-history.d.ts +2 -0
  271. package/src/runtime/vendor/flywheel-cli-dist/commands/export-history.js +82 -0
  272. package/src/runtime/vendor/flywheel-cli-dist/commands/export-history.js.map +1 -0
  273. package/src/runtime/vendor/flywheel-cli-dist/commands/export-subgraph.d.ts +2 -0
  274. package/src/runtime/vendor/flywheel-cli-dist/commands/export-subgraph.js +18 -0
  275. package/src/runtime/vendor/flywheel-cli-dist/commands/export-subgraph.js.map +1 -0
  276. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-pdf.d.ts +2 -0
  277. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-pdf.js +19 -0
  278. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-pdf.js.map +1 -0
  279. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-render-pdf.d.ts +2 -0
  280. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-render-pdf.js +65 -0
  281. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-render-pdf.js.map +1 -0
  282. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-stream.d.ts +2 -0
  283. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-stream.js +174 -0
  284. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-stream.js.map +1 -0
  285. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary.d.ts +2 -0
  286. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary.js +9 -0
  287. package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary.js.map +1 -0
  288. package/src/runtime/vendor/flywheel-cli-dist/commands/files-list.d.ts +2 -0
  289. package/src/runtime/vendor/flywheel-cli-dist/commands/files-list.js +12 -0
  290. package/src/runtime/vendor/flywheel-cli-dist/commands/files-list.js.map +1 -0
  291. package/src/runtime/vendor/flywheel-cli-dist/commands/github-disconnect.d.ts +1 -0
  292. package/src/runtime/vendor/flywheel-cli-dist/commands/github-disconnect.js +6 -0
  293. package/src/runtime/vendor/flywheel-cli-dist/commands/github-disconnect.js.map +1 -0
  294. package/src/runtime/vendor/flywheel-cli-dist/commands/github-link.d.ts +2 -0
  295. package/src/runtime/vendor/flywheel-cli-dist/commands/github-link.js +17 -0
  296. package/src/runtime/vendor/flywheel-cli-dist/commands/github-link.js.map +1 -0
  297. package/src/runtime/vendor/flywheel-cli-dist/commands/github-refresh-repos.d.ts +1 -0
  298. package/src/runtime/vendor/flywheel-cli-dist/commands/github-refresh-repos.js +6 -0
  299. package/src/runtime/vendor/flywheel-cli-dist/commands/github-refresh-repos.js.map +1 -0
  300. package/src/runtime/vendor/flywheel-cli-dist/commands/github-status.d.ts +1 -0
  301. package/src/runtime/vendor/flywheel-cli-dist/commands/github-status.js +6 -0
  302. package/src/runtime/vendor/flywheel-cli-dist/commands/github-status.js.map +1 -0
  303. package/src/runtime/vendor/flywheel-cli-dist/commands/graph-get.d.ts +2 -0
  304. package/src/runtime/vendor/flywheel-cli-dist/commands/graph-get.js +15 -0
  305. package/src/runtime/vendor/flywheel-cli-dist/commands/graph-get.js.map +1 -0
  306. package/src/runtime/vendor/flywheel-cli-dist/commands/handler-factory.d.ts +22 -0
  307. package/src/runtime/vendor/flywheel-cli-dist/commands/handler-factory.js +51 -0
  308. package/src/runtime/vendor/flywheel-cli-dist/commands/handler-factory.js.map +1 -0
  309. package/src/runtime/vendor/flywheel-cli-dist/commands/help.d.ts +23 -0
  310. package/src/runtime/vendor/flywheel-cli-dist/commands/help.js +258 -0
  311. package/src/runtime/vendor/flywheel-cli-dist/commands/help.js.map +1 -0
  312. package/src/runtime/vendor/flywheel-cli-dist/commands/import-subgraph.d.ts +2 -0
  313. package/src/runtime/vendor/flywheel-cli-dist/commands/import-subgraph.js +6 -0
  314. package/src/runtime/vendor/flywheel-cli-dist/commands/import-subgraph.js.map +1 -0
  315. package/src/runtime/vendor/flywheel-cli-dist/commands/index.d.ts +20 -0
  316. package/src/runtime/vendor/flywheel-cli-dist/commands/index.js +238 -0
  317. package/src/runtime/vendor/flywheel-cli-dist/commands/index.js.map +1 -0
  318. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-remove.d.ts +1 -0
  319. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-remove.js +6 -0
  320. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-remove.js.map +1 -0
  321. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-set.d.ts +2 -0
  322. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-set.js +6 -0
  323. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-set.js.map +1 -0
  324. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-status.d.ts +1 -0
  325. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-status.js +6 -0
  326. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-status.js.map +1 -0
  327. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-remove.d.ts +1 -0
  328. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-remove.js +6 -0
  329. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-remove.js.map +1 -0
  330. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-set.d.ts +2 -0
  331. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-set.js +6 -0
  332. package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-set.js.map +1 -0
  333. package/src/runtime/vendor/flywheel-cli-dist/commands/machines-list.d.ts +1 -0
  334. package/src/runtime/vendor/flywheel-cli-dist/commands/machines-list.js +6 -0
  335. package/src/runtime/vendor/flywheel-cli-dist/commands/machines-list.js.map +1 -0
  336. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.d.ts +2 -0
  337. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.js +10 -0
  338. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.js.map +1 -0
  339. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-audit-list.d.ts +2 -0
  340. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-audit-list.js +7 -0
  341. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-audit-list.js.map +1 -0
  342. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-branch.d.ts +2 -0
  343. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-branch.js +10 -0
  344. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-branch.js.map +1 -0
  345. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit-new.d.ts +2 -0
  346. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit-new.js +6 -0
  347. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit-new.js.map +1 -0
  348. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit.d.ts +2 -0
  349. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit.js +7 -0
  350. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit.js.map +1 -0
  351. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-create.d.ts +2 -0
  352. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-create.js +6 -0
  353. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-create.js.map +1 -0
  354. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.d.ts +2 -0
  355. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.js +14 -0
  356. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.js.map +1 -0
  357. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.d.ts +2 -0
  358. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.js +9 -0
  359. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.js.map +1 -0
  360. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-files.d.ts +1 -0
  361. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-files.js +6 -0
  362. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-files.js.map +1 -0
  363. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-get.d.ts +2 -0
  364. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-get.js +8 -0
  365. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-get.js.map +1 -0
  366. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-list.d.ts +2 -0
  367. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-list.js +7 -0
  368. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-list.js.map +1 -0
  369. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-merge.d.ts +2 -0
  370. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-merge.js +33 -0
  371. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-merge.js.map +1 -0
  372. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.d.ts +2 -0
  373. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.js +8 -0
  374. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.js.map +1 -0
  375. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-ancestry.d.ts +2 -0
  376. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-ancestry.js +10 -0
  377. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-ancestry.js.map +1 -0
  378. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-summary.d.ts +2 -0
  379. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-summary.js +10 -0
  380. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-summary.js.map +1 -0
  381. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-tree.d.ts +2 -0
  382. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-tree.js +8 -0
  383. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-tree.js.map +1 -0
  384. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-resolve-slug.d.ts +2 -0
  385. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-resolve-slug.js +13 -0
  386. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-resolve-slug.js.map +1 -0
  387. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-get.d.ts +1 -0
  388. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-get.js +6 -0
  389. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-get.js.map +1 -0
  390. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set-bulk.d.ts +2 -0
  391. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set-bulk.js +20 -0
  392. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set-bulk.js.map +1 -0
  393. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set.d.ts +2 -0
  394. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set.js +10 -0
  395. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set.js.map +1 -0
  396. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-summaries.d.ts +2 -0
  397. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-summaries.js +11 -0
  398. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-summaries.js.map +1 -0
  399. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-backfill-hypothesis.d.ts +2 -0
  400. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-backfill-hypothesis.js +7 -0
  401. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-backfill-hypothesis.js.map +1 -0
  402. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-backfill-insights.d.ts +2 -0
  403. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-backfill-insights.js +7 -0
  404. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-backfill-insights.js.map +1 -0
  405. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-acquire.d.ts +2 -0
  406. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-acquire.js +13 -0
  407. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-acquire.js.map +1 -0
  408. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-heartbeat.d.ts +2 -0
  409. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-heartbeat.js +7 -0
  410. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-heartbeat.js.map +1 -0
  411. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-release.d.ts +2 -0
  412. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-release.js +7 -0
  413. package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-release.js.map +1 -0
  414. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.d.ts +2 -0
  415. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.js +6 -0
  416. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.js.map +1 -0
  417. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.d.ts +2 -0
  418. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.js +56 -0
  419. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.js.map +1 -0
  420. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.d.ts +2 -0
  421. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.js +12 -0
  422. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.js.map +1 -0
  423. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-unset.d.ts +2 -0
  424. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-unset.js +12 -0
  425. package/src/runtime/vendor/flywheel-cli-dist/commands/profile-unset.js.map +1 -0
  426. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/account.d.ts +2 -0
  427. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/account.js +124 -0
  428. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/account.js.map +1 -0
  429. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/api-keys.d.ts +2 -0
  430. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/api-keys.js +103 -0
  431. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/api-keys.js.map +1 -0
  432. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/approval.d.ts +2 -0
  433. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/approval.js +101 -0
  434. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/approval.js.map +1 -0
  435. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.d.ts +2 -0
  436. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.js +104 -0
  437. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.js.map +1 -0
  438. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.d.ts +2 -0
  439. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.js +37 -0
  440. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.js.map +1 -0
  441. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/budgets.d.ts +2 -0
  442. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/budgets.js +72 -0
  443. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/budgets.js.map +1 -0
  444. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.d.ts +2 -0
  445. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.js +128 -0
  446. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.js.map +1 -0
  447. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/credits.d.ts +2 -0
  448. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/credits.js +134 -0
  449. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/credits.js.map +1 -0
  450. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/env.d.ts +2 -0
  451. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/env.js +39 -0
  452. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/env.js.map +1 -0
  453. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/executions.d.ts +2 -0
  454. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/executions.js +55 -0
  455. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/executions.js.map +1 -0
  456. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/export.d.ts +2 -0
  457. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/export.js +88 -0
  458. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/export.js.map +1 -0
  459. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/github.d.ts +2 -0
  460. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/github.js +60 -0
  461. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/github.js.map +1 -0
  462. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/graph.d.ts +2 -0
  463. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/graph.js +22 -0
  464. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/graph.js.map +1 -0
  465. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/integrations.d.ts +2 -0
  466. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/integrations.js +69 -0
  467. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/integrations.js.map +1 -0
  468. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.d.ts +2 -0
  469. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.js +284 -0
  470. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.js.map +1 -0
  471. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.d.ts +2 -0
  472. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.js +82 -0
  473. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.js.map +1 -0
  474. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.d.ts +2 -0
  475. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.js +108 -0
  476. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.js.map +1 -0
  477. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/sharing.d.ts +2 -0
  478. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/sharing.js +69 -0
  479. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/sharing.js.map +1 -0
  480. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/tagging.d.ts +2 -0
  481. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/tagging.js +98 -0
  482. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/tagging.js.map +1 -0
  483. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/updates.d.ts +2 -0
  484. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/updates.js +70 -0
  485. package/src/runtime/vendor/flywheel-cli-dist/commands/registry/updates.js.map +1 -0
  486. package/src/runtime/vendor/flywheel-cli-dist/commands/registry.d.ts +25 -0
  487. package/src/runtime/vendor/flywheel-cli-dist/commands/registry.js +441 -0
  488. package/src/runtime/vendor/flywheel-cli-dist/commands/registry.js.map +1 -0
  489. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-assign.d.ts +2 -0
  490. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-assign.js +25 -0
  491. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-assign.js.map +1 -0
  492. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-create.d.ts +2 -0
  493. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-create.js +25 -0
  494. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-create.js.map +1 -0
  495. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-delete.d.ts +2 -0
  496. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-delete.js +11 -0
  497. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-delete.js.map +1 -0
  498. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-update.d.ts +2 -0
  499. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-update.js +28 -0
  500. package/src/runtime/vendor/flywheel-cli-dist/commands/tags-update.js.map +1 -0
  501. package/src/runtime/vendor/flywheel-cli-dist/commands/types.d.ts +30 -0
  502. package/src/runtime/vendor/flywheel-cli-dist/commands/types.js +6 -0
  503. package/src/runtime/vendor/flywheel-cli-dist/commands/types.js.map +1 -0
  504. package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide-all-active.d.ts +1 -0
  505. package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide-all-active.js +6 -0
  506. package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide-all-active.js.map +1 -0
  507. package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide.d.ts +2 -0
  508. package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide.js +10 -0
  509. package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide.js.map +1 -0
  510. package/src/runtime/vendor/flywheel-cli-dist/commands/updates-list.d.ts +2 -0
  511. package/src/runtime/vendor/flywheel-cli-dist/commands/updates-list.js +12 -0
  512. package/src/runtime/vendor/flywheel-cli-dist/commands/updates-list.js.map +1 -0
  513. package/src/runtime/vendor/flywheel-cli-dist/commands/utils.d.ts +10 -0
  514. package/src/runtime/vendor/flywheel-cli-dist/commands/utils.js +171 -0
  515. package/src/runtime/vendor/flywheel-cli-dist/commands/utils.js.map +1 -0
  516. package/src/runtime/vendor/flywheel-cli-dist/errors.d.ts +55 -0
  517. package/src/runtime/vendor/flywheel-cli-dist/errors.js +51 -0
  518. package/src/runtime/vendor/flywheel-cli-dist/errors.js.map +1 -0
  519. package/src/runtime/vendor/flywheel-cli-dist/exit-codes.d.ts +8 -0
  520. package/src/runtime/vendor/flywheel-cli-dist/exit-codes.js +8 -0
  521. package/src/runtime/vendor/flywheel-cli-dist/exit-codes.js.map +1 -0
  522. package/src/runtime/vendor/flywheel-cli-dist/grammar/globals.d.ts +26 -0
  523. package/src/runtime/vendor/flywheel-cli-dist/grammar/globals.js +117 -0
  524. package/src/runtime/vendor/flywheel-cli-dist/grammar/globals.js.map +1 -0
  525. package/src/runtime/vendor/flywheel-cli-dist/grammar/parse.d.ts +17 -0
  526. package/src/runtime/vendor/flywheel-cli-dist/grammar/parse.js +102 -0
  527. package/src/runtime/vendor/flywheel-cli-dist/grammar/parse.js.map +1 -0
  528. package/src/runtime/vendor/flywheel-cli-dist/http/client.d.ts +75 -0
  529. package/src/runtime/vendor/flywheel-cli-dist/http/client.js +369 -0
  530. package/src/runtime/vendor/flywheel-cli-dist/http/client.js.map +1 -0
  531. package/src/runtime/vendor/flywheel-cli-dist/http/debug.d.ts +2 -0
  532. package/src/runtime/vendor/flywheel-cli-dist/http/debug.js +68 -0
  533. package/src/runtime/vendor/flywheel-cli-dist/http/debug.js.map +1 -0
  534. package/src/runtime/vendor/flywheel-cli-dist/http/poll.d.ts +18 -0
  535. package/src/runtime/vendor/flywheel-cli-dist/http/poll.js +57 -0
  536. package/src/runtime/vendor/flywheel-cli-dist/http/poll.js.map +1 -0
  537. package/src/runtime/vendor/flywheel-cli-dist/http/retry.d.ts +30 -0
  538. package/src/runtime/vendor/flywheel-cli-dist/http/retry.js +127 -0
  539. package/src/runtime/vendor/flywheel-cli-dist/http/retry.js.map +1 -0
  540. package/src/runtime/vendor/flywheel-cli-dist/main.d.ts +31 -0
  541. package/src/runtime/vendor/flywheel-cli-dist/main.js +763 -0
  542. package/src/runtime/vendor/flywheel-cli-dist/main.js.map +1 -0
  543. package/src/runtime/vendor/flywheel-cli-dist/output/format.d.ts +9 -0
  544. package/src/runtime/vendor/flywheel-cli-dist/output/format.js +129 -0
  545. package/src/runtime/vendor/flywheel-cli-dist/output/format.js.map +1 -0
  546. package/src/runtime/vendor/flywheel-cli-dist/runtime-entry.d.ts +1 -0
  547. package/src/runtime/vendor/flywheel-cli-dist/runtime-entry.js +2 -0
  548. package/src/runtime/vendor/flywheel-cli-dist/runtime-entry.js.map +1 -0
  549. package/src/runtime/vendor/flywheel-cli-dist/version.d.ts +3 -0
  550. package/src/runtime/vendor/flywheel-cli-dist/version.js +31 -0
  551. package/src/runtime/vendor/flywheel-cli-dist/version.js.map +1 -0
  552. package/src/runtime/vendor/manifest.json +500 -0
  553. package/src/setup/command.mjs +24 -0
  554. package/src/setup/io/patchers/json.mjs +33 -0
  555. package/src/setup/io/patchers/toml.mjs +15 -0
  556. package/src/setup/io/patchers/yaml.mjs +33 -0
  557. package/src/setup/mode.mjs +113 -0
  558. package/src/setup/modes/cli.mjs +317 -0
  559. package/src/setup/modes/mcp-command.mjs +850 -0
  560. package/src/setup/modes/mcp.mjs +176 -0
  561. package/src/setup/preflight.mjs +54 -0
  562. package/src/setup/shared/prior-mode-detect.mjs +412 -0
  563. package/src/setup/shared/skill.mjs +12 -0
  564. package/src/setup/shared/summary.mjs +80 -0
  565. package/src/setup-auth.mjs +293 -178
  566. package/src/unified-cli.mjs +161 -0
@@ -0,0 +1,80 @@
1
+ function uniqueSorted(values = []) {
2
+ return [...new Set(values)].sort((left, right) => left.localeCompare(right));
3
+ }
4
+
5
+ function aggregateFromAgentResults(agentResults = [], fieldName) {
6
+ return uniqueSorted(
7
+ agentResults.flatMap((result) =>
8
+ Array.isArray(result[fieldName]) ? result[fieldName] : [],
9
+ ),
10
+ );
11
+ }
12
+
13
+ export function aggregateSetupResult({
14
+ mode,
15
+ agentResults = [],
16
+ skippedSteps = [],
17
+ warnings = [],
18
+ reconciled = [],
19
+ nextSteps = [],
20
+ } = {}) {
21
+ // "Skipped" hosts (for example unsupported CLI-mode hosts) should not fail
22
+ // the overall command; only explicit host-level failures should.
23
+ const anyFailed = agentResults.some((result) => result.success === false);
24
+
25
+ return {
26
+ mode,
27
+ agentResults,
28
+ touchedFiles: aggregateFromAgentResults(agentResults, "touchedFiles"),
29
+ skippedSteps: uniqueSorted([
30
+ ...skippedSteps,
31
+ ...aggregateFromAgentResults(agentResults, "skippedSteps"),
32
+ ]),
33
+ warnings: uniqueSorted([
34
+ ...warnings,
35
+ ...aggregateFromAgentResults(agentResults, "warnings"),
36
+ ]),
37
+ reconciled: uniqueSorted(reconciled),
38
+ nextSteps: uniqueSorted(nextSteps),
39
+ exitCode: anyFailed ? 4 : 0,
40
+ };
41
+ }
42
+
43
+ function renderAgentOutcome(agentResult) {
44
+ if (agentResult.success === false) {
45
+ return "failed";
46
+ }
47
+ if (
48
+ agentResult.status === "skipped" ||
49
+ (Array.isArray(agentResult.skippedSteps) &&
50
+ agentResult.skippedSteps.includes("unsupported-host"))
51
+ ) {
52
+ return "skipped";
53
+ }
54
+ return "success";
55
+ }
56
+
57
+ export function renderSetupSummary(setupResult) {
58
+ const lines = [
59
+ `Mode: ${setupResult.mode}`,
60
+ `Exit: ${setupResult.exitCode}`,
61
+ ];
62
+
63
+ for (const agentResult of setupResult.agentResults) {
64
+ lines.push(`Agent ${agentResult.agent}: ${renderAgentOutcome(agentResult)}`);
65
+ }
66
+
67
+ for (const filePath of setupResult.touchedFiles) {
68
+ lines.push(`Touched: ${filePath}`);
69
+ }
70
+
71
+ for (const reconciledLine of setupResult.reconciled || []) {
72
+ lines.push(`Reconciled: ${reconciledLine}`);
73
+ }
74
+
75
+ for (const nextStep of setupResult.nextSteps) {
76
+ lines.push(`Next: ${nextStep}`);
77
+ }
78
+
79
+ return lines;
80
+ }
@@ -2,6 +2,8 @@ import crypto from "node:crypto";
2
2
  import http from "node:http";
3
3
  import { spawn } from "node:child_process";
4
4
 
5
+ import { SetupInputUsageError } from "./setup/mode.mjs";
6
+
5
7
  const DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
6
8
  const MIN_POLL_DELAY_MS = 1000;
7
9
  const MAX_POLL_DELAY_MS = 10_000;
@@ -38,15 +40,36 @@ function resolveErrorMessage(payload, fallback) {
38
40
  if (!payload || typeof payload !== "object") {
39
41
  return fallback;
40
42
  }
43
+ // Preference order: the actionable, user-facing field first, then the
44
+ // short error code, then generic fields. Both top-level (direct OAuth
45
+ // shape) and FastAPI's `detail`-wrapped shape are consulted so the
46
+ // device-flow `access_denied` response
47
+ // { "detail": { "error": "access_denied", "error_description": ... } }
48
+ // surfaces its real reason instead of the generic fallback.
49
+ const pickString = (value) =>
50
+ typeof value === "string" && value.trim() ? value.trim() : null;
51
+
52
+ const candidates = [
53
+ pickString(payload.error_description),
54
+ pickString(payload.reason),
55
+ pickString(payload.message),
56
+ pickString(payload.error),
57
+ ];
58
+
41
59
  const detail = payload.detail;
42
- if (typeof detail === "string" && detail.trim()) {
43
- return detail.trim();
60
+ if (typeof detail === "string") {
61
+ candidates.push(pickString(detail));
62
+ } else if (detail && typeof detail === "object") {
63
+ candidates.push(
64
+ pickString(detail.error_description),
65
+ pickString(detail.reason),
66
+ pickString(detail.message),
67
+ pickString(detail.error),
68
+ );
44
69
  }
45
- if (detail && typeof detail === "object") {
46
- const message = detail.message;
47
- if (typeof message === "string" && message.trim()) {
48
- return message.trim();
49
- }
70
+
71
+ for (const candidate of candidates) {
72
+ if (candidate) return candidate;
50
73
  }
51
74
  return fallback;
52
75
  }
@@ -67,40 +90,57 @@ function nonEmptyString(value) {
67
90
  return candidate ? candidate : null;
68
91
  }
69
92
 
70
- async function redeemSetupExchangeToken({
71
- baseUrl,
72
- exchangeToken,
73
- state,
74
- redirectUri,
75
- }) {
76
- const redeemUrl = new URL(
77
- "/api/auth/mcp-api-keys/setup-exchange/redeem",
78
- baseUrl,
79
- );
80
- const response = await fetch(redeemUrl, {
81
- method: "POST",
82
- headers: {
83
- "content-type": "application/json",
84
- "Idempotency-Key": `setup-redeem:${state}`,
85
- },
86
- body: JSON.stringify({
87
- exchange_token: exchangeToken,
88
- state,
89
- redirect_uri: redirectUri,
90
- }),
91
- });
92
- const payload = await parseJsonResponse(response);
93
- if (!response.ok) {
94
- const detail = resolveErrorMessage(payload, "Setup exchange redemption failed.");
95
- throw new Error(detail);
96
- }
97
- const key = nonEmptyString(payload?.key);
98
- if (!key) {
99
- throw new Error("Setup exchange response missing API key.");
93
+ export function normalizeSetupAuthMode(value) {
94
+ const normalized = String(value || "auto")
95
+ .trim()
96
+ .toLowerCase();
97
+ if (
98
+ normalized === "auto" ||
99
+ normalized === "loopback" ||
100
+ normalized === "device"
101
+ ) {
102
+ return normalized;
100
103
  }
101
- return { apiKey: key };
104
+ throw new Error("Auth mode must be one of: auto, loopback, device.");
102
105
  }
103
106
 
107
+ // FLY-416: removed — legacy /setup-exchange/redeem replaced by RFC 8628 device
108
+ // flow; /setup-exchange/redeem was unauthenticated (5-minute TTL only). Kept
109
+ // as comment for one release cycle; delete in a follow-up.
110
+ // async function redeemSetupExchangeToken({
111
+ // baseUrl,
112
+ // exchangeToken,
113
+ // state,
114
+ // redirectUri,
115
+ // }) {
116
+ // const redeemUrl = new URL(
117
+ // "/api/auth/mcp-api-keys/setup-exchange/redeem",
118
+ // baseUrl,
119
+ // );
120
+ // const response = await fetch(redeemUrl, {
121
+ // method: "POST",
122
+ // headers: {
123
+ // "content-type": "application/json",
124
+ // "Idempotency-Key": `setup-redeem:${state}`,
125
+ // },
126
+ // body: JSON.stringify({
127
+ // exchange_token: exchangeToken,
128
+ // state,
129
+ // redirect_uri: redirectUri,
130
+ // }),
131
+ // });
132
+ // const payload = await parseJsonResponse(response);
133
+ // if (!response.ok) {
134
+ // const detail = resolveErrorMessage(payload, "Setup exchange redemption failed.");
135
+ // throw new Error(detail);
136
+ // }
137
+ // const key = nonEmptyString(payload?.key);
138
+ // if (!key) {
139
+ // throw new Error("Setup exchange response missing API key.");
140
+ // }
141
+ // return { apiKey: key };
142
+ // }
143
+
104
144
  async function startSetupDeviceSession({
105
145
  baseUrl,
106
146
  keyName,
@@ -233,163 +273,238 @@ function launchBrowser(openUrl, url) {
233
273
  }
234
274
 
235
275
  export function resolveSetupAuthMode({ requestedMode, env = process.env }) {
236
- const normalizedRequested = String(requestedMode || "auto")
237
- .trim()
238
- .toLowerCase();
276
+ // FLY-416: loopback mode is retired (legacy /setup-exchange/redeem is
277
+ // removed server-side). When the caller explicitly asks for "loopback"
278
+ // we still normalise it so downstream logic can surface a deterministic
279
+ // FLY-416 error from `acquireApiKeyViaBrowserBridge`. For any other mode
280
+ // (including `auto`), return "device" — the RFC 8628 device flow now
281
+ // handles both local and SSH sessions.
282
+ const normalizedRequested = normalizeSetupAuthMode(requestedMode);
283
+ void env;
239
284
 
240
285
  if (normalizedRequested === "device" || normalizedRequested === "loopback") {
241
286
  return normalizedRequested;
242
287
  }
243
-
244
- const isRemoteShell =
245
- nonEmptyString(env.SSH_CONNECTION) ||
246
- nonEmptyString(env.SSH_CLIENT) ||
247
- nonEmptyString(env.SSH_TTY);
248
- return isRemoteShell ? "device" : "loopback";
288
+ return "device";
249
289
  }
250
290
 
251
- export async function acquireApiKeyViaBrowserBridge({
291
+ export async function resolveSetupApiKey({
292
+ options = {},
252
293
  baseUrl,
253
- keyName,
254
- timeoutMs = DEFAULT_AUTH_TIMEOUT_MS,
255
- openUrl = openUrlInBrowser,
256
- }) {
257
- const state = crypto.randomUUID();
258
-
259
- return await new Promise((resolve, reject) => {
260
- let settled = false;
261
- let timeout = null;
262
- let server = null;
263
- let callbackUrl = "";
264
-
265
- const cleanup = () => {
266
- if (timeout) {
267
- clearTimeout(timeout);
268
- timeout = null;
269
- }
270
- if (server) {
271
- server.close();
272
- server.closeAllConnections?.();
273
- server.closeIdleConnections?.();
274
- server = null;
275
- }
276
- };
277
-
278
- const fail = (error) => {
279
- if (settled) return;
280
- settled = true;
281
- cleanup();
282
- reject(error);
294
+ resolveAuthMode = resolveSetupAuthMode,
295
+ acquireDeviceFlow = acquireApiKeyViaDeviceFlow,
296
+ acquireBrowserBridge = acquireApiKeyViaBrowserBridge,
297
+ keyNameFactory = () => `flywheel-setup-${crypto.randomBytes(3).toString("hex")}`,
298
+ } = {}) {
299
+ // Check the value, not just property presence: callers like runCliSetupMode
300
+ // always forward `{apiKey, authMode}` to share one helper shape, so the
301
+ // property is present even when the user did not pass --api-key. Using
302
+ // Object.hasOwn here would treat the implicit `undefined` as an explicit
303
+ // empty key and throw, blocking the default device/loopback auth path.
304
+ if (options.apiKey !== undefined && options.apiKey !== null) {
305
+ const normalizedApiKey = String(options.apiKey).trim();
306
+ if (normalizedApiKey.length === 0) {
307
+ // Tagged as a usage error so callers (runCliSetupMode's catch in
308
+ // particular) can propagate it instead of reshaping it into a
309
+ // per-host setup failure. This keeps --mode cli and --mode mcp
310
+ // consistent: both exit 1 with the same validation message.
311
+ throw new SetupInputUsageError("--api-key cannot be empty.");
312
+ }
313
+ return {
314
+ apiKey: normalizedApiKey,
315
+ authMode: null,
283
316
  };
317
+ }
284
318
 
285
- const succeed = (result) => {
286
- if (settled) return;
287
- settled = true;
288
- cleanup();
289
- resolve(result);
290
- };
319
+ const requestedAuthMode = normalizeSetupAuthMode(options.authMode || "auto");
320
+ const resolvedAuthMode = resolveAuthMode({
321
+ requestedMode: requestedAuthMode,
322
+ });
291
323
 
292
- server = http.createServer(async (req, res) => {
293
- const reqUrl = new URL(req.url || "/", "http://127.0.0.1");
294
- if (reqUrl.pathname !== "/callback") {
295
- res.writeHead(404, { "Content-Type": "text/plain" });
296
- res.end("Not Found");
297
- return;
298
- }
299
-
300
- const callbackState = (reqUrl.searchParams.get("state") || "").trim();
301
- const exchangeToken = (
302
- reqUrl.searchParams.get("exchange_token") || ""
303
- ).trim();
304
- const error = (reqUrl.searchParams.get("error") || "").trim();
305
-
306
- if (callbackState !== state) {
307
- res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
308
- res.end(
309
- renderCallbackPage({
310
- ok: false,
311
- message: "State mismatch. Please retry setup.",
312
- }),
313
- );
314
- fail(new Error("Setup callback state mismatch."));
315
- return;
316
- }
317
-
318
- if (error) {
319
- res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
320
- res.end(renderCallbackPage({ ok: false, message: error }));
321
- fail(new Error(error));
322
- return;
323
- }
324
-
325
- if (!exchangeToken) {
326
- res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
327
- res.end(
328
- renderCallbackPage({
329
- ok: false,
330
- message: "No setup exchange token was returned.",
331
- }),
332
- );
333
- fail(new Error("Setup callback missing exchange token."));
334
- return;
335
- }
336
-
337
- let redeemed;
338
- try {
339
- redeemed = await redeemSetupExchangeToken({
324
+ const keyName = keyNameFactory();
325
+ const authResult =
326
+ resolvedAuthMode === "device"
327
+ ? await acquireDeviceFlow({
328
+ baseUrl,
329
+ keyName,
330
+ verificationBaseUrl: baseUrl,
331
+ })
332
+ : await acquireBrowserBridge({
340
333
  baseUrl,
341
- exchangeToken,
342
- state,
343
- redirectUri: callbackUrl,
334
+ keyName,
344
335
  });
345
- } catch (err) {
346
- const message =
347
- err instanceof Error ? err.message : "Failed to redeem setup exchange.";
348
- res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
349
- res.end(renderCallbackPage({ ok: false, message }));
350
- fail(new Error(message));
351
- return;
352
- }
353
-
354
- res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
355
- res.end(
356
- renderCallbackPage({
357
- ok: true,
358
- message: "Flywheel MCP was authorized successfully.",
359
- }),
360
- );
361
- succeed({ apiKey: redeemed.apiKey });
362
- });
363
-
364
- server.once("error", (error) => {
365
- fail(error);
366
- });
367
-
368
- server.listen(0, "127.0.0.1", () => {
369
- const address = server.address();
370
- if (!address || typeof address === "string") {
371
- fail(new Error("Failed to allocate local callback port."));
372
- return;
373
- }
374
336
 
375
- callbackUrl = `http://127.0.0.1:${address.port}/callback`;
376
- const setupUrl = new URL("/auth/mcp/setup", baseUrl);
377
- setupUrl.searchParams.set("state", state);
378
- setupUrl.searchParams.set("redirect_uri", callbackUrl);
379
- setupUrl.searchParams.set("name", keyName);
380
-
381
- console.log("Opening browser for Flywheel login and key creation...");
382
- console.log(`If it does not open, use this URL:\n${setupUrl.toString()}\n`);
337
+ const normalizedResultApiKey = String(authResult?.apiKey || "").trim();
338
+ if (!normalizedResultApiKey) {
339
+ throw new Error("Authentication response did not include an API key.");
340
+ }
383
341
 
384
- launchBrowser(openUrl, setupUrl.toString());
385
- });
342
+ return {
343
+ apiKey: normalizedResultApiKey,
344
+ authMode: resolvedAuthMode,
345
+ };
346
+ }
386
347
 
387
- timeout = setTimeout(() => {
388
- fail(new Error("Timed out waiting for browser authorization."));
389
- }, timeoutMs);
390
- });
348
+ // FLY-416: loopback / browser-bridge flow routed through the now-inerted
349
+ // /setup-exchange/redeem server endpoint. The RFC 8628 device flow (see
350
+ // `acquireApiKeyViaDeviceFlow`) replaces it. The exported symbol stays so
351
+ // existing callers still resolve at import time, but invoking it throws a
352
+ // FLY-416 error instructing operators to use device or auto mode.
353
+ export async function acquireApiKeyViaBrowserBridge(_args) {
354
+ // Keep the remediation flag in lockstep with `src/cli.mjs` — it advertises
355
+ // `--auth-mode <mode>`, not `--auth`. Pointing operators at the wrong flag
356
+ // makes this error a dead end.
357
+ throw new Error(
358
+ "FLY-416: loopback (browser-bridge) auth has been removed. " +
359
+ "Re-run with --auth-mode device (or --auth-mode auto) to use the " +
360
+ "RFC 8628 device flow. See docs/flywheel/CLI_STAGING_ACCESS.md for " +
361
+ "the full CLI auth contract.",
362
+ );
391
363
  }
392
364
 
365
+ // FLY-416: legacy loopback implementation (commented — delete in a follow-up):
366
+ // export async function acquireApiKeyViaBrowserBridge({
367
+ // baseUrl,
368
+ // keyName,
369
+ // timeoutMs = DEFAULT_AUTH_TIMEOUT_MS,
370
+ // openUrl = openUrlInBrowser,
371
+ // }) {
372
+ // const state = crypto.randomUUID();
373
+ //
374
+ // return await new Promise((resolve, reject) => {
375
+ // let settled = false;
376
+ // let timeout = null;
377
+ // let server = null;
378
+ // let callbackUrl = "";
379
+ //
380
+ // const cleanup = () => {
381
+ // if (timeout) {
382
+ // clearTimeout(timeout);
383
+ // timeout = null;
384
+ // }
385
+ // if (server) {
386
+ // server.close();
387
+ // server.closeAllConnections?.();
388
+ // server.closeIdleConnections?.();
389
+ // server = null;
390
+ // }
391
+ // };
392
+ //
393
+ // const fail = (error) => {
394
+ // if (settled) return;
395
+ // settled = true;
396
+ // cleanup();
397
+ // reject(error);
398
+ // };
399
+ //
400
+ // const succeed = (result) => {
401
+ // if (settled) return;
402
+ // settled = true;
403
+ // cleanup();
404
+ // resolve(result);
405
+ // };
406
+ //
407
+ // server = http.createServer(async (req, res) => {
408
+ // const reqUrl = new URL(req.url || "/", "http://127.0.0.1");
409
+ // if (reqUrl.pathname !== "/callback") {
410
+ // res.writeHead(404, { "Content-Type": "text/plain" });
411
+ // res.end("Not Found");
412
+ // return;
413
+ // }
414
+ //
415
+ // const callbackState = (reqUrl.searchParams.get("state") || "").trim();
416
+ // const exchangeToken = (
417
+ // reqUrl.searchParams.get("exchange_token") || ""
418
+ // ).trim();
419
+ // const error = (reqUrl.searchParams.get("error") || "").trim();
420
+ //
421
+ // if (callbackState !== state) {
422
+ // res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
423
+ // res.end(
424
+ // renderCallbackPage({
425
+ // ok: false,
426
+ // message: "State mismatch. Please retry setup.",
427
+ // }),
428
+ // );
429
+ // fail(new Error("Setup callback state mismatch."));
430
+ // return;
431
+ // }
432
+ //
433
+ // if (error) {
434
+ // res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
435
+ // res.end(renderCallbackPage({ ok: false, message: error }));
436
+ // fail(new Error(error));
437
+ // return;
438
+ // }
439
+ //
440
+ // if (!exchangeToken) {
441
+ // res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
442
+ // res.end(
443
+ // renderCallbackPage({
444
+ // ok: false,
445
+ // message: "No setup exchange token was returned.",
446
+ // }),
447
+ // );
448
+ // fail(new Error("Setup callback missing exchange token."));
449
+ // return;
450
+ // }
451
+ //
452
+ // let redeemed;
453
+ // try {
454
+ // redeemed = await redeemSetupExchangeToken({
455
+ // baseUrl,
456
+ // exchangeToken,
457
+ // state,
458
+ // redirectUri: callbackUrl,
459
+ // });
460
+ // } catch (err) {
461
+ // const message =
462
+ // err instanceof Error ? err.message : "Failed to redeem setup exchange.";
463
+ // res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
464
+ // res.end(renderCallbackPage({ ok: false, message }));
465
+ // fail(new Error(message));
466
+ // return;
467
+ // }
468
+ //
469
+ // res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
470
+ // res.end(
471
+ // renderCallbackPage({
472
+ // ok: true,
473
+ // message: "Flywheel MCP was authorized successfully.",
474
+ // }),
475
+ // );
476
+ // succeed({ apiKey: redeemed.apiKey });
477
+ // });
478
+ //
479
+ // server.once("error", (error) => {
480
+ // fail(error);
481
+ // });
482
+ //
483
+ // server.listen(0, "127.0.0.1", () => {
484
+ // const address = server.address();
485
+ // if (!address || typeof address === "string") {
486
+ // fail(new Error("Failed to allocate local callback port."));
487
+ // return;
488
+ // }
489
+ //
490
+ // callbackUrl = `http://127.0.0.1:${address.port}/callback`;
491
+ // const setupUrl = new URL("/auth/mcp/setup", baseUrl);
492
+ // setupUrl.searchParams.set("state", state);
493
+ // setupUrl.searchParams.set("redirect_uri", callbackUrl);
494
+ // setupUrl.searchParams.set("name", keyName);
495
+ //
496
+ // console.log("Opening browser for Flywheel login and key creation...");
497
+ // console.log(`If it does not open, use this URL:\n${setupUrl.toString()}\n`);
498
+ //
499
+ // launchBrowser(openUrl, setupUrl.toString());
500
+ // });
501
+ //
502
+ // timeout = setTimeout(() => {
503
+ // fail(new Error("Timed out waiting for browser authorization."));
504
+ // }, timeoutMs);
505
+ // });
506
+ // }
507
+
393
508
  export async function acquireApiKeyViaDeviceFlow({
394
509
  baseUrl,
395
510
  keyName,