dsh-image-gen 0.7.0 → 0.8.5

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.
@@ -4,8 +4,8 @@ import { ARK_BACKGROUND_MODES, ARK_OUTPUT_FORMATS, DEFAULT_DASHSCOPE_ENDPOINT, D
4
4
  export { ARK_BACKGROUND_MODES, ARK_OUTPUT_FORMATS, 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, };
5
5
  /** Default workspace subfolder that receives generated image files. */
6
6
  export declare const DEFAULT_WORKSPACE_FOLDER = "dsh-image-gen";
7
- /** Google tool-level controls. */
8
- export declare const ASPECT_RATIOS: readonly ["1:1", "3:2", "2:3", "4:3", "3:4", "16:9", "9:16"];
7
+ /** Google tool-level controls. Aligned with gemini-3.1-flash-image's common set. */
8
+ export declare const ASPECT_RATIOS: readonly ["1:1", "3:2", "2:3", "4:3", "3:4", "4:5", "5:4", "16:9", "9:16", "21:9"];
9
9
  export declare const IMAGE_SIZES: readonly ["1K", "2K", "4K"];
10
10
  export type AspectRatio = typeof ASPECT_RATIOS[number];
11
11
  export type ImageSize = typeof IMAGE_SIZES[number];
@@ -21,17 +21,30 @@ export interface Config {
21
21
  openaiCompatModel?: string;
22
22
  /**
23
23
  * Request shape the relay's images/edits endpoint expects (#41). Most
24
- * relays take OpenAI's multipart form; some (e.g. SenseNova) accept the
25
- * generations endpoint but run edits on their own JSON contract with
26
- * `images: [{ image_url }]` objects. Defaults to `multipart`.
27
- */
28
- openaiCompatEditFormat?: 'multipart' | 'jsonImageUrlArray';
24
+ * relays take OpenAI's multipart form; some (e.g. SenseNova) accept the
25
+ * generations endpoint but run edits on their own JSON contract with
26
+ * `images: [{ image_url }]` objects; some take a multipart form whose
27
+ * `reference_images` field is a JSON array of base64 strings. Defaults to
28
+ * `multipart`.
29
+ */
30
+ openaiCompatEditFormat?: 'multipart' | 'jsonImageUrlArray' | 'formReferenceImages';
29
31
  /**
30
32
  * Extra JSON fields merged into the JSON edit body last (can override the
31
33
  * built-in defaults), e.g. SenseNova's `watermark`/`prompt_extend`.
32
34
  * Ignored unless `openaiCompatEditFormat` is `jsonImageUrlArray`.
33
35
  */
34
36
  openaiCompatEditExtra?: Record<string, unknown>;
37
+ /**
38
+ * Size table the OpenAI-compatible relay accepts, keyed
39
+ * `ratio → resolution tier → exact size string`, e.g.
40
+ * `{'16:9': {'1K': '1536x864', '2K': '2048x1152', '4K': '3840x2160'}}`.
41
+ * Empty keeps the built-in OpenAI trio (`1024x1024`, `1536x1024`,
42
+ * `1024x1536`). The workbench derives its ratio picker from the outer keys
43
+ * and its resolution picker from the tier keys, so relays or models with
44
+ * richer size tables expose every supported combination instead of the
45
+ * fixed three. Generation sends the exact configured string.
46
+ */
47
+ openaiCompatSizes?: Record<string, Record<string, string>>;
35
48
  seedreamBaseURL?: string;
36
49
  seedreamModel?: string;
37
50
  /**
@@ -99,7 +112,7 @@ export declare function resolveProvider(config: Config): {
99
112
  model: string;
100
113
  baseURL: string;
101
114
  imageSize: string;
102
- editFormat: 'multipart' | 'jsonImageUrlArray';
115
+ editFormat: 'multipart' | 'jsonImageUrlArray' | 'formReferenceImages';
103
116
  editExtra: Record<string, unknown>;
104
117
  } | {
105
118
  provider: 'seedream';
@@ -0,0 +1,16 @@
1
+ /** Upload endpoint turning browser-picked image files into DSH attachments. */
2
+ import type { IncomingMessage, ServerResponse } from 'node:http';
3
+ import type { ImageAttachmentRef, ImageMediaType } from '@deepseek-ai/dsh-attachment';
4
+ export interface ImportRouteDeps {
5
+ /** Durable attachment store; computes dimensions and content-addresses the bytes. */
6
+ saveImage(image: {
7
+ data: Uint8Array;
8
+ mediaType: ImageMediaType;
9
+ name?: string;
10
+ }): Promise<ImageAttachmentRef>;
11
+ /** Per-image byte cap from the host attachment limits. */
12
+ maxImageBytes: number;
13
+ /** Accepted media types from the host attachment limits. */
14
+ mediaTypes: readonly string[];
15
+ }
16
+ export declare function serveImport(req: IncomingMessage, res: ServerResponse, deps: ImportRouteDeps): Promise<void>;
@@ -3,6 +3,7 @@ import type { Context } from '@deepseek-ai/cordis';
3
3
  import { Config } from './config.js';
4
4
  export { Config } from './config.js';
5
5
  export { IMAGE_ROUTE, DELETE_ROUTE, SAVE_WORKSPACE_ROUTE, imageAttachmentFromMeta } from './image-route.js';
6
+ export { IMPORT_ROUTE } from './shared.js';
6
7
  export { STUDIO_ROUTE } from './shared.js';
7
8
  export { INSPIRATION_ROUTE } from './shared.js';
8
9
  export { TEST_CONNECTION_ROUTE } from './shared.js';
@@ -5,6 +5,17 @@ export declare const INSPIRATION_SOURCE_REPOSITORY = "https://github.com/freesty
5
5
  /** Public mirror for the bundled cases' image assets; checked before GitHub. */
6
6
  export declare const INSPIRATION_SOURCE_IMAGE_MIRROR = "https://gpt-image2.canghe.ai";
7
7
  export declare const MAX_INSPIRATION_CASES = 2000;
8
+ export declare const HANDDRAW_SOURCE_ID = "handraw-style";
9
+ export declare const HANDDRAW_SOURCE_VERSION = "50998b094866e22007001161bca12c892a3796b1";
10
+ export declare const HANDDRAW_SOURCE_UPDATED_AT = "2026-09-27T14:24:28+08:00";
11
+ export declare const HANDDRAW_SOURCE_REPOSITORY = "https://github.com/yang0/handraw-style";
12
+ /**
13
+ * Image revision for the handdraw source. The upstream pin stays fixed while
14
+ * the referenced image paths change (sheet crops → upstream individuals);
15
+ * browsers key their persistent image cache on this value, so bump it
16
+ * whenever the source's images change.
17
+ */
18
+ export declare const HANDDRAW_IMAGE_REVISION = "3";
8
19
  export interface InspirationCase {
9
20
  id: string;
10
21
  title: string;
@@ -26,6 +37,8 @@ export interface InspirationSource {
26
37
  version: string;
27
38
  integritySha256?: string | undefined;
28
39
  updatedAt?: string | undefined;
40
+ /** Content revision of the source's images; absent means `version` covers it. */
41
+ imageRevision?: string | undefined;
29
42
  categories: string[];
30
43
  styles: string[];
31
44
  scenes: string[];
@@ -38,7 +51,7 @@ export interface InspirationCatalog {
38
51
  interface ResolvedCase extends InspirationCase {
39
52
  imagePath: string;
40
53
  }
41
- interface ResolvedSource extends InspirationSource {
54
+ export interface ResolvedSource extends InspirationSource {
42
55
  cases: ResolvedCase[];
43
56
  }
44
57
  export interface ResolvedInspirationCatalog {
@@ -49,5 +62,31 @@ export interface ResolvedInspirationCatalog {
49
62
  export declare function parseInspirationSnapshot(value: unknown, version?: string, updatedAt?: string | undefined): ResolvedInspirationCatalog;
50
63
  export declare function publicInspirationCatalog(catalog: ResolvedInspirationCatalog): InspirationCatalog;
51
64
  export declare function findInspirationCase(catalog: ResolvedInspirationCatalog, sourceId: string, caseId: string): ResolvedCase | undefined;
65
+ /** One model-ready search hit: where the case lives plus its full reusable prompt. */
66
+ export interface InspirationSearchHit {
67
+ sourceId: string;
68
+ sourceLabel: string;
69
+ id: string;
70
+ title: string;
71
+ category: string;
72
+ prompt: string;
73
+ }
74
+ export interface InspirationSearchRequest {
75
+ /** Substring matched case-insensitively against titles, prompts, categories, and style/scene tags; empty matches everything. */
76
+ query: string;
77
+ /** Restrict the search to one source id. */
78
+ sourceId?: string | undefined;
79
+ /** Restrict the search to one exact category name. */
80
+ category?: string | undefined;
81
+ /** Maximum hits to return; defaults to 8, clamped to 1-20. */
82
+ limit?: number | undefined;
83
+ }
84
+ export interface InspirationSearchResult {
85
+ /** Total matching cases before the limit; lets the caller refine instead of re-querying blindly. */
86
+ total: number;
87
+ hits: InspirationSearchHit[];
88
+ }
89
+ /** Search a resolved catalog for reusable prompts; bounded hits even with an empty query. */
90
+ export declare function searchInspirationCases(catalog: ResolvedInspirationCatalog, request: InspirationSearchRequest): InspirationSearchResult;
52
91
  export declare const BUNDLED_INSPIRATION_CATALOG: ResolvedInspirationCatalog;
53
92
  export {};
@@ -15,14 +15,24 @@ export declare function generateOpenAICompatibleImage(input: {
15
15
  baseURL: string;
16
16
  model: string;
17
17
  prompt: string;
18
- size: string;
18
+ /**
19
+ * Pixel size or tier string. Optional because not every channel accepts
20
+ * `size` at all — xAI takes aspect_ratio+resolution via `extraBody` and
21
+ * rejects nothing but silently ignores unknown fields, so we simply omit
22
+ * the parameter for it.
23
+ */
24
+ size?: string;
25
+ /** Vendor quality tier (e.g. OpenAI low/medium/high); omitted when unset. */
26
+ quality?: string;
27
+ /** Extra JSON fields merged last into the generations body (xAI aspect_ratio/resolution). */
28
+ extraBody?: Readonly<Record<string, unknown>>;
19
29
  maxBytes: number;
20
30
  signal: AbortSignal;
21
31
  /** Ark-only output controls; ignored by every other provider. */
22
32
  arkOptions?: ArkOutputOptions;
23
33
  }): Promise<GeneratedCompatibleImage>;
24
34
  /** How the edits endpoint expects its request body (#41). */
25
- export type CompatEditFormat = 'multipart' | 'jsonImageUrlArray';
35
+ export type CompatEditFormat = 'multipart' | 'jsonImageUrlArray' | 'formReferenceImages' | 'xaiJson';
26
36
  export declare function editOpenAICompatibleImage(input: {
27
37
  apiKey: string;
28
38
  baseURL: string;
@@ -45,4 +55,12 @@ export declare function editOpenAICompatibleImage(input: {
45
55
  * `watermark`/`prompt_extend`. Ignored in multipart mode.
46
56
  */
47
57
  editExtra?: Readonly<Record<string, unknown>>;
58
+ /** Vendor quality tier sent with the edit request when set. */
59
+ quality?: string;
60
+ /**
61
+ * Extra fields for the edit request (multipart: one form field per entry;
62
+ * JSON shapes: merged after `editExtra`), e.g. xAI's
63
+ * aspect_ratio/resolution pair.
64
+ */
65
+ extraBody?: Readonly<Record<string, unknown>>;
48
66
  }): Promise<GeneratedCompatibleImage>;
@@ -2,6 +2,8 @@
2
2
  import type { ImageAttachmentRef, ImageMediaType } from '@deepseek-ai/dsh-attachment';
3
3
  /** Browser route used by the generated-image card. */
4
4
  export declare const IMAGE_ROUTE = "/plugins/dsh-image-gen/image";
5
+ /** Browser route that uploads user-picked images as DSH attachments. */
6
+ export declare const IMPORT_ROUTE = "/plugins/dsh-image-gen/import";
5
7
  /** Browser route used for deleting generated images and workspace files. */
6
8
  export declare const DELETE_ROUTE = "/plugins/dsh-image-gen/delete";
7
9
  /** Same-origin route used by the browser image workbench. */
@@ -5,6 +5,8 @@ export interface StudioRouteDeps {
5
5
  describe(): Promise<StudioConfigResponse>;
6
6
  generate(input: StudioGenerateRequest, signal: AbortSignal): Promise<StudioGenerateResponse>;
7
7
  maxBodyBytes: number;
8
+ /** Heartbeat cadence for the streaming generation response; tests shrink it. */
9
+ heartbeatMs?: number;
8
10
  }
9
11
  /** Serve workbench capabilities and generation requests without exposing provider credentials. */
10
12
  export declare function serveStudio(req: IncomingMessage, res: ServerResponse, deps: StudioRouteDeps): Promise<void>;
@@ -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. */
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * The account store pattern follows @goodandready/dsh-subscriptions (MIT,
7
7
  * (c) 2026 GooDAnDReaDY) lib/accounts.js, trimmed to one account per vendor
8
- * (no rotation, no cooldowns) because this bundle has exactly two vendors
8
+ * (no rotation, no cooldowns) because this bundle has one account per vendor
9
9
  * and no chat adapter to protect.
10
10
  *
11
11
  * Isolation invariants (project rules):
@@ -99,6 +99,7 @@ export declare class SubscriptionManager {
99
99
  }): Promise<Array<{
100
100
  b64_json: string;
101
101
  revisedPrompt?: string;
102
+ reportedQuality?: string;
102
103
  }>>;
103
104
  /**
104
105
  * Resolve (and cache per refresh token) the managed project id the
@@ -9,8 +9,8 @@ export declare const ANTIGRAVITY_REDIRECT_URI = "http://localhost:51121/oauth-ca
9
9
  * sandbox first, then autopush, then prod).
10
10
  */
11
11
  export declare const ANTIGRAVITY_ENDPOINTS: readonly ["https://daily-cloudcode-pa.sandbox.googleapis.com", "https://autopush-cloudcode-pa.sandbox.googleapis.com", "https://cloudcode-pa.googleapis.com"];
12
- /** The image model served through this channel: Nano Banana Pro. */
13
- export declare const ANTIGRAVITY_IMAGE_MODEL = "gemini-3-pro-image";
12
+ /** The image model served through this channel: Nano Banana 2. */
13
+ export declare const ANTIGRAVITY_IMAGE_MODEL: string;
14
14
  /** Current client version: the fetched one, or the fallback until fetched. */
15
15
  export declare function getAntigravityVersion(): string;
16
16
  /** Test seam: pin the version so unit tests never depend on the network. */
@@ -4,7 +4,7 @@
4
4
  * Login (PKCE loopback), token storage through the DSH Credentials service,
5
5
  * refresh and the wire calls all live in `./subscription/` — adapted from
6
6
  * @goodandready/dsh-subscriptions (MIT, (c) 2026 GooDAnDReaDY), trimmed to
7
- * the two image vendors this bundle ships. This file keeps the same
7
+ * the image subscription vendors this bundle ships. This file keeps the same
8
8
  * `{ data, mediaType }` contract as the API-key adapters so `saveGenerated`
9
9
  * and everything downstream is shared.
10
10
  *
@@ -19,6 +19,15 @@ import { type SubscriptionProvider } from './shared.js';
19
19
  export { SubscriptionManager, vendorOf } from './subscription/manager.js';
20
20
  export { registerSubscriptionRoutes } from './subscription/subscription-route.js';
21
21
  export { SUBSCRIPTION_TIMEOUT_MS } from './shared.js';
22
+ /** Translate image tool options into each subscription channel's wire inputs. */
23
+ export declare function subscriptionToolParameters(provider: SubscriptionProvider, options: {
24
+ size?: string;
25
+ aspectRatio?: string;
26
+ imageSize?: string;
27
+ }): {
28
+ size?: string;
29
+ quality?: string;
30
+ };
22
31
  /**
23
32
  * Generate one image through a logged-in subscription account. Returns the
24
33
  * same `{ data, mediaType }` contract as the API-key adapters so the caller
@@ -41,4 +50,5 @@ export declare function generateSubscriptionImage(options: {
41
50
  data: Uint8Array;
42
51
  mediaType: ImageMediaType;
43
52
  revisedPrompt?: string;
53
+ reportedQuality?: string;
44
54
  }>;
@@ -0,0 +1,5 @@
1
+ export declare function xaiToolParameters(options: {
2
+ aspectRatio?: string;
3
+ imageSize?: string;
4
+ size?: string;
5
+ }): Record<string, string>;
package/package.json CHANGED
@@ -1,142 +1,139 @@
1
- {
2
- "name": "dsh-image-gen",
3
- "version": "0.7.0",
4
- "description": "Bring ChatGPT-like image generation to DeepSeek Harness — Gemini, OpenAI, Seedream, DashScope, local ComfyUI & more.",
5
- "type": "module",
6
- "author": "shanliuling",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/shanliuling/dsh-image-gen.git"
10
- },
11
- "bugs": {
12
- "url": "https://github.com/shanliuling/dsh-image-gen/issues"
13
- },
14
- "homepage": "https://github.com/shanliuling/dsh-image-gen#readme",
15
- "main": "lib/index.js",
16
- "types": "lib/types/index.d.ts",
17
- "exports": {
18
- ".": {
19
- "types": "./lib/types/index.d.ts",
20
- "default": "./lib/index.js"
21
- },
22
- "./client": {
23
- "types": "./lib/types/client/index.d.ts",
24
- "default": "./lib/client.js"
25
- },
26
- "./package.json": "./package.json"
27
- },
28
- "files": [
29
- "lib/index.js",
30
- "lib/client.js",
31
- "lib/client.js.map",
32
- "lib/types/**/*.d.ts",
33
- "skills/**/*.md",
34
- "cordis.patch.yml",
35
- "README.md",
36
- "README.en.md",
37
- "README.zh-CN.md",
38
- "docs/assets/readme/*.webp",
39
- "LICENSE"
40
- ],
41
- "dsh": {
42
- "bundle": {
43
- "patch": "./cordis.patch.yml"
44
- },
45
- "client": {
46
- "inject": [
47
- "@deepseek-ai/dsh-client-connection",
48
- "@deepseek-ai/dsh-api-remotes",
49
- "@deepseek-ai/dsh-client-ui-conversation",
50
- "@deepseek-ai/dsh-client-ui-settings",
51
- "@deepseek-ai/dsh-client-ui-settings-plugins",
52
- "@deepseek-ai/dsh-client-ui-sidebar-right",
53
- "@deepseek-ai/dsh-client-ui-tool",
54
- "@deepseek-ai/dsh-client-locale"
55
- ],
56
- "platform": "web"
57
- }
58
- },
59
- "scripts": {
60
- "typecheck": "tsc --noEmit",
61
- "build": "tsc && tsdown",
62
- "prepare": "pnpm run build",
63
- "test": "vitest run",
64
- "pack:check": "pnpm pack --dry-run"
65
- },
66
- "engines": {
67
- "node": "^22.19.0 || >=24.0.0"
68
- },
69
- "license": "Apache-2.0",
70
- "keywords": [
71
- "deepseek",
72
- "deepseek-harness",
73
- "dsh",
74
- "dsh-plugin",
75
- "ai-agent",
76
- "image-generation",
77
- "ai-image-generation",
78
- "multimodal",
79
- "gemini",
80
- "openai",
81
- "openai-compatible",
82
- "seedream",
83
- "dashscope",
84
- "comfyui",
85
- "local-image-generation",
86
- "wanx",
87
- "aliyun",
88
- "volcengine",
89
- "byok",
90
- "cordis"
91
- ],
92
- "peerDependencies": {
93
- "@deepseek-ai/cordis": ">=4.0.0 <5",
94
- "@deepseek-ai/schemastery": ">=3.18.0 <4",
95
- "react": ">=18.2.0 <19"
96
- },
97
- "peerDependenciesMeta": {
98
- "@deepseek-ai/cordis": {
99
- "optional": true
100
- },
101
- "@deepseek-ai/schemastery": {
102
- "optional": true
103
- },
104
- "react": {
105
- "optional": true
106
- }
107
- },
108
- "devDependencies": {
109
- "@deepseek-ai/cordis": "4.0.4",
110
- "@deepseek-ai/dsh-agent": "0.1.7-rc.2",
111
- "@deepseek-ai/dsh-api-remotes": "0.1.7-rc.2",
112
- "@deepseek-ai/dsh-attachment": "0.1.7-rc.2",
113
- "@deepseek-ai/dsh-client-connection": "0.1.7-rc.2",
114
- "@deepseek-ai/dsh-client-ui-conversation": "0.1.7-rc.2",
115
- "@deepseek-ai/dsh-client-ui-settings": "0.1.7-rc.2",
116
- "@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.7-rc.2",
117
- "@deepseek-ai/dsh-client-ui-sidebar-right": "0.1.7-rc.2",
118
- "@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2",
119
- "@deepseek-ai/dsh-client-ui-tool": "0.1.7-rc.2",
120
- "@deepseek-ai/dsh-credentials": "0.1.7-rc.2",
121
- "@deepseek-ai/dsh-host-webserver": "0.1.7-rc.2",
122
- "@deepseek-ai/dsh-llm": "0.1.7-rc.2",
123
- "@deepseek-ai/dsh-session": "0.1.7-rc.2",
124
- "@deepseek-ai/dsh-settings": "0.1.7-rc.2",
125
- "@deepseek-ai/dsh-tools": "0.1.7-rc.2",
126
- "@deepseek-ai/dsh-workspace": "0.1.7-rc.2",
127
- "@deepseek-ai/schemastery": "3.18.4",
128
- "@types/node": "^22.20.0",
129
- "@types/react": "~18.3.1",
130
- "react": "^18.2.0",
131
- "react-dom": "18.3.1",
132
- "tsdown": "^0.22.2",
133
- "typescript": "^6.0.3",
134
- "unrun": "^0.3.1",
135
- "vitest": "^4.1.8"
136
- },
137
- "packageManager": "pnpm@11.7.0",
138
- "dependencies": {
139
- "lucide-react": "^1.38.0",
140
- "tldraw": "5.3.0"
141
- }
142
- }
1
+ {
2
+ "name": "dsh-image-gen",
3
+ "version": "0.8.5",
4
+ "description": "Bring ChatGPT-like image generation to DeepSeek Harness — Gemini, OpenAI, Seedream, DashScope, local ComfyUI & more.",
5
+ "type": "module",
6
+ "author": "shanliuling",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/shanliuling/dsh-image-gen.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/shanliuling/dsh-image-gen/issues"
13
+ },
14
+ "homepage": "https://github.com/shanliuling/dsh-image-gen#readme",
15
+ "main": "lib/index.js",
16
+ "types": "lib/types/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./lib/types/index.d.ts",
20
+ "default": "./lib/index.js"
21
+ },
22
+ "./client": {
23
+ "types": "./lib/types/client/index.d.ts",
24
+ "default": "./lib/client.js"
25
+ },
26
+ "./package.json": "./package.json"
27
+ },
28
+ "files": [
29
+ "lib/index.js",
30
+ "lib/client.js",
31
+ "lib/types/**/*.d.ts",
32
+ "skills/**/*.md",
33
+ "cordis.patch.yml",
34
+ "README.md",
35
+ "README.en.md",
36
+ "README.zh-CN.md",
37
+ "docs/assets/readme/*.webp",
38
+ "LICENSE"
39
+ ],
40
+ "dsh": {
41
+ "bundle": {
42
+ "patch": "./cordis.patch.yml"
43
+ },
44
+ "client": {
45
+ "inject": [
46
+ "@deepseek-ai/dsh-client-connection",
47
+ "@deepseek-ai/dsh-api-remotes",
48
+ "@deepseek-ai/dsh-client-ui-conversation",
49
+ "@deepseek-ai/dsh-client-ui-settings",
50
+ "@deepseek-ai/dsh-client-ui-settings-plugins",
51
+ "@deepseek-ai/dsh-client-ui-sidebar-right",
52
+ "@deepseek-ai/dsh-client-ui-tool",
53
+ "@deepseek-ai/dsh-client-locale"
54
+ ],
55
+ "platform": "web"
56
+ }
57
+ },
58
+ "scripts": {
59
+ "typecheck": "tsc --noEmit",
60
+ "build": "tsc && tsdown",
61
+ "prepare": "pnpm run build",
62
+ "test": "vitest run",
63
+ "pack:check": "pnpm pack --dry-run"
64
+ },
65
+ "engines": {
66
+ "node": "^22.19.0 || >=24.0.0"
67
+ },
68
+ "license": "Apache-2.0",
69
+ "keywords": [
70
+ "deepseek",
71
+ "deepseek-harness",
72
+ "dsh",
73
+ "dsh-plugin",
74
+ "ai-agent",
75
+ "image-generation",
76
+ "ai-image-generation",
77
+ "multimodal",
78
+ "gemini",
79
+ "openai",
80
+ "openai-compatible",
81
+ "seedream",
82
+ "dashscope",
83
+ "comfyui",
84
+ "local-image-generation",
85
+ "wanx",
86
+ "aliyun",
87
+ "volcengine",
88
+ "byok",
89
+ "cordis"
90
+ ],
91
+ "peerDependencies": {
92
+ "@deepseek-ai/cordis": ">=4.0.0 <5",
93
+ "@deepseek-ai/schemastery": ">=3.18.0 <4",
94
+ "react": ">=18.2.0 <19"
95
+ },
96
+ "peerDependenciesMeta": {
97
+ "@deepseek-ai/cordis": {
98
+ "optional": true
99
+ },
100
+ "@deepseek-ai/schemastery": {
101
+ "optional": true
102
+ },
103
+ "react": {
104
+ "optional": true
105
+ }
106
+ },
107
+ "devDependencies": {
108
+ "@deepseek-ai/cordis": "4.0.4",
109
+ "@deepseek-ai/dsh-agent": "0.1.7-rc.2",
110
+ "@deepseek-ai/dsh-api-remotes": "0.1.7-rc.2",
111
+ "@deepseek-ai/dsh-attachment": "0.1.7-rc.2",
112
+ "@deepseek-ai/dsh-client-connection": "0.1.7-rc.2",
113
+ "@deepseek-ai/dsh-client-ui-conversation": "0.1.7-rc.2",
114
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.7-rc.2",
115
+ "@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.7-rc.2",
116
+ "@deepseek-ai/dsh-client-ui-sidebar-right": "0.1.7-rc.2",
117
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2",
118
+ "@deepseek-ai/dsh-client-ui-tool": "0.1.7-rc.2",
119
+ "@deepseek-ai/dsh-credentials": "0.1.7-rc.2",
120
+ "@deepseek-ai/dsh-host-webserver": "0.1.7-rc.2",
121
+ "@deepseek-ai/dsh-llm": "0.1.7-rc.2",
122
+ "@deepseek-ai/dsh-session": "0.1.7-rc.2",
123
+ "@deepseek-ai/dsh-settings": "0.1.7-rc.2",
124
+ "@deepseek-ai/dsh-tools": "0.1.7-rc.2",
125
+ "@deepseek-ai/dsh-workspace": "0.1.7-rc.2",
126
+ "@deepseek-ai/schemastery": "3.18.4",
127
+ "@types/node": "^22.20.0",
128
+ "@types/react": "~18.3.1",
129
+ "lucide-react": "^1.38.0",
130
+ "react": "^18.2.0",
131
+ "react-dom": "18.3.1",
132
+ "tldraw": "5.3.0",
133
+ "tsdown": "^0.22.2",
134
+ "typescript": "^6.0.3",
135
+ "unrun": "^0.3.1",
136
+ "vitest": "^4.1.8"
137
+ },
138
+ "packageManager": "pnpm@11.7.0"
139
+ }
@@ -1,22 +1,22 @@
1
- ---
2
- name: install-dsh-image-gen
3
- description: Install, configure, verify, or remove the dsh-image-gen 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.
4
- ---
5
-
6
- # Install DSH Image Gen
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:
11
-
12
- ```sh
13
- dsh plugin --profile <profile> add <package-or-git-spec>
14
- ```
15
-
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-image-gen` 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. In Settings > Plugins > Image generation (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.
21
-
22
- For removal, run `dsh plugin --profile <profile> remove dsh-image-gen`. Do not delete the user's credentials unless they explicitly request it.
1
+ ---
2
+ name: install-dsh-image-gen
3
+ description: Install, configure, verify, or remove the dsh-image-gen 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.
4
+ ---
5
+
6
+ # Install DSH Image Gen
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:
11
+
12
+ ```sh
13
+ dsh plugin --profile <profile> add <package-or-git-spec>
14
+ ```
15
+
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-image-gen` 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. In Settings > Plugins > Image generation (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.
21
+
22
+ For removal, run `dsh plugin --profile <profile> remove dsh-image-gen`. Do not delete the user's credentials unless they explicitly request it.