@ljwei-stak/model-router-galgame 0.4.16 → 0.4.18
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 +2 -2
- package/.dsh-plugin/index.mjs +2 -2
- package/.dsh-plugin/shared/web-routing.mjs +2 -2
- package/README.md +10 -10
- package/README.zh.md +11 -11
- package/cordis.patch.yml +1 -1
- package/package.json +4 -5
package/.dsh-plugin/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
window.__ModuleLoader__.load({
|
|
2
|
-
id: "model-router-galgame",
|
|
2
|
+
id: "@ljwei-stak/model-router-galgame",
|
|
3
3
|
factory: (require) => {
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
@@ -61740,7 +61740,7 @@ var gal_scene_default = { version: 1, settings: { stageW: 1920, stageH: 1080, sh
|
|
|
61740
61740
|
var name = "gal-view";
|
|
61741
61741
|
var PROJECT_URL = "https://github.com/ljwei-stak/deepseek-harness";
|
|
61742
61742
|
var RELEASES_URL = `${PROJECT_URL}/releases`;
|
|
61743
|
-
var PLUGIN_VERSION = "0.4.
|
|
61743
|
+
var PLUGIN_VERSION = "0.4.17";
|
|
61744
61744
|
function createUpdateApi() {
|
|
61745
61745
|
const bridge = globalThis.deepSeekHarnessDesktop;
|
|
61746
61746
|
const openExternal = (url) => {
|
package/.dsh-plugin/index.mjs
CHANGED
|
@@ -34,8 +34,8 @@ let routerSettingsPromise = Promise.resolve(false)
|
|
|
34
34
|
async function loadSettingsRuntime() {
|
|
35
35
|
if (settingsRuntimePromise !== undefined) return settingsRuntimePromise
|
|
36
36
|
settingsRuntimePromise = Promise.all([
|
|
37
|
-
import('@deepseek-ai/schemastery')
|
|
38
|
-
import('@deepseek-ai/dsh-settings')
|
|
37
|
+
import('@deepseek-ai/schemastery'),
|
|
38
|
+
import('@deepseek-ai/dsh-settings'),
|
|
39
39
|
]).then(([schemaModule, settingsModule]) => ({
|
|
40
40
|
z: schemaModule.default ?? schemaModule,
|
|
41
41
|
settingsNamespace: settingsModule.settingsNamespace,
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
export const MODSEARCH_PACKAGE = '@liustack/modsearch'
|
|
11
11
|
export const MODSEARCH_VERSION = '5.10.1'
|
|
12
|
-
export const EGO_BROWSER_PACKAGE = 'dsh-ego-browser'
|
|
13
|
-
export const EGO_BROWSER_VERSION = '0.8.
|
|
12
|
+
export const EGO_BROWSER_PACKAGE = '@ljwei-stak/dsh-ego-browser'
|
|
13
|
+
export const EGO_BROWSER_VERSION = '0.8.2'
|
|
14
14
|
|
|
15
15
|
const WEB_RE = /https?:\/\/|www\.|联网|上网|网页|网站|搜索|查找|资料|文献|新闻|最新|实时|网页内容|页面|来源|引用|网络|x\s*帖子|twitter|推特|github|反爬|验证码|登录|人机验证/i
|
|
16
16
|
const BROWSER_RE = /反爬|验证码|人机验证|cloudflare|turnstile|recaptcha|hcaptcha|登录|需要点击|动态页面|网页窗口|浏览器|可见窗口|手动验证|页面交互/i
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ This plugin installs on an original DeepSeek Harness checkout. It adds a cost-aw
|
|
|
16
16
|
- **Markdown/KaTeX** reuses Harness `MarkdownText` for headings, lists, tables, quotes, code, links, and formulas. Wide content scrolls inside the dialogue box; player input remains plain text.
|
|
17
17
|
- **Attachments and multimodality** use the native image pipeline and extract Markdown/TXT/JSON/code as text. PDF/DOCX and other binary files keep an explicit parsing state rather than silently inventing content.
|
|
18
18
|
- **Multi-task safety approval adapter** bundles `@ljwei-stak/dsh-approval-gate@0.5.2`. Every sandbox escalation in a complex collective task carries the work package, stage, route, and task-count context; multi-task work is marked as a `bulk` risk candidate for Flash classification, hard-risk human review, learning, audit, and snapshots. Single-session mode is never forcibly rerouted.
|
|
19
|
-
- **Web search and anti-bot browsing** bundle `@liustack/modsearch@5.10.1` and
|
|
19
|
+
- **Web search and anti-bot browsing** bundle `@liustack/modsearch@5.10.1` and `@ljwei-stak/dsh-ego-browser@0.8.2`. ModSearch handles `web_search`, `read_page`, and `x_search`; Ego Browser opens a real Chrome/Edge window for JavaScript pages, login state, screenshots, and human verification. Search failures and anti-bot pages are routed to the visible browser flow.
|
|
20
20
|
- **OpenCode Zen compatibility** repairs official website overrides to the catalog-owned `/zen` and `/zen/v1` endpoints while leaving custom gateways untouched.
|
|
21
21
|
- **Release updates and desktop support** provide release checks and a one-click updater. When the desktop is outdated it updates the full client and bundled plugin; otherwise it updates only the plugin. Browser-only installs open Releases because they cannot write local files.
|
|
22
22
|
|
|
@@ -31,7 +31,7 @@ This plugin installs on an original DeepSeek Harness checkout. It adds a cost-aw
|
|
|
31
31
|
|
|
32
32
|
### Recommended: install the published npm package
|
|
33
33
|
|
|
34
|
-
The package is public and already includes the official `@liustack/modlens@3.25.4`, `@ljwei-stak/dsh-approval-gate@0.5.2`, `@liustack/modsearch@5.10.1`, and the registry package
|
|
34
|
+
The package is public and already includes the official `@liustack/modlens@3.25.4`, `@ljwei-stak/dsh-approval-gate@0.5.2`, `@liustack/modsearch@5.10.1`, and the registry package `@ljwei-stak/dsh-ego-browser@0.8.2` plus `schemastery@3.18.0`. Ego Browser uses the tools and settings services supplied by the DSH host. You do not need to clone the Ego Browser GitHub repository or install these dependencies separately.
|
|
35
35
|
|
|
36
36
|
1. Open PowerShell in the DSH Desktop checkout:
|
|
37
37
|
|
|
@@ -85,9 +85,9 @@ The output should contain:
|
|
|
85
85
|
```text
|
|
86
86
|
@ljwei-stak/model-router-galgame
|
|
87
87
|
@liustack/modlens
|
|
88
|
-
dsh-approval-gate
|
|
88
|
+
@ljwei-stak/dsh-approval-gate
|
|
89
89
|
@liustack/modsearch
|
|
90
|
-
dsh-ego-browser
|
|
90
|
+
@ljwei-stak/dsh-ego-browser
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
Do not add `@liustack/modlens` separately after installing this package. The
|
|
@@ -107,13 +107,13 @@ pnpm dsh plugin --profile web remove @ljwei-stak/dsh-approval-gate
|
|
|
107
107
|
pnpm dsh plugin --profile web add "@ljwei-stak/model-router-galgame@$routerVersion"
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
Do not add `@liustack/modsearch` or
|
|
110
|
+
Do not add `@liustack/modsearch` or `@ljwei-stak/dsh-ego-browser` separately either. If either
|
|
111
111
|
was installed before the router, remove the standalone entries and reinstall the
|
|
112
112
|
router once so each loader is registered exactly once:
|
|
113
113
|
|
|
114
114
|
```powershell
|
|
115
115
|
pnpm dsh plugin --profile web remove @liustack/modsearch
|
|
116
|
-
pnpm dsh plugin --profile web remove dsh-ego-browser
|
|
116
|
+
pnpm dsh plugin --profile web remove @ljwei-stak/dsh-ego-browser
|
|
117
117
|
pnpm dsh plugin --profile web add "@ljwei-stak/model-router-galgame@$routerVersion"
|
|
118
118
|
```
|
|
119
119
|
|
|
@@ -164,10 +164,10 @@ pnpm dsh plugin --profile web add "@ljwei-stak/model-router-galgame@$routerVersi
|
|
|
164
164
|
```
|
|
165
165
|
|
|
166
166
|
For a reproducible deployment, replace `$routerVersion` with a concrete version
|
|
167
|
-
that you have verified with `npm view` (for example `0.4.
|
|
167
|
+
that you have verified with `npm view` (for example `0.4.17`):
|
|
168
168
|
|
|
169
169
|
```powershell
|
|
170
|
-
pnpm dsh plugin --profile web add @ljwei-stak/model-router-galgame@0.4.
|
|
170
|
+
pnpm dsh plugin --profile web add @ljwei-stak/model-router-galgame@0.4.17
|
|
171
171
|
```
|
|
172
172
|
|
|
173
173
|
You can also ask pnpm to update an already-installed package within its declared
|
|
@@ -238,10 +238,10 @@ If no model is available, native model selection remains intact and the conversa
|
|
|
238
238
|
|
|
239
239
|
### Approval and multi-task safety
|
|
240
240
|
|
|
241
|
-
The bundle loads
|
|
241
|
+
The bundle loads `@ljwei-stak/dsh-approval-gate` together with the router. To enable its learning-based auto-approval mode, select the target plugin's `auto-approve` permission preset in the profile; the default `ask` policy continues to use the native Harness approval UI. The router does not decide approval outcomes. It only adds safety context before `approval/request` enters the waterfall:
|
|
242
242
|
|
|
243
243
|
- Complex collective tasks with at least three work packages carry `risk_candidate=bulk`, and each stage is audited separately.
|
|
244
|
-
- Deletion, credential, remote, system, and bulk risks remain human-only in
|
|
244
|
+
- Deletion, credential, remote, system, and bulk risks remain human-only in `@ljwei-stak/dsh-approval-gate`.
|
|
245
245
|
- Flash timeout, errors, unparseable output, or failed similarity checks fail safe to a human review.
|
|
246
246
|
- Single-session mode keeps the native model and approval behavior.
|
|
247
247
|
|
package/README.zh.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
- **Markdown/KaTeX**:复用 Harness 的 `MarkdownText`,支持标题、列表、表格、引用、代码、链接和数学公式;宽表格、代码块和公式在对话框内滚动,玩家输入保持纯文本。
|
|
17
17
|
- **附件与多模态**:图片使用原生多模态管线,Markdown/TXT/JSON/代码文件提取为文本;PDF/DOCX 等二进制文件保留解析状态,不会静默伪造内容。
|
|
18
18
|
- **多任务安全审批适配**:内置 `@ljwei-stak/dsh-approval-gate@0.5.2` 适配。复杂集体任务的每次沙箱升级都会附带工作包、阶段、路由和任务数量上下文;批量任务标记为 `bulk` 风险候选,由审批插件执行 Flash 判定、硬风险人工确认、学习白名单、审计和快照。单独会话不会被路由器强制切换。
|
|
19
|
-
- **联网与反爬窗口**:内置 `@liustack/modsearch@5.10.1` 接管原生 `web_search`,并提供 `read_page`/`x_search`;内置
|
|
19
|
+
- **联网与反爬窗口**:内置 `@liustack/modsearch@5.10.1` 接管原生 `web_search`,并提供 `read_page`/`x_search`;内置 `@ljwei-stak/dsh-ego-browser@0.8.2` 提供真实 Chrome 窗口、语义树、截图、点击、登录态和验证码检测。ModSearch 抓取失败或遇到动态/反爬页面时,路由指导模型切换到 Ego Browser;检测到人机验证会暂停并让用户在观察窗完成。
|
|
20
20
|
- **OpenCode Zen**:官方站点覆盖会自动恢复模型目录所需的 `/zen`、`/zen/v1` 端点;自定义网关不受影响。
|
|
21
21
|
- **更新与桌面端**:插件设置页提供 GitHub Release 检查和一键更新;客户端过期时更新完整客户端及内置插件,否则只更新插件。网页端无法写入本机文件时会打开 Releases 页面。
|
|
22
22
|
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
### 推荐方式:安装已发布的 npm 包
|
|
33
33
|
|
|
34
|
-
这个公开包会从 npm registry 安装官方 `@liustack/modlens@3.25.4`、`@ljwei-stak/dsh-approval-gate@0.5.2`、`@liustack/modsearch@5.10.1` 和
|
|
34
|
+
这个公开包会从 npm registry 安装官方 `@liustack/modlens@3.25.4`、`@ljwei-stak/dsh-approval-gate@0.5.2`、`@liustack/modsearch@5.10.1` 和 `@ljwei-stak/dsh-ego-browser@0.8.2`,同时带上 `schemastery@3.18.0`。Ego Browser 使用 DSH 宿主提供的工具和设置服务。无需克隆 Ego Browser GitHub 仓库,也无需单独安装这些依赖。
|
|
35
35
|
|
|
36
36
|
1. 在 PowerShell 中进入 DSH Desktop 目录:
|
|
37
37
|
|
|
@@ -84,9 +84,9 @@ pnpm dsh --profile web --dump-config | Select-String "model-router-galgame|modle
|
|
|
84
84
|
```text
|
|
85
85
|
@ljwei-stak/model-router-galgame
|
|
86
86
|
@liustack/modlens
|
|
87
|
-
dsh-approval-gate
|
|
87
|
+
@ljwei-stak/dsh-approval-gate
|
|
88
88
|
@liustack/modsearch
|
|
89
|
-
dsh-ego-browser
|
|
89
|
+
@ljwei-stak/dsh-ego-browser
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
安装本插件后不要再单独添加 `@liustack/modlens`。本插件已经包含官方 ModLens
|
|
@@ -98,12 +98,12 @@ pnpm dsh plugin --profile web remove @liustack/modlens
|
|
|
98
98
|
pnpm dsh plugin --profile web add "@ljwei-stak/model-router-galgame@$routerVersion"
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
`modsearch` 和
|
|
101
|
+
`modsearch` 和 `@ljwei-stak/dsh-ego-browser` 也不要在同一 profile 中重复安装。重复条目会造成
|
|
102
102
|
搜索 provider 或浏览器工具重复注册:
|
|
103
103
|
|
|
104
104
|
```powershell
|
|
105
105
|
pnpm dsh plugin --profile web remove @liustack/modsearch
|
|
106
|
-
pnpm dsh plugin --profile web remove dsh-ego-browser
|
|
106
|
+
pnpm dsh plugin --profile web remove @ljwei-stak/dsh-ego-browser
|
|
107
107
|
pnpm dsh plugin --profile web add "@ljwei-stak/model-router-galgame@$routerVersion"
|
|
108
108
|
```
|
|
109
109
|
|
|
@@ -151,10 +151,10 @@ pnpm dsh plugin --profile web add "@ljwei-stak/model-router-galgame@$routerVersi
|
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
如果需要可复现部署,请把 `$routerVersion` 替换为通过 `npm view` 确认过的具体版本号
|
|
154
|
-
(例如 `0.4.
|
|
154
|
+
(例如 `0.4.17`):
|
|
155
155
|
|
|
156
156
|
```powershell
|
|
157
|
-
pnpm dsh plugin --profile web add @ljwei-stak/model-router-galgame@0.4.
|
|
157
|
+
pnpm dsh plugin --profile web add @ljwei-stak/model-router-galgame@0.4.17
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
已经安装过插件时,也可以让 pnpm 在当前版本范围内更新:
|
|
@@ -222,13 +222,13 @@ pnpm dsh plugin --profile desktop remove @ljwei-stak/model-router-galgame
|
|
|
222
222
|
|
|
223
223
|
### 审批与多任务安全策略
|
|
224
224
|
|
|
225
|
-
安装后,profile 的 bundle 会同时加载
|
|
225
|
+
安装后,profile 的 bundle 会同时加载 `@ljwei-stak/dsh-approval-gate`。要启用其自动审批学习模式,
|
|
226
226
|
请在 profile 的权限预设中选择目标插件提供的 `auto-approve`;默认 `ask` 策略仍然由
|
|
227
227
|
Harness 原生审批界面处理。路由器不会改变审批结论,只会在 `approval/request` 进入瀑布
|
|
228
228
|
前补充安全上下文:
|
|
229
229
|
|
|
230
230
|
- 复杂集体任务(至少 3 个工作包)标记 `risk_candidate=bulk`,每个阶段单独审计。
|
|
231
|
-
- 删除、凭据、远程、系统和批量风险由
|
|
231
|
+
- 删除、凭据、远程、系统和批量风险由 `@ljwei-stak/dsh-approval-gate` 永久要求人工确认。
|
|
232
232
|
- Flash 超时、异常、输出无法解析或同类验证失败时,按 fail-safe 转人工。
|
|
233
233
|
- 单独会话保留原生模型和审批行为,不会被集体路由计划覆盖。
|
|
234
234
|
|
|
@@ -251,7 +251,7 @@ Harness 原生审批界面处理。路由器不会改变审批结论,只会在
|
|
|
251
251
|
|
|
252
252
|
## 数学路由模型
|
|
253
253
|
|
|
254
|
-
本节按照 `RESEARCH_PAPER_FRAMEWORK.md` 的论文框架,完整说明当前 `0.4.
|
|
254
|
+
本节按照 `RESEARCH_PAPER_FRAMEWORK.md` 的论文框架,完整说明当前 `0.4.17`
|
|
255
255
|
实现。生产路由器与离线实验插件共用质量下限、费用模型、目标函数和回退语义;
|
|
256
256
|
生产实现进一步加入 Pareto 剪枝与有界全局搜索,因此不再是互相独立的逐阶段局部贪心。
|
|
257
257
|
|
package/cordis.patch.yml
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
name: '@liustack/modsearch'
|
|
9
9
|
# Ego Browser supplies visible Chromium tools for JS-heavy and anti-bot pages.
|
|
10
10
|
- id: ego-browser
|
|
11
|
-
name: 'dsh-ego-browser'
|
|
11
|
+
name: '@ljwei-stak/dsh-ego-browser'
|
|
12
12
|
# The router annotates multi-task approval requests; dsh-approval-gate
|
|
13
13
|
# owns the Flash decision, human handoff, audit and snapshot UI.
|
|
14
14
|
- 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.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "DeepSeek Harness plugin: adaptive model routing, cost analysis and GAL view",
|
|
6
6
|
"repository": {
|
|
@@ -61,12 +61,11 @@
|
|
|
61
61
|
"node": ">=22.19"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@deepseek-ai/dsh-tools": "0.1.0-rc.8",
|
|
65
64
|
"@liustack/modlens": "3.25.4",
|
|
66
65
|
"@liustack/modsearch": "5.10.1",
|
|
67
|
-
"@ljwei-stak/dsh-approval-gate": "0.5.
|
|
68
|
-
"
|
|
69
|
-
"
|
|
66
|
+
"@ljwei-stak/dsh-approval-gate": "0.5.3",
|
|
67
|
+
"schemastery": "3.18.0",
|
|
68
|
+
"@ljwei-stak/dsh-ego-browser": "0.8.2"
|
|
70
69
|
},
|
|
71
70
|
"peerDependencies": {
|
|
72
71
|
"@deepseek-ai/dsh-settings": "^0.1.1-rc.1",
|