@xopcai/xopc 0.0.166 → 0.0.168
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/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-DkALQFJT.js → activity-store-DjEDu38T.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-Tr2hgn4j.js → agent-avatar-dicebear-DVuLzaJi.js} +1 -1
- package/dist/gateway/static/root/assets/agents-tF_QTWxn.js +2 -0
- package/dist/gateway/static/root/assets/{api-DPIXEcIq.js → api-DwVCuPOb.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-D7Nrbhez.js → app-management-settings-panel-spzVBvAu.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-DNNbABFj.js → appearance-settings-CetimI47.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-0zXIeywq.js → apps-page-HDyN6Fjx.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-CizqFy4G.js → archive-plugin-TOmQ2XKc.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-DU8KjTua.js → attachment-load-NFNEWVLJ.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-suggestion-card-3pqyIveW.js → automation-suggestion-card-B0FnLpSl.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DSz3xDsi.js → automations-page-DVevVD6A.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-CipUnsOr.js → binary-plugins-Csc4xkR9.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-XoEq6qiv.js → block-editor-C6Xgrbse.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-COYvq3y5.js → browser-settings-page-CyDDEKxB.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-DRH995XI.js → browser-workflow-inputs-DaxyAai1.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-65edjhpz.js → browser-workflows-page-CaX6iIJA.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-EXZv96j1.js +7 -0
- package/dist/gateway/static/root/assets/capability-presets-api-DdCHSzcA.js +1 -0
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-o08SXqM4.js +2 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-B5rLegwk.js → channel-recipient-api-BOkLI89e.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-D8nH0mve.js → channels-settings-aCN05KdJ.js} +1 -1
- package/dist/gateway/static/root/assets/channels-status-swr-ZrqadU60.js +1 -0
- package/dist/gateway/static/root/assets/{connector-logo-n4Hg41iD.js → connector-logo-Mp40HWsb.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-jvRWZn3Y.js → connectors-page-i0cu5rg5.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-D4OzBOwm.js → desktop-pet-BtzUJ0d7.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CDGezbaf.js → desktop-pet-settings-Dg0Duj8B.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-DmL4AUXQ.js → directory-picker-path-field-9f0k1wZq.js} +1 -1
- package/dist/gateway/static/root/assets/{dreaming-settings-ClUcBKnd.js → dreaming-settings-rdW7dsGP.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DsV_KUDM.js → extension-debug-page-C9zUnn-z.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DJv_G1jY.js → extension-page-Cy5rfU0h.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-DUAlJ4CU.js → extension-settings-page-BjIquAw6.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-SVYgzqv7.js → gateway-config-api-AQQmI6SW.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-YL6f2C_F.js → gateway-settings-CYNmbqHj.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-ulwTJovP.js → gateway-startup-retry-qnEmj-vL.js} +1 -1
- package/dist/gateway/static/root/assets/{goal-create-dialog-CJJe-4Co.js → goal-create-dialog-CkXaDfN3.js} +1 -1
- package/dist/gateway/static/root/assets/{goal-detail-page-Da9VMWRd.js → goal-detail-page-FqDa5bfO.js} +1 -1
- package/dist/gateway/static/root/assets/{goals-config-api-st_Itxa9.js → goals-config-api-CaVGtM6n.js} +1 -1
- package/dist/gateway/static/root/assets/{goals-page-B6pC7PYZ.js → goals-page-B-uBRGN6.js} +1 -1
- package/dist/gateway/static/root/assets/{goals-settings-BEZePZ5m.js → goals-settings-C9J3MX0F.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-DpeD9GQ9.js → heartbeat-settings-C0qFLyew.js} +1 -1
- package/dist/gateway/static/root/assets/{index-BhQMnKH1.js → index-DchbD-qM.js} +9 -9
- package/dist/gateway/static/root/assets/index-DfE2j0g8.css +1 -0
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-BAZlRZMd.js +1 -0
- package/dist/gateway/static/root/assets/{local-app-workbench-page-Ctia6lSG.js → local-app-workbench-page-DkJUQRyC.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-DWF9rpWQ.js → local-apps-page-PcQABi7F.js} +1 -1
- package/dist/gateway/static/root/assets/locale-store-tnRLWdx2.js +1 -0
- package/dist/gateway/static/root/assets/{logs-page-D3gL6vHX.js → logs-page-B-nXM29t.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-BuduJ0Ev.js → markdown-split-B6W1H0Fj.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CLASZjhT.js → media-plugins-B-r9Tj74.js} +1 -1
- package/dist/gateway/static/root/assets/{messages-C96Zjb0V.js → messages-B1EG4gdu.js} +2 -4
- package/dist/gateway/static/root/assets/{notes-page-ve3XiBDF.js → notes-page-BNECY6Oy.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-workbench-oHU532lp.js → notes-workbench-Be97S0Im.js} +2 -2
- package/dist/gateway/static/root/assets/{page-tabs-DU85jn98.js → page-tabs-BmUWVWO9.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-CtchTuRQ.js → preview-open-alternatives-a76A8p5R.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-DFT6Fx6y.js → product-open-page-BWhYrt-U.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-Ceu0NoC1.js → project-detail-page-md0ANZ-f.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-CdpqOmO8.js → projects-page-D1MNrLcy.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-D1NKLyiR.js → remote-access-hub-GTuiqlJO.js} +1 -1
- package/dist/gateway/static/root/assets/{save-bar-controls-CmcrHpMc.js → save-bar-controls-_ZMLDSUw.js} +1 -1
- package/dist/gateway/static/root/assets/{schedule-field-DmIkP6JV.js → schedule-field-D4ErObRc.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-Dkk9blN0.js → schema-form-PqNSGlcH.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-CMj_JaOk.js → sessions-page-Ct0MVjNv.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-QOUph2Oq.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-CuQzWvg5.js → settings-form-section-BCKaoLhJ.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-C5FNbyej.js → settings-loading-skeleton-Dn95fked.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-a-A2yTGE.js → settings-page-C8MPUl2Q.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-MuXpamWD.js → settings-page-layout-Bigc8-GR.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-BUdh8FKY.js → setup-status-panel-DFTcAHsd.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-BfzzmTgg.js → share-preview-page-xAjqaV4y.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-8a9qnLF8.js → shares-settings-D2uvC_aM.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DYtfQXB-.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-CmHj-CKY.js → skills-page-6dr3RRVW.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CyhRkWMi.js → system-settings-panel-BJJQulg9.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-D37XLD_C.js → theme-store-H9T49Iar.js} +1 -1
- package/dist/gateway/static/root/assets/{time-picker-WEPp3HrB.js → time-picker-DsuPUbRE.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-Bi1uoxFR.js → typed-models-lib-Djk3F3EL.js} +1 -1
- package/dist/gateway/static/root/assets/{use-channel-catalog-DBh0dOC9.js → use-channel-catalog-UACJTyH0.js} +1 -1
- package/dist/gateway/static/root/assets/{user-context-page-BObEyiim.js → user-context-page-BC585kHK.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-Gvgodhec.js → voice-api-key-field-CvocOFat.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-BHnjvGH1.js → work-discovery-page-DiMn6nrT.js} +1 -1
- package/dist/gateway/static/root/assets/{work-item-detail-page-CQ8ybkxx.js → work-item-detail-page-CFBlQbPy.js} +1 -1
- package/dist/gateway/static/root/assets/{work-page-D_U_En23.js → work-page-CLJLKqsf.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-B-Sk6gFn.js → workflow-run-setup-panel-DbQwWPjv.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-DT0pzfkz.js → workflows-page-BJOhlABF.js} +1 -1
- package/dist/gateway/static/root/index.html +8 -8
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +12 -5
- package/dist/src/agent/image/generation/custom-openai-images-provider.d.ts +7 -0
- package/dist/src/agent/image/generation/custom-openai-images-provider.js +81 -0
- package/dist/src/agent/image/generation/{openai-compatible-image-provider.d.ts → openai-images-provider.d.ts} +10 -31
- package/dist/src/agent/image/generation/{openai-compatible-image-provider.js → openai-images-provider.js} +36 -23
- package/dist/src/agent/image/generation/provider-registry.d.ts +2 -0
- package/dist/src/agent/image/generation/provider-registry.js +50 -4
- package/dist/src/agent/image/generation/providers/openai.js +2 -2
- package/dist/src/agent/image/generation/runtime.js +5 -1
- package/dist/src/agent/image/generation/types.d.ts +11 -0
- package/dist/src/agent/models/manager.d.ts +5 -0
- package/dist/src/agent/models/manager.js +8 -0
- package/dist/src/agent/prompt/sections/messaging-runtime.js +1 -1
- package/dist/src/agent/prompt/sections/tooling.js +1 -1
- package/dist/src/agent/tools/communication.js +25 -7
- package/dist/src/channels/plugin-registry.js +6 -1
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/doctor/checks/image-providers.d.ts +2 -0
- package/dist/src/cli/commands/doctor/checks/image-providers.js +68 -0
- package/dist/src/cli/commands/doctor/flow.js +2 -0
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/config/index.js +2 -2
- package/dist/src/config/models-json.d.ts +325 -0
- package/dist/src/config/models-json.js +139 -4
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/gateway/custom-image-providers.d.ts +89 -0
- package/dist/src/gateway/custom-image-providers.js +59 -0
- package/dist/src/gateway/hono/routes/models.js +182 -1
- package/dist/src/gateway/hono/routes/workflows.js +1 -1
- package/dist/src/gateway/image-generation-setup.js +7 -1
- package/dist/src/gateway/service/config-coordinator.js +2 -0
- package/dist/src/gateway/service.js +2 -2
- package/dist/src/media-shared/http/index.d.ts +1 -1
- package/dist/src/media-shared/http/index.js +2 -2
- package/dist/src/media-shared/http/provider-http.d.ts +2 -0
- package/dist/src/media-shared/http/provider-http.js +43 -4
- package/dist/src/providers/model-reference-auditor.d.ts +1 -0
- package/dist/src/providers/model-reference-auditor.js +23 -13
- package/dist/src/session/patch-metadata.d.ts +2 -0
- package/dist/src/session/patch-metadata.js +2 -0
- package/dist/src/tui/backends/embedded-backend.d.ts +2 -0
- package/dist/src/tui/backends/embedded-backend.js +46 -9
- package/dist/src/tui/backends/gateway-sse-backend.js +10 -3
- package/dist/src/tui/tui-backend.d.ts +2 -0
- package/dist/src/tui/tui-empty-session-cleanup.d.ts +11 -0
- package/dist/src/tui/tui-empty-session-cleanup.js +37 -0
- package/dist/src/tui/tui.js +43 -16
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +2 -2
- package/dist/gateway/static/root/assets/agents-DZ69tC4K.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-LOQyfdsM.js +0 -2
- package/dist/gateway/static/root/assets/capability-presets-api-XL4h7dCK.js +0 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-KPJFkt1h.js +0 -2
- package/dist/gateway/static/root/assets/channels-status-swr-DZZq0upi.js +0 -1
- package/dist/gateway/static/root/assets/index-BXtJvaQl.css +0 -1
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-fhssr2-J.js +0 -1
- package/dist/gateway/static/root/assets/locale-store-C_ax27uc.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DR9Q2ZyF.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-da5gLCer.js +0 -1
|
@@ -6,6 +6,9 @@ init_logger();
|
|
|
6
6
|
const log = createLogger("MessageTool");
|
|
7
7
|
const MessageSendSchema = Type.Object({
|
|
8
8
|
content: Type.String({ description: "The message content to send" }),
|
|
9
|
+
channel: Type.Optional(Type.String({ description: "Configured destination channel (for example weixin or telegram). Defaults to the current channel." })),
|
|
10
|
+
chat_id: Type.Optional(Type.String({ description: "Destination chat/peer id. Required when channel is provided." })),
|
|
11
|
+
accountId: Type.Optional(Type.String({ description: "Optional account id for a multi-account destination channel." })),
|
|
9
12
|
mediaUrl: Type.Optional(Type.String({ description: "URL of the media to send" })),
|
|
10
13
|
mediaType: Type.Optional(Type.Enum({
|
|
11
14
|
photo: "photo",
|
|
@@ -36,7 +39,9 @@ const MessageSendSchema = Type.Object({
|
|
|
36
39
|
function createMessageTool(bus, getContext) {
|
|
37
40
|
return {
|
|
38
41
|
name: "send_message",
|
|
39
|
-
description: `Send a message to the
|
|
42
|
+
description: `Send a message to the current conversation or an explicit configured channel.
|
|
43
|
+
|
|
44
|
+
For a proactive cross-channel send, provide both \`channel\` and \`chat_id\` (for example \`channel: "weixin"\`). Use \`accountId\` when the destination has multiple configured accounts. Omit destination fields to reply to the current conversation.
|
|
40
45
|
|
|
41
46
|
TTS (Text-to-Speech) is handled automatically by the system based on configuration:
|
|
42
47
|
- trigger=off: Never use voice
|
|
@@ -50,18 +55,31 @@ When TTS is enabled, you may also use the \`text_to_speech\` tool to send a stan
|
|
|
50
55
|
async execute(_toolCallId, params, _signal) {
|
|
51
56
|
const p = params;
|
|
52
57
|
const ctx = getContext();
|
|
53
|
-
|
|
58
|
+
const requestedChannel = p.channel?.trim();
|
|
59
|
+
const requestedChatId = p.chat_id?.trim();
|
|
60
|
+
if (Boolean(requestedChannel) !== Boolean(requestedChatId)) return {
|
|
61
|
+
content: [{
|
|
62
|
+
type: "text",
|
|
63
|
+
text: "Error: channel and chat_id must be provided together"
|
|
64
|
+
}],
|
|
65
|
+
details: {}
|
|
66
|
+
};
|
|
67
|
+
if (!ctx && (!requestedChannel || !requestedChatId)) return {
|
|
54
68
|
content: [{
|
|
55
69
|
type: "text",
|
|
56
70
|
text: "Error: No active conversation context"
|
|
57
71
|
}],
|
|
58
72
|
details: {}
|
|
59
73
|
};
|
|
74
|
+
const channel = requestedChannel || ctx.channel;
|
|
75
|
+
const chatId = requestedChatId || ctx.chatId;
|
|
76
|
+
const accountId = p.accountId?.trim();
|
|
60
77
|
try {
|
|
61
78
|
const msg = {
|
|
62
|
-
channel
|
|
63
|
-
chat_id:
|
|
79
|
+
channel,
|
|
80
|
+
chat_id: chatId,
|
|
64
81
|
content: p.content,
|
|
82
|
+
...accountId ? { metadata: { accountId } } : {},
|
|
65
83
|
mediaUrl: p.mediaUrl,
|
|
66
84
|
mediaType: p.mediaType,
|
|
67
85
|
replyToMessageId: p.replyTo,
|
|
@@ -83,10 +101,10 @@ When TTS is enabled, you may also use the \`text_to_speech\` tool to send a stan
|
|
|
83
101
|
log.error({
|
|
84
102
|
err: error,
|
|
85
103
|
errorMessage: em,
|
|
86
|
-
channel
|
|
87
|
-
chatId
|
|
104
|
+
channel,
|
|
105
|
+
chatId,
|
|
88
106
|
contentPreview: String(p.content ?? "").slice(0, 100)
|
|
89
|
-
}, `send_message: outbound publish failed (${
|
|
107
|
+
}, `send_message: outbound publish failed (${channel}/${chatId}): ${em}`);
|
|
90
108
|
return {
|
|
91
109
|
content: [{
|
|
92
110
|
type: "text",
|
|
@@ -7,7 +7,12 @@ const log = createLogger("ChannelPluginRegistry");
|
|
|
7
7
|
var ChannelPluginRegistry = class {
|
|
8
8
|
plugins = /* @__PURE__ */ new Map();
|
|
9
9
|
register(plugin) {
|
|
10
|
-
|
|
10
|
+
const current = this.plugins.get(plugin.id);
|
|
11
|
+
if (current === plugin) {
|
|
12
|
+
log.debug({ channel: plugin.id }, "Channel plugin already registered");
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (current) log.warn({ channel: plugin.id }, "Channel plugin already registered, overwriting");
|
|
11
16
|
this.plugins.set(plugin.id, plugin);
|
|
12
17
|
syncChannelPluginsFromManager(this.all());
|
|
13
18
|
log.debug({ channel: plugin.id }, "Registered channel plugin");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { buildChannelCatalogForConfig, init_channel_catalog_service } from "../../channels/catalog/channel-catalog-service.js";
|
|
2
2
|
import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
|
|
3
|
-
import { formatExamples, register } from "../registry.js";
|
|
4
3
|
import { listChannelPairingState } from "../../channels/pairing/pairing-service.js";
|
|
5
4
|
import { approveChannelPairingFromCli } from "../../channels/pairing/approve-cli.js";
|
|
5
|
+
import { formatExamples, register } from "../registry.js";
|
|
6
6
|
import { colors } from "../utils/colors.js";
|
|
7
7
|
import { Command } from "commander";
|
|
8
8
|
//#region src/cli/commands/channels.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
|
|
2
2
|
import { getStoreConnectorInstallPlan, installStoreConnector, listStoreConnectors } from "../../capabilities/store-connector.js";
|
|
3
3
|
import { register } from "../registry.js";
|
|
4
|
-
import { Command } from "commander";
|
|
5
4
|
import { confirm } from "@inquirer/prompts";
|
|
5
|
+
import { Command } from "commander";
|
|
6
6
|
//#region src/cli/commands/connectors.ts
|
|
7
7
|
init_loader();
|
|
8
8
|
function parsePairs(values, option) {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { resolveModelsJsonPath } from "../../../../config/paths.js";
|
|
2
|
+
import { init_models_json, loadModelsJson } from "../../../../config/models-json.js";
|
|
3
|
+
import { CredentialResolver, init_credentials } from "../../../../auth/credentials.js";
|
|
4
|
+
import { classifyHost } from "../../../../media-shared/http/private-network.js";
|
|
5
|
+
import "../../../../media-shared/http/index.js";
|
|
6
|
+
import { existsSync } from "node:fs";
|
|
7
|
+
//#region src/cli/commands/doctor/checks/image-providers.ts
|
|
8
|
+
init_credentials();
|
|
9
|
+
init_models_json();
|
|
10
|
+
async function checkImageProviders(_ctx) {
|
|
11
|
+
const path = resolveModelsJsonPath();
|
|
12
|
+
if (!existsSync(path)) return {
|
|
13
|
+
id: "image-providers",
|
|
14
|
+
label: "Image providers",
|
|
15
|
+
status: "skip",
|
|
16
|
+
message: "No models.json file; custom image providers are not configured.",
|
|
17
|
+
hints: []
|
|
18
|
+
};
|
|
19
|
+
const loaded = loadModelsJson(path);
|
|
20
|
+
if (loaded.error) return {
|
|
21
|
+
id: "image-providers",
|
|
22
|
+
label: "Image providers",
|
|
23
|
+
status: "fail",
|
|
24
|
+
message: "models.json image provider configuration is invalid.",
|
|
25
|
+
hints: [loaded.error, path]
|
|
26
|
+
};
|
|
27
|
+
const entries = Object.entries(loaded.config.providers).filter((entry) => Boolean(entry[1].imageGeneration));
|
|
28
|
+
if (entries.length === 0) return {
|
|
29
|
+
id: "image-providers",
|
|
30
|
+
label: "Image providers",
|
|
31
|
+
status: "skip",
|
|
32
|
+
message: "No custom image providers are configured.",
|
|
33
|
+
hints: [path]
|
|
34
|
+
};
|
|
35
|
+
const blockedEndpoints = [];
|
|
36
|
+
const missingCredentials = [];
|
|
37
|
+
const resolver = new CredentialResolver();
|
|
38
|
+
for (const [providerId, provider] of entries) {
|
|
39
|
+
const hostname = new URL(provider.baseUrl).hostname.toLowerCase();
|
|
40
|
+
const hostClass = classifyHost(hostname);
|
|
41
|
+
const allowedHosts = (provider.imageGeneration.network?.allowedHosts ?? []).map((entry) => entry.toLowerCase());
|
|
42
|
+
if (hostClass !== "public" && !allowedHosts.includes(hostname)) blockedEndpoints.push(`${providerId}: ${hostname}`);
|
|
43
|
+
if (provider.imageGeneration.auth.type !== "none" && !await resolver.resolveApiKey(providerId)) missingCredentials.push(providerId);
|
|
44
|
+
}
|
|
45
|
+
if (blockedEndpoints.length > 0) return {
|
|
46
|
+
id: "image-providers",
|
|
47
|
+
label: "Image providers",
|
|
48
|
+
status: "fail",
|
|
49
|
+
message: `${blockedEndpoints.length} custom image provider endpoint(s) are blocked by private-network policy.`,
|
|
50
|
+
hints: [...blockedEndpoints, "Add each exact private hostname to imageGeneration.network.allowedHosts only when you trust it."]
|
|
51
|
+
};
|
|
52
|
+
if (missingCredentials.length > 0) return {
|
|
53
|
+
id: "image-providers",
|
|
54
|
+
label: "Image providers",
|
|
55
|
+
status: "warn",
|
|
56
|
+
message: `${missingCredentials.length} custom image provider(s) need an API key.`,
|
|
57
|
+
hints: missingCredentials.map((providerId) => `Configure a credential for ${providerId}.`)
|
|
58
|
+
};
|
|
59
|
+
return {
|
|
60
|
+
id: "image-providers",
|
|
61
|
+
label: "Image providers",
|
|
62
|
+
status: "pass",
|
|
63
|
+
message: `${entries.length} custom image provider(s) validate and are ready.`,
|
|
64
|
+
hints: [path]
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { checkImageProviders };
|
|
@@ -14,6 +14,7 @@ import { checkWorkspaceStatus } from "./checks/workspace-status.js";
|
|
|
14
14
|
import { checkVersionUpdate } from "./checks/version-check.js";
|
|
15
15
|
import { checkChannelPlugins } from "./checks/channel-plugins.js";
|
|
16
16
|
import { checkMigrations } from "./checks/migrations.js";
|
|
17
|
+
import { checkImageProviders } from "./checks/image-providers.js";
|
|
17
18
|
//#region src/cli/commands/doctor/flow.ts
|
|
18
19
|
const DOCTOR_CHECKS = [
|
|
19
20
|
checkVersionUpdate,
|
|
@@ -23,6 +24,7 @@ const DOCTOR_CHECKS = [
|
|
|
23
24
|
checkStateIntegrity,
|
|
24
25
|
checkDatabaseSchema,
|
|
25
26
|
checkProviderAuth,
|
|
27
|
+
checkImageProviders,
|
|
26
28
|
checkChannelConfig,
|
|
27
29
|
checkChannelPairingPending,
|
|
28
30
|
checkSecurityAudit,
|
|
@@ -12,8 +12,8 @@ import { join, resolve } from "node:path";
|
|
|
12
12
|
import { existsSync, readFileSync, rmSync, statSync } from "node:fs";
|
|
13
13
|
import { execSync } from "node:child_process";
|
|
14
14
|
import { createHash } from "node:crypto";
|
|
15
|
-
import { Command } from "commander";
|
|
16
15
|
import { confirm } from "@inquirer/prompts";
|
|
16
|
+
import { Command } from "commander";
|
|
17
17
|
import semver from "semver";
|
|
18
18
|
//#region src/cli/commands/extension-marketplace.ts
|
|
19
19
|
init_loader();
|
|
@@ -8,8 +8,8 @@ import "../../config/index.js";
|
|
|
8
8
|
import { prepareUpdateGlobalDefaults } from "../../gateway/global-defaults-admin.js";
|
|
9
9
|
import { colors } from "../utils/colors.js";
|
|
10
10
|
import { runCliOAuthLogin } from "../utils/oauth-login.js";
|
|
11
|
-
import { Command } from "commander";
|
|
12
11
|
import { input } from "@inquirer/prompts";
|
|
12
|
+
import { Command } from "commander";
|
|
13
13
|
//#region src/cli/commands/models.ts
|
|
14
14
|
init_credentials();
|
|
15
15
|
init_schema();
|
|
@@ -8,8 +8,8 @@ import { initWorkspace } from "../utils/init-workspace.js";
|
|
|
8
8
|
import { setupModel } from "./onboard/model.js";
|
|
9
9
|
import { getChannelConfigurators } from "./onboard/channels/registry.js";
|
|
10
10
|
import { setupChannels } from "./onboard/channels/index.js";
|
|
11
|
-
import { Command } from "commander";
|
|
12
11
|
import { select } from "@inquirer/prompts";
|
|
12
|
+
import { Command } from "commander";
|
|
13
13
|
//#region src/cli/commands/onboard.ts
|
|
14
14
|
init_schema();
|
|
15
15
|
function isInteractive() {
|
package/dist/src/config/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { extractProfileAgentId, resolveEffectiveAgentManifestForAgent, resolveEf
|
|
|
10
10
|
import { FILENAMES, USER_MEMORY_FILENAME, USER_PROFILE_FILENAME, WORKSPACE_FILES, existsSync, hasBundledExtensionManifest, init_paths, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveCredentialsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveUserDir, resolveUserMemoryPath, resolveUserProfilePath, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
11
11
|
import { init_loader, loadConfig, saveConfig } from "./loader.js";
|
|
12
12
|
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
13
|
-
import { CustomModelSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
|
|
13
|
+
import { CustomModelSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
|
|
14
14
|
import { canonicalizeConfiguredMcpServer, isKnownCliMcpTypeAlias, normalizeConfiguredMcpServers, resolveXopcMcpTransportAlias } from "./mcp-config-normalize.js";
|
|
15
15
|
import { formatThinkingLevels, listThinkingLevels, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, thinkLevelToNumber } from "../agent/transcript/thinking-types.js";
|
|
16
16
|
import { getWorkspacePath } from "./workspace-path-helpers.js";
|
|
@@ -27,4 +27,4 @@ init_workspace_path();
|
|
|
27
27
|
init_models_json();
|
|
28
28
|
init_resolve_config_value();
|
|
29
29
|
//#endregion
|
|
30
|
-
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentTypedModelRoleSchema, AgentsConfigSchema, BASE_RELOAD_RULES, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CodeIntelligenceConfigSchema, CommandsConfigSchema, ConfigHotReloader, ConfigSchema, ConnectorsConfigSchema, CustomModelSchema, ENV_VARS, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, FILENAMES, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GoalNotificationEventSchema, GoalNotificationTargetSchema, GoalNotificationsConfigSchema, GoalsConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelOverrideSchema, ModelsDevConfigSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProfileManager, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, USER_MEMORY_FILENAME, USER_PROFILE_FILENAME, UpdateAutoConfigSchema, UpdateConfigSchema, VercelGatewayRoutingSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WORKSPACE_FILES, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, XOPC_DB_FILENAME, applyConfigOverrides, buildReloadPlan, canonicalizeConfiguredMcpServer, clearConfigValueCache, createProfile, deleteProfile, diffConfigPaths, existsSync, expandWorkspacePathString, extractProfileAgentId, formatThinkingLevels, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, getAllowedCommands, getCacheStats, getConfigOverrides, getCurrentProfile, getDefaultModelValues, resolveModelsJsonPath as getModelsJsonPath, getProfileManager, getProfileNameFromDir, getSwitchCommand, getWorkspacePath, hasBundledExtensionManifest, isKnownCliMcpTypeAlias, listAgentProfileMarkdownDirs, listAgentWorkspaceDirs, listProfiles, listThinkingLevels, loadConfig, loadModelsJson, matchReloadRule, modelsJsonExists, normalizeConfiguredMcpServers, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, normalizeWorkspaceDir, parseModelRef, resetConfigOverrides, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentDir$1 as resolveAgentDirFromConfig, resolveAgentHomeDir, resolveAgentHomeDir$1 as resolveAgentHomeDirFromConfig, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAgentWorkspaceDir, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveConfigValue, resolveCredentialsDir, resolveDefaultAgentWorkspaceDir, resolveEffectiveAgentManifestForAgent, resolveEffectiveAgentManifestForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveHeaders, resolveHomeDir, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveProfileStateDir, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStateDir, resolveStatusPath, resolveToolsDir, resolveUserDir, resolveUserMemoryPath, resolveUserProfilePath, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceRoot, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath, resolveXopcDatabasePath, resolveXopcMcpTransportAlias, saveConfig, saveModelsJson, setConfigOverride, testApiKeyResolution, thinkLevelToNumber, unsetConfigOverride, validateModelsConfig };
|
|
30
|
+
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentTypedModelRoleSchema, AgentsConfigSchema, BASE_RELOAD_RULES, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CodeIntelligenceConfigSchema, CommandsConfigSchema, ConfigHotReloader, ConfigSchema, ConnectorsConfigSchema, CustomModelSchema, ENV_VARS, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, FILENAMES, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GoalNotificationEventSchema, GoalNotificationTargetSchema, GoalNotificationsConfigSchema, GoalsConfigSchema, HeartbeatConfigSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, McpConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelOverrideSchema, ModelsDevConfigSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProfileManager, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, USER_MEMORY_FILENAME, USER_PROFILE_FILENAME, UpdateAutoConfigSchema, UpdateConfigSchema, VercelGatewayRoutingSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WORKSPACE_FILES, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, XOPC_DB_FILENAME, applyConfigOverrides, buildReloadPlan, canonicalizeConfiguredMcpServer, clearConfigValueCache, createProfile, deleteProfile, diffConfigPaths, existsSync, expandWorkspacePathString, extractProfileAgentId, formatThinkingLevels, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, getAllowedCommands, getCacheStats, getConfigOverrides, getCurrentProfile, getDefaultModelValues, resolveModelsJsonPath as getModelsJsonPath, getProfileManager, getProfileNameFromDir, getSwitchCommand, getWorkspacePath, hasBundledExtensionManifest, isKnownCliMcpTypeAlias, listAgentProfileMarkdownDirs, listAgentWorkspaceDirs, listProfiles, listThinkingLevels, loadConfig, loadModelsJson, matchReloadRule, modelsJsonExists, normalizeConfiguredMcpServers, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, normalizeWorkspaceDir, parseModelRef, resetConfigOverrides, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentDir$1 as resolveAgentDirFromConfig, resolveAgentHomeDir, resolveAgentHomeDir$1 as resolveAgentHomeDirFromConfig, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAgentWorkspaceDir, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveConfigValue, resolveCredentialsDir, resolveDefaultAgentWorkspaceDir, resolveEffectiveAgentManifestForAgent, resolveEffectiveAgentManifestForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveHeaders, resolveHomeDir, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveProfileStateDir, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStateDir, resolveStatusPath, resolveToolsDir, resolveUserDir, resolveUserMemoryPath, resolveUserProfilePath, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceRoot, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath, resolveXopcDatabasePath, resolveXopcMcpTransportAlias, saveConfig, saveModelsJson, setConfigOverride, testApiKeyResolution, thinkLevelToNumber, unsetConfigOverride, validateModelsConfig };
|
|
@@ -72,6 +72,177 @@ export declare const OpenAICompatSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
72
72
|
}, z.core.$strip>>;
|
|
73
73
|
supportsStrictMode: z.ZodOptional<z.ZodBoolean>;
|
|
74
74
|
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>]>;
|
|
75
|
+
export declare const ImageGenerationCapabilitiesSchema: z.ZodObject<{
|
|
76
|
+
generate: z.ZodOptional<z.ZodObject<{
|
|
77
|
+
maxCount: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
supportsResolution: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
}, z.core.$strict>>;
|
|
82
|
+
edit: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
enabled: z.ZodBoolean;
|
|
84
|
+
maxInputImages: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
}, z.core.$strict>>;
|
|
88
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
89
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
90
|
+
aspectRatios: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
91
|
+
resolutions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
92
|
+
"1K": "1K";
|
|
93
|
+
"2K": "2K";
|
|
94
|
+
"4K": "4K";
|
|
95
|
+
}>>>;
|
|
96
|
+
}, z.core.$strict>>;
|
|
97
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
98
|
+
qualities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
99
|
+
low: "low";
|
|
100
|
+
high: "high";
|
|
101
|
+
auto: "auto";
|
|
102
|
+
medium: "medium";
|
|
103
|
+
}>>>;
|
|
104
|
+
formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
105
|
+
png: "png";
|
|
106
|
+
jpeg: "jpeg";
|
|
107
|
+
webp: "webp";
|
|
108
|
+
}>>>;
|
|
109
|
+
backgrounds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
110
|
+
auto: "auto";
|
|
111
|
+
transparent: "transparent";
|
|
112
|
+
opaque: "opaque";
|
|
113
|
+
}>>>;
|
|
114
|
+
}, z.core.$strict>>;
|
|
115
|
+
}, z.core.$strict>;
|
|
116
|
+
export declare const ImageGenerationModelSchema: z.ZodObject<{
|
|
117
|
+
id: z.ZodString;
|
|
118
|
+
name: z.ZodOptional<z.ZodString>;
|
|
119
|
+
capabilities: z.ZodObject<{
|
|
120
|
+
generate: z.ZodOptional<z.ZodObject<{
|
|
121
|
+
maxCount: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
+
supportsResolution: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
}, z.core.$strict>>;
|
|
126
|
+
edit: z.ZodOptional<z.ZodObject<{
|
|
127
|
+
enabled: z.ZodBoolean;
|
|
128
|
+
maxInputImages: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
130
|
+
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
131
|
+
}, z.core.$strict>>;
|
|
132
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
133
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
134
|
+
aspectRatios: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
135
|
+
resolutions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
136
|
+
"1K": "1K";
|
|
137
|
+
"2K": "2K";
|
|
138
|
+
"4K": "4K";
|
|
139
|
+
}>>>;
|
|
140
|
+
}, z.core.$strict>>;
|
|
141
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
142
|
+
qualities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
143
|
+
low: "low";
|
|
144
|
+
high: "high";
|
|
145
|
+
auto: "auto";
|
|
146
|
+
medium: "medium";
|
|
147
|
+
}>>>;
|
|
148
|
+
formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
149
|
+
png: "png";
|
|
150
|
+
jpeg: "jpeg";
|
|
151
|
+
webp: "webp";
|
|
152
|
+
}>>>;
|
|
153
|
+
backgrounds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
154
|
+
auto: "auto";
|
|
155
|
+
transparent: "transparent";
|
|
156
|
+
opaque: "opaque";
|
|
157
|
+
}>>>;
|
|
158
|
+
}, z.core.$strict>>;
|
|
159
|
+
}, z.core.$strict>;
|
|
160
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
161
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
size: z.ZodOptional<z.ZodString>;
|
|
163
|
+
outputFormat: z.ZodOptional<z.ZodEnum<{
|
|
164
|
+
png: "png";
|
|
165
|
+
jpeg: "jpeg";
|
|
166
|
+
webp: "webp";
|
|
167
|
+
}>>;
|
|
168
|
+
}, z.core.$strict>>;
|
|
169
|
+
}, z.core.$strict>;
|
|
170
|
+
export declare const ImageGenerationProviderSchema: z.ZodObject<{
|
|
171
|
+
api: z.ZodLiteral<"openai-images">;
|
|
172
|
+
name: z.ZodString;
|
|
173
|
+
documentationUrl: z.ZodOptional<z.ZodString>;
|
|
174
|
+
apiKeyUrl: z.ZodOptional<z.ZodString>;
|
|
175
|
+
defaultModel: z.ZodString;
|
|
176
|
+
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
177
|
+
type: z.ZodLiteral<"bearer">;
|
|
178
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
179
|
+
type: z.ZodLiteral<"header">;
|
|
180
|
+
headerName: z.ZodString;
|
|
181
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
182
|
+
type: z.ZodLiteral<"none">;
|
|
183
|
+
}, z.core.$strict>], "type">;
|
|
184
|
+
paths: z.ZodOptional<z.ZodObject<{
|
|
185
|
+
generations: z.ZodOptional<z.ZodString>;
|
|
186
|
+
edits: z.ZodOptional<z.ZodString>;
|
|
187
|
+
}, z.core.$strict>>;
|
|
188
|
+
network: z.ZodOptional<z.ZodObject<{
|
|
189
|
+
allowedHosts: z.ZodArray<z.ZodString>;
|
|
190
|
+
}, z.core.$strict>>;
|
|
191
|
+
models: z.ZodArray<z.ZodObject<{
|
|
192
|
+
id: z.ZodString;
|
|
193
|
+
name: z.ZodOptional<z.ZodString>;
|
|
194
|
+
capabilities: z.ZodObject<{
|
|
195
|
+
generate: z.ZodOptional<z.ZodObject<{
|
|
196
|
+
maxCount: z.ZodOptional<z.ZodNumber>;
|
|
197
|
+
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
+
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
199
|
+
supportsResolution: z.ZodOptional<z.ZodBoolean>;
|
|
200
|
+
}, z.core.$strict>>;
|
|
201
|
+
edit: z.ZodOptional<z.ZodObject<{
|
|
202
|
+
enabled: z.ZodBoolean;
|
|
203
|
+
maxInputImages: z.ZodOptional<z.ZodNumber>;
|
|
204
|
+
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
205
|
+
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
206
|
+
}, z.core.$strict>>;
|
|
207
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
208
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
209
|
+
aspectRatios: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
210
|
+
resolutions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
211
|
+
"1K": "1K";
|
|
212
|
+
"2K": "2K";
|
|
213
|
+
"4K": "4K";
|
|
214
|
+
}>>>;
|
|
215
|
+
}, z.core.$strict>>;
|
|
216
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
217
|
+
qualities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
218
|
+
low: "low";
|
|
219
|
+
high: "high";
|
|
220
|
+
auto: "auto";
|
|
221
|
+
medium: "medium";
|
|
222
|
+
}>>>;
|
|
223
|
+
formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
224
|
+
png: "png";
|
|
225
|
+
jpeg: "jpeg";
|
|
226
|
+
webp: "webp";
|
|
227
|
+
}>>>;
|
|
228
|
+
backgrounds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
229
|
+
auto: "auto";
|
|
230
|
+
transparent: "transparent";
|
|
231
|
+
opaque: "opaque";
|
|
232
|
+
}>>>;
|
|
233
|
+
}, z.core.$strict>>;
|
|
234
|
+
}, z.core.$strict>;
|
|
235
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
236
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
237
|
+
size: z.ZodOptional<z.ZodString>;
|
|
238
|
+
outputFormat: z.ZodOptional<z.ZodEnum<{
|
|
239
|
+
png: "png";
|
|
240
|
+
jpeg: "jpeg";
|
|
241
|
+
webp: "webp";
|
|
242
|
+
}>>;
|
|
243
|
+
}, z.core.$strict>>;
|
|
244
|
+
}, z.core.$strict>>;
|
|
245
|
+
}, z.core.$strict>;
|
|
75
246
|
export declare const CustomModelSchema: z.ZodObject<{
|
|
76
247
|
id: z.ZodString;
|
|
77
248
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -295,6 +466,82 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
295
466
|
modelDiscovery: z.ZodOptional<z.ZodObject<{
|
|
296
467
|
enabled: z.ZodBoolean;
|
|
297
468
|
}, z.core.$strict>>;
|
|
469
|
+
imageGeneration: z.ZodOptional<z.ZodObject<{
|
|
470
|
+
api: z.ZodLiteral<"openai-images">;
|
|
471
|
+
name: z.ZodString;
|
|
472
|
+
documentationUrl: z.ZodOptional<z.ZodString>;
|
|
473
|
+
apiKeyUrl: z.ZodOptional<z.ZodString>;
|
|
474
|
+
defaultModel: z.ZodString;
|
|
475
|
+
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
476
|
+
type: z.ZodLiteral<"bearer">;
|
|
477
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
478
|
+
type: z.ZodLiteral<"header">;
|
|
479
|
+
headerName: z.ZodString;
|
|
480
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
481
|
+
type: z.ZodLiteral<"none">;
|
|
482
|
+
}, z.core.$strict>], "type">;
|
|
483
|
+
paths: z.ZodOptional<z.ZodObject<{
|
|
484
|
+
generations: z.ZodOptional<z.ZodString>;
|
|
485
|
+
edits: z.ZodOptional<z.ZodString>;
|
|
486
|
+
}, z.core.$strict>>;
|
|
487
|
+
network: z.ZodOptional<z.ZodObject<{
|
|
488
|
+
allowedHosts: z.ZodArray<z.ZodString>;
|
|
489
|
+
}, z.core.$strict>>;
|
|
490
|
+
models: z.ZodArray<z.ZodObject<{
|
|
491
|
+
id: z.ZodString;
|
|
492
|
+
name: z.ZodOptional<z.ZodString>;
|
|
493
|
+
capabilities: z.ZodObject<{
|
|
494
|
+
generate: z.ZodOptional<z.ZodObject<{
|
|
495
|
+
maxCount: z.ZodOptional<z.ZodNumber>;
|
|
496
|
+
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
497
|
+
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
498
|
+
supportsResolution: z.ZodOptional<z.ZodBoolean>;
|
|
499
|
+
}, z.core.$strict>>;
|
|
500
|
+
edit: z.ZodOptional<z.ZodObject<{
|
|
501
|
+
enabled: z.ZodBoolean;
|
|
502
|
+
maxInputImages: z.ZodOptional<z.ZodNumber>;
|
|
503
|
+
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
504
|
+
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
505
|
+
}, z.core.$strict>>;
|
|
506
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
507
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
508
|
+
aspectRatios: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
509
|
+
resolutions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
510
|
+
"1K": "1K";
|
|
511
|
+
"2K": "2K";
|
|
512
|
+
"4K": "4K";
|
|
513
|
+
}>>>;
|
|
514
|
+
}, z.core.$strict>>;
|
|
515
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
516
|
+
qualities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
517
|
+
low: "low";
|
|
518
|
+
high: "high";
|
|
519
|
+
auto: "auto";
|
|
520
|
+
medium: "medium";
|
|
521
|
+
}>>>;
|
|
522
|
+
formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
523
|
+
png: "png";
|
|
524
|
+
jpeg: "jpeg";
|
|
525
|
+
webp: "webp";
|
|
526
|
+
}>>>;
|
|
527
|
+
backgrounds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
528
|
+
auto: "auto";
|
|
529
|
+
transparent: "transparent";
|
|
530
|
+
opaque: "opaque";
|
|
531
|
+
}>>>;
|
|
532
|
+
}, z.core.$strict>>;
|
|
533
|
+
}, z.core.$strict>;
|
|
534
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
535
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
536
|
+
size: z.ZodOptional<z.ZodString>;
|
|
537
|
+
outputFormat: z.ZodOptional<z.ZodEnum<{
|
|
538
|
+
png: "png";
|
|
539
|
+
jpeg: "jpeg";
|
|
540
|
+
webp: "webp";
|
|
541
|
+
}>>;
|
|
542
|
+
}, z.core.$strict>>;
|
|
543
|
+
}, z.core.$strict>>;
|
|
544
|
+
}, z.core.$strict>>;
|
|
298
545
|
}, z.core.$strip>;
|
|
299
546
|
export declare const ModelsJsonSchema: z.ZodObject<{
|
|
300
547
|
providers: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -418,6 +665,82 @@ export declare const ModelsJsonSchema: z.ZodObject<{
|
|
|
418
665
|
modelDiscovery: z.ZodOptional<z.ZodObject<{
|
|
419
666
|
enabled: z.ZodBoolean;
|
|
420
667
|
}, z.core.$strict>>;
|
|
668
|
+
imageGeneration: z.ZodOptional<z.ZodObject<{
|
|
669
|
+
api: z.ZodLiteral<"openai-images">;
|
|
670
|
+
name: z.ZodString;
|
|
671
|
+
documentationUrl: z.ZodOptional<z.ZodString>;
|
|
672
|
+
apiKeyUrl: z.ZodOptional<z.ZodString>;
|
|
673
|
+
defaultModel: z.ZodString;
|
|
674
|
+
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
675
|
+
type: z.ZodLiteral<"bearer">;
|
|
676
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
677
|
+
type: z.ZodLiteral<"header">;
|
|
678
|
+
headerName: z.ZodString;
|
|
679
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
680
|
+
type: z.ZodLiteral<"none">;
|
|
681
|
+
}, z.core.$strict>], "type">;
|
|
682
|
+
paths: z.ZodOptional<z.ZodObject<{
|
|
683
|
+
generations: z.ZodOptional<z.ZodString>;
|
|
684
|
+
edits: z.ZodOptional<z.ZodString>;
|
|
685
|
+
}, z.core.$strict>>;
|
|
686
|
+
network: z.ZodOptional<z.ZodObject<{
|
|
687
|
+
allowedHosts: z.ZodArray<z.ZodString>;
|
|
688
|
+
}, z.core.$strict>>;
|
|
689
|
+
models: z.ZodArray<z.ZodObject<{
|
|
690
|
+
id: z.ZodString;
|
|
691
|
+
name: z.ZodOptional<z.ZodString>;
|
|
692
|
+
capabilities: z.ZodObject<{
|
|
693
|
+
generate: z.ZodOptional<z.ZodObject<{
|
|
694
|
+
maxCount: z.ZodOptional<z.ZodNumber>;
|
|
695
|
+
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
696
|
+
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
697
|
+
supportsResolution: z.ZodOptional<z.ZodBoolean>;
|
|
698
|
+
}, z.core.$strict>>;
|
|
699
|
+
edit: z.ZodOptional<z.ZodObject<{
|
|
700
|
+
enabled: z.ZodBoolean;
|
|
701
|
+
maxInputImages: z.ZodOptional<z.ZodNumber>;
|
|
702
|
+
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
703
|
+
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
704
|
+
}, z.core.$strict>>;
|
|
705
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
706
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
707
|
+
aspectRatios: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
708
|
+
resolutions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
709
|
+
"1K": "1K";
|
|
710
|
+
"2K": "2K";
|
|
711
|
+
"4K": "4K";
|
|
712
|
+
}>>>;
|
|
713
|
+
}, z.core.$strict>>;
|
|
714
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
715
|
+
qualities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
716
|
+
low: "low";
|
|
717
|
+
high: "high";
|
|
718
|
+
auto: "auto";
|
|
719
|
+
medium: "medium";
|
|
720
|
+
}>>>;
|
|
721
|
+
formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
722
|
+
png: "png";
|
|
723
|
+
jpeg: "jpeg";
|
|
724
|
+
webp: "webp";
|
|
725
|
+
}>>>;
|
|
726
|
+
backgrounds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
727
|
+
auto: "auto";
|
|
728
|
+
transparent: "transparent";
|
|
729
|
+
opaque: "opaque";
|
|
730
|
+
}>>>;
|
|
731
|
+
}, z.core.$strict>>;
|
|
732
|
+
}, z.core.$strict>;
|
|
733
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
734
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
735
|
+
size: z.ZodOptional<z.ZodString>;
|
|
736
|
+
outputFormat: z.ZodOptional<z.ZodEnum<{
|
|
737
|
+
png: "png";
|
|
738
|
+
jpeg: "jpeg";
|
|
739
|
+
webp: "webp";
|
|
740
|
+
}>>;
|
|
741
|
+
}, z.core.$strict>>;
|
|
742
|
+
}, z.core.$strict>>;
|
|
743
|
+
}, z.core.$strict>>;
|
|
421
744
|
}, z.core.$strip>>;
|
|
422
745
|
}, z.core.$strip>;
|
|
423
746
|
export type OpenRouterRouting = z.infer<typeof OpenRouterRoutingSchema>;
|
|
@@ -425,6 +748,8 @@ export type VercelGatewayRouting = z.infer<typeof VercelGatewayRoutingSchema>;
|
|
|
425
748
|
export type OpenAICompletionsCompat = z.infer<typeof OpenAICompletionsCompatSchema>;
|
|
426
749
|
export type OpenAIResponsesCompat = z.infer<typeof OpenAIResponsesCompatSchema>;
|
|
427
750
|
export type OpenAICompat = z.infer<typeof OpenAICompatSchema>;
|
|
751
|
+
export type ImageGenerationModelConfig = z.infer<typeof ImageGenerationModelSchema>;
|
|
752
|
+
export type ImageGenerationProviderConfig = z.infer<typeof ImageGenerationProviderSchema>;
|
|
428
753
|
export type CustomModel = z.infer<typeof CustomModelSchema>;
|
|
429
754
|
export type ModelOverride = z.infer<typeof ModelOverrideSchema>;
|
|
430
755
|
export type ProviderConfig = z.infer<typeof ProviderConfigSchema>;
|