@yanglaofish/dsh-proxy-pro 2.0.1 → 2.0.3
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 +19 -1
- package/docs/ACCEPTANCE.md +11 -1
- package/docs/LESSONS.md +1251 -1217
- package/lib/client.js +5 -3
- package/lib/index.js +909 -902
- package/lib/proxy-core.js +17 -2
- package/lib/tool-schemas.js +13 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
> 全部踩坑与设计决策见 [`docs/LESSONS.md`](docs/LESSONS.md)(必读),规格与验收清单见 [`docs/SPEC.md`](docs/SPEC.md)。
|
|
15
15
|
|
|
16
|
+
`2.0.3` 修复新版 DSH 严格输出校验下 `proxy_test` 无法返回结果的问题:补齐代理与直连徽标的 Schema 声明,保留原有诊断和严格字段检查。
|
|
17
|
+
|
|
16
18
|
## 安装
|
|
17
19
|
|
|
18
20
|
两种方式任选其一(npm 包已发布,拉取即用、免构建授权):
|
|
@@ -135,6 +137,13 @@ dsh-proxy-pro
|
|
|
135
137
|
|
|
136
138
|
## 开发
|
|
137
139
|
|
|
140
|
+
本地测试使用 Node.js 24(与发布 CI 一致)。多 profile 分别运行在独立进程中,
|
|
141
|
+
可以使用不同监听端口并共用同一个上游代理;每个页面只能向自己的 `host:port`
|
|
142
|
+
提交插件配置。此校验不影响代理端口、内网源或 `NO_PROXY`。
|
|
143
|
+
|
|
144
|
+
启动会在插件初始化完成前应用已保存的代理配置;默认关闭时不改动已有传输。
|
|
145
|
+
状态、系统提示和诊断提示会隐藏代理 URL 中的认证信息,连接参数及配置编辑框仍保留完整值。
|
|
146
|
+
|
|
138
147
|
```sh
|
|
139
148
|
# 语法检查
|
|
140
149
|
node --check lib/index.js lib/client.js lib/proxy-core.js
|
|
@@ -143,6 +152,15 @@ node --check lib/index.js lib/client.js lib/proxy-core.js
|
|
|
143
152
|
npm test
|
|
144
153
|
```
|
|
145
154
|
|
|
155
|
+
装有官方 Windows 桌面版时,可额外运行真实内核验证(替换为本机安装目录):
|
|
156
|
+
|
|
157
|
+
```powershell
|
|
158
|
+
node scripts/verify-desktop-runtime.mjs 'E:\Agenttools\deepseek\app'
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
该验证在两个隔离进程内加载桌面版自带依赖,以本地测试代理检查认证、启动首请求、
|
|
162
|
+
直连和关闭一方后的进程隔离,同时执行真实工具 schema 编译;不会修改已安装的 profile。
|
|
163
|
+
|
|
146
164
|
- 纯逻辑层 `lib/proxy-core.js` 零 DSH 依赖,可独立单测。
|
|
147
165
|
- **GitHub 安装模式**:改代码需 `git push` 后 `pnpm update @yanglaofish/dsh-proxy-pro` 再重启 `dsh web` 生效。
|
|
148
166
|
- **npm 安装模式**:bump 版本 → `npm publish --access=public --registry=https://registry.npmjs.org --replace-registry-host=never` 后,profile 内 `pnpm add @yanglaofish/dsh-proxy-pro@最新版` 再重启 `dsh web` 生效。(scoped 包发布必须 `--access=public`;本机 npm 默认 registry 被公司镜像接管且 `replace-registry-host` 会重写 GET——发布与验证一律显式 `--registry` 官方源 + `--replace-registry-host=never`。)
|
|
@@ -150,4 +168,4 @@ npm test
|
|
|
150
168
|
|
|
151
169
|
## 许可
|
|
152
170
|
|
|
153
|
-
MIT
|
|
171
|
+
MIT
|
package/docs/ACCEPTANCE.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# dsh-proxy-pro v0.1 验收清单(自验版)
|
|
2
2
|
|
|
3
|
+
## 2.0.3 严格输出 Schema 补丁(2026-10-22)
|
|
4
|
+
|
|
5
|
+
- 对应 [issue #2](https://github.com/yanglaofish/dsh-proxy-pro/issues/2):`proxy_test` 实际返回的 `proxyBadge`、`directBadge` 漏声明,导致新版 DSH 拒绝整个工具结果。
|
|
6
|
+
- 输出 Schema 补齐两个徽标,内含必填 `text` 和 `tone`(`ok` / `warn` / `bad`);徽标本身可省略,以兼容无效 URL 的提前返回。保留 `additionalProperties: false`。
|
|
7
|
+
- 新增实际工具执行与真实 DSH 校验器的合同回归,覆盖四个工具、双通道成功、单通道失败、407 认证、403/404、网关及 DNS 故障、代理关闭、无效 URL;同时验证未知字段、非法颜色和缺失徽标文本仍被拒绝。
|
|
8
|
+
- 本地先复现相同的未声明属性错误,再修复;使用 `@deepseek-ai/dsh-tools@0.2.1-rc.2`,完整测试 76 项通过、0 失败、0 跳过。测试传输使用隔离替身,不将此记录描述为公网或桌面人工验收。
|
|
9
|
+
- 自基线 `663e5c1` 的独立规范与需求审查分别为 0 项遗留问题;语法、差异空白检查及 npm 归档中的徽标声明检查通过。
|
|
10
|
+
- 发布流程安装隔离的固定版测试运行时,执行同一严格校验后才发布。开发者可先执行 `npm install --prefix .test-runtime --no-save --package-lock=false --ignore-scripts @deepseek-ai/dsh-tools@0.2.1-rc.2 --registry=https://registry.npmjs.org`,再执行 `npm test`。未安装时真实编译/输出校验会明确标为跳过。
|
|
11
|
+
- npm 与镜像的实际发布结果在确认后补充;此条测试记录不代表包已公开。
|
|
12
|
+
|
|
3
13
|
> 用途:重启 DSH 后逐项自验插件是否生效。每项给出「看哪里」与「预期结果」;
|
|
4
14
|
> 标 🔵 的项需要会话内的模型(我)代跑,标 👁 的项你自己在界面上看。
|
|
5
15
|
> 全部通过 = FR-1..FR-9(SPEC §7 A1-A11)达成,可以进入「接管旧插件 → 发布」。
|
|
@@ -58,4 +68,4 @@ dsh-plugin-proxy)→ 重启 → 复测 A1-A6。回滚 = 删该行,settings.y
|
|
|
58
68
|
|
|
59
69
|
---
|
|
60
70
|
|
|
61
|
-
_维护:本清单与 SPEC §7 验收清单一一对应;观察通道约定见 SPEC §7 附录。_
|
|
71
|
+
_维护:本清单与 SPEC §7 验收清单一一对应;观察通道约定见 SPEC §7 附录。_
|