dsh-remote-bridge 2.7.0 → 2.7.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 +19 -5
- package/README.md +16 -5
- package/docs/api/asyncapi.yaml +1 -1
- package/docs/api/openapi.yaml +2 -2
- package/lib/index.js +17 -3
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<img alt="Version" src="https://img.shields.io/badge/version-v2.7.
|
|
12
|
+
<img alt="Version" src="https://img.shields.io/badge/version-v2.7.1-087f8c">
|
|
13
13
|
<img alt="DSH plugin" src="https://img.shields.io/badge/DeepSeek_Harness-plugin-1f2328">
|
|
14
14
|
<img alt="Platforms" src="https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-586069">
|
|
15
15
|
<img alt="License" src="https://img.shields.io/badge/license-AGPL--3.0-2da44e">
|
|
@@ -102,10 +102,10 @@ dsh plugin --profile web add dsh-remote-bridge
|
|
|
102
102
|
dsh plugin --profile web add dsh-remote-bridge --registry https://registry.npmmirror.com
|
|
103
103
|
|
|
104
104
|
# 2. tarball from the GitHub release
|
|
105
|
-
dsh plugin --profile web add https://github.com/westanke/dsh-remote-bridge/releases/download/v2.7.
|
|
105
|
+
dsh plugin --profile web add https://github.com/westanke/dsh-remote-bridge/releases/download/v2.7.1/dsh-remote-bridge-v2.7.1.tgz
|
|
106
106
|
|
|
107
107
|
# 3. tarball from the Gitee release (faster from mainland China)
|
|
108
|
-
dsh plugin --profile web add https://gitee.com/westanke/dsh-remote-bridge/releases/download/v2.7.
|
|
108
|
+
dsh plugin --profile web add https://gitee.com/westanke/dsh-remote-bridge/releases/download/v2.7.1/dsh-remote-bridge-v2.7.1.tgz
|
|
109
109
|
|
|
110
110
|
npx @deepseek-ai/dsh web
|
|
111
111
|
```
|
|
@@ -122,7 +122,7 @@ Restart DSH after installation, then open settings — The section is titled **
|
|
|
122
122
|
To install a downloaded release archive:
|
|
123
123
|
|
|
124
124
|
```sh
|
|
125
|
-
dsh plugin --profile web add ./dsh-remote-bridge-v2.7.
|
|
125
|
+
dsh plugin --profile web add ./dsh-remote-bridge-v2.7.1.tgz
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
## First connection
|
|
@@ -386,6 +386,10 @@ pnpm pack
|
|
|
386
386
|
|
|
387
387
|
v2.5.0 was verified on DSH **0.2.1-rc.2** on real hardware: all 14/14 host services injected, the three jobs endpoints exercised, and the permission catalog returned the kernel's real three presets. The development baseline is upstream `dsh-v0.2.1-rc.2` (commit `687f282e8625c6b8d11ff58211a90524be2e4317`); see `engines.dsh` above for the supported range. CI covers Windows, Ubuntu, and macOS.
|
|
388
388
|
|
|
389
|
+
**v2.7.1 verification status**: 76 test files / **701 cases** green; `typecheck`, `docs:check`, and the
|
|
390
|
+
build all pass. This release touches only `agentFor` in `src/host/dsh-0.2-bridge.ts` plus its regression
|
|
391
|
+
tests; every other byte is identical to v2.7.0.
|
|
392
|
+
|
|
389
393
|
**v2.7.0 verification status**: 76 test files / 698 cases green, plus 8 Playwright browser cases
|
|
390
394
|
(including the 375px narrow-viewport contract); `typecheck`, `docs:check`, and the build all pass.
|
|
391
395
|
All four capabilities were exercised on an isolated DSH **0.2.1-rc.3** instance rather than inferred:
|
|
@@ -398,7 +402,17 @@ inside the zero-change set, and 4 slots retained with 0 removed.
|
|
|
398
402
|
|
|
399
403
|
## Project
|
|
400
404
|
|
|
401
|
-
- Version: `v2.7.
|
|
405
|
+
- Version: `v2.7.1`
|
|
406
|
+
- **v2.7.1 is a defect-fix release**: the kernel's `sessionController.resolveAgent()` returns an
|
|
407
|
+
`{ agent }` / `{ error }` **envelope**, not the Agent itself (`dsh-api-session-controller/lib/index.js:365-368`
|
|
408
|
+
`liveAgent()` and `:221-246` `resolve()` both have that shape). The bridge used to hand the envelope
|
|
409
|
+
straight to `fileUploads.upload()`, so the kernel reading `agent.session.header.origin` blew up with
|
|
410
|
+
`DSH_TYPEERROR: Cannot read properties of undefined (reading 'header')` — on a real device this showed up
|
|
411
|
+
as "sending a file always fails with 400/500 and the message points nowhere", breaking both attachment
|
|
412
|
+
upload and agent-preset selection. The bridge now detects the envelope, unwraps `.agent` on success, and
|
|
413
|
+
rethrows `.error` as-is (keeping the kernel's stable code, so "session not found" is no longer flattened
|
|
414
|
+
into "session not running"), while still accepting a bare object. Three regression tests pin all three
|
|
415
|
+
return shapes.
|
|
402
416
|
- **v2.7.0 aligns with DSH 0.2.1-rc.3 and lifts four capabilities**: (1) the model catalog now carries
|
|
403
417
|
`contextWindow` / `maxTokens` — the kernel's `ModelCatalogModel` only has id/name/description, so the
|
|
404
418
|
bridge resolves capacity through `llm.resolveModelInfo`, caching per `provider + model` for ten
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<img alt="Version" src="https://img.shields.io/badge/version-v2.7.
|
|
12
|
+
<img alt="Version" src="https://img.shields.io/badge/version-v2.7.1-087f8c">
|
|
13
13
|
<img alt="DSH plugin" src="https://img.shields.io/badge/DeepSeek_Harness-plugin-1f2328">
|
|
14
14
|
<img alt="Platforms" src="https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-586069">
|
|
15
15
|
<img alt="License" src="https://img.shields.io/badge/license-AGPL--3.0-2da44e">
|
|
@@ -93,10 +93,10 @@ dsh plugin --profile web add dsh-remote-bridge
|
|
|
93
93
|
dsh plugin --profile web add dsh-remote-bridge --registry https://registry.npmmirror.com
|
|
94
94
|
|
|
95
95
|
# ② GitHub Release 的 tarball
|
|
96
|
-
dsh plugin --profile web add https://github.com/westanke/dsh-remote-bridge/releases/download/v2.7.
|
|
96
|
+
dsh plugin --profile web add https://github.com/westanke/dsh-remote-bridge/releases/download/v2.7.1/dsh-remote-bridge-v2.7.1.tgz
|
|
97
97
|
|
|
98
98
|
# ③ Gitee Release 的 tarball(国内访问更快)
|
|
99
|
-
dsh plugin --profile web add https://gitee.com/westanke/dsh-remote-bridge/releases/download/v2.7.
|
|
99
|
+
dsh plugin --profile web add https://gitee.com/westanke/dsh-remote-bridge/releases/download/v2.7.1/dsh-remote-bridge-v2.7.1.tgz
|
|
100
100
|
|
|
101
101
|
npx @deepseek-ai/dsh web
|
|
102
102
|
```
|
|
@@ -112,7 +112,7 @@ npx @deepseek-ai/dsh web
|
|
|
112
112
|
从 GitHub Release 下载离线安装包时,可直接安装 tarball:
|
|
113
113
|
|
|
114
114
|
```sh
|
|
115
|
-
dsh plugin --profile web add ./dsh-remote-bridge-v2.7.
|
|
115
|
+
dsh plugin --profile web add ./dsh-remote-bridge-v2.7.1.tgz
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
## 第一次使用
|
|
@@ -419,6 +419,9 @@ v2.5.0 在 DSH **0.2.1-rc.2** 上完成真机验证:14/14 宿主服务全部
|
|
|
419
419
|
权限档位目录返回内核真实三档。开发基线为上游 `dsh-v0.2.1-rc.2`(commit `687f282e8625c6b8d11ff58211a90524be2e4317`),
|
|
420
420
|
兼容范围见上文 `engines.dsh`。CI 覆盖 Windows、Ubuntu 和 macOS。
|
|
421
421
|
|
|
422
|
+
**v2.7.1 的验证状态**:76 个测试文件 / **701 个用例**全绿、`typecheck`/`docs:check`/构建通过。
|
|
423
|
+
这一版只改 `src/host/dsh-0.2-bridge.ts` 的 `agentFor` 与对应回归测试,其余代码与 v2.7.0 逐字节相同。
|
|
424
|
+
|
|
422
425
|
**v2.7.0 的验证状态**:76 个测试文件 / 698 个用例全绿、8 个 Playwright 浏览器用例
|
|
423
426
|
(含 375px 窄屏契约)、`typecheck`/`docs:check`/构建通过。这一版的四项能力都在
|
|
424
427
|
DSH **0.2.1-rc.3** 隔离实例上**实跑验过**,不是静态推断:插件清单返回
|
|
@@ -430,7 +433,15 @@ DSH **0.2.1-rc.3** 隔离实例上**实跑验过**,不是静态推断:插件
|
|
|
430
433
|
|
|
431
434
|
## 项目信息
|
|
432
435
|
|
|
433
|
-
- 当前版本:`v2.7.
|
|
436
|
+
- 当前版本:`v2.7.1`
|
|
437
|
+
- **v2.7.1 是缺陷修复版**:内核 `sessionController.resolveAgent()` 返回的是 `{ agent }` / `{ error }`
|
|
438
|
+
**包装对象**而非 Agent 本体(`dsh-api-session-controller/lib/index.js:365-368` 的 `liveAgent()` 与
|
|
439
|
+
`:221-246` 的 `resolve()` 都是这个形状),桥此前把包装对象直接当 Agent 传给 `fileUploads.upload()`,
|
|
440
|
+
内核读 `agent.session.header.origin` 就炸成
|
|
441
|
+
`DSH_TYPEERROR: Cannot read properties of undefined (reading 'header')` —— 真机表现是
|
|
442
|
+
「发文件永远 400/500,报错信息完全指不到原因」,附件上传与 agent preset 选择两条路径都挂在这里。
|
|
443
|
+
现在识别包装形状、成功解出 `.agent`、失败原样抛 `.error`(保留内核稳定 code,「会话不存在」不再
|
|
444
|
+
被压成「会话没在跑」),同时保留裸对象兼容。新增 3 条回归测试钉住三种返回形状。
|
|
434
445
|
- **v2.7.0 是对齐 DSH 0.2.1-rc.3 的能力提升版**:四项 —— ①模型目录补上 `contextWindow` / `maxTokens`
|
|
435
446
|
(内核的 `ModelCatalogModel` 只有 id/name/description,容量得另走 `llm.resolveModelInfo`,桥按
|
|
436
447
|
`provider + model` 缓存 10 分钟、失败不缓存、内核自己给了就不覆盖);②插件清单多了右侧栏形态
|
package/docs/api/asyncapi.yaml
CHANGED
package/docs/api/openapi.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: 3.1.0
|
|
2
2
|
info:
|
|
3
3
|
title: DeepSeek Harness Mobile API
|
|
4
|
-
version: 2.7.
|
|
4
|
+
version: 2.7.1
|
|
5
5
|
description: Versioned file and chat BFF for mobile and third-party DSH clients. HTTP and HTTPS are both supported.
|
|
6
6
|
servers:
|
|
7
7
|
- url: http://127.0.0.1:3090/api/v1
|
|
@@ -24,7 +24,7 @@ paths:
|
|
|
24
24
|
properties:
|
|
25
25
|
ok: { type: boolean, const: true }
|
|
26
26
|
version: { type: string, const: v1 }
|
|
27
|
-
pluginVersion: { type: string, const: 2.7.
|
|
27
|
+
pluginVersion: { type: string, const: 2.7.1 }
|
|
28
28
|
/debug/host-services:
|
|
29
29
|
get:
|
|
30
30
|
operationId: hostServices
|
package/lib/index.js
CHANGED
|
@@ -2899,9 +2899,23 @@ function createDsh02ApiProxy(host, options = {}) {
|
|
|
2899
2899
|
args: [sessionId, agentPreset]
|
|
2900
2900
|
});
|
|
2901
2901
|
});
|
|
2902
|
-
/**
|
|
2902
|
+
/**
|
|
2903
|
+
* Ask the host for the Agent backing a session before agent-scoped calls.
|
|
2904
|
+
*
|
|
2905
|
+
* 🔴 `sessionController.resolveAgent()` 返回的是**包装对象**,不是 Agent 本体:
|
|
2906
|
+
* `{ agent }` 成功、`{ error }` 失败(内核
|
|
2907
|
+
* `dsh-api-session-controller/lib/index.js:365-368` 的 `liveAgent()` 与 `:221-246`
|
|
2908
|
+
* 的 `resolve()` 都是这个形状)。早先这里直接把包装对象当 Agent 返回,调用方读
|
|
2909
|
+
* `agent.session.header` 就变成读 `undefined.header`,真机上表现为
|
|
2910
|
+
* `DSH_TYPEERROR: Cannot read properties of undefined (reading 'header')` ——
|
|
2911
|
+
* 上传附件、选 agent preset 全挂在这里,而报错信息完全指不到真正的原因。
|
|
2912
|
+
*/
|
|
2903
2913
|
async function agentFor(sessionId) {
|
|
2904
|
-
const
|
|
2914
|
+
const resolved = await host.sessionController.resolveAgent(sessionId);
|
|
2915
|
+
const wrapped = resolved !== null && typeof resolved === "object" && ("agent" in resolved || "error" in resolved);
|
|
2916
|
+
const failure = wrapped ? resolved.error : void 0;
|
|
2917
|
+
if (failure !== void 0 && failure !== null) throw failure;
|
|
2918
|
+
const agent = wrapped ? resolved.agent : resolved;
|
|
2905
2919
|
if (agent === void 0 || agent === null) throw Object.assign(/* @__PURE__ */ new Error(`no live Agent for session ${sessionId}`), { code: "session/agent-unavailable" });
|
|
2906
2920
|
return agent;
|
|
2907
2921
|
}
|
|
@@ -3211,7 +3225,7 @@ function createDsh02ApiProxy(host, options = {}) {
|
|
|
3211
3225
|
}
|
|
3212
3226
|
//#endregion
|
|
3213
3227
|
//#region src/shared/version.ts
|
|
3214
|
-
const PLUGIN_VERSION = "2.7.
|
|
3228
|
+
const PLUGIN_VERSION = "2.7.1";
|
|
3215
3229
|
//#endregion
|
|
3216
3230
|
//#region src/host/capabilities.ts
|
|
3217
3231
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-remote-bridge",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "Versioned REST bridge for DeepSeek Harness: remote access for trusted clients (chat, files, devices) plus a Phone-settings panel inside the DSH WebUI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@11.19.0",
|