@karoc/dsh-proxy 0.1.0 → 0.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.1]
4
+
5
+ - **dsh 0.1.2 compatibility:** the loader identity now matches the npm package
6
+ name everywhere. `client-modules` serves graph rows under the package name
7
+ (`@karoc/dsh-proxy`) and the browser module system awaits factories
8
+ registered under that exact id — the bundle previously registered as
9
+ `dsh-proxy` (the pre-rename tsdown ID), so on dsh ≥ 0.1.2 the entry import
10
+ failed and cascaded into duplicate-factory errors that dropped every
11
+ external plugin's client half. Aligned: module-table ID (`tsdown.config.ts`),
12
+ loader entry `name` (`cordis.patch.yml`, the runtime id stays `dsh-proxy`),
13
+ and the host `export const name`. Runtime business ids (settings.section id,
14
+ locale namespace, CSS prefix, style-tag marker) are unchanged.
15
+ - **First tarball with the correct scoped identity:** the 0.1.0 tarball shipped
16
+ the old unscoped patch/ID, which worked on dsh < 0.1.2 but failed the graph
17
+ row match on newer dsh. 0.1.1 is the first release where the package name,
18
+ loader entry name, bundle registration id, and host name are all
19
+ `@karoc/dsh-proxy`.
20
+ - **Release-flow hardening:** `release:check` now fails fast when `tsdown` is
21
+ not resolvable from PATH (a never-installed project would otherwise fail
22
+ mid-publish with `tsdown: not found`); fixes a template-literal syntax error
23
+ in `post-publish-check.mjs` that crashed the postpublish lifecycle (and hid
24
+ the fact that the upload had actually succeeded).
25
+ - Tests: `client-boot.spec.mjs` asserts the scoped registration id; engine /
26
+ host-route / mount / tooltip acceptance suites unchanged and passing.
27
+
3
28
  ## [0.1.0]
4
29
 
5
30
  - 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
@@ -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
@@ -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;
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@karoc/dsh-proxy",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "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",