@anweat/dsh-browser 0.1.15 → 0.1.17

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.
Files changed (2) hide show
  1. package/README.md +36 -6
  2. package/package.json +31 -30
package/README.md CHANGED
@@ -11,8 +11,23 @@
11
11
  | 插件发布通道 | DSH 基线 | 兼容承诺 |
12
12
  |---|---|---|
13
13
  | `0.1.12` 及更早的维护版本 | `dsh-v0.1.1-rc.2` 至 `dsh-v0.1.2-rc.1` | 旧基线;不与新插件混装 |
14
- | `0.1.15` | `dsh-v0.1.7-rc.2` | 精确锁定此宿主版本;组合安装、真实 Web profile 与设置持久化已验证 |
15
-
14
+ | `0.1.15` | `dsh-v0.1.7-rc.2` | 精确锁定该宿主版本;组合安装、真实 Web profile 与设置持久化已验证 |
15
+ | `0.1.17` | `dsh-v0.1.7-rc.2` ~ `dsh-v0.2.0-rc.2` | peer 收口为「实测过的两条线」(上界 `<0.2.1-0`);在 `0.2.0-rc.2` 上完成 typecheck、构建、52 项测试与真实挂载验证;补充浏览器缓存路径配置说明,并新增 peer 双解析模式检查 |
16
+
17
+ `0.1.17` 把 DSH 运行时依赖由精确锁定改为范围声明(`^0.1.7-rc.2 || >=0.2.0-rc.1 <0.2.1-0`),
18
+ 使同一份包可装在 `0.1.7-rc.2` 与 `0.2.0-rc.2` 两代宿主上(两代之间的 `defineTool`、
19
+ 凭据引用、配置表单与客户端槽位契约在本插件用到的范围内保持兼容)。
20
+ 范围只声明**实测过的两条线**,既不写成 `>=0.1.7-rc.2 <0.3.0`,也不写成一路放行到 0.3.0 的 `^0.2.0-rc.1`:
21
+
22
+ - 宿主的组装期校验用的是 `semver.satisfies(host, range, { includePrerelease: true })`,所以「单范围能不能过宿主」不是关键。
23
+ 真正决定装机成败的是 npm/pnpm 的**默认** semver:预发布版本只有在某个比较符自带同号(同 major.minor.patch)预发布时才被判为满足。
24
+ 于是 `>=0.1.7-rc.2 <0.2.1-0` 这种写法过得了宿主校验,却会让 `dsh plugin add` 报 ERESOLVE(上界 tuple 是 0.2.1,接不住 0.2.0-rc.2);
25
+ 而 `>=0.2.0-rc.1` 这个比较符是**承重**的,必须保留。
26
+ - `0.1.5 → 0.1.7` 曾一次性打断所有按 `0.1.5-alpha.1` 构建的插件。所以 `^0.2.0-rc.1`(等于说整个 0.2.x 都兼容)
27
+ 是对没测过版本的承诺;收口到 `<0.2.1-0` 后,若 0.2.1 真出现破坏,会在**组装期**直接报
28
+ `is incompatible with dsh 0.2.1` 并点名,而不是拖到用户机器上变成运行期怪错。
29
+ - 范围只表示「测过哪些」,不等于承诺不破坏;真正的防线是每换一个 DSH 版本重跑一遍这套验证。
30
+ `pnpm run test:peers`(已并入 `pnpm verify`)用两种解析模式逐个断言受管 peer,并自带 `--selftest` 已知行为自校验。
16
31
  `0.1.15` 使用 DSH 新客户端分包:状态存储来自
17
32
  `dsh-client-store`,设置契约来自 `dsh-client-ui-settings`,客户端 Context
18
33
  来自 Cordis。npm 上 `0.1.15-alpha.2` 仍声明旧版 DSH peer,不能与本版混用。
@@ -29,24 +44,24 @@
29
44
  ## 安装
30
45
 
31
46
  ```bash
32
- dsh plugin --profile web add @anweat/dsh-browser@0.1.15
47
+ dsh plugin --profile web add @anweat/dsh-browser@0.1.17
33
48
  # 或本地目录 / tarball:
34
49
  dsh plugin --profile web add ./dsh-browser
35
50
  # 重启(web profile 关闭了 HMR):
36
51
  dsh --profile web
37
52
  ```
38
53
 
39
- > 本版精确适配 `dsh-v0.1.7-rc.2`,不承诺兼容其他 DSH 版本。
54
+ > 本版支持 `dsh-v0.1.7-rc.2` 至 `dsh-v0.2.0-rc.2`;范围之外的宿主版本未经验证。
40
55
  > 若你的 harness 是包含未发布提交的本地源码 checkout,版本号可能有出入——用
41
56
  > `dsh plugin --profile web add ./<path>` 并在 profile 的 `pnpm-workspace.yaml`
42
57
  > 里对齐版本后重装即可。
43
58
 
44
59
  ## 从旧版本升级
45
60
 
46
- Web Search Pro 与浏览器插件应同步升级;面向 `dsh-v0.1.7-rc.2` 不要混用仍声明旧 peer 的 Browser `0.1.15-alpha.2`。
61
+ Web Search Pro 与浏览器插件应同步升级;面向 `dsh-v0.1.7-rc.2` 不要混用仍声明旧 peer 的 Browser `0.1.15-alpha.2`;两者都升到 `0.1.17` 即可。
47
62
 
48
63
  ```bash
49
- dsh plugin --profile web add @anweat/dsh-browser@0.1.15 dsh-web-search-pro@0.1.15
64
+ dsh plugin --profile web add @anweat/dsh-browser@0.1.17 dsh-web-search-pro@0.1.17
50
65
  ```
51
66
 
52
67
  升级后完整停止并重启 Web profile,再调用 `browser_status`、`browser_opencli_status` 和 `web_backend_status`;仅刷新网页不会重新加载插件服务或 Web Search Pro 配置面板。尤其不要只升级 Web Search Pro:新的工具目录、Patchright 运行时和调用缓冲都来自浏览器插件。
@@ -92,6 +107,21 @@ DSH 会话示例:
92
107
  | **patchright 驱动**(可选) | 与 Playwright 同版本的 Chromium 兼容驱动 | 插件内置;配置 `browserRuntime: patchright` 才启用 |
93
108
  | **opencli**(纯 Node CLI) | `@jackwener/opencli` npm 依赖 | 同上,本地优先 / 全局复用 |
94
109
 
110
+ ### 把共享浏览器缓存放到别的盘(可选)
111
+
112
+ 共享缓存默认落在 `%LOCALAPPDATA%\ms-playwright`(Windows 上即系统盘,约 400MB)。
113
+ 若要把内核放在别的盘、或直接复用一份已有的内核,在 loader 条目上显式给出可执行文件路径:
114
+
115
+ ```yaml
116
+ - id: browser
117
+ config:
118
+ executablePath: 'E:/caches/ms-playwright/chromium-1234/chrome-win64/chrome.exe'
119
+ ```
120
+
121
+ `executablePath` 必须指向真实的内核可执行文件(不是目录);设置后 `browser_status` 会显示该路径,
122
+ `browser_install` 不再需要执行。`browserRuntime: patchright` 时同样适用。
123
+ 注意该字段在插件挂载时解析:改完需要重新加载 profile(重启 Web profile),仅刷新网页不生效。
124
+
95
125
  ## 服务:`browser`
96
126
 
97
127
  `dsh-browser` 在 `apply()` 里 `ctx.provide('browser', service)`。任何插件声明
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anweat/dsh-browser",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "Self-contained browser runtime plugin for DeepSeek Harness (scoped @anweat) — bundles Playwright (chromium) and OpenCLI as plugin-local dependencies (with global-reuse fallback), exposes a `browser` service and interactive browser tools.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,16 +31,16 @@
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@deepseek-ai/cordis": "4.0.4",
34
- "@deepseek-ai/dsh-tools": "0.1.7-rc.2",
35
- "@deepseek-ai/dsh-client-connection": "0.1.7-rc.2",
36
- "@deepseek-ai/dsh-client-locale": "0.1.7-rc.2",
37
- "@deepseek-ai/dsh-client-store": "0.1.7-rc.2",
38
- "@deepseek-ai/dsh-client-ui-renderer": "0.1.7-rc.2",
39
- "@deepseek-ai/dsh-client-ui-settings": "0.1.7-rc.2",
40
- "@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.2",
41
- "@deepseek-ai/dsh-client-ui-plugin-manager": "0.1.7-rc.2",
42
- "@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2",
43
- "@deepseek-ai/dsh-settings": "0.1.7-rc.2",
34
+ "@deepseek-ai/dsh-tools": "^0.1.7-rc.2 || >=0.2.0-rc.1 <0.2.1-0",
35
+ "@deepseek-ai/dsh-client-connection": "^0.1.7-rc.2 || >=0.2.0-rc.1 <0.2.1-0",
36
+ "@deepseek-ai/dsh-client-locale": "^0.1.7-rc.2 || >=0.2.0-rc.1 <0.2.1-0",
37
+ "@deepseek-ai/dsh-client-store": "^0.1.7-rc.2 || >=0.2.0-rc.1 <0.2.1-0",
38
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-rc.2 || >=0.2.0-rc.1 <0.2.1-0",
39
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.7-rc.2 || >=0.2.0-rc.1 <0.2.1-0",
40
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-rc.2 || >=0.2.0-rc.1 <0.2.1-0",
41
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "^0.1.7-rc.2 || >=0.2.0-rc.1 <0.2.1-0",
42
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.2 || >=0.2.0-rc.1 <0.2.1-0",
43
+ "@deepseek-ai/dsh-settings": "^0.1.7-rc.2 || >=0.2.0-rc.1 <0.2.1-0",
44
44
  "@deepseek-ai/schemastery": ">=3.18.2 <4"
45
45
  },
46
46
  "peerDependenciesMeta": {
@@ -88,22 +88,22 @@
88
88
  },
89
89
  "devDependencies": {
90
90
  "@deepseek-ai/cordis": "4.0.4",
91
- "@deepseek-ai/dsh-agent": "0.1.7-rc.2",
92
- "@deepseek-ai/dsh-invariants": "0.1.7-rc.2",
93
- "@deepseek-ai/dsh-llm": "0.1.7-rc.2",
94
- "@deepseek-ai/dsh-scope": "0.1.7-rc.2",
95
- "@deepseek-ai/dsh-session": "0.1.7-rc.2",
96
- "@deepseek-ai/dsh-session-projection": "0.1.7-rc.2",
97
- "@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2",
98
- "@deepseek-ai/dsh-user-approval": "0.1.7-rc.2",
99
- "@deepseek-ai/dsh-tools": "0.1.7-rc.2",
100
- "@deepseek-ai/dsh-client-connection": "0.1.7-rc.2",
101
- "@deepseek-ai/dsh-client-locale": "0.1.7-rc.2",
102
- "@deepseek-ai/dsh-client-store": "0.1.7-rc.2",
103
- "@deepseek-ai/dsh-client-ui-renderer": "0.1.7-rc.2",
104
- "@deepseek-ai/dsh-client-ui-settings": "0.1.7-rc.2",
105
- "@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2",
106
- "@deepseek-ai/dsh-settings": "0.1.7-rc.2",
91
+ "@deepseek-ai/dsh-agent": "0.2.0-rc.2",
92
+ "@deepseek-ai/dsh-invariants": "0.2.0-rc.2",
93
+ "@deepseek-ai/dsh-llm": "0.2.0-rc.2",
94
+ "@deepseek-ai/dsh-scope": "0.2.0-rc.2",
95
+ "@deepseek-ai/dsh-session": "0.2.0-rc.2",
96
+ "@deepseek-ai/dsh-session-projection": "0.2.0-rc.2",
97
+ "@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
98
+ "@deepseek-ai/dsh-user-approval": "0.2.0-rc.2",
99
+ "@deepseek-ai/dsh-tools": "0.2.0-rc.2",
100
+ "@deepseek-ai/dsh-client-connection": "0.2.0-rc.2",
101
+ "@deepseek-ai/dsh-client-locale": "0.2.0-rc.2",
102
+ "@deepseek-ai/dsh-client-store": "0.2.0-rc.2",
103
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2",
104
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.2",
105
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2",
106
+ "@deepseek-ai/dsh-settings": "0.2.0-rc.2",
107
107
  "@deepseek-ai/schemastery": "3.18.4",
108
108
  "@types/react": "~18.3.1",
109
109
  "@types/react-dom": "~18.3.1",
@@ -112,8 +112,8 @@
112
112
  "tsdown": "^0.22.2",
113
113
  "typescript": "^5.6.0",
114
114
  "@types/node": "^22.0.0",
115
- "@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.2",
116
- "@deepseek-ai/dsh-client-ui-plugin-manager": "0.1.7-rc.2",
115
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.2",
116
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.0-rc.2",
117
117
  "clsx": "^2.0.0"
118
118
  },
119
119
  "dsh": {
@@ -148,6 +148,7 @@
148
148
  "typecheck": "tsc -p tsconfig.json --noEmit",
149
149
  "test": "node --test --experimental-transform-types test/*.test.ts",
150
150
  "test:client-bundle": "node scripts/check-client-bundle.mjs",
151
- "verify": "pnpm run typecheck && pnpm run build && pnpm test && pnpm run test:client-bundle"
151
+ "verify": "pnpm run typecheck && pnpm run test:peers && pnpm run build && pnpm test && pnpm run test:client-bundle",
152
+ "test:peers": "node test/compat/check-peer-ranges.js"
152
153
  }
153
154
  }