@jayyuen66/dsh-scrapling 0.1.14 → 0.1.15

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
@@ -6,6 +6,17 @@
6
6
  标准六类之外的小节(本仓的 `Boundaries` 收各版本的验证范围与能力边界,即哪些平台/档位真跑过、
7
7
  哪些只到本地夹具为止)。
8
8
 
9
+ ## 0.1.15
10
+
11
+ 宿主基线抬到 `0.2.2-rc.5`;mcp server 自述版本对齐包版本;mcp-server 的字段读取收编 shared。
12
+
13
+ ### Changed
14
+
15
+ - **宿主依赖线抬到 `0.2.2-rc.5`**:devDependencies 全族精确钉 rc.5,`engines.dsh` 与 dsh 家族 peer 同一条窗口;bin 产物随 rc.5 常量重建,MCP 默认客户端 pin(`MCP_DEFAULT_CLIENT_PIN`)与宿主窗口注释同步,THIRD_PARTY_NOTICES 的 shared 行更新 catalog 现量。
16
+ - **`MCP_SERVER_VERSION` 对齐包版本 `0.1.15`**(mcp server 自述版本与包版本同值的门禁)。
17
+ - **`lib/mcp-server.ts` 的本地 `fieldOf` 收编 shared**(同构副本):shared 版多一层 getter/Proxy 抛错保护;调用点的键无一撞原型成员、输入全为 JSON 数据,行为不变。
18
+ - **runtime-reader 的 `RemoteHost` / `isMounter` 与 url-policy 的 `withTimeout` 竞速骨架收编 shared**(`./lib/typert-client` / `./lib/with-timeout`;超时文案的 label 拼串留在调用方回调里)。shared 经 catalog 抬到 `^0.2.12`,`pnpm-lock.yaml` 经 `pnpm install --lockfile-only` 重解到 registry 现量;devDependencies 补 `react-dom`(`^19.3.0`,与 react 相邻)——shared 0.2.12 的 card-ui 经 `createPortal` 引 `react-dom`,客户端测试经 ESM 链解析到它(与 danger-guard / dir-prep / session-rescue 的既有供应同形);THIRD_PARTY_NOTICES 的 shared 行随伞根 catalog 改 `^0.2.12`。
19
+
9
20
  ## 0.1.14
10
21
 
11
22
  设置卡上按次读取的那些设置从下一次调用起生效(此前装配期就把配置收成了快照,改完要重启宿主才看得见);market 热挂与 bundle 层双路径装载时第二份 `apply` 整份让路;卡片样式改用 shared 的共享 `<style>`;`@deepseek-ai/dsh-error` 与 `@deepseek-ai/dsh-tools` 从 optional peer 改成普通 peer(干净目录里装出来的包原先装载即 `ERR_MODULE_NOT_FOUND`);托管解释器改选 `runtime/venv`(此前十九个工具一个都不注册);TLS 证书链用 certifi 兜底;另有十三处独立缺陷(查询串 `;` 分隔符与 pip 索引地址的凭据泄漏、win32 解释器路径、引号标量的 `#`、doctor 的数据目录与 `patchScalar` 的取值顺序、move 空 selector、`deps-check` 静默退 0、安装进度写入、坏 `state.json` 让安装按钮变灰、失败回执缺字段、`--profile` 指向普通文件在 Windows 被当成空 profile、验证服务器单线程被空闲连接堵死);shared 抬到 `^0.2.10`。十九个工具与 MCP 面的行为不变。
package/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
  <a href="https://github.com/JayYuen666/dsh-scrapling/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/JayYuen666/dsh-scrapling/ci.yml?branch=main&style=flat-square&label=ci" alt="ci" /></a>
13
13
  <img src="https://img.shields.io/badge/license-MIT-4c1?style=flat-square" alt="MIT" />
14
14
  <img src="https://img.shields.io/badge/node-%3E%3D24.9-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
15
- <img src="https://img.shields.io/badge/dsh-%5E0.2.2--rc.2-658EFF?style=flat-square" alt="dsh" />
15
+ <img src="https://img.shields.io/badge/dsh-%5E0.2.2--rc.5-658EFF?style=flat-square" alt="dsh" />
16
16
  <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/powered_by_dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white" alt="powered by dsh" /></a>
17
17
  </p>
18
18
 
@@ -81,7 +81,7 @@ dsh plugin --profile web add @jayyuen66/dsh-scrapling
81
81
  Remove with `dsh plugin --profile web remove @jayyuen66/dsh-scrapling`. The package is on the public npm registry, so installation needs no credentials and no scoped-registry line.
82
82
 
83
83
  - **Requires Node.js `>= 24.9`.** This is an ESM-only package, and the build entry points (`build-client.ts`, `build-host.ts`, `build-cli.ts`) are executed by `node` directly, so the floor has to sit where TypeScript type stripping is on by default (Node 22.18 up). The number itself is the host floor: `0.2.2` hosts declare Node `>= 24.9.0`, and a host below it never starts.
84
- - **Requires host `dsh` at the `0.2.2-rc.2` line or later.** The requirement the host actually reads is `engines.dsh` (`^0.2.2-rc.2`), and it decides alone; a host on a later line is refused and needs the explicit risk grant `dsh plugin --profile <p> allow-version <pkg>@<ver> --dsh-version <exact> --accept-risk`. The support window rolls: this package is verified against every released host version inside the window at publish time and re-verified once the window moves, so the version number in this bullet is not a standing promise.
84
+ - **Requires host `dsh` at the `0.2.2-rc.5` line or later.** The requirement the host actually reads is `engines.dsh` (`^0.2.2-rc.5`), and it decides alone; a host on a later line is refused and needs the explicit risk grant `dsh plugin --profile <p> allow-version <pkg>@<ver> --dsh-version <exact> --accept-risk`. The support window rolls: this package is verified against every released host version inside the window at publish time and re-verified once the window moves, so the version number in this bullet is not a standing promise.
85
85
  - **Requires Python 3.14+ with Scrapling installed** — named by `pythonBin`, or found by the fixed chain in `lib/runtime.ts` (the managed venv `dataDir/runtime/venv`, then the bare managed interpreter `dataDir/runtime/python/<version>`, then the repository's `_env/.venv`, then `PATH`). In an installed package the `_env/.venv` leg does not exist, so after `setup --feature core --apply` the interpreter is the managed venv and otherwise the `python3` on your `PATH` (`python` on Windows); whichever one is chosen is logged at load time, and a missing Scrapling reports an error carrying the install line to copy. The two managed legs are not interchangeable: the installer drops a managed CPython and then creates `runtime/venv` from it, and every wheel (Scrapling, patchright, the official MCP server) goes into the venv — the bare interpreter has no packages at all, so using it would fail every import while the logged path still looked right.
86
86
 
87
87
  ```sh
@@ -234,10 +234,10 @@ In `mcp` mode the server runs inside the plugin's own host process and calls the
234
234
 
235
235
  On a host that exposes the `mcpManager` service (the rc.2 web/desktop bundle) the plugin registers its server there at load: no `dsh-mcp-client` install and no profile entry are needed, and `mcpPort` alone decides the endpoint. The manual entry below is for CLI/headless profiles, where that service is absent. If an upgraded profile still carries the manual entry, remove it when relying on dynamic registration - otherwise the manager refuses the duplicate server name and the old entry keeps serving.
236
236
 
237
- Connecting dsh needs `@deepseek-ai/dsh-mcp-client`, which this plugin deliberately does not depend on. Pin the exact build matching the host version - npm `latest` is older than the host's own line, and the client's peer versions are literal, so one prerelease off installs but never activates. `0.2.2-rc.2` is the default; a host still on rc.1 takes `0.2.2-rc.1`, and `next` tracks the official beta line:
237
+ Connecting dsh needs `@deepseek-ai/dsh-mcp-client`, which this plugin deliberately does not depend on. Pin the exact build matching the host version - npm `latest` is older than the host's own line, and the client's peer versions are literal, so one prerelease off installs but never activates. `0.2.2-rc.5` is the default; a host still on rc.1 takes `0.2.2-rc.1`, and `next` tracks the official beta line:
238
238
 
239
239
  ```bash
240
- dsh plugin --profile <name> add @deepseek-ai/dsh-mcp-client@0.2.2-rc.2
240
+ dsh plugin --profile <name> add @deepseek-ai/dsh-mcp-client@0.2.2-rc.5
241
241
  ```
242
242
 
243
243
  Then add one entry to that profile's `cordis.patch.yml` — this is exactly what `dsh-scrapling setup --mode mcp` prints, so you can also let the CLI write it (drop `headers` when no token is configured):
@@ -270,7 +270,7 @@ dsh-scrapling setup --mode native --apply # a file that deliberately contain
270
270
  dsh-scrapling doctor --mode mcp --profile <profileDir>
271
271
  ```
272
272
 
273
- `doctor` reads what the profile actually says - `cordis.patch.yml` plus that profile's `package.json` - and prints one line per problem: two entries under `serverName: scrapling`, this plugin's entry next to an official `stdio` one, entries that do not match the mode, an entry whose port disagrees with `--port`, a profile without `@deepseek-ai/dsh-mcp-client` or with it pinned to something other than `0.2.2-rc.2` / `0.2.2-rc.1` / `next`, and an official entry while `officialMcpEnabled` is off. Exit `0` is "consistent", `1` names at least one problem, `2` is a bad argument. `integrationMode` itself is a plugin setting the CLI cannot read, so `--mode` is the claim being checked and has to match the deployment.
273
+ `doctor` reads what the profile actually says - `cordis.patch.yml` plus that profile's `package.json` - and prints one line per problem: two entries under `serverName: scrapling`, this plugin's entry next to an official `stdio` one, entries that do not match the mode, an entry whose port disagrees with `--port`, a profile without `@deepseek-ai/dsh-mcp-client` or with it pinned to something other than `0.2.2-rc.5` / `0.2.2-rc.1` / `next`, and an official entry while `officialMcpEnabled` is off. Exit `0` is "consistent", `1` names at least one problem, `2` is a bad argument. `integrationMode` itself is a plugin setting the CLI cannot read, so `--mode` is the claim being checked and has to match the deployment.
274
274
 
275
275
  `setup` for `official-mcp` asks for two separate statements before it writes anything: `officialMcpEnabled: true` in the profile and `--accept-risk` on the command line; missing either one prints `OFFICIAL_MCP_DISABLED` / `RISK_NOT_ACCEPTED` and writes nothing. At load time the host-side path is gated by `officialMcpEnabled` alone: a host exposing `mcpManager` registers the managed `scrapling-mcp` directly, while the `setup`-generated `dsh-mcp-client` entry is the fallback for CLI/headless profiles. Either path starts `<dataDir>/runtime/venv/bin/scrapling-mcp`, so run `setup --feature mcp --apply` first - see [Runtime packs](#runtime-packs-macos-arm64). When that binary is missing, `setup` prints a line saying so.
276
276
 
package/README.zh-CN.md CHANGED
@@ -12,7 +12,7 @@
12
12
  <a href="https://github.com/JayYuen666/dsh-scrapling/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/JayYuen666/dsh-scrapling/ci.yml?branch=main&style=flat-square&label=ci" alt="ci" /></a>
13
13
  <img src="https://img.shields.io/badge/license-MIT-4c1?style=flat-square" alt="MIT" />
14
14
  <img src="https://img.shields.io/badge/node-%3E%3D24.9-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
15
- <img src="https://img.shields.io/badge/dsh-%5E0.2.2--rc.2-658EFF?style=flat-square" alt="dsh" />
15
+ <img src="https://img.shields.io/badge/dsh-%5E0.2.2--rc.5-658EFF?style=flat-square" alt="dsh" />
16
16
  <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/powered_by_dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white" alt="powered by dsh" /></a>
17
17
  </p>
18
18
 
@@ -81,7 +81,7 @@ dsh plugin --profile web add @jayyuen66/dsh-scrapling
81
81
  卸载用 `dsh plugin --profile web remove @jayyuen66/dsh-scrapling`。包在公共 npm registry 上,安装不需要凭据,也不需要 scoped-registry 配置行。
82
82
 
83
83
  - **需要 Node.js `>= 24.9`。** 本包是 ESM-only,且构建入口(`build-client.ts`、`build-host.ts`、`build-cli.ts`)由 `node` 直接执行,所以下限必须落在 TypeScript 类型剥离默认开启的那批版本上(Node 22.18 起)。数字本身取自宿主:`0.2.2` 系列宿主声明 Node `>= 24.9.0`,低于它的宿主根本起不来。
84
- - **需要宿主 `dsh` 处在 `0.2.2-rc.2` 或更新的 `0.2.2` 版本线。** 宿主真正读的是 `engines.dsh`(`^0.2.2-rc.2`),且它**单独决定**;更新版本线的宿主会被拒,需要显式风险授权 `dsh plugin --profile <p> allow-version <pkg>@<ver> --dsh-version <exact> --accept-risk`。支持窗口是滚动的:本包在发布时把窗口内的每个已发布宿主版本逐版取证,窗口滚动后重新取证,不把这一句里的版本号当长期承诺。
84
+ - **需要宿主 `dsh` 处在 `0.2.2-rc.5` 或更新的 `0.2.2` 版本线。** 宿主真正读的是 `engines.dsh`(`^0.2.2-rc.5`),且它**单独决定**;更新版本线的宿主会被拒,需要显式风险授权 `dsh plugin --profile <p> allow-version <pkg>@<ver> --dsh-version <exact> --accept-risk`。支持窗口是滚动的:本包在发布时把窗口内的每个已发布宿主版本逐版取证,窗口滚动后重新取证,不把这一句里的版本号当长期承诺。
85
85
  - **需要 Python 3.14+ 且装好 Scrapling** —— 由 `pythonBin` 指定,或按 `lib/runtime.ts` 的固定链找到:托管 venv `dataDir/runtime/venv` → 裸托管解释器 `dataDir/runtime/python/<版本>` → 仓内 `_env/.venv` → `PATH`。装出去的包里没有 `_env/.venv` 这一档,所以跑过 `setup --feature core --apply` 的机器用的是那个托管 venv,没装过就是你 `PATH` 上的 `python3`(Windows 上是 `python`);选中哪一支会在装载时写进日志,缺 Scrapling 时报错里带着可直接照抄的安装命令。托管那两档不能互换:安装器先落一份托管 CPython,再用它建出 `runtime/venv`,所有 wheel(Scrapling、patchright、官方 MCP server)都装在 venv 里 —— 裸解释器里一个包都没有,拿它起 sidecar 会每个 import 都失败,而日志里那行路径看起来完全正常。
86
86
 
87
87
  ```sh
@@ -234,10 +234,10 @@ dsh-scrapling setup --status
234
234
 
235
235
  宿主有 `mcpManager` 服务时(rc.2 的 web/桌面组合包),插件在装载时把自己的 server 注册进去:不用装 `dsh-mcp-client`,也不用往 profile 加条目,只有 `mcpPort` 决定端点。下面的手工条目是给没有该服务的 CLI/headless profile 用的。升级上来的 profile 若还留着那条手工条目,切到动态注册时请把它删掉 —— 否则 manager 会因重名拒绝动态注册,实际仍由旧条目提供服务。
236
236
 
237
- 要接进 dsh 需要 `@deepseek-ai/dsh-mcp-client`,本插件刻意不依赖它。装与宿主**逐版**相同的那一支 —— npm 的 `latest` 比宿主还旧,而客户端对宿主各包的 peer 是逐字同版,差一个预发布就会「装得上、永不生效」。默认是 `0.2.2-rc.2`;仍停在 rc.1 的宿主装 `0.2.2-rc.1`,`next` 跟官方 beta 线:
237
+ 要接进 dsh 需要 `@deepseek-ai/dsh-mcp-client`,本插件刻意不依赖它。装与宿主**逐版**相同的那一支 —— npm 的 `latest` 比宿主还旧,而客户端对宿主各包的 peer 是逐字同版,差一个预发布就会「装得上、永不生效」。默认是 `0.2.2-rc.5`;仍停在 rc.1 的宿主装 `0.2.2-rc.1`,`next` 跟官方 beta 线:
238
238
 
239
239
  ```bash
240
- dsh plugin --profile <名> add @deepseek-ai/dsh-mcp-client@0.2.2-rc.2
240
+ dsh plugin --profile <名> add @deepseek-ai/dsh-mcp-client@0.2.2-rc.5
241
241
  ```
242
242
 
243
243
  再往那个 profile 的 `cordis.patch.yml` 加一条(没配 token 就不写 `headers`):
@@ -270,7 +270,7 @@ dsh-scrapling setup --mode native --apply # 写出的文件里一条条目
270
270
  dsh-scrapling doctor --mode mcp --profile <profileDir>
271
271
  ```
272
272
 
273
- `doctor` 读的是 profile 自己写下的东西 —— `cordis.patch.yml` 加那份 `package.json` —— 每处问题打一行:`serverName: scrapling` 下有两条例目、本插件的条目与官方 `stdio` 那条并存、条目类型与模式不符、条目的端口与 `--port` 说的不一致、profile 里没有 `@deepseek-ai/dsh-mcp-client` 或它钉的不是 `0.2.2-rc.2` / `0.2.2-rc.1` / `next`、以及 `officialMcpEnabled` 关着却留着官方条目。退 `0` 是一致,`1` 是至少点出一处,`2` 是参数不对。`integrationMode` 本身是插件设置,CLI 读不到,所以 `--mode` 就是被核对的那一句声明,它必须和部署配置说的是同一件事。
273
+ `doctor` 读的是 profile 自己写下的东西 —— `cordis.patch.yml` 加那份 `package.json` —— 每处问题打一行:`serverName: scrapling` 下有两条例目、本插件的条目与官方 `stdio` 那条并存、条目类型与模式不符、条目的端口与 `--port` 说的不一致、profile 里没有 `@deepseek-ai/dsh-mcp-client` 或它钉的不是 `0.2.2-rc.5` / `0.2.2-rc.1` / `next`、以及 `officialMcpEnabled` 关着却留着官方条目。退 `0` 是一致,`1` 是至少点出一处,`2` 是参数不对。`integrationMode` 本身是插件设置,CLI 读不到,所以 `--mode` 就是被核对的那一句声明,它必须和部署配置说的是同一件事。
274
274
 
275
275
  `setup` 生成 `official-mcp` 条目要两处分开表态:profile 里的 `officialMcpEnabled: true`,以及命令行的 `--accept-risk`;缺任何一处只打 `OFFICIAL_MCP_DISABLED` / `RISK_NOT_ACCEPTED`,一个字节都不写。装载时的宿主侧路径只由 `officialMcpEnabled` 决定:有 `mcpManager` 的宿主直接动态注册托管的 `scrapling-mcp`,`setup` 生成的 `dsh-mcp-client` 条目则留给没有该服务的 CLI/headless profile。两条路径起的都是 `<dataDir>/runtime/venv/bin/scrapling-mcp`,所以要先跑 `setup --feature mcp --apply` —— 见[运行时能力包](#运行时能力包macos-arm64)。那枚二进制不存在时,`setup` 会额外打一行说明这条条目现在起不来。
276
276
 
@@ -96,7 +96,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
96
96
 
97
97
  | 依赖 | 版本 | 许可 | 引入方 |
98
98
  | --- | --- | --- | --- |
99
- | `@jayyuen66/dsh-plugin-shared` | catalog(根 ^0.2.10) | MIT | 设置卡的共享组件供应行与 shared 子路径 |
99
+ | `@jayyuen66/dsh-plugin-shared` | catalog(根 ^0.2.12) | MIT | 设置卡的共享组件供应行与 shared 子路径 |
100
100
  | `scrapling` | 0.5 | BSD-3-Clause | Python sidecar |
101
101
  | `browserforge` | 1.2.4 | MIT | Scrapling 静态抓取的浏览器头生成 |
102
102
  | `apify-fingerprint-datapoints` | 0.15.0 | Apache-2.0 | browserforge 的指纹数据 |