@ghfight/dsh-llm-proxy 0.4.0 → 0.4.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.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # DSH LLM Proxy
2
2
 
3
- > 原名 `dsh-clash-proxy`,自 v0.4.0 起更名为 **DSH LLM Proxy**(包名 `dsh-llm-proxy`);数据目录和 Web 路由保持不变。
3
+ > 原名 `dsh-clash-proxy`,自 v0.4.0 起更名为 **DSH LLM Proxy**;npm 包名为 `@ghfight/dsh-llm-proxy`(npm 认为非 scoped 的 `dsh-llm-proxy` 与现有包 `dsh-llmproxy` 过于相似)。数据目录和 Web 路由保持不变。
4
4
 
5
5
  给 **DSH 进程自己** 使用的 Clash / Mihomo 代理插件:
6
6
 
@@ -47,14 +47,22 @@ Mihomo(私有配置、私有数据目录)
47
47
 
48
48
  ## 安装
49
49
 
50
- ### 方式 A:安装 Release 中的 tarball(推荐)
50
+ ### 方式 A:从 npm 安装(推荐)
51
+
52
+ ```bat
53
+ dsh plugin --profile desktop add @ghfight/dsh-llm-proxy --config.auto-install-peers=false
54
+ ```
55
+
56
+ > 如果 `npm view @ghfight/dsh-llm-proxy` 仍返回 404,说明 npm 还在处理首次发布,请改用方式 B。
57
+
58
+ ### 方式 B:安装 Release 中的 tarball
51
59
 
52
60
  1. 从 [Releases](https://github.com/Ghfight-bilibili/dsh-llm-proxy/releases) 下载
53
- `dsh-llm-proxy-0.4.0.tgz`;
61
+ `dsh-llm-proxy-0.4.1.tgz`;
54
62
  2. 在下载目录执行:
55
63
 
56
64
  ```bat
57
- dsh plugin --profile desktop add .\dsh-llm-proxy-0.4.0.tgz --config.auto-install-peers=false
65
+ dsh plugin --profile desktop add .\dsh-llm-proxy-0.4.1.tgz --config.auto-install-peers=false
58
66
  ```
59
67
 
60
68
  然后把下面这段加到当前 profile 的用户 patch 文件
@@ -63,25 +71,25 @@ dsh plugin --profile desktop add .\dsh-llm-proxy-0.4.0.tgz --config.auto-install
63
71
  ```yaml
64
72
  - insert:
65
73
  - id: dsh-llm-proxy
66
- name: dsh-llm-proxy
74
+ name: "@ghfight/dsh-llm-proxy"
67
75
  config:
68
76
  autoStart: true
69
77
  ```
70
78
 
71
79
  > 插件自己的 `cordis.patch.yml` 也会插入同名条目。**不要同时**把
72
- > `dsh-llm-proxy` 加进 `dsh.profile.bundles` 再手写 patch,否则可能重复加载。
80
+ > `@ghfight/dsh-llm-proxy` 加进 `dsh.profile.bundles` 再手写 patch,否则可能重复加载。
73
81
  > 二选一:用上面的手写 patch,或把包名加入 `dsh.profile.bundles` 让插件自带 patch 生效。
74
82
 
75
- ### 方式 B:从源码打包
83
+ ### 方式 C:从源码打包
76
84
 
77
85
  ```bat
78
86
  git clone https://github.com/Ghfight-bilibili/dsh-llm-proxy.git
79
87
  cd dsh-llm-proxy
80
88
  npm pack
81
- dsh plugin --profile desktop add .\dsh-llm-proxy-0.4.0.tgz --config.auto-install-peers=false
89
+ dsh plugin --profile desktop add .\ghfight-dsh-llm-proxy-0.4.1.tgz --config.auto-install-peers=false
82
90
  ```
83
91
 
84
- 然后按方式 A 的 YAML 增加 patch 条目。
92
+ 然后按方式 B 的 YAML 增加 patch 条目。
85
93
 
86
94
  安装完成后重启 DSH。重启后在会话里应该能看到 `clash_*` 工具。
87
95
 
@@ -91,8 +99,9 @@ dsh plugin --profile desktop add .\dsh-llm-proxy-0.4.0.tgz --config.auto-install
91
99
 
92
100
  1. 删除 profile patch 里 `id: dsh-clash-proxy` 的 `insert` 条目;
93
101
  2. `dsh plugin --profile desktop remove dsh-clash-proxy`;
94
- 3. 按上面的方式安装 `dsh-llm-proxy`,把 patch 条目改成 `id: dsh-llm-proxy` / `name: dsh-llm-proxy`;
95
- 4. 重启 DSH。
102
+ 3. 按上面的方式安装 `@ghfight/dsh-llm-proxy`,把 patch 条目改成 `id: dsh-llm-proxy` / `name: "@ghfight/dsh-llm-proxy"`;
103
+ 4. 如果装过非 scoped 的 `dsh-llm-proxy@0.4.0`,先 `dsh plugin --profile desktop remove dsh-llm-proxy`,再安装 scoped 包;两者不能同时存在;
104
+ 5. 重启 DSH。
96
105
 
97
106
  ## Web 控制面板
98
107
 
@@ -134,7 +143,7 @@ dsh plugin --profile desktop add .\dsh-llm-proxy-0.4.0.tgz --config.auto-install
134
143
  ```yaml
135
144
  - insert:
136
145
  - id: dsh-llm-proxy
137
- name: dsh-llm-proxy
146
+ name: "@ghfight/dsh-llm-proxy"
138
147
  config:
139
148
  autoStart: true
140
149
  subscriptionUrl: 'https://example.com/api/v1/client/subscribe?token=...'
@@ -230,11 +239,11 @@ clash-proxy/
230
239
 
231
240
  ## 卸载
232
241
 
233
- 1. 在 profile patch 中删除 `dsh-llm-proxy` 的 `insert` 条目;
242
+ 1. 在 profile patch 中删除 `id: dsh-llm-proxy` 的 `insert` 条目;
234
243
  2. 如果通过 pnpm 安装:
235
244
 
236
245
  ```bat
237
- dsh plugin --profile desktop remove dsh-llm-proxy
246
+ dsh plugin --profile desktop remove @ghfight/dsh-llm-proxy
238
247
  ```
239
248
 
240
249
  3. 删除数据目录 `%USERPROFILE%\.dsh\clash-proxy`(可选,会同时删除已下载核心和订阅缓存);
package/lib/client.js CHANGED
@@ -135,7 +135,7 @@ window.__ModuleLoader__.load({
135
135
  h("span", { className: "dsh-llm-proxy-dot" }),
136
136
  "DSH LLM Proxy"
137
137
  ),
138
- h("div", { className: "dsh-llm-proxy-sub" }, "订阅、节点选择、代理范围与绕行规则 · v0.4.0")
138
+ h("div", { className: "dsh-llm-proxy-sub" }, "订阅、节点选择、代理范围与绕行规则 · v0.4.1")
139
139
  ),
140
140
  h("div", { className: "dsh-llm-proxy-actions" },
141
141
  h("button", {
package/lib/index.js CHANGED
@@ -13,7 +13,7 @@ import z from '@deepseek-ai/schemastery'
13
13
  import { defineTool } from '@deepseek-ai/dsh-tools'
14
14
 
15
15
  const execFileAsync = promisify(execFile)
16
- const VERSION = '0.4.0'
16
+ const VERSION = '0.4.1'
17
17
  const AUTO_GROUP = 'DSH-AUTO'
18
18
  const SELECT_GROUP = 'DSH'
19
19
  const RESERVED_NAMES = new Set([AUTO_GROUP, SELECT_GROUP])
package/lib/ui.html CHANGED
@@ -360,9 +360,9 @@
360
360
 
361
361
  <section id="tab-about" class="panel">
362
362
  <div class="card glass">
363
- <h2>关于 DSH LLM Proxy <span id="versionText">v0.4.0</span></h2>
363
+ <h2>关于 DSH LLM Proxy <span id="versionText">v0.4.1</span></h2>
364
364
  <ul class="about-list">
365
- <li><span>插件</span><span>dsh-llm-proxy</span></li>
365
+ <li><span>插件</span><span>@ghfight/dsh-llm-proxy</span></li>
366
366
  <li><span>代理内核</span><span id="aboutCore">Mihomo</span></li>
367
367
  <li><span>数据目录</span><span id="aboutData">—</span></li>
368
368
  <li><span>订阅地址</span><span id="aboutSub">—</span></li>
@@ -515,7 +515,7 @@
515
515
  setText('stPid', status.pid || '—');
516
516
  setText('subMeta', status.configured ? (status.subscription || '已导入') + (status.updatedAt ? ' · ' + status.updatedAt : '') : '未导入');
517
517
  setText('aboutCore', status.coreVersion || 'Mihomo');
518
- setText('versionText', 'v0.4.0');
518
+ setText('versionText', 'v0.4.1');
519
519
  $('startBtn').disabled = busy || status.running;
520
520
  $('stopBtn').disabled = busy || !status.running;
521
521
  $('testBtn').disabled = busy || !status.running;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghfight/dsh-llm-proxy",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "DSH LLM Proxy: give DSH its own Clash/Mihomo proxy with subscription import, automatic node selection, and manual override, without touching system proxy settings.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",