@paradigma-inc/flywheel 0.1.35 → 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/getting-started/flywheel-tutorial-overview.md +2 -1
- package/skills/flywheel/references/INTERFACES.md +2 -0
- package/skills/flywheel/references/flywheel-cli-tool-map.md +244 -0
- package/skills/flywheel/references/flywheel-mcp-tool-map.md +39 -5
- 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/INTERFACES.md +2 -0
- package/skills/flywheel-auto/references/flywheel-cli-tool-map.md +244 -0
- package/skills/flywheel-auto/references/flywheel-mcp-tool-map.md +6 -5
- package/skills/flywheel-lookahead/SKILL.md +22 -11
- package/skills/flywheel-lookahead/references/INTERFACES.md +2 -0
- package/skills/flywheel-lookahead/references/flywheel-cli-tool-map.md +244 -0
- package/skills/flywheel-lookahead/references/flywheel-mcp-tool-map.md +6 -5
- package/skills/flywheel-prove/SKILL.md +9 -0
- package/skills/flywheel-reproduce/SKILL.md +23 -12
- package/skills/flywheel-reproduce/references/INTERFACES.md +2 -0
- package/skills/flywheel-reproduce/references/flywheel-cli-tool-map.md +244 -0
- package/skills/flywheel-reproduce/references/flywheel-mcp-tool-map.md +6 -5
- package/skills/flywheel-to-graph/SKILL.md +20 -9
- package/skills/flywheel-to-graph/references/INTERFACES.md +2 -0
- package/skills/flywheel-to-graph/references/flywheel-cli-tool-map.md +244 -0
- package/skills/flywheel-to-graph/references/flywheel-mcp-tool-map.md +6 -5
- package/skills/flywheel-tree/SKILL.md +9 -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
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { CliApprovalPendingError, } from '../errors.js';
|
|
3
|
+
import { EXIT_AUTH, EXIT_TRANSPORT, } from '../exit-codes.js';
|
|
4
|
+
import { maskForDebug, maskQueryString } from './debug.js';
|
|
5
|
+
import { isRetryableNetworkError, isRetryableStatus, parseRetryAfterMs, withRetry, } from './retry.js';
|
|
6
|
+
export class CliHttpError extends Error {
|
|
7
|
+
exitCode;
|
|
8
|
+
status;
|
|
9
|
+
body;
|
|
10
|
+
request;
|
|
11
|
+
constructor(message, exitCode, status, body, request) {
|
|
12
|
+
super(message);
|
|
13
|
+
this.name = 'CliHttpError';
|
|
14
|
+
this.exitCode = exitCode;
|
|
15
|
+
this.status = status;
|
|
16
|
+
this.body = body;
|
|
17
|
+
this.request = request;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
class RetryableHttpError extends CliHttpError {
|
|
21
|
+
retryAfterMs;
|
|
22
|
+
constructor(message, status, retryAfterMs, body, request) {
|
|
23
|
+
super(message, EXIT_TRANSPORT, status, body, request);
|
|
24
|
+
this.name = 'RetryableHttpError';
|
|
25
|
+
this.retryAfterMs = retryAfterMs;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function mapStatusToExitCode(status) {
|
|
29
|
+
if (status === 401 || status === 403) {
|
|
30
|
+
return EXIT_AUTH;
|
|
31
|
+
}
|
|
32
|
+
return EXIT_TRANSPORT;
|
|
33
|
+
}
|
|
34
|
+
function maskUrlForDebug(target) {
|
|
35
|
+
// Masks sensitive query parameters (tokens, credentials, signed-upload
|
|
36
|
+
// params) before stringifying. Preserves origin + path + hash verbatim.
|
|
37
|
+
try {
|
|
38
|
+
const url = typeof target === 'string' ? new URL(target) : target;
|
|
39
|
+
const maskedSearch = maskQueryString(url.search);
|
|
40
|
+
return `${url.origin}${url.pathname}${maskedSearch}${url.hash}`;
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return typeof target === 'string' ? target : target.toString();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function toQueryString(query) {
|
|
47
|
+
if (!query) {
|
|
48
|
+
return '';
|
|
49
|
+
}
|
|
50
|
+
const params = new URLSearchParams();
|
|
51
|
+
for (const [key, value] of Object.entries(query)) {
|
|
52
|
+
params.set(key, String(value));
|
|
53
|
+
}
|
|
54
|
+
const encoded = params.toString();
|
|
55
|
+
return encoded ? `?${encoded}` : '';
|
|
56
|
+
}
|
|
57
|
+
function baseUrlLooksLikeOriginRoot(baseUrl) {
|
|
58
|
+
try {
|
|
59
|
+
const parsed = new URL(baseUrl);
|
|
60
|
+
const cleanPath = parsed.pathname.replace(/\/+$/, '');
|
|
61
|
+
return cleanPath === '' || cleanPath === '/';
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function buildHttpErrorMessage(status, baseUrl) {
|
|
68
|
+
const base = `request failed with status ${status}`;
|
|
69
|
+
if ((status === 401 || status === 404) && baseUrlLooksLikeOriginRoot(baseUrl)) {
|
|
70
|
+
return `${base} — base URL appears to be an origin root; try ${baseUrl.replace(/\/+$/, '')}/api`;
|
|
71
|
+
}
|
|
72
|
+
return base;
|
|
73
|
+
}
|
|
74
|
+
async function readResponseBody(response) {
|
|
75
|
+
const contentType = response.headers.get('content-type') ?? '';
|
|
76
|
+
if (contentType.includes('application/json')) {
|
|
77
|
+
try {
|
|
78
|
+
return await response.json();
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
try {
|
|
85
|
+
const text = await response.text();
|
|
86
|
+
if (!text) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
try {
|
|
90
|
+
return JSON.parse(text);
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
return text;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function snapshotResponse(status, body) {
|
|
101
|
+
return { status, body };
|
|
102
|
+
}
|
|
103
|
+
function isApprovalRequiredBody(body) {
|
|
104
|
+
return (body !== null &&
|
|
105
|
+
typeof body === 'object' &&
|
|
106
|
+
body.code === 'approval_required');
|
|
107
|
+
}
|
|
108
|
+
export function createHttpClient(options) {
|
|
109
|
+
const transport = options.transport ?? fetch;
|
|
110
|
+
const normalizedBase = options.baseUrl.replace(/\/+$/, '');
|
|
111
|
+
const invocationId = options.invocationId ?? randomUUID();
|
|
112
|
+
const retryMax = options.retryMax ?? 3;
|
|
113
|
+
const warnedPaths = new Set();
|
|
114
|
+
function emitDeprecationWarning(path, response, debugLog) {
|
|
115
|
+
const deprecation = response.headers.get('deprecation');
|
|
116
|
+
if (!deprecation || deprecation.toLowerCase() === 'false')
|
|
117
|
+
return;
|
|
118
|
+
if (warnedPaths.has(path))
|
|
119
|
+
return;
|
|
120
|
+
warnedPaths.add(path);
|
|
121
|
+
const sunset = response.headers.get('sunset');
|
|
122
|
+
const hint = sunset ? ` (sunset: ${sunset})` : '';
|
|
123
|
+
const line = `deprecation warning: this endpoint is deprecated${hint}`;
|
|
124
|
+
if (debugLog)
|
|
125
|
+
debugLog(line);
|
|
126
|
+
else
|
|
127
|
+
process.stderr.write(`${line}\n`);
|
|
128
|
+
}
|
|
129
|
+
const retryEnabled = options.retryEnabled ?? true;
|
|
130
|
+
const debug = options.debug ?? false;
|
|
131
|
+
const debugLog = options.debugLog ?? ((line) => process.stderr.write(`${line}\n`));
|
|
132
|
+
const timeoutMs = options.timeoutMs ?? 300_000;
|
|
133
|
+
async function doRequest(method, path, requestOptions, idempotencyKey, requestId) {
|
|
134
|
+
const url = new URL(`${normalizedBase}${path}${toQueryString(requestOptions?.query)}`);
|
|
135
|
+
const headers = {
|
|
136
|
+
Accept: 'application/json',
|
|
137
|
+
};
|
|
138
|
+
if (options.apiKey && !requestOptions?.skipAuth) {
|
|
139
|
+
headers.Authorization = `Bearer ${options.apiKey}`;
|
|
140
|
+
}
|
|
141
|
+
if (method !== 'GET' && !requestOptions?.skipIdempotency) {
|
|
142
|
+
headers['Idempotency-Key'] = idempotencyKey;
|
|
143
|
+
}
|
|
144
|
+
if (requestOptions?.body !== undefined && !requestOptions.rawBody) {
|
|
145
|
+
headers['Content-Type'] = 'application/json';
|
|
146
|
+
}
|
|
147
|
+
if (options.cliVersion) {
|
|
148
|
+
headers['X-Flywheel-Cli-Version'] = options.cliVersion;
|
|
149
|
+
headers['User-Agent'] = `flywheel-cli/${options.cliVersion}`;
|
|
150
|
+
}
|
|
151
|
+
if (options.commandName) {
|
|
152
|
+
headers['X-Flywheel-Cli-Command'] = options.commandName;
|
|
153
|
+
}
|
|
154
|
+
if (options.flagNames && options.flagNames.length > 0) {
|
|
155
|
+
headers['X-Flywheel-Cli-Flags'] = options.flagNames.join(',');
|
|
156
|
+
}
|
|
157
|
+
headers['X-Flywheel-Cli-Invocation-Id'] = invocationId;
|
|
158
|
+
headers['X-Flywheel-Request-Id'] = requestId;
|
|
159
|
+
headers['X-Request-ID'] = requestId;
|
|
160
|
+
const step = requestOptions?.wrapperStep ?? options.wrapperStep;
|
|
161
|
+
if (step) {
|
|
162
|
+
headers['X-Flywheel-Cli-Wrapper-Step'] = step;
|
|
163
|
+
}
|
|
164
|
+
const exitIntent = requestOptions?.exitIntent ?? options.exitIntent;
|
|
165
|
+
if (typeof exitIntent === 'number') {
|
|
166
|
+
headers['X-Flywheel-Cli-Exit-Intent'] = String(exitIntent);
|
|
167
|
+
}
|
|
168
|
+
if (requestOptions?.extraHeaders) {
|
|
169
|
+
Object.assign(headers, requestOptions.extraHeaders);
|
|
170
|
+
}
|
|
171
|
+
const body = requestOptions?.rawBody !== undefined
|
|
172
|
+
? requestOptions.rawBody
|
|
173
|
+
: requestOptions?.body !== undefined
|
|
174
|
+
? JSON.stringify(requestOptions.body)
|
|
175
|
+
: undefined;
|
|
176
|
+
if (debug) {
|
|
177
|
+
debugLog(`DEBUG: ${method} ${maskUrlForDebug(url)} ${JSON.stringify({
|
|
178
|
+
headers: maskForDebug(headers),
|
|
179
|
+
body: maskForDebug(requestOptions?.body ?? null),
|
|
180
|
+
})}`);
|
|
181
|
+
}
|
|
182
|
+
const controller = new AbortController();
|
|
183
|
+
const timer = setTimeout(() => controller.abort(new Error(`CLI HTTP timeout after ${timeoutMs}ms`)), timeoutMs);
|
|
184
|
+
const progressInterval = process.stdout.isTTY
|
|
185
|
+
? setInterval(() => process.stderr.write('.'), 10_000)
|
|
186
|
+
: null;
|
|
187
|
+
let response;
|
|
188
|
+
try {
|
|
189
|
+
response = await transport(url, { method, headers, body, signal: controller.signal });
|
|
190
|
+
}
|
|
191
|
+
finally {
|
|
192
|
+
clearTimeout(timer);
|
|
193
|
+
if (progressInterval)
|
|
194
|
+
clearInterval(progressInterval);
|
|
195
|
+
}
|
|
196
|
+
if (debug) {
|
|
197
|
+
debugLog(`DEBUG: ${method} ${maskUrlForDebug(url)} -> ${response.status}`);
|
|
198
|
+
}
|
|
199
|
+
return response;
|
|
200
|
+
}
|
|
201
|
+
async function requestWithRetry(method, path, requestOptions) {
|
|
202
|
+
const idempotencyKey = options.idempotencyKey ?? randomUUID();
|
|
203
|
+
const requestId = randomUUID();
|
|
204
|
+
const fn = async () => {
|
|
205
|
+
let response;
|
|
206
|
+
try {
|
|
207
|
+
response = await doRequest(method, path, requestOptions, idempotencyKey, requestId);
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
// Network/transport layer errors propagate (retry layer decides).
|
|
211
|
+
if (isRetryableNetworkError(error)) {
|
|
212
|
+
throw error;
|
|
213
|
+
}
|
|
214
|
+
throw new CliHttpError('transport error', EXIT_TRANSPORT, undefined, undefined, {
|
|
215
|
+
method,
|
|
216
|
+
path,
|
|
217
|
+
requestId,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
if (!response.ok) {
|
|
221
|
+
const body = await readResponseBody(response);
|
|
222
|
+
if (response.status === 422 && isApprovalRequiredBody(body)) {
|
|
223
|
+
const approvalBody = body;
|
|
224
|
+
throw new CliApprovalPendingError(typeof approvalBody.message === 'string'
|
|
225
|
+
? approvalBody.message
|
|
226
|
+
: 'approval required', {
|
|
227
|
+
approvalUrl: typeof approvalBody.approval_url === 'string'
|
|
228
|
+
? approvalBody.approval_url
|
|
229
|
+
: undefined,
|
|
230
|
+
approvalRequestId: typeof approvalBody.approval_request_id === 'string'
|
|
231
|
+
? approvalBody.approval_request_id
|
|
232
|
+
: undefined,
|
|
233
|
+
grantId: typeof approvalBody.grant_id === 'string'
|
|
234
|
+
? approvalBody.grant_id
|
|
235
|
+
: undefined,
|
|
236
|
+
requiredSignoffs: Array.isArray(approvalBody.required_signoffs)
|
|
237
|
+
? approvalBody.required_signoffs.filter((v) => typeof v === 'string')
|
|
238
|
+
: undefined,
|
|
239
|
+
serverResponse: snapshotResponse(response.status, body),
|
|
240
|
+
request: {
|
|
241
|
+
method,
|
|
242
|
+
path,
|
|
243
|
+
requestId,
|
|
244
|
+
},
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
if (isRetryableStatus(response.status)) {
|
|
248
|
+
const retryAfterMs = parseRetryAfterMs(response.headers.get('retry-after'));
|
|
249
|
+
throw new RetryableHttpError(buildHttpErrorMessage(response.status, options.baseUrl), response.status, retryAfterMs, body, { method, path, requestId });
|
|
250
|
+
}
|
|
251
|
+
if (response.status === 426) {
|
|
252
|
+
throw new CliHttpError('upgrade required: install the latest @paradigma-inc/flywheel package', EXIT_TRANSPORT, 426, body, { method, path, requestId });
|
|
253
|
+
}
|
|
254
|
+
if (response.status === 410) {
|
|
255
|
+
const hint = body && typeof body === 'object' && typeof body.replacement === 'string'
|
|
256
|
+
? body.replacement
|
|
257
|
+
: null;
|
|
258
|
+
throw new CliHttpError(`resource gone${hint ? ` — use ${hint}` : ''}`, EXIT_TRANSPORT, 410, body, { method, path, requestId });
|
|
259
|
+
}
|
|
260
|
+
throw new CliHttpError(buildHttpErrorMessage(response.status, options.baseUrl), mapStatusToExitCode(response.status), response.status, body, { method, path, requestId });
|
|
261
|
+
}
|
|
262
|
+
emitDeprecationWarning(path, response, debugLog);
|
|
263
|
+
return response;
|
|
264
|
+
};
|
|
265
|
+
try {
|
|
266
|
+
return await withRetry(fn, {
|
|
267
|
+
maxAttempts: retryEnabled ? retryMax : 1,
|
|
268
|
+
sleep: options.retrySleep,
|
|
269
|
+
shouldRetry: (error) => {
|
|
270
|
+
if (error instanceof CliApprovalPendingError) {
|
|
271
|
+
return { retry: false };
|
|
272
|
+
}
|
|
273
|
+
if (error instanceof RetryableHttpError) {
|
|
274
|
+
if (typeof error.retryAfterMs === 'number') {
|
|
275
|
+
return { retry: true, delayMs: error.retryAfterMs };
|
|
276
|
+
}
|
|
277
|
+
return { retry: true };
|
|
278
|
+
}
|
|
279
|
+
if (isRetryableNetworkError(error)) {
|
|
280
|
+
return { retry: true };
|
|
281
|
+
}
|
|
282
|
+
return { retry: false };
|
|
283
|
+
},
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
catch (error) {
|
|
287
|
+
// Preserve typed CLI envelopes verbatim; wrap only raw transport
|
|
288
|
+
// errors (ECONNREFUSED / ETIMEDOUT / ECONNRESET / ...) that bubble
|
|
289
|
+
// out of withRetry after retries exhaust. Without this, runCli
|
|
290
|
+
// would hit the generic Error path and lose the structured stderr
|
|
291
|
+
// envelope, request metadata, and localhost-setup hint.
|
|
292
|
+
if (error instanceof CliHttpError ||
|
|
293
|
+
error instanceof CliApprovalPendingError) {
|
|
294
|
+
throw error;
|
|
295
|
+
}
|
|
296
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
297
|
+
throw new CliHttpError(`transport error: ${detail}`, EXIT_TRANSPORT, undefined, undefined, { method, path, requestId });
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
return {
|
|
301
|
+
async requestJson(method, path, requestOptions) {
|
|
302
|
+
const response = await requestWithRetry(method, path, requestOptions);
|
|
303
|
+
if (requestOptions?.rawResponse) {
|
|
304
|
+
return response;
|
|
305
|
+
}
|
|
306
|
+
const contentType = response.headers.get('content-type') ?? '';
|
|
307
|
+
if (!contentType.includes('application/json')) {
|
|
308
|
+
// 204/empty responses
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
311
|
+
return (await response.json());
|
|
312
|
+
},
|
|
313
|
+
async requestRaw(method, path, requestOptions) {
|
|
314
|
+
return requestWithRetry(method, path, requestOptions);
|
|
315
|
+
},
|
|
316
|
+
async requestRawExternal(method, absoluteUrl, rawOptions) {
|
|
317
|
+
if (typeof absoluteUrl !== 'string' ||
|
|
318
|
+
!(absoluteUrl.startsWith('http://') || absoluteUrl.startsWith('https://'))) {
|
|
319
|
+
throw new TypeError('requestRawExternal requires an absolute URL');
|
|
320
|
+
}
|
|
321
|
+
const headers = {};
|
|
322
|
+
if (rawOptions?.extraHeaders) {
|
|
323
|
+
Object.assign(headers, rawOptions.extraHeaders);
|
|
324
|
+
}
|
|
325
|
+
if (debug) {
|
|
326
|
+
debugLog(`DEBUG: ${method} ${maskUrlForDebug(absoluteUrl)} (external) ${JSON.stringify({
|
|
327
|
+
headers: maskForDebug(headers),
|
|
328
|
+
})}`);
|
|
329
|
+
}
|
|
330
|
+
// Apply the same timeout + abort semantics as internal requests so
|
|
331
|
+
// external uploads to stalled signed URLs can't hang the CLI past
|
|
332
|
+
// the configured --timeout / profile default_timeout_s.
|
|
333
|
+
const controller = new AbortController();
|
|
334
|
+
const timer = setTimeout(() => controller.abort(new Error(`CLI HTTP timeout after ${timeoutMs}ms`)), timeoutMs);
|
|
335
|
+
const progressInterval = process.stdout.isTTY
|
|
336
|
+
? setInterval(() => process.stderr.write('.'), 10_000)
|
|
337
|
+
: null;
|
|
338
|
+
let response;
|
|
339
|
+
try {
|
|
340
|
+
try {
|
|
341
|
+
response = await transport(new URL(absoluteUrl), {
|
|
342
|
+
method,
|
|
343
|
+
headers,
|
|
344
|
+
body: rawOptions?.rawBody,
|
|
345
|
+
signal: controller.signal,
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
catch (error) {
|
|
349
|
+
// Mirror internal-request semantics so callers always receive a
|
|
350
|
+
// structured CliHttpError envelope (with EXIT_TRANSPORT + the
|
|
351
|
+
// absolute URL as `request.path`) instead of a raw network error
|
|
352
|
+
// bubbling out through the generic Error path in runCli.
|
|
353
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
354
|
+
throw new CliHttpError(`transport error: ${detail}`, EXIT_TRANSPORT, undefined, undefined, { method, path: absoluteUrl });
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
finally {
|
|
358
|
+
clearTimeout(timer);
|
|
359
|
+
if (progressInterval)
|
|
360
|
+
clearInterval(progressInterval);
|
|
361
|
+
}
|
|
362
|
+
if (debug) {
|
|
363
|
+
debugLog(`DEBUG: ${method} ${maskUrlForDebug(absoluteUrl)} (external) -> ${response.status}`);
|
|
364
|
+
}
|
|
365
|
+
return response;
|
|
366
|
+
},
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/http/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EACL,uBAAuB,GAExB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,SAAS,EACT,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AAG,MAAM,SAAS,CAAC,IAAI,GAAG,CAAC,WAAW,CAAC,EAAE;wBAC/C,MAAM;wBACN,OAAO;wBACP,IAAI,EAAE,UAAU,EAAE,OAAO;wBACzB,MAAM,EAAE,UAAU,CAAC,MAAM;qBAC1B,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,gEAAgE;oBAChE,8DAA8D;oBAC9D,iEAAiE;oBACjE,yDAAyD;oBACzD,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBACtE,MAAM,IAAI,YAAY,CACpB,oBAAoB,MAAM,EAAE,EAC5B,cAAc,EACd,SAAS,EACT,SAAS,EACT,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAC9B,CAAC;gBACJ,CAAC;YACH,CAAC;oBAAS,CAAC;gBACT,YAAY,CAAC,KAAK,CAAC,CAAC;gBACpB,IAAI,gBAAgB;oBAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;YACxD,CAAC;YACD,IAAI,KAAK,EAAE,CAAC;gBACV,QAAQ,CAAC,UAAU,MAAM,IAAI,eAAe,CAAC,WAAW,CAAC,kBAAkB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAChG,CAAC;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
const SENSITIVE_KEY_PATTERN = /api[_-]?key|token|password|secret|bearer|credential/i;
|
|
2
|
+
const MASK = '***';
|
|
3
|
+
function isPlainObject(value) {
|
|
4
|
+
return (value !== null &&
|
|
5
|
+
typeof value === 'object' &&
|
|
6
|
+
!Array.isArray(value) &&
|
|
7
|
+
!(value instanceof Date) &&
|
|
8
|
+
!(value instanceof Error));
|
|
9
|
+
}
|
|
10
|
+
function maskHeaders(headers) {
|
|
11
|
+
const masked = {};
|
|
12
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
13
|
+
if (key.toLowerCase() === 'authorization') {
|
|
14
|
+
masked[key] = MASK;
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
if (SENSITIVE_KEY_PATTERN.test(key)) {
|
|
18
|
+
masked[key] = MASK;
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
masked[key] = value;
|
|
22
|
+
}
|
|
23
|
+
return masked;
|
|
24
|
+
}
|
|
25
|
+
function maskJson(value) {
|
|
26
|
+
if (Array.isArray(value)) {
|
|
27
|
+
return value.map(maskJson);
|
|
28
|
+
}
|
|
29
|
+
if (isPlainObject(value)) {
|
|
30
|
+
const out = {};
|
|
31
|
+
for (const [key, nested] of Object.entries(value)) {
|
|
32
|
+
if (SENSITIVE_KEY_PATTERN.test(key)) {
|
|
33
|
+
out[key] = MASK;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
out[key] = maskJson(nested);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
export function maskForDebug(value) {
|
|
44
|
+
if (isPlainObject(value) && Object.values(value).every((v) => typeof v === 'string')) {
|
|
45
|
+
// Looks like a header map
|
|
46
|
+
return maskHeaders(value);
|
|
47
|
+
}
|
|
48
|
+
return maskJson(value);
|
|
49
|
+
}
|
|
50
|
+
export function maskQueryString(query) {
|
|
51
|
+
if (!query) {
|
|
52
|
+
return query;
|
|
53
|
+
}
|
|
54
|
+
const raw = query.startsWith('?') ? query.slice(1) : query;
|
|
55
|
+
const params = new URLSearchParams(raw);
|
|
56
|
+
const masked = new URLSearchParams();
|
|
57
|
+
for (const [key, value] of params.entries()) {
|
|
58
|
+
if (SENSITIVE_KEY_PATTERN.test(key)) {
|
|
59
|
+
masked.append(key, MASK);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
masked.append(key, value);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const result = masked.toString();
|
|
66
|
+
return query.startsWith('?') ? (result ? `?${result}` : '') : result;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=debug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/http/debug.ts"],"names":[],"mappings":"AAAA,MAAM,qBAAqB,GAAG,sDAAsD,CAAC;AACrF,MAAM,IAAI,GAAG,KAAK,CAAC;AAEnB,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,CACL,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,QAAQ;QACzB,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACrB,CAAC,CAAC,KAAK,YAAY,IAAI,CAAC;QACxB,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,CAC1B,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,OAA+B;IAClD,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACnD,IAAI,GAAG,CAAC,WAAW,EAAE,KAAK,eAAe,EAAE,CAAC;YAC1C,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;YACnB,SAAS;QACX,CAAC;QACD,IAAI,qBAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACpC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;YACnB,SAAS;QACX,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACtB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GA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AAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;QAC5C,IAAI,qBAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACpC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IACjC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface PollProgressEvent {
|
|
2
|
+
state: string;
|
|
3
|
+
elapsed_s: number;
|
|
4
|
+
}
|
|
5
|
+
export interface PollOptions<T> {
|
|
6
|
+
timeoutS?: number;
|
|
7
|
+
initialMs?: number;
|
|
8
|
+
factor?: number;
|
|
9
|
+
capMs?: number;
|
|
10
|
+
jitter?: boolean;
|
|
11
|
+
random?: () => number;
|
|
12
|
+
sleep?: (ms: number) => Promise<void>;
|
|
13
|
+
now?: () => number;
|
|
14
|
+
commandName?: string;
|
|
15
|
+
describeState?: (result: T) => string;
|
|
16
|
+
onProgress?: (event: PollProgressEvent) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function pollUntilTerminal<T>(fetchOnce: () => Promise<T>, isTerminal: (result: T) => boolean, options?: PollOptions<T>): Promise<T>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CliWaitTimeoutError } from '../errors.js';
|
|
2
|
+
const DEFAULT_TIMEOUT_S = 600;
|
|
3
|
+
const DEFAULT_INITIAL_MS = 1000;
|
|
4
|
+
const DEFAULT_FACTOR = 1.5;
|
|
5
|
+
const DEFAULT_CAP_MS = 10_000;
|
|
6
|
+
function defaultSleep(ms) {
|
|
7
|
+
return new Promise((resolve) => {
|
|
8
|
+
setTimeout(resolve, ms);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function defaultDescribeState(result) {
|
|
12
|
+
if (result && typeof result === 'object') {
|
|
13
|
+
const maybe = result;
|
|
14
|
+
if (typeof maybe.state === 'string')
|
|
15
|
+
return maybe.state;
|
|
16
|
+
if (typeof maybe.status === 'string')
|
|
17
|
+
return maybe.status;
|
|
18
|
+
if (typeof maybe.request_state === 'string')
|
|
19
|
+
return maybe.request_state;
|
|
20
|
+
}
|
|
21
|
+
return 'unknown';
|
|
22
|
+
}
|
|
23
|
+
export async function pollUntilTerminal(fetchOnce, isTerminal, options = {}) {
|
|
24
|
+
const timeoutMs = (options.timeoutS ?? DEFAULT_TIMEOUT_S) * 1000;
|
|
25
|
+
const factor = options.factor ?? DEFAULT_FACTOR;
|
|
26
|
+
const capMs = options.capMs ?? DEFAULT_CAP_MS;
|
|
27
|
+
const initialMs = options.initialMs ?? DEFAULT_INITIAL_MS;
|
|
28
|
+
const sleep = options.sleep ?? defaultSleep;
|
|
29
|
+
const now = options.now ?? (() => Date.now());
|
|
30
|
+
const jitter = options.jitter ?? true;
|
|
31
|
+
const random = options.random ?? Math.random;
|
|
32
|
+
const describe = options.describeState ?? defaultDescribeState;
|
|
33
|
+
const start = now();
|
|
34
|
+
let iteration = 0;
|
|
35
|
+
let lastState = 'unknown';
|
|
36
|
+
while (true) {
|
|
37
|
+
const result = await fetchOnce();
|
|
38
|
+
iteration += 1;
|
|
39
|
+
lastState = describe(result);
|
|
40
|
+
const elapsedS = Math.round((now() - start) / 1000);
|
|
41
|
+
options.onProgress?.({ state: lastState, elapsed_s: elapsedS });
|
|
42
|
+
if (isTerminal(result)) {
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
45
|
+
if (now() - start >= timeoutMs) {
|
|
46
|
+
throw new CliWaitTimeoutError(`${options.commandName ?? 'operation'} did not reach terminal state within ${options.timeoutS ?? DEFAULT_TIMEOUT_S}s`, {
|
|
47
|
+
lastState,
|
|
48
|
+
elapsedSeconds: elapsedS,
|
|
49
|
+
commandName: options.commandName,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
const base = Math.min(capMs, initialMs * factor ** (iteration - 1));
|
|
53
|
+
const delay = jitter ? Math.round(base * (0.9 + random() * 0.2)) : base;
|
|
54
|
+
await sleep(delay);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=poll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poll.js","sourceRoot":"","sources":["../../src/http/poll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAqBnD,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,cAAc,GAAG,MAAM,CAAC;AAE9B,SAAS,YAAY,CAAC,EAAU;IAC9B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAe;IAC3C,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QACzC,MAAM,KAAK,GAAI,MAAyE,CAAC;QACzF,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC,KAAK,CAAC;QACxD,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC,MAAM,CAAC;QAC1D,IAAI,OAAO,KAAK,CAAC,aAAa,KAAK,QAAQ;YAAE,OAAO,K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AAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEhE,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YACvB,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,IAAI,GAAG,EAAE,GAAG,KAAK,IAAI,SAAS,EAAE,CAAC;YAC/B,MAAM,IAAI,mBAAmB,CAC3B,GAAG,OAAO,CAAC,WAAW,IAAI,WAAW,wCAAwC,OAAO,CAAC,QAAQ,IAAI,iBAAiB,GAAG,EACrH;gBACE,SAAS;gBACT,cAAc,EAAE,QAAQ;gBACxB,WAAW,EAAE,OAAO,CAAC,WAAW;aACjC,CACF,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC;QACpE,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,GAAG,GAAG,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACxE,MAAM,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare function isRetryableStatus(status: number): boolean;
|
|
2
|
+
export declare function isRetryableNetworkError(error: unknown): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Parse a `Retry-After` header into milliseconds.
|
|
5
|
+
*
|
|
6
|
+
* Implements RFC 7231 §7.1.3: the value is either a non-negative integer
|
|
7
|
+
* number of seconds (`delta-seconds = 1*DIGIT`, which permits leading
|
|
8
|
+
* zeros like `"05"`) or an HTTP-date. The previous heuristic
|
|
9
|
+
* (`String(parsed) === trimmed`) wrongly rejected zero-padded values
|
|
10
|
+
* because `String(5) !== "05"`, dropping them through to the date branch
|
|
11
|
+
* where `Date.parse("05")` returns `NaN` and the backoff collapsed to
|
|
12
|
+
* 0ms — turning 429/503 throttling into immediate retries.
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseRetryAfterMs(value: string | null | undefined): number | null;
|
|
15
|
+
export interface RetryDecision {
|
|
16
|
+
retry: boolean;
|
|
17
|
+
/** Optional override for the delay before the next attempt (ms). */
|
|
18
|
+
delayMs?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface RetryOptions {
|
|
21
|
+
maxAttempts?: number;
|
|
22
|
+
baseMs?: number;
|
|
23
|
+
capMs?: number;
|
|
24
|
+
factor?: number;
|
|
25
|
+
jitter?: boolean;
|
|
26
|
+
shouldRetry?: (error: unknown, attempt: number) => boolean | RetryDecision;
|
|
27
|
+
sleep?: (ms: number) => Promise<void>;
|
|
28
|
+
random?: () => number;
|
|
29
|
+
}
|
|
30
|
+
export declare function withRetry<T>(fn: () => Promise<T>, options?: RetryOptions): Promise<T>;
|