@ljwei-stak/model-router-galgame 0.4.22 → 0.4.24
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/.dsh-plugin/client.js +253 -253
- package/.dsh-plugin/index.mjs +10 -2
- package/.dsh-plugin/shared/watcher.mjs +29 -0
- package/INSTALLATION_GUIDE.zh.md +24 -11
- package/README.md +37 -13
- package/README.zh.md +33 -13
- package/cordis.patch.yml +3 -0
- package/package.json +21 -3
package/.dsh-plugin/index.mjs
CHANGED
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
} from './shared/web-routing.mjs'
|
|
29
29
|
import { registerNpmUpdateRoute } from './shared/npm-update.mjs'
|
|
30
30
|
import { registerGalGameRoutes } from './shared/gal-game-service.mjs'
|
|
31
|
+
import { watcherStatus } from './shared/watcher.mjs'
|
|
31
32
|
|
|
32
33
|
let settingsRuntimePromise
|
|
33
34
|
let routerSettings = { ...DEFAULT_ROUTER_SETTINGS }
|
|
@@ -496,7 +497,7 @@ export function apply(ctx) {
|
|
|
496
497
|
// the whole composer submission; the GAL client sends this command
|
|
497
498
|
// without image bytes so the attachment remains available for the next
|
|
498
499
|
// user turn.
|
|
499
|
-
input: { hint: 'mode collective|single | plan | safety', images: true },
|
|
500
|
+
input: { hint: 'mode collective|single | plan | safety | watcher', images: true },
|
|
500
501
|
recordInput: true,
|
|
501
502
|
handler: ({ agent, rawInput }) => {
|
|
502
503
|
const state = stateFor(agent)
|
|
@@ -517,10 +518,17 @@ export function apply(ctx) {
|
|
|
517
518
|
if (value === 'safety' || value === 'approval') {
|
|
518
519
|
return { kind: 'success', text: JSON.stringify({ ...approvalGateStatus(ctx), context: approvalSafetyContext(state, state.lastStep) }) }
|
|
519
520
|
}
|
|
521
|
+
if (value === 'watcher') {
|
|
522
|
+
const watcher = watcherStatus(ctx, agent)
|
|
523
|
+
return { kind: 'success', text: JSON.stringify({
|
|
524
|
+
...watcher,
|
|
525
|
+
router: { mode: state.mode, lastRoute: watcher.insights?.turn?.route ?? null },
|
|
526
|
+
}) }
|
|
527
|
+
}
|
|
520
528
|
if (value === 'web' || value === 'network') {
|
|
521
529
|
return { kind: 'success', text: JSON.stringify({ ...webCapabilityStatus(ctx), context: webCapabilityForPlan(state.taskText, state.plan) }) }
|
|
522
530
|
}
|
|
523
|
-
return { kind: 'error', text: '用法:/router mode collective、/router mode single、/router plan、/router safety 或 /router
|
|
531
|
+
return { kind: 'error', text: '用法:/router mode collective、/router mode single、/router plan、/router safety、/router web 或 /router watcher' }
|
|
524
532
|
},
|
|
525
533
|
})
|
|
526
534
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Read the current agent's native Watcher projection without changing its session. */
|
|
2
|
+
export const WATCHER_PACKAGE = '@ljwei-stak/dsh-watcher-for-mrg'
|
|
3
|
+
export const WATCHER_VERSION = '0.4.0'
|
|
4
|
+
export const WATCHER_PROJECTION = 'watcherInsights'
|
|
5
|
+
|
|
6
|
+
export function watcherStatus(ctx, agent) {
|
|
7
|
+
const status = {
|
|
8
|
+
package: WATCHER_PACKAGE,
|
|
9
|
+
version: WATCHER_VERSION,
|
|
10
|
+
bundled: true,
|
|
11
|
+
readOnly: true,
|
|
12
|
+
projection: WATCHER_PROJECTION,
|
|
13
|
+
sessionId: agent?.session?.id ?? null,
|
|
14
|
+
}
|
|
15
|
+
let projections
|
|
16
|
+
try { projections = ctx.get?.('sessionProjections') ?? ctx.sessionProjections } catch {}
|
|
17
|
+
if (typeof projections?.snapshot !== 'function') return { ...status, status: 'unavailable' }
|
|
18
|
+
if (!agent?.session) return { ...status, status: 'no-session' }
|
|
19
|
+
try {
|
|
20
|
+
const snapshot = projections.snapshot(agent.session, [WATCHER_PROJECTION])
|
|
21
|
+
const insights = snapshot?.values?.[WATCHER_PROJECTION]
|
|
22
|
+
if (!insights) return { ...status, status: 'not-loaded' }
|
|
23
|
+
if (insights.sessionId !== status.sessionId) return { ...status, status: 'session-mismatch' }
|
|
24
|
+
return { ...status, status: 'ready', asOfSeq: snapshot.asOfSeq, insights: structuredClone(insights) }
|
|
25
|
+
} catch (error) {
|
|
26
|
+
ctx.logger?.warn?.(`model-router: Watcher projection failed: ${String(error)}`)
|
|
27
|
+
return { ...status, status: 'error' }
|
|
28
|
+
}
|
|
29
|
+
}
|
package/INSTALLATION_GUIDE.zh.md
CHANGED
|
@@ -16,14 +16,27 @@
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
+
## Watcher 工作路径与用量统计
|
|
20
|
+
|
|
21
|
+
0.4.24 聚合包自动安装 `@ljwei-stak/dsh-watcher-for-mrg@0.4.0`。重启后,在普通
|
|
22
|
+
对话或 GAL 工作会话的原生标题栏点击眼睛按钮,可查看工作路径、工具执行和模型用量;
|
|
23
|
+
设置中的 Watcher 页面提供本地会话汇总。`/router watcher` 可检查当前会话投影是否
|
|
24
|
+
加载。此功能不改变模型路由和审批规则,也不额外发起模型请求。
|
|
25
|
+
|
|
26
|
+
同一配置只保留一个 Watcher 实例。安装 Router 前先执行 `dsh plugin list`;若列表中
|
|
27
|
+
有独立安装的上游 `dsh-watcher` 或 `@ljwei-stak/dsh-watcher-for-mrg`,按实际包名执行
|
|
28
|
+
`dsh plugin remove dsh-watcher` 或
|
|
29
|
+
`dsh plugin remove @ljwei-stak/dsh-watcher-for-mrg`。然后再安装 Router 聚合包,避免
|
|
30
|
+
重复 loader ID。详情见 [Watcher 项目](https://github.com/ljwei-stak/dsh-watcher-For_MRG)。
|
|
31
|
+
|
|
19
32
|
## PPT 生成扩展
|
|
20
33
|
|
|
21
|
-
从 0.4.22 起,Router 聚合包自动安装并加载 `@ljwei-stak/ppt-master-for-mgr@6.3.
|
|
34
|
+
从 0.4.22 起,Router 聚合包自动安装并加载 PPT Master;当前 0.4.24 固定使用 `@ljwei-stak/ppt-master-for-mgr@6.3.2`,修复 Python 3.13 及更新版本在 Windows DSH 沙箱中导出 PPTX 时的临时目录权限错误。制作 PPT 时使用普通工作会话或 GAL 工作会话,在代理预设中启用 DSH 原生 `skill`、文件和终端工具,并在实际执行环境中安装 Python 3.10+;继续保留宿主沙箱和审批设置。
|
|
22
35
|
|
|
23
36
|
```sh
|
|
24
|
-
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.
|
|
25
|
-
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.
|
|
26
|
-
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.
|
|
37
|
+
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.2 ppt-master-for-mgr doctor
|
|
38
|
+
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.2 ppt-master-for-mgr setup
|
|
39
|
+
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.2 ppt-master-for-mgr doctor
|
|
27
40
|
```
|
|
28
41
|
|
|
29
42
|
`setup` 主动运行 pip 安装依赖,npm 安装本身不会安装 Python 依赖。指定解释器时为命令添加 `--python <解释器绝对路径>`,也可使用 `PPT_MASTER_PYTHON`;工作代理需使用相同解释器。随后在可写工作目录中请求“使用 ppt-master 生成 PPTX”,确认模型通过原生 `skill` 加载 `ppt-master` 后生成并检查文件。剧情模式和自由模式的角色对话不承担 PPT 工作流。完整配置与可选功能要求见 [README 的 PPT 安装步骤](README.zh.md#4-准备-ppt-生成环境) 和 [PPT Master 项目](https://github.com/ljwei-stak/ppt-master-for-MGR)。
|
|
@@ -98,8 +111,8 @@ sudo mv dsh /usr/local/bin/
|
|
|
98
111
|
|
|
99
112
|
```powershell
|
|
100
113
|
pnpm config set registry https://registry.npmjs.org/
|
|
101
|
-
pnpm dsh plugin --profile web add @ljwei-stak/model-router-galgame@0.4.
|
|
102
|
-
pnpm dsh plugin --profile desktop add @ljwei-stak/model-router-galgame@0.4.
|
|
114
|
+
pnpm dsh plugin --profile web add @ljwei-stak/model-router-galgame@0.4.24
|
|
115
|
+
pnpm dsh plugin --profile desktop add @ljwei-stak/model-router-galgame@0.4.24
|
|
103
116
|
```
|
|
104
117
|
|
|
105
118
|
### 方法2: Git 克隆(仅源码开发)
|
|
@@ -163,11 +176,11 @@ model-router-galgame/
|
|
|
163
176
|
|
|
164
177
|
```powershell
|
|
165
178
|
pnpm config set registry https://registry.npmjs.org/
|
|
166
|
-
pnpm dsh plugin --profile web add @ljwei-stak/model-router-galgame@0.4.
|
|
167
|
-
pnpm dsh plugin --profile desktop add @ljwei-stak/model-router-galgame@0.4.
|
|
179
|
+
pnpm dsh plugin --profile web add @ljwei-stak/model-router-galgame@0.4.24
|
|
180
|
+
pnpm dsh plugin --profile desktop add @ljwei-stak/model-router-galgame@0.4.24
|
|
168
181
|
```
|
|
169
182
|
|
|
170
|
-
其中 `@0.4.
|
|
183
|
+
其中 `@0.4.24` 可以替换为通过 `npm view @ljwei-stak/model-router-galgame version --registry=https://registry.npmjs.org/` 查询到的版本号。官方 ModLens、审批门控、ModSearch、Ego Browser、PPT Master 和 Watcher 依赖会自动解析;PPT 的 Python 依赖另按本指南开头步骤配置。
|
|
171
184
|
|
|
172
185
|
如果正在本地开发,再使用目录安装:
|
|
173
186
|
|
|
@@ -194,7 +207,7 @@ dsh plugin --profile web add /path/to/model-router-galgame
|
|
|
194
207
|
dsh plugin --profile web list
|
|
195
208
|
|
|
196
209
|
# 预期输出包含:
|
|
197
|
-
# @ljwei-stak/model-router-galgame@0.4.
|
|
210
|
+
# @ljwei-stak/model-router-galgame@0.4.24
|
|
198
211
|
```
|
|
199
212
|
|
|
200
213
|
### 步骤4: 重启 Harness
|
|
@@ -801,5 +814,5 @@ dsh restart
|
|
|
801
814
|
|
|
802
815
|
**文档版本**: 1.0
|
|
803
816
|
**更新日期**: 2026-09-01
|
|
804
|
-
**适用插件版本**: 0.4.
|
|
817
|
+
**适用插件版本**: 0.4.24
|
|
805
818
|
**已验证宿主版本**: DSH Desktop 2.0.5 / `@deepseek-ai/dsh@0.1.2-rc.1`
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ English | [中文](README.zh.md)
|
|
|
4
4
|
|
|
5
5
|
A model-routing and GAL conversation plugin for DeepSeek Harness / DSH Desktop. It combines task assignment, cost estimates, model-character dialogue, web tools, PPT generation skills, and approval integration in one npm package, and runs inside an existing DSH host.
|
|
6
6
|
|
|
7
|
-
**Current release: 0.4.
|
|
7
|
+
**Current release: 0.4.24** · [npm package](https://www.npmjs.com/package/@ljwei-stak/model-router-galgame) · [GitHub Releases](https://github.com/ljwei-stak/model-router-galgame/releases) · [DSH Desktop](https://github.com/anywhere-labs/dsh-desktop/releases)
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
@@ -48,12 +48,34 @@ Story mode does not require provider credentials. Free mode requires a working m
|
|
|
48
48
|
- **PPT Master** is bundled as a native DSH skill. In a normal work conversation, a PowerPoint/PPT/PPTX request can load `ppt-master` through the host's `skill` tool and follow its planning, SVG, validation, and PPTX export workflow.
|
|
49
49
|
- Model Router keeps the host's skill catalog, loaded skill instructions, and file/terminal tools available when it chooses a model or advances a work stage. Use ordinary chat or the GAL conversation view for presentation work; story mode does not run tools, and free-play character dialogue is not the work agent.
|
|
50
50
|
- The package includes the skill, Python scripts, and templates. Python dependencies require the explicit setup below; npm installation does not install Python or run pip. Generated presentations belong in the conversation's writable workspace.
|
|
51
|
+
- Router 0.4.24 bundles PPT Master 6.3.2, which fixes PPTX staging-directory permissions under the Windows DSH sandbox with Python 3.13 or newer. Host sandbox and approval settings remain in effect.
|
|
52
|
+
|
|
53
|
+
### Watcher work paths and model usage
|
|
54
|
+
|
|
55
|
+
Router 0.4.24 includes [`@ljwei-stak/dsh-watcher-for-mrg@0.4.0`](https://github.com/ljwei-stak/dsh-watcher-For_MRG).
|
|
56
|
+
Open the eye button in the native session header from Chat or the GAL work view
|
|
57
|
+
to inspect turns, parallel tools, retries, timing, and recorded token usage.
|
|
58
|
+
The Watcher settings section summarizes local session usage; provider and model
|
|
59
|
+
identities stay separate when Router switches models. Only reasoning already
|
|
60
|
+
recorded by the provider is shown. Story and free-play dialogue are outside the
|
|
61
|
+
native work-session statistics.
|
|
62
|
+
|
|
63
|
+
`/router watcher` reads the current session's `watcherInsights` projection and
|
|
64
|
+
reports whether it is loaded, together with Router's latest route. Watcher does
|
|
65
|
+
not alter routing, prompts, tools, approvals, or model requests.
|
|
66
|
+
|
|
67
|
+
Install the Router aggregate package once. Before installing it, check `dsh plugin list`
|
|
68
|
+
in the same profile. If either upstream `dsh-watcher` or the scoped
|
|
69
|
+
`@ljwei-stak/dsh-watcher-for-mrg` is listed as a standalone plugin, remove the listed
|
|
70
|
+
package with `dsh plugin remove dsh-watcher` or
|
|
71
|
+
`dsh plugin remove @ljwei-stak/dsh-watcher-for-mrg`. Router supplies its own pinned
|
|
72
|
+
Watcher entry, and retaining either standalone entry would duplicate the loader ID.
|
|
51
73
|
|
|
52
74
|
### Separate plugin and desktop updates
|
|
53
75
|
|
|
54
76
|
"GAL 视窗 → 项目更新" (GAL view → Project updates) checks the plugin's npm version and the official DSH Desktop version separately. It offers "仅更新 npm 插件" (Update only the npm plugin), "仅更新完整客户端" (Update only the full client), and "一键更新插件与客户端" (Update plugin and client). Desktop plugin installation runs through the authenticated host connection. Fully exit and restart DSH Desktop after a successful installation.
|
|
55
77
|
|
|
56
|
-
A page opened in a regular browser can check the plugin version and open download pages, but cannot install the desktop client or change its profile directly. The plugin's `0.4.
|
|
78
|
+
A page opened in a regular browser can check the plugin version and open download pages, but cannot install the desktop client or change its profile directly. The plugin's `0.4.24` version and DSH Desktop's version are independent.
|
|
57
79
|
|
|
58
80
|
## Installation
|
|
59
81
|
|
|
@@ -75,7 +97,7 @@ Installing this npm package does not install DSH Desktop, model services, or a b
|
|
|
75
97
|
|
|
76
98
|
```sh
|
|
77
99
|
dsh --version
|
|
78
|
-
dsh plugin add --save-exact --registry=https://registry.npmjs.org/ @ljwei-stak/model-router-galgame@0.4.
|
|
100
|
+
dsh plugin add --save-exact --registry=https://registry.npmjs.org/ @ljwei-stak/model-router-galgame@0.4.24
|
|
79
101
|
```
|
|
80
102
|
|
|
81
103
|
3. After installation succeeds, use the desktop restart control, or explicitly quit from the system tray and reopen the app. Select the same profile. Closing the window may only hide the application.
|
|
@@ -90,7 +112,7 @@ If you do not have a global `dsh` but already have Node.js/npm and pnpm, replace
|
|
|
90
112
|
|
|
91
113
|
```sh
|
|
92
114
|
dsh --version
|
|
93
|
-
dsh plugin --profile web add --save-exact --registry=https://registry.npmjs.org/ @ljwei-stak/model-router-galgame@0.4.
|
|
115
|
+
dsh plugin --profile web add --save-exact --registry=https://registry.npmjs.org/ @ljwei-stak/model-router-galgame@0.4.24
|
|
94
116
|
dsh --profile web --dump-config
|
|
95
117
|
```
|
|
96
118
|
|
|
@@ -112,16 +134,17 @@ For desktop, run this in the DSH terminal opened by the app:
|
|
|
112
134
|
dsh --dump-config
|
|
113
135
|
```
|
|
114
136
|
|
|
115
|
-
For Web / CLI, use `dsh --profile web --dump-config`. The combined configuration should include all
|
|
137
|
+
For Web / CLI, use `dsh --profile web --dump-config`. The combined configuration should include all seven plugins below, with no duplicate loader IDs. A configuration dump does not replace checking that the host starts successfully. Install only the Router aggregate package; its dependencies and bundle entries are added automatically.
|
|
116
138
|
|
|
117
|
-
| Plugin | Pinned version for 0.4.
|
|
139
|
+
| Plugin | Pinned version for 0.4.24 | Purpose |
|
|
118
140
|
| --- | --- | --- |
|
|
119
|
-
| `@ljwei-stak/model-router-galgame` | `0.4.
|
|
141
|
+
| `@ljwei-stak/model-router-galgame` | `0.4.24` | Routing, GAL view, story/free modes, and update controls |
|
|
120
142
|
| `@liustack/modlens` | `3.25.4` | Image understanding through compatible routes |
|
|
121
143
|
| `@liustack/modsearch` | `5.10.1` | Search and page reading |
|
|
122
144
|
| `@ljwei-stak/dsh-ego-browser` | `0.8.3` | Visible browser tools |
|
|
123
145
|
| `@ljwei-stak/dsh-approval-gate` | `0.5.3` | Approval policies and auditing |
|
|
124
|
-
| `@ljwei-stak/ppt-master-for-mgr` | `6.3.
|
|
146
|
+
| `@ljwei-stak/ppt-master-for-mgr` | `6.3.2` | Native PPT skill, scripts, and templates |
|
|
147
|
+
| `@ljwei-stak/dsh-watcher-for-mrg` | `0.4.0` | Read-only work paths and actual model usage |
|
|
125
148
|
|
|
126
149
|
`schemastery@3.18.0` and PPT Master's native skill provider are also installed automatically as runtime dependencies. These dependencies are pinned: updating Router uses the dependency combination declared by the new Router package, rather than updating every dependency to its own `latest`.
|
|
127
150
|
|
|
@@ -134,9 +157,9 @@ Install Python 3.10 or newer in the environment where the DSH work agent execute
|
|
|
134
157
|
Run in the DSH terminal or the same execution environment as the work agent:
|
|
135
158
|
|
|
136
159
|
```sh
|
|
137
|
-
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.
|
|
138
|
-
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.
|
|
139
|
-
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.
|
|
160
|
+
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.2 ppt-master-for-mgr doctor
|
|
161
|
+
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.2 ppt-master-for-mgr setup
|
|
162
|
+
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.2 ppt-master-for-mgr doctor
|
|
140
163
|
```
|
|
141
164
|
|
|
142
165
|
`setup` explicitly runs pip for the bundled requirements. Use a dedicated Python virtual environment when appropriate, then add `--python /absolute/path/to/python` to each command, or set `PPT_MASTER_PYTHON` to that interpreter. On Windows, quote interpreter paths containing spaces. Configure the work agent to use that same interpreter. `doctor` checks core Python imports; it is not a visual quality or complete optional-service check. Some conversion, rendering, speech, or image features need additional software or credentials described in [PPT Master](https://github.com/ljwei-stak/ppt-master-for-MGR).
|
|
@@ -160,6 +183,7 @@ To play without a model API, open **"GAL视窗 → GAL游戏 → 剧情模式" (
|
|
|
160
183
|
| `/router plan` | Show the latest routing plan for the current conversation |
|
|
161
184
|
| `/router safety` | Show approval bridge status and the current stage context |
|
|
162
185
|
| `/router web` | Show declared web capabilities, host service detection, and task strategy |
|
|
186
|
+
| `/router watcher` | Read Watcher statistics and loading status for the current session |
|
|
163
187
|
|
|
164
188
|
The default mode is `collective`. `/router safety` and `/router web` are status summaries; they do not certify that end-to-end approval or browser diagnostics have passed. Routing summaries do not expose private model chain-of-thought.
|
|
165
189
|
|
|
@@ -213,7 +237,7 @@ For example, only after confirming that ModLens is a duplicate standalone depend
|
|
|
213
237
|
|
|
214
238
|
```sh
|
|
215
239
|
dsh plugin remove @liustack/modlens
|
|
216
|
-
dsh plugin add --save-exact --registry=https://registry.npmjs.org/ @ljwei-stak/model-router-galgame@0.4.
|
|
240
|
+
dsh plugin add --save-exact --registry=https://registry.npmjs.org/ @ljwei-stak/model-router-galgame@0.4.24
|
|
217
241
|
```
|
|
218
242
|
|
|
219
243
|
For Web / CLI, add `--profile web` after `plugin` in both commands. Handle other duplicate dependencies according to the actual error; do not remove all plugins at once. These removal commands are unnecessary when no duplicate entry exists.
|
|
@@ -229,7 +253,7 @@ dsh plugin add /absolute/path/to/model-router-galgame
|
|
|
229
253
|
|
|
230
254
|
Replace the path with the actual absolute path and quote it if it contains spaces. For Web / CLI, use `dsh plugin --profile web add <actual-path>`. The npm package includes ready-to-load build output, but excludes the full client source, tests, and original assets.
|
|
231
255
|
|
|
232
|
-
After
|
|
256
|
+
After cloning, run `pnpm install --frozen-lockfile`. The lockfile pins the DSH SDK used to build the browser client, so an adjacent DSH Desktop source checkout is not required. After modifying client source, run `npm test`, `npm run build:client`, `npm run check:client`, and `pnpm peers check`. A `SKIP` result does not count as successful build verification.
|
|
233
257
|
|
|
234
258
|
## Mathematical routing model
|
|
235
259
|
|
package/README.zh.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
适用于 DeepSeek Harness / DSH Desktop 的模型路由与 GAL 对话插件。它把任务分配、费用估算、模型角色对话、联网工具、PPT 生成技能和审批适配整合为一个 npm 插件包,需要在已有的 DSH 宿主中使用。
|
|
6
6
|
|
|
7
|
-
**当前发布版本:0.4.
|
|
7
|
+
**当前发布版本:0.4.24** · [npm 包](https://www.npmjs.com/package/@ljwei-stak/model-router-galgame) · [GitHub Releases](https://github.com/ljwei-stak/model-router-galgame/releases) · [DSH Desktop](https://github.com/anywhere-labs/dsh-desktop/releases)
|
|
8
8
|
|
|
9
9
|
## 功能介绍
|
|
10
10
|
|
|
@@ -48,12 +48,30 @@
|
|
|
48
48
|
- **PPT Master** 以 DSH 原生 skill 随包加载。在普通工作会话中收到 PowerPoint/PPT/PPTX 需求后,模型可通过宿主 `skill` 工具加载 `ppt-master`,按规划、SVG 制作、检查和 PPTX 导出的流程执行。
|
|
49
49
|
- Model Router 在选择模型和推进工作阶段时保留宿主技能目录、已加载的技能指令及文件/终端工具。制作 PPT 应使用普通聊天或 GAL 工作会话;剧情模式不调用工具,自由模式的角色对话也不是工作代理。
|
|
50
50
|
- 包内包含技能、Python 脚本和模板。Python 依赖需按下方步骤主动安装,npm 安装不会自动安装 Python 或运行 pip。生成的演示文稿保存在会话可写工作目录中。
|
|
51
|
+
- Router 0.4.24 随包加载 PPT Master 6.3.2,修复 Python 3.13 及更新版本在 Windows DSH 沙箱中导出 PPTX 时的临时目录权限错误,宿主沙箱和审批设置仍然生效。
|
|
52
|
+
|
|
53
|
+
### Watcher 工作路径与模型用量
|
|
54
|
+
|
|
55
|
+
Router 0.4.24 聚合 [`@ljwei-stak/dsh-watcher-for-mrg@0.4.0`](https://github.com/ljwei-stak/dsh-watcher-For_MRG)。
|
|
56
|
+
在普通对话或 GAL 工作视图中,点击原生会话标题栏的眼睛按钮,可查看轮次、并行工具、
|
|
57
|
+
重试、耗时和已记录的 token 用量。设置中的 Watcher 页面汇总本地会话用量;Router
|
|
58
|
+
切换模型时按供应商和模型分别统计。推理记录只显示供应商已写入会话的内容。
|
|
59
|
+
剧情模式和自由模式的独立角色对话不计入原生工作会话统计。
|
|
60
|
+
|
|
61
|
+
`/router watcher` 只读查询当前会话的 `watcherInsights`,报告加载状态、统计和
|
|
62
|
+
Router 最近使用的路由。Watcher 不修改模型路由、提示词、工具、审批或模型请求。
|
|
63
|
+
|
|
64
|
+
只需安装 Router 聚合包。安装前先在同一 profile 执行 `dsh plugin list`。如果列表中
|
|
65
|
+
存在独立安装的上游 `dsh-watcher` 或 `@ljwei-stak/dsh-watcher-for-mrg`,按列表中的包名
|
|
66
|
+
执行 `dsh plugin remove dsh-watcher` 或
|
|
67
|
+
`dsh plugin remove @ljwei-stak/dsh-watcher-for-mrg`。Router 会加载其固定版本的 Watcher;
|
|
68
|
+
保留任一独立条目都会形成重复的 loader ID。
|
|
51
69
|
|
|
52
70
|
### 插件与桌面端分别更新
|
|
53
71
|
|
|
54
72
|
“GAL 视窗 → 项目更新”分别检查插件 npm 版本和官方 DSH Desktop 版本。支持“仅更新 npm 插件”“仅更新完整客户端”和“一键更新插件与客户端”。桌面端插件安装通过已认证的宿主连接执行,成功后需要完全退出并重启 DSH Desktop。
|
|
55
73
|
|
|
56
|
-
普通浏览器中的页面可以查询插件版本、打开下载页面,但不能直接安装桌面端或修改其 profile。插件的 `0.4.
|
|
74
|
+
普通浏览器中的页面可以查询插件版本、打开下载页面,但不能直接安装桌面端或修改其 profile。插件的 `0.4.24` 与 DSH Desktop 的版本号相互独立。
|
|
57
75
|
|
|
58
76
|
## 安装
|
|
59
77
|
|
|
@@ -75,7 +93,7 @@
|
|
|
75
93
|
|
|
76
94
|
```sh
|
|
77
95
|
dsh --version
|
|
78
|
-
dsh plugin add --save-exact --registry=https://registry.npmjs.org/ @ljwei-stak/model-router-galgame@0.4.
|
|
96
|
+
dsh plugin add --save-exact --registry=https://registry.npmjs.org/ @ljwei-stak/model-router-galgame@0.4.24
|
|
79
97
|
```
|
|
80
98
|
|
|
81
99
|
3. 安装成功后,使用桌面端的重启入口,或从托盘明确退出后重新打开,仍选择刚才的 profile。仅关闭窗口可能只是隐藏应用。
|
|
@@ -90,7 +108,7 @@ dsh plugin add --save-exact --registry=https://registry.npmjs.org/ @ljwei-stak/m
|
|
|
90
108
|
|
|
91
109
|
```sh
|
|
92
110
|
dsh --version
|
|
93
|
-
dsh plugin --profile web add --save-exact --registry=https://registry.npmjs.org/ @ljwei-stak/model-router-galgame@0.4.
|
|
111
|
+
dsh plugin --profile web add --save-exact --registry=https://registry.npmjs.org/ @ljwei-stak/model-router-galgame@0.4.24
|
|
94
112
|
dsh --profile web --dump-config
|
|
95
113
|
```
|
|
96
114
|
|
|
@@ -112,16 +130,17 @@ dsh web
|
|
|
112
130
|
dsh --dump-config
|
|
113
131
|
```
|
|
114
132
|
|
|
115
|
-
Web / CLI 使用 `dsh --profile web --dump-config
|
|
133
|
+
Web / CLI 使用 `dsh --profile web --dump-config`。组合后的配置应包含以下七个插件,且没有重复 loader ID。配置导出不能替代实际启动验证;只需安装 Router 聚合包,依赖和 bundle 条目会自动加入。
|
|
116
134
|
|
|
117
|
-
| 插件 | 0.4.
|
|
135
|
+
| 插件 | 0.4.24 固定依赖版本 | 用途 |
|
|
118
136
|
| --- | --- | --- |
|
|
119
|
-
| `@ljwei-stak/model-router-galgame` | `0.4.
|
|
137
|
+
| `@ljwei-stak/model-router-galgame` | `0.4.24` | 路由、GAL 视窗、剧情/自由模式和更新入口 |
|
|
120
138
|
| `@liustack/modlens` | `3.25.4` | 兼容路由的图片理解 |
|
|
121
139
|
| `@liustack/modsearch` | `5.10.1` | 搜索与页面读取 |
|
|
122
140
|
| `@ljwei-stak/dsh-ego-browser` | `0.8.3` | 可见浏览器工具 |
|
|
123
141
|
| `@ljwei-stak/dsh-approval-gate` | `0.5.3` | 审批策略与审计 |
|
|
124
|
-
| `@ljwei-stak/ppt-master-for-mgr` | `6.3.
|
|
142
|
+
| `@ljwei-stak/ppt-master-for-mgr` | `6.3.2` | 原生 PPT 技能、脚本和模板 |
|
|
143
|
+
| `@ljwei-stak/dsh-watcher-for-mrg` | `0.4.0` | 只读工作路径与实际模型用量 |
|
|
125
144
|
|
|
126
145
|
`schemastery@3.18.0` 和 PPT Master 的原生技能提供器也会作为运行依赖自动安装。上述依赖采用固定版本;更新 Router 时使用新 Router 包声明的依赖组合,而不是自动升级每个依赖到各自的 `latest`。
|
|
127
146
|
|
|
@@ -134,9 +153,9 @@ Web / CLI 使用 `dsh --profile web --dump-config`。组合后的配置应包含
|
|
|
134
153
|
在 DSH 终端或与工作代理相同的执行环境中运行:
|
|
135
154
|
|
|
136
155
|
```sh
|
|
137
|
-
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.
|
|
138
|
-
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.
|
|
139
|
-
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.
|
|
156
|
+
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.2 ppt-master-for-mgr doctor
|
|
157
|
+
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.2 ppt-master-for-mgr setup
|
|
158
|
+
npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.2 ppt-master-for-mgr doctor
|
|
140
159
|
```
|
|
141
160
|
|
|
142
161
|
`setup` 会明确运行 pip 安装包内 requirements。可以先创建专用 Python 虚拟环境,再为每条命令添加 `--python /absolute/path/to/python`,或将环境变量 `PPT_MASTER_PYTHON` 设置为该解释器;Windows 路径包含空格时需加引号。工作代理也应使用同一个解释器。`doctor` 检查核心 Python 模块,不代表视觉质量或全部可选服务已通过检查。部分转换、渲染、配音和生图功能还需要 [PPT Master 文档](https://github.com/ljwei-stak/ppt-master-for-MGR) 中说明的额外软件或凭据。
|
|
@@ -160,6 +179,7 @@ npx --yes --package=@ljwei-stak/ppt-master-for-mgr@6.3.1 ppt-master-for-mgr doct
|
|
|
160
179
|
| `/router plan` | 查看当前会话最近一次路由方案 |
|
|
161
180
|
| `/router safety` | 查看审批桥接状态和当前阶段上下文 |
|
|
162
181
|
| `/router web` | 查看联网能力声明、宿主服务探测和任务策略 |
|
|
182
|
+
| `/router watcher` | 只读查看当前会话的 Watcher 统计和加载状态 |
|
|
163
183
|
|
|
164
184
|
默认模式为 `collective`。`/router safety` 和 `/router web` 是状态摘要,不代表审批服务或浏览器端到端诊断已通过;路由摘要不展示模型私有思维链。
|
|
165
185
|
|
|
@@ -213,7 +233,7 @@ Web / CLI 使用 `dsh plugin --profile web remove @ljwei-stak/model-router-galga
|
|
|
213
233
|
|
|
214
234
|
```sh
|
|
215
235
|
dsh plugin remove @liustack/modlens
|
|
216
|
-
dsh plugin add --save-exact --registry=https://registry.npmjs.org/ @ljwei-stak/model-router-galgame@0.4.
|
|
236
|
+
dsh plugin add --save-exact --registry=https://registry.npmjs.org/ @ljwei-stak/model-router-galgame@0.4.24
|
|
217
237
|
```
|
|
218
238
|
|
|
219
239
|
Web / CLI 在两条命令的 `plugin` 后加 `--profile web`。其他重复依赖按实际报错处理,不要一次删除全部插件。没有重复条目时不需要执行这些移除命令。
|
|
@@ -229,7 +249,7 @@ dsh plugin add /absolute/path/to/model-router-galgame
|
|
|
229
249
|
|
|
230
250
|
把路径替换为实际绝对路径,含空格时加引号;Web / CLI 使用 `dsh plugin --profile web add <实际路径>`。npm 包含可直接加载的构建产物,但不包含完整客户端源码、测试和原始素材。
|
|
231
251
|
|
|
232
|
-
|
|
252
|
+
克隆后先执行 `pnpm install --frozen-lockfile`。锁文件固定了构建浏览器客户端所需的 DSH SDK,不再要求相邻的 DSH Desktop 源码目录。修改客户端源码后,运行 `npm test`、`npm run build:client`、`npm run check:client` 和 `pnpm peers check`。出现 `SKIP` 不算构建校验通过。
|
|
233
253
|
|
|
234
254
|
## 数学路由模型
|
|
235
255
|
|
package/cordis.patch.yml
CHANGED
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
# Register PPT Master in the host's native skill catalog.
|
|
13
13
|
- id: ppt-master-for-mgr
|
|
14
14
|
name: '@ljwei-stak/ppt-master-for-mgr'
|
|
15
|
+
# Watcher observes the native session log in Chat and GAL work views.
|
|
16
|
+
- id: dsh-watcher
|
|
17
|
+
name: '@ljwei-stak/dsh-watcher-for-mrg'
|
|
15
18
|
# The router annotates multi-task approval requests; dsh-approval-gate
|
|
16
19
|
# owns the Flash decision, human handoff, audit and snapshot UI.
|
|
17
20
|
- id: dsh-approval-gate
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ljwei-stak/model-router-galgame",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "DeepSeek Harness plugin: adaptive model routing, cost analysis and GAL view",
|
|
6
6
|
"repository": {
|
|
@@ -67,13 +67,31 @@
|
|
|
67
67
|
"@ljwei-stak/dsh-approval-gate": "0.5.3",
|
|
68
68
|
"schemastery": "3.18.0",
|
|
69
69
|
"@ljwei-stak/dsh-ego-browser": "0.8.3",
|
|
70
|
-
"@ljwei-stak/ppt-master-for-mgr": "6.3.
|
|
70
|
+
"@ljwei-stak/ppt-master-for-mgr": "6.3.2",
|
|
71
|
+
"@ljwei-stak/dsh-watcher-for-mrg": "0.4.0"
|
|
71
72
|
},
|
|
72
73
|
"peerDependencies": {
|
|
73
|
-
"@deepseek-ai/dsh-settings": "^0.1.1-rc.1",
|
|
74
|
+
"@deepseek-ai/dsh-settings": "^0.1.1-rc.1 || ^0.1.2-rc.1",
|
|
74
75
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|
|
78
|
+
"@deepseek-ai/cordis": "4.0.2",
|
|
79
|
+
"@deepseek-ai/dsh-api-remotes": "0.1.2-rc.1",
|
|
80
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.2-rc.1",
|
|
81
|
+
"@deepseek-ai/dsh-client-store": "0.1.2-rc.1",
|
|
82
|
+
"@deepseek-ai/dsh-client-ui-chat": "0.1.2-rc.1",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.1.2-rc.1",
|
|
84
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.2-rc.1",
|
|
85
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.2-rc.1",
|
|
86
|
+
"@deepseek-ai/dsh-client-ui-session": "0.1.2-rc.1",
|
|
87
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.2-rc.1",
|
|
88
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.2-rc.1",
|
|
89
|
+
"@deepseek-ai/dsh-invariants": "0.1.2-rc.1",
|
|
90
|
+
"@deepseek-ai/dsh-scope": "0.1.2-rc.1",
|
|
91
|
+
"@deepseek-ai/dsh-session": "0.1.2-rc.1",
|
|
92
|
+
"@deepseek-ai/dsh-session-projection": "0.1.2-rc.1",
|
|
93
|
+
"@deepseek-ai/dsh-session-stats": "0.1.2-rc.1",
|
|
94
|
+
"@deepseek-ai/dsh-settings": "0.1.2-rc.1",
|
|
77
95
|
"esbuild": "0.28.2",
|
|
78
96
|
"lucide-react": "1.41.0",
|
|
79
97
|
"playwright": "1.63.0",
|