dsh-multi-chat 0.6.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -21
- package/README.zh.md +20 -21
- package/bin/dsh-multi-chat.mjs +5 -9
- package/lib/client.js +778 -0
- package/lib/client.js.map +1 -0
- package/{plugin/dsh-client-ui-multi-wall/lib → lib}/index.js +57 -69
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/client/WallToggle.d.ts +1 -1
- package/lib/types/client/WallToggle.d.ts.map +1 -0
- package/lib/types/client/WallToggle.js +36 -0
- package/lib/types/client/WallToggle.js.map +1 -0
- package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/client/WallView.d.ts +1 -1
- package/lib/types/client/WallView.d.ts.map +1 -0
- package/lib/types/client/WallView.js +218 -0
- package/lib/types/client/WallView.js.map +1 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/index.js +59 -0
- package/lib/types/client/index.js.map +1 -0
- package/lib/types/client/locales.d.ts.map +1 -0
- package/lib/types/client/locales.js +96 -0
- package/lib/types/client/locales.js.map +1 -0
- package/lib/types/client/store.d.ts.map +1 -0
- package/lib/types/client/store.js +27 -0
- package/lib/types/client/store.js.map +1 -0
- package/lib/types/client/wall-injected.d.ts.map +1 -0
- package/lib/types/client/wall-injected.js +76 -0
- package/lib/types/client/wall-injected.js.map +1 -0
- package/lib/types/gateway.d.ts +57 -0
- package/lib/types/gateway.d.ts.map +1 -0
- package/lib/types/gateway.js +566 -0
- package/lib/types/gateway.js.map +1 -0
- package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/index.d.ts +1 -16
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +550 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/invariant.d.ts.map +1 -0
- package/lib/types/invariant.js +26 -0
- package/lib/types/invariant.js.map +1 -0
- package/package.json +41 -17
- package/scripts/install-plugin.ps1 +6 -9
- package/src/client/WallToggle.module.css +26 -0
- package/src/client/WallToggle.tsx +52 -0
- package/src/client/WallView.module.css +190 -0
- package/src/client/WallView.tsx +406 -0
- package/src/client/index.ts +103 -0
- package/src/client/locales.ts +100 -0
- package/src/client/store.ts +40 -0
- package/src/client/wall-injected.ts +123 -0
- package/src/css-modules.d.ts +5 -0
- package/src/gateway.ts +627 -0
- package/src/index.ts +618 -0
- package/src/invariant.ts +34 -0
- package/plugin/dsh-client-ui-multi-wall/README.md +0 -26
- package/plugin/dsh-client-ui-multi-wall/README.zh.md +0 -26
- package/plugin/dsh-client-ui-multi-wall/cordis.patch.yml +0 -7
- package/plugin/dsh-client-ui-multi-wall/lib/client.js +0 -781
- package/plugin/dsh-client-ui-multi-wall/lib/invariant.js +0 -27
- package/plugin/dsh-client-ui-multi-wall/package.json +0 -88
- /package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/client/index.d.ts +0 -0
- /package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/client/locales.d.ts +0 -0
- /package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/client/store.d.ts +0 -0
- /package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/client/wall-injected.d.ts +0 -0
- /package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/invariant.d.ts +0 -0
package/README.md
CHANGED
|
@@ -67,18 +67,16 @@ npx dsh-multi-chat start --ports 3080,3081,3082
|
|
|
67
67
|
## Directory layout
|
|
68
68
|
|
|
69
69
|
```
|
|
70
|
-
|
|
70
|
+
dsh-multi-chat/ # single-package structure
|
|
71
71
|
lib/ # built artifacts (lib/index.js + lib/client.js + types)
|
|
72
|
-
src/ # source (
|
|
73
|
-
|
|
74
|
-
scripts/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
bin/dsh-multi-chat.mjs # cross-platform npx CLI (install/start/stop/gateway)
|
|
81
|
-
harness-src/ # official deepseek-harness source (dev/build reference)
|
|
72
|
+
src/ # source (node half + browser half)
|
|
73
|
+
bin/dsh-multi-chat.mjs # cross-platform npx CLI (install/start/stop/gateway)
|
|
74
|
+
scripts/
|
|
75
|
+
install-plugin.ps1 # pack + install into profile (DSH auto-mounts the bundle)
|
|
76
|
+
start-multi.ps1 / stop-multi.ps1 # start/stop multiple dsh web instances
|
|
77
|
+
gateway.mjs # token-authenticated reverse-proxy gateway (phone/remote)
|
|
78
|
+
cordis.patch.yml # DSH bundle layer declaration
|
|
79
|
+
harness-src/ # official deepseek-harness source (dev/build reference)
|
|
82
80
|
```
|
|
83
81
|
|
|
84
82
|
## Install & enable (Windows)
|
|
@@ -96,14 +94,14 @@ dsh web --port 3084
|
|
|
96
94
|
Or manual:
|
|
97
95
|
|
|
98
96
|
```bash
|
|
99
|
-
|
|
100
|
-
dsh plugin --profile web add
|
|
97
|
+
npm pack # produce a tarball (dsh-multi-chat-1.0.0.tgz)
|
|
98
|
+
dsh plugin --profile web add dsh-multi-chat-1.0.0.tgz # DSH adds the package to the bundle layer stack automatically
|
|
101
99
|
```
|
|
102
100
|
|
|
103
101
|
Uninstall (one command, nothing manual to clean up):
|
|
104
102
|
|
|
105
103
|
```bash
|
|
106
|
-
dsh plugin --profile web remove
|
|
104
|
+
dsh plugin --profile web remove dsh-multi-chat
|
|
107
105
|
```
|
|
108
106
|
|
|
109
107
|
## Usage
|
|
@@ -184,20 +182,21 @@ node bin/dsh-multi-chat.mjs gateway --target 127.0.0.1:3080 --token <token>
|
|
|
184
182
|
This plugin follows the official [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) client plugin spec:
|
|
185
183
|
|
|
186
184
|
- **Be found in the GitHub plugin ecosystem**: adding the [`dsh-plugin`](https://github.com/topics/dsh-plugin) topic to this repo makes it searchable on the official [`dsh-plugin` topic page](https://github.com/topics/dsh-plugin) (the officially recommended third-party discovery path).
|
|
187
|
-
- **Bilingual technical docs**:
|
|
185
|
+
- **Bilingual technical docs**: this repo ships `README.md` (English) and `README.zh.md` (Chinese) at the root, matching the bilingual convention of official `packages/client/*` plugins.
|
|
188
186
|
- **Purely additive, no core touching**: registers only the `conversation.view` / `sidebar.footer.action` list slots + `/multi/api/*` read-only routes, changing no official core logic.
|
|
189
187
|
|
|
190
|
-
##
|
|
188
|
+
## Building from source
|
|
191
189
|
|
|
192
|
-
|
|
190
|
+
The single-package layout uses `tsdown` for bundling and `tsc` for type declarations:
|
|
193
191
|
|
|
194
192
|
```bash
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
npx vitest run packages/client/ui-multi-wall # 14 tests
|
|
193
|
+
npm install
|
|
194
|
+
npm run build # tsc + tsdown → lib/
|
|
195
|
+
npx vitest run # tests
|
|
199
196
|
```
|
|
200
197
|
|
|
198
|
+
For development against the official harness, the `harness-src/` directory is a full DSH checkout used as the build/reference workspace.
|
|
199
|
+
|
|
201
200
|
## License
|
|
202
201
|
|
|
203
202
|
MIT
|
package/README.zh.md
CHANGED
|
@@ -67,18 +67,16 @@ npx dsh-multi-chat start --ports 3080,3081,3082
|
|
|
67
67
|
## 目录结构
|
|
68
68
|
|
|
69
69
|
```
|
|
70
|
-
|
|
70
|
+
dsh-multi-chat/ # 单包结构
|
|
71
71
|
lib/ # 已构建产物(lib/index.js + lib/client.js + 类型)
|
|
72
|
-
src/ #
|
|
73
|
-
|
|
74
|
-
scripts/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
bin/dsh-multi-chat.mjs # 跨平台 npx CLI(install/start/stop/gateway)
|
|
81
|
-
harness-src/ # 官方 deepseek-harness 源码(开发/构建用)
|
|
72
|
+
src/ # 源码(node half + browser half)
|
|
73
|
+
bin/dsh-multi-chat.mjs # 跨平台 npx CLI(install/start/stop/gateway)
|
|
74
|
+
scripts/
|
|
75
|
+
install-plugin.ps1 # 打包 + 装进 profile(DSH 自动挂载 bundle 层)
|
|
76
|
+
start-multi.ps1 / stop-multi.ps1 # 启停多个 dsh web 实例
|
|
77
|
+
gateway.mjs # 带令牌认证的反向代理网关(手机/远程访问)
|
|
78
|
+
cordis.patch.yml # DSH bundle 层声明
|
|
79
|
+
harness-src/ # 官方 deepseek-harness 源码(开发/构建用)
|
|
82
80
|
```
|
|
83
81
|
|
|
84
82
|
## 安装与启用(Windows)
|
|
@@ -96,14 +94,14 @@ dsh web --port 3084
|
|
|
96
94
|
或手动:
|
|
97
95
|
|
|
98
96
|
```bash
|
|
99
|
-
|
|
100
|
-
dsh plugin --profile web add
|
|
97
|
+
npm pack # 得到 tarball (dsh-multi-chat-1.0.0.tgz)
|
|
98
|
+
dsh plugin --profile web add dsh-multi-chat-1.0.0.tgz # DSH 自动把包加入 bundle 层栈
|
|
101
99
|
```
|
|
102
100
|
|
|
103
101
|
卸载(一条命令,无需手动清理任何文件):
|
|
104
102
|
|
|
105
103
|
```bash
|
|
106
|
-
dsh plugin --profile web remove
|
|
104
|
+
dsh plugin --profile web remove dsh-multi-chat
|
|
107
105
|
```
|
|
108
106
|
|
|
109
107
|
## 使用
|
|
@@ -184,20 +182,21 @@ node bin/dsh-multi-chat.mjs gateway --target 127.0.0.1:3080 --token <口令>
|
|
|
184
182
|
本插件遵循 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 官方 client 插件规范:
|
|
185
183
|
|
|
186
184
|
- **在 GitHub 插件生态中被发现**:给本仓库添加 [`dsh-plugin`](https://github.com/topics/dsh-plugin) topic,即可在官方 [`dsh-plugin` topic 页](https://github.com/topics/dsh-plugin) 被搜索到(官方推荐的第三方插件发现方式)。
|
|
187
|
-
-
|
|
185
|
+
- **双语技术文档**:本仓库在根目录提供 `README.md`(英文)和 `README.zh.md`(中文),与官方 `packages/client/*` 插件的双语惯例一致。
|
|
188
186
|
- **纯增量、不碰核心**:只注册 `conversation.view` / `sidebar.footer.action` 两个列表槽位 + `/multi/api/*` 只读路由,不改动任何官方核心逻辑。
|
|
189
187
|
|
|
190
|
-
##
|
|
188
|
+
## 从源码构建
|
|
191
189
|
|
|
192
|
-
`
|
|
190
|
+
单包结构使用 `tsdown` 进行打包,`tsc` 生成类型声明:
|
|
193
191
|
|
|
194
192
|
```bash
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
npx vitest run packages/client/ui-multi-wall # 14 项测试
|
|
193
|
+
npm install
|
|
194
|
+
npm run build # tsc + tsdown → lib/
|
|
195
|
+
npx vitest run # 测试
|
|
199
196
|
```
|
|
200
197
|
|
|
198
|
+
开发时可借助 `harness-src/` 目录(完整 DSH 源码)作为构建和参考工作区。
|
|
199
|
+
|
|
201
200
|
## License
|
|
202
201
|
|
|
203
202
|
MIT
|
package/bin/dsh-multi-chat.mjs
CHANGED
|
@@ -29,7 +29,6 @@ import { fileURLToPath } from 'node:url'
|
|
|
29
29
|
|
|
30
30
|
const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..')
|
|
31
31
|
const STATE_FILE = join(ROOT, '.wall-pids.json')
|
|
32
|
-
const PLUGIN_DIR = join(ROOT, 'plugin', 'dsh-client-ui-multi-wall')
|
|
33
32
|
|
|
34
33
|
// Node ≥22 warns about spawn(shell:true, args[]) (DEP0190). The args here are
|
|
35
34
|
// fixed strings we control (numeric ports, our own paths), so the warning is
|
|
@@ -123,11 +122,11 @@ const INSTALL_HELP = `dsh-multi-chat install — install the multi-window wall p
|
|
|
123
122
|
Usage:
|
|
124
123
|
dsh-multi-chat install [--profile web]
|
|
125
124
|
|
|
126
|
-
Packs
|
|
127
|
-
with \`dsh plugin --profile <p> add\`. The
|
|
125
|
+
Packs the dsh-multi-chat package and installs the tarball into the profile
|
|
126
|
+
with \`dsh plugin --profile <p> add\`. The package declares \`dsh.bundle.patch\`
|
|
128
127
|
(pointing at its own cordis.patch.yml), so DSH mounts it automatically as a
|
|
129
128
|
bundle layer — no manual profile patch is needed. Restart dsh web afterwards.
|
|
130
|
-
Uninstall with: dsh plugin --profile <p> remove
|
|
129
|
+
Uninstall with: dsh plugin --profile <p> remove dsh-multi-chat
|
|
131
130
|
`
|
|
132
131
|
|
|
133
132
|
async function cmdInstall(args) {
|
|
@@ -137,17 +136,14 @@ async function cmdInstall(args) {
|
|
|
137
136
|
else if (args[i] === '--help') { process.stdout.write(INSTALL_HELP); return }
|
|
138
137
|
else throw new Error(`unknown install option: ${args[i]}`)
|
|
139
138
|
}
|
|
140
|
-
if (!existsSync(PLUGIN_DIR)) {
|
|
141
|
-
throw new Error(`plugin directory not found: ${PLUGIN_DIR} — run from the dsh-multi-chat package root`)
|
|
142
|
-
}
|
|
143
139
|
|
|
144
|
-
// 1) pack the
|
|
140
|
+
// 1) pack the tarball into a STABLE location under DSH home. The
|
|
145
141
|
// profile records a `file:` dependency on the tarball, so a temp directory
|
|
146
142
|
// (deleted after install) would break every later `dsh plugin add` — the
|
|
147
143
|
// tarball must outlive the CLI run. (npm pack is offline-safe.)
|
|
148
144
|
const stableDir = join(dshHome(), 'profiles', profile, 'plugins')
|
|
149
145
|
mkdirSync(stableDir, { recursive: true })
|
|
150
|
-
const packOut = run('npm', ['pack', '--pack-destination', stableDir], { cwd:
|
|
146
|
+
const packOut = run('npm', ['pack', '--pack-destination', stableDir], { cwd: ROOT })
|
|
151
147
|
const tarballName = packOut.trim().split(/\r?\n/).pop()
|
|
152
148
|
const tarball = join(stableDir, tarballName)
|
|
153
149
|
if (!existsSync(tarball)) throw new Error('npm pack produced no tarball')
|