@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.
- package/README.md +117 -60
- package/bin/flywheel.js +10 -3
- package/package.json +5 -1
- package/skills/flywheel/SKILL.md +13 -1
- package/skills/flywheel/campaigns/participating-in-a-campaign.md +2 -2
- package/skills/flywheel/compute/managed-compute.md +26 -7
- package/skills/flywheel/example-workflows/organizing-exploring-and-iterating-on-a-research-topic.md +11 -11
- package/skills/flywheel/example-workflows/reproducing-papers-on-a-budget.md +8 -8
- package/skills/flywheel/getting-started/flywheel-tutorial-overview.md +2 -1
- package/skills/flywheel/references/ARTIFACTS.md +48 -0
- package/skills/flywheel/references/INTERFACES.md +208 -0
- package/skills/flywheel/references/experiment-design-protocol.md +5 -5
- package/skills/flywheel/references/flywheel-cli-tool-map.md +244 -0
- package/skills/flywheel/references/flywheel-mcp-tool-map.md +109 -63
- package/skills/flywheel/setting-up-flywheel/claude-code-cli-installation.md +1 -1
- package/skills/flywheel/setting-up-flywheel/codex-cli-installation.md +1 -1
- package/skills/flywheel/setting-up-flywheel/how-can-i-get-an-authorized-client_id-for-the-oauth-flow.md +3 -3
- package/skills/flywheel/setting-up-flywheel/installation-overview.md +19 -4
- package/skills/flywheel/setting-up-flywheel/other-hosts-installation.md +1 -1
- package/skills/flywheel/usage-and-workflows/what-to-do-with-flywheel.md +28 -1
- package/skills/flywheel/web-ui/the-flywheel-web-ui.md +1 -1
- package/skills/flywheel-auto/SKILL.md +23 -12
- package/skills/flywheel-auto/references/ARTIFACTS.md +1 -1
- package/skills/flywheel-auto/references/INTERFACES.md +61 -59
- package/skills/flywheel-auto/references/experiment-design-protocol.md +5 -5
- package/skills/flywheel-auto/references/flywheel-cli-tool-map.md +244 -0
- package/skills/flywheel-auto/references/flywheel-mcp-tool-map.md +76 -63
- package/skills/flywheel-lookahead/SKILL.md +22 -11
- package/skills/flywheel-lookahead/references/ARTIFACTS.md +1 -1
- package/skills/flywheel-lookahead/references/INTERFACES.md +61 -59
- package/skills/flywheel-lookahead/references/flywheel-cli-tool-map.md +244 -0
- package/skills/flywheel-lookahead/references/flywheel-mcp-tool-map.md +76 -63
- package/skills/flywheel-prove/SKILL.md +17 -0
- package/skills/flywheel-reproduce/SKILL.md +23 -12
- package/skills/flywheel-reproduce/references/ARTIFACTS.md +1 -1
- package/skills/flywheel-reproduce/references/INTERFACES.md +61 -59
- package/skills/flywheel-reproduce/references/experiment-design-protocol.md +5 -5
- package/skills/flywheel-reproduce/references/flywheel-cli-tool-map.md +244 -0
- package/skills/flywheel-reproduce/references/flywheel-mcp-tool-map.md +76 -63
- package/skills/flywheel-to-graph/SKILL.md +20 -9
- package/skills/flywheel-to-graph/references/ARTIFACTS.md +1 -1
- package/skills/flywheel-to-graph/references/INTERFACES.md +61 -59
- package/skills/flywheel-to-graph/references/flywheel-cli-tool-map.md +244 -0
- package/skills/flywheel-to-graph/references/flywheel-mcp-tool-map.md +76 -63
- package/skills/flywheel-tree/SKILL.md +70 -0
- package/skills/flywheel-tree/agents/interface.yaml +4 -0
- package/skills/flywheel-tree/assets/ansi_palette.json +29 -0
- package/skills/flywheel-tree/references/workflow.md +108 -0
- package/skills/flywheel-tree/scripts/render_tree.py +407 -0
- package/skills/flywheel-tree/scripts/render_tree_via_mcp.py +694 -0
- package/src/cli.mjs +204 -582
- package/src/mcp-writer.mjs +2 -2
- package/src/runtime/delegate.mjs +21 -0
- package/src/runtime/required-runtime-commands.json +117 -0
- package/src/runtime/runtime-config.mjs +84 -0
- package/src/runtime/vendor/.gitkeep +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/active-key-id.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/active-key-id.js +22 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/active-key-id.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/baseurl.d.ts +35 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/baseurl.js +64 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/baseurl.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/config.d.ts +34 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/config.js +92 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/config.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/fingerprint.d.ts +5 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/fingerprint.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/fingerprint.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/keychain.d.ts +4 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/keychain.js +31 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/keychain.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/login.d.ts +23 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/login.js +387 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/login.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/profile.d.ts +15 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/profile.js +150 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/profile.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.d.ts +26 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.js +27 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.d.ts +32 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.js +171 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.js +26 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-writer.d.ts +34 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-writer.js +63 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-writer.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_wait-polling.d.ts +29 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_wait-polling.js +75 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_wait-polling.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-detach.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-detach.js +13 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-detach.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-add.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-add.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-add.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-remove.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-remove.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-remove.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-set-primary.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-set-primary.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-set-primary.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-preview.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-preview.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-preview.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-proof.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-proof.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-proof.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge.js +11 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/aliases.d.ts +13 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/aliases.js +13 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/aliases.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-create.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-create.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-create.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-delete.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-delete.js +20 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-delete.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-rotate.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-rotate.js +21 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-rotate.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-expire.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-expire.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-expire.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-heartbeat.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-heartbeat.js +29 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-heartbeat.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-list.js +10 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/approval-sessions-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-get.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-get.js +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-get.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-list.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-note-set.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-note-set.js +9 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-note-set.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-finalize.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-finalize.js +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-finalize.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-prepare.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-prepare.js +15 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload-prepare.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload.js +5 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-upload.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-clear.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-clear.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-clear.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-set.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-set.js +30 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-keychain-set.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-login.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-login.js +34 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-login.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.js +4 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/blobs-get.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/blobs-get.js +18 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/blobs-get.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-create.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-create.js +11 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-create.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-list.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-list.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-revoke.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-revoke.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-revoke.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-update.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-update.js +22 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-budgets-update.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-snapshot.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-snapshot.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/campaign-snapshot.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-acquire.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-acquire.js +39 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-acquire.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-budgets.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-budgets.js +14 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-budgets.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-connection.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-connection.js +13 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-connection.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-funding.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-funding.js +10 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-funding.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-list.js +13 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-request-approval.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-request-approval.js +53 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-request-approval.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-options.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-options.js +17 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-options.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-get.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-get.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-get.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-set.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-set.js +19 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-set.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release-all.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release-all.js +39 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release-all.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release.js +28 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-status.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-status.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-status.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-balance.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-balance.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-balance.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-billing-portal.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-billing-portal.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-billing-portal.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-purchase.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-purchase.js +10 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-purchase.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral-claim.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral-claim.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral-claim.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-referral.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscribe.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscribe.js +14 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscribe.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscription.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscription.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscription.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-transactions.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-transactions.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-transactions.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-usage.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-usage.js +9 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-usage.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/enums.d.ts +16 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/enums.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/enums.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/env.d.ts +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/env.js +65 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/env.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/executions-launch.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/executions-launch.js +11 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/executions-launch.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/executions-list.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/executions-list.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/executions-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/executions-terminate.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/executions-terminate.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/executions-terminate.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-history.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-history.js +82 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-history.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-subgraph.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-subgraph.js +18 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-subgraph.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-pdf.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-pdf.js +19 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-pdf.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-render-pdf.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-render-pdf.js +65 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-render-pdf.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-stream.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-stream.js +174 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary-stream.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary.js +9 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-summary.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/files-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/files-list.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/files-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-disconnect.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-disconnect.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-disconnect.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-link.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-link.js +17 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-link.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-refresh-repos.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-refresh-repos.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-refresh-repos.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-status.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-status.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-status.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/graph-get.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/graph-get.js +15 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/graph-get.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/handler-factory.d.ts +22 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/handler-factory.js +51 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/handler-factory.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/help.d.ts +23 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/help.js +258 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/help.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/import-subgraph.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/import-subgraph.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/import-subgraph.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/index.d.ts +20 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/index.js +238 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/index.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-remove.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-remove.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-remove.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-set.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-set.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-set.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-status.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-status.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-status.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-remove.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-remove.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-remove.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-set.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-set.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-set.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/machines-list.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/machines-list.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/machines-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.js +10 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-audit-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-audit-list.js +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-audit-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-branch.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-branch.js +10 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-branch.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit-new.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit-new.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit-new.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit.js +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-commit.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-create.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-create.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-create.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.js +14 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.js +9 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-files.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-files.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-files.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-get.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-get.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-get.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-list.js +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-merge.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-merge.js +33 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-merge.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-ancestry.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-ancestry.js +10 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-ancestry.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-summary.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-summary.js +10 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-summary.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-tree.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-tree.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-render-tree.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-resolve-slug.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-resolve-slug.js +13 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-resolve-slug.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-get.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-get.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-get.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set-bulk.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set-bulk.js +20 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set-bulk.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set.js +10 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-set.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-summaries.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-summaries.js +11 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-sharing-summaries.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-backfill-hypothesis.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-backfill-hypothesis.js +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-backfill-hypothesis.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-backfill-insights.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-backfill-insights.js +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-backfill-insights.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-acquire.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-acquire.js +13 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-acquire.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-heartbeat.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-heartbeat.js +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-heartbeat.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-release.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-release.js +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-stage-lease-release.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.js +56 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-unset.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-unset.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-unset.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/account.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/account.js +124 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/account.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/api-keys.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/api-keys.js +103 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/api-keys.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/approval.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/approval.js +101 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/approval.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.js +104 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.js +37 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/budgets.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/budgets.js +72 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/budgets.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.js +128 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/credits.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/credits.js +134 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/credits.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/env.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/env.js +39 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/env.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/executions.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/executions.js +55 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/executions.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/export.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/export.js +88 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/export.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/github.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/github.js +60 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/github.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/graph.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/graph.js +22 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/graph.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/integrations.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/integrations.js +69 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/integrations.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.js +284 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.js +82 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.js +108 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/sharing.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/sharing.js +69 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/sharing.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/tagging.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/tagging.js +98 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/tagging.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/updates.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/updates.js +70 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/updates.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry.d.ts +25 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry.js +441 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-assign.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-assign.js +25 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-assign.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-create.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-create.js +25 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-create.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-delete.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-delete.js +11 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-delete.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-update.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-update.js +28 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/tags-update.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/types.d.ts +30 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/types.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/types.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide-all-active.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide-all-active.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide-all-active.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide.js +10 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/updates-hide.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/updates-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/updates-list.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/updates-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/utils.d.ts +10 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/utils.js +171 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/utils.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/errors.d.ts +55 -0
- package/src/runtime/vendor/flywheel-cli-dist/errors.js +51 -0
- package/src/runtime/vendor/flywheel-cli-dist/errors.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/exit-codes.d.ts +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/exit-codes.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/exit-codes.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/grammar/globals.d.ts +26 -0
- package/src/runtime/vendor/flywheel-cli-dist/grammar/globals.js +117 -0
- package/src/runtime/vendor/flywheel-cli-dist/grammar/globals.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/grammar/parse.d.ts +17 -0
- package/src/runtime/vendor/flywheel-cli-dist/grammar/parse.js +102 -0
- package/src/runtime/vendor/flywheel-cli-dist/grammar/parse.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/client.d.ts +75 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/client.js +369 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/client.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/debug.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/debug.js +68 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/debug.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/poll.d.ts +18 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/poll.js +57 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/poll.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/retry.d.ts +30 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/retry.js +127 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/retry.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/main.d.ts +31 -0
- package/src/runtime/vendor/flywheel-cli-dist/main.js +763 -0
- package/src/runtime/vendor/flywheel-cli-dist/main.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/output/format.d.ts +9 -0
- package/src/runtime/vendor/flywheel-cli-dist/output/format.js +129 -0
- package/src/runtime/vendor/flywheel-cli-dist/output/format.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/runtime-entry.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/runtime-entry.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/runtime-entry.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/version.d.ts +3 -0
- package/src/runtime/vendor/flywheel-cli-dist/version.js +31 -0
- package/src/runtime/vendor/flywheel-cli-dist/version.js.map +1 -0
- package/src/runtime/vendor/manifest.json +500 -0
- package/src/setup/command.mjs +24 -0
- package/src/setup/io/patchers/json.mjs +33 -0
- package/src/setup/io/patchers/toml.mjs +15 -0
- package/src/setup/io/patchers/yaml.mjs +33 -0
- package/src/setup/mode.mjs +113 -0
- package/src/setup/modes/cli.mjs +317 -0
- package/src/setup/modes/mcp-command.mjs +850 -0
- package/src/setup/modes/mcp.mjs +176 -0
- package/src/setup/preflight.mjs +54 -0
- package/src/setup/shared/prior-mode-detect.mjs +412 -0
- package/src/setup/shared/skill.mjs +12 -0
- package/src/setup/shared/summary.mjs +80 -0
- package/src/setup-auth.mjs +293 -178
- package/src/unified-cli.mjs +161 -0
package/src/cli.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { checkbox,
|
|
2
|
+
import { checkbox, select } from "@inquirer/prompts";
|
|
3
3
|
import ora from "ora";
|
|
4
4
|
import pc from "picocolors";
|
|
5
|
-
import { readFile
|
|
5
|
+
import { readFile } from "node:fs/promises";
|
|
6
6
|
import path from "node:path";
|
|
7
|
-
import { randomBytes } from "node:crypto";
|
|
8
7
|
|
|
9
8
|
import {
|
|
10
9
|
ALL_HOST_NAMES,
|
|
@@ -15,8 +14,6 @@ import {
|
|
|
15
14
|
normalizeHosts,
|
|
16
15
|
} from "./agents.mjs";
|
|
17
16
|
import {
|
|
18
|
-
appendTomlServer,
|
|
19
|
-
mergeServerEntry,
|
|
20
17
|
readNamedConfigEntry,
|
|
21
18
|
readJsonConfig,
|
|
22
19
|
readTomlServerEntry,
|
|
@@ -28,35 +25,27 @@ import {
|
|
|
28
25
|
writeYamlConfig,
|
|
29
26
|
} from "./mcp-writer.mjs";
|
|
30
27
|
import {
|
|
31
|
-
acquireApiKeyViaBrowserBridge,
|
|
32
|
-
acquireApiKeyViaDeviceFlow,
|
|
33
|
-
resolveSetupAuthMode,
|
|
34
|
-
} from "./setup-auth.mjs";
|
|
35
|
-
import {
|
|
36
|
-
cleanupInstalledSkillArtifactsForHosts,
|
|
37
|
-
formatSupportedInstallSkillHosts,
|
|
38
|
-
inspectInstalledSkillArtifactsForHosts,
|
|
39
|
-
installBundledSkillForHosts,
|
|
40
28
|
listBundledSkills,
|
|
41
29
|
partitionInstallSkillHosts,
|
|
42
30
|
removeInstalledSkillsForHosts,
|
|
43
|
-
resolveSkillsAgentName,
|
|
44
31
|
SUPPORTED_INSTALL_SKILL_HOSTS,
|
|
45
|
-
resolveInstalledSkillDir,
|
|
46
32
|
resolvePackageRoot,
|
|
47
33
|
} from "./skill-installer.mjs";
|
|
34
|
+
import { normalizeSetupAuthMode } from "./setup-auth.mjs";
|
|
35
|
+
import { runSetupRouter } from "./setup/command.mjs";
|
|
36
|
+
import { SetupModeUsageError } from "./setup/mode.mjs";
|
|
37
|
+
import { runCliSetupMode } from "./setup/modes/cli.mjs";
|
|
38
|
+
import {
|
|
39
|
+
buildGuidedSkillInstallPrompt,
|
|
40
|
+
runMcpModeCommand,
|
|
41
|
+
} from "./setup/modes/mcp-command.mjs";
|
|
42
|
+
import { renderSetupSummary } from "./setup/shared/summary.mjs";
|
|
43
|
+
|
|
44
|
+
export { buildGuidedSkillInstallPrompt };
|
|
48
45
|
|
|
49
46
|
const INSTALL_SKILL_BASE_URL = "https://flywheel.paradigma.inc";
|
|
50
47
|
const DEFAULT_BASE_URL =
|
|
51
48
|
process.env.FLYWHEEL_PUBLIC_BASE_URL || INSTALL_SKILL_BASE_URL;
|
|
52
|
-
const NON_INTERACTIVE_SKILL_DECISION_ERROR =
|
|
53
|
-
"Non-interactive setup requires one of --install-skill or --skip-skill.";
|
|
54
|
-
const MUTUALLY_EXCLUSIVE_SKILL_FLAGS_ERROR =
|
|
55
|
-
"--install-skill and --skip-skill cannot be used together.";
|
|
56
|
-
const GUIDED_SKILL_DECISION_TEST_ENV =
|
|
57
|
-
"FLYWHEEL_GUIDED_SKILL_DECISION_FOR_TESTS";
|
|
58
|
-
const ENABLE_TEST_SEAMS_ENV = "FLYWHEEL_ENABLE_TEST_SEAMS";
|
|
59
|
-
|
|
60
49
|
const log = {
|
|
61
50
|
info: (message) => console.log(pc.cyan(message)),
|
|
62
51
|
warn: (message) => console.log(pc.yellow(`⚠ ${message}`)),
|
|
@@ -99,17 +88,7 @@ function normalizeServerName(value) {
|
|
|
99
88
|
}
|
|
100
89
|
|
|
101
90
|
function normalizeAuthMode(value) {
|
|
102
|
-
|
|
103
|
-
.trim()
|
|
104
|
-
.toLowerCase();
|
|
105
|
-
if (
|
|
106
|
-
normalized === "auto" ||
|
|
107
|
-
normalized === "loopback" ||
|
|
108
|
-
normalized === "device"
|
|
109
|
-
) {
|
|
110
|
-
return normalized;
|
|
111
|
-
}
|
|
112
|
-
throw new Error("Auth mode must be one of: auto, loopback, device.");
|
|
91
|
+
return normalizeSetupAuthMode(value);
|
|
113
92
|
}
|
|
114
93
|
|
|
115
94
|
function selectedHostsFromOptions(options) {
|
|
@@ -124,6 +103,37 @@ function selectedHostsFromOptions(options) {
|
|
|
124
103
|
return hosts;
|
|
125
104
|
}
|
|
126
105
|
|
|
106
|
+
const UNINSTALL_OPTION_KEY_BY_HOST = Object.freeze({
|
|
107
|
+
claude: "claude",
|
|
108
|
+
codex: "codex",
|
|
109
|
+
opencode: "opencode",
|
|
110
|
+
cursor: "cursor",
|
|
111
|
+
"pi-mono": "piMono",
|
|
112
|
+
"hermes-agent": "hermesAgent",
|
|
113
|
+
openclaw: "openclaw",
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
function buildUninstallOptionsForHosts({
|
|
117
|
+
hostNames = [],
|
|
118
|
+
scope = "project",
|
|
119
|
+
serverName = SERVER_NAME,
|
|
120
|
+
} = {}) {
|
|
121
|
+
const options = {
|
|
122
|
+
yes: true,
|
|
123
|
+
scope,
|
|
124
|
+
name: serverName,
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
for (const hostName of hostNames) {
|
|
128
|
+
const optionKey = UNINSTALL_OPTION_KEY_BY_HOST[hostName];
|
|
129
|
+
if (optionKey) {
|
|
130
|
+
options[optionKey] = true;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return options;
|
|
135
|
+
}
|
|
136
|
+
|
|
127
137
|
function parseHostsList(value) {
|
|
128
138
|
if (!value) return [];
|
|
129
139
|
return normalizeHosts(
|
|
@@ -134,6 +144,10 @@ function parseHostsList(value) {
|
|
|
134
144
|
);
|
|
135
145
|
}
|
|
136
146
|
|
|
147
|
+
function collectModeValues(value, previousValues = []) {
|
|
148
|
+
return [...previousValues, value];
|
|
149
|
+
}
|
|
150
|
+
|
|
137
151
|
function mcpCandidatesForScope(host, scope) {
|
|
138
152
|
if (scope === "global") return host.mcp.globalPaths;
|
|
139
153
|
return host.mcp.projectPaths.map((candidate) =>
|
|
@@ -171,95 +185,12 @@ async function readExistingServerState(hostName, scope, serverName) {
|
|
|
171
185
|
};
|
|
172
186
|
}
|
|
173
187
|
|
|
174
|
-
async function
|
|
175
|
-
hostNames,
|
|
176
|
-
scope,
|
|
177
|
-
serverName,
|
|
178
|
-
serverUrl,
|
|
179
|
-
}) {
|
|
180
|
-
const hostStates = new Map();
|
|
181
|
-
const needsSetupHosts = [];
|
|
182
|
-
const driftHosts = [];
|
|
183
|
-
|
|
184
|
-
for (const hostName of hostNames) {
|
|
185
|
-
// eslint-disable-next-line no-await-in-loop
|
|
186
|
-
const existingState = await readExistingServerState(
|
|
187
|
-
hostName,
|
|
188
|
-
scope,
|
|
189
|
-
serverName,
|
|
190
|
-
);
|
|
191
|
-
if (!existingState.exists) {
|
|
192
|
-
needsSetupHosts.push(hostName);
|
|
193
|
-
hostStates.set(hostName, {
|
|
194
|
-
classification: "needs-setup",
|
|
195
|
-
mcpPath: existingState.mcpPath,
|
|
196
|
-
});
|
|
197
|
-
continue;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
if (existingState.url === serverUrl) {
|
|
201
|
-
hostStates.set(hostName, {
|
|
202
|
-
classification: "matching",
|
|
203
|
-
mcpPath: existingState.mcpPath,
|
|
204
|
-
});
|
|
205
|
-
continue;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
driftHosts.push({
|
|
209
|
-
hostName,
|
|
210
|
-
mcpPath: existingState.mcpPath,
|
|
211
|
-
existingUrl: existingState.url ?? "(missing URL)",
|
|
212
|
-
});
|
|
213
|
-
hostStates.set(hostName, {
|
|
214
|
-
classification: "drift",
|
|
215
|
-
mcpPath: existingState.mcpPath,
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
return { hostStates, needsSetupHosts, driftHosts };
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
function formatInstallSkillDriftError({
|
|
223
|
-
hostName,
|
|
188
|
+
async function promptHosts(
|
|
224
189
|
scope,
|
|
190
|
+
detected,
|
|
225
191
|
serverName,
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}) {
|
|
229
|
-
const host = getHost(hostName);
|
|
230
|
-
const scopeFlag = scope === "project" ? "--scope project" : "--scope global";
|
|
231
|
-
return `Flywheel MCP entry '${serverName}' for ${host.displayName} already points to ${existingUrl}, not ${requestedUrl}. Run 'flywheel uninstall ${scopeFlag} --${hostName} --name ${serverName}' first or choose a different --name.`;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
function getGuidedSkillDecisionOverrideForTests() {
|
|
235
|
-
const testSeamsEnabled =
|
|
236
|
-
String(process.env[ENABLE_TEST_SEAMS_ENV] || "").trim() === "1";
|
|
237
|
-
if (!testSeamsEnabled) {
|
|
238
|
-
return "";
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
const normalizedGuidedDecisionOverride = String(
|
|
242
|
-
process.env[GUIDED_SKILL_DECISION_TEST_ENV] || "",
|
|
243
|
-
)
|
|
244
|
-
.trim()
|
|
245
|
-
.toLowerCase();
|
|
246
|
-
if (normalizedGuidedDecisionOverride.length === 0) {
|
|
247
|
-
return "";
|
|
248
|
-
}
|
|
249
|
-
if (
|
|
250
|
-
normalizedGuidedDecisionOverride === "accept" ||
|
|
251
|
-
normalizedGuidedDecisionOverride === "decline" ||
|
|
252
|
-
normalizedGuidedDecisionOverride === "abort"
|
|
253
|
-
) {
|
|
254
|
-
return normalizedGuidedDecisionOverride;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
throw new Error(
|
|
258
|
-
`${GUIDED_SKILL_DECISION_TEST_ENV} must be one of: accept, decline, abort.`,
|
|
259
|
-
);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
async function promptHosts(scope, detected, serverName) {
|
|
192
|
+
{ disableAlreadyConfigured = true } = {},
|
|
193
|
+
) {
|
|
263
194
|
const choices = await Promise.all(
|
|
264
195
|
ALL_HOST_NAMES.map(async (hostName) => {
|
|
265
196
|
const configured = await isAlreadyConfigured(
|
|
@@ -271,12 +202,18 @@ async function promptHosts(scope, detected, serverName) {
|
|
|
271
202
|
name: SETUP_HOST_NAMES[hostName],
|
|
272
203
|
value: hostName,
|
|
273
204
|
checked: detected.includes(hostName),
|
|
274
|
-
disabled:
|
|
205
|
+
disabled:
|
|
206
|
+
disableAlreadyConfigured && configured
|
|
207
|
+
? "(already configured)"
|
|
208
|
+
: false,
|
|
275
209
|
};
|
|
276
210
|
}),
|
|
277
211
|
);
|
|
278
212
|
|
|
279
|
-
if (
|
|
213
|
+
if (
|
|
214
|
+
disableAlreadyConfigured &&
|
|
215
|
+
choices.every((choice) => Boolean(choice.disabled))
|
|
216
|
+
) {
|
|
280
217
|
log.info("Flywheel is already configured for all detected hosts.");
|
|
281
218
|
return null;
|
|
282
219
|
}
|
|
@@ -295,7 +232,12 @@ async function promptHosts(scope, detected, serverName) {
|
|
|
295
232
|
}
|
|
296
233
|
}
|
|
297
234
|
|
|
298
|
-
async function resolveHosts(
|
|
235
|
+
async function resolveHosts(
|
|
236
|
+
options,
|
|
237
|
+
scope,
|
|
238
|
+
serverName,
|
|
239
|
+
{ allowPrompt = true, disableAlreadyConfigured = true } = {},
|
|
240
|
+
) {
|
|
299
241
|
const explicit = selectedHostsFromOptions(options);
|
|
300
242
|
if (explicit.length > 0) return explicit;
|
|
301
243
|
|
|
@@ -314,7 +256,9 @@ async function resolveHosts(options, scope, serverName, allowPrompt = true) {
|
|
|
314
256
|
}
|
|
315
257
|
|
|
316
258
|
log.blank();
|
|
317
|
-
const selected = await promptHosts(scope, detected, serverName
|
|
259
|
+
const selected = await promptHosts(scope, detected, serverName, {
|
|
260
|
+
disableAlreadyConfigured,
|
|
261
|
+
});
|
|
318
262
|
if (!selected) {
|
|
319
263
|
log.warn("Setup cancelled");
|
|
320
264
|
return [];
|
|
@@ -322,483 +266,152 @@ async function resolveHosts(options, scope, serverName, allowPrompt = true) {
|
|
|
322
266
|
return selected;
|
|
323
267
|
}
|
|
324
268
|
|
|
325
|
-
|
|
326
|
-
if (Object.hasOwn(options, "apiKey")) {
|
|
327
|
-
const normalizedApiKey = String(options.apiKey || "").trim();
|
|
328
|
-
if (normalizedApiKey.length === 0) {
|
|
329
|
-
throw new Error("--api-key cannot be empty.");
|
|
330
|
-
}
|
|
331
|
-
return normalizedApiKey;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
const requestedAuthMode = normalizeAuthMode(options.authMode || "auto");
|
|
335
|
-
const resolvedAuthMode = resolveSetupAuthMode({
|
|
336
|
-
requestedMode: requestedAuthMode,
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
const spinner = ora("Configuring authentication...").start();
|
|
340
|
-
try {
|
|
341
|
-
const keyName = `flywheel-setup-${randomBytes(3).toString("hex")}`;
|
|
342
|
-
const authResult =
|
|
343
|
-
resolvedAuthMode === "device"
|
|
344
|
-
? await acquireApiKeyViaDeviceFlow({
|
|
345
|
-
baseUrl,
|
|
346
|
-
keyName,
|
|
347
|
-
verificationBaseUrl: baseUrl,
|
|
348
|
-
})
|
|
349
|
-
: await acquireApiKeyViaBrowserBridge({
|
|
350
|
-
baseUrl,
|
|
351
|
-
keyName,
|
|
352
|
-
});
|
|
353
|
-
spinner.succeed(`Authenticated (${resolvedAuthMode})`);
|
|
354
|
-
return authResult.apiKey;
|
|
355
|
-
} catch (error) {
|
|
356
|
-
spinner.fail("Authentication failed");
|
|
357
|
-
const message =
|
|
358
|
-
error instanceof Error ? error.message : "Authentication failed.";
|
|
359
|
-
if (resolvedAuthMode === "loopback" && requestedAuthMode === "auto") {
|
|
360
|
-
throw new Error(`${message} Try --auth-mode device on remote shells.`);
|
|
361
|
-
}
|
|
362
|
-
throw new Error(message);
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
async function setupHost(hostName, scope, serverUrl, apiKey, serverName) {
|
|
367
|
-
const host = getHost(hostName);
|
|
368
|
-
const mcpPath = await resolveMcpPath(mcpCandidatesForScope(host, scope));
|
|
369
|
-
|
|
370
|
-
if (host.mcp.configType === "toml") {
|
|
371
|
-
const { alreadyExists } = await appendTomlServer(
|
|
372
|
-
mcpPath,
|
|
373
|
-
serverName,
|
|
374
|
-
host.mcp.buildEntry({ serverUrl, apiKey }),
|
|
375
|
-
);
|
|
376
|
-
return {
|
|
377
|
-
host: host.displayName,
|
|
378
|
-
status: alreadyExists ? "already configured" : "configured with API Key",
|
|
379
|
-
filePath: mcpPath,
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
const existing =
|
|
384
|
-
host.mcp.configType === "yaml"
|
|
385
|
-
? await readYamlConfig(mcpPath)
|
|
386
|
-
: await readJsonConfig(mcpPath);
|
|
387
|
-
const { config, alreadyExists } = mergeServerEntry(
|
|
388
|
-
existing,
|
|
389
|
-
host.mcp.configKey,
|
|
390
|
-
serverName,
|
|
391
|
-
host.mcp.buildEntry({ serverUrl, apiKey }),
|
|
392
|
-
);
|
|
393
|
-
if (config !== existing) {
|
|
394
|
-
if (host.mcp.configType === "yaml") {
|
|
395
|
-
await writeYamlConfig(mcpPath, config);
|
|
396
|
-
} else {
|
|
397
|
-
await writeJsonConfig(mcpPath, config);
|
|
398
|
-
}
|
|
399
|
-
}
|
|
269
|
+
export function buildSetupModePromptConfig() {
|
|
400
270
|
return {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
271
|
+
message: "How should your agent access Flywheel?",
|
|
272
|
+
choices: [
|
|
273
|
+
{
|
|
274
|
+
name: `MCP + bundled skills\n ${pc.dim("Agent calls Flywheel tools via MCP protocol to manage nodes, artifacts, and compute")}`,
|
|
275
|
+
value: "mcp",
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
name: `CLI + bundled skills\n ${pc.dim("Agent shells out to the flywheel binary to manage nodes, artifacts, and compute")}`,
|
|
279
|
+
value: "cli",
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
default: "mcp",
|
|
283
|
+
theme: CHECKBOX_THEME,
|
|
404
284
|
};
|
|
405
285
|
}
|
|
406
286
|
|
|
407
|
-
function
|
|
408
|
-
|
|
409
|
-
scope,
|
|
410
|
-
serverUrl,
|
|
411
|
-
{ showSkillRefreshGuidance = false, experimentalSyncAgents = [] } = {},
|
|
412
|
-
) {
|
|
413
|
-
log.blank();
|
|
414
|
-
log.plain(pc.green("✔ Flywheel setup complete"));
|
|
415
|
-
log.blank();
|
|
416
|
-
log.plain(` Scope: ${pc.bold(scope)}`);
|
|
417
|
-
log.plain(` Server URL: ${pc.bold(serverUrl)}`);
|
|
418
|
-
for (const result of results) {
|
|
419
|
-
const icon = result.status.startsWith("configured")
|
|
420
|
-
? pc.green("+")
|
|
421
|
-
: pc.dim("~");
|
|
422
|
-
log.plain(` ${pc.bold(result.host)}`);
|
|
423
|
-
log.plain(` ${icon} ${result.status}`);
|
|
424
|
-
log.plain(` ${pc.dim(result.filePath)}`);
|
|
425
|
-
}
|
|
426
|
-
if (showSkillRefreshGuidance) {
|
|
427
|
-
log.blank();
|
|
428
|
-
log.plain(" Bundled skill refresh guidance");
|
|
429
|
-
log.plain(
|
|
430
|
-
` Preferred: ${pc.bold("npx --yes @paradigma-inc/flywheel@latest setup --install-skill --project")}`,
|
|
431
|
-
);
|
|
432
|
-
log.plain(
|
|
433
|
-
` ${pc.bold("npm install --save-dev @paradigma-inc/flywheel@latest")}`,
|
|
434
|
-
);
|
|
435
|
-
if (experimentalSyncAgents.length === 1) {
|
|
436
|
-
log.plain(" Optional path via skills experimental_sync:");
|
|
437
|
-
log.plain(
|
|
438
|
-
` ${pc.bold(`npx skills experimental_sync --agent ${experimentalSyncAgents[0]} -y`)}`,
|
|
439
|
-
);
|
|
440
|
-
} else if (experimentalSyncAgents.length > 1) {
|
|
441
|
-
log.plain(" Optional path via skills experimental_sync for selected hosts:");
|
|
442
|
-
for (const agentName of experimentalSyncAgents) {
|
|
443
|
-
log.plain(
|
|
444
|
-
` ${pc.bold(`npx skills experimental_sync --agent ${agentName} -y`)}`,
|
|
445
|
-
);
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
log.blank();
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
function resolveExperimentalSyncAgentsForHosts(supportedHosts) {
|
|
453
|
-
const agentNames = [];
|
|
454
|
-
const seenAgentNames = new Set();
|
|
455
|
-
|
|
456
|
-
for (const hostName of supportedHosts) {
|
|
457
|
-
const agentName = resolveSkillsAgentName(hostName);
|
|
458
|
-
if (seenAgentNames.has(agentName)) {
|
|
459
|
-
continue;
|
|
460
|
-
}
|
|
461
|
-
seenAgentNames.add(agentName);
|
|
462
|
-
agentNames.push(agentName);
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
return agentNames;
|
|
287
|
+
async function promptSetupMode() {
|
|
288
|
+
return await select(buildSetupModePromptConfig());
|
|
466
289
|
}
|
|
467
290
|
|
|
468
|
-
|
|
469
|
-
bundledSkillNames,
|
|
470
|
-
unsupportedHosts,
|
|
471
|
-
guidedDecisionOverride = "",
|
|
472
|
-
) {
|
|
473
|
-
if (guidedDecisionOverride === "accept") {
|
|
474
|
-
return true;
|
|
475
|
-
}
|
|
476
|
-
if (
|
|
477
|
-
guidedDecisionOverride === "decline" ||
|
|
478
|
-
guidedDecisionOverride === "abort"
|
|
479
|
-
) {
|
|
480
|
-
return false;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
const message = buildGuidedSkillInstallPrompt({
|
|
484
|
-
unsupportedHosts,
|
|
485
|
-
bundledSkillNames,
|
|
486
|
-
});
|
|
487
|
-
|
|
488
|
-
try {
|
|
489
|
-
return await confirm({
|
|
490
|
-
message,
|
|
491
|
-
default: true,
|
|
492
|
-
theme: CHECKBOX_THEME,
|
|
493
|
-
});
|
|
494
|
-
} catch {
|
|
495
|
-
return false;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
export function buildGuidedSkillInstallPrompt({
|
|
500
|
-
unsupportedHosts,
|
|
501
|
-
bundledSkillNames,
|
|
502
|
-
}) {
|
|
503
|
-
const usesPlural = bundledSkillNames.length > 1;
|
|
504
|
-
if (unsupportedHosts.length > 0) {
|
|
505
|
-
return usesPlural
|
|
506
|
-
? `Also install or refresh the bundled Flywheel skills for supported hosts? Unsupported hosts (${unsupportedHosts.join(", ")}) will remain MCP-only.`
|
|
507
|
-
: `Also install or refresh the bundled Flywheel skill for supported hosts? Unsupported hosts (${unsupportedHosts.join(", ")}) will remain MCP-only.`;
|
|
508
|
-
}
|
|
509
|
-
return usesPlural
|
|
510
|
-
? "Also install or refresh the bundled Flywheel skills?"
|
|
511
|
-
: "Also install or refresh the bundled Flywheel skill?";
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
function logBundledSkillInstallPlan({
|
|
515
|
-
bundledSkillNames,
|
|
516
|
-
projectRoot,
|
|
517
|
-
scope,
|
|
518
|
-
supportedHosts,
|
|
519
|
-
}) {
|
|
520
|
-
for (const hostName of supportedHosts) {
|
|
521
|
-
const hostDisplayName = getHost(hostName).displayName;
|
|
522
|
-
const resolvedSkillRoot = path.dirname(
|
|
523
|
-
resolveInstalledSkillDir(
|
|
524
|
-
projectRoot,
|
|
525
|
-
hostName,
|
|
526
|
-
scope,
|
|
527
|
-
bundledSkillNames[0],
|
|
528
|
-
),
|
|
529
|
-
);
|
|
530
|
-
log.plain(
|
|
531
|
-
`Installing bundled skills for ${hostDisplayName} (${scope}: ${resolvedSkillRoot}): ${bundledSkillNames.join(", ")}`,
|
|
532
|
-
);
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
function normalizeSkillDecisionMode(options) {
|
|
291
|
+
function validateCliModeSkillFlags(options) {
|
|
537
292
|
if (options.installSkill && options.skipSkill) {
|
|
538
|
-
throw new
|
|
293
|
+
throw new SetupModeUsageError(
|
|
294
|
+
"--install-skill and --skip-skill cannot be used together.",
|
|
295
|
+
);
|
|
539
296
|
}
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
if (!cleanupState?.backupRoot) {
|
|
547
|
-
return null;
|
|
297
|
+
// CLI mode is intentionally "skills only", so --skip-skill would contradict
|
|
298
|
+
// the mode contract and silently surprising behavior should be rejected.
|
|
299
|
+
if (options.skipSkill) {
|
|
300
|
+
throw new SetupModeUsageError(
|
|
301
|
+
"--skip-skill is not supported with --mode cli; use --mode mcp --skip-skill for MCP-only setup.",
|
|
302
|
+
);
|
|
548
303
|
}
|
|
549
|
-
await rm(cleanupState.backupRoot, { force: true, recursive: true });
|
|
550
|
-
return null;
|
|
551
304
|
}
|
|
552
305
|
|
|
553
|
-
async function
|
|
554
|
-
|
|
555
|
-
const skillDecisionMode = normalizeSkillDecisionMode(options);
|
|
556
|
-
const guidedSkillDecisionOverride = getGuidedSkillDecisionOverrideForTests();
|
|
557
|
-
const nonInteractive = process.stdout.isTTY !== true;
|
|
558
|
-
const hasGuidedDecisionOverride = guidedSkillDecisionOverride.length > 0;
|
|
559
|
-
if (
|
|
560
|
-
nonInteractive &&
|
|
561
|
-
skillDecisionMode === "guided" &&
|
|
562
|
-
!hasGuidedDecisionOverride
|
|
563
|
-
) {
|
|
564
|
-
throw new Error(NON_INTERACTIVE_SKILL_DECISION_ERROR);
|
|
565
|
-
}
|
|
566
|
-
|
|
306
|
+
async function runCliModeCommand(options) {
|
|
307
|
+
validateCliModeSkillFlags(options);
|
|
567
308
|
const scope = options.project ? "project" : "global";
|
|
568
309
|
const baseUrl = normalizeBaseUrl(options.baseUrl || DEFAULT_BASE_URL);
|
|
569
310
|
const serverUrl = `${baseUrl}/mcp-server`;
|
|
570
311
|
const serverName = normalizeServerName(options.name || SERVER_NAME);
|
|
571
|
-
const hosts = await resolveHosts(
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
);
|
|
577
|
-
if (hosts.length === 0)
|
|
578
|
-
|
|
579
|
-
const { supportedHosts, unsupportedHosts } =
|
|
580
|
-
partitionInstallSkillHosts(hosts);
|
|
581
|
-
const packageRoot = resolvePackageRoot();
|
|
582
|
-
const bundledSkillNames =
|
|
583
|
-
skillDecisionMode === "skip" || supportedHosts.length === 0
|
|
584
|
-
? []
|
|
585
|
-
: await listBundledSkills(packageRoot);
|
|
586
|
-
|
|
587
|
-
if (skillDecisionMode === "install" && supportedHosts.length === 0) {
|
|
588
|
-
throw new Error(
|
|
589
|
-
`--install-skill is not supported for: ${unsupportedHosts.join(", ")}. Supported hosts: ${formatSupportedInstallSkillHosts()}.`,
|
|
590
|
-
);
|
|
591
|
-
}
|
|
592
|
-
if (
|
|
593
|
-
skillDecisionMode !== "skip" &&
|
|
594
|
-
supportedHosts.length > 0 &&
|
|
595
|
-
bundledSkillNames.length === 0
|
|
596
|
-
) {
|
|
597
|
-
throw new Error(`No bundled skills found under ${path.join(packageRoot, "skills")}.`);
|
|
312
|
+
const hosts = await resolveHosts(options, scope, serverName, {
|
|
313
|
+
allowPrompt: true,
|
|
314
|
+
// CLI mode is a skills refresh/install path, so existing MCP wiring should
|
|
315
|
+
// not make hosts ineligible for selection.
|
|
316
|
+
disableAlreadyConfigured: false,
|
|
317
|
+
});
|
|
318
|
+
if (hosts.length === 0) {
|
|
319
|
+
return { exitCode: 0 };
|
|
598
320
|
}
|
|
599
321
|
|
|
600
|
-
const {
|
|
601
|
-
|
|
602
|
-
needsSetupHosts = [],
|
|
603
|
-
driftHosts = [],
|
|
604
|
-
} = await inspectInstallSkillHosts({
|
|
605
|
-
hostNames: hosts,
|
|
322
|
+
const result = await runCliSetupMode({
|
|
323
|
+
selectedHosts: hosts,
|
|
606
324
|
scope,
|
|
325
|
+
cwd: process.cwd(),
|
|
326
|
+
force: options.force === true,
|
|
327
|
+
apiKey: options.apiKey,
|
|
328
|
+
authMode: options.authMode,
|
|
329
|
+
baseUrl,
|
|
607
330
|
serverName,
|
|
608
331
|
serverUrl,
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
existingUrl: installDriftHosts[0].existingUrl,
|
|
620
|
-
requestedUrl: serverUrl,
|
|
621
|
-
}),
|
|
622
|
-
);
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
let cleanupState = null;
|
|
626
|
-
try {
|
|
627
|
-
if (skillDecisionMode === "install") {
|
|
628
|
-
logBundledSkillInstallPlan({
|
|
629
|
-
bundledSkillNames,
|
|
630
|
-
projectRoot,
|
|
631
|
-
scope,
|
|
632
|
-
supportedHosts,
|
|
633
|
-
});
|
|
634
|
-
cleanupState = await inspectInstalledSkillArtifactsForHosts({
|
|
635
|
-
projectRoot,
|
|
636
|
-
hostNames: supportedHosts,
|
|
637
|
-
scope,
|
|
638
|
-
skillNames: bundledSkillNames,
|
|
639
|
-
});
|
|
640
|
-
await installBundledSkillForHosts({
|
|
641
|
-
projectRoot,
|
|
642
|
-
hostNames: supportedHosts,
|
|
643
|
-
scope,
|
|
644
|
-
serverName,
|
|
645
|
-
serverUrl,
|
|
646
|
-
skillNames: bundledSkillNames,
|
|
647
|
-
});
|
|
648
|
-
if (unsupportedHosts.length > 0) {
|
|
649
|
-
log.plain(
|
|
650
|
-
`--install-skill skipped unsupported hosts (MCP-only): ${unsupportedHosts.join(", ")}.`,
|
|
651
|
-
);
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
const hostsNeedingSetup = needsSetupHosts;
|
|
656
|
-
let apiKey = null;
|
|
657
|
-
if (hostsNeedingSetup.length > 0) {
|
|
658
|
-
apiKey = await resolveApiKey(options, baseUrl);
|
|
659
|
-
if (!apiKey) {
|
|
660
|
-
if (cleanupState) {
|
|
661
|
-
await cleanupInstalledSkillArtifactsForHosts({
|
|
662
|
-
projectRoot,
|
|
663
|
-
hostNames: supportedHosts,
|
|
664
|
-
priorState: cleanupState,
|
|
665
|
-
scope,
|
|
666
|
-
skillNames: bundledSkillNames,
|
|
667
|
-
});
|
|
668
|
-
cleanupState = null;
|
|
669
|
-
}
|
|
670
|
-
log.warn("Setup cancelled");
|
|
671
|
-
return;
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
let setupResults = [];
|
|
676
|
-
const spinner = ora("Setting up Flywheel MCP...").start();
|
|
677
|
-
try {
|
|
678
|
-
const results = [];
|
|
679
|
-
for (const hostName of hosts) {
|
|
680
|
-
if (!needsSetupHosts.includes(hostName)) {
|
|
681
|
-
results.push({
|
|
682
|
-
host: getHost(hostName).displayName,
|
|
683
|
-
status: "already configured",
|
|
684
|
-
filePath: hostStates.get(hostName).mcpPath,
|
|
685
|
-
});
|
|
686
|
-
continue;
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
spinner.text = `Setting up ${getHost(hostName).displayName}...`;
|
|
332
|
+
reconcilePriorMode: async ({ hostNames, serverNames }) => {
|
|
333
|
+
// Uninstall each detected server name so renamed/drifted Flywheel MCP
|
|
334
|
+
// entries are actually removed. When the detector found no explicit
|
|
335
|
+
// names (prior CLI artifacts case), fall back to the current request's
|
|
336
|
+
// --name so the skill cleanup path still runs.
|
|
337
|
+
const targetNames =
|
|
338
|
+
Array.isArray(serverNames) && serverNames.length > 0
|
|
339
|
+
? serverNames
|
|
340
|
+
: [serverName];
|
|
341
|
+
for (const targetName of targetNames) {
|
|
690
342
|
// eslint-disable-next-line no-await-in-loop
|
|
691
|
-
|
|
692
|
-
|
|
343
|
+
await runUninstallCommand(
|
|
344
|
+
buildUninstallOptionsForHosts({
|
|
345
|
+
hostNames,
|
|
346
|
+
scope,
|
|
347
|
+
serverName: targetName,
|
|
348
|
+
}),
|
|
693
349
|
);
|
|
694
350
|
}
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
} catch (error) {
|
|
698
|
-
spinner.fail("Setup failed");
|
|
699
|
-
throw error;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
if (skillDecisionMode !== "guided") {
|
|
703
|
-
const completedCleanupState = cleanupState;
|
|
704
|
-
cleanupState = null;
|
|
705
|
-
await discardInstallSkillCleanupState(completedCleanupState);
|
|
706
|
-
const showSkillRefreshGuidance =
|
|
707
|
-
scope === "project" &&
|
|
708
|
-
skillDecisionMode === "install" &&
|
|
709
|
-
supportedHosts.length > 0;
|
|
710
|
-
printSetupResults(
|
|
711
|
-
setupResults,
|
|
712
|
-
scope,
|
|
713
|
-
serverUrl,
|
|
714
|
-
{
|
|
715
|
-
showSkillRefreshGuidance,
|
|
716
|
-
experimentalSyncAgents: showSkillRefreshGuidance
|
|
717
|
-
? resolveExperimentalSyncAgentsForHosts(supportedHosts)
|
|
718
|
-
: [],
|
|
719
|
-
},
|
|
720
|
-
);
|
|
721
|
-
return;
|
|
722
|
-
}
|
|
351
|
+
},
|
|
352
|
+
});
|
|
723
353
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
}
|
|
354
|
+
const lines = renderSetupSummary(result);
|
|
355
|
+
log.blank();
|
|
356
|
+
for (const line of lines) {
|
|
357
|
+
log.plain(` ${line}`);
|
|
358
|
+
}
|
|
359
|
+
log.blank();
|
|
731
360
|
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
361
|
+
if (result.exitCode !== 0) {
|
|
362
|
+
const failureDetails = result.agentResults
|
|
363
|
+
.filter((agentResult) => agentResult.success !== true)
|
|
364
|
+
.flatMap((agentResult) =>
|
|
365
|
+
Array.isArray(agentResult.warnings) ? agentResult.warnings : [],
|
|
366
|
+
)
|
|
367
|
+
.join(" | ");
|
|
368
|
+
const error = new Error(
|
|
369
|
+
failureDetails.length > 0
|
|
370
|
+
? `CLI setup encountered host-level failures: ${failureDetails}`
|
|
371
|
+
: "CLI setup encountered host-level failures.",
|
|
736
372
|
);
|
|
737
|
-
|
|
738
|
-
printSetupResults(setupResults, scope, serverUrl);
|
|
739
|
-
return;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
if (installDriftHosts.length > 0) {
|
|
743
|
-
throw new Error(
|
|
744
|
-
formatInstallSkillDriftError({
|
|
745
|
-
hostName: installDriftHosts[0].hostName,
|
|
746
|
-
scope,
|
|
747
|
-
serverName,
|
|
748
|
-
existingUrl: installDriftHosts[0].existingUrl,
|
|
749
|
-
requestedUrl: serverUrl,
|
|
750
|
-
}),
|
|
751
|
-
);
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
logBundledSkillInstallPlan({
|
|
755
|
-
bundledSkillNames,
|
|
756
|
-
projectRoot,
|
|
757
|
-
scope,
|
|
758
|
-
supportedHosts,
|
|
759
|
-
});
|
|
760
|
-
cleanupState = await inspectInstalledSkillArtifactsForHosts({
|
|
761
|
-
projectRoot,
|
|
762
|
-
hostNames: supportedHosts,
|
|
763
|
-
scope,
|
|
764
|
-
skillNames: bundledSkillNames,
|
|
765
|
-
});
|
|
766
|
-
await installBundledSkillForHosts({
|
|
767
|
-
projectRoot,
|
|
768
|
-
hostNames: supportedHosts,
|
|
769
|
-
scope,
|
|
770
|
-
serverName,
|
|
771
|
-
serverUrl,
|
|
772
|
-
skillNames: bundledSkillNames,
|
|
773
|
-
});
|
|
774
|
-
if (unsupportedHosts.length > 0) {
|
|
775
|
-
log.plain(
|
|
776
|
-
`Guided skill install skipped unsupported hosts (MCP-only): ${unsupportedHosts.join(", ")}.`,
|
|
777
|
-
);
|
|
778
|
-
}
|
|
779
|
-
const completedCleanupState = cleanupState;
|
|
780
|
-
cleanupState = null;
|
|
781
|
-
await discardInstallSkillCleanupState(completedCleanupState);
|
|
782
|
-
const showSkillRefreshGuidance =
|
|
783
|
-
scope === "project" && supportedHosts.length > 0;
|
|
784
|
-
printSetupResults(setupResults, scope, serverUrl, {
|
|
785
|
-
showSkillRefreshGuidance,
|
|
786
|
-
experimentalSyncAgents: showSkillRefreshGuidance
|
|
787
|
-
? resolveExperimentalSyncAgentsForHosts(supportedHosts)
|
|
788
|
-
: [],
|
|
789
|
-
});
|
|
790
|
-
} catch (error) {
|
|
791
|
-
if (cleanupState) {
|
|
792
|
-
await cleanupInstalledSkillArtifactsForHosts({
|
|
793
|
-
projectRoot,
|
|
794
|
-
hostNames: supportedHosts,
|
|
795
|
-
priorState: cleanupState,
|
|
796
|
-
scope,
|
|
797
|
-
skillNames: bundledSkillNames,
|
|
798
|
-
});
|
|
799
|
-
}
|
|
373
|
+
error.exitCode = result.exitCode;
|
|
800
374
|
throw error;
|
|
801
375
|
}
|
|
376
|
+
|
|
377
|
+
return result;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
async function runSetupCommandViaRouter(options) {
|
|
381
|
+
return await runSetupRouter(options, {
|
|
382
|
+
isInteractive: process.stdin.isTTY === true && process.stdout.isTTY === true,
|
|
383
|
+
promptMode: promptSetupMode,
|
|
384
|
+
runMcpMode: async () =>
|
|
385
|
+
await runMcpModeCommand(options, {
|
|
386
|
+
force: options.force === true,
|
|
387
|
+
reconcilePriorMode: async ({
|
|
388
|
+
hostNames,
|
|
389
|
+
serverNames,
|
|
390
|
+
scope: reconcileScope,
|
|
391
|
+
serverName: requestedServerName,
|
|
392
|
+
}) => {
|
|
393
|
+
// Prior CLI artifacts have no MCP entry name, so fall back to the
|
|
394
|
+
// current request's --name for the skill uninstall path. Prior MCP
|
|
395
|
+
// entries may carry drifted names; uninstall each detected name so
|
|
396
|
+
// the reconcile actually removes what we detected.
|
|
397
|
+
const targetNames =
|
|
398
|
+
Array.isArray(serverNames) && serverNames.length > 0
|
|
399
|
+
? serverNames
|
|
400
|
+
: [requestedServerName];
|
|
401
|
+
for (const targetName of targetNames) {
|
|
402
|
+
// eslint-disable-next-line no-await-in-loop
|
|
403
|
+
await runUninstallCommand(
|
|
404
|
+
buildUninstallOptionsForHosts({
|
|
405
|
+
hostNames,
|
|
406
|
+
scope: reconcileScope,
|
|
407
|
+
serverName: targetName,
|
|
408
|
+
}),
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
}),
|
|
413
|
+
runCliMode: async () => await runCliModeCommand(options),
|
|
414
|
+
});
|
|
802
415
|
}
|
|
803
416
|
|
|
804
417
|
function parseUninstallScope(value) {
|
|
@@ -1199,12 +812,12 @@ function buildProgram() {
|
|
|
1199
812
|
"after",
|
|
1200
813
|
`
|
|
1201
814
|
Examples:
|
|
1202
|
-
${pc.green("npx --yes @paradigma-inc/flywheel setup")}
|
|
1203
|
-
${pc.green("npx --yes @paradigma-inc/flywheel setup --install-skill")}
|
|
1204
|
-
${pc.green("npx --yes @paradigma-inc/flywheel setup --skip-skill")}
|
|
1205
|
-
${pc.green("npx --yes @paradigma-inc/flywheel setup --auth-mode device --codex --project")}
|
|
1206
|
-
${pc.green("npx --yes @paradigma-inc/flywheel setup --codex --project")}
|
|
1207
|
-
${pc.green("npx --yes @paradigma-inc/flywheel setup --yes --codex --claude --cursor")}
|
|
815
|
+
${pc.green("npx --yes @paradigma-inc/flywheel setup --mode mcp")}
|
|
816
|
+
${pc.green("npx --yes @paradigma-inc/flywheel setup --mode mcp --install-skill")}
|
|
817
|
+
${pc.green("npx --yes @paradigma-inc/flywheel setup --mode mcp --skip-skill")}
|
|
818
|
+
${pc.green("npx --yes @paradigma-inc/flywheel setup --mode mcp --auth-mode device --codex --project")}
|
|
819
|
+
${pc.green("npx --yes @paradigma-inc/flywheel setup --mode cli --codex --project")}
|
|
820
|
+
${pc.green("npx --yes @paradigma-inc/flywheel setup --mode mcp --yes --codex --claude --cursor")}
|
|
1208
821
|
${pc.green(
|
|
1209
822
|
"npx --yes @paradigma-inc/flywheel uninstall --scope all --hosts codex,claude,opencode,cursor,pi-mono,hermes-agent,openclaw",
|
|
1210
823
|
)}
|
|
@@ -1214,6 +827,14 @@ Examples:
|
|
|
1214
827
|
program
|
|
1215
828
|
.command("setup")
|
|
1216
829
|
.description("Set up Flywheel for your AI coding host")
|
|
830
|
+
.option(
|
|
831
|
+
"--mode <mode>",
|
|
832
|
+
"Install mode: mcp | cli (required in non-interactive; prompted in TTY, default: mcp)",
|
|
833
|
+
collectModeValues,
|
|
834
|
+
[],
|
|
835
|
+
)
|
|
836
|
+
.option("--mcp", "Alias for --mode mcp")
|
|
837
|
+
.option("--cli", "Alias for --mode cli")
|
|
1217
838
|
.option("--claude", "Set up for Claude Code")
|
|
1218
839
|
.option("--opencode", "Set up for OpenCode")
|
|
1219
840
|
.option("--codex", "Set up for Codex")
|
|
@@ -1226,6 +847,7 @@ Examples:
|
|
|
1226
847
|
"Configure for current project instead of globally",
|
|
1227
848
|
)
|
|
1228
849
|
.option("-y, --yes", "Skip host selection prompts")
|
|
850
|
+
.option("--force", "Reconcile prior install mode automatically via uninstall")
|
|
1229
851
|
.option("--api-key <key>", "Use API key authentication")
|
|
1230
852
|
.option(
|
|
1231
853
|
"--auth-mode <mode>",
|
|
@@ -1241,7 +863,7 @@ Examples:
|
|
|
1241
863
|
)
|
|
1242
864
|
.option("--name <name>", `MCP server name (default: ${SERVER_NAME})`)
|
|
1243
865
|
.action(async (options) => {
|
|
1244
|
-
await
|
|
866
|
+
await runSetupCommandViaRouter(options);
|
|
1245
867
|
});
|
|
1246
868
|
|
|
1247
869
|
program
|