dsh-metaontic-image 0.0.1 → 0.0.2

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.
@@ -35,8 +35,8 @@ interface ImageSettings {
35
35
  openaiCompatQualityOptions?: string[];
36
36
  openaiCompatExtraBody?: Record<string, unknown>;
37
37
  openaiCompatEditSizeMode?: 'auto' | 'selected';
38
- /** Edit-request shape for the openai-compat relay (#41); see src/config.ts. `modelscopeAsync` also switches generation to the async task flow (#140). */
39
- openaiCompatEditFormat?: 'multipart' | 'jsonImageUrlArray' | 'formReferenceImages' | 'siliconflowJson' | 'modelscopeAsync';
38
+ /** Edit-request shape for the openai-compat relay (#41); see src/config.ts. Async formats also switch generation to a task flow. */
39
+ openaiCompatEditFormat?: 'multipart' | 'jsonImageUrlArray' | 'formReferenceImages' | 'siliconflowJson' | 'modelscopeAsync' | 'newapiAsync';
40
40
  /** Extra JSON fields merged into the JSON edit body; ignored in multipart mode. */
41
41
  openaiCompatEditExtra?: Record<string, unknown>;
42
42
  seedreamBaseURL?: string;
@@ -108,5 +108,4 @@ type SettingsCardProps = PropsRuntime<'settings.plugins.tab'> & InjectFace<Setti
108
108
  export declare const inject: string[];
109
109
  /** Mount the settings card, generated-image card, and native conversation gallery view. */
110
110
  export declare function apply(ctx: Context): void;
111
- /** Edit each provider independently, pick an explicit default, and verify keys inline. */
112
111
  export declare function ImageGenerationSettingsCard(props: SettingsCardProps): import("react").JSX.Element;
@@ -9,16 +9,16 @@ export declare const DICT: {
9
9
  readonly settingsLoading: "正在加载图像生成设置,请稍候。";
10
10
  readonly settingsRemote: "当前连接不支持保存到宿主,请在 DSH 本机页面修改设置。";
11
11
  readonly settingsUnavailable: "宿主尚未提供图像生成设置,请检查插件是否已启用及其加载日志。";
12
- readonly settingsIncompatible: "当前加载的设置库不支持保存。请将插件所在环境的 @deepseek-ai/schemastery 更新到 3.18.4 或兼容的 3.x 版本,并重启 DSH。";
12
+ readonly settingsIncompatible: "当前加载的设置库不支持保存。请将插件所在环境的 @deepseek-ai/schemastery 更新到 3.19.0 或兼容的 3.x 版本,并重启 DSH。";
13
13
  readonly providerGoogle: "Google Gemini";
14
14
  readonly providerOpenAI: "OpenAI";
15
- readonly providerOpenAICompat: "OpenAI 兼容(中转站)";
15
+ readonly providerOpenAICompat: "MetaonticAI";
16
16
  readonly addCompatChannel: "新增 OpenAI 兼容渠道";
17
17
  readonly channelName: "渠道名称";
18
18
  readonly channelNameRequired: "请填写渠道名称。";
19
19
  readonly removeChannel: "删除渠道";
20
20
  readonly removeChannelConfirm: "确定删除“{label}”吗?该渠道的配置将被移除。";
21
- readonly providerSeedream: "字节 Seedream";
21
+ readonly providerSeedream: "火山引擎";
22
22
  readonly providerDashScope: "阿里 DashScope (通义万相 / Qwen)";
23
23
  readonly providerXAI: "xAI Grok Imagine";
24
24
  readonly providerZhipu: "智谱 GLM-Image";
@@ -93,6 +93,8 @@ export declare const DICT: {
93
93
  readonly editFormatJsonImageUrlArray: "JSON images 数组(商汤等中转)";
94
94
  readonly editFormatFormReferenceImages: "multipart + reference_images JSON 数组(base64)";
95
95
  readonly editFormatModelScopeHint: "魔搭 ModelScope 官方地址,已自动识别:文生图和图生图都要等魔搭排队出图,最长约 5 分钟。";
96
+ readonly editFormatNewApiAsync: "New API 异步任务(MetaonticAI / Seedream)";
97
+ readonly editFormatNewApiHint: "MetaonticAI 地址已自动识别:文生图和图生图都提交 /tasks/doubao,再轮询任务并读取图片产物;单张最长约 15 分钟。";
96
98
  readonly editFormatHint: "商汤、通义、硅基流动已确认的官方接口自动使用对应 JSON 格式;其他中转按接口文档选择。文生图不受影响。";
97
99
  readonly editExtra: "附加 JSON 字段";
98
100
  readonly editExtraPlaceholder: "{\"watermark\": false, \"prompt_extend\": true}";
@@ -128,6 +130,7 @@ export declare const DICT: {
128
130
  readonly endpointHintComfyUI: "正在运行且 DSH Host 可以访问的 ComfyUI 地址,默认使用本机 8188 端口。";
129
131
  readonly model: "模型";
130
132
  readonly defaultModel: "默认模型";
133
+ readonly modelRequired: "请选择或填写生图模型。";
131
134
  readonly availableModels: "工作台可选模型";
132
135
  readonly availableModelsHint: "勾选后可在工作台切换。手动输入的默认模型会自动加入列表,且不可移除。";
133
136
  readonly defaultModelTag: "默认";
@@ -161,6 +164,7 @@ export declare const DICT: {
161
164
  readonly getTldrawLicense: "获取许可证 ↗";
162
165
  readonly fetchModels: "拉取模型";
163
166
  readonly fetchingModels: "拉取中…";
167
+ readonly selectMetaonticModel: "拉取后选择生图模型,或手动输入模型 ID";
164
168
  readonly fetchModelsHint: "点击「拉取模型」用当前 Key 获取可用生图模型列表;也可手动输入。";
165
169
  readonly modelsFound: "找到 {n} 个生图模型,点击模型框选择";
166
170
  readonly modelsNone: "未筛出生图模型,可手动输入模型名";
@@ -205,16 +209,16 @@ export declare const DICT: {
205
209
  readonly settingsLoading: "Settings are loading; please wait.";
206
210
  readonly settingsRemote: "This connection cannot save settings to the host. Edit them from the local DSH page.";
207
211
  readonly settingsUnavailable: "The host has not provided image generation settings. Check that the plugin is enabled and review its load logs.";
208
- readonly settingsIncompatible: "The loaded settings library cannot save these settings. Update @deepseek-ai/schemastery in the plugin environment to 3.18.4 or a compatible 3.x version, then restart DSH.";
212
+ readonly settingsIncompatible: "The loaded settings library cannot save these settings. Update @deepseek-ai/schemastery in the plugin environment to 3.19.0 or a compatible 3.x version, then restart DSH.";
209
213
  readonly providerGoogle: "Google Gemini";
210
214
  readonly providerOpenAI: "OpenAI";
211
- readonly providerOpenAICompat: "OpenAI Compatible (relay)";
215
+ readonly providerOpenAICompat: "MetaonticAI";
212
216
  readonly addCompatChannel: "Add OpenAI-compatible channel";
213
217
  readonly channelName: "Channel name";
214
218
  readonly channelNameRequired: "Enter a channel name.";
215
219
  readonly removeChannel: "Remove channel";
216
220
  readonly removeChannelConfirm: "Remove \"{label}\"? Its channel configuration will be deleted.";
217
- readonly providerSeedream: "ByteDance Seedream";
221
+ readonly providerSeedream: "Volcengine";
218
222
  readonly providerDashScope: "Aliyun DashScope (Wanx / Qwen)";
219
223
  readonly providerXAI: "xAI Grok Imagine";
220
224
  readonly providerZhipu: "Zhipu GLM-Image";
@@ -289,6 +293,8 @@ export declare const DICT: {
289
293
  readonly editFormatJsonImageUrlArray: "JSON images array (SenseNova etc.)";
290
294
  readonly editFormatFormReferenceImages: "Multipart with a reference_images JSON array (base64)";
291
295
  readonly editFormatModelScopeHint: "ModelScope official address, detected automatically: generation and editing wait for ModelScope to finish the job, up to about 5 minutes.";
296
+ readonly editFormatNewApiAsync: "New API async task (MetaonticAI / Seedream)";
297
+ readonly editFormatNewApiHint: "The MetaonticAI endpoint is detected automatically: generation and editing submit to /tasks/doubao, poll the task, then read its image artifacts. A single request may take up to 15 minutes.";
292
298
  readonly editFormatHint: "Recognized official SenseNova, Qwen and SiliconFlow endpoints automatically use their JSON edit contracts. Choose other relay formats according to their documentation. Text-to-image is unaffected.";
293
299
  readonly editExtra: "Extra JSON fields";
294
300
  readonly editExtraPlaceholder: "{\"watermark\": false, \"prompt_extend\": true}";
@@ -324,6 +330,7 @@ export declare const DICT: {
324
330
  readonly endpointHintComfyUI: "A running ComfyUI server reachable by the DSH Host; the default points to port 8188 on this computer.";
325
331
  readonly model: "Model";
326
332
  readonly defaultModel: "Default model";
333
+ readonly modelRequired: "Select or enter an image model.";
327
334
  readonly availableModels: "Models available in Studio";
328
335
  readonly availableModelsHint: "Selected models can be switched in Studio. A manually entered default is added automatically and cannot be removed.";
329
336
  readonly defaultModelTag: "Default";
@@ -357,6 +364,7 @@ export declare const DICT: {
357
364
  readonly getTldrawLicense: "Get a license ↗";
358
365
  readonly fetchModels: "Fetch models";
359
366
  readonly fetchingModels: "Fetching…";
367
+ readonly selectMetaonticModel: "Fetch and select an image model, or enter its ID";
360
368
  readonly fetchModelsHint: "Click \"Fetch models\" to list image-capable models with the stored key; manual input still works.";
361
369
  readonly modelsFound: "{n} image models found; open the model field to pick one";
362
370
  readonly modelsNone: "No image models found; type the model name manually";
@@ -1,8 +1,8 @@
1
1
  /** User-facing configuration for supported image providers. */
2
2
  import z from '@deepseek-ai/schemastery';
3
3
  import type { CompatEditFormat } from './openai-compatible.js';
4
- import { ARK_BACKGROUND_MODES, ARK_OUTPUT_FORMATS, DEFAULT_CLOUD_TIMEOUT_MS, DEFAULT_DASHSCOPE_ENDPOINT, DEFAULT_DASHSCOPE_MODEL, DEFAULT_COMFYUI_BASE_URL, DEFAULT_COMFYUI_TIMEOUT_MS, DEFAULT_COMFYUI_WORKFLOW_LABEL, DEFAULT_GOOGLE_ENDPOINT, DEFAULT_GOOGLE_MODEL, DEFAULT_OPENAI_BASE_URL, DEFAULT_OPENAI_MODEL, DEFAULT_SEEDREAM_BASE_URL, DEFAULT_SEEDREAM_MODEL, DEFAULT_XAI_BASE_URL, DEFAULT_XAI_MODEL, DEFAULT_ZHIPU_BASE_URL, DEFAULT_ZHIPU_MODEL, DASHSCOPE_API_KEY_ENV, GOOGLE_API_KEY_ENV, IMAGE_PROVIDERS, OPENAI_API_KEY_ENV, OPENAI_COMPAT_API_KEY_ENV, SEEDREAM_API_KEY_ENV, XAI_API_KEY_ENV, ZHIPU_API_KEY_ENV, activeComfyUIWorkflow, resolveComfyUIWorkflows, type OpenAICompatChannel, type ArkBackgroundMode, type ArkOutputFormat, type ArkOutputOptions, type ComfyUIWorkflowEntry, type ImageProvider } from './shared.js';
5
- export { ARK_BACKGROUND_MODES, ARK_OUTPUT_FORMATS, DEFAULT_CLOUD_TIMEOUT_MS, DEFAULT_DASHSCOPE_ENDPOINT, DEFAULT_DASHSCOPE_MODEL, DEFAULT_COMFYUI_BASE_URL, DEFAULT_COMFYUI_TIMEOUT_MS, DEFAULT_COMFYUI_WORKFLOW_LABEL, DEFAULT_GOOGLE_ENDPOINT, DEFAULT_GOOGLE_MODEL, DEFAULT_OPENAI_BASE_URL, DEFAULT_OPENAI_MODEL, DEFAULT_SEEDREAM_BASE_URL, DEFAULT_SEEDREAM_MODEL, DEFAULT_XAI_BASE_URL, DEFAULT_XAI_MODEL, DEFAULT_ZHIPU_BASE_URL, DEFAULT_ZHIPU_MODEL, DASHSCOPE_API_KEY_ENV, GOOGLE_API_KEY_ENV, IMAGE_PROVIDERS, OPENAI_API_KEY_ENV, OPENAI_COMPAT_API_KEY_ENV, SEEDREAM_API_KEY_ENV, XAI_API_KEY_ENV, ZHIPU_API_KEY_ENV, activeComfyUIWorkflow, resolveComfyUIWorkflows, type ArkBackgroundMode, type ArkOutputFormat, type ArkOutputOptions, type ComfyUIWorkflowEntry, type ImageProvider, };
4
+ import { ARK_BACKGROUND_MODES, ARK_OUTPUT_FORMATS, DEFAULT_CLOUD_TIMEOUT_MS, DEFAULT_DASHSCOPE_ENDPOINT, DEFAULT_DASHSCOPE_MODEL, DEFAULT_COMFYUI_BASE_URL, DEFAULT_COMFYUI_TIMEOUT_MS, DEFAULT_COMFYUI_WORKFLOW_LABEL, DEFAULT_GOOGLE_ENDPOINT, DEFAULT_GOOGLE_MODEL, DEFAULT_OPENAI_BASE_URL, DEFAULT_OPENAI_MODEL, DEFAULT_SEEDREAM_BASE_URL, DEFAULT_SEEDREAM_MODEL, DEFAULT_XAI_BASE_URL, DEFAULT_XAI_MODEL, DEFAULT_ZHIPU_BASE_URL, DEFAULT_ZHIPU_MODEL, DASHSCOPE_API_KEY_ENV, GOOGLE_API_KEY_ENV, IMAGE_PROVIDERS, isSelectableImageProvider, SELECTABLE_IMAGE_PROVIDERS, METAONTIC_AI_BASE_URL, OPENAI_API_KEY_ENV, OPENAI_COMPAT_API_KEY_ENV, SEEDREAM_API_KEY_ENV, XAI_API_KEY_ENV, ZHIPU_API_KEY_ENV, activeComfyUIWorkflow, resolveComfyUIWorkflows, type OpenAICompatChannel, type ArkBackgroundMode, type ArkOutputFormat, type ArkOutputOptions, type ComfyUIWorkflowEntry, type ImageProvider } from './shared.js';
5
+ export { ARK_BACKGROUND_MODES, ARK_OUTPUT_FORMATS, DEFAULT_CLOUD_TIMEOUT_MS, DEFAULT_DASHSCOPE_ENDPOINT, DEFAULT_DASHSCOPE_MODEL, DEFAULT_COMFYUI_BASE_URL, DEFAULT_COMFYUI_TIMEOUT_MS, DEFAULT_COMFYUI_WORKFLOW_LABEL, DEFAULT_GOOGLE_ENDPOINT, DEFAULT_GOOGLE_MODEL, DEFAULT_OPENAI_BASE_URL, DEFAULT_OPENAI_MODEL, DEFAULT_SEEDREAM_BASE_URL, DEFAULT_SEEDREAM_MODEL, DEFAULT_XAI_BASE_URL, DEFAULT_XAI_MODEL, DEFAULT_ZHIPU_BASE_URL, DEFAULT_ZHIPU_MODEL, DASHSCOPE_API_KEY_ENV, GOOGLE_API_KEY_ENV, IMAGE_PROVIDERS, isSelectableImageProvider, SELECTABLE_IMAGE_PROVIDERS, METAONTIC_AI_BASE_URL, OPENAI_API_KEY_ENV, OPENAI_COMPAT_API_KEY_ENV, SEEDREAM_API_KEY_ENV, XAI_API_KEY_ENV, ZHIPU_API_KEY_ENV, activeComfyUIWorkflow, resolveComfyUIWorkflows, type ArkBackgroundMode, type ArkOutputFormat, type ArkOutputOptions, type ComfyUIWorkflowEntry, type ImageProvider, };
6
6
  /** Default workspace subfolder that receives generated image files. */
7
7
  export declare const DEFAULT_WORKSPACE_FOLDER = "dsh-metaontic-image";
8
8
  /** Google tool-level controls. Aligned with gemini-3.1-flash-image's common set. */
@@ -12,6 +12,7 @@ export type AspectRatio = typeof ASPECT_RATIOS[number];
12
12
  export type ImageSize = typeof IMAGE_SIZES[number];
13
13
  /** Bundle configuration from the profile patch and the Web settings page. */
14
14
  export interface Config {
15
+ desktopDriversOnly?: true;
15
16
  /** Opt in to public HTTPS:443 result downloads with pinned DNS and no redirects. */
16
17
  strictImageDownloads?: boolean;
17
18
  /** Refuse web requests when the host connection admission service is absent. */
@@ -56,7 +57,7 @@ export interface Config {
56
57
  * `/v1/tasks/{task_id}` — that format also switches generation itself to
57
58
  * the async task flow. Defaults to `multipart`.
58
59
  */
59
- openaiCompatEditFormat?: 'multipart' | 'jsonImageUrlArray' | 'formReferenceImages' | 'siliconflowJson' | 'modelscopeAsync';
60
+ openaiCompatEditFormat?: 'multipart' | 'jsonImageUrlArray' | 'formReferenceImages' | 'siliconflowJson' | 'modelscopeAsync' | 'newapiAsync';
60
61
  /**
61
62
  * Extra JSON fields merged into the JSON edit body last (can override the
62
63
  * built-in defaults), e.g. SenseNova's `watermark`/`prompt_extend`.
@@ -211,13 +212,8 @@ export declare function withOpenAICompatChannel(config: Config, channelId?: stri
211
212
  * `model` is ignored for ComfyUI, whose per-call equivalent is `workflow`.
212
213
  */
213
214
  export declare function withProviderOverrides(config: Config, provider?: ImageProvider, model?: string, mode?: 'generate' | 'edit'): Config;
214
- /**
215
- * One-time migration: when the legacy single OpenAI slot points at a relay
216
- * (non-official base URL) and the compat row is empty, move the relay config
217
- * to the compat row so both can coexist. Returns the input untouched when
218
- * nothing needs moving.
219
- */
220
- export declare function migrateOpenAICompatConfig(config: Config): Config;
215
+ /** Apply the two-driver defaults used by this plugin. */
216
+ export declare function resolveDesktopDriverConfig(config: Config): Config;
221
217
  /** Host part of a URL, or null when it cannot be parsed. */
222
218
  export declare function hostOf(raw: string): string | null;
223
219
  /** The workflow a ComfyUI call runs: the requested name when given, else the active one. */
@@ -34,6 +34,16 @@ export interface CompatibleReferenceImage {
34
34
  data: Uint8Array;
35
35
  mediaType: ImageMediaType;
36
36
  }
37
+ /** Optional controls for the New API task transport used by MetaonticAI. */
38
+ export interface NewApiAsyncTaskOptions {
39
+ /** Submission route segment, `/tasks/{platform}`. Defaults to `doubao`. */
40
+ platform?: string;
41
+ /**
42
+ * Seedream rejects images below 3,686,400 pixels. The task transport scales
43
+ * a WIDTHxHEIGHT request up to this floor before submitting.
44
+ */
45
+ minPixels?: number;
46
+ }
37
47
  export declare function generateOpenAICompatibleImage(input: {
38
48
  provider: 'openai' | 'openai-compat' | 'seedream' | 'xai' | 'zhipu';
39
49
  apiKey: string;
@@ -63,13 +73,21 @@ export declare function generateOpenAICompatibleImage(input: {
63
73
  * edit format, so every other relay keeps today's request shape untouched.
64
74
  */
65
75
  asyncImages?: boolean;
76
+ /**
77
+ * New API relay task mode: submit `POST /tasks/{platform}`, poll
78
+ * `GET /tasks/{id}`, then read `GET /tasks/{id}/artifacts`. Used by the
79
+ * MetaonticAI Seedream channels that do not expose a synchronous image API.
80
+ */
81
+ newApiTask?: NewApiAsyncTaskOptions;
66
82
  }): Promise<GeneratedCompatibleImage>;
67
83
  /**
68
84
  * How the edits endpoint expects its request body (#41). `modelscopeAsync`
69
85
  * additionally switches generation itself to ModelScope's async task flow
70
86
  * (#140): submit → poll `/v1/tasks/{id}` → download `output_images`.
87
+ * `newapiAsync` selects the New API relay task flow: submit `/tasks/{platform}`
88
+ * → poll `/tasks/{id}` → download the first image artifact's `content_url`.
71
89
  */
72
- export type CompatEditFormat = 'multipart' | 'jsonImageUrlArray' | 'formReferenceImages' | 'siliconflowJson' | 'xaiJson' | 'qwenJson' | 'modelscopeAsync';
90
+ export type CompatEditFormat = 'multipart' | 'jsonImageUrlArray' | 'formReferenceImages' | 'siliconflowJson' | 'xaiJson' | 'qwenJson' | 'modelscopeAsync' | 'newapiAsync';
73
91
  export declare function editOpenAICompatibleImage(input: {
74
92
  apiKey: string;
75
93
  baseURL: string;
@@ -110,7 +128,21 @@ export declare function editOpenAICompatibleImage(input: {
110
128
  * aspect_ratio/resolution pair.
111
129
  */
112
130
  extraBody?: Readonly<Record<string, unknown>>;
131
+ /** Optional controls for the New API task transport when `editFormat` is `newapiAsync`. */
132
+ newApiTask?: NewApiAsyncTaskOptions;
113
133
  }): Promise<GeneratedCompatibleImage>;
134
+ /** New API relay task defaults, matching the Seedream calling chain in videoflow-ai. */
135
+ export declare const NEWAPI_DEFAULT_TASK_PLATFORM = "doubao";
136
+ export declare const NEWAPI_MIN_IMAGE_PIXELS = 3686400;
137
+ /**
138
+ * Scale a WIDTHxHEIGHT request up to Seedream's pixel floor. Videoflow-ai
139
+ * found that Seedream 5.0 rejects anything below 3,686,400 pixels with a 400
140
+ * InvalidParameter; it also needs even dimensions and a 4096 px longest edge.
141
+ * Non-pixel size tiers are passed through unchanged.
142
+ */
143
+ export declare function fitNewApiImageSize(size: string | undefined, minPixels?: number): string | undefined;
144
+ /** First image artifact from `GET /tasks/{id}/artifacts`, skipping video/audio entries. */
145
+ export declare function parseNewApiArtifacts(payload: unknown): string | undefined;
114
146
  /**
115
147
  * Models that fill every field keep retrying a GIF or SVG the upstream already
116
148
  * refused (#160); tell them plainly how to get the still image instead.
@@ -154,6 +154,9 @@ export declare const IMAGE_GENERATION_ENTRY_ID = "image-gen";
154
154
  /** Supported providers. */
155
155
  export declare const IMAGE_PROVIDERS: readonly ["google", "openai", "openai-compat", "seedream", "dashscope", "xai", "zhipu", "comfyui", "chatgpt-sub", "grok-sub", "google-sub"];
156
156
  export type ImageProvider = typeof IMAGE_PROVIDERS[number];
157
+ export declare const METAONTIC_AI_BASE_URL = "https://ai.bileego.com/v1";
158
+ export declare const SELECTABLE_IMAGE_PROVIDERS: readonly ["openai-compat", "seedream"];
159
+ export declare function isSelectableImageProvider(provider: ImageProvider | undefined): provider is typeof SELECTABLE_IMAGE_PROVIDERS[number];
157
160
  /**
158
161
  * Providers that generate through a logged-in subscription account instead
159
162
  * of an API key. They use no credential reference and never join the
@@ -172,6 +175,9 @@ export declare function resolveOpenAICompatModels(config: {
172
175
  openaiCompatModels?: readonly string[];
173
176
  }): string[];
174
177
  export declare const DEFAULT_OPENAI_COMPAT_CHANNEL_ID = "default";
178
+ /** Request formats that run through an async task endpoint instead of one synchronous response. */
179
+ export type OpenAICompatAsyncEditFormat = 'modelscopeAsync' | 'newapiAsync';
180
+ export declare function isAsyncImageEditFormat(format: string | undefined): format is OpenAICompatAsyncEditFormat;
175
181
  export interface OpenAICompatChannel {
176
182
  id: string;
177
183
  label: string;
@@ -185,8 +191,11 @@ export interface OpenAICompatChannel {
185
191
  qualityOptions?: string[];
186
192
  extraBody?: Record<string, unknown>;
187
193
  editSizeMode?: 'auto' | 'selected';
188
- /** `modelscopeAsync` also switches generation to the async task flow (#140). */
189
- editFormat?: 'multipart' | 'jsonImageUrlArray' | 'formReferenceImages' | 'siliconflowJson' | 'modelscopeAsync';
194
+ /**
195
+ * `modelscopeAsync` and `newapiAsync` also switch generation to their async
196
+ * task flow; the other formats only describe the edit request.
197
+ */
198
+ editFormat?: 'multipart' | 'jsonImageUrlArray' | 'formReferenceImages' | 'siliconflowJson' | 'modelscopeAsync' | 'newapiAsync';
190
199
  editExtra?: Record<string, unknown>;
191
200
  sizes?: Record<string, Record<string, string>>;
192
201
  }
@@ -201,7 +210,7 @@ export interface OpenAICompatChannelSource {
201
210
  openaiCompatQualityOptions?: readonly string[];
202
211
  openaiCompatExtraBody?: Record<string, unknown>;
203
212
  openaiCompatEditSizeMode?: 'auto' | 'selected';
204
- openaiCompatEditFormat?: 'multipart' | 'jsonImageUrlArray' | 'formReferenceImages' | 'siliconflowJson' | 'modelscopeAsync';
213
+ openaiCompatEditFormat?: 'multipart' | 'jsonImageUrlArray' | 'formReferenceImages' | 'siliconflowJson' | 'modelscopeAsync' | 'newapiAsync';
205
214
  openaiCompatEditExtra?: Record<string, unknown>;
206
215
  openaiCompatSizes?: Record<string, Record<string, string>>;
207
216
  openaiCompatChannels?: readonly OpenAICompatChannel[];
@@ -251,7 +260,7 @@ export declare const OPENAI_API_KEY_ENV = "OPENAI_API_KEY";
251
260
  * OPENAI_API_KEY so an official key and a relay key can coexist without
252
261
  * overwriting each other.
253
262
  */
254
- export declare const OPENAI_COMPAT_API_KEY_ENV = "DSH_IMAGE_GEN_OPENAI_COMPAT_KEY";
263
+ export declare const OPENAI_COMPAT_API_KEY_ENV = "DSH_METAONTIC_AI_API_KEY";
255
264
  /** Volcengine Ark credential reference. */
256
265
  export declare const SEEDREAM_API_KEY_ENV = "ARK_API_KEY";
257
266
  /** DashScope credential reference. */
@@ -457,7 +466,18 @@ export declare function seedreamGeneratesTransparent(model: string): boolean;
457
466
  /** Default model names. */
458
467
  export declare const DEFAULT_GOOGLE_MODEL = "gemini-3.1-flash-image";
459
468
  export declare const DEFAULT_OPENAI_MODEL = "gpt-image-2.6-flare";
460
- export declare const DEFAULT_SEEDREAM_MODEL = "doubao-seedream-5-0-pro-260628";
469
+ /** Seedream models exposed by the plugin's Volcengine driver. */
470
+ export declare const SEEDREAM_MODEL_OPTIONS: readonly [{
471
+ readonly value: "doubao-seedream-5-0-pro-260628";
472
+ readonly label: "Seedream 5.0 Pro";
473
+ }, {
474
+ readonly value: "doubao-seedream-5-5-261028";
475
+ readonly label: "Seedream 5.5";
476
+ }];
477
+ export declare const SEEDREAM_MODELS: ("doubao-seedream-5-0-pro-260628" | "doubao-seedream-5-5-261028")[];
478
+ export declare const DEFAULT_SEEDREAM_MODEL: "doubao-seedream-5-0-pro-260628";
479
+ /** Seedream choices for pickers; keep a saved custom endpoint id selectable too. */
480
+ export declare function seedreamModelOptions(current?: string): StudioOption[];
461
481
  /** The Seedream model a request should use: a retired one is replaced, anything else is kept. */
462
482
  export declare function currentSeedreamModel(model: string | undefined): string;
463
483
  export declare const DEFAULT_DASHSCOPE_MODEL = "qwen-image-3.0";
@@ -2,6 +2,7 @@
2
2
  import type { IncomingMessage, ServerResponse } from 'node:http';
3
3
  import { type StudioConfigResponse, type StudioGenerateRequest, type StudioGenerateResponse } from './shared.js';
4
4
  export interface StudioRouteDeps {
5
+ accepts?(input: StudioGenerateRequest): boolean;
5
6
  describe(): Promise<StudioConfigResponse>;
6
7
  generate(input: StudioGenerateRequest, signal: AbortSignal): Promise<StudioGenerateResponse>;
7
8
  maxBodyBytes: number;
@@ -60,7 +60,7 @@ export declare function chatToolSize(input: {
60
60
  }): string | undefined;
61
61
  /** Return only browser-safe capability data. */
62
62
  export declare function describeStudio(ctx: Context, config: Config, subscriptions?: SubscriptionManager | undefined): Promise<StudioConfigResponse>;
63
- /** A channel on ModelScope's async task flow (#140) polls for minutes, so it gets the long timeout like a GIF. */
63
+ /** A channel on an async task flow (ModelScope or New API) polls for minutes, so it gets the long timeout like a GIF. */
64
64
  export declare function channelPollsTask(config: Config, input: Pick<StudioGenerateRequest, 'provider' | 'channel'>): boolean;
65
65
  /** A generation on an OpenAI-compatible channel whose extras select GIF is a GIF request even when it carries no `output`. */
66
66
  export declare function channelSelectsGif(config: Config, input: Pick<StudioGenerateRequest, 'provider' | 'mode' | 'channel'>): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-metaontic-image",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "MetaOntic Image adds image generation and editing to DeepSeek Harness with cloud providers and local ComfyUI.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -43,6 +43,7 @@
43
43
  "@deepseek-ai/dsh-client-ui-conversation",
44
44
  "@deepseek-ai/dsh-client-ui-settings",
45
45
  "@deepseek-ai/dsh-client-ui-settings-plugins",
46
+ "@deepseek-ai/dsh-client-ui-plugin-manager",
46
47
  "@deepseek-ai/dsh-client-ui-sidebar-right",
47
48
  "@deepseek-ai/dsh-client-ui-tool",
48
49
  "@deepseek-ai/dsh-client-locale"
@@ -50,8 +51,17 @@
50
51
  "platform": "web"
51
52
  }
52
53
  },
54
+ "scripts": {
55
+ "typecheck": "tsc --noEmit",
56
+ "build": "node scripts/clean-lib.mjs && tsc && tsdown",
57
+ "prepare": "npm run build",
58
+ "test": "vitest run",
59
+ "test:package": "node scripts/check-package.mjs",
60
+ "pack:check": "npm pack --dry-run"
61
+ },
53
62
  "engines": {
54
- "node": "^22.19.0 || >=24.0.0"
63
+ "node": "^22.19.0 || >=24.0.0",
64
+ "dsh": ">=0.2.2-rc.5 <0.3.0"
55
65
  },
56
66
  "license": "MIT",
57
67
  "keywords": [
@@ -77,8 +87,8 @@
77
87
  "cordis"
78
88
  ],
79
89
  "peerDependencies": {
80
- "@deepseek-ai/cordis": ">=4.0.0 <5",
81
- "@deepseek-ai/schemastery": ">=3.18.4 <4",
90
+ "@deepseek-ai/cordis": ">=4.1.0 <5",
91
+ "@deepseek-ai/schemastery": ">=3.19.0 <4",
82
92
  "react": ">=18.2.0 <19"
83
93
  },
84
94
  "peerDependenciesMeta": {
@@ -93,25 +103,26 @@
93
103
  }
94
104
  },
95
105
  "devDependencies": {
96
- "@deepseek-ai/cordis": "4.0.4",
97
- "@deepseek-ai/dsh-agent": "0.1.7-rc.2",
98
- "@deepseek-ai/dsh-api-remotes": "0.1.7-rc.2",
99
- "@deepseek-ai/dsh-attachment": "0.1.7-rc.2",
100
- "@deepseek-ai/dsh-client-connection": "0.1.7-rc.2",
101
- "@deepseek-ai/dsh-client-ui-conversation": "0.1.7-rc.2",
102
- "@deepseek-ai/dsh-client-ui-settings": "0.1.7-rc.2",
103
- "@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.7-rc.2",
104
- "@deepseek-ai/dsh-client-ui-sidebar-right": "0.1.7-rc.2",
105
- "@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2",
106
- "@deepseek-ai/dsh-client-ui-tool": "0.1.7-rc.2",
107
- "@deepseek-ai/dsh-credentials": "0.1.7-rc.2",
108
- "@deepseek-ai/dsh-host-webserver": "0.1.7-rc.2",
109
- "@deepseek-ai/dsh-llm": "0.1.7-rc.2",
110
- "@deepseek-ai/dsh-session": "0.1.7-rc.2",
111
- "@deepseek-ai/dsh-settings": "0.1.7-rc.2",
112
- "@deepseek-ai/dsh-tools": "0.1.7-rc.2",
113
- "@deepseek-ai/dsh-workspace": "0.1.7-rc.2",
114
- "@deepseek-ai/schemastery": "3.18.4",
106
+ "@deepseek-ai/cordis": "4.1.0",
107
+ "@deepseek-ai/dsh-agent": "0.2.2-rc.5",
108
+ "@deepseek-ai/dsh-api-remotes": "0.2.2-rc.5",
109
+ "@deepseek-ai/dsh-attachment": "0.2.2-rc.5",
110
+ "@deepseek-ai/dsh-client-connection": "0.2.2-rc.5",
111
+ "@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.5",
112
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.5",
113
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.5",
114
+ "@deepseek-ai/dsh-client-ui-settings-plugins": "0.2.2-rc.5",
115
+ "@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.2-rc.5",
116
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.5",
117
+ "@deepseek-ai/dsh-client-ui-tool": "0.2.2-rc.5",
118
+ "@deepseek-ai/dsh-credentials": "0.2.2-rc.5",
119
+ "@deepseek-ai/dsh-host-webserver": "0.2.2-rc.5",
120
+ "@deepseek-ai/dsh-llm": "0.2.2-rc.5",
121
+ "@deepseek-ai/dsh-session": "0.2.2-rc.5",
122
+ "@deepseek-ai/dsh-settings": "0.2.2-rc.5",
123
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.5",
124
+ "@deepseek-ai/dsh-workspace": "0.2.2-rc.5",
125
+ "@deepseek-ai/schemastery": "3.19.0",
115
126
  "@types/node": "^22.20.0",
116
127
  "@types/react": "~18.3.1",
117
128
  "lucide-react": "^1.38.0",
@@ -123,11 +134,5 @@
123
134
  "unrun": "^0.3.1",
124
135
  "vitest": "^4.1.8"
125
136
  },
126
- "scripts": {
127
- "typecheck": "tsc --noEmit",
128
- "build": "node scripts/clean-lib.mjs && tsc && tsdown",
129
- "test": "vitest run",
130
- "test:package": "node scripts/check-package.mjs",
131
- "pack:check": "pnpm pack --dry-run"
132
- }
133
- }
137
+ "packageManager": "pnpm@11.7.0"
138
+ }
@@ -1,22 +1,26 @@
1
1
  ---
2
2
  name: install-dsh-metaontic-image
3
- description: Install, configure, verify, or remove the dsh-metaontic-image Bundle in a DeepSeek Harness Web profile. Use when a user wants Google, OpenAI-compatible relay, Seedream, DashScope, or local ComfyUI image generation in DSH, cannot find the Image generation settings card, or needs help testing generate_image.
3
+ description: Install, configure, verify, or remove the dsh-metaontic-image Bundle in the DSH desktop app. Use when a user wants OpenAI-compatible relay, Seedream, or local ComfyUI image generation in DSH Desktop, cannot find the Image generation settings card, or needs help testing generate_image.
4
4
  ---
5
5
 
6
6
  # Install DSH MetaOntic Image
7
7
 
8
- 1. Confirm `dsh` runs and record `dsh --version`.
9
- 2. Ask which Web profile to change if the user did not name one. Default to `web` only when that profile already exists.
10
- 3. Install the pinned package or repository spec the user provides:
8
+ DSH Desktop loads the same Web UI client as the browser app. The plugin therefore keeps `dsh.client.platform: "web"`; this is not a browser-only plugin. Desktop support is declared through `engines.dsh` and the DSH 0.2.2 client package set.
9
+
10
+ 1. Confirm the desktop app's DSH runtime is `>=0.2.2-rc.5 <0.3.0` and record its version. Do not pass `--profile desktop` to `dsh --dump-config`; the Electron app owns that profile.
11
+ 2. Install into the desktop profile unless the user names another profile:
11
12
 
12
13
  ```sh
13
- dsh plugin --profile <profile> add <package-or-git-spec>
14
+ dsh plugin --profile desktop add <package-tgz-or-package-spec>
14
15
  ```
15
16
 
16
- 4. If pnpm blocks the Git dependency's `prepare` script, explain that the allowance executes repository code during installation. Add only the exact package key pnpm reports to the profile's `pnpm-workspace.yaml`, then retry after the user approves.
17
- 5. Verify `dsh --profile <profile> --dump-config` contains the `dsh-metaontic-image` layer and `image-gen` row.
18
- 6. Start the profile. If port 3080 is already in use, identify the existing DSH process before stopping anything.
19
- 7. Open the Plugins panel from the left sidebar, click dsh-metaontic-image under Installed, and configure Providers on the plugin's detail page (DSH 0.1.5 and earlier: Settings > Plugins > Plugin Configuration > Image generation). Select a cloud Provider and save its API key, or select Local ComfyUI, enter its URL, and import a ComfyUI API Format workflow JSON containing `{{prompt}}`. Never print, read back, or commit a key.
20
- 8. Test with “生成一张戴墨镜的赛博朋克猫图片”. Confirm one `generate_image` call succeeds and its image renders in the conversation.
17
+ 3. If pnpm blocks the dependency's `prepare` script, explain that the allowance executes repository code during installation. Add only the exact package key pnpm reports to the desktop profile's `pnpm-workspace.yaml`, then retry after the user approves.
18
+ 4. Restart the desktop app. Removing and reinstalling a profile bundle does not hot-reload an open window.
19
+ 5. Open the Plugins panel from the left sidebar, click `dsh-metaontic-image` under Installed, and configure the image providers on the bundle page. Never print, read back, or commit a key.
20
+ 6. The shipped configuration has two primary drivers:
21
+ - `MetaonticAI`: OpenAI-compatible relay at `https://ai.bileego.com/v1`; set its API key.
22
+ - `Seedream`: Volcengine Ark; choose `doubao-seedream-5-0-pro-260628` or `doubao-seedream-5-5-261028`. Both expose `1K`, `1.5K`, and `2K`; only 5.5 accepts transparent text-to-image output.
23
+ - Local ComfyUI remains available when selected: enter its URL and import an API-format workflow JSON containing `{{prompt}}`.
24
+ 7. Test with “生成一张戴墨镜的赛博朋克猫图片”. Confirm one `generate_image` call succeeds and its image renders in the conversation.
21
25
 
22
- For removal, run `dsh plugin --profile <profile> remove dsh-metaontic-image`. Do not delete the user's credentials unless they explicitly request it.
26
+ For removal, run `dsh plugin --profile desktop remove dsh-metaontic-image` and restart the app. Do not delete the user's credentials unless they explicitly request it.