@paradigma-inc/flywheel 0.1.53 → 0.1.72
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 +149 -17
- package/package.json +4 -2
- package/skills/flywheel/SKILL.md +4 -3
- package/skills/flywheel/getting-started/flywheel-quickstart.md +4 -4
- package/skills/flywheel/references/flywheel-cli-tool-map.md +47 -35
- package/skills/flywheel/references/flywheel-mcp-tool-map.md +16 -5
- package/skills/flywheel/setting-up-flywheel/claude-code-cli-installation.md +3 -3
- package/skills/flywheel/setting-up-flywheel/codex-cli-installation.md +3 -3
- package/skills/flywheel/setting-up-flywheel/installation-overview.md +9 -8
- package/skills/flywheel/setting-up-flywheel/other-hosts-installation.md +1 -1
- package/skills/flywheel/setting-up-flywheel/updating-flywheel-mcp.md +4 -4
- package/skills/flywheel-auto/SKILL.md +4 -3
- package/skills/flywheel-auto/references/flywheel-cli-tool-map.md +37 -35
- package/skills/flywheel-auto/references/flywheel-mcp-tool-map.md +4 -4
- package/skills/flywheel-lookahead/SKILL.md +1 -1
- package/skills/flywheel-lookahead/references/flywheel-cli-tool-map.md +37 -35
- package/skills/flywheel-lookahead/references/flywheel-mcp-tool-map.md +4 -4
- package/skills/flywheel-prove/SKILL.md +1 -1
- package/skills/flywheel-reproduce/SKILL.md +4 -3
- package/skills/flywheel-reproduce/references/flywheel-cli-tool-map.md +37 -35
- package/skills/flywheel-reproduce/references/flywheel-mcp-tool-map.md +4 -4
- package/skills/flywheel-to-graph/SKILL.md +1 -1
- package/skills/flywheel-to-graph/references/flywheel-cli-tool-map.md +37 -35
- package/skills/flywheel-to-graph/references/flywheel-mcp-tool-map.md +4 -4
- package/skills/flywheel-tree/SKILL.md +1 -1
- package/src/agents.mjs +114 -48
- package/src/cli.mjs +373 -56
- package/src/mcp-writer.mjs +190 -17
- package/src/runtime/required-runtime-commands.json +19 -4
- package/src/runtime/vendor/flywheel-cli-dist/auth/login.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/login.js +3 -6
- package/src/runtime/vendor/flywheel-cli-dist/auth/login.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.js +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/_admin-auth.d.ts +27 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_admin-auth.js +54 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_admin-auth.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.d.ts +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.js +6 -5
- package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/_browser-handoff.d.ts +21 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_browser-handoff.js +51 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_browser-handoff.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.d.ts +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.js +6 -3
- package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/_secret-param.d.ts +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_secret-param.js +18 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_secret-param.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-file-out.d.ts +39 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-file-out.js +72 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-file-out.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-detach.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-detach.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-add.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-add.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-remove.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-remove.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-set-primary.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-set-primary.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.d.ts +2 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.js +6 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-preview.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-preview.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-proof.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-proof.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-get.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-get.js +11 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-get.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-set.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-set.js +60 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-set.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export-stream.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export-stream.js +115 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export-stream.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-list.d.ts +4 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-list.js +39 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-nodes-audit-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-nodes-audit-list.js +15 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-nodes-audit-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.d.ts +18 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.js +38 -5
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.js +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-mode.d.ts +4 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-mode.js +42 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-mode.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.js +15 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-list.js +8 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-list.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-request-approval.js +6 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-request-approval.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release-all.js +18 -7
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release-all.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-billing-portal.js +8 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-billing-portal.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-purchase.js +8 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-purchase.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscribe.js +8 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscribe.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/destructive-confirmation.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/destructive-confirmation.js +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/destructive-confirmation.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/enums.d.ts +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/enums.js +4 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/enums.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/env.d.ts +0 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/env.js +7 -12
- package/src/runtime/vendor/flywheel-cli-dist/commands/env.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-history.js +42 -30
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-history.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-subgraph.js +12 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-subgraph.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-link.js +9 -14
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-link.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/help-format.d.ts +31 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/help-format.js +69 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/help-format.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/help.d.ts +6 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/help.js +226 -124
- package/src/runtime/vendor/flywheel-cli-dist/commands/help.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-create.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-create.js +25 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-create.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-delete.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-delete.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-delete.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-list.js +10 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-runs-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-runs-list.js +15 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-runs-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-create.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-create.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-create.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-delete.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-delete.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-delete.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-list.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-list.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-update.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-update.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-update.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-set-enabled.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-set-enabled.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-set-enabled.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-update.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-update.js +29 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-update.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/index.js +36 -6
- package/src/runtime/vendor/flywheel-cli-dist/commands/index.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-set.js +7 -3
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-set.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-set.js +6 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-set.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.js +6 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.js +8 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-resolve-slug.js +55 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-resolve-slug.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.js +13 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.js +4 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.js +16 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/account.js +8 -7
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/account.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/admin.d.ts +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/admin.js +131 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/admin.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/api-keys.js +8 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/api-keys.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/approval.js +29 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/approval.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.js +13 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.js +2 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/budgets.js +11 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/budgets.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.js +2 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/credits.js +8 -6
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/credits.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/env.js +7 -5
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/env.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/github.js +6 -14
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/github.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/hooks.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/hooks.js +312 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/hooks.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/integrations.js +22 -8
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/integrations.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.js +122 -25
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.js +2 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.js +1 -31
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/sharing.js +12 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/sharing.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry.d.ts +2 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry.js +46 -9
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-refresh.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-refresh.js +20 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-refresh.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-resolve.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-resolve.js +23 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-resolve.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/errors.d.ts +15 -0
- package/src/runtime/vendor/flywheel-cli-dist/errors.js +16 -1
- package/src/runtime/vendor/flywheel-cli-dist/errors.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/http/client.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/client.js +75 -19
- package/src/runtime/vendor/flywheel-cli-dist/http/client.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/http/debug.d.ts +3 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/debug.js +21 -2
- package/src/runtime/vendor/flywheel-cli-dist/http/debug.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/main.js +119 -10
- package/src/runtime/vendor/flywheel-cli-dist/main.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/output/format.js +44 -6
- package/src/runtime/vendor/flywheel-cli-dist/output/format.js.map +1 -1
- package/src/runtime/vendor/manifest.json +82 -10
- package/src/setup/base-url.mjs +43 -0
- package/src/setup/command.mjs +2 -0
- package/src/setup/io/patchers/json.mjs +2 -0
- package/src/setup/io/patchers/toml.mjs +7 -1
- package/src/setup/io/patchers/yaml.mjs +2 -0
- package/src/setup/modes/cli.mjs +72 -24
- package/src/setup/modes/mcp-command.mjs +146 -38
- package/src/setup/modes/mcp.mjs +26 -1
- package/src/setup/resolved-selection-record.mjs +25 -0
- package/src/setup/shared/prior-mode-detect.mjs +133 -14
- package/src/setup-auth.mjs +3 -2
- package/src/skill-installer.mjs +179 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-get.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-get.js +0 -6
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-get.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-set.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-set.js +0 -19
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-set.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-audit-list.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-audit-list.js +0 -7
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-audit-list.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/commands/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/commands/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,GAC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,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CACrD,CAAC;IACF,OAAO;QACL,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACpC,IAAI;YACJ,OAAO,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC,OAAO;YACvC,MAAM,EAAE,IAAI,KAAK,MAAM;SACxB,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,42 +1,40 @@
|
|
|
1
|
-
import { createWriteStream } from 'node:fs';
|
|
2
1
|
import { CliUsageError } from '../errors.js';
|
|
2
|
+
import { openWriteStreamOrFail } from './_stream-file-out.js';
|
|
3
3
|
import { makeSafeStreamWriter } from './_stream-writer.js';
|
|
4
|
+
import { rejectApiKeyAuthMode } from './auth-mode.js';
|
|
4
5
|
export const exportHistoryCommand = async (context) => {
|
|
6
|
+
rejectApiKeyAuthMode(context, 'export:history', 'legacy-session-only');
|
|
5
7
|
if (!context.requestRaw) {
|
|
6
8
|
throw new CliUsageError('binary transport unavailable in this context');
|
|
7
9
|
}
|
|
10
|
+
// Open and validate ``--out`` BEFORE dispatching the HTTP request;
|
|
11
|
+
// ``/legacy/history/export.jsonl`` is a history-sized feed and we
|
|
12
|
+
// should not start that server-side work just to fail locally on a
|
|
13
|
+
// bad output path. The helper writes to a ``.partial`` temp file
|
|
14
|
+
// next to the destination so a later request failure leaves the
|
|
15
|
+
// caller's prior ``--out`` contents untouched.
|
|
8
16
|
const outPath = context.globals?.outPath;
|
|
9
|
-
const
|
|
17
|
+
const fileHandle = await openWriteStreamOrFail(outPath);
|
|
10
18
|
// Stream the response body chunk-by-chunk to avoid buffering the full
|
|
11
|
-
// JSONL payload in memory.
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
resolve();
|
|
22
|
-
};
|
|
23
|
-
const onError = (err) => {
|
|
24
|
-
candidate.off('open', onOpen);
|
|
25
|
-
reject(err);
|
|
26
|
-
};
|
|
27
|
-
candidate.once('open', onOpen);
|
|
28
|
-
candidate.once('error', onError);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
catch (err) {
|
|
32
|
-
candidate.destroy();
|
|
33
|
-
throw new CliUsageError(`cannot open --out=${outPath}: ${err.message}`);
|
|
19
|
+
// JSONL payload in memory. ``response.text()`` here would materialize
|
|
20
|
+
// the whole body before a single byte reached the writer.
|
|
21
|
+
let response;
|
|
22
|
+
try {
|
|
23
|
+
response = await context.requestRaw('GET', '/legacy/history/export.jsonl');
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
if (fileHandle) {
|
|
27
|
+
fileHandle.stream.destroy();
|
|
28
|
+
await fileHandle.abort();
|
|
34
29
|
}
|
|
35
|
-
|
|
36
|
-
// destination destroyed mid-stream) surface deterministically
|
|
37
|
-
// instead of being swallowed into a truncated file + exit 0.
|
|
38
|
-
safeWriter = makeSafeStreamWriter(candidate);
|
|
30
|
+
throw err;
|
|
39
31
|
}
|
|
32
|
+
// Wrap the opened stream so in-loop write failures (ENOSPC, EIO,
|
|
33
|
+
// EPIPE, destination destroyed mid-stream) surface deterministically
|
|
34
|
+
// instead of being swallowed into a truncated file + exit 0.
|
|
35
|
+
const safeWriter = fileHandle
|
|
36
|
+
? makeSafeStreamWriter(fileHandle.stream)
|
|
37
|
+
: null;
|
|
40
38
|
// Prefer the injected stdout writer so programmatic runCli callers
|
|
41
39
|
// capture streamed output; fall back to process.stdout for direct
|
|
42
40
|
// handler invocations (e.g. unit tests that build a bare context).
|
|
@@ -52,13 +50,18 @@ export const exportHistoryCommand = async (context) => {
|
|
|
52
50
|
writeStdout(chunk);
|
|
53
51
|
};
|
|
54
52
|
if (!response.body) {
|
|
55
|
-
// No body — nothing to stream. Close
|
|
53
|
+
// No body — nothing to stream. Close + finalize (renames the empty
|
|
54
|
+
// temp over the destination so callers observing ``outPath`` always
|
|
55
|
+
// see a fully-formed result, never a stale prior version).
|
|
56
56
|
if (safeWriter)
|
|
57
57
|
await safeWriter.close();
|
|
58
|
+
if (fileHandle)
|
|
59
|
+
await fileHandle.finalize();
|
|
58
60
|
return null;
|
|
59
61
|
}
|
|
60
62
|
const decoder = new TextDecoder();
|
|
61
63
|
const reader = response.body.getReader();
|
|
64
|
+
let succeeded = false;
|
|
62
65
|
try {
|
|
63
66
|
while (true) {
|
|
64
67
|
const { value, done } = await reader.read();
|
|
@@ -71,11 +74,20 @@ export const exportHistoryCommand = async (context) => {
|
|
|
71
74
|
const tail = decoder.decode();
|
|
72
75
|
if (tail)
|
|
73
76
|
await write(tail);
|
|
77
|
+
succeeded = true;
|
|
74
78
|
}
|
|
75
79
|
finally {
|
|
76
80
|
reader.releaseLock();
|
|
77
81
|
if (safeWriter)
|
|
78
82
|
await safeWriter.close();
|
|
83
|
+
if (fileHandle) {
|
|
84
|
+
if (succeeded) {
|
|
85
|
+
await fileHandle.finalize();
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
await fileHandle.abort();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
79
91
|
}
|
|
80
92
|
return null;
|
|
81
93
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-history.js","sourceRoot":"","sources":["../../src/commands/export-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"export-history.js","sourceRoot":"","sources":["../../src/commands/export-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAyB,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAyB,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGtD,MAAM,CAAC,MAAM,oBAAoB,GAAmB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AS,EAAE,CAAC;gBACd,MAAM,UAAU,CAAC,QAAQ,EAAE,CAAC;YAC9B,CAAC;iBAAM,CAAC;gBACN,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CliUsageError } from '../errors.js';
|
|
2
|
-
import { requiredString } from './utils.js';
|
|
2
|
+
import { optionalInt, requiredBoolean, requiredString } from './utils.js';
|
|
3
3
|
export const exportSubgraphCommand = async (context) => {
|
|
4
4
|
const rawNodeIds = requiredString(context.params, 'node_ids');
|
|
5
5
|
const nodeIds = rawNodeIds
|
|
@@ -9,10 +9,18 @@ export const exportSubgraphCommand = async (context) => {
|
|
|
9
9
|
if (nodeIds.length === 0) {
|
|
10
10
|
throw new CliUsageError('missing required parameter: node_ids');
|
|
11
11
|
}
|
|
12
|
+
const body = {
|
|
13
|
+
node_ids: nodeIds,
|
|
14
|
+
};
|
|
15
|
+
if (context.params.include_descendants !== undefined) {
|
|
16
|
+
body.include_descendants = requiredBoolean(context.params, 'include_descendants');
|
|
17
|
+
}
|
|
18
|
+
const maxNodes = optionalInt(context.params, 'max_nodes');
|
|
19
|
+
if (maxNodes !== undefined) {
|
|
20
|
+
body.max_nodes = maxNodes;
|
|
21
|
+
}
|
|
12
22
|
return context.requestJson('POST', '/export', {
|
|
13
|
-
body
|
|
14
|
-
node_ids: nodeIds,
|
|
15
|
-
},
|
|
23
|
+
body,
|
|
16
24
|
});
|
|
17
25
|
};
|
|
18
26
|
//# sourceMappingURL=export-subgraph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-subgraph.js","sourceRoot":"","sources":["../../src/commands/export-subgraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"export-subgraph.js","sourceRoot":"","sources":["../../src/commands/export-subgraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1E,MAAM,CAAC,MAAM,qBAAqB,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IACrE,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC9D,MAAM,OAAO,GAAG,UAAU;SACvB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;SAC5B,MAAM,CAAC,OAAO,CAAC,CAAC;IACnB,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,aAAa,CAAC,sCAAsC,CAAC,CAAC;IAClE,CAAC;IACD,MAAM,IAAI,GAA4B;QACpC,QAAQ,EAAE,OAAO;KAClB,CAAC;IACF,IAAI,OAAO,CAAC,MAAM,CAAC,mBAAmB,KAAK,SAAS,EAAE,CAAC;QACrD,IAAI,CAAC,mBAAmB,GAAG,eAAe,CACxC,OAAO,CAAC,MAAM,EACd,qBAAqB,CACtB,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC1D,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IACD,OAAO,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE;QAC5C,IAAI;KACL,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
// The server route POST /auth/github/link-installation reads
|
|
3
|
-
// installation_id and state from the URL query string (not the JSON
|
|
4
|
-
// body). Sending them as body fields 422's with "field required" on the
|
|
5
|
-
// query params. Forward them through RequestOptions.query so the HTTP
|
|
6
|
-
// client appends them to the URL.
|
|
1
|
+
import { buildBrowserHandoffResult, extractOpenUrl } from './_browser-handoff.js';
|
|
7
2
|
export const githubLinkCommand = async (context) => {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
const payload = (await context.requestJson('GET', '/auth/github/install-url')) ?? {};
|
|
4
|
+
return buildBrowserHandoffResult({
|
|
5
|
+
command: 'github:link',
|
|
6
|
+
url: extractOpenUrl(payload),
|
|
7
|
+
globals: context.globals,
|
|
8
|
+
stderr: context.stderr,
|
|
9
|
+
nextAction: 'Run flywheel github:status after approving in the browser.',
|
|
10
|
+
});
|
|
16
11
|
};
|
|
17
12
|
//# sourceMappingURL=github-link.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-link.js","sourceRoot":"","sources":["../../src/commands/github-link.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-link.js","sourceRoot":"","sources":["../../src/commands/github-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGlF,MAAM,CAAC,MAAM,iBAAiB,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IACjE,MAAM,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,WAAW,CACxC,KAAK,EACL,0BAA0B,CAC3B,CAAC,IAAI,EAAE,CAAC;IACT,OAAO,yBAAyB,CAAC;QAC/B,OAAO,EAAE,aAAa;QACtB,GAAG,EAAE,cAAc,CAAC,OAAO,CAAC;QAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,UAAU,EAAE,4DAA4D;KACzE,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface HelpRenderOptions {
|
|
2
|
+
width?: number;
|
|
3
|
+
}
|
|
4
|
+
export interface DefinitionItem {
|
|
5
|
+
term: string;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const FLYWHEEL_MARK = "\u273B";
|
|
9
|
+
export declare const styles: {
|
|
10
|
+
title: (text: string) => string;
|
|
11
|
+
section: (text: string) => string;
|
|
12
|
+
command: (text: string) => string;
|
|
13
|
+
flag: (text: string) => string;
|
|
14
|
+
example: (text: string) => string;
|
|
15
|
+
muted: (text: string) => string;
|
|
16
|
+
warning: (text: string) => string;
|
|
17
|
+
success: (text: string) => string;
|
|
18
|
+
};
|
|
19
|
+
export declare function normalizeTerminalWidth(width?: number): number;
|
|
20
|
+
export declare function terminalDisplayWidth(text: string): number;
|
|
21
|
+
export declare function wrapDescription(text: string, width: number): string[];
|
|
22
|
+
export declare function renderIndentedBlock(text: string, { width, indent }: {
|
|
23
|
+
width: number;
|
|
24
|
+
indent?: number;
|
|
25
|
+
}): string[];
|
|
26
|
+
export declare function renderDefinitionList(items: ReadonlyArray<DefinitionItem>, { width, termWidth, indent, }: {
|
|
27
|
+
width: number;
|
|
28
|
+
termWidth?: number;
|
|
29
|
+
indent?: number;
|
|
30
|
+
}): string[];
|
|
31
|
+
export declare function section(title: string, body: ReadonlyArray<string>): string[];
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import pc from 'picocolors';
|
|
2
|
+
import stringWidth from 'string-width';
|
|
3
|
+
import wrapAnsi from 'wrap-ansi';
|
|
4
|
+
export const FLYWHEEL_MARK = '✻';
|
|
5
|
+
export const styles = {
|
|
6
|
+
title: (text) => pc.bold(pc.cyan(text)),
|
|
7
|
+
section: (text) => pc.bold(text),
|
|
8
|
+
command: (text) => pc.green(text),
|
|
9
|
+
flag: (text) => pc.cyan(text),
|
|
10
|
+
example: (text) => pc.green(text),
|
|
11
|
+
muted: (text) => pc.dim(text),
|
|
12
|
+
warning: (text) => pc.yellow(text),
|
|
13
|
+
success: (text) => pc.green(text),
|
|
14
|
+
};
|
|
15
|
+
export function normalizeTerminalWidth(width) {
|
|
16
|
+
const candidate = width ?? process.stdout.columns;
|
|
17
|
+
if (typeof candidate !== 'number' || !Number.isFinite(candidate)) {
|
|
18
|
+
return 88;
|
|
19
|
+
}
|
|
20
|
+
return Math.min(100, Math.max(48, Math.floor(candidate)));
|
|
21
|
+
}
|
|
22
|
+
export function terminalDisplayWidth(text) {
|
|
23
|
+
return stringWidth(text);
|
|
24
|
+
}
|
|
25
|
+
export function wrapDescription(text, width) {
|
|
26
|
+
const normalizedWidth = Math.max(1, Math.floor(width));
|
|
27
|
+
return wrapAnsi(text, normalizedWidth, { hard: true, trim: false }).split('\n');
|
|
28
|
+
}
|
|
29
|
+
function padVisible(text, width) {
|
|
30
|
+
const padding = Math.max(0, width - terminalDisplayWidth(text));
|
|
31
|
+
return `${text}${' '.repeat(padding)}`;
|
|
32
|
+
}
|
|
33
|
+
export function renderIndentedBlock(text, { width, indent = 2 }) {
|
|
34
|
+
const prefix = ' '.repeat(indent);
|
|
35
|
+
const availableWidth = Math.max(1, width - indent);
|
|
36
|
+
return text
|
|
37
|
+
.split('\n')
|
|
38
|
+
.flatMap((line) => wrapDescription(line, availableWidth))
|
|
39
|
+
.map((line) => `${prefix}${line}`);
|
|
40
|
+
}
|
|
41
|
+
export function renderDefinitionList(items, { width, termWidth = 32, indent = 2, }) {
|
|
42
|
+
const prefix = ' '.repeat(indent);
|
|
43
|
+
const gap = ' ';
|
|
44
|
+
const descriptionWidth = Math.max(12, width - indent - termWidth - gap.length);
|
|
45
|
+
const continuationPrefix = `${prefix}${' '.repeat(termWidth)}${gap}`;
|
|
46
|
+
const lines = [];
|
|
47
|
+
for (const item of items) {
|
|
48
|
+
const descriptionLines = wrapDescription(item.description, descriptionWidth);
|
|
49
|
+
const [firstDescription = '', ...restDescriptions] = descriptionLines;
|
|
50
|
+
const termWidthActual = terminalDisplayWidth(item.term);
|
|
51
|
+
if (termWidthActual > termWidth) {
|
|
52
|
+
lines.push(`${prefix}${item.term}`);
|
|
53
|
+
lines.push(`${continuationPrefix}${firstDescription}`);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
lines.push(`${prefix}${padVisible(item.term, termWidth)}${gap}${firstDescription}`);
|
|
57
|
+
}
|
|
58
|
+
for (const descriptionLine of restDescriptions) {
|
|
59
|
+
lines.push(`${continuationPrefix}${descriptionLine}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return lines;
|
|
63
|
+
}
|
|
64
|
+
export function section(title, body) {
|
|
65
|
+
if (body.length === 0)
|
|
66
|
+
return [];
|
|
67
|
+
return [styles.section(title), ...body, ''];
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=help-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-format.js","sourceRoot":"","sources":["../../src/commands/help-format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,QAAQ,MAAM,WAAW,CAAC;AAWjC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC,IAAY,EAAU,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvD,OAAO,EAAE,CAAC,IAAY,EAAU,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;IAChD,OAAO,EAAE,CAAC,IAAY,EAAU,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;IACjD,IAAI,EAAE,CAAC,IAAY,EAAU,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC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AAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;QAC7E,MAAM,CAAC,gBAAgB,GAAG,EAAE,EAAE,GAAG,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;QACtE,MAAM,eAAe,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAExD,IAAI,eAAe,GAAG,SAAS,EAAE,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YACpC,KAAK,CAAC,IAAI,CAAC,GAAG,kBAAkB,GAAG,gBAAgB,EAAE,CAAC,CAAC;QACzD,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CACR,GAAG,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,GAAG,GAAG,gBAAgB,EAAE,CACxE,CAAC;QACJ,CAAC;QAED,KAAK,MAAM,eAAe,IAAI,gBAAgB,EAAE,CAAC;YAC/C,KAAK,CAAC,IAAI,CAAC,GAAG,kBAAkB,GAAG,eAAe,EAAE,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAAa,EAAE,IAA2B;IAChE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACjC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { type HelpRenderOptions } from './help-format.js';
|
|
1
2
|
import { type CommandTopicId } from './registry.js';
|
|
2
3
|
export interface RenderCommandHelpOptions {
|
|
3
4
|
schema?: boolean;
|
|
5
|
+
width?: number;
|
|
4
6
|
}
|
|
5
7
|
export interface HelpExtra {
|
|
6
8
|
group: CommandTopicId;
|
|
7
9
|
name: string;
|
|
8
10
|
summary: string;
|
|
11
|
+
hidden?: boolean;
|
|
9
12
|
}
|
|
13
|
+
export declare function isInternalMode(): boolean;
|
|
14
|
+
export declare function hasAdminDiscoveryCredential(): boolean;
|
|
10
15
|
export declare const TOPIC_ORDER: ReadonlyArray<{
|
|
11
16
|
id: CommandTopicId;
|
|
12
17
|
label: string;
|
|
@@ -19,5 +24,5 @@ export declare const TOPIC_ORDER: ReadonlyArray<{
|
|
|
19
24
|
*/
|
|
20
25
|
export declare function renderHelpAsJson(extras?: ReadonlyArray<HelpExtra>): string;
|
|
21
26
|
export declare function renderCommandHelpAsJson(commandName: string): string;
|
|
22
|
-
export declare function renderHelp(extras?: ReadonlyArray<HelpExtra
|
|
27
|
+
export declare function renderHelp(extras?: ReadonlyArray<HelpExtra>, options?: HelpRenderOptions): string;
|
|
23
28
|
export declare function renderCommandHelp(commandName: string, options?: RenderCommandHelpOptions): string;
|