@jayyuen66/dsh-scrapling 0.1.15 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,27 @@
6
6
  标准六类之外的小节(本仓的 `Boundaries` 收各版本的验证范围与能力边界,即哪些平台/档位真跑过、
7
7
  哪些只到本地夹具为止)。
8
8
 
9
+ ## 0.1.17
10
+
11
+ ### Added
12
+
13
+ - MCP 搜索输出契约、按需工具加载、PDF 阅读、DeepSeek Auth 搜索后端,以及 RemoteSession、ARIA 快照与选择器/坐标拖放。
14
+ - 搜索 URL 归一化、去重、元数据保留、offset 分页与有界 TTL 缓存;DeepSeek 直接调用按单 provider 实例每秒 5 次节流。
15
+
16
+ ### Changed
17
+
18
+ - 搜索正文总预算改为可热改的 `searchMaxOutputBytes`,默认仍为 24000 字节;默认结果数对齐宿主 `web_search` 的 10 条。
19
+ - 官方 `web_search` / `web_fetch` 的 scrapling provider 共用静态优先策略、URL 闸门、逐请求取消与输出预算。
20
+
21
+ ### Fixed
22
+
23
+ - 搜索与网络历史的结构化总预算、分页锚点、截断标记和异常回包语义;普通超时不再销毁共享 sidecar。
24
+ - 搜索发现请求共用抓取代理策略;Bing 按中英文设置 `setlang` 并解包 `ck/a` 跳板 URL。
25
+
26
+ ## 0.1.16
27
+
28
+ 宿主基线切到 `dsh 0.2.3-alpha.2`(Node `^24.22.3 || >=26.13.1`),shared 经 catalog 抬到 `^0.2.13`。MCP 客户端默认钉版与 doctor 的放行名单对齐 alpha.2(rc.5 / rc.1 只留给显式 `allow-version` 的旧 profile);设置卡随 shared v3 视觉层更新,并新增 `ScraplingPanelSection` 与「就绪能力包 / 解释器」两项 KPI,客户端注册数与解释器测试同步。
29
+
9
30
  ## 0.1.15
10
31
 
11
32
  宿主基线抬到 `0.2.2-rc.5`;mcp server 自述版本对齐包版本;mcp-server 的字段读取收编 shared。
package/README.md CHANGED
@@ -11,8 +11,8 @@
11
11
  <a href="https://www.npmjs.com/package/@jayyuen66/dsh-scrapling"><img src="https://img.shields.io/npm/d18m/@jayyuen66/dsh-scrapling?style=flat-square" alt="npm downloads (total)" /></a>
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
- <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.5-658EFF?style=flat-square" alt="dsh" />
14
+ <img src="https://img.shields.io/badge/node-%5E24.22.3%7C%7C%3E%3D26.13.1-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
15
+ <img src="https://img.shields.io/badge/dsh-%5E0.2.3--alpha.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,8 +80,8 @@ dsh plugin --profile web add @jayyuen66/dsh-scrapling
80
80
 
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
- - **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.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.
83
+ - **Requires Node.js `^24.22.3 || >=26.13.1`.** 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 range itself is the host floor: `0.2.3` hosts from `alpha.2` declare Node `^24.22.3 || >=26.13.1` (Node 25 sits outside it), and a host below it never starts.
84
+ - **Requires host `dsh` at the `0.2.3-alpha.2` line or later.** The requirement the host actually reads is `engines.dsh` (`^0.2.3-alpha.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
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
@@ -92,6 +92,7 @@ python -m patchright install chromium
92
92
  - **Why `rag` and not `fetchers`:** `rag` is `fetchers` plus `markdownify`, and the default `extractionType` is `markdown` — with plain `fetchers` the first fetch raises `ModuleNotFoundError` at the Markdown conversion.
93
93
  - **Version range:** developed and verified against Scrapling **0.5**, through interfaces that are not stable API surface (`Selector`, `Spider`, `SessionManager`, and the converter's noise-stripping helpers). The upper bound is pinned below `0.6`; outside the range the guards still run, but the anti-injection cleaning and the crawl path may not behave as documented. In 0.5 the browser backend is patchright only (the old standalone stealth fetch is gone; its anti-detection arguments live on `scrapling_render`), `capture_xhr` became session-level recording (hence `scrapling_session_network`), and `extra_flags` became additive — this package sends none, and WebRTC leak protection is carried by the `blockWebrtc` switch.
94
94
  - **Without the installer, the browser engine is yours.** The optional CLI can install the verified macOS arm64 set; the plugin itself downloads nothing at load time. Without a browser it simply does not register the browser-dependent tools, so the model never wastes a turn calling them.
95
+ - **PDF reading is optional.** Install the `documents` pack for pinned pypdf 7.1.1, or install the same version into the interpreter selected by `pythonBin`. Without pypdf the sidecar still starts, `capabilities.documents` is false, and `scrapling_read_document` is not registered.
95
96
  - **No `@deepseek-ai/*` under `dependencies`, by contract** (`test/publish-manifest.test.ts` enforces it). Consumer profiles install with `nodeLinker: hoisted` and `autoInstallPeers: false`, so a host package there becomes a real second copy whose module-level state splits from the running host's — every native tool call then throws while build and tests stay green. The host packages the artifact imports for value are required peers and stay externalized; the gate imports the built artifact and asserts that no host package body is inlined.
96
97
  - **The artifact is ESM-only and never committed** — `prepack` rebuilds it, so what ships is always what the current source produces.
97
98
 
@@ -109,10 +110,10 @@ dsh-scrapling setup --feature browser --apply
109
110
  dsh-scrapling setup --status
110
111
  ```
111
112
 
112
- - `core` installs managed Python 3.14.9, Scrapling 0.5 and its pinned wheels; `browser` adds the full Chromium build (not the headless shell).
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
+ - `core` installs managed Python 3.14.9, Scrapling 0.5.1 and its pinned wheels; `browser` adds the full Chromium build (not the headless shell).
114
+ - `search`, `media`, `documents`, `mcp` and `adaptive-redis` all ride on `core`'s venv: `documents` adds pinned pypdf 7.1.1 from its own hash-locked requirements file, `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`. All seven packs are installable; the settings card reports each as `ready`, `missing`, `corrupt` or `installing`.
114
115
  - `--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/`.
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.
116
+ - `--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 the core set; add `-r py/documents-requirements.txt` when installing the `documents` pack. 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.
116
117
  - `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.
117
118
  - 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.
118
119
  - `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`).
@@ -128,7 +129,7 @@ dsh-scrapling setup --status
128
129
 
129
130
  ## <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
130
131
 
131
- - **It is not a search engine.** Discovery runs in the Python sidecar against one of six backends (`searchBackend`: `auto` / `tavily` / `bing` / `brave` / `serper` / `duckduckgo` / `searxng`); Scrapling's own `google_search` option only sets a referer header. Each backend needs its own setting (`tavilyApiKey`, `braveApiKey`, `serperApiKey`, `searxngEndpoint`) — a backend that is selected but not configured reports `SEARCH_AUTH` instead of silently switching to another one.
132
+ - **It is not a search engine.** Discovery uses one of seven backends (`searchBackend`: `auto` / `tavily` / `bing` / `brave` / `serper` / `duckduckgo` / `searxng` / `deepseek`). Six run in the Python sidecar and use their own settings; `deepseek` runs in Host through optional `ctx.deepseekAuth` and the direct Search API. Scrapling's own `google_search` option only sets a referer header. A selected backend without credentials reports `SEARCH_AUTH` instead of silently switching.
132
133
  - **The npm tarball bundles no interpreter or browser.** They come from your machine or from the optional CLI installer, which downloads the verified macOS arm64 set into `dataDir/runtime`; missing pieces remove the matching tools instead of being fetched at load time.
133
134
  - **It adds no HTTP route on the host side.** The settings card is a host config form and this package exposes no `/api` surface. The one socket that really listens is the MCP server under `integrationMode: mcp`, bound to `127.0.0.1` (`http://127.0.0.1:<mcpPort>/mcp`): any other path gets 404, a declared body over 1 MiB gets 413, a request without `Content-Length` gets 411, and the bearer token is read only from `DSH_SCRAPLING_MCP_TOKEN` — with no token set, startup prints a stderr notice that the endpoint is unauthenticated and reachable from any local process.
134
135
  - **It adds no dsh subcommand.** The package's own `dsh-scrapling` CLI manages runtime packs, plus the manual half of the MCP hookup for profiles without `mcpManager`: `setup --mode native|mcp|official-mcp` generates the client entry and, with `--apply`, writes it to `<dataDir>/mcp/<mode>.patch.yml` (the profile itself is never touched), while `doctor --mode` compares that entry against the profile's `cordis.patch.yml` item by item. Given `--profile`, `setup --status` reads `pythonBin` and `dataDir` from that same file.
@@ -138,13 +139,13 @@ dsh-scrapling setup --status
138
139
  - `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.
139
140
  - 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.
140
141
  - 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.
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
+ - Most card values are read per call — extraction and browser knobs, the five 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 sixteen tool switches, `provideWebFetch` / `provideWebSearch`, `pythonBin`, `failFastOnMissingPython`, `dataDir`, `sidecarHandshakeTimeoutMs` / `sidecarGraceMs`, and the URL-gate / sidecar-environment values (`proxyUrl`, `proxyBypass`, `allowedHosts`, `nat64Prefixes`, `syntheticDnsRanges`).
143
+ - 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 sixteen 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.
143
144
  - `scrapling_crawl` registers its own job kind, so `job_list` labels its jobs as crawls rather than shell jobs.
144
145
 
145
146
  ## <img src="https://api.iconify.design/lucide/globe.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> The tools
146
147
 
147
- Nineteen tools, behind fifteen settings switches (the seven session/state tools share switches), all exercised by the test suite:
148
+ Twenty tools, behind sixteen settings switches (the seven session/state tools share switches), all exercised by the test suite:
148
149
 
149
150
  | Tool | Backend | Needs a browser | Concurrency |
150
151
  |---|---|---|---|
@@ -155,17 +156,26 @@ Nineteen tools, behind fifteen settings switches (the seven session/state tools
155
156
  | `scrapling_render` | `StealthySession` (patchright) | yes | serialised; the anti-detection switches (`solveCloudflare` / `hideCanvas` / `blockWebrtc`) live here |
156
157
  | `scrapling_capture_xhr` | one throwaway session, page-level recording | yes | serialised |
157
158
  | `scrapling_session_open` / `scrapling_session_fetch` / `scrapling_session_network` / `scrapling_session_state_save` / `scrapling_session_state_load` / `scrapling_session_list` / `scrapling_session_close` | Scrapling session classes | browser sessions only | serialised |
158
- | `scrapling_session_read` | current DOM of a browser session page | yes | serialised |
159
- | `scrapling_session_act` | structured actions on a session page (deployment gate) | yes | serialised |
159
+ | `scrapling_session_read` | current DOM text or AI-mode ARIA snapshot of a browser session page | yes | serialised |
160
+ | `scrapling_session_act` | structured actions, including selector/coordinate drag, on a session page (deployment gate) | yes | serialised |
160
161
  | `scrapling_download` | byte download into `dataDir/downloads` (deployment gate) | no | concurrent |
162
+ | `scrapling_read_document` | streamed PDF text via optional pypdf | no | concurrent; defaults to 20 MiB / 200 pages / 200000 characters |
161
163
  | `scrapling_screenshot` | PNG/JPEG screenshot handed to the attachment service | yes | serialised |
162
164
  | `scrapling_crawl` | Scrapling Spider framework (`content` / `sitemap` / `feed` / `shopify`) as a job | no | serialised |
163
165
  | `scrapling_answer` | any fetch path plus `ctx.llm` | with `render: true` | serialised |
164
166
 
165
- - **Quotas.** At most 8 open sessions (3 of them browser sessions, each a real Chromium process), 2 crawls in flight, per-page bodies clipped by `*MaxOutputChars`, 8 MB per protocol frame, 16 queued frames. A ceiling answers with a specific code (`SESSION_LIMIT` / `CRAWL_BUSY` / `BAD_FRAME`) the model can back off from.
167
+ - **Quotas.** At most 8 open sessions (3 of them browser sessions; `stealth` launches local Chromium while `remote` connects to CDP), 2 crawls in flight, per-page bodies clipped by `*MaxOutputChars`, 8 MB per protocol frame, 16 queued frames. A ceiling answers with a specific code (`SESSION_LIMIT` / `CRAWL_BUSY` / `BAD_FRAME`) the model can back off from.
166
168
  - **`scrapling_crawl` returns a job id immediately** — a crawl takes minutes and a tool call has a timeout. Watch it with `job_list`, read it with `job_output`, stop it with `job_kill`; the tool needs a jobs registry that can attach a controller, and a profile without one simply does not register it (single-page fetching is unaffected). The crawl has a wall-clock ceiling (`crawlMaxRuntimeSeconds`) and never leaves the start domain. Politeness defaults follow Scrapling's spider defaults — robots.txt is **not** obeyed, per-domain delay is 0, up to 4 requests run in parallel — and is a deployment decision, not a per-call one (see [Settings](#settings)).
167
169
  - **`scrapling_answer` fetches the page first, then hands the text plus your question to a model** and returns the conclusion instead of the whole page. It follows the model the current session is already using by default (read from the session's live request header, so a mid-session model switch is picked up), which burns no separate quota; pin `answerProvider` / `answerModel` to route page-reading elsewhere. Page text is **untrusted input** — the prompt frames it explicitly as data, but that defence is prompt-level: it lowers the risk, it does not remove it.
168
170
 
171
+ ### Browser sessions, ARIA and drag
172
+
173
+ `sessionType=remote` appears only when the sidecar reports `RemoteSession` support and deployment config sets `browserCdpUrl` to a `ws://`, `wss://`, `http://` or `https://` endpoint. It connects to an already-running Chromium and creates an isolated context; it does not need a local Chromium install. The endpoint is a strong capability and never enters model input. Closing the session releases that context and connection.
174
+
175
+ `scrapling_session_read` accepts `snapshotType: "text" | "aria"` (default `text`). ARIA uses Patchright's AI-mode accessibility snapshot and can be narrowed with `cssSelector`, which makes buttons, links and form controls easier to locate than raw DOM text.
176
+
177
+ `scrapling_session_act` adds `type: "drag"` in two exclusive forms: `{ "type": "drag", "from": "#source", "to": "#target" }` or `{ "type": "drag", "fromX": 10, "fromY": 20, "toX": 100, "toY": 80 }`. It still requires `allowBrowserActions: true`; URL guards and the action gate apply to remote and local browser sessions alike.
178
+
169
179
  ### Render or static
170
180
 
171
181
  `scrapling_render` is much slower and heavier than `scrapling_fetch`, so start static. Two criteria:
@@ -182,13 +192,17 @@ The plugin registers itself as a **fetch provider** and a **search provider** on
182
192
  1. leave `provideWebFetch` / `provideWebSearch` at their default (`true`);
183
193
  2. set `fetchProvider` / `searchProvider` to `"scrapling"` in the **deployment** config.
184
194
 
195
+ Both content-reading paths share `webFetchStrategy` (default `auto`): `static` always reads statically; `auto` reads statically first and renders only when the body is under 200 characters; `browser` renders directly. Without a browser, `auto` stays static. A network error or malformed reply is returned as a failure, not treated as a reason to render.
196
+
185
197
  A configured id wins over auto-selection, which is why step 2 is required — and with two usable providers and no id named, `ctx.web` answers `WEB_PROVIDER_AMBIGUOUS` and the tool becomes unavailable outright. Two consequences of pointing that line at this plugin:
186
198
 
187
199
  - **If the sidecar cannot start, the built-in `web_fetch` reports `WEB_PROVIDER_CONFIGURED_UNAVAILABLE`** rather than quietly falling back to plain HTTP.
188
200
  - **If you later remove the plugin but leave the line in**, the built-in tools report `WEB_PROVIDER_CONFIGURED_MISSING` — go back and remove `fetchProvider` / `searchProvider` too.
189
201
  - **The fetch provider really applies the output budget**: a body over `fetchMaxOutputChars` is cut to a head/tail window and flagged `truncated`, not passed through with a flag. Failures keep the sidecar code prefix (`URL_BLOCKED`, `SIDECAR_TIMEOUT`, `SIDECAR_UNAVAILABLE`), so a policy refusal is distinguishable from a crash or a timeout.
190
202
 
191
- Search is split in two, because Scrapling is not a search engine: **discovery** runs in the Python sidecar against the backend `searchBackend` names — Tavily, Bing HTML, Brave (API), Serper (API), DuckDuckGo HTML or SearXNG (JSON API); **reading** is this plugin's — the first `searchRenderTopN` results are actually fetched and, with a browser, rendered, so one `web_search` call returns both which pages matter and what they say. `auto` uses Tavily when `tavilyApiKey` is set, SearXNG when `searxngEndpoint` is set, and with neither configured it only goes to a public engine (Bing; DuckDuckGo when that backend is named explicitly) if `searchPublicFallback` is on — otherwise the provider is unavailable and `web_search` reports `SEARCH_BACKEND_MISSING` instead of querying anyone. Only Tavily and Bing have been exercised against the real endpoints here; Brave, Serper, DuckDuckGo and SearXNG are implemented to their documented request/response shapes and verified against local stubs, with real keys and real instances still unverified. Every returned URL goes through the same gate as a fetch; a page that fails to read is skipped alone, because search results routinely contain dead links.
203
+ Search is split in two, because Scrapling is not a search engine: an omitted `maxResults` defaults to 10, matching dsh's `web_search`; **discovery** uses `searchBackend` — Tavily, Bing HTML, Brave (API), Serper (API), DuckDuckGo HTML, SearXNG (JSON API), or DeepSeek's direct Search API through optional `ctx.deepseekAuth`; **reading** remains this plugin's — the first `searchRenderTopN` results are fetched according to `webFetchStrategy`, so one `web_search` call returns both which pages matter and what they say. `auto` keeps the existing Tavily → SearXNG → explicitly allowed public-engine order; DeepSeek is selected explicitly with `searchBackend=deepseek`. Without a configured discovery path the provider is unavailable and `web_search` reports `SEARCH_BACKEND_MISSING` instead of querying anyone. Only Tavily and Bing have been exercised against real endpoints here; the other sidecar backends use documented shapes and local stubs. DeepSeek is covered by authorization/HTTP contract tests, not a live credentialed request. Every returned URL goes through the same gate as a fetch; a page that fails to read is skipped alone.
204
+
205
+ Source URLs are canonicalized before citation: fragments and common tracking parameters are removed, query keys are sorted, and duplicate URLs keep their first result. Provider-supplied `summary` and `publishedAt` fields are preserved. MCP `search` also accepts `offset` (0–100): backends with native pagination use it, while DeepSeek has no offset parameter and the plugin requests up to 50 results before slicing locally. Successful discovery results are cached in memory for 300 seconds with at most 128 entries; cache keys include the query, page, backend and redacted endpoints, never API-key values or authorization headers. The direct DeepSeek branch paces at 5 requests per second per provider instance; other processes sharing the account are not coordinated. Every discovery backend follows the same proxy policy as fetching, including an explicit direct connection for `proxyBypass: "*"`. Bing uses `setlang=zh-hans` for Chinese queries and `setlang=en` otherwise, and unwraps its `ck/a` redirect links to the original URL.
192
206
 
193
207
  One consequence to know: `dsh-web`'s fetch body is a **closed** union of `html | text` with no `markdown` kind, and adding one is a cross-package change a plugin cannot make. The fetch provider therefore reports Scrapling's Markdown as `text`, which the built-in renderer displays normally. Use `scrapling_fetch` directly when you need `html` or a CSS selector.
194
208
 
@@ -196,6 +210,8 @@ One consequence to know: `dsh-web`'s fetch body is a **closed** union of `html |
196
210
 
197
211
  `integrationMode` selects one of three mutually exclusive tool surfaces. It is deployment configuration (the `config:` block of `cordis.patch.yml`), it is read once when the plugin is assembled, and changing it requires a restart.
198
212
 
213
+ `mcpToolLoading` is deployment-only too and defaults to `eager`, which keeps the existing behavior of putting the server's tools directly into the tool list. Set it to `on-demand` when those definitions are too large to send with every request: the system prompt then lists each raw tool name with the first line of its description, and the model loads what it needs through `mcp__scrapling__load_tools`. Loaded tools join only the calling agent's list; subagents, forks and resumed sessions start empty. The value is passed to both dynamic `mcpManager` registration and `setup`-generated manual entries as `toolLoading`; changing it requires a restart. For a manual entry, also rerun `setup --mode <mode> --profile <profileDir> --apply` and reapply the generated patch — restarting alone does not rewrite that entry.
214
+
199
215
  | Mode | What it registers |
200
216
  |---|---|
201
217
  | `native` (default) | the `scrapling_*` tools listed above |
@@ -206,7 +222,7 @@ In `mcp` mode the server runs inside the plugin's own host process and calls the
206
222
 
207
223
  - **Endpoint** `http://127.0.0.1:<mcpPort>/mcp` (`mcpPort`, default `39217`). Only loopback is bound; a request whose declared body exceeds 1 MiB is refused with `413`, and any other path gets `404`. The server is stateless: each request gets its own protocol instance, so nothing survives across them.
208
224
  - **Auth** off by default. Set the environment variable `DSH_SCRAPLING_MCP_TOKEN` and every request must then carry `Authorization: Bearer <token>`. The token is only ever read from the environment, never from the profile, so it does not land in a config file.
209
- - **Tools** are the same `ToolDefinition` objects native registers: same JSON Schema, same argument validation, same renderers. `scrapling_answer` is not served — it routes through the model of the hosting session, which an external client does not have. `search` exists only on this surface, because an MCP client has no `ctx.web` seam. The gates are identical: with `allowBrowserActions=false` there is no `session_act`, with `allowFileDownloads=false` there is no `download`, and `search` is absent when no search backend is available.
225
+ - **Tools** are the same `ToolDefinition` objects native registers: same JSON Schema, same argument validation, same renderers. `scrapling_answer` is not served — it routes through the model of the hosting session, which an external client does not have. `search` exists only on this surface, because an MCP client has no `ctx.web` seam; it accepts `query`, `maxResults` and `offset`, and returns citable URLs, snippets, optional `summary` / `publishedAt`, bounded body text and `structuredContent`. The gates are identical: with `allowBrowserActions=false` there is no `session_act`, with `allowFileDownloads=false` there is no `download`, and `search` is absent when no search backend is available.
210
226
  - **Results** are text content; a screenshot comes back as MCP image content instead of a host attachment. A failing tool returns `isError` with a readable message rather than dropping the connection.
211
227
  - **Names**: the MCP raw name is the tool name without the `scrapling_` prefix, and dsh's MCP client shows it as `mcp__scrapling__<raw>`.
212
228
 
@@ -229,15 +245,16 @@ In `mcp` mode the server runs inside the plugin's own host process and calls the
229
245
  | `scrapling_session_read` | `session_read` |
230
246
  | `scrapling_session_act` | `session_act` |
231
247
  | `scrapling_download` | `download` |
248
+ | `scrapling_read_document` | `read_document` |
232
249
  | `scrapling_screenshot` | `screenshot` |
233
250
  | — (`ctx.web` only) | `search` |
234
251
 
235
252
  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
253
 
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:
254
+ 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.3-alpha.2` is the default; a host still on rc.1 takes `0.2.2-rc.1`, and `next` tracks the official beta line:
238
255
 
239
256
  ```bash
240
- dsh plugin --profile <name> add @deepseek-ai/dsh-mcp-client@0.2.2-rc.5
257
+ dsh plugin --profile <name> add @deepseek-ai/dsh-mcp-client@0.2.3-alpha.2
241
258
  ```
242
259
 
243
260
  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):
@@ -251,6 +268,7 @@ Then add one entry to that profile's `cordis.patch.yml` — this is exactly what
251
268
  transport: streamable-http
252
269
  url: http://127.0.0.1:39217/mcp
253
270
  failOnStartupError: false
271
+ toolLoading: eager
254
272
  # only with DSH_SCRAPLING_MCP_TOKEN set:
255
273
  # headers:
256
274
  # Authorization: !!js '`Bearer ${process.env.DSH_SCRAPLING_MCP_TOKEN}`'
@@ -262,7 +280,7 @@ Then add one entry to that profile's `cordis.patch.yml` — this is exactly what
262
280
 
263
281
  ### <img src="https://api.iconify.design/lucide/wrench.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> `setup --mode` and `doctor`
264
282
 
265
- `setup --mode` writes that entry text; it never edits a profile. Without `--apply` it is a dry run, and with `--apply` it drops the text in `<dataDir>/mcp/<mode>.patch.yml` and prints the path - applying it to `cordis.patch.yml` stays your action, because the host offers no safe append API for that file (`dsh --dump-config` rewrites the profile's root config).
283
+ `setup --mode` writes that entry text; it never edits a profile. Without `--apply` it is a dry run, and with `--apply` it drops the text in `<dataDir>/mcp/<mode>.patch.yml` and prints the path - applying it to `cordis.patch.yml` stays your action, because the host offers no safe append API for that file (`dsh --dump-config` rewrites the profile's root config). Pass `--profile <profileDir>` to derive `toolLoading` from that profile's `mcpToolLoading`; without it, setup uses the backward-compatible `eager` default rather than introducing a second command-line source of truth.
266
284
 
267
285
  ```sh
268
286
  dsh-scrapling setup --mode mcp --port 45991 --with-auth --apply
@@ -270,7 +288,7 @@ dsh-scrapling setup --mode native --apply # a file that deliberately contain
270
288
  dsh-scrapling doctor --mode mcp --profile <profileDir>
271
289
  ```
272
290
 
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.
291
+ `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.3-alpha.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.
274
292
 
275
293
  `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
294
 
@@ -282,10 +300,10 @@ Settings live on the **scrapling** card in the plugin detail page, grouped by pu
282
300
  | --- | --- | --- | --- |
283
301
  | `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) |
284
302
  | `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 |
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` |
303
+ | `fetchEnabled` / `extractEnabled` / `locateEnabled` / `linksEnabled` / `renderEnabled` / `captureXhrEnabled` / `networkEnabled` / `sessionEnabled` / `sessionStateEnabled` / `crawlEnabled` / `answerEnabled` / `sessionReadEnabled` / `sessionActionsEnabled` / `downloadEnabled` / `documentsEnabled` / `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` |
286
304
  | `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 |
287
305
  | `mainContentOnly` | boolean | `true` | Extraction scope |
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 |
306
+ | `*MaxOutputChars` | natural | fetch / extract / render / document `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 |
289
307
  | `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 |
290
308
  | `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) |
291
309
  | `headless` / `networkIdle` | boolean | `true` / `false` | Browser mode and whether a page must reach network idle before it is read |
@@ -295,7 +313,9 @@ Settings live on the **scrapling** card in the plugin detail page, grouped by pu
295
313
  | `sidecarHandshakeTimeoutMs` / `fetchTimeoutMs` / `sidecarGraceMs` | natural | `30000` / `120000` / `5000` | Handshake budget, per-call cooperative timeout (declared on the tools' `timeoutMs`), and how long the client waits for the process to exit before forcing it down. `scrapling_crawl` passes no timeout — a crawl is measured in minutes |
296
314
  | `dataDir` | string | `""` | Sidecar working directory (the `adaptive` fingerprint database lands here); empty = `~/.dsh-scrapling`. If it cannot be created, `failFastOnMissingPython` decides whether the plugin refuses to load or degrades to no tools |
297
315
  | `provideWebFetch` / `provideWebSearch` | boolean | `true` | Whether the `ctx.web` providers are registered at all — see [Replacing the built-in fetch and search](#replacing-the-built-in-fetch-and-search) |
298
- | `searchBackend` / `tavilyApiKey` | enum / secret | `auto` / `""` | Discovery backend (`auto` / `tavily` / `bing` / `brave` / `serper` / `duckduckgo` / `searxng`) and the Tavily key. `auto` uses Tavily when a key is set, SearXNG when `searxngEndpoint` is set, and only falls back to public engines when `searchPublicFallback` is on (otherwise it reports `SEARCH_BACKEND_MISSING`); a backend selected without its own key (or instance) reports `SEARCH_AUTH` |
316
+ | `webFetchStrategy` | enum | `auto` | `static` always reads statically; `auto` reads statically first and renders only when the body is under 200 characters; `browser` renders directly. Without a browser, `auto` stays static. Network and protocol failures do not trigger rendering |
317
+ | `searchMaxOutputBytes` | number | `24000` | UTF-8 byte cap across all body sections returned by one search; raising it increases context and token cost |
318
+ | `searchBackend` / `tavilyApiKey` | enum / secret | `auto` / `""` | Discovery backend (`auto` / `tavily` / `bing` / `brave` / `serper` / `duckduckgo` / `searxng` / `deepseek`) and the Tavily key. `deepseek` uses optional Host `ctx.deepseekAuth`; other backends keep their own credentials. `auto` retains Tavily → SearXNG → explicitly allowed public fallback |
299
319
  | `searchPublicFallback` | boolean | `false` | Lets `auto` fall back to the public Bing engine when neither a key nor SearXNG is configured — `py/search.py` resolves `auto` in the order `tavily` → `searxng` → `bing`. DuckDuckGo is not reachable through `auto` at all; name `searchBackend=duckduckgo` to use it. Off by default on purpose: turning it on sends query strings to a third-party public engine |
300
320
  | `braveApiKey` / `serperApiKey` | secret | `""` | Keys for the Brave Search and Serper.dev backends |
301
321
  | `searxngEndpoint` | string | `""` | Base URL of a SearXNG instance (`…/search?format=json` is appended); empty means the backend is unusable and reports `SEARCH_AUTH` |
@@ -312,7 +332,9 @@ Settings live on the **scrapling** card in the plugin detail page, grouped by pu
312
332
  | --- | --- | --- |
313
333
  | `requestTimeoutSeconds` / `maxUrlLength` | `120` / `2048` | Python-side per-request ceiling; URL length cap aligned with the built-in fetch |
314
334
  | `allowWriteMethods` | `false` | Whether the model may change state on a remote host at all — see [Security](#security) |
335
+ | `mcpToolLoading` | `eager` | `eager` registers MCP tools directly; `on-demand` keeps them out of each agent's tool list until `mcp__scrapling__load_tools` loads them. Passed to dynamic registration and manual entries as `toolLoading`; restart required, and manual entries must be regenerated with `setup --mode --profile` |
315
336
  | `browserExecutablePath` / `browserInitScript` | `""` | Strong capabilities: they hand Chromium a file to execute, or inject a JS file into every page. Deployment config only, unreachable from model input |
337
+ | `browserCdpUrl` | `""` | CDP endpoint for `sessionType=remote`; accepts ws/wss/http/https. Empty hides remote sessions. Deployment-only and never included in tool schemas or logs |
316
338
  | `browserRealChrome` / `browserDnsOverHttps` | `false` | Use the locally installed Google Chrome; route the browser's DNS over HTTPS (useful with a proxy to avoid DNS leaks) |
317
339
  | `recordRequests` / `maxRecordedRequests` | `false` / `100` | Whether browser sessions record network history by default (the model can turn it on per session with `recordNetwork`), and how many entries a session keeps |
318
340
  | `sessionStateDir` | `""` | Directory for Playwright-compatible login-state files. The model can only pass a **plain file name**, so the directory stays a deployment decision; empty disables the state save / load pair |
@@ -322,9 +344,11 @@ Settings live on the **scrapling** card in the plugin detail page, grouped by pu
322
344
  | `crawlRespectRobots` | `false` | Obey robots.txt; with it on, a domain whose robots.txt fetch **fails** (network error or HTTP 5xx) is blocked rather than assumed permitted, while a **missing** robots.txt (HTTP 404, the common case) is treated as allowing everything |
323
345
  | `crawlDownloadDelayMs` / `crawlConcurrentRequests` / `crawlAutothrottle` / `crawlStrategy` | `0` / `4` / `false` / `bfs` | Gap between requests, parallelism, adaptive throttling, breadth- or depth-first order |
324
346
  | `crawlCheckpointDir` | `""` | Persist the crawl queue so a restarted crawl resumes instead of going back to the start URL |
325
- | `tavilyApiEndpoint` / `bingEndpoint` / `searchRenderTopN` | `https://api.tavily.com/search` / `https://www.bing.com/search` / `3` | Discovery endpoints (overridable for tests or proxies), and how many results are actually fetched and rendered (`0` = link list only) |
347
+ | `tavilyApiEndpoint` / `bingEndpoint` / `searchRenderTopN` | `https://api.tavily.com/search` / `https://www.bing.com/search` / `3` | Discovery endpoints (overridable for tests or proxies), and how many results are actually read according to `webFetchStrategy` (`0` = link list only) |
326
348
  | `duckduckgoEndpoint` | `https://html.duckduckgo.com/html/` | DuckDuckGo HTML endpoint; override for a mirror or a test stub |
327
- | `allowBrowserActions` / `allowFileDownloads` / `downloadMaxBytes` | `false` / `false` / `10485760` | Deployment-only gates for structured actions and downloads, plus the per-download byte cap. Both gates default off and also hide their tools from the model |
349
+ | `deepseekSearchEndpoint` | `https://api.deepseek.com/v1/tools/search` | DeepSeek direct Search API endpoint. HTTPS only, no embedded credentials; changing it requires restart |
350
+ | `allowBrowserActions` / `allowFileDownloads` / `downloadMaxBytes` | `false` / `false` / `10485760` | Deployment-only gates for structured actions and persistent downloads, plus the per-download byte cap. Both gates default off and also hide their tools from the model |
351
+ | `documentMaxBytes` / `documentMaxPages` | `20971520` / `200` | Hard ceilings for PDF reads. Model arguments may only lower them; PDF bytes stream to a temporary file that is deleted on every path |
328
352
 
329
353
  ## <img src="https://api.iconify.design/lucide/network.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> Proxies
330
354
 
@@ -375,7 +399,7 @@ Details worth knowing:
375
399
  | Aspect | Content |
376
400
  | --- | --- |
377
401
  | On disk | Under the sidecar working directory (`dataDir`, default `~/.dsh-scrapling`): Scrapling's `adaptive` fingerprint database when `adaptiveStorage: sqlite` (the default), `scrapling_download`'s output in `downloads/`, the managed Python and Chromium installed by `setup --feature … --apply` (`runtime/`), and the MCP entry written by `setup --mode … --apply` (`mcp/<mode>.patch.yml`). With `adaptiveStorage: redis` the fingerprints are not written under `dataDir` at all — they go to the Redis at `redisUrl`, keyed `<prefix>:<registrable-domain>:<sha256(identifier)>`; that URL defaults to loopback, and pointing it at another machine hands this data to that machine. The crawl queue lands only when `crawlCheckpointDir` is set (the upstream `Collector(crawldir=…)` writes it); an empty value writes nothing. Login-state files go under `sessionStateDir` when it is configured. Screenshots are handed to the host attachment service, which decides where they live. Settings values live in the host settings document |
378
- | Network | Fetches go to the URLs the model supplies, through the configured proxy if any. Search queries go from the Python sidecar to the single backend `searchBackend` selects — Tavily (`api.tavily.com`, key in the request body), Bing (`www.bing.com`, no key), Brave (`api.search.brave.com`, `X-Subscription-Token`), Serper (`google.serper.dev`, `X-API-KEY`), DuckDuckGo (`html.duckduckgo.com`, no key) or the SearXNG instance at `searxngEndpoint`. A backend receives only its own credential (`tavilyApiKey` / `braveApiKey` / `serperApiKey`) plus the query string; keys are never logged. Turning on `searchPublicFallback` lets `auto` send queries to a public engine with no credential at all. `scrapling_answer` sends the fetched page text and the question through the host `llm` service — that content leaves the machine when the routed model is remote |
402
+ | Network | Fetches go to the URLs the model supplies, through the configured proxy if any. Search queries go to the single backend `searchBackend` selects — Tavily (`api.tavily.com`, key in the request body), Bing (`www.bing.com`, no key), Brave (`api.search.brave.com`, `X-Subscription-Token`), Serper (`google.serper.dev`, `X-API-KEY`), DuckDuckGo (`html.duckduckgo.com`, no key), the SearXNG instance at `searxngEndpoint`, or DeepSeek's direct Search API at `deepseekSearchEndpoint`. The first six run in the Python sidecar; DeepSeek runs in Host through optional `ctx.deepseekAuth`. A backend receives only its own credential plus the query string; keys are never logged. Turning on `searchPublicFallback` lets `auto` send queries to a public engine with no credential at all. `scrapling_answer` sends the fetched page text and the question through the host `llm` service — that content leaves the machine when the routed model is remote |
379
403
  | Logs | The chosen interpreter, the probed capabilities, and the proxy summary (`scheme://host:port` plus which rung answered — never credentials) |
380
404
  | In memory | Sessions, cookies and recorded network history live in the sidecar process and disappear with it |
381
405
  | Telemetry | None |