@karoc/dsh-proxy 0.1.0 → 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/CHANGELOG.md +29 -0
- package/CONTRIBUTING.md +8 -0
- package/README.md +11 -4
- package/README.zh.md +3 -2
- package/cordis.patch.yml +4 -2
- package/lib/client.js +6 -5
- package/lib/index.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.2]
|
|
4
|
+
|
|
5
|
+
- **Brand name**: DSH Smoothly Proxy (DSH SP) — used in the README, settings page title, and changelog.
|
|
6
|
+
|
|
7
|
+
## [0.1.1]
|
|
8
|
+
|
|
9
|
+
- **dsh 0.1.2 compatibility:** the loader identity now matches the npm package
|
|
10
|
+
name everywhere. `client-modules` serves graph rows under the package name
|
|
11
|
+
(`@karoc/dsh-proxy`) and the browser module system awaits factories
|
|
12
|
+
registered under that exact id — the bundle previously registered as
|
|
13
|
+
`dsh-proxy` (the pre-rename tsdown ID), so on dsh ≥ 0.1.2 the entry import
|
|
14
|
+
failed and cascaded into duplicate-factory errors that dropped every
|
|
15
|
+
external plugin's client half. Aligned: module-table ID (`tsdown.config.ts`),
|
|
16
|
+
loader entry `name` (`cordis.patch.yml`, the runtime id stays `dsh-proxy`),
|
|
17
|
+
and the host `export const name`. Runtime business ids (settings.section id,
|
|
18
|
+
locale namespace, CSS prefix, style-tag marker) are unchanged.
|
|
19
|
+
- **First tarball with the correct scoped identity:** the 0.1.0 tarball shipped
|
|
20
|
+
the old unscoped patch/ID, which worked on dsh < 0.1.2 but failed the graph
|
|
21
|
+
row match on newer dsh. 0.1.1 is the first release where the package name,
|
|
22
|
+
loader entry name, bundle registration id, and host name are all
|
|
23
|
+
`@karoc/dsh-proxy`.
|
|
24
|
+
- **Release-flow hardening:** `release:check` now fails fast when `tsdown` is
|
|
25
|
+
not resolvable from PATH (a never-installed project would otherwise fail
|
|
26
|
+
mid-publish with `tsdown: not found`); fixes a template-literal syntax error
|
|
27
|
+
in `post-publish-check.mjs` that crashed the postpublish lifecycle (and hid
|
|
28
|
+
the fact that the upload had actually succeeded).
|
|
29
|
+
- Tests: `client-boot.spec.mjs` asserts the scoped registration id; engine /
|
|
30
|
+
host-route / mount / tooltip acceptance suites unchanged and passing.
|
|
31
|
+
|
|
3
32
|
## [0.1.0]
|
|
4
33
|
|
|
5
34
|
- Initial release: external DeepSeek Harness plugin providing a model-provider
|
package/CONTRIBUTING.md
CHANGED
|
@@ -54,6 +54,14 @@ tag). The gate script (`pnpm release:check`, also run by `prepack` and
|
|
|
54
54
|
5. Working tree is clean (everything committed).
|
|
55
55
|
6. `lib/` is present and fresh (run `pnpm bundle` after touching `src/`).
|
|
56
56
|
7. The version is not already published on npm.
|
|
57
|
+
8. **Identity parity:** `tsdown.config.ts` module-table ID, the loader entry
|
|
58
|
+
`name` in `cordis.patch.yml`, and the host `export const name` in
|
|
59
|
+
`src/index.ts` must all equal the npm package name (`@karoc/dsh-proxy`).
|
|
60
|
+
`client-modules` serves graph rows under the package name and the browser
|
|
61
|
+
awaits factories under that exact id; a mismatch drops the client half on
|
|
62
|
+
dsh ≥ 0.1.2. Runtime business ids (settings.section id, locale NS, CSS
|
|
63
|
+
prefix, style-tag marker) intentionally stay `dsh-proxy`. The `release-check`
|
|
64
|
+
gate does not verify this — check it before tagging.
|
|
57
65
|
|
|
58
66
|
Release steps:
|
|
59
67
|
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DSH Smoothly Proxy (DSH SP)
|
|
2
2
|
|
|
3
3
|
English | [简体中文](README.zh.md)
|
|
4
4
|
|
|
@@ -6,9 +6,9 @@ English | [简体中文](README.zh.md)
|
|
|
6
6
|
[](https://www.npmjs.com/package/@karoc/dsh-proxy)
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
**per-host routing**, plus a **Settings
|
|
11
|
-
proxying.
|
|
9
|
+
DSH Smoothly Proxy (**DSH SP**) is an **external** DeepSeek Harness plugin: a
|
|
10
|
+
model-provider **forward proxy** with **per-host routing**, plus a **Settings
|
|
11
|
+
page** dedicated to model-provider proxying.
|
|
12
12
|
|
|
13
13
|
It runs a loopback forward proxy inside the dsh host process, points the
|
|
14
14
|
process's egress traffic at it (`HTTP(S)_PROXY` + `NODE_USE_ENV_PROXY`), and
|
|
@@ -196,6 +196,13 @@ module table; everything else is inlined.
|
|
|
196
196
|
external plugin cannot set it without patching the shell. When DSH exposes a
|
|
197
197
|
per-section icon, use `IconGlobeOutline14` from `dsh-client-ui-primitives`
|
|
198
198
|
for this section.
|
|
199
|
+
- **Works with dsh ≥ 0.1.2 when installed the official way.** The loader
|
|
200
|
+
entry name, bundle registration id, and host plugin name are all
|
|
201
|
+
`@karoc/dsh-proxy` (matching the npm package name). Hand-written `link:`
|
|
202
|
+
dependencies are not recognized as packages by newer loaders — install via
|
|
203
|
+
`dsh plugin --profile web add @karoc/dsh-proxy` (npm) or
|
|
204
|
+
`dsh plugin --profile web add link:/path/to/dsh-proxy` (source), then restart
|
|
205
|
+
`dsh web`.
|
|
199
206
|
- The desktop shell (`dsh-desktop`) keeps its own proxy and tray settings
|
|
200
207
|
window — this plugin is a standalone extraction, not a replacement. Both can
|
|
201
208
|
coexist (e.g. install `dsh-proxy` into the shell's profile to get the
|
package/README.zh.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DSH Smoothly Proxy(DSH SP)
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 简体中文
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/@karoc/dsh-proxy)
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
DSH Smoothly Proxy(**DSH SP**)是一个**外部** DeepSeek Harness 插件:为**模型提供方**提供带**按主机路由**的**正向代理**,并附带一个专职设置页。
|
|
10
10
|
|
|
11
11
|
它在 dsh host 进程内启动一个 loopback 正向代理,把进程的出站流量指向它(`HTTP(S)_PROXY` + `NODE_USE_ENV_PROXY`),**只把你在设置页勾选的主机**转发到可选的上游代理(HTTP / HTTPS / SOCKS5,支持可选 Basic 认证),其余全部直连。模型提供方主机从你的 dsh `settings.yaml` 读取,流量中观测到的主机也会被收集——两者都以复选框形式出现。
|
|
12
12
|
|
|
@@ -149,6 +149,7 @@ bundle 把平台包(`react`、`@deepseek-ai/cordis`、`@deepseek-ai/dsh-client
|
|
|
149
149
|
- **代理是进程级出站点,不是模型逐请求读的开关。** 它通过把进程的 `HTTP(S)_PROXY` 指向自身来实现。本插件 host `apply()` 之后 dsh 发起的请求(任何子进程、以及 global dispatcher 仍是惰性的 undici fetch)会走代理。若某个 dsh 内部 fetch 在插件加载前就已实体化了 dispatcher,可能不会走它——文档化的解法是重启 dsh(桌面壳通过 spawn dsh 前设环境变量来施加同样的边界)。
|
|
150
150
|
- `npm`/`pnpm` 安装/更新流量与其它一样走代理;改动**与安装/更新相关的主机**会在下次安装/更新时生效(已在进行的操作保留其环境)。
|
|
151
151
|
- **设置页导航图标由壳分配,插件无法自定义。** 内置 `ui-settings-general` 的 `SettingsRoot.tsx` `navIcon(id)` 只映射已知 id,其它 id(包括本节的 `dsh-proxy`)一律齿轮。`settings.section` 注册没有 icon 字段,外部插件不 patch 壳就改不了。等 DSH 开放每节图标后,本节建议用 `dsh-client-ui-primitives` 的 `IconGlobeOutline14`。
|
|
152
|
+
- **dsh ≥ 0.1.2 需以官方方式安装才生效。** loader entry 名、bundle 注册 id、host 插件名三者均为 `@karoc/dsh-proxy`(与 npm 包名一致)。新版 loader 不再把手写 `link:` 依赖识别为包——请用 `dsh plugin --profile web add @karoc/dsh-proxy`(npm)或 `dsh plugin --profile web add link:/path/to/dsh-proxy`(源码)安装,然后重启 `dsh web`。
|
|
152
153
|
- 桌面壳(`dsh-desktop`)保留自己的代理与托盘设置窗口——本插件是独立抽取,不是替代品。两者可共存(例如把 `dsh-proxy` 装进壳的 profile,同时获得 dsh 内设置页)。
|
|
153
154
|
|
|
154
155
|
## License
|
package/cordis.patch.yml
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
# package so the host loader resolves the node half and client-modules serves
|
|
3
3
|
# exports["./client"] at /plugins/dsh-proxy/client.js. The host half starts the
|
|
4
4
|
# loopback forward proxy and registers /proxy/api; the client half registers
|
|
5
|
-
# the settings.section settings page.
|
|
5
|
+
# the settings.section settings page. The loader entry `name` must equal the
|
|
6
|
+
# npm package name (@karoc/dsh-proxy) — client-modules resolves it as a
|
|
7
|
+
# package; the runtime plugin id stays `dsh-proxy`.
|
|
6
8
|
- insert:
|
|
7
9
|
- id: dsh-proxy
|
|
8
|
-
name: dsh-proxy
|
|
10
|
+
name: '@karoc/dsh-proxy'
|
package/lib/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
window.__ModuleLoader__.load({
|
|
2
|
-
id: "dsh-proxy",
|
|
2
|
+
id: "@karoc/dsh-proxy",
|
|
3
3
|
factory: (require) => {
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
@@ -528,12 +528,13 @@ window.__ModuleLoader__.load({
|
|
|
528
528
|
//#endregion
|
|
529
529
|
//#region src/client/locales.ts
|
|
530
530
|
/**
|
|
531
|
-
* Copy dictionaries for the Proxy settings section
|
|
532
|
-
* (en object keyed by the same strings), zh must
|
|
531
|
+
* Copy dictionaries for the Proxy settings section (DSH Smoothly Proxy / DSH SP).
|
|
532
|
+
* English is the key source (en object keyed by the same strings), zh must
|
|
533
|
+
* carry every key.
|
|
533
534
|
*/
|
|
534
535
|
const en = {
|
|
535
536
|
nav: "Proxy",
|
|
536
|
-
title: "Proxy
|
|
537
|
+
title: "DSH Smoothly Proxy (DSH SP)",
|
|
537
538
|
subtitle: "Model-provider traffic through an optional upstream proxy, per host.",
|
|
538
539
|
upstreamTitle: "Upstream proxy (optional)",
|
|
539
540
|
upstreamEnabled: "Enable upstream proxy (when off, every host connects directly)",
|
|
@@ -571,7 +572,7 @@ window.__ModuleLoader__.load({
|
|
|
571
572
|
};
|
|
572
573
|
const zh = {
|
|
573
574
|
nav: "代理",
|
|
574
|
-
title: "
|
|
575
|
+
title: "DSH Smoothly Proxy(DSH SP)",
|
|
575
576
|
subtitle: "按主机把模型提供方流量转发到可选的上游代理。",
|
|
576
577
|
upstreamTitle: "上游代理(可选)",
|
|
577
578
|
upstreamEnabled: "启用上游代理(未启用时所有主机直连)",
|
package/lib/index.js
CHANGED
|
@@ -758,7 +758,7 @@ function testUpstreamProxy(upstream) {
|
|
|
758
758
|
}
|
|
759
759
|
//#endregion
|
|
760
760
|
//#region src/index.ts
|
|
761
|
-
const name = "dsh-proxy";
|
|
761
|
+
const name = "@karoc/dsh-proxy";
|
|
762
762
|
const inject = ["webServer"];
|
|
763
763
|
/** Resolve the harness home: $DSH_HOME (blank = unset) else ~/.dsh. */
|
|
764
764
|
function resolveDshHome() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@karoc/dsh-proxy",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "DSH Smoothly Proxy (DSH SP): external DeepSeek Harness plugin — a model-provider forward proxy with per-host routing and a Settings page.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"postpublish": "node scripts/post-publish-check.mjs"
|
|
45
45
|
},
|
|
46
46
|
"engines": { "node": ">=18" },
|
|
47
|
-
"keywords": ["deepseek-harness", "dsh", "plugin", "proxy", "model-provider", "settings"],
|
|
47
|
+
"keywords": ["deepseek-harness", "dsh", "plugin", "proxy", "model-provider", "settings", "smoothly-proxy", "sp"],
|
|
48
48
|
"author": "karoc",
|
|
49
49
|
"license": "MIT",
|
|
50
50
|
"repository": { "type": "git", "url": "git+https://github.com/karoc/dsh-proxy.git" },
|