@jayyuen66/dsh-scrapling 0.1.12 → 0.1.14

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,75 @@
6
6
  标准六类之外的小节(本仓的 `Boundaries` 收各版本的验证范围与能力边界,即哪些平台/档位真跑过、
7
7
  哪些只到本地夹具为止)。
8
8
 
9
+ ## 0.1.14
10
+
11
+ 设置卡上按次读取的那些设置从下一次调用起生效(此前装配期就把配置收成了快照,改完要重启宿主才看得见);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 面的行为不变。
12
+
13
+ ### Fixed
14
+
15
+ - **shared 抬到 `^0.2.10`**:设置卡吸底保存条的旧固定 id 冲突与底色随 shared 修复;`registerSkill` 在 effect 挂不上时立即撤销注册并回 `false`;client bundle 按新 shared 重建。
16
+ - `_env/v5_spa.py` 的验证服务器原来是单线程 `socketserver.TCPServer`:一条只连上、不发数据的空闲连接就能把后续请求堵死(实测 2 秒超时),而 handler 也没有读超时。改成 `ThreadingMixIn + TCPServer` 并置 `daemon_threads`,与同目录 `_env/v6_guard.py` 的 `ThreadingHTTPServer` 一致;改动后同一组探针下「空闲连接 + 正常请求」由 `TimeoutError` 变 200。
17
+ - **设置卡改完要重启才生效**:宿主的 `_commitVolatile()` 在 volatile 字段被改写时只 `updateVolatile(ref, source)`、**不重跑 `apply`**,而本包在装配期把 `config` 里的抽取类字段(`extractionType` / `mainContentOnly` / `fetchTimeoutMs` / `fetchMaxOutputChars` 等)一次性收进了常量。现在 `depsFor` 交出去的是 `settingsViewOf(config, dataDir, toolName)` 返回的**活视图**:`lib/live-view.ts` 的 `liveView(read)` 给每个键挂 getter、每次访问现读。不用 Proxy 是因为 `const { x } = proxy` 对非自有键只会取到 `undefined`,而十四个 builder 第一行就是 `const { settings } = deps;`。
18
+ - **工具级墙钟停在装配时的值**:`defineTool` 把 `options.timeoutMs` 一次性拷进产物对象,所以只改取值函数没有用——那次求值发生在装配时。`lib/tools.ts` 新增 `bindLiveTimeout(tool, settings)`,用 `Object.defineProperty(tool, "timeoutMs", { get: () => toolTimeoutOf(settings) })` 换成 getter;宿主 `tool-call-timeout-policy` 每次 `tools/execute` 都现读 `ctx.tools.get(name, agent)?.timeoutMs`,于是改设置后下一次调用即用新值。
19
+ - **干净目录里装出来的包装载即失败**:`host.js` 顶层以**值**导入 `@deepseek-ai/dsh-error` 与 `@deepseek-ai/dsh-tools`,而它们在 `peerDependenciesMeta` 里被标成 `optional`。npm 不会替消费者安装 optional peer,于是 `npm install <tarball>` 之后 `import` 直接 `Cannot find package '@deepseek-ai/dsh-error'`。两枚改成普通 peer(`@deepseek-ai/dsh` 仍 optional——它不是值导入,且 profile 里必须由宿主供给);`test/publish-manifest.test.ts` 加一条守卫:**`host.js` 里按包名值导入的宿主包,一枚都不许被标成 optional peer**。
20
+ - **托管解释器选错了那一支,十九个工具"一个都不注册"**:`resolveRuntime` 的托管档只探 `dataDir/runtime/python/<版本>/bin/python3`(裸托管 CPython),而安装器 `installCore` 先落这份 CPython、再用它 `-m venv` 出 `dataDir/runtime/venv`,所有 wheel(Scrapling、patchright、官方 MCP server)都装在 **venv** 里。裸解释器里一个包都没有,之所以一直没被发现:`import scrapling` 在**子进程里**失败,插件侧看到的是 `capabilities` 全 false ⇒ `planTools` 不注册工具、`guidanceFor` 正文为空 ⇒ 虚拟 skill 也不注册,而装载日志里那行「Python 解释器:<绝对路径>(managed)」看起来完全正常。新增 `managedVenvPythonPath(dataDir)`,托管档按 **venv → 裸解释器** 顺序探(venv 不在才回落,那是装了一半的机器),`test/runtime.test.ts` 补三条用例钉住优先序、回落与层级。真宿主判据:`ps -eo pid,command | grep bridge.py` 的路径从 `runtime/python/3.14.9/bin/python3` 变成 `runtime/venv/bin/python3`。
21
+ - **`scrapling_fetch` 对一类公网站点一律 `unable to get local issuer certificate`**:托管 CPython 没有自己的 OpenSSL 配置,macOS 上 `ssl.get_default_verify_paths()` 落到系统库 `/private/etc/ssl/cert.pem`,那份库缺若干公开根 —— 实测 `example.com` 的 SSL.com 链在它下面 `verify error:num=20`,同一张链条用 certifi 的 bundle 则 `Verify return code: 0`。`py/bridge.py` 新增 `configure_ca_bundle()`,在模块导入期把 `SSL_CERT_FILE` 与 `CURL_CA_BUNDLE` 指向 `certifi.where()`(两条链各喂一支:前者给 Python 的 `ssl`,后者给 libcurl/curl_cffi),**且只在两者都没被设过时才动**——企业 MITM 代理与用户自钉的私有根照旧优先。`py/tests/test_bridge.py` 补 8 条判据(显式指定时让路 / 原值保留 / 干净进程兜底到 certifi 的 cacert.pem(按宿主路径分隔符判定,Windows 原生反斜杠不再判假) / 两条链同值 / stdout 只有那三行 / 显式指定后不再兜底 / 空值的两枚变量按没设处理并真的写入环境);落值从 `setdefault` 改成直接赋值,与「空值算没设」的早退判据同口径。
22
+ - **输入控件撑出容器**(shared 侧):`.dsu-form` 整棵子树统一 `border-box`,否则 `.dsu-input` 的 `width:100%` 会连同左右 padding 一起撑出容器 26px。
23
+ - **小节内相邻元素间距为 0**(shared 侧):`.dsu-form .dsu-section>*+*` 给 10px,`.dsu-sectionHint` 4px,`.dsu-field` 之间仍 0。
24
+ - **`?a=1;token=abc` 这类查询串把凭据原样打进日志**:`py/redact.py` 的 `_redacted_query` 走 `parse_qsl`,而 Python 3.10 起它**不再把 `;` 当参数分隔符**——整串被读成一个名字 `a`、值 `1;token=abc`,参数名判据命中不了。改成按 `[&;]` 自己切:分隔符原样拼回(重排会让日志里的 URL 与真实请求对不上),每段用 `fullmatch` 取名字判 `_SECRET_QUERY_KEYS`。
25
+ - **pip 的索引地址会把凭据回显进错误文案**:`spawn` 继承父进程环境,用户在企业镜像里把 token 写进 `PIP_INDEX_URL` 之后,pip 失败时会把地址原样打回 stderr(实测 `WARNING: The index url "ht!tp://user:SECRETTOKEN123@host/simple" seems invalid` 与 `InvalidURL: … 'https://user:SECRETTOKEN123@/requests/'` 两种形态都是**明文**),而这条 stderr 截断 400 字符后进 `InstallError` 消息、再进作业输出与模型上下文。两层修:`lib/url-policy.ts` 的 `URL_USERINFO` 去掉 `^` 锚点(原先只认「整串就是一个 URL」,而诊断里的地址都夹在句子中间)并把 `redactUrlSecrets` 改成 `replaceAll`;`lib/installer.ts` 新增 `safeStderr()` 闸门,六处 stderr 通路(curl / HTTP 状态 / tar / venv / pip / chromium)与两处下载 URL 全部走它。`test/installer.test.ts` 补一条用例,并断言脱敏不能把诊断本身抹掉(`INSTALL_FAILED` 那一支仍带 `seems invalid`)。
26
+ - **win32 上托管 venv 的解释器路径永不存在**:`managedVenvPythonPath` 照 POSIX 名字拼成 `Scripts/python3.exe`,而 CPython 的 `venv/__init__.py` 在 Windows 上只造 `python.exe` / `python<ver>.exe` / `pythonw*.exe`(`link_sources` 里没有 `python3.exe`)。`executable()` 因此判假 ⇒ 静默回落裸托管解释器(那里一个包都没有),症状与「托管 venv 没装」一模一样。改成 `python.exe`,与同文件 `repoPythonPath` 一致。
27
+ - **带 `#` 的引号标量被截断**:`lib/mcp-profile.ts` 的 `scalarOf` 先剥行尾注释再识引号,于是 `serverName: "scrapling # mine"` 被切成 `"scrapling`(引号不配对)。改成两段式:先认「整段被引号包住」,否则剥注释后再认一次——`"scrapling # mine"` 与 `'scrapling' # 注释` 两个方向都要覆盖。
28
+ - **`doctor` 与 `showStatus` 读的不是同一个数据目录**:`runDoctor` 用的是 `deps.dataDir`,而 `showStatus` 用的是 `patchScalar(patchText, "dataDir") ?? deps.dataDir`。同一个 profile 在两处得出相反答案,且 `doctor` 那侧永远看不到用户在 patch 里改过的目录。
29
+ - **`patchScalar` 取第一条而不是最后一条**:YAML 重复键后者生效,同仓 `lib/mcp-profile.ts` 的 `switchScalar` 早就按这条走并写明理由,而 `lib/cli.ts` 的 `patchScalar` 用 `.find()` 取第一个非空值——profile 聚合多层 patch(示例 / 用户手改 / market force-enable)时两处判据自相矛盾。
30
+ - **move 动作的空 selector 校验与执行错位**:`py/session_page.py` 的 `_validate_actions` 用 `isinstance(target, str) and bool(target)` 放行空串(等于没校验),而执行侧判的是 `not isinstance(..., str)`,空串于是落到 `_require_selector` 抛 `ACTION_INVALID`、再被外层包成 `ACTION_FAILED`。抽出 `_has_target()` 三处共用(`press_key` / `move` / `_validate_actions`),补 `bool(target)` 那一半。
31
+ - **`deps-check.mjs` 可能静默退 0 通过**:`invokedAsScript()` 内层 `catch { return false }` 让 realpath 比较失败时 `main` 根本不跑,进程退 0 且零输出——正是那段 JSDoc 自己警告的「门禁静默放行」。改成在调用点包 try,判不出时**按「是」处理**(多跑一次的代价远小于静默放行)并打一行说明。
32
+ - **取消安装后进度写入失败会把成功写成失败**:`lib/runtime-remote.ts` 的 `progress` 回调裸调 `job.updateProgress` / `job.append`,抛错会从 `installPackFn` 的 await 冒泡进 `done` 的 catch——输出环形缓冲读过上限、作业被 kill 收走都会让 `append` 抛,于是**已经装完的能力包被记成 failed**。两处各包一层 try/catch。
33
+ - **`state.json` 坏掉时四个安装按钮一起变灰**:`status()` 直接 `await packStates(...)`,而 `readRuntimeState` 对 `INSTALL_STATE_CORRUPT` 显式抛 ⇒ `snapshot === null` ⇒ 卡片里安装/修复按钮全被禁,恰好在最需要它修复时不可点。`packs` 这一位降级成空对象(`packsOrEmpty`),安装器自己处理坏状态文件。
34
+ - **失败回执没带 `error` 字段时抛 `Cannot read properties of undefined`**:`src/runtime-reader.ts` 的 `unwrapWire` 只凭 `isWireResult`(只校验 `ok` 是 boolean)就读 `result.error.code`。改成先 `isRecord` 判形态,缺字段时给 `REMOTE_BAD_ENVELOPE` 占位码与一句人读说明。
35
+ - **`--profile` 指向普通文件时两个平台给出相反结论**:POSIX 读 `<文件>/cordis.patch.yml` 报 `ENOTDIR`,Windows 报 `ENOENT` —— 那正是 `readText` 用来表示「目录里没有这份配置」的错误码,于是同一份输入在 Windows 上被当成空 profile,`--status` 静默退 0。`readProfileSnapshot` 现在先判路径是不是目录,不是就报 `profile 不是目录:<路径>`;目录不存在仍按空 profile 处理(`--status` 对还没建的 profile 照旧可用)。
36
+
37
+ ### Added
38
+
39
+ - **单实例锁**:`apply` 最前面用 shared 的 `claimInstance` 抢 `INSTANCE_LOCK_KEY = "@jayyuen66/dsh-scrapling/instance"`,抢不到就 `ctx.logger.warn` 一行「本次装配让路,工具与设置卡由在册的那一份提供」并整份返回。**让路那一份不该起 sidecar、不该建数据目录、不该做任何不可回退的事**,所以抢锁必须在这些之前。`get` 包一层箭头(成员的 `this` 不能丢);`reflect` **整个传对象本身**——再包一层 `{ provide }` 会让「这台上下文根本没有注册口」伪装成「有 provide 但它抛错」,让路判据当场误判而把插件整个关掉(这是本轮落地时实测踩到的真缺陷)。
40
+ - **回归测试**:`test/live-view.test.ts`(7 条:属性每次访问现算 / 键集是真实自有属性可解构 / **对象展开会把 getter 求值成快照——调用侧必须避开的坑** / `bindLiveTimeout` 改引用后 `timeoutMs` 跟着变 / `settingsViewOf` 两个抽取类字段与输出预算 / 工具跑到执行期才读设置,含变异验证)、`test/instance-lock.test.ts`(6 条)、`test/host.test.ts` 的装配级让路用例(判据落在「第二遍连数据目录都不该去建」)。
41
+
42
+ ### Changed
43
+
44
+ - **两处逐字重复收进 shared**:`lib/skill.ts` 的注册正文换成 shared 的 `registerSkill(ctx, spec)`(本文件原先那条「正文为空不注册」的判断现在是统一行为,仍在本包生效),只剩 `SKILL_NAME` 与收 spec 的那一层;`lib/messages.ts` 的 `format()` 换成 shared 的 `fillPlaceholders`。
45
+ - **`format()` 的缺值语义从「替空串」改成「保留原文」**:漏传参数时原样留着的 `{xxx}` 一眼可见。`test/messages.test.ts` 那条断言随之改判。
46
+ - **卡片样式改用 shared 的 `ensureCardUiCss(doc)`**:不再把 `CARD_UI_CSS` 整段拼进本仓的 `<style>`,改为固定 id `dsh-card-ui-css` 的幂等注入 + 引用计数。
47
+ - **运行时 shared 抬到 `^0.2.10`**(`devDependencies`,构建期内联)。
48
+
49
+ ## 0.1.13
50
+
51
+ 模型可见面全量双语化(中文仍是默认,跟随宿主 locale 偏好切英文);工具选型的完整指引从常驻提示词搬进按需加载的虚拟 skill;search provider 补上 `ready()`、两个 web provider 的可热改项改成取值函数;十九个工具补调用态卡片与工具级墙钟;设置页多出一级分区与官方标记。
52
+
53
+ ### Added
54
+
55
+ - **模型可见面的英文**:新增 `lib/messages.ts`,`ScraplingMessages` 236 键双语(工具描述、参数说明、十五条抓取指引、问答系统提示与六条回执、截断提示、MCP search 四句)。`ToolDeps` 多一个可选 `messages`,`messagesOf(deps)` 落回中文;`host.ts` 的 `localeMessagesOf` 读官方 locale 命名空间的偏好,装配期解析一次并注入全部工具、问答与 MCP 面。此前这些文本全部硬编中文——非中文模型读到的说明与报错是另一种语言。八张工具参数表与五张共享参数表随之从 `as const` 常量改成箭头函数 + `as const`(标宽返回类型会让 `defineTool` 推不出 `ParameterSchemaSpec`)。
56
+ - **虚拟 skill `scrapling`**:十五条逐工具指引的**全文**经 `ctx.skills.register()` 注册,常驻 system prompt 只留一段跨工具摘要(`usageSummary`)。中文全文 2324 B 缩到常驻 505 B、英文 2869 B 缩到 699 B。正文按 `plan.ready` 现算:没装浏览器的机器那枚 skill 里不会出现 render / capture_xhr 那几句。指路句(`skillPointer`)只在 skill 真注册上时才追加——精简 profile 没有 `dsh-skill` 时把模型指向一个不存在的 skill 比不说更糟。
57
+ - **search provider 的 `ready()`**:按官方契约实现 `ready(llmProvider)`,只查配置不发网络——没有可用凭据时返回 false,宿主的内置 `web_search` 因此整个不出现,而不是出现后每次调用都报鉴权错。凭据判据与 `available()` 刻意分成两套:`available()` 答「本 provider 进不进 `ctx.web` 的候选」(显式指定后端时恒 true,key 缺了留给 `search()` 报 `SEARCH_AUTH`,用户才知道补哪一项),`ready()` 答「内置工具要不要露给模型」。`auto` 看全部三条发现路径,名单外的旧后端名取保守侧 false。`fetch` 侧不加 `ready()`——官方 fetch provider 也没有,它没有凭据可判。
58
+ - **调用态卡片**:十九个工具全部声明 `presentCall`,标题取入参里已有的值、取不到回落工具名。三个会话工具(`session_open` / `session_list` / `session_close`)此前落默认卡片,与检索类工具在时间线上分不出来。
59
+ - **工具级墙钟**:每处注册的 `timeoutMs` 改成 `toolTimeoutOf(settings)` = 部署的 `timeoutMs` + 60 秒余量(17 处)。此前注册级与内层取同一个数,而宿主的截止在 `execute` 之前就装好、起点更早 ⇒ 永远是宿主先到期,本包带出路说明的 `SidecarError`(`BROWSER_TIMEOUT` / `REQUEST_TIMEOUT`)没机会说话。
60
+ - **设置页一级分区与官方标记**:`settings.section` 注册 `id: "dsh-scrapling"`、`order: 30`(排在宿主既有的 account/general/models/plugins/agent-presets 之后),`settings.section.icon` 用同一 id 挂官方章鱼标记。图标是把官方图按「绿色高光 / 其余」拆成两张 alpha 遮罩叠出来的:本体走 `currentColor` 跟主题、眼睛与吸盘保留官方的 `#B3FB2A`,形状零改动。`plugins.bundle.config` 那一份保留,插件详情页与设置页两处显示同一张卡片;分区里显式传 `view: "page"` —— 不传时卡片会早退成空表单且不报错。
61
+
62
+ ### Changed
63
+
64
+ - **可热改的部署项改成取值函数**:`SearchProviderDeps` / `WebProviderDeps` 里的后端名、四把 key、searxng 端点、publicFallback、输出预算与超时全部改成 `Reader<T> = () => T`(新增 `lib/config-reader.ts`),`host.ts` 抽出 `providerReadersOf(config)` 一处构造。原因:这些字段在设置卡上是 `.volatile()` 的,改值不会重跑 `apply`,装配时抄进闭包的那一份会永远停在旧值。一次操作只取一次快照,同一笔请求内不会出现「协议层按 30 秒等、回执里写 45 秒」。
65
+ - **下载回执补提示**:`scrapling_download` 的文本多一句 `downloadSavedHint`(文件落在哪、下一步通常是什么),不再只是一行字节数与 sha256。
66
+ - **宿主开发基线抬到 `0.2.2-rc.2`**:`devDependencies` 整组 `@deepseek-ai/dsh-*` 抬到 `0.2.2-rc.2` 并补 `@deepseek-ai/dsh-skill`;`peerDependencies` 与 `engines.dsh` 的支持窗口由 `^0.2.2-rc.1` 收到 `^0.2.2-rc.2`;`@deepseek-ai/dsh-error` 由 devDependency 改为 optional peer(`SidecarError` 继承宿主的 `HarnessError`,`instanceof` 要的是同一份类身份,内联成第二份就等于没有错误码)。
67
+ - **两份 README 与两份 DETAIL 的指引段叙述同步**:从「关掉某个工具时它的 system prompt 指引段一并消失」改成「常驻只有一段跨工具摘要、逐工具十五句在虚拟 skill 里」,并说明侧车没起来时既不注册 skill 也没有常驻段。
68
+
69
+ ### Fixed
70
+
71
+ - **`MCP_SERVER_VERSION` 与包版本同步**到 `0.1.13`。
72
+
73
+ ### Boundaries
74
+
75
+ - 英文面只覆盖模型可见的文案(工具描述、参数说明、指引、回执、截断提示)。装配期日志、配置错误提示与 CLI 输出仍是中文:它们给部署者看,不进模型上下文。
76
+ - `ctx.skills` 是可选服务。精简 profile(没装 `dsh-skill`)下插件照常装配、工具照常可用,只是十五条指引按需加载不了,常驻段也不会出现指路句。
77
+
9
78
  ## 0.1.12
10
79
 
11
80
  设置卡的下拉候选与说明浮层不再漂到浏览器最左边;shared 抬到 `^0.2.8`(含运行时几何自检),CI 的 action 钉版升到最新。`MCP_SERVER_VERSION` 随包版本同步。
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.1-658EFF?style=flat-square" alt="dsh" />
15
+ <img src="https://img.shields.io/badge/dsh-%5E0.2.2--rc.2-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
 
@@ -51,6 +51,7 @@
51
51
  - [ Known boundaries](#-known-boundaries)
52
52
  - [ FAQ](#-faq)
53
53
  - [ Development](#-development)
54
+ - [ Feedback](#feedback)
54
55
  - [ License](#-license)
55
56
 
56
57
  ## <img src="https://api.iconify.design/lucide/shield.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> What it does
@@ -80,8 +81,8 @@ dsh plugin --profile web add @jayyuen66/dsh-scrapling
80
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.
81
82
 
82
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.
83
- - **Requires host `dsh` at the `0.2.2-rc.1` line or later.** The requirement the host actually reads is `engines.dsh` (`^0.2.2-rc.1`), 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 Python 3.14+ with Scrapling installed** — named by `pythonBin`, or found by the fixed chain in `lib/runtime.ts` (managed runtime under `dataDir/runtime`, 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 that managed Python 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.
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.
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.
85
86
 
86
87
  ```sh
87
88
  pip install "scrapling[rag]>=0.5,<0.6"
@@ -112,7 +113,7 @@ dsh-scrapling setup --status
112
113
  - `search`, `media`, `mcp` and `adaptive-redis` all ride on `core`'s venv: `mcp` brings the official `scrapling-mcp` server (the pinned `mcp` package; its tool set is the upstream's, not this plugin's) that `official-mcp` mode needs, and `adaptive-redis` brings the `redis` client behind `adaptiveStorage: redis`. Every pack is installable; the settings card reports each as `ready`, `missing`, `corrupt` or `installing`.
113
114
  - `--feature` is a dry run by default; `--apply` writes. `--repair` re-installs without touching user data, and `--uninstall <pack> [--purge]` removes runtime files; only `--purge` removes `elements_storage.db` and `downloads/`.
114
115
  - `--offline <dir>` installs with no network at all: `<dir>` must hold the Python archive named exactly as the manifest URL's last segment (browser and `curl -O` both keep `cpython-3.14.9+…-install_only.tar.gz`, and the percent-encoded spelling is accepted too) plus a `wheels/` directory with one wheel per pinned requirement - `pip download --only-binary=:all: --require-hashes -r py/runtime-requirements.txt -d <dir>/wheels` produces it. The hash check on the Python archive is the same one the networked path runs, and pip is invoked with `--no-index`; a missing archive or wheelhouse fails as `INSTALL_OFFLINE_ASSETS` instead of silently going online.
115
- - `setup --status` prints one JSON document: `dataDir`, `profile`, `runtime`, `packs` and `state`. With `--profile <dir>` it reads that profile's `cordis.patch.yml`, resolves the interpreter from this package's `pythonBin` and the data directory from `dataDir` (the two settings the host actually uses); `packs` and `state` are then reported for that directory — when the entry carries no `dataDir`, both fall back to the CLI's own default. Without `--profile`, `profile.path` is `null`, a note says the profile was not read, and `runtime` falls back to the CLI's own chain (managed runtime → repo `_env/.venv` → PATH `python3`). Pass `--profile` whenever you compare the card's interpreter with what `--status` reports.
116
+ - `setup --status` prints one JSON document: `dataDir`, `profile`, `runtime`, `packs` and `state`. With `--profile <dir>` it reads that profile's `cordis.patch.yml`, resolves the interpreter from this package's `pythonBin` and the data directory from `dataDir` (the two settings the host actually uses); `packs` and `state` are then reported for that directory — when the entry carries no `dataDir`, both fall back to the CLI's own default. Without `--profile`, `profile.path` is `null`, a note says the profile was not read, and `runtime` falls back to the CLI's own chain (managed venv → bare managed interpreter → repo `_env/.venv` → PATH `python3`). Pass `--profile` whenever you compare the card's interpreter with what `--status` reports.
116
117
  - The settings card can start the same install/repair/cancel actions through the `scraplingRuntime` remote when the profile has both a remote surface and a jobs backend; otherwise it prints the CLI command.
117
118
  - `integrationMode` is deployment-only; on a host that exposes `mcpManager` (the rc.2 web bundle) the MCP server is registered dynamically at load, while `setup --mode` prints or writes the client entry for CLI/headless profiles and `doctor` checks a profile against it — see [MCP mode](#mcp-mode). `official-mcp` starts `scrapling-mcp` from the managed venv, which the `mcp` pack provisions (`setup --feature mcp --apply`).
118
119
  - Only **macOS arm64** is verified. Windows, Linux and macOS x64 are blocked (B1/B2): every pack reports `blocked` and the installer refuses rather than guessing an asset path.
@@ -123,7 +124,7 @@ dsh-scrapling setup --status
123
124
  - That command is the only accepted "it is in the layer stack" signal, and it is **not read-only** — it rewrites the profile's root assembly file. Read layer lines from stdout **and** check stderr separately: an unmatched patch target appears only on stderr, so the exit code alone proves nothing. Accept both `# == <layer>` and `# == <layer>, patched by <path>`.
124
125
  2. **The startup log names the interpreter and the plan.** One line prints the probed capabilities and how many of the tools registered; the chosen interpreter path is logged at load. An interpreter that starts but lacks Scrapling is named in the log together with the pip line to copy.
125
126
  3. **The settings card renders.** The plugin detail page carries the **scrapling** card with every user-editable field grouped by purpose; toggling a value enables Save, and the write returns 200.
126
- 4. **A tool round-trip.** Ask the model to fetch a JavaScript-heavy page: the result row renders in the chat through the official tool-call view. On a machine without a browser the render / capture_xhr tools are absent from the model's tool list and their prompt guidance is gone too — that absence is the conditional registration working, not a failure.
127
+ 4. **A tool round-trip.** Ask the model to fetch a JavaScript-heavy page: the result row renders in the chat through the official tool-call view. On a machine without a browser the render / capture_xhr tools are absent from the model's tool list and their guidance is gone from the skill body too — that absence is the conditional registration working, not a failure.
127
128
 
128
129
  ## <img src="https://api.iconify.design/lucide/circle-slash.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> What it does not provide
129
130
 
@@ -134,11 +135,11 @@ dsh-scrapling setup --status
134
135
 
135
136
  ## <img src="https://api.iconify.design/lucide/plug.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> Enabling it in dsh
136
137
 
137
- - `dsh.bundle.patch` points at `cordis.patch.yml`, which carries a single `- id: scrapling` entry with the **bare package name** — the host scans `dsh.client` on bare package-name entries only. The card components are bundled into `client.js` (only `react` / `zod` stay external to the host's module table), so the card does not depend on a second package being loaded.
138
+ - `dsh.bundle.patch` points at `cordis.patch.yml`, which carries a `- id: dsh-plugin-shared` supplier row (keep it enabled; disabling it removes the cards' shared component supply) plus the `- id: scrapling` entry with the **bare package name** — the host scans `dsh.client` on bare package-name entries only. The card components come from the shared client row, externalized as `@jayyuen66/dsh-plugin-shared/client`; the host module table provides `react`, `zod` and that shared row.
138
139
  - The client half registers two surfaces: the settings card (on the `plugins.bundle.config` slot, keyed by the bundle package name — the host dispatches `entryKey: pkg.name`, so the card renders on this package's detail page) and one result row per tool on `tool.call.toolview`, drawn with the official tool-call view props.
139
140
  - The settings namespace is the entry id `scrapling`; precedence is settings-card value > registration-line `config:` > schema default. Setting a field back to its default saves a **clear-override**, not a write of the same value, so a later default change still reaches you.
140
- - Gate policy and the sidecar environment are snapshotted once when the plugin is applied — **settings changes take effect on the next start**.
141
- - Disabling a tool also removes its system-prompt guidance: the guidance is re-read at each prompt assembly against the tools that scope can actually see, so a machine without a browser loses the render / capture_xhr lines and a sidecar that never came up loses all of them. The section is placed next to the built-in `web_fetch` guidance.
141
+ - Most card values are read per call — extraction and browser knobs, the four output budgets, `fetchTimeoutMs`, `answerMaxTokens`, the answer route and the search-provider settings — so a saved change reaches the **next tool call**. The assembly-time set needs a restart: the fifteen tool switches, `provideWebFetch` / `provideWebSearch`, `pythonBin`, `failFastOnMissingPython`, `dataDir`, `sidecarHandshakeTimeoutMs` / `sidecarGraceMs`, and the URL-gate / sidecar-environment values (`proxyUrl`, `proxyBypass`, `allowedHosts`, `nat64Prefixes`, `syntheticDnsRanges`).
142
+ - Disabling a tool also removes its guidance, in two layers: the **resident section is a single summary** (cross-tool selection rules, naming no specific tool), while the fifteen per-tool lines are registered as a virtual skill `scrapling`. Both are re-read at each prompt assembly against the tools that scope can actually see — a machine without a browser loses the render / capture_xhr lines from the skill body, and a sidecar that never came up gets **neither the section nor the skill** (registering an empty skill would only put a catalog entry that opens to nothing). Without the host's skill service (a trimmed profile) the plugin still composes normally, it just lacks that skill and the summary drops its "full guidance lives in the skill" pointer. The section is placed next to the built-in `web_fetch` guidance.
142
143
  - `scrapling_crawl` registers its own job kind, so `job_list` labels its jobs as crawls rather than shell jobs.
143
144
 
144
145
  ## <img src="https://api.iconify.design/lucide/globe.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> The tools
@@ -279,12 +280,12 @@ Settings live on the **scrapling** card in the plugin detail page, grouped by pu
279
280
 
280
281
  | Field | Type | Default | Purpose |
281
282
  | --- | --- | --- | --- |
282
- | `pythonBin` | string | `""` | Interpreter name or absolute path. Empty walks the fixed chain in `lib/runtime.ts`: the managed runtime under `dataDir` (what `setup --feature core --apply` installs), then the repository `_env/.venv` when usable (a source checkout only), then `python3` on `PATH` (`python` on Windows) |
283
+ | `pythonBin` | string | `""` | Interpreter name or absolute path. Empty walks the fixed chain in `lib/runtime.ts`: the managed venv `dataDir/runtime/venv` (where `setup --feature core --apply` installs every wheel), then the bare managed interpreter `dataDir/runtime/python/<version>` (an install that stopped halfway), then the repository `_env/.venv` when usable (a source checkout only), then `python3` on `PATH` (`python` on Windows) |
283
284
  | `failFastOnMissingPython` | boolean | `true` | Refuses to load when the sidecar process cannot start (wrong path, protocol mismatch, handshake timeout). An interpreter that starts but lacks Scrapling always degrades to "tools unavailable" with the path named in the log, whatever this switch says |
284
285
  | `fetchEnabled` / `extractEnabled` / `locateEnabled` / `linksEnabled` / `renderEnabled` / `captureXhrEnabled` / `networkEnabled` / `sessionEnabled` / `sessionStateEnabled` / `crawlEnabled` / `answerEnabled` / `sessionReadEnabled` / `sessionActionsEnabled` / `downloadEnabled` / `screenshotEnabled` | boolean | `true` | One kill switch per tool or tool pair. `sessionStateEnabled` gates the state save / load pair, which also needs a deployment-side `sessionStateDir` |
285
286
  | `extractionType` | enum | `markdown` | `markdown` / `html` / `text`; all three run the same anti-injection cleaning, and `html` additionally strips event-handler attributes, so it is not byte-for-byte raw HTML |
286
287
  | `mainContentOnly` | boolean | `true` | Extraction scope |
287
- | `*MaxOutputChars` | natural | fetch / extract / render `200000`, xhr `120000` | Per-tool output caps. The sidecar clips by characters, the host then trims to a byte budget |
288
+ | `*MaxOutputChars` | natural | fetch / extract / render `200000`, xhr `120000` | Per-tool output caps. The sidecar clips by characters, the host then trims to a byte budget. `scrapling_render` and `scrapling_capture_xhr` carry XHR history **in addition** to the body, and that section is capped by the same budget separately — so one such call can return up to twice the budget |
288
289
  | `crawlMaxItems` | natural | `1000` | Ceiling over the model-supplied `maxPages`. An out-of-range `maxPages` is passed through so the sidecar reports the parameter error rather than this plugin silently clamping it |
289
290
  | `stripInlineImages` | boolean | `true` | Drops inline `data:` URI images from the body, keeping only alt text — pure token noise for the model. Code fences are left untouched; pages without inline images come back byte-identical. Stripping happens before the cap. Turn off only when the raw base64 **is** the data (colours, fingerprints) |
290
291
  | `headless` / `networkIdle` | boolean | `true` / `false` | Browser mode and whether a page must reach network idle before it is read |
@@ -354,6 +355,7 @@ Details worth knowing:
354
355
  - **Through a proxy, a host name this machine cannot resolve is no longer rejected.** The proxy resolves it, and on a network with DNS filtered by region those are exactly the sites that need a proxy. IP literals, private answers the local resolver *can* produce, and single-label host names (`intranet`, `router`) stay rejected.
355
356
  - **WebRTC leaks are closed whenever a proxy is in play.** Chromium's WebRTC can send UDP around an HTTP/SOCKS proxy, and one STUN call in a page is enough to learn the visitor's real exit address; `blockWebrtc` is forced on with a proxy, no model input involved.
356
357
  - **Credentials never reach a log or the capability frame.** The report echoes `scheme://host:port` only, with a `source` field (`settings` / `environment` / `system` / `none`) — the first column to read when someone reports that fetching does not work. A malformed proxy address is logged to stderr and treated as "not configured" rather than failing the load.
358
+ - **The installer's stderr and download URLs go through the same redaction gate.** When pip fails it echoes the index URL back verbatim (measured: `WARNING: The index url "ht!tp://user:TOKEN@host/simple" seems invalid` and `InvalidURL: … 'https://user:TOKEN@/requests/'` are both **cleartext**), while putting a token into `PIP_INDEX_URL` is routine for corporate mirrors and `spawn` passes the parent environment straight through. `lib/installer.ts` routes all six stderr channels (curl / HTTP status / tar / venv / pip / chromium) and both download URLs through `safeStderr()` → `redactUrlSecrets()`, replacing the whole userinfo segment with `***@`; `lib/url-policy.ts` no longer anchors its match at line start, so a URL sitting mid-sentence is recognised too. Only the credential is masked — the diagnostic text survives, so the failure reason still reads.
357
359
 
358
360
  ## <img src="https://api.iconify.design/lucide/shield-alert.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> Security
359
361
 
@@ -391,6 +393,7 @@ Registered honestly, one entry per class.
391
393
  - **`scrapling_screenshot` bypasses text cleaning.** Screenshots capture whatever the page renders in the viewport — including visual secrets (tokens, private messages, data behind a login) that never appear in the DOM text the other tools clean. They are stored through the host attachment service and are only available when that service is mounted. What comes back is the service's **normalized** reference: a declared PNG can be persisted as `image/jpeg` at a smaller raster, with `originalDimensions` carrying what the page actually produced (host contract: `saveImage` in `@deepseek-ai/dsh-attachment`). `scrapling_download` writes bytes under `dataDir/downloads`, never overwrites an existing file, and refuses path components in `filename`.
392
394
  - **`scrapling_extract`, `scrapling_locate` and `scrapling_links` are offline parsers.** All three take HTML from the caller and never fetch; `scrapling_links` keeps relative links only when `baseUrl` is supplied — with an empty `baseUrl` it returns no links rather than guessing absolute URLs. All three share `extractMaxOutputChars`.
393
395
  - **Adaptive relocation is best-effort.** Scrapling saves only the first matching element, and a near-identical sibling can be chosen when the original attributes change. Treat a relocated match as a hint and verify it; `scrapling_locate` never saves fingerprints.
396
+ - **TLS trust comes from certifi, not the bare managed interpreter's OpenSSL defaults.** The managed CPython has no OpenSSL configuration of its own, so on macOS `ssl.get_default_verify_paths()` resolves to the system store `/private/etc/ssl/cert.pem`, which is missing several public roots — measured on `example.com`, whose SSL.com chain fails there (`verify error:num=20`) and verifies cleanly against certifi's bundle. The bridge therefore points `SSL_CERT_FILE` and `CURL_CA_BUNDLE` at `certifi.where()` **only when neither is already set**, so a corporate MITM proxy or a private root you pin yourself still wins. The symptom this removes reads `FETCH_FAILED ... unable to get local issuer certificate` on sites whose chain the system store cannot complete.
394
397
  - **Runtime packs are verified on macOS arm64 only.** Windows, Linux and macOS x64 report every pack as `blocked`; the installer refuses rather than guessing an asset path (B1/B2).
395
398
  - **The `adaptive-redis` pack is a client, not a storage engine.** Upstream ships only `SQLiteStorageSystem`; the Redis backend here is this plugin's `py/redis_storage.py`, a `StorageSystemMixin` subclass keyed by registered domain. Enabling it changes where fingerprints live, so treat it as a deployment decision, not a per-call switch. The plugin's own MCP server is separate — it runs in-process and needs no pack.
396
399
  - **Shopify crawl mode walks the store's JSON API.** `mode=shopify` uses the store's `/collections.json` and each collection's `/products.json` (upstream's `ShopifySpider`) and yields one row per variant — `name` (product + variant, minus `Default Title`), `price`, `sku`, `stock` (`null` when available, `0` when not), `identifier`, `brand`, `category`, `image_url`, `url`, `barcode`, `old_price`, `description`. It never scrapes product HTML, and it obeys the same URL gate, robots setting, delay and concurrency knobs as the other crawl modes. Verified against a local fixture store; a real Shopify store has not been exercised (B11).
@@ -424,8 +427,14 @@ pnpm run test:py # end-to-end check of the Python sidecar
424
427
  - Gates that pin the published shape: `test/publish-manifest.test.ts` (entry targets covered by `files`, no source file as an entry point, `dsh-*` pins exact and uniform, no host package body inlined, no dates or bad bytes in comments or documents) and `test/readme-parity.test.ts` (the two READMEs name every tool and every settings-card knob, and their section structures match).
425
428
  - Publishing runs through [`.github/workflows/publish.yml`](./.github/workflows/publish.yml) (manual, OIDC trusted publishing plus `--provenance`).
426
429
 
430
+ ## Feedback
431
+
432
+ Issues and pull requests are welcome: [https://github.com/JayYuen666/dsh-scrapling/issues](https://github.com/JayYuen666/dsh-scrapling/issues).
433
+
434
+ If a plugin fails to boot, include the dsh host version, the profile install shape, and the browser console line. The `missed the module table` line is especially useful: it tells us whether the shared client row was materialized.
435
+
427
436
  ## <img src="https://api.iconify.design/lucide/scale.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> License
428
437
 
429
438
  MIT. Source at [github.com/JayYuen666/dsh-scrapling](https://github.com/JayYuen666/dsh-scrapling). Issues go to that repository's tracker.
430
439
 
431
- This package ships no third-party source code — Scrapling and the browser engines are runtime dependencies. The third-party content in the package is the icon (Tabler Icons) and the `zod` code inlined into the single-file CLI bundle; the host-side client bundle keeps `zod` external. [`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md) records that boundary.
440
+ This package ships no third-party source code — Scrapling and the browser engines are runtime dependencies. The third-party content in the package is the icon (the official Scrapling mark, BSD 3-Clause) and the `zod` code inlined into the single-file CLI bundle; the host-side client bundle keeps `zod` external. [`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md) records that boundary.
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.1-658EFF?style=flat-square" alt="dsh" />
15
+ <img src="https://img.shields.io/badge/dsh-%5E0.2.2--rc.2-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
 
@@ -51,6 +51,7 @@
51
51
  - [ 已知边界](#-已知边界)
52
52
  - [ 常见问题](#-常见问题)
53
53
  - [ 开发](#-开发)
54
+ - [ 反馈](#反馈)
54
55
  - [ 许可证](#-许可证)
55
56
 
56
57
  ## <img src="https://api.iconify.design/lucide/shield.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 它做什么
@@ -80,8 +81,8 @@ dsh plugin --profile web add @jayyuen66/dsh-scrapling
80
81
  卸载用 `dsh plugin --profile web remove @jayyuen66/dsh-scrapling`。包在公共 npm registry 上,安装不需要凭据,也不需要 scoped-registry 配置行。
81
82
 
82
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`,低于它的宿主根本起不来。
83
- - **需要宿主 `dsh` 处在 `0.2.2-rc.1` 或更新的 `0.2.2` 版本线。** 宿主真正读的是 `engines.dsh`(`^0.2.2-rc.1`),且它**单独决定**;更新版本线的宿主会被拒,需要显式风险授权 `dsh plugin --profile <p> allow-version <pkg>@<ver> --dsh-version <exact> --accept-risk`。支持窗口是滚动的:本包在发布时把窗口内的每个已发布宿主版本逐版取证,窗口滚动后重新取证,不把这一句里的版本号当长期承诺。
84
- - **需要 Python 3.14+ 且装好 Scrapling** —— 由 `pythonBin` 指定,或按 `lib/runtime.ts` 的固定链找到:`dataDir/runtime` 下的托管 runtime → 仓内 `_env/.venv` → `PATH`。装出去的包里没有 `_env/.venv` 这一档,所以跑过 `setup --feature core --apply` 的机器用的是那支托管解释器,没装过就是你 `PATH` 上的 `python3`(Windows 上是 `python`);选中哪一支会在装载时写进日志,缺 Scrapling 时报错里带着可直接照抄的安装命令。
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`。支持窗口是滚动的:本包在发布时把窗口内的每个已发布宿主版本逐版取证,窗口滚动后重新取证,不把这一句里的版本号当长期承诺。
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 都失败,而日志里那行路径看起来完全正常。
85
86
 
86
87
  ```sh
87
88
  pip install "scrapling[rag]>=0.5,<0.6"
@@ -112,7 +113,7 @@ dsh-scrapling setup --status
112
113
  - `search`、`media`、`mcp` 与 `adaptive-redis` 都以 `core` 的 venv 为载体:`mcp` 带来 `official-mcp` 模式要的官方 `scrapling-mcp` server(随钉住的 `mcp` 包进来;它的工具集由上游决定,不是本插件的能力),`adaptive-redis` 带来 `adaptiveStorage: redis` 背后的 `redis` 客户端。六个包都可安装;设置卡把每个包报成 `ready`、`missing`、`corrupt` 或 `installing`。
113
114
  - `--feature` 默认 dry-run;`--apply` 才写到磁盘。`--repair` 重装且不碰用户数据;`--uninstall <包> [--purge]` 删运行时文件,只有 `--purge` 才连 `elements_storage.db` 与 `downloads/` 一起删。
114
115
  - `--offline <目录>` 全程不联网:`<目录>` 里要有 Python 归档(文件名与清单 URL 的最后一段一致,浏览器与 `curl -O` 写到磁盘的 `cpython-3.14.9+…-install_only.tar.gz` 可用,百分号转义那种写法也认),以及一个 `wheels/` 目录(每条钉版一枚 wheel,可用 `pip download --only-binary=:all: --require-hashes -r py/runtime-requirements.txt -d <目录>/wheels` 生成)。Python 归档的哈希校验与联网路径一致,pip 带 `--no-index`;缺归档或缺 wheelhouse 时报 `INSTALL_OFFLINE_ASSETS`,不会悄悄退回联网。
115
- - `setup --status` 打印一份 JSON:`dataDir`、`profile`、`runtime`、`packs` 与 `state`。带 `--profile <目录>` 时读该 profile 的 `cordis.patch.yml`,按本包条目里的 `pythonBin` 与 `dataDir`(宿主真正在用的那两个设置)解析解释器,`packs` 与 `state` 也改报那份目录——条目里没写 `dataDir` 时这两项回落 CLI 自己的默认目录;不带 `--profile` 时 `profile.path` 为 `null`,输出里有一句说明没读 profile,`runtime` 回落到 CLI 自己的链(托管 runtime → 仓内 `_env/.venv` → PATH `python3`)。要拿 `--status` 和设置卡上的解释器对照,就带上 `--profile`。
116
+ - `setup --status` 打印一份 JSON:`dataDir`、`profile`、`runtime`、`packs` 与 `state`。带 `--profile <目录>` 时读该 profile 的 `cordis.patch.yml`,按本包条目里的 `pythonBin` 与 `dataDir`(宿主真正在用的那两个设置)解析解释器,`packs` 与 `state` 也改报那份目录——条目里没写 `dataDir` 时这两项回落 CLI 自己的默认目录;不带 `--profile` 时 `profile.path` 为 `null`,输出里有一句说明没读 profile,`runtime` 回落到 CLI 自己的链(托管 venv → 裸托管解释器 → 仓内 `_env/.venv` → PATH `python3`)。要拿 `--status` 和设置卡上的解释器对照,就带上 `--profile`。
116
117
  - profile 同时有远程读取接口与作业后端时,设置卡能经 `scraplingRuntime` 发起同一套安装/修复/取消;否则显示可照抄的 CLI 命令。
117
118
  - `integrationMode` 只在部署配置里;宿主有 `mcpManager`(rc.2 的 web 组合包)时,MCP server 在装载时自动动态注册;`setup --mode` 负责为没有该服务的 CLI/headless profile 打印或写出客户端条目,`doctor` 用来核对一份 profile —— 见 [MCP 模式](#mcp-模式)。`official-mcp` 起的是托管 venv 里的 `scrapling-mcp`,由 `mcp` 能力包装进去(`setup --feature mcp --apply`)。
118
119
  - 只验证了 **macOS arm64**。Windows、Linux 与 macOS x64 是 blocked(B1/B2):所有包都报 `blocked`,安装器直接拒绝,不猜资产路径。
@@ -123,7 +124,7 @@ dsh-scrapling setup --status
123
124
  - 这条命令是唯一被认的「它在层栈里」信号,而且它**不是只读的** —— 会把 profile 的根装配文件重写一遍。层行从 stdout 读,stderr **单独**查:未命中的 patch 目标只出现在 stderr,只看退出码证明不了任何事。`# == <层>` 与 `# == <层>, patched by <路径>` 两种形态都要认。
124
125
  2. **启动日志点名解释器与注册计划。** 有一行打印探测到的能力与注册了几个工具;选中的解释器路径在装载时写进日志。解释器起得来但没装 Scrapling 时,日志点名解释器路径,并附可直接照抄的 pip 命令。
125
126
  3. **设置卡渲染。** 插件详情页上有 **scrapling** 卡,全部用户可改字段按用途分组;改一个值后保存按钮亮起,写入返回 200。
126
- 4. **一次工具往返。** 让模型抓一个重 JS 的页面:结果行经官方 tool-call 视图渲染在会话里。没有浏览器的机器上,render / capture_xhr 不在模型的工具列表里,对应的提示指引也一并消失 —— 那是条件注册在起作用,不是故障。
127
+ 4. **一次工具往返。** 让模型抓一个重 JS 的页面:结果行经官方 tool-call 视图渲染在会话里。没有浏览器的机器上,render / capture_xhr 不在模型的工具列表里,对应的指引也一并消失(skill 正文里没有那几句)—— 那是条件注册在起作用,不是故障。
127
128
 
128
129
  ## <img src="https://api.iconify.design/lucide/circle-slash.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 它不提供什么
129
130
 
@@ -134,11 +135,11 @@ dsh-scrapling setup --status
134
135
 
135
136
  ## <img src="https://api.iconify.design/lucide/plug.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 在 dsh 里启用
136
137
 
137
- - `dsh.bundle.patch` 指向 `cordis.patch.yml`,里面只有一条 `- id: scrapling`,`name` 用**裸包名** —— 宿主只扫裸包名条目的 `dsh.client` 声明。设置卡组件直接打进 `client.js`(只有 `react` / `zod` 外置给宿主模块表),卡片不依赖第二份包被装载。
138
+ - `dsh.bundle.patch` 指向 `cordis.patch.yml`,里面有一条 `- id: dsh-plugin-shared` 供应行(必须保持开启;停用后卡片会失去 shared 组件供应),再加一条 `- id: scrapling`、`name` 用**裸包名** —— 宿主只扫裸包名条目的 `dsh.client` 声明。设置卡组件来自 shared 的客户端行,以 `@jayyuen66/dsh-plugin-shared/client` 外置;宿主模块表提供 `react`、`zod` 与这条 shared 供应。
138
139
  - client 半注册两处:设置卡(坐在 `plugins.bundle.config` 槽上,键是 bundle 包名 —— 宿主按 `entryKey: pkg.name` 派发,所以卡画在本包的详情页上),以及每个工具在 `tool.call.toolview` 上的一行结果,用官方 tool-call 视图 props 画。
139
140
  - 设置命名空间就是条目 id `scrapling`;优先级为 设置卡现值 > 注册行 `config:` > schema 默认值。把一项改回默认值保存的是**清除覆盖**而不是写入同一个值,将来默认值变了你这一项也会跟着变。
140
- - 闸门策略与 sidecar 环境在插件 `apply()` 时取一次快照 —— **设置卡的改动要等下次启动才生效**。
141
- - 关掉某个工具时,它的 system prompt 指引段也一并消失:指引每次装配都按「那个 scope 真注册着哪些工具」现取,没装浏览器的机器少掉 render / capture_xhr 那几句,sidecar 没起来的机器一句都没有。指引段排在内置 `web_fetch` 指引旁边。
141
+ - 卡上多数取值每次调用现读 —— 抽取类与浏览器类旋钮、四个输出预算、`fetchTimeoutMs`、`answerMaxTokens`、问答路由与搜索侧设置 —— **保存后下一次工具调用就生效**。装配时读一次、改完要重启的是:十五个工具开关、`provideWebFetch` / `provideWebSearch`、`pythonBin`、`failFastOnMissingPython`、`dataDir`、`sidecarHandshakeTimeoutMs` / `sidecarGraceMs`,以及闸门与 sidecar 进程环境那几项(`proxyUrl`、`proxyBypass`、`allowedHosts`、`nat64Prefixes`、`syntheticDnsRanges`)。
142
+ - 关掉某个工具时,它的指引也一并消失,但分两层看:**常驻段只有一段摘要**(跨工具的选型规则,不点名具体工具),而逐工具那十五句全文注册成一枚虚拟 skill `scrapling`。两侧都按「那个 scope 真注册着哪些工具」现取 —— 没装浏览器的机器上 skill 正文里没有 render / capture_xhr 那几句,sidecar 没起来的机器**既没有常驻段也不注册 skill**(正文为空时注册一枚点开什么都没有的条目只会污染模型的 skill 目录)。宿主没有 skill 服务(精简 profile)时插件照常装配,只是少了这枚 skill,常驻段也不追加那句「完整指引见 skill」。常驻段排在内置 `web_fetch` 指引旁边。
142
143
  - `scrapling_crawl` 登记自己的作业类型,`job_list` 因此把它的作业标成爬虫而不是 shell 作业。
143
144
 
144
145
  ## <img src="https://api.iconify.design/lucide/globe.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 工具一览
@@ -279,12 +280,12 @@ dsh-scrapling doctor --mode mcp --profile <profileDir>
279
280
 
280
281
  | 字段 | 类型 | 默认值 | 作用 |
281
282
  | --- | --- | --- | --- |
282
- | `pythonBin` | string | `""` | 解释器名或绝对路径。留空时按 `lib/runtime.ts` 的固定链走:`dataDir` 下的托管 runtime(`setup --feature core --apply` 装的就是它)→ 仓内 `_env/.venv`(可用才算,只有源码检出才有)→ `PATH` 上的 `python3`(Windows 上是 `python`) |
283
+ | `pythonBin` | string | `""` | 解释器名或绝对路径。留空时按 `lib/runtime.ts` 的固定链走:托管 venv `dataDir/runtime/venv`(`setup --feature core --apply` 把每个 wheel 都装在这里)→ 裸托管解释器 `dataDir/runtime/python/<版本>`(装了一半的机器)→ 仓内 `_env/.venv`(可用才算,只有源码检出才有)→ `PATH` 上的 `python3`(Windows 上是 `python`) |
283
284
  | `failFastOnMissingPython` | boolean | `true` | sidecar 进程起不来(路径错、协议对不上、握手超时)时拒绝加载。解释器起得来但没装 Scrapling 时,无论这枚开关如何都只降级为「工具不可用」,日志点名解释器路径 |
284
285
  | `fetchEnabled` / `extractEnabled` / `locateEnabled` / `linksEnabled` / `renderEnabled` / `captureXhrEnabled` / `networkEnabled` / `sessionEnabled` / `sessionStateEnabled` / `crawlEnabled` / `answerEnabled` / `sessionReadEnabled` / `sessionActionsEnabled` / `downloadEnabled` / `screenshotEnabled` | boolean | `true` | 每个工具一枚总闸。`sessionStateEnabled` 管登录态存取那一对,它们还要部署侧配好 `sessionStateDir` |
285
286
  | `extractionType` | enum | `markdown` | `markdown` / `html` / `text`;三条路径过同一套反注入清洗,`html` 额外剥事件处理器属性,因此**不是字节级原始 HTML** |
286
287
  | `mainContentOnly` | boolean | `true` | 抽取范围 |
287
- | `*MaxOutputChars` | natural | fetch / extract / render `200000`,xhr `120000` | 各工具的输出封顶。sidecar 先按字符截一次,宿主再按字节预算统一处理 |
288
+ | `*MaxOutputChars` | natural | fetch / extract / render `200000`,xhr `120000` | 各工具的输出封顶。sidecar 先按字符截一次,宿主再按字节预算统一处理。`scrapling_render` 与 `scrapling_capture_xhr` 在正文之外还带一份 XHR 历史,那一段按**同一档预算另外**封顶 —— 所以这类调用的一次回执可达两倍预算 |
288
289
  | `crawlMaxItems` | natural | `1000` | 给模型可传的 `maxPages` 封的顶。越界的 `maxPages` 原样透传,让 sidecar 报参数错误,而不是由本包悄悄夹成看起来合法的值 |
289
290
  | `stripInlineImages` | boolean | `true` | 剥掉正文里内嵌的 `data:` URI 图片、只留 alt 文本 —— 对模型是纯 token 噪音。代码围栏内的原样保留;不含内联图的页面逐字节不变。剥图发生在封顶**之前**。只有把内联图当**原始数据**读(配色、指纹)时才关 |
290
291
  | `headless` / `networkIdle` | boolean | `true` / `false` | 浏览器模式,以及页面是否要等到网络空闲才被读取 |
@@ -354,6 +355,7 @@ dsh-scrapling doctor --mode mcp --profile <profileDir>
354
355
  - **走了代理时,本机解析不出来的主机名不再判否。** 域名由代理解析,而在 DNS 被按地区过滤的网络里,恰恰是这些站点才需要代理。IP 字面量、本地能解析出来的私网答案、单标签主机名(`intranet`、`router`)照旧拒。
355
356
  - **走代理时关掉 WebRTC 泄露。** Chromium 的 WebRTC 能绕过 HTTP/SOCKS 代理直接发 UDP,页面里一句 STUN 就能问出访客的真实出口 IP;有代理在就把 `blockWebrtc` 钉成真,不看模型入参。
356
357
  - **凭据不会出现在任何日志或能力协商帧里。** 上报只回显 `scheme://host:port`,并用 `source` 标出代理来自 `settings` / `environment` / `system` / `none` 哪一档 —— 用户报「抓不到东西」时,这一栏就是第一眼的答案。填错的代理地址记一行 stderr 并按「未配置」处理,而不是让插件加载失败。
358
+ - **安装器的 stderr 与下载地址也过同一道脱敏闸门。** pip 失败时会把索引地址原样打回 stderr(实测 `WARNING: The index url "ht!tp://user:TOKEN@host/simple" seems invalid` 与 `InvalidURL: … 'https://user:TOKEN@/requests/'` 两种形态都是**明文**),而企业镜像里把 token 写进 `PIP_INDEX_URL` 是常规做法、`spawn` 又会把父进程环境原样传下去。`lib/installer.ts` 的六处 stderr 通路(curl / HTTP 状态 / tar / venv / pip / chromium)与两处下载 URL 统一走 `safeStderr()` → `redactUrlSecrets()`,userinfo 整段替成 `***@`;`lib/url-policy.ts` 的匹配不再锚定行首,句子中间的地址同样认。脱敏只抹凭据、不动诊断原文,失败原因照旧读得出来。
357
359
 
358
360
  ## <img src="https://api.iconify.design/lucide/shield-alert.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 安全说明
359
361
 
@@ -391,6 +393,7 @@ dsh-scrapling doctor --mode mcp --profile <profileDir>
391
393
  - **`scrapling_screenshot` 绕过文本清洗。** 截图拍的是页面在视口里真正渲染出来的东西 —— 包括 token、私信、登录后才可见的数据等从未出现在 DOM 文本里的视觉秘密。截图经宿主 attachment 服务落库,只有该服务挂载时才注册。 交回的是该服务**归一化之后**的引用:声明为 PNG 的字节可能被存成 `image/jpeg` 且尺寸更小,而 `originalDimensions` 记的是页面真正产出的那一份(宿主约定:`@deepseek-ai/dsh-attachment` 的 `saveImage`)。`scrapling_download` 把字节写进 `dataDir/downloads`,绝不覆盖已有文件,`filename` 里带路径成分会被拒绝。
392
394
  - **`scrapling_extract`、`scrapling_locate` 与 `scrapling_links` 是离线解析器。** 三者只读调用方给的 HTML,不发网络请求;`scrapling_links` 只在给了 `baseUrl` 时才保留相对链接 —— `baseUrl` 为空时返回空链接,而不是猜绝对地址。三者共用 `extractMaxOutputChars`。
393
395
  - **adaptive 重定位是尽力而为。** Scrapling 只保存第一个命中元素;原属性变化后,可能选中一个高度相似的兄弟元素。把重定位结果当作线索并自行核对;`scrapling_locate` 不保存指纹。
396
+ - **TLS 信任源取 certifi,不用裸托管解释器的 OpenSSL 默认库。** 托管 CPython 没有自己的 OpenSSL 配置,macOS 上 `ssl.get_default_verify_paths()` 会落到系统库 `/private/etc/ssl/cert.pem` —— 那份库缺若干公开根:实测 `example.com` 的 SSL.com 链在它下面验不过(`verify error:num=20`),换成 certifi 的 bundle 则干净通过。所以 bridge 只在 `SSL_CERT_FILE` 与 `CURL_CA_BUNDLE` **都没被设过**时才把它们指向 `certifi.where()`,企业 MITM 代理或你自己钉的私有根照旧优先。这一步消掉的症状是:对一类公网站点,`scrapling_fetch` 一律报 `FETCH_FAILED ... unable to get local issuer certificate`。
394
397
  - **运行时能力包只在 macOS arm64 上验证过。** Windows、Linux 与 macOS x64 的所有包都报 `blocked`;安装器直接拒绝,不猜资产路径(B1/B2)。
395
398
  - **`adaptive-redis` 包是客户端,不是存储引擎。** 上游只发 `SQLiteStorageSystem`;这里的 Redis 后端是本插件的 `py/redis_storage.py`,一个按注册域分桶的 `StorageSystemMixin` 子类。启用它改变的是指纹存哪儿,属于部署决定而不是逐次开关。本插件自己的 MCP server 是另一件事 —— 它跑在宿主进程内,不需要能力包。
396
399
  - **Shopify 爬虫模式走店铺的 JSON 接口。** `mode=shopify` 用店铺的 `/collections.json` 与每个集合的 `/products.json`(上游的 `ShopifySpider`),按变体出行 —— `name`(商品名 + 变体名,`Default Title` 不拼)、`price`、`sku`、`stock`(有货为 `null`、缺货为 `0`)、`identifier`、`brand`、`category`、`image_url`、`url`、`barcode`、`old_price`、`description`。它不抓商品 HTML,URL 闸门、robots、间隔与并发与其他爬虫模式同一批旋钮。已在本地测试数据店上验证;真实 Shopify 店铺未跑过(B11)。
@@ -424,8 +427,14 @@ pnpm run test:py # Python sidecar 的端到端验证
424
427
  - 钉住发布形态的门:`test/publish-manifest.test.ts`(入口目标都在 `files` 覆盖内、源码不作入口、`dsh-*` 一律精确钉且同版本、没有内联的宿主包正文、注释与文档里没有日期与坏字节)与 `test/readme-parity.test.ts`(两份 README 都写全每个工具与每枚设置卡旋钮,章节结构一致)。
425
428
  - 发布走 [`.github/workflows/publish.yml`](./.github/workflows/publish.yml)(手动触发,OIDC trusted publishing + `--provenance`)。
426
429
 
430
+ ## 反馈
431
+
432
+ 欢迎提 issue 和 PR:[https://github.com/JayYuen666/dsh-scrapling/issues](https://github.com/JayYuen666/dsh-scrapling/issues)。
433
+
434
+ 插件启动失败时,请附上 dsh 宿主版本、profile 安装形态和浏览器控制台原文。`missed the module table` 这一行尤其有用:它能直接说明 shared 客户端供应行有没有被物化。
435
+
427
436
  ## <img src="https://api.iconify.design/lucide/scale.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 许可证
428
437
 
429
438
  MIT。源码在 [github.com/JayYuen666/dsh-scrapling](https://github.com/JayYuen666/dsh-scrapling),issue 走该仓库的 tracker。
430
439
 
431
- 本包不随包分发第三方源码 —— Scrapling 与浏览器引擎都是运行期依赖。随包的第三方内容是图标(Tabler Icons)与 CLI 单文件产物内联的 `zod`;host 侧 client 产物外置 zod。[`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md) 记录这条边界。
440
+ 本包不随包分发第三方源码 —— Scrapling 与浏览器引擎都是运行期依赖。随包的第三方内容是图标(Scrapling 官方标记,BSD 3-Clause)与 CLI 单文件产物内联的 `zod`;host 侧 client 产物外置 zod。[`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md) 记录这条边界。
@@ -10,21 +10,57 @@ Scrapling 及浏览器引擎都是**运行期依赖**——本包调用它们暴
10
10
  `Convertor._strip_noise_tags` 与 `Convertor._sanitize_for_ai` 是上游的私有下划线方法,不在上游文档
11
11
  里(见「机制与接口来源」)。它们不由本包分发,许可文本也随各自的包走,本文件不重复。
12
12
 
13
- 随包分发的第三方内容有两处:**图标**(`icon.svg`)与**CLI 单文件产物内联的 zod**
14
- (`bin/dsh-scrapling.mjs`)。两者都是 MIT,且本包在下方保留各自的版权与许可声明。
13
+ 随包分发的第三方内容有两处:**图标**(`icon.svg`,Scrapling 官方标记,BSD 3-Clause)与
14
+ **CLI 单文件产物内联的 zod**(`bin/dsh-scrapling.mjs`,MIT)。本包在下方保留各自的版权与
15
+ 许可声明。
15
16
 
16
- ## 图标:Tabler Icons
17
+ ## 图标:Scrapling 官方标记
17
18
 
18
- - 上游项目:`Tabler Icons`
19
- - 上游仓库:https://github.com/tabler/tabler-icons
20
- - 上游许可:MIT,Copyright (c) Paweł Kuna
21
- - 取用图标:`spider`
22
- - 来源:https://icones.js.org/icons/tabler/spider
23
-
24
- `icon.svg` 中的形状路径取自该图标的 `spider`。改动有三处:把 `<g>` 上的 `currentColor` 换成本包
25
- 插件图标主色 `#658EFF`;把外层 `<g>` 与画布尺寸对齐本族插件统一的 `36×36` / `viewBox 0 0 24 24`
26
- 规格;以及把腹部与头部两条路径各复制一份,加上 `fill="#54ECE7"`、`opacity=".2"` 与同色 `stroke`
27
- 作底衬。三份源路径的 `d` 数据与上游一致,未作改动;底衬复用同一条 `d`,只是多了填充与描边颜色。
19
+ - 上游项目:`Scrapling`
20
+ - 上游仓库:https://github.com/D4Vinci/Scrapling
21
+ - 上游资源:https://scrapling.readthedocs.io/zh-cn/latest/assets/logo.png(486×480 PNG,带 alpha)
22
+ - 上游许可:BSD 3-Clause,Copyright (c) 2024 Karim shoair
23
+
24
+ `icon.svg` 的图形**全部来自这张官方标记**:形状与 alpha 通道逐像素同源,没有重新绘制的部分。
25
+ 本包只做了一件渲染期的事——把官方图拆成「本体」与「高光」两张遮罩分别上色:本体取
26
+ `currentColor`(跟随 DSH 导航行的前景色,深色主题为浅色、浅色主题为深色),高光保留官方绿
27
+ (`#B3FB2A`,取自官方图的眼睛与吸盘)。这样两种主题下都与官方标记一致,而形状本身一个像素
28
+ 都没改。同一份遮罩字节也内联在 `client.js` 里,作为设置页导航图标的 `mask-image`。
29
+
30
+ BSD 3-Clause 允许再分发与修改,唯一的实质义务是保留版权声明与本许可条件——也就是这一节。
31
+ 以下是许可正文:
32
+
33
+ ```text
34
+ BSD 3-Clause License
35
+
36
+ Copyright (c) 2024, Karim shoair
37
+ All rights reserved.
38
+
39
+ Redistribution and use in source and binary forms, with or without
40
+ modification, are permitted provided that the following conditions are met:
41
+
42
+ 1. Redistributions of source code must retain the above copyright notice, this
43
+ list of conditions and the following disclaimer.
44
+
45
+ 2. Redistributions in binary form must reproduce the above copyright notice,
46
+ this list of conditions and the following disclaimer in the documentation
47
+ and/or other materials provided with the distribution.
48
+
49
+ 3. Neither the name of the copyright holder nor the names of its
50
+ contributors may be used to endorse or promote products derived from
51
+ this software without specific prior written permission.
52
+
53
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
54
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
55
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
56
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
57
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
58
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
59
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
60
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
61
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
62
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63
+ ```
28
64
 
29
65
  ## CLI 单文件产物内联的 zod
30
66
 
@@ -60,6 +96,7 @@ Scrapling 及浏览器引擎都是**运行期依赖**——本包调用它们暴
60
96
 
61
97
  | 依赖 | 版本 | 许可 | 引入方 |
62
98
  | --- | --- | --- | --- |
99
+ | `@jayyuen66/dsh-plugin-shared` | catalog(根 ^0.2.10) | MIT | 设置卡的共享组件供应行与 shared 子路径 |
63
100
  | `scrapling` | 0.5 | BSD-3-Clause | Python sidecar |
64
101
  | `browserforge` | 1.2.4 | MIT | Scrapling 静态抓取的浏览器头生成 |
65
102
  | `apify-fingerprint-datapoints` | 0.15.0 | Apache-2.0 | browserforge 的指纹数据 |