@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,176 @@
1
+ import path from "node:path";
2
+
3
+ import { getHost as defaultGetHost } from "../../agents.mjs";
4
+ import { SUPPORTED_INSTALL_SKILL_HOSTS } from "../../skill-installer.mjs";
5
+ import { resolveMcpPath as defaultResolveMcpPath } from "../../mcp-writer.mjs";
6
+ import { SetupModeUsageError } from "../mode.mjs";
7
+ import { patchJsonServer as defaultPatchJsonServer } from "../io/patchers/json.mjs";
8
+ import { patchTomlServer as defaultPatchTomlServer } from "../io/patchers/toml.mjs";
9
+ import { patchYamlServer as defaultPatchYamlServer } from "../io/patchers/yaml.mjs";
10
+ import {
11
+ detectPriorModeForSetup,
12
+ formatPriorModeConflictError,
13
+ } from "../shared/prior-mode-detect.mjs";
14
+ import { aggregateSetupResult } from "../shared/summary.mjs";
15
+
16
+ function unique(values = []) {
17
+ return [...new Set(values)];
18
+ }
19
+
20
+ function resolveCandidatesForScope(host, scope, cwd) {
21
+ if (scope === "global") {
22
+ return host.mcp.globalPaths;
23
+ }
24
+ return host.mcp.projectPaths.map((candidate) => path.join(cwd, candidate));
25
+ }
26
+
27
+ function buildNextStep(selectedHosts) {
28
+ return `flywheel setup --mode mcp --yes ${selectedHosts
29
+ .map((hostName) => `--${hostName}`)
30
+ .join(" ")}`;
31
+ }
32
+
33
+ export async function runMcpSetupMode({
34
+ selectedHosts = [],
35
+ scope = "global",
36
+ cwd = process.cwd(),
37
+ force = false,
38
+ serverName,
39
+ serverUrl,
40
+ apiKey,
41
+ supportedCliHosts = SUPPORTED_INSTALL_SKILL_HOSTS,
42
+ detectPriorMode = detectPriorModeForSetup,
43
+ reconcilePriorMode = null,
44
+ getHost = defaultGetHost,
45
+ resolveMcpPath = defaultResolveMcpPath,
46
+ patchJsonServer = defaultPatchJsonServer,
47
+ patchTomlServer = defaultPatchTomlServer,
48
+ patchYamlServer = defaultPatchYamlServer,
49
+ } = {}) {
50
+ const normalizedHosts = unique(selectedHosts);
51
+ const agentResults = [];
52
+ const reconciled = [];
53
+
54
+ const priorModeMatch = await detectPriorMode({
55
+ targetMode: "mcp",
56
+ selectedHosts: normalizedHosts,
57
+ scope,
58
+ cwd,
59
+ serverName,
60
+ serverUrl,
61
+ supportedCliHosts,
62
+ });
63
+ if (priorModeMatch.priorMode && priorModeMatch.affectedHosts.length > 0) {
64
+ if (force !== true) {
65
+ throw new SetupModeUsageError(
66
+ formatPriorModeConflictError(priorModeMatch),
67
+ );
68
+ }
69
+
70
+ if (typeof reconcilePriorMode !== "function") {
71
+ throw new Error(
72
+ "reconcilePriorMode dependency is required when --force is used.",
73
+ );
74
+ }
75
+
76
+ const reconcileEntries = Array.isArray(priorModeMatch.entries)
77
+ ? priorModeMatch.entries
78
+ : priorModeMatch.affectedHosts.map((hostName) => ({
79
+ hostName,
80
+ serverNames: [],
81
+ }));
82
+
83
+ // Reconcile each detected entry using its actual serverName(s). Prior CLI
84
+ // installs carry no MCP entry names and the callback falls back to the
85
+ // current request's --name for the skill uninstall path; prior MCP installs
86
+ // may have drifted names and must be removed by those names.
87
+ for (const entry of reconcileEntries) {
88
+ try {
89
+ // eslint-disable-next-line no-await-in-loop
90
+ await reconcilePriorMode({
91
+ priorMode: priorModeMatch.priorMode,
92
+ targetMode: "mcp",
93
+ hostNames: [entry.hostName],
94
+ serverNames: entry.serverNames,
95
+ scope,
96
+ cwd,
97
+ serverName,
98
+ serverUrl,
99
+ });
100
+ } catch (error) {
101
+ const message = error instanceof Error ? error.message : String(error);
102
+ const reconcileError = new Error(
103
+ `Failed to reconcile prior --mode ${priorModeMatch.priorMode} artifacts for host ${entry.hostName}: ${message}`,
104
+ );
105
+ reconcileError.exitCode = 4;
106
+ throw reconcileError;
107
+ }
108
+ }
109
+
110
+ reconciled.push(
111
+ `removed prior --mode ${priorModeMatch.priorMode} artifacts for host(s): ${priorModeMatch.affectedHosts.join(", ")}`,
112
+ );
113
+ }
114
+
115
+ for (const hostName of normalizedHosts) {
116
+ let host = null;
117
+ try {
118
+ host = getHost(hostName);
119
+ const candidates = resolveCandidatesForScope(host, scope, cwd);
120
+ const filePath = await resolveMcpPath(candidates);
121
+ const entry = host.mcp.buildEntry({ serverUrl, apiKey });
122
+
123
+ let patchResult;
124
+ if (host.mcp.configType === "toml") {
125
+ patchResult = await patchTomlServer({
126
+ filePath,
127
+ configKey: host.mcp.configKey,
128
+ serverName,
129
+ entry,
130
+ });
131
+ } else if (host.mcp.configType === "yaml") {
132
+ patchResult = await patchYamlServer({
133
+ filePath,
134
+ configKey: host.mcp.configKey,
135
+ serverName,
136
+ entry,
137
+ });
138
+ } else {
139
+ patchResult = await patchJsonServer({
140
+ filePath,
141
+ configKey: host.mcp.configKey,
142
+ serverName,
143
+ entry,
144
+ });
145
+ }
146
+
147
+ agentResults.push({
148
+ agent: hostName,
149
+ success: true,
150
+ touchedFiles: patchResult.touchedFiles,
151
+ skippedSteps: patchResult.alreadyExists ? ["already-configured"] : [],
152
+ warnings: [],
153
+ });
154
+ } catch (error) {
155
+ const message = error instanceof Error ? error.message : String(error);
156
+ agentResults.push({
157
+ agent: host?.name || hostName,
158
+ success: false,
159
+ touchedFiles: [],
160
+ skippedSteps: ["mcp-write"],
161
+ warnings: [message],
162
+ error: message,
163
+ });
164
+ }
165
+ }
166
+
167
+ return aggregateSetupResult({
168
+ mode: "mcp",
169
+ agentResults,
170
+ reconciled,
171
+ nextSteps:
172
+ normalizedHosts.length > 0
173
+ ? [buildNextStep(normalizedHosts)]
174
+ : ["flywheel setup --mode mcp --yes --codex"],
175
+ });
176
+ }
@@ -0,0 +1,54 @@
1
+ function unique(values = []) {
2
+ return [...new Set(values)];
3
+ }
4
+
5
+ export class SetupPreflightError extends Error {
6
+ constructor(message, exitCode = 2) {
7
+ super(message);
8
+ this.name = "SetupPreflightError";
9
+ this.exitCode = exitCode;
10
+ }
11
+ }
12
+
13
+ export function validateModeHostSupport({
14
+ mode,
15
+ selectedHosts = [],
16
+ supportedCliHosts = [],
17
+ } = {}) {
18
+ const normalizedHosts = unique(selectedHosts);
19
+ const supportedCliHostSet = new Set(unique(supportedCliHosts));
20
+
21
+ if (mode !== "cli") {
22
+ return {
23
+ supportedHosts: normalizedHosts,
24
+ unsupportedHosts: [],
25
+ warnings: [],
26
+ };
27
+ }
28
+
29
+ const supportedHosts = normalizedHosts.filter((host) =>
30
+ supportedCliHostSet.has(host),
31
+ );
32
+ const unsupportedHosts = normalizedHosts.filter(
33
+ (host) => !supportedCliHostSet.has(host),
34
+ );
35
+
36
+ if (supportedHosts.length === 0 && unsupportedHosts.length > 0) {
37
+ throw new SetupPreflightError(
38
+ `CLI mode does not support selected hosts: ${unsupportedHosts.join(", ")}.`,
39
+ );
40
+ }
41
+
42
+ const warnings =
43
+ unsupportedHosts.length > 0
44
+ ? [
45
+ `CLI mode skipped unsupported hosts: ${unsupportedHosts.join(", ")}.`,
46
+ ]
47
+ : [];
48
+
49
+ return {
50
+ supportedHosts,
51
+ unsupportedHosts,
52
+ warnings,
53
+ };
54
+ }
@@ -0,0 +1,412 @@
1
+ import path from "node:path";
2
+ import { access, readFile } from "node:fs/promises";
3
+
4
+ import { getHost as defaultGetHost } from "../../agents.mjs";
5
+ import {
6
+ parseTomlSectionName,
7
+ parseTomlStringValue,
8
+ readJsonConfig as defaultReadJsonConfig,
9
+ readNamedConfigEntry as defaultReadNamedConfigEntry,
10
+ readTomlServerEntry as defaultReadTomlServerEntry,
11
+ readYamlConfig as defaultReadYamlConfig,
12
+ resolveMcpPath as defaultResolveMcpPath,
13
+ } from "../../mcp-writer.mjs";
14
+ import {
15
+ listBundledSkills as defaultListBundledSkills,
16
+ resolveInstalledSkillDir as defaultResolveInstalledSkillDir,
17
+ resolvePackageRoot as defaultResolvePackageRoot,
18
+ SUPPORTED_INSTALL_SKILL_HOSTS,
19
+ } from "../../skill-installer.mjs";
20
+
21
+ function unique(values = []) {
22
+ return [...new Set(values)];
23
+ }
24
+
25
+ function sortHosts(hostNames = []) {
26
+ return [...hostNames].sort((left, right) => left.localeCompare(right));
27
+ }
28
+
29
+ function resolveCandidatesForScope(host, scope, cwd) {
30
+ if (scope === "global") {
31
+ return host.mcp.globalPaths;
32
+ }
33
+ return host.mcp.projectPaths.map((candidate) => path.join(cwd, candidate));
34
+ }
35
+
36
+ async function pathExists(filePath) {
37
+ try {
38
+ await access(filePath);
39
+ return true;
40
+ } catch {
41
+ return false;
42
+ }
43
+ }
44
+
45
+ async function hasMatchingMcpEntry({
46
+ hostName,
47
+ scope,
48
+ cwd,
49
+ serverName,
50
+ serverUrl,
51
+ getHost,
52
+ resolveMcpPath,
53
+ readTomlServerEntry,
54
+ readJsonConfig,
55
+ readYamlConfig,
56
+ readNamedConfigEntry,
57
+ }) {
58
+ try {
59
+ const host = getHost(hostName);
60
+ const candidates = resolveCandidatesForScope(host, scope, cwd);
61
+ const filePath = await resolveMcpPath(candidates);
62
+
63
+ if (host.mcp.configType === "toml") {
64
+ const entry = await readTomlServerEntry(filePath, serverName);
65
+ return entry.exists && entry.url === serverUrl;
66
+ }
67
+
68
+ const config =
69
+ host.mcp.configType === "yaml"
70
+ ? await readYamlConfig(filePath)
71
+ : await readJsonConfig(filePath);
72
+ const entry = readNamedConfigEntry(config, host.mcp.configKey, serverName);
73
+ return typeof entry?.url === "string" && entry.url === serverUrl;
74
+ } catch {
75
+ return false;
76
+ }
77
+ }
78
+
79
+ function originOf(url) {
80
+ try {
81
+ return new URL(url).origin.toLowerCase();
82
+ } catch {
83
+ return null;
84
+ }
85
+ }
86
+
87
+ // A URL is treated as a Flywheel MCP endpoint only when both its pathname is
88
+ // `/mcp-server` AND its origin is Flywheel-identifying. "Flywheel-identifying"
89
+ // means either (a) the hostname contains the substring "flywheel" (covers
90
+ // `flywheel.paradigma.inc`, `flywheel-staging.*`, self-hosted
91
+ // `flywheel.<tenant>.*`, etc.) or (b) the URL's full origin (scheme + host +
92
+ // port) matches the target base URL's origin, so dev installs against
93
+ // `http://localhost:8000` and self-hosted tenants still round-trip. Comparing
94
+ // full origin rather than hostname alone is load-bearing on multi-tenant
95
+ // localhost setups: a user running `setup --mode cli --base-url
96
+ // http://localhost:8000` must not have an unrelated
97
+ // `http://localhost:11434/mcp-server` (say, a different dev service on the
98
+ // same loopback) classified as a prior Flywheel install — without this check,
99
+ // `--force` reconciliation would then uninstall that unrelated service.
100
+ function isFlywheelMcpUrl(url, targetOrigin) {
101
+ if (typeof url !== "string" || url.trim().length === 0) {
102
+ return false;
103
+ }
104
+ let parsed;
105
+ try {
106
+ parsed = new URL(url);
107
+ } catch {
108
+ return false;
109
+ }
110
+ if (parsed.pathname !== "/mcp-server") {
111
+ return false;
112
+ }
113
+ if (parsed.hostname.toLowerCase().includes("flywheel")) {
114
+ return true;
115
+ }
116
+ return targetOrigin !== null && parsed.origin.toLowerCase() === targetOrigin;
117
+ }
118
+
119
+ async function findFlywheelTomlEntryNames(filePath, targetOrigin) {
120
+ let raw;
121
+ try {
122
+ raw = await readFile(filePath, "utf8");
123
+ } catch {
124
+ return [];
125
+ }
126
+ const lines = raw.replace(/\r\n/g, "\n").split("\n");
127
+ const matches = [];
128
+ let currentServerName = null;
129
+ let currentUrl = null;
130
+
131
+ const commitCurrent = () => {
132
+ if (
133
+ currentServerName !== null &&
134
+ currentUrl !== null &&
135
+ isFlywheelMcpUrl(currentUrl, targetOrigin)
136
+ ) {
137
+ matches.push(currentServerName);
138
+ }
139
+ currentServerName = null;
140
+ currentUrl = null;
141
+ };
142
+
143
+ for (const line of lines) {
144
+ const trimmed = line.trim();
145
+ const sectionName = parseTomlSectionName(trimmed);
146
+
147
+ if (sectionName) {
148
+ commitCurrent();
149
+ // Capture any tail after `mcp_servers.` as the candidate server name.
150
+ // `normalizeServerName` in setup accepts names containing dots (TOML
151
+ // allows dotted section keys as a single server name, e.g.
152
+ // `[mcp_servers.legacy.flywheel]`), so restricting to `[A-Za-z0-9_-]+`
153
+ // would let a valid cross-mode install slip through detection. The
154
+ // `url` presence check in commitCurrent() is what discriminates real
155
+ // server sections from sub-tables like `.http_headers`: sub-tables
156
+ // carry headers, not urls, so they never commit.
157
+ const serverMatch = sectionName.match(/^mcp_servers\.(.+)$/);
158
+ if (serverMatch) {
159
+ currentServerName = serverMatch[1];
160
+ }
161
+ continue;
162
+ }
163
+
164
+ if (currentServerName === null) continue;
165
+
166
+ const urlMatch = trimmed.match(/^url\s*=\s*(.+)$/);
167
+ if (!urlMatch) continue;
168
+ currentUrl = parseTomlStringValue(urlMatch[1]);
169
+ }
170
+ commitCurrent();
171
+
172
+ return unique(matches);
173
+ }
174
+
175
+ async function findFlywheelMcpEntryNames({
176
+ hostName,
177
+ scope,
178
+ cwd,
179
+ targetOrigin,
180
+ getHost,
181
+ resolveMcpPath,
182
+ readJsonConfig,
183
+ readYamlConfig,
184
+ }) {
185
+ try {
186
+ const host = getHost(hostName);
187
+ const candidates = resolveCandidatesForScope(host, scope, cwd);
188
+ const filePath = await resolveMcpPath(candidates);
189
+
190
+ if (host.mcp.configType === "toml") {
191
+ return await findFlywheelTomlEntryNames(filePath, targetOrigin);
192
+ }
193
+
194
+ const config =
195
+ host.mcp.configType === "yaml"
196
+ ? await readYamlConfig(filePath)
197
+ : await readJsonConfig(filePath);
198
+ const configKeyPath = Array.isArray(host.mcp.configKey)
199
+ ? host.mcp.configKey
200
+ : [host.mcp.configKey];
201
+ let section = config;
202
+ for (const key of configKeyPath) {
203
+ if (
204
+ !section ||
205
+ typeof section !== "object" ||
206
+ Array.isArray(section) ||
207
+ !(key in section)
208
+ ) {
209
+ return [];
210
+ }
211
+ section = section[key];
212
+ }
213
+ if (!section || typeof section !== "object" || Array.isArray(section)) {
214
+ return [];
215
+ }
216
+ const matches = [];
217
+ for (const [entryName, entry] of Object.entries(section)) {
218
+ if (
219
+ entry &&
220
+ typeof entry === "object" &&
221
+ !Array.isArray(entry) &&
222
+ typeof entry.url === "string" &&
223
+ isFlywheelMcpUrl(entry.url, targetOrigin)
224
+ ) {
225
+ matches.push(entryName);
226
+ }
227
+ }
228
+ return unique(matches);
229
+ } catch {
230
+ return [];
231
+ }
232
+ }
233
+
234
+ async function hostHasBundledSkillArtifacts({
235
+ hostName,
236
+ scope,
237
+ cwd,
238
+ skillNames,
239
+ resolveInstalledSkillDir,
240
+ }) {
241
+ for (const skillName of skillNames) {
242
+ // eslint-disable-next-line no-await-in-loop
243
+ const skillPath = resolveInstalledSkillDir(cwd, hostName, scope, skillName);
244
+ // eslint-disable-next-line no-await-in-loop
245
+ if (await pathExists(skillPath)) {
246
+ return true;
247
+ }
248
+ }
249
+ return false;
250
+ }
251
+
252
+ export function formatPriorModeConflictError({
253
+ priorMode,
254
+ affectedHosts,
255
+ }) {
256
+ const hostList = sortHosts(affectedHosts).join(", ");
257
+ return `Flywheel is already installed in --mode ${priorMode} for host(s) ${hostList}. Run \`npx --yes @paradigma-inc/flywheel uninstall\` first, or re-run this command with --force to reconcile automatically.`;
258
+ }
259
+
260
+ export async function detectPriorModeForSetup({
261
+ targetMode,
262
+ selectedHosts = [],
263
+ scope = "project",
264
+ cwd = process.cwd(),
265
+ serverName = "flywheel",
266
+ serverUrl = "https://flywheel.paradigma.inc/mcp-server",
267
+ supportedCliHosts = SUPPORTED_INSTALL_SKILL_HOSTS,
268
+ getHost = defaultGetHost,
269
+ resolveMcpPath = defaultResolveMcpPath,
270
+ readTomlServerEntry = defaultReadTomlServerEntry,
271
+ readJsonConfig = defaultReadJsonConfig,
272
+ readYamlConfig = defaultReadYamlConfig,
273
+ readNamedConfigEntry = defaultReadNamedConfigEntry,
274
+ resolvePackageRootFn = defaultResolvePackageRoot,
275
+ listSkillNames = defaultListBundledSkills,
276
+ resolveInstalledSkillDir = defaultResolveInstalledSkillDir,
277
+ } = {}) {
278
+ const normalizedHosts = unique(selectedHosts);
279
+ if (normalizedHosts.length === 0) {
280
+ return { priorMode: null, affectedHosts: [], entries: [] };
281
+ }
282
+
283
+ const targetOrigin = originOf(serverUrl);
284
+
285
+ // Two signals combine to identify a prior MCP install on a host:
286
+ // 1. exactMatchHosts — a server entry under the requested serverName with
287
+ // the requested serverUrl (the canonical "already set up" signal).
288
+ // 2. flywheelEntryNamesByHost — any Flywheel-identifying entry (by
289
+ // hostname + path) under that host, regardless of the entry's name.
290
+ // This catches drifted or renamed Flywheel entries (for example a user
291
+ // who installed under `--name legacy-flywheel`) so --force can actually
292
+ // remove them instead of silently installing alongside.
293
+ const exactMatchHosts = [];
294
+ const flywheelEntryNamesByHost = new Map();
295
+ for (const hostName of normalizedHosts) {
296
+ // eslint-disable-next-line no-await-in-loop
297
+ if (
298
+ await hasMatchingMcpEntry({
299
+ hostName,
300
+ scope,
301
+ cwd,
302
+ serverName,
303
+ serverUrl,
304
+ getHost,
305
+ resolveMcpPath,
306
+ readTomlServerEntry,
307
+ readJsonConfig,
308
+ readYamlConfig,
309
+ readNamedConfigEntry,
310
+ })
311
+ ) {
312
+ exactMatchHosts.push(hostName);
313
+ }
314
+ // eslint-disable-next-line no-await-in-loop
315
+ const flywheelEntries = await findFlywheelMcpEntryNames({
316
+ hostName,
317
+ scope,
318
+ cwd,
319
+ targetOrigin,
320
+ getHost,
321
+ resolveMcpPath,
322
+ readJsonConfig,
323
+ readYamlConfig,
324
+ });
325
+ if (flywheelEntries.length > 0) {
326
+ flywheelEntryNamesByHost.set(hostName, flywheelEntries);
327
+ }
328
+ }
329
+
330
+ if (targetMode === "cli") {
331
+ // Any Flywheel MCP entry on a selected host must block a CLI-mode install
332
+ // without --force, not only entries matching the canonical serverName +
333
+ // serverUrl. A prior install under a renamed server or drifted base URL
334
+ // is still a prior MCP install, and missing it would silently leave both
335
+ // wirings active. Return per-host entry names so the reconcile path can
336
+ // uninstall the specific drifted entry rather than defaulting to the
337
+ // current request's --name (which may not exist on disk).
338
+ const affectedMap = new Map();
339
+ for (const hostName of exactMatchHosts) {
340
+ if (!affectedMap.has(hostName)) {
341
+ affectedMap.set(hostName, new Set());
342
+ }
343
+ affectedMap.get(hostName).add(serverName);
344
+ }
345
+ for (const [hostName, entryNames] of flywheelEntryNamesByHost) {
346
+ if (!affectedMap.has(hostName)) {
347
+ affectedMap.set(hostName, new Set());
348
+ }
349
+ for (const entryName of entryNames) {
350
+ affectedMap.get(hostName).add(entryName);
351
+ }
352
+ }
353
+ const entries = [...affectedMap.entries()]
354
+ .map(([hostName, serverNames]) => ({
355
+ hostName,
356
+ serverNames: [...serverNames].sort(),
357
+ }))
358
+ .sort((left, right) => left.hostName.localeCompare(right.hostName));
359
+ return {
360
+ priorMode: entries.length > 0 ? "mcp" : null,
361
+ affectedHosts: entries.map((entry) => entry.hostName),
362
+ entries,
363
+ };
364
+ }
365
+
366
+ const supportedHostSet = new Set(unique(supportedCliHosts));
367
+ const mcpTouchedHosts = new Set([
368
+ ...exactMatchHosts,
369
+ ...flywheelEntryNamesByHost.keys(),
370
+ ]);
371
+ const cliCandidateHosts = normalizedHosts.filter(
372
+ (hostName) =>
373
+ supportedHostSet.has(hostName) && !mcpTouchedHosts.has(hostName),
374
+ );
375
+ if (cliCandidateHosts.length === 0) {
376
+ return { priorMode: null, affectedHosts: [], entries: [] };
377
+ }
378
+
379
+ const packageRoot = resolvePackageRootFn();
380
+ const skillNames = await listSkillNames(packageRoot);
381
+ if (skillNames.length === 0) {
382
+ return { priorMode: null, affectedHosts: [], entries: [] };
383
+ }
384
+
385
+ const cliConfiguredHosts = [];
386
+ for (const hostName of cliCandidateHosts) {
387
+ // eslint-disable-next-line no-await-in-loop
388
+ if (
389
+ await hostHasBundledSkillArtifacts({
390
+ hostName,
391
+ scope,
392
+ cwd,
393
+ skillNames,
394
+ resolveInstalledSkillDir,
395
+ })
396
+ ) {
397
+ cliConfiguredHosts.push(hostName);
398
+ }
399
+ }
400
+
401
+ // Prior CLI installs have no MCP entry to remove; the reconcile path only
402
+ // needs host + scope. Surface empty serverNames so callers can branch on it.
403
+ const entries = sortHosts(cliConfiguredHosts).map((hostName) => ({
404
+ hostName,
405
+ serverNames: [],
406
+ }));
407
+ return {
408
+ priorMode: entries.length > 0 ? "cli" : null,
409
+ affectedHosts: entries.map((entry) => entry.hostName),
410
+ entries,
411
+ };
412
+ }
@@ -0,0 +1,12 @@
1
+ import {
2
+ formatSupportedInstallSkillHosts,
3
+ partitionInstallSkillHosts,
4
+ } from "../../skill-installer.mjs";
5
+
6
+ export function partitionSkillHosts(hostNames) {
7
+ return partitionInstallSkillHosts(hostNames);
8
+ }
9
+
10
+ export function getSupportedSkillHostsText() {
11
+ return formatSupportedInstallSkillHosts();
12
+ }