dsh-image-gen 0.1.1 → 0.1.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.
- package/README.md +158 -158
- package/README.zh-CN.md +158 -158
- package/lib/client.js +146 -37
- package/lib/client.js.map +1 -1
- package/lib/types/client/index.d.ts +7 -0
- package/package.json +124 -122
- package/README.en.md +0 -158
package/package.json
CHANGED
|
@@ -1,122 +1,124 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-image-gen",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Bring ChatGPT-like image generation to DeepSeek Harness — Gemini, OpenAI, Seedream & 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.zh-CN.md",
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"@deepseek-ai/dsh-
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/dsh-client-
|
|
49
|
-
"@deepseek-ai/dsh-client-ui-settings",
|
|
50
|
-
"@deepseek-ai/dsh-client-ui-
|
|
51
|
-
"@deepseek-ai/dsh-client-
|
|
52
|
-
],
|
|
53
|
-
"platform": "web"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"@deepseek-ai/
|
|
86
|
-
"@deepseek-ai/dsh-
|
|
87
|
-
"@deepseek-ai/dsh-
|
|
88
|
-
"@deepseek-ai/dsh-
|
|
89
|
-
"@deepseek-ai/dsh-
|
|
90
|
-
"@deepseek-ai/dsh-
|
|
91
|
-
"@deepseek-ai/
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"@deepseek-ai/
|
|
96
|
-
"@deepseek-ai/dsh-
|
|
97
|
-
"@deepseek-ai/dsh-
|
|
98
|
-
"@deepseek-ai/
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"@deepseek-ai/
|
|
103
|
-
"@deepseek-ai/dsh-
|
|
104
|
-
"@deepseek-ai/dsh-
|
|
105
|
-
"@deepseek-ai/dsh-
|
|
106
|
-
"@deepseek-ai/dsh-
|
|
107
|
-
"@deepseek-ai/dsh-
|
|
108
|
-
"@deepseek-ai/
|
|
109
|
-
"@
|
|
110
|
-
"@
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
|
|
122
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-image-gen",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Bring ChatGPT-like image generation to DeepSeek Harness — Gemini, OpenAI, Seedream & 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.zh-CN.md",
|
|
37
|
+
"LICENSE"
|
|
38
|
+
],
|
|
39
|
+
"dsh": {
|
|
40
|
+
"bundle": {
|
|
41
|
+
"patch": "./cordis.patch.yml"
|
|
42
|
+
},
|
|
43
|
+
"client": {
|
|
44
|
+
"inject": [
|
|
45
|
+
"@deepseek-ai/dsh-client-connection",
|
|
46
|
+
"@deepseek-ai/dsh-api-remotes",
|
|
47
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
48
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
49
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins",
|
|
50
|
+
"@deepseek-ai/dsh-client-ui-tool",
|
|
51
|
+
"@deepseek-ai/dsh-client-locale"
|
|
52
|
+
],
|
|
53
|
+
"platform": "web"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"typecheck": "tsc --noEmit",
|
|
58
|
+
"build": "tsc && tsdown",
|
|
59
|
+
"prepare": "pnpm run build",
|
|
60
|
+
"test": "vitest run",
|
|
61
|
+
"pack:check": "pnpm pack --dry-run"
|
|
62
|
+
},
|
|
63
|
+
"engines": {
|
|
64
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
65
|
+
},
|
|
66
|
+
"license": "MIT",
|
|
67
|
+
"keywords": [
|
|
68
|
+
"deepseek",
|
|
69
|
+
"deepseek-harness",
|
|
70
|
+
"dsh",
|
|
71
|
+
"dsh-plugin",
|
|
72
|
+
"ai-agent",
|
|
73
|
+
"image-generation",
|
|
74
|
+
"ai-image-generation",
|
|
75
|
+
"multimodal",
|
|
76
|
+
"gemini",
|
|
77
|
+
"openai",
|
|
78
|
+
"openai-compatible",
|
|
79
|
+
"seedream",
|
|
80
|
+
"volcengine",
|
|
81
|
+
"byok",
|
|
82
|
+
"cordis"
|
|
83
|
+
],
|
|
84
|
+
"peerDependencies": {
|
|
85
|
+
"@deepseek-ai/cordis": ">=4.0.0 <5",
|
|
86
|
+
"@deepseek-ai/dsh-attachment": ">=0.1.0-rc.5 <0.2.0",
|
|
87
|
+
"@deepseek-ai/dsh-api-remotes": ">=0.1.0-rc.5 <0.2.0",
|
|
88
|
+
"@deepseek-ai/dsh-client-connection": ">=0.1.0-rc.5 <0.2.0",
|
|
89
|
+
"@deepseek-ai/dsh-client-runtime": ">=0.1.0-rc.5 <0.2.0",
|
|
90
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.0-rc.5 <0.2.0",
|
|
91
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": ">=0.1.0-rc.5 <0.2.0",
|
|
92
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.0-rc.5 <0.2.0",
|
|
93
|
+
"@deepseek-ai/dsh-client-ui-tool": ">=0.1.0-rc.5 <0.2.0",
|
|
94
|
+
"@deepseek-ai/dsh-credentials": ">=0.1.0-rc.5 <0.2.0",
|
|
95
|
+
"@deepseek-ai/dsh-host-webserver": ">=0.1.0-rc.5 <0.2.0",
|
|
96
|
+
"@deepseek-ai/dsh-settings": ">=0.1.0-rc.5 <0.2.0",
|
|
97
|
+
"@deepseek-ai/dsh-tools": ">=0.1.0-rc.5 <0.2.0",
|
|
98
|
+
"@deepseek-ai/schemastery": ">=3.18.0 <4",
|
|
99
|
+
"react": ">=18.2.0 <19"
|
|
100
|
+
},
|
|
101
|
+
"devDependencies": {
|
|
102
|
+
"@deepseek-ai/cordis": "4.0.1",
|
|
103
|
+
"@deepseek-ai/dsh-attachment": "0.1.0-rc.6",
|
|
104
|
+
"@deepseek-ai/dsh-api-remotes": "0.1.0-rc.6",
|
|
105
|
+
"@deepseek-ai/dsh-client-connection": "0.1.0-rc.6",
|
|
106
|
+
"@deepseek-ai/dsh-client-runtime": "0.1.0-rc.6",
|
|
107
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.6",
|
|
108
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.0-rc.6",
|
|
109
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.6",
|
|
110
|
+
"@deepseek-ai/dsh-client-ui-tool": "0.1.0-rc.6",
|
|
111
|
+
"@deepseek-ai/dsh-credentials": "0.1.0-rc.6",
|
|
112
|
+
"@deepseek-ai/dsh-host-webserver": "0.1.0-rc.6",
|
|
113
|
+
"@deepseek-ai/dsh-settings": "0.1.0-rc.6",
|
|
114
|
+
"@deepseek-ai/dsh-tools": "0.1.0-rc.6",
|
|
115
|
+
"@deepseek-ai/schemastery": "3.18.1",
|
|
116
|
+
"@types/node": "^22.20.0",
|
|
117
|
+
"@types/react": "~18.3.1",
|
|
118
|
+
"react": "^18.2.0",
|
|
119
|
+
"tsdown": "^0.22.2",
|
|
120
|
+
"typescript": "^6.0.3",
|
|
121
|
+
"vitest": "^4.1.8"
|
|
122
|
+
},
|
|
123
|
+
"packageManager": "pnpm@11.7.0"
|
|
124
|
+
}
|
package/README.en.md
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
# 🎨 dsh-image-gen
|
|
4
|
-
|
|
5
|
-
### Native Image Generation Plugin for DeepSeek Harness (DSH)
|
|
6
|
-
|
|
7
|
-
**Bring ChatGPT-like image generation into DeepSeek Harness conversation flows.**
|
|
8
|
-
|
|
9
|
-
Supports Google Gemini, OpenAI Images, OpenAI Compatible APIs, ByteDance Seedream / Volcengine Ark.
|
|
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>Just prompt your DeepSeek Harness Agent:</b></p>
|
|
21
|
-
|
|
22
|
-
```text
|
|
23
|
-
Install the image generation plugin by running: pnpm dsh plugin --profile web add dsh-image-gen
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
<p align="center"><sub>(Or run manually in terminal: <code>pnpm dsh plugin --profile web add dsh-image-gen</code>)</sub></p>
|
|
27
|
-
|
|
28
|
-
<br />
|
|
29
|
-
|
|
30
|
-
<p align="center">Once installed, configure your API Key in DSH Settings and prompt your Agent:</p>
|
|
31
|
-
|
|
32
|
-
```text
|
|
33
|
-
Create an illustration of a cyberpunk cat in a neon rainy street.
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
<p align="center">The Agent will automatically invoke <code>generate_image</code> and render the generated image directly in the conversation flow.</p>
|
|
37
|
-
|
|
38
|
-
<br />
|
|
39
|
-
|
|
40
|
-
<img src="docs/assets/chat-preview.png" alt="Conversational image generation preview" width="820" />
|
|
41
|
-
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## 💡 What Problem Does It Solve?
|
|
47
|
-
|
|
48
|
-
**`dsh-image-gen` is an open-source multimodal image generation bundle built specifically for DeepSeek Harness (DSH).**
|
|
49
|
-
|
|
50
|
-
DeepSeek Harness already lets Agents dispatch tools to accomplish complex tasks; this plugin equips DSH with native **multimodal image generation capabilities**:
|
|
51
|
-
|
|
52
|
-
```mermaid
|
|
53
|
-
graph LR
|
|
54
|
-
A[User Prompt] --> B[DeepSeek Harness Agent]
|
|
55
|
-
B --> C[generate_image Tool]
|
|
56
|
-
C --> D[Gemini / OpenAI / Seedream]
|
|
57
|
-
D --> E[Image Payload]
|
|
58
|
-
E --> F[Conversation Stream]
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## 🚀 Quick Start
|
|
64
|
-
|
|
65
|
-
### 1. Install Plugin
|
|
66
|
-
|
|
67
|
-
Run the following command in your DeepSeek Harness workspace root:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
# Recommended: Install and register plugin via pnpm
|
|
71
|
-
pnpm dsh plugin --profile web add dsh-image-gen
|
|
72
|
-
|
|
73
|
-
# If dsh is installed globally:
|
|
74
|
-
dsh plugin --profile web add dsh-image-gen
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
<details>
|
|
78
|
-
<summary><b>🛠️ Advanced Installation (Git Repository / Local Dev)</b></summary>
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
# Option B: Direct install from GitHub repo
|
|
82
|
-
pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git
|
|
83
|
-
|
|
84
|
-
# Option C: Local clone for development
|
|
85
|
-
git clone https://github.com/shanliuling/dsh-image-gen.git
|
|
86
|
-
pnpm dsh plugin --profile web add ./dsh-image-gen
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
</details>
|
|
90
|
-
|
|
91
|
-
### 2. Configure API Key
|
|
92
|
-
|
|
93
|
-
Open DSH Web UI (default `http://localhost:3080`):
|
|
94
|
-
|
|
95
|
-
1. Go to **Settings → Plugins → Image generation**.
|
|
96
|
-
2. Select your Provider, enter your API Key, and click **Save**.
|
|
97
|
-
|
|
98
|
-
<div align="center">
|
|
99
|
-
<img src="docs/assets/settings-preview.png" alt="Settings Card Preview" width="720" />
|
|
100
|
-
</div>
|
|
101
|
-
|
|
102
|
-
### 3. Start Generating Images in Chat
|
|
103
|
-
|
|
104
|
-
Simply prompt in the chat input:
|
|
105
|
-
|
|
106
|
-
```text
|
|
107
|
-
Generate a minimalist illustration of a modern architectural living room.
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
The Agent will automatically invoke `generate_image` and render the result in the conversation.
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## ✨ Key Features
|
|
115
|
-
|
|
116
|
-
- 💬 **In-Conversation Image Generation**: No need to switch between external websites or manually copy prompts; ask your Agent naturally.
|
|
117
|
-
- 🎨 **Multi-Provider Support**: Out-of-the-box support for Google Gemini, OpenAI Images, OpenAI Compatible APIs (OneAPI, NewAPI), and ByteDance Seedream / Volcengine Ark. Models and endpoints can be customized directly in the settings UI.
|
|
118
|
-
- 🔑 **BYOK (Bring Your Own Key)**: Uses your own API credentials securely managed through DSH's write-isolated `credentials` service. Keys are never saved in plain text on the frontend.
|
|
119
|
-
- 🖼️ **Durable Session Attachments**: Images are attached to DSH's native Attachment / Conversation system and remain visible when returning to historical sessions.
|
|
120
|
-
- ⚙️ **Native Settings UI**: Change providers, API keys, models, and endpoints directly inside the DSH Web UI without manual config file editing.
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## 📦 Supported Providers
|
|
125
|
-
|
|
126
|
-
| Provider | Default Model | Default Endpoint / Base URL |
|
|
127
|
-
| :--- | :--- | :--- |
|
|
128
|
-
| **Google Gemini** | `gemini-3.1-flash-image` | `https://generativelanguage.googleapis.com/v1beta/interactions` |
|
|
129
|
-
| **OpenAI Images** | `gpt-image-2` | `https://api.openai.com/v1` |
|
|
130
|
-
| **OpenAI Compatible** | Custom | Custom Base URL |
|
|
131
|
-
| **ByteDance Seedream / Volcengine** | `doubao-seedream-5-0-260128` | `https://ark.cn-beijing.volces.com/api/v3` |
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
## 🛠️ Development
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
# Clone repository
|
|
139
|
-
git clone https://github.com/shanliuling/dsh-image-gen.git
|
|
140
|
-
cd dsh-image-gen
|
|
141
|
-
|
|
142
|
-
# Install dependencies and build
|
|
143
|
-
pnpm install
|
|
144
|
-
pnpm run typecheck
|
|
145
|
-
pnpm run test
|
|
146
|
-
pnpm run build
|
|
147
|
-
|
|
148
|
-
# Check package payload
|
|
149
|
-
pnpm run pack:check
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## 📄 License
|
|
155
|
-
|
|
156
|
-
This project is licensed under the [MIT License](LICENSE).
|
|
157
|
-
|
|
158
|
-
If this plugin helps you, consider giving it a ⭐️ **Star**!
|