dsh-image-gen 0.8.0 → 0.8.6
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/README.en.md +423 -397
- package/README.md +423 -397
- package/README.zh-CN.md +3 -3
- package/lib/client.js +436 -273
- package/lib/index.js +598 -186
- package/lib/types/capabilities.d.ts +42 -0
- package/lib/types/client/image-result-node.d.ts +9 -17
- package/lib/types/client/index.d.ts +4 -5
- package/lib/types/client/multi-model-compare.d.ts +3 -1
- package/lib/types/client/settings-state.d.ts +12 -0
- package/lib/types/config.d.ts +2 -2
- package/lib/types/openai-compatible.d.ts +20 -2
- package/lib/types/settings-health.d.ts +6 -0
- package/lib/types/shared.d.ts +6 -0
- package/lib/types/subscription/manager.d.ts +2 -1
- package/lib/types/subscription/vendors/antigravity.d.ts +2 -2
- package/lib/types/subscription.d.ts +11 -1
- package/lib/types/xai-params.d.ts +5 -0
- package/package.json +140 -142
- package/skills/install-dsh-image-gen/SKILL.md +22 -22
- package/lib/client.js.map +0 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-provider output parameter capabilities (aspect ratios, quality tiers)
|
|
3
|
+
* and the ratio→wire-size mappings, aligned with vendor docs as of 2026-09:
|
|
4
|
+
*
|
|
5
|
+
* - google (gemini-3.1-flash-image): 14 ratios incl. extremes, 512/1K/2K/4K.
|
|
6
|
+
* We expose the 10 common ratios; extreme strips (1:4/4:1/1:8/8:1) and the
|
|
7
|
+
* Flash-only 512 tier stay out (512 breaks when the user switches to a pro
|
|
8
|
+
* model, and tiny outputs have no real use case here).
|
|
9
|
+
* - openai (gpt-image-2): any WIDTHxHEIGHT with 16-divisible edges, ratio
|
|
10
|
+
* within 1:3–3:1, ≤3840x2160; quality low/medium/high/auto.
|
|
11
|
+
* - seedream (doubao-seedream-5-0): size is either a tier string (2K/3K/4K —
|
|
12
|
+
* 1K was dropped in 5.0) or exact pixels from the official tier×ratio table.
|
|
13
|
+
* - dashscope (qwen-image-3.0): free pixels within 512*512–2048*2048, ratio
|
|
14
|
+
* 1:8–8:1; no quality parameter.
|
|
15
|
+
* - xai (grok-imagine-image): NO size parameter at all — aspect_ratio (15
|
|
16
|
+
* values incl. auto) + resolution 1k/2k.
|
|
17
|
+
* - zhipu (glm-image): 7 recommended sizes (32-divisible, ≤2^22 px); quality
|
|
18
|
+
* hd only (standard exists on cogview-4, hd works on both).
|
|
19
|
+
* - chatgpt-sub (gpt-image-2.5-flare): the private Codex route accepts the
|
|
20
|
+
* same size/quality request fields as the public Image API, but may return
|
|
21
|
+
* different effective dimensions/quality. Treat these options as requests.
|
|
22
|
+
* - grok-sub (grok-imagine-image-2.0): aspect_ratio + resolution 1k/2k.
|
|
23
|
+
* - google-sub (gemini-3.1-flash-image): 10 ratios + imageSize 1K/2K/4K (we expose
|
|
24
|
+
* standard/HD → default/4K).
|
|
25
|
+
*/
|
|
26
|
+
import type { CloudImageProvider, StudioOption, SubscriptionProvider } from './shared.js';
|
|
27
|
+
/** zh labels shared by the server-side profiles; the client re-localizes. */
|
|
28
|
+
export declare const RATIO_LABELS: Record<string, string>;
|
|
29
|
+
export interface ProviderCapability {
|
|
30
|
+
ratioOptions: StudioOption[];
|
|
31
|
+
qualityOptions: StudioOption[];
|
|
32
|
+
defaultRatio: string;
|
|
33
|
+
defaultQuality: string;
|
|
34
|
+
/**
|
|
35
|
+
* Resolve the wire `size` for providers that speak pixel dimensions
|
|
36
|
+
* (openai/seedream/dashscope/zhipu/chatgpt-sub). Returns undefined when the
|
|
37
|
+
* channel takes no size (ratio `auto`) so the vendor default applies.
|
|
38
|
+
*/
|
|
39
|
+
sizeFor?(ratio: string, quality: string): string | undefined;
|
|
40
|
+
}
|
|
41
|
+
export declare const CLOUD_CAPABILITIES: Record<Exclude<CloudImageProvider, 'openai-compat'>, ProviderCapability>;
|
|
42
|
+
export declare const SUBSCRIPTION_CAPABILITIES: Record<SubscriptionProvider, ProviderCapability>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Modern DSH conversation node that keeps
|
|
1
|
+
/** Modern DSH conversation node that keeps image artifacts outside Tool process folding. */
|
|
2
2
|
import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
|
|
3
3
|
export declare const IMAGE_RESULT_NODE_KIND = "dsh-image-result";
|
|
4
4
|
export interface ImageResultPresentation {
|
|
@@ -19,8 +19,6 @@ interface ImageResultState {
|
|
|
19
19
|
readonly results: readonly (ImageResultPresentation & {
|
|
20
20
|
readonly seq: number;
|
|
21
21
|
})[];
|
|
22
|
-
readonly answerSeq?: number;
|
|
23
|
-
readonly endSeq?: number;
|
|
24
22
|
}
|
|
25
23
|
interface EventLike {
|
|
26
24
|
readonly type: string;
|
|
@@ -51,25 +49,17 @@ interface ConversationNodeDefinitionLike<State> {
|
|
|
51
49
|
}, match: MatchLike): State;
|
|
52
50
|
buildViewNode(context: ContextLike<State>): Record<string, unknown> | null;
|
|
53
51
|
}
|
|
54
|
-
/**
|
|
55
|
-
export interface ImageResultNodeOptions {
|
|
56
|
-
/**
|
|
57
|
-
* Whether the host transcript view folds completed-Turn process content
|
|
58
|
-
* (Compact mode). Omission or a thrown/unavailable read falls back to
|
|
59
|
-
* Compact-safe anchoring, which keeps the artifact always visible.
|
|
60
|
-
*/
|
|
61
|
-
readonly isCompactTranscript?: () => boolean;
|
|
62
|
-
}
|
|
63
|
-
/** Default definition: unknown transcript mode falls back to Compact-safe anchoring. */
|
|
52
|
+
/** Default definition for the successful images from each Tool invocation. */
|
|
64
53
|
export declare const imageResultDefinition: ConversationNodeDefinitionLike<ImageResultState>;
|
|
65
54
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* Turn closes (only needed under the folding Compact transcript view).
|
|
55
|
+
* Give each image Tool result its own Chat row at the event that produced it.
|
|
56
|
+
* PTC (run_code) sub-calls already have their own stable sub-call identity.
|
|
69
57
|
*/
|
|
70
|
-
export declare function createImageResultDefinition(
|
|
58
|
+
export declare function createImageResultDefinition(): ConversationNodeDefinitionLike<ImageResultState>;
|
|
71
59
|
/** Parse the plugin-owned durable presentation metadata from a Tool result event. */
|
|
72
60
|
export declare function imageResultFromMeta(value: unknown): ImageResultPresentation | undefined;
|
|
61
|
+
/** Parse all successful images from either a single or batch Tool result. */
|
|
62
|
+
export declare function imageResultsFromMeta(value: unknown): readonly ImageResultPresentation[];
|
|
73
63
|
/**
|
|
74
64
|
* Parse a plugin image result from a tool/ptc-dispatch event (#38). PTC
|
|
75
65
|
* run_code sub-calls carry neither a turn nor presentationMeta, so the result
|
|
@@ -79,4 +69,6 @@ export declare function imageResultFromMeta(value: unknown): ImageResultPresenta
|
|
|
79
69
|
* anything that is not a successful image result from our own image tools.
|
|
80
70
|
*/
|
|
81
71
|
export declare function imageResultFromPtcDispatch(event: EventLike): ImageResultPresentation | undefined;
|
|
72
|
+
/** Pair each rendered image with its own summary, including batches with failed items. */
|
|
73
|
+
export declare function imageResultsFromPtcDispatch(event: EventLike): readonly ImageResultPresentation[];
|
|
82
74
|
export {};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import './tl/css-supports-shim.js';
|
|
2
2
|
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
writable: boolean;
|
|
6
|
-
}
|
|
3
|
+
import { type SettingsScopeSnapshot } from './settings-state.js';
|
|
4
|
+
export type { SettingsScopeSnapshot } from './settings-state.js';
|
|
7
5
|
export interface SettingsScope<T> {
|
|
8
6
|
getSnapshot(): SettingsScopeSnapshot<T>;
|
|
9
7
|
subscribe(listener: () => void): () => void;
|
|
@@ -112,6 +110,7 @@ export declare function apply(ctx: Context): void;
|
|
|
112
110
|
export declare function ImageGenerationSettingsCard(props: SettingsCardProps): import("react").JSX.Element;
|
|
113
111
|
/** Keep the legacy Tool row for old DSH and hand modern results to the independent Chat node. */
|
|
114
112
|
export declare function GeneratedImageCard(props: ImageCardProps): import("react").JSX.Element;
|
|
113
|
+
/** Suppress the folded duplicate on modern hosts; render every image on legacy hosts. */
|
|
114
|
+
export declare function GeneratedImagesCard(props: ImageCardProps): import("react").JSX.Element;
|
|
115
115
|
/** Render modern image artifacts as final conversation output instead of Tool process content. */
|
|
116
116
|
export declare function PromotedImageResultNode(props: ImageResultNodeProps): import("react").JSX.Element;
|
|
117
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StudioProvider, StudioProviderProfile } from '../shared.js';
|
|
1
|
+
import type { StudioOption, StudioProvider, StudioProviderProfile } from '../shared.js';
|
|
2
2
|
export interface ComparisonTarget {
|
|
3
3
|
profile: StudioProviderProfile;
|
|
4
4
|
ratio: string;
|
|
@@ -9,3 +9,5 @@ export interface ComparisonTarget {
|
|
|
9
9
|
export declare function buildComparisonTargets(profiles: readonly StudioProviderProfile[], selectedProviders: readonly StudioProvider[], ratio: string, quality: string): ComparisonTarget[];
|
|
10
10
|
/** Start with two models, not every configured API, to avoid surprise spend. */
|
|
11
11
|
export declare function initialComparisonProviders(profiles: readonly StudioProviderProfile[], activeProvider: StudioProvider): StudioProvider[];
|
|
12
|
+
/** Union of every configured profile's options, for the shared comparison pickers. */
|
|
13
|
+
export declare function comparisonOptionUnion(profiles: readonly StudioProviderProfile[], key: 'ratioOptions' | 'qualityOptions'): StudioOption[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Preserve modern form states while accepting legacy scopes without status/mode. */
|
|
2
|
+
import { type SettingsHealth } from '../shared.js';
|
|
3
|
+
export interface SettingsScopeSnapshot<T> {
|
|
4
|
+
value: T | undefined;
|
|
5
|
+
writable: boolean;
|
|
6
|
+
status?: 'loading' | 'ready' | 'unavailable';
|
|
7
|
+
mode?: 'host' | 'memory';
|
|
8
|
+
}
|
|
9
|
+
export type SettingsState = 'ready' | 'loading' | 'remote' | 'unavailable' | 'readOnly' | 'incompatible';
|
|
10
|
+
export declare function settingsState(snapshot: SettingsScopeSnapshot<unknown>, health?: SettingsHealth): SettingsState;
|
|
11
|
+
/** A failed probe cannot identify the cause; keep the host's own form state. */
|
|
12
|
+
export declare function fetchSettingsHealth(signal: AbortSignal): Promise<SettingsHealth | undefined>;
|
package/lib/types/config.d.ts
CHANGED
|
@@ -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];
|
|
@@ -15,14 +15,24 @@ export declare function generateOpenAICompatibleImage(input: {
|
|
|
15
15
|
baseURL: string;
|
|
16
16
|
model: string;
|
|
17
17
|
prompt: string;
|
|
18
|
-
|
|
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' | 'formReferenceImages';
|
|
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>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Diagnose the actual host service and schema without reading any settings values. */
|
|
2
|
+
import type z from '@deepseek-ai/schemastery';
|
|
3
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
4
|
+
import type { SettingsHealth } from './shared.js';
|
|
5
|
+
export declare function describeSettingsHealth(settings: unknown, schema: z): SettingsHealth;
|
|
6
|
+
export declare function serveSettingsHealth(req: IncomingMessage, res: ServerResponse, health: SettingsHealth): void;
|
package/lib/types/shared.d.ts
CHANGED
|
@@ -14,6 +14,12 @@ export declare const INSPIRATION_ROUTE = "/plugins/dsh-image-gen/inspiration";
|
|
|
14
14
|
export declare const SAVE_WORKSPACE_ROUTE = "/plugins/dsh-image-gen/save-workspace";
|
|
15
15
|
/** Browser route the settings card probes provider connectivity through. */
|
|
16
16
|
export declare const TEST_CONNECTION_ROUTE = "/plugins/dsh-image-gen/test";
|
|
17
|
+
/** Non-secret settings capability probe, available even when the host cannot serve a form. */
|
|
18
|
+
export declare const SETTINGS_HEALTH_ROUTE = "/plugins/dsh-image-gen/settings-health";
|
|
19
|
+
export interface SettingsHealth {
|
|
20
|
+
settings: 'unavailable' | 'legacy' | 'live';
|
|
21
|
+
liveSchema: boolean;
|
|
22
|
+
}
|
|
17
23
|
/** Browser route the workbench infinite canvas pushes live state through. */
|
|
18
24
|
export declare const CANVAS_STATE_ROUTE = "/plugins/dsh-image-gen/canvas-state";
|
|
19
25
|
/** Upload a selected canvas original to the host attachment store. */
|
|
@@ -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
|
|
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
|
|
13
|
-
export declare const ANTIGRAVITY_IMAGE_MODEL
|
|
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
|
|
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
|
}>;
|
package/package.json
CHANGED
|
@@ -1,142 +1,140 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-image-gen",
|
|
3
|
-
"version": "0.8.
|
|
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/
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"README.md",
|
|
36
|
-
"README.
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/dsh-
|
|
49
|
-
"@deepseek-ai/dsh-client-ui-
|
|
50
|
-
"@deepseek-ai/dsh-client-ui-settings",
|
|
51
|
-
"@deepseek-ai/dsh-client-ui-
|
|
52
|
-
"@deepseek-ai/dsh-client-ui-
|
|
53
|
-
"@deepseek-ai/dsh-client-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"test": "
|
|
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.
|
|
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": "^
|
|
131
|
-
"react
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-image-gen",
|
|
3
|
+
"version": "0.8.6",
|
|
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
|
+
"test:package": "node scripts/check-package.mjs",
|
|
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.4 <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
|
+
"lucide-react": "^1.38.0",
|
|
131
|
+
"react": "^18.2.0",
|
|
132
|
+
"react-dom": "18.3.1",
|
|
133
|
+
"tldraw": "5.3.0",
|
|
134
|
+
"tsdown": "^0.22.2",
|
|
135
|
+
"typescript": "^6.0.3",
|
|
136
|
+
"unrun": "^0.3.1",
|
|
137
|
+
"vitest": "^4.1.8"
|
|
138
|
+
},
|
|
139
|
+
"packageManager": "pnpm@11.7.0"
|
|
140
|
+
}
|
|
@@ -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.
|