@jayyuen66/dsh-scrapling 0.1.11 → 0.1.13
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 +44 -0
- package/README.md +5 -5
- package/README.zh-CN.md +5 -5
- package/THIRD_PARTY_NOTICES.md +49 -13
- package/client.js +21 -17
- package/docs/DETAIL.md +1 -1
- package/docs/DETAIL.zh.md +1 -1
- package/host.js +42 -18
- package/icon.svg +13 -1
- package/package.json +13 -8
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,50 @@
|
|
|
6
6
|
标准六类之外的小节(本仓的 `Boundaries` 收各版本的验证范围与能力边界,即哪些平台/档位真跑过、
|
|
7
7
|
哪些只到本地夹具为止)。
|
|
8
8
|
|
|
9
|
+
## 0.1.13
|
|
10
|
+
|
|
11
|
+
模型可见面全量双语化(中文仍是默认,跟随宿主 locale 偏好切英文);工具选型的完整指引从常驻提示词搬进按需加载的虚拟 skill;search provider 补上 `ready()`、两个 web provider 的可热改项改成取值函数;十九个工具补调用态卡片与工具级墙钟;设置页多出一级分区与官方标记。
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **模型可见面的英文**:新增 `lib/messages.ts`,`ScraplingMessages` 227 键双语(工具描述、参数说明、十五条抓取指引、问答系统提示与六条回执、截断提示、MCP search 四句)。`ToolDeps` 多一个可选 `messages`,`messagesOf(deps)` 落回中文;`host.ts` 的 `localeMessagesOf` 读官方 locale 命名空间的偏好,装配期解析一次并注入全部工具、问答与 MCP 面。此前这些文本全部硬编中文——非中文模型读到的说明与报错是另一种语言。八张工具参数表与五张共享参数表随之从 `as const` 常量改成箭头函数 + `as const`(标宽返回类型会让 `defineTool` 推不出 `ParameterSchemaSpec`)。
|
|
16
|
+
- **虚拟 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 比不说更糟。
|
|
17
|
+
- **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 也没有,它没有凭据可判。
|
|
18
|
+
- **调用态卡片**:十九个工具全部声明 `presentCall`,标题取入参里已有的值、取不到回落工具名。三个会话工具(`session_open` / `session_list` / `session_close`)此前落默认卡片,与检索类工具在时间线上分不出来。
|
|
19
|
+
- **工具级墙钟**:每处注册的 `timeoutMs` 改成 `toolTimeoutOf(settings)` = 部署的 `timeoutMs` + 60 秒余量(17 处)。此前注册级与内层取同一个数,而宿主的截止在 `execute` 之前就装好、起点更早 ⇒ 永远是宿主先到期,本包带出路说明的 `SidecarError`(`BROWSER_TIMEOUT` / `REQUEST_TIMEOUT`)没机会说话。
|
|
20
|
+
- **设置页一级分区与官方标记**:`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"` —— 不传时卡片会早退成空表单且不报错。
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- **可热改的部署项改成取值函数**:`SearchProviderDeps` / `WebProviderDeps` 里的后端名、四把 key、searxng 端点、publicFallback、输出预算与超时全部改成 `Reader<T> = () => T`(新增 `lib/config-reader.ts`),`host.ts` 抽出 `providerReadersOf(config)` 一处构造。原因:这些字段在设置卡上是 `.volatile()` 的,改值不会重跑 `apply`,装配时抄进闭包的那一份会永远停在旧值。一次操作只取一次快照,同一笔请求内不会出现「协议层按 30 秒等、回执里写 45 秒」。
|
|
25
|
+
- **下载回执补提示**:`scrapling_download` 的文本多一句 `downloadSavedHint`(文件落在哪、下一步通常是什么),不再只是一行字节数与 sha256。
|
|
26
|
+
- **宿主开发基线抬到 `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` 要的是同一份类身份,内联成第二份就等于没有错误码)。
|
|
27
|
+
- **两份 README 与两份 DETAIL 的指引段叙述同步**:从「关掉某个工具时它的 system prompt 指引段一并消失」改成「常驻只有一段跨工具摘要、逐工具十五句在虚拟 skill 里」,并说明侧车没起来时既不注册 skill 也没有常驻段。
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- **`MCP_SERVER_VERSION` 与包版本同步**到 `0.1.13`。
|
|
32
|
+
|
|
33
|
+
### Boundaries
|
|
34
|
+
|
|
35
|
+
- 英文面只覆盖模型可见的文案(工具描述、参数说明、指引、回执、截断提示)。装配期日志、配置错误提示与 CLI 输出仍是中文:它们给部署者看,不进模型上下文。
|
|
36
|
+
- `ctx.skills` 是可选服务。精简 profile(没装 `dsh-skill`)下插件照常装配、工具照常可用,只是十五条指引按需加载不了,常驻段也不会出现指路句。
|
|
37
|
+
|
|
38
|
+
## 0.1.12
|
|
39
|
+
|
|
40
|
+
设置卡的下拉候选与说明浮层不再漂到浏览器最左边;shared 抬到 `^0.2.8`(含运行时几何自检),CI 的 action 钉版升到最新。`MCP_SERVER_VERSION` 随包版本同步。
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- **下拉候选与说明浮层被钉在视口左边缘**:`.dsu-menu` 与 `.dsu-tip` 的 `position-area: block-end span-inline-start` 选中的是「行内起始列 + 中间列」,而 `position: fixed` 下该区域的起始边是**视口左边缘**、不是触发器左边缘,再叠一条 `justify-self: start`,浮层就落在 `x=0`。改为 `block-end span-inline-end`——真实 Chromium(patchright headless,156.0.8078.4)实测:1440px 视口、触发器左边缘 860px,改前浮层左边缘 0,改后 860;触发器贴到右侧时 `flip-inline` 会改成右边缘对齐,贴到视口底部时 `flip-block` 翻到上方。
|
|
45
|
+
- **锚定没兑现时改回 JS 矩形定位**:`select.ts` 与 `field.ts` 的 `place()` 此前只要 `CSS.supports("position-area: block-end")` 为真就直接 `return`,方向性错误没有任何兜底。现在锚定后先量一次浮层矩形,用 shared 0.2.8 的 `anchorPlacementOff` 判它是否真贴在触发器上(行内起始边或结束边任一在 2px 容差内贴住,且块向落在触发器下方或上方),不通过才把 `position-area` 显式置 `none` 再写 `left` / `top`。顺序是承重的:实测同时留着 `position-area` 只写坐标时块向仍由锚定决定(浮层 `y` 落在 314 而不是 160),必须先关。回退是单向的——同一个浮层一旦走过 JS 路径,后续 `resize` 不再尝试锚定,避免两个定位源来回抢。
|
|
46
|
+
- **回归测试**:`test/card-ui.test.ts` 新增 `anchorPlacementOff` 的四种对齐形态(左边缘对齐、`flip-inline` 右对齐、`flip-block` 翻上方、两轴都不沾)与容差边界,以及三条锚定用例(浮层真贴住时不写 JS 坐标、被钉到视口左侧时改写坐标并关掉 `position-area`、回退过的浮层不再重试锚定)。
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
|
|
50
|
+
- **运行时依赖 shared 抬到 `^0.2.8`**:`pnpm-workspace.yaml` 的 catalog 由根 `sync` 投影,`pnpm-lock.yaml` 随 `sync:lock` 重解;`client.js` 按新 shared 重建,内联的 `CARD_UI_CSS` 逐字节等于已装 shared 导出的那一份。0.2.8 新增的 `anchorPlacementOff` / `ANCHOR_PLACEMENT_TOLERANCE` 只被卡片内部使用,本包对外工具与 Remote 方法名单不变。
|
|
51
|
+
- **CI 的 action 钉版升到最新**:`github/codeql-action` 的 `init` / `analyze` / `upload-sarif` 由 `v4.39.2` 升到 `v4.39.3`(`33d7b85da1a04171e211befe2c739303b9a4c066`)。钉版仍是 40 位 commit SHA + 版本注释,由根 `scripts/upgrade-actions.mjs` 现量比对上游 tag 后改写,`--check` 可复跑。
|
|
52
|
+
|
|
9
53
|
## 0.1.11
|
|
10
54
|
|
|
11
55
|
Scrapling 钉版抬到 `0.5.1`;MCP 接入支持宿主 mcpManager 动态注册;宿主开发基线抬到 `0.2.2-rc.2`,支持窗口收到 `^0.2.2-rc.1`。
|
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.
|
|
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
|
|
|
@@ -80,7 +80,7 @@ dsh plugin --profile web add @jayyuen66/dsh-scrapling
|
|
|
80
80
|
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
81
|
|
|
82
82
|
- **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.
|
|
83
|
+
- **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
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.
|
|
85
85
|
|
|
86
86
|
```sh
|
|
@@ -123,7 +123,7 @@ dsh-scrapling setup --status
|
|
|
123
123
|
- 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
124
|
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
125
|
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
|
|
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 guidance is gone from the skill body too — that absence is the conditional registration working, not a failure.
|
|
127
127
|
|
|
128
128
|
## <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
129
|
|
|
@@ -138,7 +138,7 @@ dsh-scrapling setup --status
|
|
|
138
138
|
- 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
139
|
- 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
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
|
|
141
|
+
- 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
142
|
- `scrapling_crawl` registers its own job kind, so `job_list` labels its jobs as crawls rather than shell jobs.
|
|
143
143
|
|
|
144
144
|
## <img src="https://api.iconify.design/lucide/globe.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> The tools
|
|
@@ -428,4 +428,4 @@ pnpm run test:py # end-to-end check of the Python sidecar
|
|
|
428
428
|
|
|
429
429
|
MIT. Source at [github.com/JayYuen666/dsh-scrapling](https://github.com/JayYuen666/dsh-scrapling). Issues go to that repository's tracker.
|
|
430
430
|
|
|
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 (
|
|
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 (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.
|
|
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
|
|
|
@@ -80,7 +80,7 @@ dsh plugin --profile web add @jayyuen66/dsh-scrapling
|
|
|
80
80
|
卸载用 `dsh plugin --profile web remove @jayyuen66/dsh-scrapling`。包在公共 npm registry 上,安装不需要凭据,也不需要 scoped-registry 配置行。
|
|
81
81
|
|
|
82
82
|
- **需要 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.
|
|
83
|
+
- **需要宿主 `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
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 时报错里带着可直接照抄的安装命令。
|
|
85
85
|
|
|
86
86
|
```sh
|
|
@@ -123,7 +123,7 @@ dsh-scrapling setup --status
|
|
|
123
123
|
- 这条命令是唯一被认的「它在层栈里」信号,而且它**不是只读的** —— 会把 profile 的根装配文件重写一遍。层行从 stdout 读,stderr **单独**查:未命中的 patch 目标只出现在 stderr,只看退出码证明不了任何事。`# == <层>` 与 `# == <层>, patched by <路径>` 两种形态都要认。
|
|
124
124
|
2. **启动日志点名解释器与注册计划。** 有一行打印探测到的能力与注册了几个工具;选中的解释器路径在装载时写进日志。解释器起得来但没装 Scrapling 时,日志点名解释器路径,并附可直接照抄的 pip 命令。
|
|
125
125
|
3. **设置卡渲染。** 插件详情页上有 **scrapling** 卡,全部用户可改字段按用途分组;改一个值后保存按钮亮起,写入返回 200。
|
|
126
|
-
4. **一次工具往返。** 让模型抓一个重 JS 的页面:结果行经官方 tool-call 视图渲染在会话里。没有浏览器的机器上,render / capture_xhr
|
|
126
|
+
4. **一次工具往返。** 让模型抓一个重 JS 的页面:结果行经官方 tool-call 视图渲染在会话里。没有浏览器的机器上,render / capture_xhr 不在模型的工具列表里,对应的指引也一并消失(skill 正文里没有那几句)—— 那是条件注册在起作用,不是故障。
|
|
127
127
|
|
|
128
128
|
## <img src="https://api.iconify.design/lucide/circle-slash.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 它不提供什么
|
|
129
129
|
|
|
@@ -138,7 +138,7 @@ dsh-scrapling setup --status
|
|
|
138
138
|
- client 半注册两处:设置卡(坐在 `plugins.bundle.config` 槽上,键是 bundle 包名 —— 宿主按 `entryKey: pkg.name` 派发,所以卡画在本包的详情页上),以及每个工具在 `tool.call.toolview` 上的一行结果,用官方 tool-call 视图 props 画。
|
|
139
139
|
- 设置命名空间就是条目 id `scrapling`;优先级为 设置卡现值 > 注册行 `config:` > schema 默认值。把一项改回默认值保存的是**清除覆盖**而不是写入同一个值,将来默认值变了你这一项也会跟着变。
|
|
140
140
|
- 闸门策略与 sidecar 环境在插件 `apply()` 时取一次快照 —— **设置卡的改动要等下次启动才生效**。
|
|
141
|
-
-
|
|
141
|
+
- 关掉某个工具时,它的指引也一并消失,但分两层看:**常驻段只有一段摘要**(跨工具的选型规则,不点名具体工具),而逐工具那十五句全文注册成一枚虚拟 skill `scrapling`。两侧都按「那个 scope 真注册着哪些工具」现取 —— 没装浏览器的机器上 skill 正文里没有 render / capture_xhr 那几句,sidecar 没起来的机器**既没有常驻段也不注册 skill**(正文为空时注册一枚点开什么都没有的条目只会污染模型的 skill 目录)。宿主没有 skill 服务(精简 profile)时插件照常装配,只是少了这枚 skill,常驻段也不追加那句「完整指引见 skill」。常驻段排在内置 `web_fetch` 指引旁边。
|
|
142
142
|
- `scrapling_crawl` 登记自己的作业类型,`job_list` 因此把它的作业标成爬虫而不是 shell 作业。
|
|
143
143
|
|
|
144
144
|
## <img src="https://api.iconify.design/lucide/globe.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> 工具一览
|
|
@@ -428,4 +428,4 @@ pnpm run test:py # Python sidecar 的端到端验证
|
|
|
428
428
|
|
|
429
429
|
MIT。源码在 [github.com/JayYuen666/dsh-scrapling](https://github.com/JayYuen666/dsh-scrapling),issue 走该仓库的 tracker。
|
|
430
430
|
|
|
431
|
-
本包不随包分发第三方源码 —— Scrapling 与浏览器引擎都是运行期依赖。随包的第三方内容是图标(
|
|
431
|
+
本包不随包分发第三方源码 —— Scrapling 与浏览器引擎都是运行期依赖。随包的第三方内容是图标(Scrapling 官方标记,BSD 3-Clause)与 CLI 单文件产物内联的 `zod`;host 侧 client 产物外置 zod。[`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md) 记录这条边界。
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -10,21 +10,57 @@ Scrapling 及浏览器引擎都是**运行期依赖**——本包调用它们暴
|
|
|
10
10
|
`Convertor._strip_noise_tags` 与 `Convertor._sanitize_for_ai` 是上游的私有下划线方法,不在上游文档
|
|
11
11
|
里(见「机制与接口来源」)。它们不由本包分发,许可文本也随各自的包走,本文件不重复。
|
|
12
12
|
|
|
13
|
-
随包分发的第三方内容有两处:**图标**(`icon.svg
|
|
14
|
-
|
|
13
|
+
随包分发的第三方内容有两处:**图标**(`icon.svg`,Scrapling 官方标记,BSD 3-Clause)与
|
|
14
|
+
**CLI 单文件产物内联的 zod**(`bin/dsh-scrapling.mjs`,MIT)。本包在下方保留各自的版权与
|
|
15
|
+
许可声明。
|
|
15
16
|
|
|
16
|
-
## 图标:
|
|
17
|
+
## 图标:Scrapling 官方标记
|
|
17
18
|
|
|
18
|
-
- 上游项目:`
|
|
19
|
-
- 上游仓库:https://github.com/
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|