dsh-image-gen 0.3.0 â 0.3.1
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 +172 -172
- package/README.md +182 -182
- package/README.zh-CN.md +172 -172
- package/lib/client.js +323 -62
- package/lib/client.js.map +1 -1
- package/lib/index.js +486 -307
- package/lib/types/client/studio-style.d.ts +1 -1
- package/lib/types/image-route.d.ts +18 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/shared.d.ts +17 -4
- package/lib/types/studio.d.ts +1 -0
- package/lib/types/workspace-save.d.ts +7 -0
- package/package.json +10 -8
- package/skills/install-dsh-image-gen/SKILL.md +22 -22
package/README.en.md
CHANGED
|
@@ -1,172 +1,172 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
<img src="docs/assets/hero-poster.webp" alt="dsh-image-gen poster" width="100%" style="max-width: 860px; border-radius: 12px;" />
|
|
4
|
-
|
|
5
|
-
<br /><br />
|
|
6
|
-
|
|
7
|
-
# đ¨ dsh-image-gen
|
|
8
|
-
|
|
9
|
-
**Complete conversational image capabilities for DeepSeek Harness: text-to-image, image-to-image, multi-image references, continuous editing, local ComfyUI, and gallery management.**
|
|
10
|
-
|
|
11
|
-
[](https://www.npmjs.com/package/dsh-image-gen)
|
|
12
|
-
[](https://github.com/deepseek-ai)
|
|
13
|
-
[](https://www.npmjs.com/package/dsh-image-gen)
|
|
14
|
-
[](LICENSE)
|
|
15
|
-
|
|
16
|
-
**English** | [įŽäŊ䏿](README.md)
|
|
17
|
-
|
|
18
|
-
<br />
|
|
19
|
-
|
|
20
|
-
<p align="center">đŦ <b>Prompt your DeepSeek Harness Agent to install:</b></p>
|
|
21
|
-
|
|
22
|
-
```text
|
|
23
|
-
Install the image generation plugin by running: pnpm dsh plugin --profile web add dsh-image-gen@latest
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
<p align="center"><sub>(Or run manually in terminal: <code>pnpm dsh plugin --profile web add dsh-image-gen@latest</code>)</sub></p>
|
|
27
|
-
|
|
28
|
-
<br />
|
|
29
|
-
|
|
30
|
-
<p align="center">After installation, enter your API key or configure local ComfyUI in DSH Settings, then tell the Agent:</p>
|
|
31
|
-
|
|
32
|
-
```text
|
|
33
|
-
Draw a cyberpunk cat on a neon street in a rainy night.
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
<p align="center">The Agent will automatically generate images and can also continue editing the previous image directly.</p>
|
|
37
|
-
|
|
38
|
-
<br />
|
|
39
|
-
|
|
40
|
-
<div align="center">
|
|
41
|
-
<img src="docs/assets/generate-example.png" alt="Initial image generation conversation" width="48%" style="vertical-align: top;" />
|
|
42
|
-
<img src="docs/assets/edit-example.png" alt="Continued image editing conversation" width="48%" style="vertical-align: top;" />
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## đĄ What Problem Does It Solve?
|
|
50
|
-
|
|
51
|
-
**`dsh-image-gen` is an open-source image generation and editing plugin built specifically for DeepSeek Harness (DSH).**
|
|
52
|
-
|
|
53
|
-
DeepSeek Harness empowers agents to use tools for various tasks. This project adds native **multimodal image generation capabilities**:
|
|
54
|
-
|
|
55
|
-
```mermaid
|
|
56
|
-
graph LR
|
|
57
|
-
A[User Prompt] --> B[DeepSeek Harness Agent]
|
|
58
|
-
B --> C[generate_image / edit_image]
|
|
59
|
-
C --> D[Gemini / OpenAI / Seedream / DashScope / ComfyUI]
|
|
60
|
-
D --> E[Image Data]
|
|
61
|
-
E --> F[In-chat Conversation Stream]
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## đ Quick Install & Usage
|
|
67
|
-
|
|
68
|
-
### 1. Install Plugin
|
|
69
|
-
|
|
70
|
-
In your DeepSeek Harness workspace root:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
# Recommended: Install or upgrade to latest release
|
|
74
|
-
pnpm dsh plugin --profile web add dsh-image-gen@latest
|
|
75
|
-
|
|
76
|
-
# If dsh is installed globally:
|
|
77
|
-
dsh plugin --profile web add dsh-image-gen@latest
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
<details>
|
|
81
|
-
<summary><b>đ ī¸ Alternative Installations (Git Repo / Local Dev)</b></summary>
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
# Method B: Install directly from GitHub
|
|
85
|
-
pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git
|
|
86
|
-
|
|
87
|
-
# Method C: Clone & install locally
|
|
88
|
-
git clone https://github.com/shanliuling/dsh-image-gen.git
|
|
89
|
-
pnpm dsh plugin --profile web add ./dsh-image-gen
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
</details>
|
|
93
|
-
|
|
94
|
-
### 2. Configure Provider & Workspace Settings
|
|
95
|
-
|
|
96
|
-
Open DSH Web (`http://localhost:3080`):
|
|
97
|
-
|
|
98
|
-
1. Navigate to **Settings â Plugins â Image generation**.
|
|
99
|
-
2. Select a Provider. Enter an API key for cloud providers; for local ComfyUI, enter its URL and import an API Format Workflow JSON using `{{prompt}}` for the prompt and optional `{{seed}}` for the seed. For image editing, put `{{image}}` (exactly once) in the LoadImage `image` input; the plugin uploads the source image and fills in the stored filename. ComfyUI supports importing multiple named workflows with one active at a time, and the Agent can also pick one by name via the optional `workflow` tool parameter.
|
|
100
|
-
3. Optionally enable **Save to workspace** (enabled by default) and specify subfolder, then click **Save**.
|
|
101
|
-
|
|
102
|
-
<div align="center">
|
|
103
|
-
<img src="docs/assets/settings-preview.png?v=0.1.7" alt="Settings preview" width="720" />
|
|
104
|
-
</div>
|
|
105
|
-
|
|
106
|
-
### 3. Generate Images in Chat
|
|
107
|
-
|
|
108
|
-
Simply prompt in the chat input:
|
|
109
|
-
|
|
110
|
-
```text
|
|
111
|
-
Generate a minimalist modern architecture living room illustration.
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
The Agent will call `generate_image` and return the image directly in the conversation stream.
|
|
115
|
-
|
|
116
|
-
### 4. Browse Native Image Gallery
|
|
117
|
-
|
|
118
|
-
Click the **`[Gallery]`** Tab in the top navigation bar to browse and search all generated images across conversations:
|
|
119
|
-
|
|
120
|
-
<div align="center">
|
|
121
|
-
<img src="docs/assets/gallery-preview.png" alt="Gallery preview" width="820" />
|
|
122
|
-
</div>
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## ⨠Key Features
|
|
127
|
-
|
|
128
|
-
- đŦ **In-Chat Image Generation**: Tell your Agent what you want to draw without switching tabs or tools.
|
|
129
|
-
- đŧī¸ **Native Image Gallery**: Dedicated "Gallery" tab automatically collecting all generated images with keyword search, provider filtering, single-item deletion (with confirmation and persistent tombstones), and quick copy/download.
|
|
130
|
-
- đ **Interactive Image Tools**: High-res fullscreen preview, one-click copy to clipboard, local download, and open in new tab.
|
|
131
|
-
- đ¨ **Multi-Provider Support**: Supports Google Gemini, OpenAI Images, OpenAI Compatible API, ByteDance Seedream / Volcengine Ark, Aliyun DashScope (Wanx / Qwen-Image), and local ComfyUI workflows.
|
|
132
|
-
- đ **BYOK (Bring Your Own Key)**: Uses your own API keys managed securely by DSH credentials service with write-only protection.
|
|
133
|
-
- đŧī¸ **Durable Session Persistence**: Images integrate with DSH Attachment and conversation lifecycle, preserved across reloads.
|
|
134
|
-
- đž **Workspace File Output**: By default each generated image is also written as a file into the current session workspace; the tool result carries the absolute file path. Can be disabled or re-pointed in settings.
|
|
135
|
-
- âī¸ **Native Web Settings**: Configure providers, keys, models, and endpoints directly in DSH settings.
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## đĻ Supported Providers
|
|
140
|
-
|
|
141
|
-
| Provider | Default Model | Default Endpoint / Base URL |
|
|
142
|
-
| :--- | :--- | :--- |
|
|
143
|
-
| **Google Gemini** | `gemini-3.1-flash-image` | `https://generativelanguage.googleapis.com/v1beta/interactions` |
|
|
144
|
-
| **OpenAI Images** | `gpt-image-2` | `https://api.openai.com/v1` |
|
|
145
|
-
| **OpenAI Compatible** | Custom | Custom Base URL |
|
|
146
|
-
| **ByteDance Seedream / Volcengine Ark** | `doubao-seedream-5-0-260128` | `https://ark.cn-beijing.volces.com/api/v3` |
|
|
147
|
-
| **Aliyun DashScope / Wanx** | `wanx2.1-t2i-turbo` | `https://dashscope.aliyuncs.com/api/v1` |
|
|
148
|
-
| **Local ComfyUI (text-to-image & image-to-image)** | Imported API Format Workflow | `http://127.0.0.1:8188` |
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
## đ ī¸ Local Development
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
git clone https://github.com/shanliuling/dsh-image-gen.git
|
|
156
|
-
cd dsh-image-gen
|
|
157
|
-
|
|
158
|
-
pnpm install
|
|
159
|
-
pnpm run typecheck
|
|
160
|
-
pnpm run test
|
|
161
|
-
pnpm run build
|
|
162
|
-
|
|
163
|
-
pnpm run pack:check
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## đ License
|
|
169
|
-
|
|
170
|
-
Open-sourced under the [MIT License](LICENSE).
|
|
171
|
-
|
|
172
|
-
If this plugin helps you, feel free to give it a âī¸ **Star**!
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="docs/assets/hero-poster.webp" alt="dsh-image-gen poster" width="100%" style="max-width: 860px; border-radius: 12px;" />
|
|
4
|
+
|
|
5
|
+
<br /><br />
|
|
6
|
+
|
|
7
|
+
# đ¨ dsh-image-gen
|
|
8
|
+
|
|
9
|
+
**Complete conversational image capabilities for DeepSeek Harness: text-to-image, image-to-image, multi-image references, continuous editing, local ComfyUI, and gallery management.**
|
|
10
|
+
|
|
11
|
+
[](https://www.npmjs.com/package/dsh-image-gen)
|
|
12
|
+
[](https://github.com/deepseek-ai)
|
|
13
|
+
[](https://www.npmjs.com/package/dsh-image-gen)
|
|
14
|
+
[](LICENSE)
|
|
15
|
+
|
|
16
|
+
**English** | [įŽäŊ䏿](README.md)
|
|
17
|
+
|
|
18
|
+
<br />
|
|
19
|
+
|
|
20
|
+
<p align="center">đŦ <b>Prompt your DeepSeek Harness Agent to install:</b></p>
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
Install the image generation plugin by running: pnpm dsh plugin --profile web add dsh-image-gen@latest
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
<p align="center"><sub>(Or run manually in terminal: <code>pnpm dsh plugin --profile web add dsh-image-gen@latest</code>)</sub></p>
|
|
27
|
+
|
|
28
|
+
<br />
|
|
29
|
+
|
|
30
|
+
<p align="center">After installation, enter your API key or configure local ComfyUI in DSH Settings, then tell the Agent:</p>
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
Draw a cyberpunk cat on a neon street in a rainy night.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
<p align="center">The Agent will automatically generate images and can also continue editing the previous image directly.</p>
|
|
37
|
+
|
|
38
|
+
<br />
|
|
39
|
+
|
|
40
|
+
<div align="center">
|
|
41
|
+
<img src="docs/assets/generate-example.png" alt="Initial image generation conversation" width="48%" style="vertical-align: top;" />
|
|
42
|
+
<img src="docs/assets/edit-example.png" alt="Continued image editing conversation" width="48%" style="vertical-align: top;" />
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## đĄ What Problem Does It Solve?
|
|
50
|
+
|
|
51
|
+
**`dsh-image-gen` is an open-source image generation and editing plugin built specifically for DeepSeek Harness (DSH).**
|
|
52
|
+
|
|
53
|
+
DeepSeek Harness empowers agents to use tools for various tasks. This project adds native **multimodal image generation capabilities**:
|
|
54
|
+
|
|
55
|
+
```mermaid
|
|
56
|
+
graph LR
|
|
57
|
+
A[User Prompt] --> B[DeepSeek Harness Agent]
|
|
58
|
+
B --> C[generate_image / edit_image]
|
|
59
|
+
C --> D[Gemini / OpenAI / Seedream / DashScope / ComfyUI]
|
|
60
|
+
D --> E[Image Data]
|
|
61
|
+
E --> F[In-chat Conversation Stream]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## đ Quick Install & Usage
|
|
67
|
+
|
|
68
|
+
### 1. Install Plugin
|
|
69
|
+
|
|
70
|
+
In your DeepSeek Harness workspace root:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Recommended: Install or upgrade to latest release
|
|
74
|
+
pnpm dsh plugin --profile web add dsh-image-gen@latest
|
|
75
|
+
|
|
76
|
+
# If dsh is installed globally:
|
|
77
|
+
dsh plugin --profile web add dsh-image-gen@latest
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
<details>
|
|
81
|
+
<summary><b>đ ī¸ Alternative Installations (Git Repo / Local Dev)</b></summary>
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Method B: Install directly from GitHub
|
|
85
|
+
pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git
|
|
86
|
+
|
|
87
|
+
# Method C: Clone & install locally
|
|
88
|
+
git clone https://github.com/shanliuling/dsh-image-gen.git
|
|
89
|
+
pnpm dsh plugin --profile web add ./dsh-image-gen
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
</details>
|
|
93
|
+
|
|
94
|
+
### 2. Configure Provider & Workspace Settings
|
|
95
|
+
|
|
96
|
+
Open DSH Web (`http://localhost:3080`):
|
|
97
|
+
|
|
98
|
+
1. Navigate to **Settings â Plugins â Image generation**.
|
|
99
|
+
2. Select a Provider. Enter an API key for cloud providers; for local ComfyUI, enter its URL and import an API Format Workflow JSON using `{{prompt}}` for the prompt and optional `{{seed}}` for the seed. For image editing, put `{{image}}` (exactly once) in the LoadImage `image` input; the plugin uploads the source image and fills in the stored filename. ComfyUI supports importing multiple named workflows with one active at a time, and the Agent can also pick one by name via the optional `workflow` tool parameter.
|
|
100
|
+
3. Optionally enable **Save to workspace** (enabled by default) and specify subfolder, then click **Save**.
|
|
101
|
+
|
|
102
|
+
<div align="center">
|
|
103
|
+
<img src="docs/assets/settings-preview.png?v=0.1.7" alt="Settings preview" width="720" />
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
### 3. Generate Images in Chat
|
|
107
|
+
|
|
108
|
+
Simply prompt in the chat input:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
Generate a minimalist modern architecture living room illustration.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The Agent will call `generate_image` and return the image directly in the conversation stream.
|
|
115
|
+
|
|
116
|
+
### 4. Browse Native Image Gallery
|
|
117
|
+
|
|
118
|
+
Click the **`[Gallery]`** Tab in the top navigation bar to browse and search all generated images across conversations:
|
|
119
|
+
|
|
120
|
+
<div align="center">
|
|
121
|
+
<img src="docs/assets/gallery-preview.png" alt="Gallery preview" width="820" />
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## ⨠Key Features
|
|
127
|
+
|
|
128
|
+
- đŦ **In-Chat Image Generation**: Tell your Agent what you want to draw without switching tabs or tools.
|
|
129
|
+
- đŧī¸ **Native Image Gallery**: Dedicated "Gallery" tab automatically collecting all generated images with keyword search, provider filtering, single-item deletion (with confirmation and persistent tombstones), and quick copy/download.
|
|
130
|
+
- đ **Interactive Image Tools**: High-res fullscreen preview, one-click copy to clipboard, local download, and open in new tab.
|
|
131
|
+
- đ¨ **Multi-Provider Support**: Supports Google Gemini, OpenAI Images, OpenAI Compatible API, ByteDance Seedream / Volcengine Ark, Aliyun DashScope (Wanx / Qwen-Image), and local ComfyUI workflows.
|
|
132
|
+
- đ **BYOK (Bring Your Own Key)**: Uses your own API keys managed securely by DSH credentials service with write-only protection.
|
|
133
|
+
- đŧī¸ **Durable Session Persistence**: Images integrate with DSH Attachment and conversation lifecycle, preserved across reloads.
|
|
134
|
+
- đž **Workspace File Output**: By default each generated image is also written as a file into the current session workspace; the tool result carries the absolute file path. Can be disabled or re-pointed in settings.
|
|
135
|
+
- âī¸ **Native Web Settings**: Configure providers, keys, models, and endpoints directly in DSH settings.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## đĻ Supported Providers
|
|
140
|
+
|
|
141
|
+
| Provider | Default Model | Default Endpoint / Base URL |
|
|
142
|
+
| :--- | :--- | :--- |
|
|
143
|
+
| **Google Gemini** | `gemini-3.1-flash-image` | `https://generativelanguage.googleapis.com/v1beta/interactions` |
|
|
144
|
+
| **OpenAI Images** | `gpt-image-2` | `https://api.openai.com/v1` |
|
|
145
|
+
| **OpenAI Compatible** | Custom | Custom Base URL |
|
|
146
|
+
| **ByteDance Seedream / Volcengine Ark** | `doubao-seedream-5-0-260128` | `https://ark.cn-beijing.volces.com/api/v3` |
|
|
147
|
+
| **Aliyun DashScope / Wanx** | `wanx2.1-t2i-turbo` | `https://dashscope.aliyuncs.com/api/v1` |
|
|
148
|
+
| **Local ComfyUI (text-to-image & image-to-image)** | Imported API Format Workflow | `http://127.0.0.1:8188` |
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## đ ī¸ Local Development
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
git clone https://github.com/shanliuling/dsh-image-gen.git
|
|
156
|
+
cd dsh-image-gen
|
|
157
|
+
|
|
158
|
+
pnpm install
|
|
159
|
+
pnpm run typecheck
|
|
160
|
+
pnpm run test
|
|
161
|
+
pnpm run build
|
|
162
|
+
|
|
163
|
+
pnpm run pack:check
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## đ License
|
|
169
|
+
|
|
170
|
+
Open-sourced under the [MIT License](LICENSE).
|
|
171
|
+
|
|
172
|
+
If this plugin helps you, feel free to give it a âī¸ **Star**!
|