@fased/fased 0.1.54 → 0.1.56
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/config/capability-catalog.json +12 -0
- package/dist/acp/client.js +2 -2
- package/dist/acp/secret-file.js +2 -2
- package/dist/agents/agent-scope.js +2 -2
- package/dist/agents/apply-patch.js +8 -8
- package/dist/agents/auth-profiles/paths.js +2 -2
- package/dist/agents/auth-profiles/store.js +2 -2
- package/dist/agents/authenticated-model-catalog.js +28 -0
- package/dist/agents/bash-tools.exec-host-node.js +1 -1
- package/dist/agents/bash-tools.exec.js +1 -1
- package/dist/agents/bash-tools.shared.js +2 -2
- package/dist/agents/cli-credentials.js +4 -4
- package/dist/agents/copilot-dynamic-headers.js +37 -0
- package/dist/agents/current-model-catalog.js +9 -13
- package/dist/agents/docs-path.js +3 -3
- package/dist/agents/embedded-pi-mcp.js +4 -4
- package/dist/agents/identity-avatar.js +3 -3
- package/dist/agents/identity-file.js +2 -2
- package/dist/agents/model-catalog-normalized.js +1 -0
- package/dist/agents/model-catalog-source.js +2 -2
- package/dist/agents/model-catalog.js +1 -1
- package/dist/agents/model-metadata.js +58 -9
- package/dist/agents/openai-codex-app-server.js +499 -0
- package/dist/agents/pi-embedded-runner/compact.js +3 -3
- package/dist/agents/pi-embedded-runner/extra-params.js +168 -79
- package/dist/agents/pi-embedded-runner/model.js +62 -1
- package/dist/agents/pi-embedded-runner/moonshot-stream-wrappers.js +46 -0
- package/dist/agents/pi-embedded-runner/openai-stream-wrappers.js +221 -0
- package/dist/agents/pi-embedded-runner/run/attempt.js +6 -4
- package/dist/agents/pi-embedded-runner/run.js +5 -2
- package/dist/agents/pi-embedded-runner/utils.js +1 -1
- package/dist/agents/pi-embedded-runner.js +1 -1
- package/dist/agents/pi-embedded-subscribe.raw-stream.js +3 -3
- package/dist/agents/pi-extensions/compaction-safeguard.js +3 -3
- package/dist/agents/pi-model-discovery.js +6 -6
- package/dist/agents/pi-project-settings.js +3 -3
- package/dist/agents/pi-tools.js +2 -2
- package/dist/agents/sandbox/fs-bridge.js +2 -2
- package/dist/agents/session-dirs.js +4 -4
- package/dist/agents/session-write-lock.js +13 -13
- package/dist/agents/shell-utils.js +5 -5
- package/dist/agents/skills/bundled-dir.js +4 -4
- package/dist/agents/skills/local-loader.js +6 -6
- package/dist/agents/skills/plugin-skills.js +2 -2
- package/dist/agents/skills/workspace.js +13 -13
- package/dist/agents/skills-install-download.js +7 -7
- package/dist/agents/skills-install-plan.js +2 -2
- package/dist/agents/skills-install.js +2 -2
- package/dist/agents/skills-status.js +2 -2
- package/dist/agents/subagent-depth.js +2 -2
- package/dist/agents/system-prompt-params.js +2 -2
- package/dist/agents/tools/discord-actions-messaging.js +1 -1
- package/dist/agents/tools/message-tool.js +1 -1
- package/dist/agents/tools/session-status-tool.js +3 -3
- package/dist/agents/tools/slack-actions.js +1 -1
- package/dist/agents/tools/tts-tool.js +1 -1
- package/dist/agents/workspace.js +22 -22
- package/dist/auto-reply/reply/agent-runner-execution.js +2 -2
- package/dist/auto-reply/reply/agent-runner.js +2 -2
- package/dist/auto-reply/reply/commands-export-session.js +7 -7
- package/dist/auto-reply/reply/commands-models.js +1 -1
- package/dist/auto-reply/reply/directive-handling.impl.js +4 -1
- package/dist/auto-reply/reply/dispatch-acp.js +1 -1
- package/dist/auto-reply/reply/dispatch-from-config.js +1 -1
- package/dist/auto-reply/reply/get-reply-run.js +20 -2
- package/dist/auto-reply/reply/model-selection.js +1 -1
- package/dist/auto-reply/reply/post-compaction-audit.js +3 -3
- package/dist/auto-reply/reply/post-compaction-context.js +3 -3
- package/dist/auto-reply/reply/session-reset-model.js +1 -1
- package/dist/auto-reply/reply/session.js +3 -3
- package/dist/auto-reply/skill-commands.js +3 -3
- package/dist/auto-reply/status.js +7 -7
- package/dist/auto-reply/thinking.js +1 -1
- package/dist/brand.js +1 -1
- package/dist/browser/cdp.helpers.js +2 -2
- package/dist/browser/chrome.executables.js +3 -3
- package/dist/browser/chrome.js +5 -5
- package/dist/browser/chrome.profile-decoration.js +6 -6
- package/dist/browser/extension-relay.js +7 -7
- package/dist/browser/profiles-service.js +2 -2
- package/dist/browser/server-context.js +2 -2
- package/dist/browser/trash.js +4 -4
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/canvas-host/server.js +4 -4
- package/dist/capabilities/catalog.js +3 -3
- package/dist/channels/plugins/catalog.js +3 -3
- package/dist/cli/browser-cli-extension.js +6 -6
- package/dist/cli/command-format.js +2 -2
- package/dist/cli/cron-cli/register.cron-add.js +1 -1
- package/dist/cli/cron-cli/register.cron-simple.js +2 -2
- package/dist/cli/dns-cli.js +9 -9
- package/dist/cli/gateway-cli/dev.js +5 -5
- package/dist/cli/gateway-cli/run.js +2 -2
- package/dist/cli/hooks-cli.js +5 -5
- package/dist/cli/lightweight/gateway-runtime-probe.js +2 -2
- package/dist/cli/memory-cli.js +7 -7
- package/dist/cli/nodes-media-utils.js +2 -2
- package/dist/cli/plugins-cli.js +2 -2
- package/dist/cli/program/register.agent.js +1 -1
- package/dist/cli/providers-cli.js +3 -2
- package/dist/cli/secrets-cli.js +3 -3
- package/dist/cli/windows-argv.js +2 -2
- package/dist/commands/agent.js +22 -3
- package/dist/commands/auth-choice.apply.api-providers.js +3 -8
- package/dist/commands/auth-choice.apply.openai.js +13 -7
- package/dist/commands/auth-choice.model-check.js +1 -2
- package/dist/commands/configure.gateway-auth.js +14 -16
- package/dist/commands/dashboard-link.js +3 -3
- package/dist/commands/doctor-config-flow.js +1 -1
- package/dist/commands/doctor-install.js +5 -5
- package/dist/commands/doctor-memory-search.js +2 -2
- package/dist/commands/doctor-platform-notes.js +2 -2
- package/dist/commands/doctor-sandbox.js +2 -2
- package/dist/commands/doctor-state-integrity.js +23 -23
- package/dist/commands/doctor-workspace.js +3 -3
- package/dist/commands/doctor.js +3 -3
- package/dist/commands/hosted-dashboard-probe.js +3 -3
- package/dist/commands/managed-up.js +2 -2
- package/dist/commands/model-picker.js +27 -8
- package/dist/commands/models/list.probe.js +1 -1
- package/dist/commands/models/list.registry.js +13 -17
- package/dist/commands/models/list.status-command.js +2 -2
- package/dist/commands/onboard-auth.config-core.js +1 -1
- package/dist/commands/onboard-auth.config-litellm.js +21 -21
- package/dist/commands/onboard-auth.credentials.js +3 -4
- package/dist/commands/onboard-auth.js +0 -1
- package/dist/commands/onboarding/plugin-install.js +2 -2
- package/dist/commands/openai-codex-model-default.js +28 -5
- package/dist/commands/sessions-cleanup.js +2 -2
- package/dist/commands/signal-install.js +6 -6
- package/dist/commands/status-all/channels.js +2 -2
- package/dist/commands/wallet.js +47 -47
- package/dist/config/cache-utils.js +2 -2
- package/dist/config/includes.js +5 -5
- package/dist/config/io.js +2 -2
- package/dist/config/paths.js +3 -3
- package/dist/config/sat-runtime-ids.js +3 -3
- package/dist/config/sessions/disk-budget.js +6 -6
- package/dist/config/sessions/paths.js +2 -2
- package/dist/config/sessions/store.js +17 -17
- package/dist/config/sessions/transcript.js +4 -4
- package/dist/config/talk.js +2 -2
- package/dist/config/zod-schema.agent-defaults.js +6 -2
- package/dist/config/zod-schema.agent-runtime.js +6 -2
- package/dist/config/zod-schema.core.js +6 -2
- package/dist/control-ui/assets/{app-BKlu6OKz.js → app-D7TXyNRi.js} +1548 -1540
- package/dist/control-ui/assets/chat-model-ref-Djkv93yn.js +2 -0
- package/dist/control-ui/assets/{index-nrFcGMv-.js → index-BmSBom-w.js} +3 -3
- package/dist/control-ui/assets/{providers-BQFrRqym.js → providers-Cc89iMdx.js} +5 -5
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/version.json +1 -0
- package/dist/cron/isolated-agent/run.js +6 -2
- package/dist/cron/service/jobs.js +11 -1
- package/dist/cron/service/store.js +2 -2
- package/dist/cron/store.js +6 -6
- package/dist/daemon/systemd-system.js +5 -5
- package/dist/discord/monitor/gateway-plugin.js +2 -2
- package/dist/discord/monitor/thread-bindings.state.js +2 -2
- package/dist/discord/voice/manager.js +1 -1
- package/dist/extensions/sat-mining/src/sat-bond-layout.js +9 -9
- package/dist/gateway/client.js +4 -4
- package/dist/gateway/control-ui-boot-check.js +6 -6
- package/dist/gateway/control-ui-login.js +7 -7
- package/dist/gateway/control-ui.js +11 -9
- package/dist/gateway/hooks-mapping.js +4 -4
- package/dist/gateway/protocol/schema/agents-models-skills.js +66 -4
- package/dist/gateway/server-discovery.js +2 -2
- package/dist/gateway/server-http.js +4 -4
- package/dist/gateway/server-methods/chat.js +3 -3
- package/dist/gateway/server-methods/models.js +8 -8
- package/dist/gateway/server-methods/sessions.js +8 -8
- package/dist/gateway/server-methods/tts.js +2 -2
- package/dist/gateway/server-methods/usage.js +2 -2
- package/dist/gateway/server-model-catalog.js +3 -0
- package/dist/gateway/server.impl.js +3 -3
- package/dist/gateway/session-compaction-checkpoints.js +4 -4
- package/dist/gateway/session-utils.fs.js +24 -24
- package/dist/gateway/session-utils.js +6 -6
- package/dist/gateway/sessions-patch.js +27 -24
- package/dist/hooks/bundled-dir.js +4 -4
- package/dist/hooks/gmail-setup-utils.js +6 -6
- package/dist/hooks/import-url.js +2 -2
- package/dist/hooks/loader.js +4 -4
- package/dist/hooks/workspace.js +7 -7
- package/dist/infra/archive.js +17 -17
- package/dist/infra/boundary-file-read.js +2 -2
- package/dist/infra/boundary-path.js +15 -15
- package/dist/infra/brew.js +2 -2
- package/dist/infra/control-ui-assets.js +14 -14
- package/dist/infra/device-auth-store.js +8 -8
- package/dist/infra/device-identity.js +8 -8
- package/dist/infra/dotenv.js +2 -2
- package/dist/infra/exec-approvals.js +8 -8
- package/dist/infra/exec-command-resolution.js +4 -4
- package/dist/infra/exec-safe-bin-trust.js +2 -2
- package/dist/infra/fased-root.js +5 -5
- package/dist/infra/fs-safe.js +14 -14
- package/dist/infra/gateway-lock.js +11 -11
- package/dist/infra/git-commit.js +5 -5
- package/dist/infra/git-root.js +4 -4
- package/dist/infra/hosted-runtime-artifact.js +3 -3
- package/dist/infra/is-main.js +2 -2
- package/dist/infra/json-file.js +7 -7
- package/dist/infra/outbound/delivery-queue.js +16 -16
- package/dist/infra/path-env.js +3 -3
- package/dist/infra/ports-lsof.js +4 -4
- package/dist/infra/provider-usage.auth.js +3 -3
- package/dist/infra/safe-open-sync.js +2 -2
- package/dist/infra/session-cost-usage.js +9 -9
- package/dist/infra/shell-env.js +2 -2
- package/dist/infra/state-migrations.fs.js +6 -6
- package/dist/infra/state-migrations.js +23 -23
- package/dist/infra/tmp-fased-dir.js +6 -6
- package/dist/infra/update-runner.js +31 -3
- package/dist/infra/widearea-dns.js +3 -3
- package/dist/infra/wsl.js +2 -2
- package/dist/light-update-status.js +1 -1
- package/dist/line/accounts.js +2 -2
- package/dist/line/download.js +2 -2
- package/dist/logging/config.js +3 -3
- package/dist/logging/logger.js +7 -7
- package/dist/managed/federation.js +3 -3
- package/dist/managed/tunnel.js +3 -3
- package/dist/media/store.js +13 -13
- package/dist/media-understanding/runner.js +3 -3
- package/dist/memory/embeddings.js +2 -2
- package/dist/memory/internal.js +10 -10
- package/dist/memory/inventory.js +19 -2
- package/dist/memory/manager-sync-ops.js +7 -7
- package/dist/memory/repair-executor.js +17 -17
- package/dist/node-host/invoke-system-run-plan.js +8 -8
- package/dist/node-host/invoke.js +2 -2
- package/dist/node-host/runner.js +3 -3
- package/dist/pairing/pairing-store.js +3 -3
- package/dist/plugin-sdk/{accounts-DW9OS5Ll.js → accounts-DzWlKv1U.js} +1 -1
- package/dist/plugin-sdk/{actions-DQUXohRr.js → actions-BplQVLL6.js} +4 -4
- package/dist/plugin-sdk/{active-listener-BZQWZPF7.js → active-listener-x4MLhYUw.js} +1 -1
- package/dist/plugin-sdk/{allow-list-BYeKk0Sy.js → allow-list-DyAxs4yw.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-t4mmHsI2.js → audio-preflight-G8h3Sn8_.js} +43 -47
- package/dist/plugin-sdk/{audit-BZk_6Buw.js → audit-CWknklvI.js} +1 -1
- package/dist/plugin-sdk/{channel-access-CN5HiWdb.js → channel-access-a9Dnfw7-.js} +1 -1
- package/dist/plugin-sdk/{channel-access-configure-B7Kkvx9K.js → channel-access-configure-CD4QDN5E.js} +1 -1
- package/dist/plugin-sdk/{channel-adapters.discord-IOZP8Cv5.js → channel-adapters.discord-BS4S4Svh.js} +1 -1
- package/dist/plugin-sdk/channel-plugin-common.d.ts +3 -3
- package/dist/plugin-sdk/channel-plugin-common.js +4 -4
- package/dist/plugin-sdk/{chunk-B2ffJ-LR.js → chunk-B8EZkwiT.js} +1 -1
- package/dist/plugin-sdk/{chunk-items-jOdkyP53.js → chunk-items-CEPklxGe.js} +1 -1
- package/dist/plugin-sdk/command-status.d.ts +2 -2
- package/dist/plugin-sdk/command-status.js +43 -47
- package/dist/plugin-sdk/{commands-registry-BWb4NcfW.js → commands-registry-BfEa4tFA.js} +2 -2
- package/dist/plugin-sdk/{common-C4XrB73N.js → common-CbfckC19.js} +1 -1
- package/dist/plugin-sdk/{config-rySyVtKs.js → config-Bt5GhnA-.js} +105 -73
- package/dist/plugin-sdk/{config-schema-BaybPPrJ.js → config-schema-B9DKr6J5.js} +96239 -81587
- package/dist/plugin-sdk/device-pair.d.ts +1 -1
- package/dist/plugin-sdk/device-pair.js +2 -3
- package/dist/plugin-sdk/{diagnostic-Dfn1iERm.js → diagnostic-DLL_zekv.js} +3 -3
- package/dist/plugin-sdk/{directory-live-DatqU-eS.js → directory-live-CSuYxdwk.js} +1 -1
- package/dist/plugin-sdk/{directory-live-ClwN5KKq.js → directory-live-Dw7ZgC9_.js} +1 -1
- package/dist/plugin-sdk/discord.d.ts +5 -5
- package/dist/plugin-sdk/discord.js +31 -32
- package/dist/plugin-sdk/{draft-stream-controls-D4Tb_iS_.js → draft-stream-controls-BqchW1vi.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-BuYrl6q2.js → fetch-guard-CeG6u6ld.js} +1 -1
- package/dist/plugin-sdk/{filesystem-manager-B9DDPgfU.js → filesystem-manager-BGGGrkiN.js} +2 -2
- package/dist/plugin-sdk/{fs-safe-BG-VzVkL.js → fs-safe-xBqok6yR.js} +1 -1
- package/dist/plugin-sdk/{group-mentions-DLOOve8d.d.ts → group-mentions-BHRff6j8.d.ts} +1 -1
- package/dist/plugin-sdk/{guilds-BeT3iHHJ.js → guilds-CDhRIX57.js} +1 -1
- package/dist/plugin-sdk/{handle-action-CGF-Qnp0.js → handle-action-DbzZFYnG.js} +24 -25
- package/dist/plugin-sdk/{helpers-DgRMfCnT.js → helpers-CluGKuIV.js} +1 -1
- package/dist/plugin-sdk/{image-ops-CcBfoMLW.js → image-ops-CUaLtIFj.js} +1 -1
- package/dist/plugin-sdk/index.d.ts +8 -8
- package/dist/plugin-sdk/index.js +47 -51
- package/dist/plugin-sdk/json-store.js +6 -6
- package/dist/plugin-sdk/{login-DpDQyM7r.js → login-DJuHYDiK.js} +3 -3
- package/dist/plugin-sdk/{login-qr-COaSAPY5.js → login-qr-CbHL5ayf.js} +3 -3
- package/dist/plugin-sdk/{manager-Cqz30lA3.js → manager-oHAvZCT3.js} +7 -7
- package/dist/plugin-sdk/{markdown-tables-BOG5sSQQ.js → markdown-tables-Mkx7k92Y.js} +1 -1
- package/dist/plugin-sdk/{media-Bu-nJpPs.js → media-CA8sTmVE.js} +4 -4
- package/dist/plugin-sdk/{monitor-II_NIq3G.js → monitor-CZrN9pev.js} +51 -55
- package/dist/plugin-sdk/{monitor-DL6oEVo8.js → monitor-CmwGqNyV.js} +61 -65
- package/dist/plugin-sdk/{openresponses-http-vkHBBpGY.js → openresponses-http-CWOd4war.js} +43 -47
- package/dist/plugin-sdk/{optional-runtime-dependency-DEojVNfv.js → optional-runtime-dependency-DKmk9PZa.js} +1 -1
- package/dist/plugin-sdk/{outbound-mf2y6KuY.js → outbound-0oN9IfNw.js} +9 -9
- package/dist/plugin-sdk/{outbound-attachment-ivAHpWnn.js → outbound-attachment-DdVkqUzE.js} +2 -2
- package/dist/plugin-sdk/{pairing-message-CvJ6Qa1Q.d.ts → pairing-message-BMkkS038.d.ts} +2 -2
- package/dist/plugin-sdk/{pairing-message-CqYG12t-.js → pairing-message-ClqhfCUk.js} +1 -1
- package/dist/plugin-sdk/{pairing-store-D-21Sphe.js → pairing-store-B01mCSct.js} +2 -2
- package/dist/plugin-sdk/{pi-model-discovery-B6gD1clF.js → pi-model-discovery-Buz0JC1Y.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-3yDxS3ro.js → pi-model-discovery-runtime-DuwuoteY.js} +2 -2
- package/dist/plugin-sdk/{probe-Cyb-DGA3.js → probe--7xtfzMm.js} +3 -3
- package/dist/plugin-sdk/{probe-Dlk0Jxpw.js → probe-BFroeK3g.js} +1 -1
- package/dist/plugin-sdk/{probe-D8JAILir.js → probe-l_whvGLY.js} +1 -1
- package/dist/plugin-sdk/{resolve-channels-zEnvugag.js → probe-xY3Ky0Tx.js} +3 -4
- package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +2 -2
- package/dist/plugin-sdk/{pw-ai-CMplwiwf.js → pw-ai-B0domrii.js} +6 -8
- package/dist/plugin-sdk/{qmd-manager-DCUE21Kj.js → qmd-manager-CFFeM4Fl.js} +3 -3
- package/dist/plugin-sdk/{query-expansion-Zr9qQixm.js → query-expansion-CAI2kKLQ.js} +1 -1
- package/dist/plugin-sdk/{replies-wiI4veI7.js → replies-1macZ1mZ.js} +4 -4
- package/dist/plugin-sdk/{resolve-channels-ChWKWtA9.js → resolve-channels-87LZrFk_.js} +2 -2
- package/dist/plugin-sdk/resolve-channels-CwB2_019.js +4 -0
- package/dist/plugin-sdk/{resolve-outbound-target-bm9RUK5q.js → resolve-outbound-target-BdH6LUoW.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-ekGNc6os.js → resolve-route-CkNIKKEW.js} +1 -1
- package/dist/plugin-sdk/{resolve-users-BTvjQuui.js → resolve-users-Cxb5wpAQ.js} +1 -1
- package/dist/plugin-sdk/{resolve-users-CTzoruIZ.js → resolve-users-V6dHh_2B.js} +2 -2
- package/dist/plugin-sdk/{retry-policy-BvlC2SPh.js → retry-policy-9ybIh4Fq.js} +1 -1
- package/dist/plugin-sdk/{runtime-ClSakPxR.js → runtime-Dy420wBu.js} +3 -3
- package/dist/plugin-sdk/{runtime-dependency-yAWxH4El.js → runtime-dependency-CIw9t7-k.js} +123 -15
- package/dist/plugin-sdk/{sandbox-paths-lj7_EVuA.js → sandbox-paths-w64tYl0v.js} +1 -1
- package/dist/plugin-sdk/sat-runtime.d.ts +3 -3
- package/dist/plugin-sdk/sat-runtime.js +44 -10
- package/dist/plugin-sdk/{send-D264hFVb.js → send-2VcOMTN5.js} +9 -9
- package/dist/plugin-sdk/{send-CgyS75Av.js → send-BQUtCJFW.js} +10 -10
- package/dist/plugin-sdk/{send-D58yEeH4.js → send-DPJIIYAs.js} +6 -6
- package/dist/plugin-sdk/{send-C7x6gzSl.js → send-Dqes9tdU.js} +13 -13
- package/dist/plugin-sdk/{send-DrAtUGLM.js → send-J4JWKP62.js} +8 -8
- package/dist/plugin-sdk/{session-DyMtb5YQ.js → session-C_n2S5ub.js} +3 -3
- package/dist/plugin-sdk/{skill-commands-Q80wCyry.js → skill-commands-B7wx9ax8.js} +102 -102
- package/dist/plugin-sdk/{slack-C-I6q3NB.js → slack-BouRQG-W.js} +64 -68
- package/dist/plugin-sdk/{slack-actions-dGE_t_Un.js → slack-actions-CasHVtiq.js} +20 -21
- package/dist/plugin-sdk/slack.d.ts +5 -5
- package/dist/plugin-sdk/slack.js +13 -13
- package/dist/plugin-sdk/{ssrf-BZG8Ztod.js → ssrf-fG4UHKBw.js} +180 -2
- package/dist/plugin-sdk/{sticker-cache-DCrDTYIi.js → sticker-cache-BvGEUas3.js} +3 -3
- package/dist/plugin-sdk/{tables-0mhUOh5v.js → tables-CjlQJV4r.js} +2 -2
- package/dist/plugin-sdk/{device-pairing-D2Yq-_U6.js → tailscale-status-DwpNdO3Z.js} +104 -2
- package/dist/plugin-sdk/{targets-znKHngSk.js → targets-QfP164Dh.js} +2 -2
- package/dist/plugin-sdk/{telegram-actions-GBYY8-x9.js → telegram-actions-CwYjV6Db.js} +48 -52
- package/dist/plugin-sdk/telegram.d.ts +5 -5
- package/dist/plugin-sdk/telegram.js +11 -11
- package/dist/plugin-sdk/{thread-bindings.lifecycle-ClzPBK70.js → thread-bindings.lifecycle-DU4iX_Jr.js} +3 -3
- package/dist/plugin-sdk/{thread-bindings.state-Ha01nmrq.js → thread-bindings.state-BgYWFjNF.js} +2 -2
- package/dist/plugin-sdk/{tmp-fased-dir-C_xfeEN9.d.ts → tmp-fased-dir-BdFQvrvw.d.ts} +2 -2
- package/dist/plugin-sdk/{types-DV5TNhMK.d.ts → types-BYDL6dQj.d.ts} +2 -2
- package/dist/plugin-sdk/{types-BI2njxWJ.d.ts → types-CLIvQaVg.d.ts} +39 -5
- package/dist/plugin-sdk/{types-CBCtqtMn.d.ts → types-DyhXnYUr.d.ts} +1 -1
- package/dist/plugin-sdk/{types.plugin-CvUiB3Kh.d.ts → types.plugin-_fbu40Re.d.ts} +8 -5
- package/dist/plugin-sdk/{web-CJMfhGFY.js → web-D0yENDve.js} +52 -56
- package/dist/plugin-sdk/{whatsapp-actions-0ZbGo5ZV.js → whatsapp-actions-BT2nPLyo.js} +18 -19
- package/dist/plugin-sdk/{whatsapp-heartbeat-DGTsuvQ8.js → whatsapp-heartbeat-CiABSZ6G.js} +2 -2
- package/dist/plugin-sdk/whatsapp.d.ts +5 -5
- package/dist/plugin-sdk/whatsapp.js +14 -14
- package/dist/plugin-sdk/{wsl-D5jDUlms.js → wsl-B_ojyEtC.js} +53 -53
- package/dist/plugins/bundled-dir.js +3 -3
- package/dist/plugins/discovery.js +11 -11
- package/dist/plugins/loader.js +13 -13
- package/dist/plugins/manifest-registry.js +2 -2
- package/dist/plugins/manifest.js +4 -4
- package/dist/plugins/path-safety.js +3 -3
- package/dist/plugins/runtime/index.js +1 -1
- package/dist/plugins/status-cache.js +9 -9
- package/dist/plugins/update.js +3 -3
- package/dist/plugins/web-search-install-catalog.js +3 -3
- package/dist/providers/github-copilot-model-discovery.js +51 -0
- package/dist/providers/litellm-models.js +1 -1
- package/dist/providers/openai-codex-model-discovery.js +166 -0
- package/dist/providers/refresh.js +311 -67
- package/dist/providers/registry.js +16 -6
- package/dist/providers/runtime-model-catalog.js +250 -0
- package/dist/secrets/apply.js +16 -16
- package/dist/secrets/audit.js +11 -11
- package/dist/secrets/shared.js +9 -9
- package/dist/security/scan-paths.js +2 -2
- package/dist/shared/config-eval.js +2 -2
- package/dist/shared/model-thinking.js +54 -4
- package/dist/shared/pid-alive.js +2 -2
- package/dist/tasks/standing-orders.js +5 -5
- package/dist/tasks/task-flow-registry.js +5 -5
- package/dist/tasks/task-registry.js +5 -5
- package/dist/tasks/workflow-definitions.js +6 -6
- package/dist/telegram/bot-message-context.js +1 -1
- package/dist/telegram/token.js +5 -5
- package/dist/utils.js +5 -5
- package/dist/wallet/local-socket-signer-broker.js +16 -16
- package/dist/wallet/providers/embedded-keystore-adapter.js +5 -5
- package/dist/wallet/providers/local-socket-signer-adapter.js +2 -2
- package/dist/wallet/wallet-approval-auth.js +5 -5
- package/dist/wallet/wallet-audit-log.js +5 -5
- package/dist/wallet/wallet-custody.js +21 -21
- package/dist/wallet/wallet-inbound-events.js +5 -5
- package/dist/wallet/wallet-observability.js +5 -5
- package/dist/wallet/wallet-policy.js +9 -9
- package/dist/wallet/wallet-provider-registry.js +7 -7
- package/dist/wallet/wallet-runtime-config.js +3 -3
- package/dist/wallet/wallet-secrets-store.js +22 -22
- package/dist/wallet/wallet-send-approvals.js +5 -5
- package/dist/wallet/wallet-settlement-links.js +5 -5
- package/dist/web/accounts.js +3 -3
- package/dist/web/auth-store.js +18 -18
- package/dist/web/session.js +4 -4
- package/dist/wizard/host-security-capability.js +2 -2
- package/dist/wizard/onboarding.host-security.js +7 -7
- package/dist/wizard/onboarding.js +31 -13
- package/dist/wizard/onboarding.wallet.js +44 -44
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/fased-federation/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +12 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +2 -2
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +12 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +12 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/sat-mining/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +12 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +12 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +12 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +12 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +2 -1
- package/dist/control-ui/assets/chat-model-ref-B9sWop67.js +0 -2
- package/dist/plugin-sdk/ip-C70a-YlD.js +0 -181
- package/dist/plugin-sdk/tailscale-status-ClsquRGs.js +0 -104
- package/dist/plugin-sdk/wallet-status-CyovJojz.js +0 -11944
- package/dist/plugin-sdk/ws-CocpWGhl.js +0 -114
- /package/dist/plugin-sdk/{blocks-input-Dcitfh7h.js → blocks-input-Bg-8S2pl.js} +0 -0
- /package/dist/plugin-sdk/{channel-activity-Cg1xRoc2.js → channel-activity-DBDMQ3yI.js} +0 -0
- /package/dist/plugin-sdk/{channel-core-BOkyXXLa.js → channel-core-CFRs8LPy.js} +0 -0
- /package/dist/plugin-sdk/{client-D2N7hqVu.js → client-pI228AVT.js} +0 -0
- /package/dist/plugin-sdk/{command-poll-backoff-NAePk3eL.js → command-poll-backoff-yJU83wEq.js} +0 -0
- /package/dist/plugin-sdk/{date-time-CE3Uer3C.js → date-time-uUevHscU.js} +0 -0
- /package/dist/plugin-sdk/{diagnostic-session-state-HO94DMou.js → diagnostic-session-state-DqgfGYqZ.js} +0 -0
- /package/dist/plugin-sdk/{draft-stream-loop-CKyHn8IX.js → draft-stream-loop-CrOPfV3F.js} +0 -0
- /package/dist/plugin-sdk/{fetch-Cu-ahkie.js → fetch-BtmoPIlf.js} +0 -0
- /package/dist/plugin-sdk/{gateway-registry-DFsoY6C0.js → gateway-registry-DZDsqicG.js} +0 -0
- /package/dist/plugin-sdk/{inbound-context-BFnIdcqI.js → inbound-context-DrAcXE0y.js} +0 -0
- /package/dist/plugin-sdk/{internal-qo16nNU1.js → internal-CG_nHo-2.js} +0 -0
- /package/dist/plugin-sdk/{memory-search-C3C0bD2H.js → memory-search-VFll-AIb.js} +0 -0
- /package/dist/plugin-sdk/{pairing-token-N_6Jbt1L.js → pairing-token-Cs3BRKc0.js} +0 -0
- /package/dist/plugin-sdk/{path-alias-guards-Dg3gU-MA.js → path-alias-guards-BJZD5JMJ.js} +0 -0
- /package/dist/plugin-sdk/{polls-DQrR-qT3.js → polls-DKQXVfJp.js} +0 -0
- /package/dist/plugin-sdk/{proxy-7xs_rsnV.js → proxy-DWpYcsvR.js} +0 -0
- /package/dist/plugin-sdk/{qmd-scope-D1sSG_Rx.js → qmd-scope-CdX34VCV.js} +0 -0
- /package/dist/plugin-sdk/{redact-identifier-Q3tkvxhm.js → redact-identifier-Lt7t3l7S.js} +0 -0
- /package/dist/plugin-sdk/{redact-sensitive-url-dPvnFFsK.js → redact-sensitive-url-g-ukZjwA.js} +0 -0
- /package/dist/plugin-sdk/{render-Bwu_WxwA.js → render-e7fENCYH.js} +0 -0
- /package/dist/plugin-sdk/{reply-prefix-Bqzm6DC1.js → reply-prefix-ClpxvL_w.js} +0 -0
- /package/dist/plugin-sdk/{reply-reference-BkbK_DWT.js → reply-reference-Bqk-7HXE.js} +0 -0
- /package/dist/plugin-sdk/{secure-random-Bl-AVLVb.js → secure-random-BIkG-k4s.js} +0 -0
- /package/dist/plugin-sdk/{shared-clhhbWN3.js → shared-CBgp_GBw.js} +0 -0
- /package/dist/plugin-sdk/{target-errors-C_SVKoEv.js → target-errors-Ckufe179.js} +0 -0
- /package/dist/plugin-sdk/{targets-BDvvnlph.js → targets-CoMJ1ry1.js} +0 -0
- /package/dist/plugin-sdk/{tokens-BvtlOzVP.js → tokens-BbnqfVuu.js} +0 -0
- /package/dist/plugin-sdk/{tool-loop-detection-CWphm1k_.js → tool-loop-detection-Bp8bPJLs.js} +0 -0
- /package/dist/plugin-sdk/{ui-e020ouhJ.js → ui-Be8cLHIS.js} +0 -0
- /package/dist/plugin-sdk/{with-timeout-BYrRAYFV.js → with-timeout-ckWB8rTo.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fased/fased",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.56",
|
|
4
4
|
"description": "Fased Agent self-hosted AI gateway with channels, tools, plugins, and operator modules",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agent",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"!extensions/runtime-browser/",
|
|
63
63
|
"!extensions/runtime-local-memory/",
|
|
64
64
|
"!extensions/runtime-media/",
|
|
65
|
+
"!extensions/runtime-openai/",
|
|
65
66
|
"!extensions/runtime-speech/"
|
|
66
67
|
],
|
|
67
68
|
"type": "module",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=[`off`,`minimal`,`low`,`medium`,`high`],t=[...e,`xhigh`],n=[`openai/gpt-5.6`,`openai/gpt-5.6-terra`,`openai/gpt-5.6-luna`,`openai/gpt-5.5`,`openai/gpt-5.4`,`openai/gpt-5.4-mini`,`openai/gpt-5.4-nano`,`openai-codex/gpt-5.6-sol`,`openai-codex/gpt-5.6-terra`,`openai-codex/gpt-5.6-luna`,`openai-codex/gpt-5.5`,`openai-codex/gpt-5.4`,`openai-codex/gpt-5.4-mini`,`openai-codex/gpt-5.3-codex-spark`,`github-copilot/gpt-5.5`,`github-copilot/gpt-5.4`,`github-copilot/gpt-5.4-mini`,`github-copilot/gpt-5.3-codex-spark`],r=new Set(n.map(e=>e.toLowerCase())),i=new Set(n.map(e=>e.split(`/`)[1]?.toLowerCase()).filter(e=>!!e));function a(e){if(!e)return``;let t=e.trim().toLowerCase();return t===`z.ai`||t===`z-ai`?`zai`:t}function o(e){return a(e)===`zai`}function ee(e){if(!e)return;let t=e.trim().toLowerCase(),n=t.replace(/[\s_-]+/g,``);if(n===`xhigh`||n===`extrahigh`)return`xhigh`;if(t===`off`)return`off`;if([`on`,`enable`,`enabled`].includes(t))return`low`;if([`min`,`minimal`].includes(t))return`minimal`;if([`low`,`thinkhard`,`think-hard`,`think_hard`].includes(t))return`low`;if([`mid`,`med`,`medium`,`thinkharder`,`think-harder`,`harder`].includes(t))return`medium`;if([`high`,`ultra`,`ultrathink`,`think-hard`,`thinkhardest`,`highest`,`max`].includes(t))return`high`;if(t===`think`)return`minimal`}function te(e,t){let n=t?.trim().toLowerCase();if(!n)return!1;let a=e?.trim().toLowerCase();return a?r.has(`${a}/${n}`):i.has(n)}function ne(e){let t=new Set,n=[];for(let r of e??[]){let e=ee(r);!e||t.has(e)||(t.add(e),n.push(e))}return n}function re(n,r){return te(n,r)?[...t]:[...e]}function ie(e){let t=e?.trim().toLowerCase()??``;return t.includes(`fable-5`)||t.includes(`opus-4-8`)||t.includes(`opus-4.8`)||t.includes(`opus-4-6`)||t.includes(`opus-4.6`)||t.includes(`opus-4-7`)||t.includes(`opus-4.7`)||t.includes(`sonnet-5`)||t.includes(`sonnet-4-6`)||t.includes(`sonnet-4.6`)||t.includes(`sonnet-4-7`)||t.includes(`sonnet-4.7`)}function ae(e,t){let n=a(e);return n===`openai`||n===`openai-codex`||n===`github-copilot`||n===`copilot-proxy`?{thinkingMode:`openai-reasoning-effort`,reasoningBudgetSupported:!1}:n===`anthropic`?{thinkingMode:ie(t)?`anthropic-adaptive`:`anthropic-thinking-budget`,reasoningBudgetSupported:!ie(t)}:n===`google`||n===`google-gemini-cli`?{thinkingMode:`google-thinking-budget`,reasoningBudgetSupported:!0}:n===`zai`?{thinkingMode:`zai-binary`,reasoningBudgetSupported:!1}:n===`qwen`||n===`qwen-coding-plan`?{thinkingMode:`qwen-thinking`,reasoningBudgetSupported:!0}:n===`moonshot`||n===`kimi-coding`?{thinkingMode:`moonshot-thinking`,reasoningBudgetSupported:!1}:{thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1}}function oe(e,t){let n=a(e),r=t?.trim().toLowerCase()??``;return!n||!r?!1:n===`openai`||n===`openai-codex`||n===`github-copilot`||n===`copilot-proxy`?/^gpt-5(?:[.-]|$)/.test(r):n===`anthropic`?r.startsWith(`claude-`)||r.includes(`claude-`):n===`google`||n===`google-gemini-cli`?r.startsWith(`gemini-`):n===`zai`?r.startsWith(`glm-`):n===`qwen`||n===`qwen-coding-plan`?r.includes(`qwen`):n===`moonshot`||n===`kimi-coding`?r.includes(`kimi`):n===`minimax`||n===`minimax-cn`?r.includes(`minimax-m2`):[`openrouter`,`vercel-ai-gateway`,`opencode`,`huggingface`,`venice`,`together`,`synthetic`,`litellm`].includes(n)?/(gpt-5|claude-|gemini-|grok-|qwen|kimi|glm-|deepseek-r1|reasoning|thinking)/.test(r):!1}function s(e){let t=ne(e.capabilities?.thinkingLevels),n=t.length>0||typeof e.capabilities?.thinkingMode==`string`||typeof e.capabilities?.defaultThinkingLevel==`string`;if(e.capabilities?.fixedReasoning===!0&&!n||!(e.reasoning===!0||e.reasoning!==!1&&oe(e.provider,e.model))&&!n)return null;let r=ae(e.provider,e.model),i=r.thinkingMode===`zai-binary`?[`off`,`low`]:re(e.provider,e.model),a=t.length>0?t:i,o=ee(e.capabilities?.defaultThinkingLevel);return{thinkingLevels:a,defaultThinkingLevel:o&&a.includes(o)?o:a.includes(`low`)?`low`:a[0]??`off`,thinkingMode:e.capabilities?.thinkingMode??r.thinkingMode,reasoningBudgetSupported:e.capabilities?.reasoningBudgetSupported??r.reasoningBudgetSupported}}function se(e,t){return o(e)?[`off`,`low`]:re(e,t)}function ce(e,t){return se(e,t)}var le=`cloudflare-ai-gateway`,c=`cloudflare-ai-gateway`,ue=`claude-sonnet-5`;`${c}${ue}`;var de={input:0,output:0,cacheRead:0,cacheWrite:0},fe={tools:!0,json:!0},pe={thinkingLevels:[...e],defaultThinkingLevel:`low`,reasoningBudgetSupported:!0},me=[{id:ue,name:`Claude Sonnet 5`,reasoning:!0,input:[`text`,`image`],cost:de,contextWindow:1e6,maxTokens:128e3,capabilities:{...fe,...pe,thinkingMode:`anthropic-adaptive`}},{id:`claude-opus-4-8`,name:`Claude Opus 4.8`,reasoning:!0,input:[`text`,`image`],cost:de,contextWindow:1e6,maxTokens:128e3,capabilities:{...fe,...pe,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!1}},{id:`claude-haiku-4-5`,name:`Claude Haiku 4.5`,reasoning:!0,input:[`text`,`image`],cost:de,contextWindow:2e5,maxTokens:64e3,capabilities:{...fe,...pe,thinkingMode:`anthropic-thinking-budget`}}],he=me.map(e=>e.id).map(e=>`${c}/${e}`);function ge(e=c){return Object.fromEntries(me.map(t=>[`${e}/${t.id}`.toLowerCase(),t.capabilities?{...t.capabilities}:{}]))}var _e=`openai/gpt-oss-120b`;`${_e}`;var l={tools:!0,json:!0},ve=[{id:_e,name:`GPT-OSS 120B`,reasoning:!0,input:[`text`],contextWindow:131072,maxTokens:8192,cost:{input:.15,output:.75,cacheRead:0,cacheWrite:0},capabilities:l},{id:`deepseek-ai/DeepSeek-V4-Pro`,name:`DeepSeek V4 Pro`,reasoning:!0,input:[`text`],contextWindow:1048576,maxTokens:8192,cost:{input:1.69,output:3.38,cacheRead:0,cacheWrite:0},capabilities:l},{id:`deepseek-ai/DeepSeek-V4-Flash`,name:`DeepSeek V4 Flash`,reasoning:!1,input:[`text`],contextWindow:1048576,maxTokens:8192,cost:{input:.14,output:.28,cacheRead:0,cacheWrite:0},capabilities:l},{id:`moonshotai/Kimi-K2.6`,name:`Kimi K2.6`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.95,output:4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`MiniMaxAI/MiniMax-M2.7`,name:`MiniMax M2.7`,reasoning:!0,input:[`text`],contextWindow:204800,maxTokens:8192,cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},capabilities:l},{id:`zai-org/GLM-5.1`,name:`GLM-5.1`,reasoning:!0,input:[`text`],contextWindow:202752,maxTokens:8192,cost:{input:1.4,output:4.4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3.6-35B-A3B`,name:`Qwen3.6 35B A3B`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.15,output:.95,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3.5-397B-A17B`,name:`Qwen3.5 397B A17B`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.6,output:3.6,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3-Coder-Next`,name:`Qwen3 Coder Next`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.2,output:1.5,cacheRead:0,cacheWrite:0},capabilities:{tools:!0,json:!1}},{id:`Qwen/Qwen3-Coder-480B-A35B-Instruct`,name:`Qwen3 Coder 480B A35B Instruct`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.3,output:1.3,cacheRead:0,cacheWrite:0},capabilities:l},{id:`google/gemma-4-31B-it`,name:`Gemma 4 31B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.14,output:.4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`google/gemma-4-26B-A4B-it`,name:`Gemma 4 26B A4B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.13,output:.4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`openai/gpt-oss-20b`,name:`GPT-OSS 20B`,reasoning:!0,input:[`text`],contextWindow:131072,maxTokens:8192,cost:{input:.1,output:.5,cacheRead:0,cacheWrite:0},capabilities:l},{id:`deepseek-ai/DeepSeek-R1`,name:`DeepSeek R1`,reasoning:!0,input:[`text`],contextWindow:163840,maxTokens:8192,cost:{input:.7,output:2.5,cacheRead:0,cacheWrite:0},capabilities:l},{id:`deepseek-ai/DeepSeek-V3.2`,name:`DeepSeek V3.2`,reasoning:!1,input:[`text`],contextWindow:163840,maxTokens:8192,cost:{input:.269,output:.4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`meta-llama/Llama-3.3-70B-Instruct`,name:`Llama 3.3 70B Instruct`,reasoning:!1,input:[`text`],contextWindow:131072,maxTokens:8192,cost:{input:.59,output:.79,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3-VL-235B-A22B-Instruct`,name:`Qwen3 VL 235B A22B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:131072,maxTokens:8192,cost:{input:.3,output:1.5,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3-235B-A22B-Instruct-2507`,name:`Qwen3 235B A22B Instruct 2507`,reasoning:!0,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.09,output:.58,cacheRead:0,cacheWrite:0},capabilities:l},{id:`google/gemma-3n-E4B-it`,name:`Gemma 3N E4B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:32768,maxTokens:8192,cost:{input:.06,output:.12,cacheRead:0,cacheWrite:0},capabilities:{tools:!1,json:!0}},{id:`inclusionAI/Ling-2.6-1T`,name:`Ling 2.6 1T`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.3,output:2.5,cacheRead:0,cacheWrite:0},capabilities:l}],ye=ve.map(e=>e.id).map(e=>`huggingface/${e}`);function be(e){return{...e.capabilities?{...e.capabilities}:{},...e.reasoning?{fixedReasoning:!0}:{}}}function xe(e=`huggingface`){return Object.fromEntries(ve.map(t=>[`${e}/${t.id}`.toLowerCase(),be(t)]))}var Se=`default`;`${Se}`;var Ce=[{id:Se,name:`LiteLLM proxy default`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,cost:{input:0,output:0,cacheRead:0,cacheWrite:0},capabilities:{}}],we=Ce.map(e=>e.id).map(e=>`litellm/${e}`);function Te(e=`litellm`){return Object.fromEntries(Ce.map(t=>[`${e}/${t.id}`.toLowerCase(),t.capabilities?{...t.capabilities}:{}]))}var Ee=[`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.4-nano`,`gpt-5.3-codex-spark`,`claude-fable-5`,`claude-opus-4-8`,`claude-sonnet-5`,`claude-haiku-4-5`,`gemini-3.5-flash`,`gemini-3.1-pro`,`gemini-3-flash`,`minimax-m2.7`,`glm-5.2`,`kimi-k2.6`].map(e=>`opencode/${e}`);function De(e){let t=e.trim().toLowerCase();return t.startsWith(`claude-`)?{provider:`anthropic`,model:t}:t.startsWith(`gemini-`)?{provider:`google`,model:t}:t.startsWith(`glm-`)?{provider:`zai`,model:t}:t.startsWith(`kimi-`)?{provider:`moonshot`,model:t}:t.startsWith(`qwen`)?{provider:`qwen`,model:t}:t.startsWith(`gpt-`)?{provider:`openai`,model:t}:{provider:`opencode`,model:t}}function Oe(e){let t=De(e),n=s({provider:t.provider,model:t.model,reasoning:!0});return{tools:!0,json:!0,...n?{thinkingLevels:n.thinkingLevels,defaultThinkingLevel:n.defaultThinkingLevel,thinkingMode:n.thinkingMode,reasoningBudgetSupported:n.reasoningBudgetSupported}:{}}}function ke(e){return Object.fromEntries(e.map(e=>[e,Oe(e.replace(/^opencode\//,``))]))}var Ae=`hf:MiniMaxAI/MiniMax-M2.5`;`${Ae}`;var u={tools:!0,json:!0},je=[{id:`hf:zai-org/GLM-5.1`,name:`GLM-5.1`,reasoning:!0,input:[`text`],contextWindow:196608,maxTokens:65536,capabilities:u},{id:`hf:moonshotai/Kimi-K2.6`,name:`Kimi K2.6`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:65536,capabilities:u},{id:Ae,name:`MiniMax M2.5`,reasoning:!1,input:[`text`],contextWindow:191488,maxTokens:65536,capabilities:u},{id:`hf:zai-org/GLM-4.7-Flash`,name:`GLM-4.7 Flash`,reasoning:!1,input:[`text`],contextWindow:196608,maxTokens:65536,capabilities:u},{id:`hf:zai-org/GLM-5`,name:`GLM-5`,reasoning:!0,input:[`text`],contextWindow:196608,maxTokens:65536,capabilities:u},{id:`hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4`,name:`NVIDIA Nemotron 3 Super 120B`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:65536,capabilities:u},{id:`hf:zai-org/GLM-4.7`,name:`GLM-4.7`,reasoning:!1,input:[`text`],contextWindow:202752,maxTokens:65536,capabilities:u},{id:`hf:deepseek-ai/DeepSeek-V3.2`,name:`DeepSeek V3.2`,reasoning:!1,input:[`text`],contextWindow:159e3,maxTokens:8192,capabilities:u},{id:`hf:openai/gpt-oss-120b`,name:`GPT OSS 120B`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:u},{id:`hf:deepseek-ai/DeepSeek-R1-0528`,name:`DeepSeek R1 0528`,reasoning:!0,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:u},{id:`hf:deepseek-ai/DeepSeek-V3`,name:`DeepSeek V3`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:u},{id:`hf:meta-llama/Llama-3.3-70B-Instruct`,name:`Llama 3.3 70B Instruct`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:u},{id:`hf:moonshotai/Kimi-K2.5`,name:`Kimi K2.5`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,capabilities:u},{id:`hf:nvidia/Kimi-K2.5-NVFP4`,name:`Kimi K2.5 NVFP4`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,capabilities:u},{id:`hf:Qwen/Qwen3-235B-A22B-Thinking-2507`,name:`Qwen3 235B A22B Thinking 2507`,reasoning:!0,input:[`text`],contextWindow:262144,maxTokens:8192,capabilities:u},{id:`hf:Qwen/Qwen3-Coder-480B-A35B-Instruct`,name:`Qwen3 Coder 480B A35B Instruct`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,capabilities:u},{id:`hf:Qwen/Qwen3.5-397B-A17B`,name:`Qwen3.5 397B A17B`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,capabilities:u}],Me=je.map(e=>e.id);function Ne(e=`synthetic`){return Object.fromEntries(je.map(t=>[`${e}/${t.id}`,t.capabilities?{...t.capabilities}:{}]))}var Pe=`moonshotai/Kimi-K2.6`;`${Pe}`;var d={tools:!0,json:!0},f={tools:!1,json:!1},Fe=[{id:Pe,name:`Kimi K2.6`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:16384,cost:{input:1.2,output:4.5,cacheRead:.2,cacheWrite:1.2},capabilities:{...d,video:!0}},{id:`moonshotai/Kimi-K2.5`,name:`Kimi K2.5`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:32768,cost:{input:.5,output:2.8,cacheRead:.5,cacheWrite:2.8},capabilities:d},{id:`MiniMaxAI/MiniMax-M2.7`,name:`MiniMax M2.7`,reasoning:!0,input:[`text`],contextWindow:202752,maxTokens:32768,cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:.3},capabilities:d},{id:`zai-org/GLM-5.1`,name:`GLM-5.1`,reasoning:!0,input:[`text`],contextWindow:202752,maxTokens:128e3,cost:{input:1.4,output:4.4,cacheRead:1.4,cacheWrite:1.4},capabilities:d},{id:`zai-org/GLM-5`,name:`GLM-5`,reasoning:!0,input:[`text`],contextWindow:202752,maxTokens:128e3,cost:{input:1,output:3.2,cacheRead:1,cacheWrite:1},capabilities:d},{id:`Qwen/Qwen3.6-Plus`,name:`Qwen3.6 Plus`,reasoning:!0,input:[`text`],contextWindow:1e6,maxTokens:32768,cost:{input:.5,output:3,cacheRead:.5,cacheWrite:.5},capabilities:f},{id:`Qwen/Qwen3.5-397B-A17B`,name:`Qwen3.5 397B A17B`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:32768,cost:{input:.6,output:3.6,cacheRead:.6,cacheWrite:.6},capabilities:d},{id:`Qwen/Qwen3.5-9B`,name:`Qwen3.5 9B`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:32768,cost:{input:.1,output:.15,cacheRead:.1,cacheWrite:.1},capabilities:d},{id:`openai/gpt-oss-120b`,name:`GPT-OSS 120B`,reasoning:!0,input:[`text`],contextWindow:128e3,maxTokens:32768,cost:{input:.15,output:.6,cacheRead:.15,cacheWrite:.15},capabilities:d},{id:`openai/gpt-oss-20b`,name:`GPT-OSS 20B`,reasoning:!0,input:[`text`],contextWindow:128e3,maxTokens:32768,cost:{input:.05,output:.2,cacheRead:.05,cacheWrite:.05},capabilities:d},{id:`deepseek-ai/DeepSeek-V4-Pro`,name:`DeepSeek V4 Pro`,reasoning:!0,input:[`text`],contextWindow:512e3,maxTokens:32768,cost:{input:2.1,output:4.4,cacheRead:.2,cacheWrite:2.1},capabilities:d},{id:`deepseek-ai/DeepSeek-R1`,name:`DeepSeek R1 0528`,reasoning:!0,input:[`text`],contextWindow:163840,maxTokens:32768,cost:{input:3,output:7,cacheRead:3,cacheWrite:3},capabilities:f},{id:`deepseek-ai/DeepSeek-V3.1`,name:`DeepSeek V3.1`,reasoning:!1,input:[`text`],contextWindow:131072,maxTokens:32768,cost:{input:.6,output:1.7,cacheRead:.6,cacheWrite:.6},capabilities:f},{id:`Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8`,name:`Qwen3 Coder 480B A35B Instruct FP8`,reasoning:!1,input:[`text`],contextWindow:256e3,maxTokens:32768,cost:{input:2,output:2,cacheRead:2,cacheWrite:2},capabilities:d},{id:`Qwen/Qwen3-235B-A22B-Instruct-2507-tput`,name:`Qwen3 235B A22B Instruct 2507`,reasoning:!0,input:[`text`],contextWindow:262144,maxTokens:32768,cost:{input:.2,output:.6,cacheRead:.2,cacheWrite:.2},capabilities:d},{id:`Qwen/Qwen3-Coder-Next-FP8`,name:`Qwen3 Coder Next FP8`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:32768,cost:{input:.5,output:1.2,cacheRead:.5,cacheWrite:.5},capabilities:f},{id:`meta-llama/Llama-3.3-70B-Instruct-Turbo`,name:`Llama 3.3 70B Instruct Turbo`,reasoning:!1,input:[`text`],contextWindow:131072,maxTokens:8192,cost:{input:.88,output:.88,cacheRead:.88,cacheWrite:.88},capabilities:d},{id:`essentialai/rnj-1-instruct`,name:`Rnj-1 Instruct`,reasoning:!1,input:[`text`],contextWindow:32768,maxTokens:8192,cost:{input:.15,output:.15,cacheRead:.15,cacheWrite:.15},capabilities:d},{id:`google/gemma-4-31B-it`,name:`Gemma 4 31B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:32768,cost:{input:.2,output:.5,cacheRead:.2,cacheWrite:.2},capabilities:d},{id:`google/gemma-3n-E4B-it`,name:`Gemma 3N E4B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:32768,maxTokens:8192,cost:{input:.06,output:.12,cacheRead:.06,cacheWrite:.06},capabilities:{tools:!1,json:!0}}],Ie=Fe.map(e=>e.id).map(e=>`together/${e}`);function Le(e=`together`){return Object.fromEntries(Fe.map(t=>[`${e}/${t.id}`,t.capabilities?{...t.capabilities}:{}]))}var Re=`zai-org-glm-5-1`;`${Re}`;var p={thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1},m={tools:!0,json:!0},ze={tools:!0,json:!1},Be=[{id:Re,name:`GLM 5.1`,reasoning:!0,input:[`text`],cost:{input:1.75,output:5.5,cacheRead:.325,cacheWrite:0},contextWindow:2e5,maxTokens:24e3,capabilities:{...m,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`venice-uncensored-1-2`,name:`Venice Uncensored 1.2`,reasoning:!1,input:[`text`,`image`],cost:{input:.2,output:.9,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192,capabilities:m},{id:`qwen-3-6-plus`,name:`Qwen 3.6 Plus Uncensored`,reasoning:!0,input:[`text`,`image`],cost:{input:.625,output:3.75,cacheRead:.0625,cacheWrite:.78},contextWindow:1e6,maxTokens:65536,capabilities:{...m,video:!0,fixedReasoning:!0}},{id:`qwen3-5-397b-a17b`,name:`Qwen 3.5 397B`,reasoning:!0,input:[`text`,`image`],cost:{input:.75,output:4.5,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:32768,capabilities:{...m,video:!0,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`qwen3-235b-a22b-thinking-2507`,name:`Qwen 3 235B A22B Thinking`,reasoning:!0,input:[`text`],cost:{input:.45,output:3.5,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,capabilities:{...m,thinkingLevels:[`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`qwen3-coder-480b-a35b-instruct-turbo`,name:`Qwen 3 Coder 480B Turbo`,reasoning:!1,input:[`text`],cost:{input:.35,output:1.5,cacheRead:.04,cacheWrite:0},contextWindow:256e3,maxTokens:65536,capabilities:m},{id:`qwen3-vl-235b-a22b`,name:`Qwen3 VL 235B`,reasoning:!1,input:[`text`,`image`],cost:{input:.25,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:16384,capabilities:m},{id:`deepseek-v4-pro`,name:`DeepSeek V4 Pro`,reasoning:!0,input:[`text`],cost:{input:1.73,output:3.796,cacheRead:.33,cacheWrite:0},contextWindow:1e6,maxTokens:32768,capabilities:{...m,fixedReasoning:!0}},{id:`deepseek-v4-flash`,name:`DeepSeek V4 Flash`,reasoning:!0,input:[`text`],cost:{input:.17,output:.35,cacheRead:.028,cacheWrite:0},contextWindow:1e6,maxTokens:32768,capabilities:{...m,fixedReasoning:!0}},{id:`kimi-k2-6`,name:`Kimi K2.6`,reasoning:!0,input:[`text`,`image`],cost:{input:.85,output:4.655,cacheRead:.22,cacheWrite:0},contextWindow:256e3,maxTokens:65536,capabilities:{...m,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`high`,...p}},{id:`claude-opus-4-7`,name:`Claude Opus 4.7`,reasoning:!0,input:[`text`,`image`],cost:{input:6,output:30,cacheRead:.6,cacheWrite:7.5},contextWindow:1e6,maxTokens:128e3,capabilities:{...m,fixedReasoning:!0}},{id:`claude-sonnet-4-6`,name:`Claude Sonnet 4.6`,reasoning:!0,input:[`text`,`image`],cost:{input:3.6,output:18,cacheRead:.36,cacheWrite:4.5},contextWindow:1e6,maxTokens:64e3,capabilities:{...m,fixedReasoning:!0}},{id:`openai-gpt-55`,name:`GPT-5.5`,reasoning:!0,input:[`text`,`image`],cost:{input:6.25,output:37.5,cacheRead:.625,cacheWrite:0},contextWindow:1e6,maxTokens:131072,capabilities:{...m,thinkingLevels:[`off`,`minimal`,`low`,`medium`,`high`],defaultThinkingLevel:`high`,...p}},{id:`openai-gpt-55-pro`,name:`GPT-5.5 Pro`,reasoning:!0,input:[`text`,`image`],cost:{input:37.5,output:225,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:128e3,capabilities:{...m,thinkingLevels:[`off`,`minimal`,`low`,`medium`,`high`],defaultThinkingLevel:`medium`,...p}},{id:`openai-gpt-54`,name:`GPT-5.4`,reasoning:!0,input:[`text`,`image`],cost:{input:3.13,output:18.8,cacheRead:.313,cacheWrite:0},contextWindow:1e6,maxTokens:131072,capabilities:{...m,thinkingLevels:[`off`,`minimal`,`low`,`medium`,`high`],defaultThinkingLevel:`high`,...p}},{id:`openai-gpt-54-mini`,name:`GPT-5.4 Mini`,reasoning:!0,input:[`text`,`image`],cost:{input:.9375,output:5.625,cacheRead:.09375,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,capabilities:{...m,thinkingLevels:[`off`,`minimal`,`low`,`medium`,`high`],defaultThinkingLevel:`high`,...p}},{id:`gemini-3-1-pro-preview`,name:`Gemini 3.1 Pro Preview`,reasoning:!0,input:[`text`,`image`],cost:{input:2.5,output:15,cacheRead:.5,cacheWrite:.5},contextWindow:1e6,maxTokens:32768,capabilities:{...m,audio:!0,video:!0,thinkingLevels:[`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`grok-4-20`,name:`Grok 4.20`,reasoning:!0,input:[`text`,`image`],cost:{input:1.42,output:2.83,cacheRead:.23,cacheWrite:0},contextWindow:2e6,maxTokens:128e3,capabilities:{...m,fixedReasoning:!0}},{id:`minimax-m27`,name:`MiniMax M2.7`,reasoning:!0,input:[`text`],cost:{input:.375,output:1.5,cacheRead:.075,cacheWrite:0},contextWindow:198e3,maxTokens:32768,capabilities:{...ze,thinkingLevels:[`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`openai-gpt-oss-120b`,name:`OpenAI GPT OSS 120B`,reasoning:!0,input:[`text`],cost:{input:.07,output:.3,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,capabilities:{...ze,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`google-gemma-4-31b-it`,name:`Google Gemma 4 31B Instruct`,reasoning:!0,input:[`text`,`image`],cost:{input:.175,output:.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:8192,capabilities:{...m,video:!0,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`mistral-small-2603`,name:`Mistral Small 4`,reasoning:!0,input:[`text`,`image`],cost:{input:.1875,output:.75,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:65536,capabilities:{...m,thinkingLevels:[`off`,`high`],defaultThinkingLevel:`high`,...p}}],Ve=Be.map(e=>e.id).map(e=>`venice/${e}`);function He(e=`venice`){return Object.fromEntries(Be.map(t=>[`${e}/${t.id}`.toLowerCase(),t.capabilities?{...t.capabilities}:{}]))}var Ue=[{id:`openai/gpt-5.5`,contextWindow:1e6,maxTokens:128e3,tags:[`reasoning`,`tool-use`,`web-search`,`implicit-caching`,`file-input`,`vision`]},{id:`openai/gpt-5.4`,contextWindow:1e6,maxTokens:128e3,tags:[`reasoning`,`tool-use`,`vision`,`file-input`,`implicit-caching`,`web-search`]},{id:`openai/gpt-5.4-mini`,contextWindow:4e5,maxTokens:128e3,tags:[`reasoning`,`tool-use`,`vision`,`file-input`,`implicit-caching`,`web-search`]},{id:`openai/gpt-5.4-nano`,contextWindow:4e5,maxTokens:128e3,tags:[`reasoning`,`tool-use`,`implicit-caching`,`web-search`,`vision`,`file-input`]},{id:`anthropic/claude-fable-5`,contextWindow:1e6,maxTokens:128e3,tags:[`tool-use`,`reasoning`,`vision`,`file-input`,`explicit-caching`,`web-search`]},{id:`anthropic/claude-opus-4.8`,contextWindow:1e6,maxTokens:128e3,tags:[`tool-use`,`reasoning`,`vision`,`file-input`,`explicit-caching`,`web-search`]},{id:`anthropic/claude-sonnet-5`,contextWindow:1e6,maxTokens:128e3,tags:[`file-input`,`reasoning`,`tool-use`,`vision`,`explicit-caching`,`web-search`]},{id:`anthropic/claude-haiku-4.5`,contextWindow:2e5,maxTokens:64e3,tags:[`file-input`,`reasoning`,`tool-use`,`vision`,`explicit-caching`]},{id:`google/gemini-3.5-flash`,contextWindow:1e6,maxTokens:65e3,tags:[`reasoning`,`tool-use`,`file-input`,`vision`,`web-search`,`implicit-caching`]},{id:`google/gemini-3.1-pro-preview`,contextWindow:1e6,maxTokens:64e3,tags:[`file-input`,`tool-use`,`reasoning`,`vision`,`web-search`,`implicit-caching`]},{id:`google/gemini-3.1-flash-lite`,contextWindow:1e6,maxTokens:65e3,tags:[`reasoning`,`tool-use`,`implicit-caching`,`file-input`,`vision`,`web-search`]},{id:`xai/grok-4.3`,contextWindow:1e6,maxTokens:1e6,tags:[`reasoning`,`tool-use`,`implicit-caching`,`file-input`,`vision`,`web-search`]},{id:`xai/grok-build-0.1`,contextWindow:256e3,maxTokens:256e3,tags:[`tool-use`,`implicit-caching`]},{id:`mistral/mistral-medium-3.5`,contextWindow:256e3,maxTokens:256e3,tags:[`reasoning`,`tool-use`,`vision`]},{id:`minimax/minimax-m2.7`,contextWindow:204800,maxTokens:131e3,tags:[`reasoning`,`tool-use`,`implicit-caching`,`file-input`,`vision`]},{id:`minimax/minimax-m2.7-highspeed`,contextWindow:204800,maxTokens:131100,tags:[`reasoning`,`tool-use`,`implicit-caching`,`vision`]},{id:`moonshotai/kimi-k2.6`,contextWindow:262e3,maxTokens:262e3,tags:[`reasoning`,`tool-use`,`vision`,`file-input`,`implicit-caching`]}],We=Ue.map(e=>e.id).map(e=>`vercel-ai-gateway/${e}`);function Ge(e){let t=e.trim().replace(/^vercel-ai-gateway\//,``).toLowerCase();return Ue.find(e=>e.id.toLowerCase()===t)}function Ke(e){let[t,...n]=e.trim().replace(/^vercel-ai-gateway\//,``).split(`/`),r=n.join(`/`);switch(t){case`anthropic`:return{provider:`anthropic`,model:r};case`google`:return{provider:`google`,model:r};case`minimax`:return{provider:`minimax`,model:r};case`moonshotai`:return{provider:`moonshot`,model:r};case`openai`:return{provider:`openai`,model:r};case`xai`:return{provider:`xai`,model:r};default:return{provider:`vercel-ai-gateway`,model:e}}}function qe(e){let t=Ge(e);if(!t)return;let n=new Set(t.tags.map(e=>e.toLowerCase())),r=Ke(t.id),i=n.has(`reasoning`)?s({provider:r.provider,model:r.model,reasoning:!0}):null;return{tools:n.has(`tool-use`),...i?{thinkingLevels:i.thinkingLevels,defaultThinkingLevel:i.defaultThinkingLevel,thinkingMode:i.thinkingMode,reasoningBudgetSupported:i.reasoningBudgetSupported}:{}}}function Je(e){return Object.fromEntries(e.flatMap(e=>{let t=qe(e);return t?[[e,t]]:[]}))}var h={tools:!0,json:!0,thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1},Ye={...h,audio:!0,video:!0},Xe=[{id:`mimo-v2.5-pro`,name:`Xiaomi MiMo V2.5 Pro`,reasoning:!0,input:[`text`,`image`],cost:{input:1,output:3,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:131072,capabilities:h},{id:`mimo-v2.5`,name:`Xiaomi MiMo V2.5`,reasoning:!0,input:[`text`,`image`],cost:{input:.4,output:2,cacheRead:.08,cacheWrite:0},contextWindow:1048576,maxTokens:131072,capabilities:Ye},{id:`mimo-v2-pro`,name:`Xiaomi MiMo V2 Pro`,reasoning:!0,input:[`text`],cost:{input:1,output:3,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:131072,capabilities:h},{id:`mimo-v2-omni`,name:`Xiaomi MiMo V2 Omni`,reasoning:!0,input:[`text`,`image`],cost:{input:.4,output:2,cacheRead:.08,cacheWrite:0},contextWindow:262144,maxTokens:128e3,capabilities:Ye},{id:`mimo-v2-flash`,name:`Xiaomi MiMo V2 Flash`,reasoning:!0,input:[`text`],cost:{input:.11,output:.32,cacheRead:.01,cacheWrite:0},contextWindow:262144,maxTokens:64e3,capabilities:h}],Ze=Xe.map(e=>e.id);function Qe(e=`xiaomi`){return Object.fromEntries(Xe.map(t=>[`${e}/${t.id}`,t.capabilities?{...t.capabilities}:{}]))}new Map(`openai.anthropic.chutes.ollama.lmstudio.vllm.minimax.moonshot.google.xai.mistral.volcengine.byteplus.openrouter.qwen.zai.qianfan.copilot.ai-gateway.opencode-zen.xiaomi.synthetic.together.huggingface.venice.litellm.cloudflare-ai-gateway.custom`.split(`.`).map((e,t)=>[e,t]));var $e=`openai`,et=`openai`,g=`openai-codex`,tt=`anthropic`,_=`anthropic`,nt=`chutes`,v=`chutes`,rt=`ollama`,y=`ollama`,it=`lmstudio`,b=`lmstudio`,at=`vllm`,x=`vllm`,ot=`minimax`,S=`minimax`,C=`minimax-cn`,w=`minimax-portal`,st=`moonshot`,T=`moonshot`,E=`kimi-coding`,ct=`google`,D=`google`,O=`google-gemini-cli`,lt=`mistral`,k=`mistral`,ut=`volcengine`,A=`volcengine`,j=`volcengine-coding`,M=`volcengine-plan`,dt=`byteplus`,N=`byteplus`,P=`byteplus-coding`,F=`byteplus-plan`,ft=`openrouter`,I=`openrouter`,pt=`qwen`,L=`qwen`,R=`qwen-coding-plan`,mt=`qianfan`,z=`qianfan`,ht=`copilot`,B=`github-copilot`,V=`copilot-proxy`,gt=`ai-gateway`,H=`vercel-ai-gateway`,_t=`opencode-zen`,U=`opencode`,vt=`xiaomi`,W=`xiaomi`,yt=`synthetic`,G=`synthetic`,bt=`together`,K=`together`,xt=`huggingface`,q=`huggingface`,St=`venice`,J=`venice`,Ct=`litellm`,Y=`litellm`,wt=`custom`,X=`custom`,Tt=[`gpt-5.6`,`gpt-5.6-terra`,`gpt-5.6-luna`,`gpt-5.5`],Et=[`gpt-5.6-sol`,`gpt-5.6-terra`,`gpt-5.6-luna`,`gpt-5.5`],Dt=[`gpt-5.3-codex`,`gpt-5.3-codex-spark`,`gpt-5.4`,`gpt-5.4-mini`],Ot=Tt.map(e=>`${et}/${e}`),kt=Et.map(e=>`${g}/${e}`),At=[`claude-fable-5`,`claude-opus-4-8`,`claude-sonnet-5`,`claude-haiku-4-5`].map(e=>`${_}/${e}`),jt=[`google/gemma-4-31B-turbo-TEE`,`Qwen/Qwen3-32B-TEE`,`deepseek-ai/DeepSeek-V3.2-TEE`,`zai-org/GLM-5.1-TEE`,`moonshotai/Kimi-K2.6-TEE`,`Qwen/Qwen3.6-27B-TEE`,`Qwen/Qwen3.5-397B-A17B-TEE`,`zai-org/GLM-5-TEE`,`Qwen/Qwen3-235B-A22B-Thinking-2507-TEE`,`zai-org/GLM-5.2-TEE`],Mt=jt.map(e=>`${v}/${e}`),Nt=[],Pt=[],Ft=[],It=[`MiniMax-M2.7`,`MiniMax-M2.7-highspeed`,`MiniMax-M2.5`,`MiniMax-M2.5-highspeed`],Lt=It.map(e=>`${S}/${e}`),Rt=It.map(e=>`${C}/${e}`),zt=[`MiniMax-M2.7`,`MiniMax-M2.7-highspeed`].map(e=>`${w}/${e}`),Bt=[`kimi-k2.6`,`kimi-k2.5`].map(e=>`${T}/${e}`),Vt=[`kimi-for-coding`].map(e=>`${E}/${e}`),Ht=[`gemini-3.5-flash`,`gemini-3.1-pro-preview`,`gemini-3-flash-preview`,`gemini-3.1-flash-lite`],Ut=Ht.map(e=>`${D}/${e}`),Wt=Ht.map(e=>`${O}/${e}`),Gt=[`grok-4.5`,`grok-4.3`,`grok-build-0.1`].map(e=>`xai/${e}`),Kt=[`mistral-medium-3.5`,`mistral-small-2603`,`mistral-large-2512`,`devstral-2512`,`ministral-14b-2512`,`ministral-8b-2512`,`ministral-3b-2512`].map(e=>`${k}/${e}`),qt=[`doubao-seed-2-0-pro-260215`,`doubao-seed-2-0-lite-260215`,`doubao-seed-2-0-mini-260215`,`doubao-seed-2-0-code-preview-260215`,`deepseek-v3-2-251201`,`glm-4-7-251222`].map(e=>`${A}/${e}`),Jt=[`ark-code-latest`,`doubao-seed-2.0-code`,`doubao-seed-2.0-pro`,`doubao-seed-2.0-lite`,`doubao-seed-code`,`minimax-m2.5`,`glm-4.7`,`deepseek-v3.2`,`kimi-k2.5`].flatMap(e=>[`${j}/${e}`,`${M}/${e}`]),Yt=[`seed-2-0-pro-260328`,`seed-2-0-lite-260228`,`seed-2-0-mini-260215`,`seed-2-0-code-preview-260328`,`deepseek-v3-2-251201`,`glm-4-7-251222`].map(e=>`${N}/${e}`),Xt=[`ark-code-latest`,`dola-seed-2.0-pro`,`dola-seed-2.0-lite`,`dola-seed-2.0-code`,`bytedance-seed-code`,`glm-5.1`,`glm-4.7`,`kimi-k2.5`,`gpt-oss-120b`].flatMap(e=>[`${P}/${e}`,`${F}/${e}`]),Zt=`openai/gpt-5.6-sol,openai/gpt-5.6-terra,openai/gpt-5.6-luna,openai/gpt-5.5,openai/gpt-5.4,openai/gpt-5.4-mini,openai/gpt-5.4-nano,anthropic/claude-fable-5,anthropic/claude-opus-4.8,anthropic/claude-sonnet-5,anthropic/claude-haiku-4.5,google/gemini-3.5-flash,google/gemini-3.1-pro-preview,google/gemini-3-flash-preview,google/gemini-3.1-flash-lite,x-ai/grok-4.5,x-ai/grok-4.3,x-ai/grok-build-0.1,mistralai/mistral-medium-3-5,mistralai/mistral-small-2603,mistralai/mistral-large-2512,mistralai/devstral-2512,qwen/qwen3.7-max,qwen/qwen3.7-plus,qwen/qwen3.6-flash,z-ai/glm-5.2,deepseek/deepseek-v4-pro,deepseek/deepseek-v4-flash,minimax/minimax-m2.7,moonshotai/kimi-k2.6`.split(`,`).map(e=>`${I}/${e}`),Qt=[`qwen3.7-max`,`qwen3.7-plus`,`qwen3.6-flash`].map(e=>`${L}/${e}`),$t=[`qwen3.7-max`,`qwen3.7-plus`,`qwen3.6-flash`,`deepseek-v4-pro`,`deepseek-v4-flash`,`kimi-k2.7-code`,`glm-5.2`,`MiniMax-M2.5`].map(e=>`${R}/${e}`),en=[`glm-5.2`,`glm-5.1`,`glm-5`,`glm-5-turbo`,`glm-5v-turbo`,`glm-4.7`,`glm-4.7-flashx`,`glm-4.7-flash`].map(e=>`zai/${e}`),tn={tools:!0,json:!0,thinkingLevels:[`off`,`low`],defaultThinkingLevel:`low`,thinkingMode:`zai-binary`,reasoningBudgetSupported:!1},nn=Object.fromEntries(en.map(e=>[e,e.endsWith(`/glm-5v-turbo`)?{...tn,video:!0}:tn])),rn=[`ernie-5.1`,`ernie-5.0`,`ernie-5.0-thinking-latest`,`ernie-5.0-thinking-preview`,`ernie-x1.1-preview`,`ernie-x1.1`,`ernie-x1-turbo-32k`,`deepseek-v4-pro`,`deepseek-v4-flash`,`deepseek-v3.2-think`,`deepseek-v3.2`].map(e=>`${z}/${e}`),an=new Set([`qianfan/ernie-5.1`,`qianfan/ernie-5.0`,`qianfan/ernie-5.0-thinking-latest`,`qianfan/ernie-5.0-thinking-preview`,`qianfan/ernie-x1.1-preview`,`qianfan/ernie-x1.1`,`qianfan/ernie-x1-turbo-32k`]),on=new Set([`qianfan/deepseek-v4-pro`,`qianfan/deepseek-v4-flash`,`qianfan/deepseek-v3.2-think`,`qianfan/deepseek-v3.2`]),sn=Object.fromEntries(rn.map(t=>[t,{tools:!0,json:!0,...an.has(t)?{fixedReasoning:!0}:on.has(t)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!0}:{}}])),cn=[`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.3-codex-spark`,`gpt-4.1`,`claude-fable-5`,`claude-opus-4.8`,`claude-sonnet-5`,`claude-haiku-4.5`,`gemini-3.5-flash`,`gemini-3.1-pro`,`gemini-3-flash`,`grok-build-0.1`],ln=cn.map(e=>`${B}/${e}`),un=[...cn].map(e=>`${V}/${e}`);`${B}`;var dn=new Set([`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.3-codex-spark`]),fn=new Set([`claude-fable-5`,`claude-opus-4.8`,`claude-sonnet-5`]),pn=new Set([`claude-haiku-4.5`]),mn=new Set([`gemini-3.5-flash`,`gemini-3.1-pro`,`gemini-3-flash`]);function hn(t){return Object.fromEntries(t.map(t=>{let n=t.slice(t.indexOf(`/`)+1);return[t,{tools:!0,json:!0,...dn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`openai-reasoning-effort`,reasoningBudgetSupported:!1}:fn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!0}:pn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!0}:mn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`google-thinking-budget`,reasoningBudgetSupported:!0}:{}}]}))}var gn={...hn(ln),...hn(un)},_n=Je(We),vn=ke(Ee),yn=Ze.map(e=>`${W}/${e}`);`${W}`;var bn=Qe(W),xn=Me.map(e=>`${G}/${e}`);`${G}`;var Sn=Ne(G),Cn=Le(K),wn=xe(q),Tn=He(J),En=Te(Y),Dn=ge(c),On=[];function kn(e){let t=e.indexOf(`/`);return t<=0||t===e.length-1?null:{route:e.slice(0,t).trim(),model:e.slice(t+1).trim()}}function An(e,t){let n=t.trim().toLowerCase(),r=(e,r)=>n.startsWith(`${e}/`)?{provider:r,model:t.slice(e.length+1)}:null;return r(`openai`,`openai`)??r(`anthropic`,`anthropic`)??r(`google`,`google`)??r(`x-ai`,`xai`)??r(`xai`,`xai`)??r(`mistralai`,`mistral`)??r(`minimax`,`minimax`)??r(`qwen`,`qwen`)??r(`moonshotai`,`moonshot`)??r(`z-ai`,`zai`)??r(`zai-org`,`zai`)??r(`glm`,`zai`)??{provider:n.includes(`claude-`)||n.includes(`claude_`)?`anthropic`:n.includes(`gemini-`)?`google`:n.includes(`qwen`)?`qwen`:n.includes(`kimi`)?`moonshot`:n.includes(`glm-`)?`zai`:e,model:t}}function jn(e){let t=An(e.route,e.model),n=s({provider:t.provider,model:t.model,reasoning:e.reasoning});if(n)return{thinkingLevels:n.thinkingLevels,defaultThinkingLevel:n.defaultThinkingLevel,thinkingMode:n.thinkingMode,reasoningBudgetSupported:n.reasoningBudgetSupported}}function Mn(e){let t=kn(e);if(t)return jn({route:t.route,model:t.model})}function Z(e){return Object.fromEntries(e.map(e=>[e.toLowerCase(),Mn(e)??{}]))}function Q(e,t){let n=Z(e);for(let[e,r]of Object.entries(t))n[e.toLowerCase()]={...n[e.toLowerCase()],...r};return n}var Nn=[...e],Pn={"anthropic/claude-fable-5":{thinkingLevels:Nn,defaultThinkingLevel:`low`,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!1},"anthropic/claude-opus-4-8":{thinkingLevels:Nn,defaultThinkingLevel:`low`,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!1},"anthropic/claude-sonnet-5":{thinkingLevels:Nn,defaultThinkingLevel:`low`,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!1},"anthropic/claude-haiku-4-5":{thinkingLevels:Nn,defaultThinkingLevel:`low`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!0}},Fn=Object.fromEntries(jt.map(e=>[`${v}/${e}`,{tools:!0,json:!0,...jn({route:v,model:e,reasoning:!0}),...e===`moonshotai/Kimi-K2.6-TEE`?{video:!0}:{}}])),In=[...e],Ln=Object.fromEntries([...Lt,...Rt,...zt].map(e=>[e,{tools:!0,thinkingLevels:In,defaultThinkingLevel:`off`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!1}])),Rn=Object.fromEntries([...Bt,...Vt].map(t=>[t,{tools:!0,...t===`moonshot/kimi-k2.6`?{video:!0}:{},thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`moonshot-thinking`,reasoningBudgetSupported:!1}])),zn=Object.fromEntries([...Ut,...Wt].map(t=>[t,{tools:!0,json:!0,audio:!0,video:!0,thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`google-thinking-budget`,reasoningBudgetSupported:!0}])),Bn={"xai/grok-4.5":{tools:!0,json:!0,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,thinkingMode:`xai-reasoning-effort`,reasoningBudgetSupported:!1},"xai/grok-4.3":{tools:!0,json:!0,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,thinkingMode:`xai-reasoning-effort`,reasoningBudgetSupported:!1},"xai/grok-build-0.1":{tools:!0,json:!0}},Vn=[`off`,`high`],Hn=Object.fromEntries(Kt.map(e=>[e,{tools:!0,json:!0,...e===`mistral/mistral-medium-3.5`||e===`mistral/mistral-small-2603`?{thinkingLevels:[...Vn],defaultThinkingLevel:`high`,thinkingMode:`mistral-reasoning-effort`,reasoningBudgetSupported:!1}:{}}])),Un=[`minimal`,`low`,`medium`,`high`],Wn=new Set([`volcengine/doubao-seed-2-0-pro-260215`,`volcengine/doubao-seed-2-0-lite-260215`,`volcengine/doubao-seed-2-0-mini-260215`,`volcengine/doubao-seed-2-0-code-preview-260215`,`volcengine-coding/doubao-seed-2.0-code`,`volcengine-plan/doubao-seed-2.0-code`,`volcengine-coding/doubao-seed-2.0-pro`,`volcengine-plan/doubao-seed-2.0-pro`,`volcengine-coding/doubao-seed-2.0-lite`,`volcengine-plan/doubao-seed-2.0-lite`,`volcengine-coding/doubao-seed-code`,`volcengine-plan/doubao-seed-code`]),Gn=new Set([`volcengine/doubao-seed-2-0-pro-260215`,`volcengine/doubao-seed-2-0-lite-260215`,`volcengine/doubao-seed-2-0-mini-260215`,`volcengine/doubao-seed-2-0-code-preview-260215`,`volcengine-coding/doubao-seed-2.0-code`,`volcengine-plan/doubao-seed-2.0-code`,`volcengine-coding/doubao-seed-2.0-pro`,`volcengine-plan/doubao-seed-2.0-pro`,`volcengine-coding/doubao-seed-2.0-lite`,`volcengine-plan/doubao-seed-2.0-lite`,`volcengine-coding/doubao-seed-code`,`volcengine-plan/doubao-seed-code`]),Kn=Object.fromEntries([...qt,...Jt].map(e=>[e,{tools:!0,json:!0,...Wn.has(e)?{thinkingLevels:[...Un],defaultThinkingLevel:`medium`,thinkingMode:`volcengine-reasoning-effort`,reasoningBudgetSupported:!1}:{},...Gn.has(e)?{video:!0}:{}}])),qn=[`off`,`high`],Jn=new Set([`byteplus/seed-2-0-pro-260328`,`byteplus/seed-2-0-lite-260228`,`byteplus/seed-2-0-mini-260215`,`byteplus/seed-2-0-code-preview-260328`,`byteplus-coding/dola-seed-2.0-pro`,`byteplus-plan/dola-seed-2.0-pro`,`byteplus-coding/dola-seed-2.0-lite`,`byteplus-plan/dola-seed-2.0-lite`,`byteplus-coding/dola-seed-2.0-code`,`byteplus-plan/dola-seed-2.0-code`,`byteplus-coding/bytedance-seed-code`,`byteplus-plan/bytedance-seed-code`]),Yn=Object.fromEntries([...Yt,...Xt].map(e=>[e,{tools:!0,json:!0,...Jn.has(e)?{thinkingLevels:[...qn],defaultThinkingLevel:`high`,thinkingMode:`byteplus-thinking-type`,reasoningBudgetSupported:!1}:{}}])),Xn=new Set([`openrouter/google/gemini-3.5-flash`,`openrouter/google/gemini-3.1-pro-preview`,`openrouter/google/gemini-3-flash-preview`,`openrouter/google/gemini-3.1-flash-lite`]),Zn=new Set([`openrouter/google/gemini-3.5-flash`,`openrouter/google/gemini-3.1-pro-preview`,`openrouter/google/gemini-3-flash-preview`,`openrouter/google/gemini-3.1-flash-lite`,`openrouter/qwen/qwen3.7-max`,`openrouter/qwen/qwen3.7-plus`,`openrouter/qwen/qwen3.6-flash`]),Qn=new Set([`openrouter/mistralai/mistral-medium-3-5`,`openrouter/mistralai/mistral-small-2603`]),$n=new Set([`openrouter/minimax/minimax-m2.7`]),er=new Set([`openrouter/deepseek/deepseek-v4-pro`,`openrouter/deepseek/deepseek-v4-flash`]),tr=new Set([`openrouter/openai/gpt-5.6-sol`,`openrouter/openai/gpt-5.6-terra`,`openrouter/openai/gpt-5.6-luna`,`openrouter/openai/gpt-5.5`,`openrouter/openai/gpt-5.4`,`openrouter/openai/gpt-5.4-mini`,`openrouter/openai/gpt-5.4-nano`]),nr=new Set([`openrouter/x-ai/grok-4.5`,`openrouter/x-ai/grok-4.3`]),rr=Object.fromEntries(Zt.map(n=>[n,{tools:!0,json:!0,...Xn.has(n)?{audio:!0}:{},...Zn.has(n)?{video:!0}:{},...Qn.has(n)?{thinkingLevels:[...Vn],defaultThinkingLevel:`high`,thinkingMode:`mistral-reasoning-effort`,reasoningBudgetSupported:!1}:{},...$n.has(n)?{thinkingLevels:[...In],defaultThinkingLevel:`off`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!1}:{},...er.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1}:{},...tr.has(n)?{thinkingLevels:[...t],defaultThinkingLevel:`low`,thinkingMode:`openai-reasoning-effort`,reasoningBudgetSupported:!1}:{},...nr.has(n)?{thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,thinkingMode:`xai-reasoning-effort`,reasoningBudgetSupported:!1}:{}}])),ir=new Set([`qwen-coding-plan/kimi-k2.7-code`,`qwen-coding-plan/glm-5.2`,`qwen-coding-plan/MiniMax-M2.5`]),ar=Object.fromEntries([...Qt,...$t].map(t=>[t,{tools:!0,json:!0,...ir.has(t)?{}:{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`qwen-thinking`,reasoningBudgetSupported:!0}}])),or={id:$e,label:`OpenAI`,priority:1,hint:`OpenAI sign-in + API key`,methods:[{id:`openai-codex`,route:g,kind:`oauth`,label:`Sign in`,hint:`Open the OpenAI sign-in URL, finish login in the browser, then Fased completes the OAuth flow.`},{id:`openai-api-key`,route:et,kind:`api-key`,label:`API key`}],models:{recommended:[...Ot,...kt],routeRules:{[et]:[`${et}/*`],[g]:[`${g}/*`]}},modelCapabilities:Z([...Ot,...kt])},sr={id:tt,label:`Anthropic`,priority:2,hint:`Claude Code OAuth + setup-token + API key`,methods:[{id:`anthropic-oauth`,route:_,kind:`oauth`,label:`Sign in (Claude Code)`,hint:`Claude or Console account; Pro, Max, Team, Enterprise, or Console access`,buttonLabel:`Sign in`},{id:`token`,route:_,kind:`token`,label:`Token (setup-token)`,hint:"run `claude setup-token` elsewhere, then paste the token here",buttonLabel:`Paste token`},{id:`apiKey`,route:_,kind:`api-key`,label:`API key`}],models:{recommended:[...At],routeRules:{[_]:[`${_}/*`]}},modelCapabilities:Q(At,Pn)},cr={id:nt,label:`Chutes`,priority:3,hint:`Sign in + API key`,methods:[{id:`chutes`,route:v,kind:`oauth`,label:`Sign in`,hint:`Requires a Chutes OAuth app client id. Enter the cid, then Fased generates the Chutes sign-in URL.`,buttonLabel:`Sign in`},{id:`chutes-api-key`,route:v,kind:`api-key`,label:`API key`}],models:{recommended:[...Mt],routeRules:{[v]:[`${v}/*`]}},modelCapabilities:Q(Mt,Fn)},lr={id:rt,label:`Ollama`,priority:4,hint:`Local, cloud, or hybrid Ollama through the native API`,modelProviderIds:[y],methods:[{id:`ollama`,route:y,kind:`manual`,label:`Ollama native URL + model`,hint:`Use the native Ollama base URL, for example http://127.0.0.1:11434. Do not use /v1.`,buttonLabel:`Configure`}],models:{recommended:Nt,dynamic:!0,operatorCatalog:!0,routeRules:{[y]:[`${y}/*`]}},modelCapabilities:Z(Nt)},ur={id:it,label:`LM Studio`,priority:4,hint:`Local LM Studio server on localhost:1234`,modelProviderIds:[b],methods:[{id:`lmstudio`,route:b,kind:`manual`,label:`LM Studio URL + model`,hint:`Use http://127.0.0.1:1234/v1, optional API token, and a model key from LM Studio.`,buttonLabel:`Configure`}],models:{recommended:Pt,dynamic:!0,operatorCatalog:!0,routeRules:{[b]:[`${b}/*`]}},modelCapabilities:Z(Pt)},dr={id:at,label:`vLLM-compatible`,priority:4,hint:`OpenAI-compatible local server: vLLM, SGLang, TGI, LocalAI, or FastChat`,modelProviderIds:[x],methods:[{id:`vllm`,route:x,kind:`manual`,label:`vLLM-compatible URL + model`,hint:`Enter the /v1 base URL, API key or local placeholder, and served model ID for vLLM, SGLang, TGI, LocalAI, or FastChat.`,buttonLabel:`Configure`}],models:{recommended:Ft,dynamic:!0,operatorCatalog:!0,routeRules:{[x]:[`${x}/*`]}},modelCapabilities:Z(Ft)},fr={id:ot,label:`MiniMax`,priority:5,hint:`MiniMax OAuth + API key`,modelProviderIds:[S,C,w],methods:[{id:`minimax-portal`,route:w,kind:`oauth`,label:`Sign in`,hint:`Global or CN endpoint; uses MiniMax portal sign-in`,setupRequirement:`Requires MiniMax portal/coding-plan access. Choose Global or CN, then open the approval URL and approve before the code expires.`,buttonLabel:`Sign in`},{id:`minimax-api`,route:S,kind:`api-key`,label:`API key`},{id:`minimax-api-key-cn`,route:C,kind:`api-key`,label:`API key (CN)`,hint:`China endpoint (api.minimaxi.com)`},{id:`minimax-api-lightning`,route:S,configProviderId:`minimax-lightning`,statusRoute:S,kind:`api-key`,label:`Highspeed API key`,hint:`Fast M2.7 tier`}],models:{recommended:[...Lt,...Rt,...zt],routeRules:{[S]:[`${S}/*`],[C]:[`${C}/*`],[w]:[`${w}/*`]}},modelCapabilities:Q([...Lt,...Rt,...zt],Ln)},pr={id:st,label:`Moonshot AI`,priority:6,hint:`Kimi API + Kimi Code`,modelProviderIds:[T,E],methods:[{id:`moonshot-api-key`,route:T,kind:`api-key`,label:`Kimi API key (.ai)`,hint:`Kimi Open Platform endpoint (api.moonshot.ai)`},{id:`moonshot-api-key-cn`,route:T,configProviderId:`moonshot-cn`,statusRoute:T,kind:`api-key`,label:`Kimi API key (.cn)`,hint:`China endpoint (api.moonshot.cn)`},{id:`kimi-code-api-key`,route:E,kind:`api-key`,label:`Kimi Code API key (subscription)`,hint:`Kimi Code membership endpoint (api.kimi.com/coding)`}],models:{recommended:[...Bt,...Vt],routeRules:{[T]:[`${T}/*`],[E]:[`${E}/*`]}},modelCapabilities:Q([...Bt,...Vt],Rn)},mr={id:ct,label:`Google`,priority:7,hint:`Gemini API key + OAuth`,routeAliases:[`gemini`],modelProviderIds:[D,`gemini`,O],methods:[{id:`gemini-api-key`,route:D,kind:`api-key`,label:`Gemini API key`},{id:`google-gemini-cli`,route:O,kind:`oauth`,label:`Sign in (Gemini CLI)`,hint:`Unofficial flow; review account-risk warning before use`,setupRequirement:`Requires gemini-cli installed on the gateway machine, or GEMINI_CLI_OAUTH_CLIENT_ID set before sign-in.`}],models:{recommended:[...Ut,...Wt],routeRules:{[D]:[`${D}/*`,`gemini/*`],[O]:[`${O}/*`]}},modelCapabilities:Q([...Ut,...Wt],zn)},hr={id:`xai`,label:`xAI (Grok)`,priority:8,hint:`Grok API key or xAI account sign-in`,methods:[{id:`xai-oauth`,route:`xai`,kind:`oauth`,label:`xAI sign-in`,hint:`Browser sign-in for eligible xAI/Grok accounts`,buttonLabel:`Sign in`},{id:`xai-device-code`,route:`xai`,kind:`device`,label:`xAI device code`,hint:`Remote-friendly sign-in for eligible xAI/Grok accounts`,buttonLabel:`Device code`},{id:`xai-api-key`,route:`xai`,kind:`api-key`,label:`xAI API key`}],models:{recommended:[...Gt],routeRules:{xai:[`xai/*`]}},modelCapabilities:Q(Gt,Bn)},gr={id:lt,label:`Mistral AI`,priority:9,hint:`Mistral API key`,methods:[{id:`mistral-api-key`,route:k,kind:`api-key`,label:`Mistral API key`}],models:{recommended:[...Kt],routeRules:{[k]:[`${k}/*`]}},modelCapabilities:Q(Kt,Hn)},_r={id:ut,label:`Volcano Engine`,priority:10,hint:`Ark API key + Coding Plan`,modelProviderIds:[A,j,M],methods:[{id:`volcengine-api-key`,route:A,kind:`api-key`,label:`Volcano Engine API key`}],models:{recommended:[...qt,...Jt],routeRules:{[A]:[`${A}/*`],[j]:[`${j}/*`],[M]:[`${M}/*`]}},modelCapabilities:Q([...qt,...Jt],Kn)},vr={id:dt,label:`BytePlus`,priority:11,hint:`ModelArk API key + Coding Plan`,modelProviderIds:[N,P,F],methods:[{id:`byteplus-api-key`,route:N,kind:`api-key`,label:`BytePlus API key`}],models:{recommended:[...Yt,...Xt],routeRules:{[N]:[`${N}/*`],[P]:[`${P}/*`],[F]:[`${F}/*`]}},modelCapabilities:Q([...Yt,...Xt],Yn)},yr={id:ft,label:`OpenRouter`,priority:12,hint:`API key`,methods:[{id:`openrouter-api-key`,route:I,kind:`api-key`,label:`OpenRouter API key`}],models:{recommended:[...Zt],dynamic:!0,routeRules:{[I]:[`${I}/*`]}},modelCapabilities:Q(Zt,rr)},br={id:pt,label:`Qwen`,priority:14,hint:`Coding Plan + DashScope API key`,modelProviderIds:[R,L],methods:[{id:`qwen-coding-plan-api-key`,route:R,kind:`api-key`,label:`Coding Plan API key`,hint:`Alibaba Cloud Coding Plan endpoint (coding.dashscope.aliyuncs.com)`},{id:`qwen-api-key`,route:L,kind:`api-key`,label:`DashScope API key`,hint:`DashScope OpenAI-compatible endpoint (dashscope.aliyuncs.com)`}],models:{recommended:[...$t,...Qt],routeRules:{[R]:[`${R}/*`],[L]:[`${L}/*`]}},modelCapabilities:Q([...$t,...Qt],ar)},xr={id:`zai`,label:`Z.AI`,priority:15,hint:`GLM Coding Plan / Global / CN`,modelProviderIds:[`zai`],methods:[{id:`zai-coding-global`,route:`zai`,configProviderId:`zai-coding-global`,statusRoute:`zai`,kind:`api-key`,label:`Coding-Plan-Global`,hint:`GLM Coding Plan Global (api.z.ai)`},{id:`zai-coding-cn`,route:`zai`,configProviderId:`zai-coding-cn`,statusRoute:`zai`,kind:`api-key`,label:`Coding-Plan-CN`,hint:`GLM Coding Plan CN (open.bigmodel.cn)`},{id:`zai-global`,route:`zai`,configProviderId:`zai`,kind:`api-key`,label:`Global`,hint:`Z.AI Global (api.z.ai)`},{id:`zai-cn`,route:`zai`,configProviderId:`zai-cn`,statusRoute:`zai`,kind:`api-key`,label:`CN`,hint:`Z.AI CN (open.bigmodel.cn)`}],models:{recommended:[...en],routeRules:{zai:[`zai/*`]}},modelCapabilities:Q(en,nn)},Sr={id:mt,label:`Qianfan`,priority:16,hint:`Baidu Qianfan API key`,methods:[{id:`qianfan-api-key`,route:z,kind:`api-key`,label:`Qianfan API key`}],models:{recommended:[...rn],routeRules:{[z]:[`${z}/*`]}},modelCapabilities:Q(rn,sn)},Cr={id:ht,label:`Copilot`,priority:17,hint:`GitHub device login + local proxy`,modelProviderIds:[B,V],methods:[{id:`github-copilot`,route:B,kind:`device`,label:`GitHub sign in`,hint:`GitHub OAuth device flow; requires an active Copilot subscription`,buttonLabel:`Sign in`},{id:`copilot-proxy`,route:V,kind:`device`,label:`Proxy sign in`,hint:`Local VS Code Copilot Proxy bridge`,buttonLabel:`Configure`}],models:{recommended:[...ln,...un],dynamic:!0,routeRules:{[B]:[`${B}/*`],[V]:[`${V}/*`]}},modelCapabilities:Q([...ln,...un],gn)},wr={id:gt,label:`Vercel AI`,priority:18,hint:`API key`,modelProviderIds:[H],methods:[{id:`ai-gateway-api-key`,route:H,kind:`api-key`,label:`Vercel AI API key`}],models:{recommended:[...We],dynamic:!0,routeRules:{[H]:[`${H}/*`]}},modelCapabilities:Q(We,_n)},Tr={id:_t,label:`OpenCode Zen`,priority:19,hint:`API key`,modelProviderIds:[U],methods:[{id:`opencode-zen`,route:U,kind:`api-key`,label:`OpenCode Zen API key`,hint:`Sign in to OpenCode Zen, then paste the API key`}],models:{recommended:[...Ee],dynamic:!0,routeRules:{[U]:[`${U}/*`]}},modelCapabilities:Q(Ee,vn)},Er={id:vt,label:`Xiaomi`,priority:20,hint:`MiMo API key`,modelProviderIds:[W],methods:[{id:`xiaomi-api-key`,route:W,kind:`api-key`,label:`Xiaomi API key`,hint:`Create an API key in the Xiaomi MiMo API Open Platform`}],models:{recommended:[...yn],routeRules:{[W]:[`${W}/*`]}},modelCapabilities:Q(yn,bn)},Dr={id:yt,label:`Synthetic`,priority:21,hint:`Anthropic-compatible API key`,modelProviderIds:[G],methods:[{id:`synthetic-api-key`,route:G,kind:`api-key`,label:`Synthetic API key`,hint:`Create an API key in Synthetic`}],models:{recommended:[...xn],routeRules:{[G]:[`${G}/*`]}},modelCapabilities:Q(xn,Sn)},Or={id:bt,label:`Together AI`,priority:22,hint:`API key`,modelProviderIds:[K],methods:[{id:`together-api-key`,route:K,kind:`api-key`,label:`Together AI API key`,hint:`Create an API key in Together AI`}],models:{recommended:[...Ie],routeRules:{[K]:[`${K}/*`]}},modelCapabilities:Q(Ie,Cn)},kr={id:xt,label:`Hugging Face`,priority:23,hint:`Inference Providers token`,modelProviderIds:[q],methods:[{id:`huggingface-api-key`,route:q,kind:`api-key`,label:`Hugging Face token`,hint:`Create a fine-grained token with Inference Providers access`}],models:{recommended:[...ye],dynamic:!0,routeRules:{[q]:[`${q}/*`]}},modelCapabilities:wn},Ar={id:St,label:`Venice AI`,priority:24,hint:`Privacy-focused API key`,modelProviderIds:[J],methods:[{id:`venice-api-key`,route:J,kind:`api-key`,label:`Venice AI API key`,hint:`Create an API key in Venice settings`}],models:{recommended:[...Ve],dynamic:!0,routeRules:{[J]:[`${J}/*`]}},modelCapabilities:Tn},jr={id:Ct,label:`LiteLLM`,priority:25,hint:`OpenAI-compatible LLM proxy`,modelProviderIds:[Y],methods:[{id:`litellm-api-key`,route:Y,kind:`api-key`,label:`LiteLLM API key`,hint:`LiteLLM Proxy virtual key or master key plus /v1 base URL`}],models:{recommended:[...we],dynamic:!0,operatorCatalog:!0,routeRules:{[Y]:[`${Y}/*`]}},modelCapabilities:En},Mr={id:le,label:`Cloudflare AI`,priority:26,hint:`Anthropic through Cloudflare AI`,modelProviderIds:[c],methods:[{id:`cloudflare-ai-gateway-api-key`,route:c,kind:`manual`,label:`Cloudflare AI API key`,hint:`Requires Cloudflare Account ID, Gateway ID, and Anthropic provider API key`,buttonLabel:`Configure`}],models:{recommended:[...he],routeRules:{[c]:[`${c}/*`]}},modelCapabilities:Dn},Nr={id:wt,label:`Custom Provider`,priority:27,hint:`OpenAI or Anthropic-compatible endpoint outside the built-in provider cards`,modelProviderIds:[X],methods:[{id:`custom-api-key`,route:X,kind:`manual`,label:`Custom Provider`,hint:`Requires base URL, endpoint compatibility, model ID, and optional API key. Use this for SGLang or other compatible endpoints when the vLLM-compatible shortcut does not fit.`,buttonLabel:`Configure`}],models:{recommended:On,dynamic:!0,operatorCatalog:!0,routeRules:{[X]:[`${X}/*`]}},modelCapabilities:Z(On)},Pr=[or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr],Fr=new Map(Pr.map(e=>[e.id,e])),Ir=new Map(Pr.flatMap(e=>[...e.methods.map(t=>[t.route,e]),...(e.routeAliases??[]).map(t=>[t,e]),...(e.modelProviderIds??[]).map(t=>[t,e])])),Lr=new Set(Pr.flatMap(e=>e.models.recommended.map(e=>e.toLowerCase())));new Map(Pr.flatMap(e=>Object.entries(e.modelCapabilities??{}).map(([e,t])=>[e.toLowerCase(),t]))),new Set(Et),[...Et,...Dt];function Rr(e){return Fr.get(e.trim().toLowerCase())}function $(e){return Ir.get(e.trim().toLowerCase())}function zr(e){let t=e.trim();if(!t)return!1;let n=t.indexOf(`/`);if(n===-1)return!0;let r=t.slice(0,n).trim().toLowerCase();if(!$(r))return!1;let i=$(r);return i?i.models.operatorCatalog?!0:Lr.has(t.toLowerCase()):!1}function Br(e){let t=e.provider.trim(),n=e.id.trim();return!t||!n?!1:zr(`${t}/${n}`)}function Vr(e,t){let n=e.trim();if(!n)return``;if(n.includes(`/`))return n;let r=t?.trim();return r?`${r}/${n}`:n}function Hr(e){let t=e.trim();return t?t.includes(`/`)?{kind:`qualified`,value:t}:{kind:`raw`,value:t}:null}function Ur(e,t){return Wr(e,t).value}function Wr(e,t){if(!e)return{value:``,source:`empty`,reason:`empty`};let n=e?.value.trim();if(!n)return{value:``,source:`empty`,reason:`empty`};if(e.kind===`qualified`)return{value:n,source:`qualified`};let r=``;for(let e of t){if(e.id.trim().toLowerCase()!==n.toLowerCase())continue;let t=Vr(e.id,e.provider);if(!r){r=t;continue}if(r.toLowerCase()!==t.toLowerCase())return{value:n,source:`raw`,reason:`ambiguous`}}return r?{value:r,source:`catalog`}:{value:n,source:`raw`,reason:`missing`}}function Gr(e,t){return typeof e==`string`?Vr(e,t):``}function Kr(e,t,n){if(typeof e!=`string`)return{value:``,source:`empty`,reason:`empty`};let r=e.trim();if(!r)return{value:``,source:`empty`,reason:`empty`};let i=t?.trim();if(i){let e=n.find(e=>e.provider?.trim().toLowerCase()===i.toLowerCase()&&e.id.trim().toLowerCase()===r.toLowerCase());if(e)return{value:Xr(e).value,source:`server`}}let a=Wr(Hr(r),n);return a.source===`qualified`||a.source===`catalog`?a:{value:Gr(r,t),source:`server`,reason:a.reason}}function qr(e,t,n){return Kr(e,t,n).value}function Jr(e){let t=e.trim();if(!t)return``;let n=t.indexOf(`/`);if(n<=0)return t;let r=t.slice(0,n);return`${t.slice(n+1)} · ${Yr(r)}`}function Yr(e){return $(e)?.label??e}function Xr(e){let t=e.provider?.trim();return{value:(()=>{if(!t)return e.id;let n=`${t.toLowerCase()}/`;return e.id.toLowerCase().startsWith(n)?e.id:`${t}/${e.id}`})(),label:t?`${e.id} · ${Yr(t)}`:e.id}}export{dr as A,ee as B,yr as C,Or as D,Dr as E,Rr as F,$ as I,Br as L,hr as M,Er as N,Ar as O,xr as P,zr as R,Tr as S,br as T,s as V,fr as _,Wr as a,lr as b,vr as c,Cr as d,Nr as f,ur as g,jr as h,Ur as i,_r as j,wr as k,cr as l,kr as m,Hr as n,qr as o,mr as p,Jr as r,sr as s,Xr as t,Mr as u,gr as v,Sr as w,or as x,pr as y,ce as z};
|
|
2
|
-
//# sourceMappingURL=chat-model-ref-B9sWop67.js.map
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import ipaddr from "ipaddr.js";
|
|
2
|
-
|
|
3
|
-
//#region src/shared/net/ip.ts
|
|
4
|
-
const BLOCKED_IPV4_SPECIAL_USE_RANGES = new Set([
|
|
5
|
-
"unspecified",
|
|
6
|
-
"broadcast",
|
|
7
|
-
"multicast",
|
|
8
|
-
"linkLocal",
|
|
9
|
-
"loopback",
|
|
10
|
-
"carrierGradeNat",
|
|
11
|
-
"private",
|
|
12
|
-
"reserved"
|
|
13
|
-
]);
|
|
14
|
-
const BLOCKED_IPV6_SPECIAL_USE_RANGES = new Set([
|
|
15
|
-
"unspecified",
|
|
16
|
-
"loopback",
|
|
17
|
-
"linkLocal",
|
|
18
|
-
"uniqueLocal",
|
|
19
|
-
"multicast"
|
|
20
|
-
]);
|
|
21
|
-
const RFC2544_BENCHMARK_PREFIX = [ipaddr.IPv4.parse("198.18.0.0"), 15];
|
|
22
|
-
const EMBEDDED_IPV4_SENTINEL_RULES = [
|
|
23
|
-
{
|
|
24
|
-
matches: (parts) => parts[0] === 0 && parts[1] === 0 && parts[2] === 0 && parts[3] === 0 && parts[4] === 0 && parts[5] === 0,
|
|
25
|
-
toHextets: (parts) => [parts[6], parts[7]]
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
matches: (parts) => parts[0] === 100 && parts[1] === 65435 && parts[2] === 1 && parts[3] === 0 && parts[4] === 0 && parts[5] === 0,
|
|
29
|
-
toHextets: (parts) => [parts[6], parts[7]]
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
matches: (parts) => parts[0] === 8194,
|
|
33
|
-
toHextets: (parts) => [parts[1], parts[2]]
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
matches: (parts) => parts[0] === 8193 && parts[1] === 0,
|
|
37
|
-
toHextets: (parts) => [parts[6] ^ 65535, parts[7] ^ 65535]
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
matches: (parts) => (parts[4] & 64767) === 0 && parts[5] === 24318,
|
|
41
|
-
toHextets: (parts) => [parts[6], parts[7]]
|
|
42
|
-
}
|
|
43
|
-
];
|
|
44
|
-
function stripIpv6Brackets(value) {
|
|
45
|
-
if (value.startsWith("[") && value.endsWith("]")) return value.slice(1, -1);
|
|
46
|
-
return value;
|
|
47
|
-
}
|
|
48
|
-
function isNumericIpv4LiteralPart(value) {
|
|
49
|
-
return /^[0-9]+$/.test(value) || /^0x[0-9a-f]+$/i.test(value);
|
|
50
|
-
}
|
|
51
|
-
function parseIpv6WithEmbeddedIpv4(raw) {
|
|
52
|
-
if (!raw.includes(":") || !raw.includes(".")) return;
|
|
53
|
-
const match = /^(.*:)([^:%]+(?:\.[^:%]+){3})(%[0-9A-Za-z]+)?$/i.exec(raw);
|
|
54
|
-
if (!match) return;
|
|
55
|
-
const [, prefix, embeddedIpv4, zoneSuffix = ""] = match;
|
|
56
|
-
if (!ipaddr.IPv4.isValidFourPartDecimal(embeddedIpv4)) return;
|
|
57
|
-
const octets = embeddedIpv4.split(".").map((part) => Number.parseInt(part, 10));
|
|
58
|
-
const normalizedIpv6 = `${prefix}${(octets[0] << 8 | octets[1]).toString(16)}:${(octets[2] << 8 | octets[3]).toString(16)}${zoneSuffix}`;
|
|
59
|
-
if (!ipaddr.IPv6.isValid(normalizedIpv6)) return;
|
|
60
|
-
return ipaddr.IPv6.parse(normalizedIpv6);
|
|
61
|
-
}
|
|
62
|
-
function isIpv4Address(address) {
|
|
63
|
-
return address.kind() === "ipv4";
|
|
64
|
-
}
|
|
65
|
-
function isIpv6Address(address) {
|
|
66
|
-
return address.kind() === "ipv6";
|
|
67
|
-
}
|
|
68
|
-
function normalizeIpv4MappedAddress(address) {
|
|
69
|
-
if (!isIpv6Address(address)) return address;
|
|
70
|
-
if (!address.isIPv4MappedAddress()) return address;
|
|
71
|
-
return address.toIPv4Address();
|
|
72
|
-
}
|
|
73
|
-
function parseCanonicalIpAddress(raw) {
|
|
74
|
-
const trimmed = raw?.trim();
|
|
75
|
-
if (!trimmed) return;
|
|
76
|
-
const normalized = stripIpv6Brackets(trimmed);
|
|
77
|
-
if (!normalized) return;
|
|
78
|
-
if (ipaddr.IPv4.isValid(normalized)) {
|
|
79
|
-
if (!ipaddr.IPv4.isValidFourPartDecimal(normalized)) return;
|
|
80
|
-
return ipaddr.IPv4.parse(normalized);
|
|
81
|
-
}
|
|
82
|
-
if (ipaddr.IPv6.isValid(normalized)) return ipaddr.IPv6.parse(normalized);
|
|
83
|
-
return parseIpv6WithEmbeddedIpv4(normalized);
|
|
84
|
-
}
|
|
85
|
-
function parseLooseIpAddress(raw) {
|
|
86
|
-
const trimmed = raw?.trim();
|
|
87
|
-
if (!trimmed) return;
|
|
88
|
-
const normalized = stripIpv6Brackets(trimmed);
|
|
89
|
-
if (!normalized) return;
|
|
90
|
-
if (ipaddr.isValid(normalized)) return ipaddr.parse(normalized);
|
|
91
|
-
return parseIpv6WithEmbeddedIpv4(normalized);
|
|
92
|
-
}
|
|
93
|
-
function normalizeIpAddress(raw) {
|
|
94
|
-
const parsed = parseCanonicalIpAddress(raw);
|
|
95
|
-
if (!parsed) return;
|
|
96
|
-
return normalizeIpv4MappedAddress(parsed).toString().toLowerCase();
|
|
97
|
-
}
|
|
98
|
-
function isCanonicalDottedDecimalIPv4(raw) {
|
|
99
|
-
const trimmed = raw?.trim();
|
|
100
|
-
if (!trimmed) return false;
|
|
101
|
-
const normalized = stripIpv6Brackets(trimmed);
|
|
102
|
-
if (!normalized) return false;
|
|
103
|
-
return ipaddr.IPv4.isValidFourPartDecimal(normalized);
|
|
104
|
-
}
|
|
105
|
-
function isLegacyIpv4Literal(raw) {
|
|
106
|
-
const trimmed = raw?.trim();
|
|
107
|
-
if (!trimmed) return false;
|
|
108
|
-
const normalized = stripIpv6Brackets(trimmed);
|
|
109
|
-
if (!normalized || normalized.includes(":")) return false;
|
|
110
|
-
if (isCanonicalDottedDecimalIPv4(normalized)) return false;
|
|
111
|
-
const parts = normalized.split(".");
|
|
112
|
-
if (parts.length === 0 || parts.length > 4) return false;
|
|
113
|
-
if (parts.some((part) => part.length === 0)) return false;
|
|
114
|
-
if (!parts.every((part) => isNumericIpv4LiteralPart(part))) return false;
|
|
115
|
-
return true;
|
|
116
|
-
}
|
|
117
|
-
function isLoopbackIpAddress(raw) {
|
|
118
|
-
const parsed = parseCanonicalIpAddress(raw);
|
|
119
|
-
if (!parsed) return false;
|
|
120
|
-
return normalizeIpv4MappedAddress(parsed).range() === "loopback";
|
|
121
|
-
}
|
|
122
|
-
function isBlockedSpecialUseIpv6Address(address) {
|
|
123
|
-
if (BLOCKED_IPV6_SPECIAL_USE_RANGES.has(address.range())) return true;
|
|
124
|
-
return (address.parts[0] & 65472) === 65216;
|
|
125
|
-
}
|
|
126
|
-
function isBlockedSpecialUseIpv4Address(address, options = {}) {
|
|
127
|
-
const inRfc2544BenchmarkRange = address.match(RFC2544_BENCHMARK_PREFIX);
|
|
128
|
-
if (inRfc2544BenchmarkRange && options.allowRfc2544BenchmarkRange === true) return false;
|
|
129
|
-
return BLOCKED_IPV4_SPECIAL_USE_RANGES.has(address.range()) || inRfc2544BenchmarkRange;
|
|
130
|
-
}
|
|
131
|
-
function decodeIpv4FromHextets(high, low) {
|
|
132
|
-
const octets = [
|
|
133
|
-
high >>> 8 & 255,
|
|
134
|
-
high & 255,
|
|
135
|
-
low >>> 8 & 255,
|
|
136
|
-
low & 255
|
|
137
|
-
];
|
|
138
|
-
return ipaddr.IPv4.parse(octets.join("."));
|
|
139
|
-
}
|
|
140
|
-
function extractEmbeddedIpv4FromIpv6(address) {
|
|
141
|
-
if (address.isIPv4MappedAddress()) return address.toIPv4Address();
|
|
142
|
-
if (address.range() === "rfc6145") return decodeIpv4FromHextets(address.parts[6], address.parts[7]);
|
|
143
|
-
if (address.range() === "rfc6052") return decodeIpv4FromHextets(address.parts[6], address.parts[7]);
|
|
144
|
-
for (const rule of EMBEDDED_IPV4_SENTINEL_RULES) {
|
|
145
|
-
if (!rule.matches(address.parts)) continue;
|
|
146
|
-
const [high, low] = rule.toHextets(address.parts);
|
|
147
|
-
return decodeIpv4FromHextets(high, low);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
function isIpInCidr(ip, cidr) {
|
|
151
|
-
const normalizedIp = parseCanonicalIpAddress(ip);
|
|
152
|
-
if (!normalizedIp) return false;
|
|
153
|
-
const candidate = cidr.trim();
|
|
154
|
-
if (!candidate) return false;
|
|
155
|
-
const comparableIp = normalizeIpv4MappedAddress(normalizedIp);
|
|
156
|
-
if (!candidate.includes("/")) {
|
|
157
|
-
const exact = parseCanonicalIpAddress(candidate);
|
|
158
|
-
if (!exact) return false;
|
|
159
|
-
const comparableExact = normalizeIpv4MappedAddress(exact);
|
|
160
|
-
return comparableIp.kind() === comparableExact.kind() && comparableIp.toString() === comparableExact.toString();
|
|
161
|
-
}
|
|
162
|
-
let parsedCidr;
|
|
163
|
-
try {
|
|
164
|
-
parsedCidr = ipaddr.parseCIDR(candidate);
|
|
165
|
-
} catch {
|
|
166
|
-
return false;
|
|
167
|
-
}
|
|
168
|
-
const [baseAddress, prefixLength] = parsedCidr;
|
|
169
|
-
const comparableBase = normalizeIpv4MappedAddress(baseAddress);
|
|
170
|
-
if (comparableIp.kind() !== comparableBase.kind()) return false;
|
|
171
|
-
try {
|
|
172
|
-
if (isIpv4Address(comparableIp) && isIpv4Address(comparableBase)) return comparableIp.match([comparableBase, prefixLength]);
|
|
173
|
-
if (isIpv6Address(comparableIp) && isIpv6Address(comparableBase)) return comparableIp.match([comparableBase, prefixLength]);
|
|
174
|
-
return false;
|
|
175
|
-
} catch {
|
|
176
|
-
return false;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
//#endregion
|
|
181
|
-
export { isIpInCidr as a, isLoopbackIpAddress as c, parseLooseIpAddress as d, isCanonicalDottedDecimalIPv4 as i, normalizeIpAddress as l, isBlockedSpecialUseIpv4Address as n, isIpv4Address as o, isBlockedSpecialUseIpv6Address as r, isLegacyIpv4Literal as s, extractEmbeddedIpv4FromIpv6 as t, parseCanonicalIpAddress as u };
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { t as runCommandWithTimeout } from "./exec-DQ8j4Fm3.js";
|
|
2
|
-
|
|
3
|
-
//#region src/plugin-sdk/run-command.ts
|
|
4
|
-
async function runPluginCommandWithTimeout(options) {
|
|
5
|
-
const [command] = options.argv;
|
|
6
|
-
if (!command) return {
|
|
7
|
-
code: 1,
|
|
8
|
-
stdout: "",
|
|
9
|
-
stderr: "command is required"
|
|
10
|
-
};
|
|
11
|
-
try {
|
|
12
|
-
const result = await runCommandWithTimeout(options.argv, {
|
|
13
|
-
timeoutMs: options.timeoutMs,
|
|
14
|
-
cwd: options.cwd,
|
|
15
|
-
env: options.env
|
|
16
|
-
});
|
|
17
|
-
const timedOut = result.termination === "timeout" || result.termination === "no-output-timeout";
|
|
18
|
-
return {
|
|
19
|
-
code: result.code ?? 1,
|
|
20
|
-
stdout: result.stdout,
|
|
21
|
-
stderr: timedOut ? result.stderr || `command timed out after ${options.timeoutMs}ms` : result.stderr
|
|
22
|
-
};
|
|
23
|
-
} catch (error) {
|
|
24
|
-
return {
|
|
25
|
-
code: 1,
|
|
26
|
-
stdout: "",
|
|
27
|
-
stderr: error instanceof Error ? error.message : String(error)
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/shared/gateway-bind-url.ts
|
|
34
|
-
function resolveGatewayBindUrl(params) {
|
|
35
|
-
const bind = params.bind ?? "loopback";
|
|
36
|
-
if (bind === "custom") {
|
|
37
|
-
const host = params.customBindHost?.trim();
|
|
38
|
-
if (host) return {
|
|
39
|
-
url: `${params.scheme}://${host}:${params.port}`,
|
|
40
|
-
source: "gateway.bind=custom"
|
|
41
|
-
};
|
|
42
|
-
return { error: "gateway.bind=custom requires gateway.customBindHost." };
|
|
43
|
-
}
|
|
44
|
-
if (bind === "tailnet") {
|
|
45
|
-
const host = params.pickTailnetHost();
|
|
46
|
-
if (host) return {
|
|
47
|
-
url: `${params.scheme}://${host}:${params.port}`,
|
|
48
|
-
source: "gateway.bind=tailnet"
|
|
49
|
-
};
|
|
50
|
-
return { error: "gateway.bind=tailnet set, but no tailnet IP was found." };
|
|
51
|
-
}
|
|
52
|
-
if (bind === "lan") {
|
|
53
|
-
const host = params.pickLanHost();
|
|
54
|
-
if (host) return {
|
|
55
|
-
url: `${params.scheme}://${host}:${params.port}`,
|
|
56
|
-
source: "gateway.bind=lan"
|
|
57
|
-
};
|
|
58
|
-
return { error: "gateway.bind=lan set, but no private LAN IP was found." };
|
|
59
|
-
}
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
//#endregion
|
|
64
|
-
//#region src/shared/tailscale-status.ts
|
|
65
|
-
const TAILSCALE_STATUS_COMMAND_CANDIDATES = ["tailscale", "/Applications/Tailscale.app/Contents/MacOS/Tailscale"];
|
|
66
|
-
function parsePossiblyNoisyJsonObject(raw) {
|
|
67
|
-
const start = raw.indexOf("{");
|
|
68
|
-
const end = raw.lastIndexOf("}");
|
|
69
|
-
if (start === -1 || end <= start) return {};
|
|
70
|
-
try {
|
|
71
|
-
return JSON.parse(raw.slice(start, end + 1));
|
|
72
|
-
} catch {
|
|
73
|
-
return {};
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
function extractTailnetHostFromStatusJson(raw) {
|
|
77
|
-
const parsed = parsePossiblyNoisyJsonObject(raw);
|
|
78
|
-
const self = typeof parsed.Self === "object" && parsed.Self !== null ? parsed.Self : void 0;
|
|
79
|
-
const dns = typeof self?.DNSName === "string" ? self.DNSName : void 0;
|
|
80
|
-
if (dns && dns.length > 0) return dns.replace(/\.$/, "");
|
|
81
|
-
const ips = Array.isArray(self?.TailscaleIPs) ? self.TailscaleIPs : [];
|
|
82
|
-
return ips.length > 0 ? ips[0] ?? null : null;
|
|
83
|
-
}
|
|
84
|
-
async function resolveTailnetHostWithRunner(runCommandWithTimeout) {
|
|
85
|
-
if (!runCommandWithTimeout) return null;
|
|
86
|
-
for (const candidate of TAILSCALE_STATUS_COMMAND_CANDIDATES) try {
|
|
87
|
-
const result = await runCommandWithTimeout([
|
|
88
|
-
candidate,
|
|
89
|
-
"status",
|
|
90
|
-
"--json"
|
|
91
|
-
], { timeoutMs: 5e3 });
|
|
92
|
-
if (result.code !== 0) continue;
|
|
93
|
-
const raw = result.stdout.trim();
|
|
94
|
-
if (!raw) continue;
|
|
95
|
-
const host = extractTailnetHostFromStatusJson(raw);
|
|
96
|
-
if (host) return host;
|
|
97
|
-
} catch {
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
return null;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
//#endregion
|
|
104
|
-
export { resolveGatewayBindUrl as n, runPluginCommandWithTimeout as r, resolveTailnetHostWithRunner as t };
|