dsh-image-gen 0.7.0 → 0.8.0

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.
@@ -2,6 +2,30 @@ import type { Context } from '@deepseek-ai/cordis';
2
2
  import { type Config } from './config.js';
3
3
  import { type SubscriptionManager } from './subscription.js';
4
4
  import { type CloudImageProvider, type StudioConfigResponse, type StudioGenerateRequest, type StudioGenerateResponse, type StudioProviderProfile } from './shared.js';
5
+ /**
6
+ * Normalize the configured relay table: drop empty strings and invalid tier
7
+ * ranks so one typo cannot take the whole workbench down.
8
+ * @param config - plugin configuration carrying `openaiCompatSizes`.
9
+ */
10
+ export declare function openAICompatTable(config: Config): Array<{
11
+ ratio: string;
12
+ tiers: Array<{
13
+ tier: string;
14
+ size: string;
15
+ rank: number;
16
+ }>;
17
+ }>;
18
+ /**
19
+ * Resolve the wire `size` for one workbench request against the relay table.
20
+ * Falls down to the largest tier not exceeding the requested one (never up,
21
+ * so an unsupported combination cannot silently spend more); unparseable
22
+ * quality labels (legacy `standard`) map to the ratio's lowest tier, and a
23
+ * ratio with nothing at or below the request is rejected loudly.
24
+ * @param config - plugin configuration carrying `openaiCompatSizes`.
25
+ * @param ratio - selected ratio option (`W:H`).
26
+ * @param quality - selected resolution tier.
27
+ */
28
+ export declare function openAIRequestSize(config: Config, ratio: string, quality: string): string;
5
29
  /** Return only browser-safe capability data. */
6
30
  export declare function describeStudio(ctx: Context, config: Config, subscriptions?: SubscriptionManager | undefined): Promise<StudioConfigResponse>;
7
31
  /** Execute one validated browser workbench request using the existing provider adapters. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-image-gen",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Bring ChatGPT-like image generation to DeepSeek Harness — Gemini, OpenAI, Seedream, DashScope, local ComfyUI & more.",
5
5
  "type": "module",
6
6
  "author": "shanliuling",