deepseek-web-retrieval 0.7.0 → 0.8.0

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.
@@ -0,0 +1,109 @@
1
+ # Configuration guide
2
+
3
+ The one reference for how every knob resolves on every host: the layering
4
+ chain, the shared config file, the full knob vocabulary, and which layer to set.
5
+ Behavior (what search and fetch do) lives in the README's
6
+ [General behavior](../README.md#general-behavior); per-host mechanics (output
7
+ caps, deadlines, how the environment reaches a stdio server) live in the host
8
+ guides: [Codex](agents/codex.md), [Claude Code](agents/claude-code.md),
9
+ [Pi](agents/pi.md),
10
+ [OpenCode](agents/opencode-v2.md).
11
+
12
+ ## The resolution chain
13
+
14
+ Every knob resolves through one chain, low → high, identically on every host:
15
+
16
+ ```
17
+ built-in defaults < shared config file < DEEPSEEK_* environment < host-native config
18
+ ```
19
+
20
+ A higher layer always wins, so nothing already configured loses effect. The
21
+ host-native layer means OpenCode's plugin options (`opencode.jsonc`), Pi's
22
+ `deepseekWebRetrieval` settings namespace, and — for MCP hosts — the per-server
23
+ `env` block in the host's registration (that block is how an environment
24
+ variable arrives, not a fifth layer).
25
+
26
+ ## The shared config file
27
+
28
+ `$XDG_CONFIG_HOME/deepseek-web-retrieval/config.json` when `XDG_CONFIG_HOME` is
29
+ set (this wins on every platform, Windows included); otherwise
30
+ `~/.config/deepseek-web-retrieval/config.json` on Linux and macOS and
31
+ `%APPDATA%\deepseek-web-retrieval\config.json` on Windows. camelCase keys:
32
+
33
+ ```json
34
+ {
35
+ "count": 20,
36
+ "blockedDomains": ["pinterest.com"],
37
+ "language": "zh",
38
+ "searchLocalization": "203.0.113.7"
39
+ }
40
+ ```
41
+
42
+ Unknown keys and host-integration keys (below) draw a one-line stderr warning
43
+ and are otherwise ignored — a bad file never blocks startup. The API key never
44
+ goes in the file; it keeps its existing channels (`DEEPSEEK_API_KEY` in the
45
+ environment, or OpenCode's stored credential).
46
+
47
+ ## Knob classes
48
+
49
+ | Knob class | Shared file | Examples |
50
+ | --- | --- | --- |
51
+ | API behavior — the user↔DeepSeek relationship | yes — that is the point of the file | `count`, `blockedDomains`, `language`, `maxRetries` |
52
+ | Host-sensitive — interacts with host output caps and deadlines | carries the safe defaults; a host layer is the recommended override point | `searchTimeoutMs`, `fetchTimeoutMs`, `fetchMaxChars`, `maxSummaryChars` |
53
+ | Host integration — the host's tool landscape | rejected — warned about and ignored | `searchEnabled`, `setDefaultWebsearch`, `apiKeySource` |
54
+
55
+ Keep host-independent intent in the shared file; prefer a host layer when a
56
+ host-sensitive knob would cross its host's cap or deadline.
57
+
58
+ ## The knob vocabulary
59
+
60
+ One knob, two names: the camelCase key for the shared file and OpenCode's
61
+ options, the `DEEPSEEK_*` variable for the environment. The table generates
62
+ from the same config vocabulary the adapters resolve through, so it cannot
63
+ drift from the code (`bun run docs:matrix` regenerates it; CI checks it).
64
+
65
+ <!-- generated: knob-table — edit src/core/config-summary.ts or env.ts, then run `bun run docs:matrix` -->
66
+
67
+ | File / OpenCode key | Environment | Default |
68
+ | --- | --- | --- |
69
+ | `count` | `DEEPSEEK_SEARCH_COUNT` | 10 |
70
+ | `maxResults` | `DEEPSEEK_SEARCH_MAX_RESULTS` | follows `count` (10) |
71
+ | `minRerank` | `DEEPSEEK_SEARCH_MIN_RERANK` | 0 |
72
+ | `minAuthority` | `DEEPSEEK_SEARCH_MIN_AUTHORITY` | 0 |
73
+ | `allowUnknownAuthority` | `DEEPSEEK_SEARCH_ALLOW_UNKNOWN_AUTHORITY` | true |
74
+ | `blockedDomains` | `DEEPSEEK_SEARCH_BLOCKED_DOMAINS` | unset |
75
+ | `includeDomains` | `DEEPSEEK_SEARCH_INCLUDE_DOMAINS` | unset |
76
+ | `language` | `DEEPSEEK_SEARCH_LANGUAGE` | unset |
77
+ | `searchLocalization` | `DEEPSEEK_SEARCH_LOCALIZATION` | unset |
78
+ | `maxSummaryChars` | `DEEPSEEK_SEARCH_MAX_SUMMARY_CHARS` | 1200 |
79
+ | `searchTimeoutMs` | `DEEPSEEK_SEARCH_TIMEOUT_MS` | 30000 |
80
+ | `fetchMaxChars` | `DEEPSEEK_FETCH_MAX_CHARS` | 16000 |
81
+ | `fetchAllowedDomains` | `DEEPSEEK_FETCH_ALLOWED_DOMAINS` | unset |
82
+ | `fetchBlockedDomains` | `DEEPSEEK_FETCH_BLOCKED_DOMAINS` | unset |
83
+ | `fetchTimeoutMs` | `DEEPSEEK_FETCH_TIMEOUT_MS` | 30000 |
84
+ | `fetchBlockPrivateHosts` | `DEEPSEEK_FETCH_BLOCK_PRIVATE_HOSTS` | true |
85
+ | `maxRetries` | `DEEPSEEK_MAX_RETRIES` | 2 |
86
+ | `retryBaseDelayMs` | `DEEPSEEK_RETRY_BASE_DELAY_MS` | 250 |
87
+
88
+ <!-- /generated: knob-table -->
89
+
90
+ ## Special semantics
91
+
92
+ - **`maxResults` follows `count`** when left unset — configure only `count` and
93
+ the cap moves with it. An explicit `maxResults` still caps; `count` never
94
+ follows `maxResults`.
95
+ - **Some switches are false-only.** `allowUnknownAuthority`,
96
+ `fetchBlockPrivateHosts`, `searchEnabled`, and `fetchEnabled` are on by
97
+ default; the environment can only turn them off (`false`, `0`, `no`, or
98
+ `off`). The last two have no file key — they are host-integration keys — so
99
+ they exist only as `DEEPSEEK_ENABLE_SEARCH` and `DEEPSEEK_ENABLE_FETCH`. A
100
+ value like `=true` changes nothing.
101
+ - **Invalid environment values are dropped** at startup and the default
102
+ applies. `npx deepseek-web-retrieval config` reports every dropped or
103
+ unknown `DEEPSEEK_*` variable as a warning and exits 1, alongside file
104
+ problems.
105
+ - **`searchLocalization` must be a valid IPv4 or IPv6 address**; anything else
106
+ is dropped at option resolution. It is deployment-level configuration, never
107
+ a per-call tool parameter.
108
+ - **Domains** in the environment are comma-separated; entries that are not
109
+ domains are dropped (and reported by `config`).
@@ -1,13 +1,13 @@
1
1
  # Installer design
2
2
 
3
3
  Design note for the install-time flow, shipped as the `deepseek-web-retrieval init`,
4
- `uninstall`, and `list` subcommands for **OpenCode, Pi, and Codex**. It records how the
5
- [control tiers](../research/control-matrix.md) map to the artifacts the installer emits, so
6
- the design survives between conversations. Research backing lives in
4
+ `uninstall`, and `list` subcommands for **OpenCode, Pi, Codex, and Claude Code**. It records how the
5
+ [control tiers](../research/control-matrix.md) map to the artifacts the installer emits, so the design
6
+ survives between conversations. Research backing lives in
7
7
  [control-matrix.md](../research/control-matrix.md); host facts in [hosts.jsonc](../hosts.jsonc).
8
8
  Remaining hosts get host modules here as their guides ship.
9
9
  Examples involving other hosts describe design requirements for future modules;
10
- the current CLI accepts only the three shipped hosts above.
10
+ the current CLI accepts only the four shipped hosts above.
11
11
 
12
12
  ## Principles
13
13
 
@@ -44,9 +44,9 @@ already exists, and the installer uses three phases:
44
44
  Report the conflict surface: existing rules steering toward another web tool; other
45
45
  web-capable MCP servers already on the field; array-valued keys the plan must merge
46
46
  into rather than replace (`disabledTools`, `permissions.deny`, permissions
47
- `exclude`, `disabled_tools`); and higher layers (Claude Code managed policy, Devin
48
- enterprise team settings) that would outrank what the
49
- installer writes.
47
+ `exclude`, `disabled_tools`); and higher layers (Claude Code managed policy — its
48
+ existence is checked by the claude-code module; Devin enterprise team settings) that
49
+ would outrank what the installer writes.
50
50
  2. **Merge or snapshot.** Array keys merge with existing entries, recording exactly
51
51
  which entries the installer appended; single-value keys (`websearch.provider`, Pi's
52
52
  `exposure`) snapshot the prior value before overwriting; files the installer creates
@@ -71,7 +71,9 @@ already exists, and the installer uses three phases:
71
71
  competitor, not third-party web MCP servers — those must be excluded too (the
72
72
  per-host keys cover them), or routing is not actually forced. Concretely: Pi's
73
73
  per-server `enabled` key lets the plan disable detected web-capable competitors
74
- (each prior value snapshotted for uninstall); Codex has no per-server kill switch,
74
+ (each prior value snapshotted for uninstall); Claude Code excludes them the same way
75
+ via server-level `mcp__<server>` deny rules appended to `permissions.deny`; Codex has
76
+ no per-server kill switch,
75
77
  so a detected web-capable competitor makes the plan refuse the tier instead of
76
78
  promising non-exclusive routing; OpenCode's forced is replacement, which no
77
79
  third-party server overrides. Detection classifies a server web-capable from its
@@ -156,9 +158,9 @@ the artifacts below name the path where they differ.
156
158
  | Optional | Host config registering the integration: Pi's extension path appends an `npm:<package>` source to `packages` in settings.json; the MCP paths register the server (Pi's MCP entry needs `"exposure": "direct"`; the extension path needs nothing — extension tools are `direct` by Pi's own default) |
157
159
  | Preferred | The above plus a rules file for the host (file names per host in the [per-host reference](../research/control-matrix.md#per-host-reference)); the rules name the path's tool ids (`deepseek_web_search` for the extension, `mcp__deepseek__deepseek_web_search` for MCP) |
158
160
  | Forced (replacement) | OpenCode plugin options (`setDefaultWebsearch` / `fetchOverrideWebfetch`) |
159
- | Forced (exclusion) | The built-in competitor's kill switch (per-host keys in the per-host reference), plus the exclusion of any other web-capable MCP servers the detect phase found — Pi sets their `enabled` key to `false`; Codex, lacking a per-server kill switch, refuses the tier instead; Pi's extension path additionally refuses when a web-capable `packages`/`extensions` source is listed in settings.json (no per-package kill switch exists) |
161
+ | Forced (exclusion) | The built-in competitor's kill switch (per-host keys in the per-host reference), plus the exclusion of any other web-capable MCP servers the detect phase found — Pi sets their `enabled` key to `false`; Claude Code appends server-level `mcp__<server>` deny rules to `permissions.deny` (merging with the user's own entries); Codex, lacking a per-server kill switch, refuses the tier instead; Pi's extension path additionally refuses when a web-capable `packages`/`extensions` source is listed in settings.json (no per-package kill switch exists) |
160
162
  | Forced (de-facto) | Nothing beyond the Optional artifacts — no competitor exists |
161
- | Off | Codex writes the capability's raw tool name into the server entry's `disabled_tools` (host-native: the tool leaves the model's context; the user's own entries in that array are kept); the other MCP entry writes the capability's false-only server-side switch instead (`DEEPSEEK_ENABLE_SEARCH` / `DEEPSEEK_ENABLE_FETCH`); Pi's extension path writes the same switches into the `deepseekWebRetrieval` settings namespace the extension reads at load; both capabilities off refuses to install |
163
+ | Off | Codex writes the capability's raw tool name into the server entry's `disabled_tools` (host-native: the tool leaves the model's context; the user's own entries in that array are kept); Claude Code appends the capability's full tool id (`mcp__deepseek__*`) to `permissions.deny`, the same host-native removal; the other MCP entry writes the capability's false-only server-side switch instead (`DEEPSEEK_ENABLE_SEARCH` / `DEEPSEEK_ENABLE_FETCH`); Pi's extension path writes the same switches into the `deepseekWebRetrieval` settings namespace the extension reads at load; both capabilities off refuses to install |
162
164
 
163
165
  OpenCode additionally appends `permissions` allow entries for exactly the tools it
164
166
  registers (`websearch`, `deepseek_fetch`, and `webfetch` when fetch is forced), merged
@@ -194,8 +196,9 @@ into any existing `permissions` array rather than replacing it.
194
196
  reverts cannot re-enable a still-excluded competitor.
195
197
  - Verify is file-level: after apply it re-reads each written file and asserts every op
196
198
  holds (set values in place, appended entries present, rules block present). Higher
197
- layers would be a plan-time detect concern, and none of the three shipped hosts
198
- documents a layer above user config, so there is nothing to check there yet.
199
+ layers are a plan-time detect concern; Claude Code documents one (managed policy), and
200
+ the claude-code module reports an existing managed-settings.json instead of failing
201
+ silently. The other shipped hosts document no layer above user config.
199
202
  - Only a bare `--apply` enables writes; assigning a value such as `--apply=false`
200
203
  is a usage error and writes nothing.
201
204
  - `--pin` is opt-in version pinning: the ref written into host config gets the
@@ -224,7 +227,7 @@ host-side tool filtering.
224
227
 
225
228
  ## Hosts without an installer story
226
229
 
227
- Claude Code, Cursor, Devin, GitHub Copilot, and Cline still have no
230
+ Cursor, Devin, GitHub Copilot, and Cline still have no
228
231
  host module; their artifacts (from the tier-to-artifact mapping) remain hand-edited
229
232
  config until a module lands here. OpenCode's `opencode plugin add` remains available but
230
233
  cannot pass options or manage snapshots; `init` supersedes it for tiered installs.
package/docs/hosts.jsonc CHANGED
@@ -102,11 +102,15 @@
102
102
  "nativeSearchProvider": false,
103
103
  "nativeFetchOverride": false,
104
104
  "paths": ["mcp"],
105
- "status": "no-adapter-yet",
105
+ "status": "supported",
106
106
  "control": {
107
107
  "search": { "optional": "yes", "preferred": "yes", "forced": "exclusion", "key": "`permissions.deny: [\"WebSearch\"]` removes the tool from context" },
108
108
  "fetch": { "optional": "yes", "preferred": "yes", "forced": "exclusion", "key": "`permissions.deny: [\"WebFetch\"]`, or `CLAUDE_CODE_DISABLE_WEB_FETCH=1`" }
109
109
  },
110
+ "adapter": "src/mcp",
111
+ "installer": "src/installer/hosts/claude-code",
112
+ "guide": "docs/agents/claude-code.md",
113
+ "e2eScenario": "claude-code"
110
114
  },
111
115
  {
112
116
  "name": "cursor",
@@ -17,7 +17,7 @@ ship built-in web tools. MCP tools can add equivalent tools, but do not replace
17
17
  | Native tool / fetch override | No | Yes | Host tool API | OpenCode v2 adapter |
18
18
  | Custom tool plugin | Yes | Yes | Host plugin API | Cline CLI/SDK; no adapter yet |
19
19
  | Extension API | Yes | Yes | Host extension API | Pi adapter (`src/pi/`) |
20
- | MCP server | Yes | Yes | Host MCP client | Shipped (`src/mcp/`; Pi and Codex guides) |
20
+ | MCP server | Yes | Yes | Host MCP client | Shipped (`src/mcp/`; Pi, Codex, and Claude Code guides) |
21
21
  | CLI/HTTP wrapper | Yes | Yes | Host can call external tools | Not shipped |
22
22
 
23
23
  MCP is a protocol, not an agent. It is one possible transport for hosts that support MCP
@@ -35,7 +35,7 @@ Rows are sorted with open-source hosts first, then by host name alphabetically.
35
35
  | Codex | 0.163.0 | Yes (Apache-2.0) | No | No | MCP server | Supported |
36
36
  | OpenCode | 2.0.32 | Yes (MIT) | Yes | Yes | native websearch provider or native tool/fetch override | Supported |
37
37
  | Pi | 1.3.0 | Yes (MIT) | No | No | extension API or MCP server | Supported |
38
- | Claude Code | 2.1.303 | No | No | No | MCP server | No adapter yet |
38
+ | Claude Code | 2.1.303 | No | No | No | MCP server | Supported |
39
39
  | Cursor | 2026.10.08 | No | No | No | MCP server | No adapter yet |
40
40
  | Devin | 3000.11.92 | No | No | No | MCP server | No adapter yet |
41
41
  | GitHub Copilot | 1.0.98 | No | No | No | MCP server | No adapter yet |
@@ -48,7 +48,7 @@ Codex are Apache-2.0; OpenCode and Pi are MIT. Claude Code and
48
48
  Cursor are proprietary. GitHub Copilot CLI and Devin CLI publish installers and docs, not
49
49
  source code, under proprietary terms.
50
50
 
51
- OpenCode, Pi, and Codex have supported setup guides and installer host modules. The
51
+ OpenCode, Pi, Codex, and Claude Code have supported setup guides and installer host modules. The
52
52
  MCP server in `src/mcp/` provides a possible stdio path for the remaining hosts, but
53
53
  protocol compatibility alone does not establish a tested host setup. For those rows,
54
54
  `No adapter yet` means no supported host-specific adapter or setup guide is shipped.
@@ -66,8 +66,10 @@ the details: built-in web tools and their kill switches, MCP registration, and r
66
66
  - **OpenCode v2** — Uses OpenCode's native plugin API and
67
67
  exposes both a websearch provider and a fetch tool/override. See
68
68
  [OpenCode v2](agents/opencode-v2.md).
69
- - **Claude Code** — Ships built-in `WebSearch` and `WebFetch` tools. See
70
- [Claude Code](research/control-matrix.md#claude-code).
69
+ - **Claude Code** — Ships built-in `WebSearch` and `WebFetch` tools. Supported through
70
+ the MCP server; see
71
+ [Claude Code](agents/claude-code.md) and
72
+ [Claude Code in the per-host reference](research/control-matrix.md#claude-code).
71
73
  - **Codex** — Ships a built-in `web_search` tool. Supported through the MCP server; see
72
74
  [Codex](agents/codex.md) and [Codex in the per-host reference](research/control-matrix.md#codex).
73
75
  - **Cursor** — Uses the same `mcp.json` servers as the editor; ships built-in web search
@@ -119,7 +121,8 @@ Code importing the core's removed `formatFetchContent` helper must migrate to
119
121
  ## Available paths and future hosts
120
122
 
121
123
  - **MCP server** — shipped in `src/mcp/` (the fallback path in the [Pi](agents/pi.md) guide
122
- and the path in the [Codex](agents/codex.md) guide); the broadest route for hosts that
124
+ and the path in the [Codex](agents/codex.md) and
125
+ [Claude Code](agents/claude-code.md) guides); the broadest route for hosts that
123
126
  support MCP tools. Protocol compatibility across these hosts is researched in
124
127
  [mcp-compatibility.md](research/mcp-compatibility.md).
125
128
  - **Native extension adapters** — the Pi extension adapter ships in `src/pi/`; a host whose
@@ -71,8 +71,9 @@ Reading notes:
71
71
  One section per host, in hosts.jsonc order. Each carries what an install needs beyond the
72
72
  matrix: the built-in competitors, their kill switches, how the MCP server is registered,
73
73
  and which rules files steer preference. The `init` CLI implements these tiers for
74
- OpenCode, Pi, and Codex (see [installer design](../design/installer-design.md)). Config
75
- paths imply the available scopes; keys locked to a single scope are enumerated in the
74
+ OpenCode, Pi, Codex, and Claude Code (see
75
+ [installer design](../design/installer-design.md)). Config paths imply the available
76
+ scopes; keys locked to a single scope are enumerated in the
76
77
  [installer design](../design/installer-design.md#scope).
77
78
 
78
79
  ### Cline
@@ -209,15 +210,31 @@ paths imply the available scopes; keys locked to a single scope are enumerated i
209
210
  - **Built-in web tools** — `WebSearch` and `WebFetch`. Kill switch: bare deny rules —
210
211
  `"permissions": {"deny": ["WebSearch", "WebFetch"]}` — remove the tools from the model's
211
212
  context entirely; deny outranks allow at every settings level and cannot be carved out.
212
- `--disallowedTools` is the flag form. `CLAUDE_CODE_DISABLE_WEB_FETCH=1` (2.1.285+) kills
213
- WebFetch only; there is no env equivalent for WebSearch
213
+ Permission rules live in the settings file of each level: managed
214
+ `managed-settings.json` (Linux `/etc/claude-code/`, macOS
215
+ `/Library/Application Support/ClaudeCode/`, Windows
216
+ `C:\Program Files\ClaudeCode\` — the legacy `C:\ProgramData\ClaudeCode\` path
217
+ is not read) →
218
+ user `~/.claude/settings.json` → project `.claude/settings.json` → local
219
+ `.claude/settings.local.json`; the installer writes the chosen scope's settings file
220
+ and reports an existing managed layer. A bare `mcp__<server>` rule denies every tool
221
+ of one MCP server — the per-server kill switch the installer uses for web-capable
222
+ competitors under the forced tier. `--disallowedTools` is the flag form.
223
+ `CLAUDE_CODE_DISABLE_WEB_FETCH=1` (2.1.285+) kills WebFetch only; there is no env
224
+ equivalent for WebSearch
214
225
  ([tools](https://code.claude.com/docs/en/tools),
215
- [permissions](https://code.claude.com/docs/en/permissions)).
216
- - **MCP registration** — `.mcp.json` (`mcpServers` with `command`/`args`/`env`, or
217
- `type: "http"` + `url`); `${VAR}` expansion in `command`/`args`/`env`/`url`/`headers`.
218
- Tool permission rules use `mcp__<server>__<tool>`. Tool descriptions are capped at 4,096
226
+ [permissions](https://code.claude.com/docs/en/permissions),
227
+ [settings](https://code.claude.com/docs/en/settings)).
228
+ - **MCP registration** — three scopes across two files: project `.mcp.json` at the
229
+ project root (team-shared, first-use approval prompt per project), local scope under
230
+ the project's entry in `~/.claude.json` (private, the `claude mcp add` default), and
231
+ user scope at the top-level `mcpServers` key of `~/.claude.json` (`--scope user`).
232
+ Entries take `mcpServers` with `command`/`args`/`env`, or `type: "http"` + `url`;
233
+ `${VAR}` expansion in `command`/`args`/`env`/`url`/`headers`. Tool permission rules
234
+ use `mcp__<server>__<tool>`. Tool descriptions are capped at 4,096
219
235
  chars (2.1.296+) and tool output at 25k tokens by default (`MAX_MCP_OUTPUT_TOKENS`),
220
- with oversized text saved to a file; 16 MiB message cap on HTTP transports.
236
+ with oversized text saved to a file; 16 MiB message cap on HTTP transports
237
+ ([MCP quickstart](https://code.claude.com/docs/en/mcp-quickstart)).
221
238
  - **Rules** — `CLAUDE.md` hierarchy (managed → user `~/.claude/CLAUDE.md` → project →
222
239
  `CLAUDE.local.md`) with `@import`; `AGENTS.md` is read instead only when no CLAUDE.md
223
240
  exists anywhere above the cwd (since 2.1.277)
@@ -303,3 +320,11 @@ paths imply the available scopes; keys locked to a single scope are enumerated i
303
320
  `toolPolicies`). Codex's docs location and Copilot's `GEMINI.md` dating were re-verified
304
321
  2026-10-21 and are settled in their sections above. Protocol-revision evidence for every
305
322
  host lives in [mcp-compatibility.md](mcp-compatibility.md).
323
+ - **Claude Code forward-compat anchors (checked at the 2.1.303 lock):** the headless docs
324
+ pre-announce `--bare` becoming the default for `-p`, and bare mode never reads
325
+ `.mcp.json` — the billed e2e scenario and the project-scope install story both need
326
+ re-checking when that lands. `${VAR}` expansion in the `env` block of a user-scope
327
+ `~/.claude.json` entry is supported but only indirectly documented (the docs spell out
328
+ `.mcp.json` and `command`/`args`; the e2e's `hasCompletedOnboarding` flag and the
329
+ redundant `enableAllProjectMcpServers` belt-and-suspenders are undocumented), so a
330
+ baseline bump should re-verify all three against the then-current docs.
@@ -82,7 +82,7 @@ host facts; each row below was verified against that lock on the research baseli
82
82
  | Cline | `2024-11-05` | stdio, Streamable HTTP, SSE | Custom client (no official SDK); `protocolVersion "2024-11-05"` extracted from the platform binary; source repo not public |
83
83
  | Codex | `2025-06-18`; `mcp_2026_07_28` feature flag opts into `2026-07-28` | stdio, Streamable HTTP (no SSE) | Git tag `rust-v0.163.0`: rmcp 3.5.1 pinned; initialize sends `V_2025_06_18` |
84
84
  | Pi | `2025-11-25` | stdio, Streamable HTTP (SSE rejected) | Git tag: own `@earendil-works/pi-mcp` client, `LATEST_PROTOCOL_VERSION "2025-11-25"` |
85
- | Claude Code | `2026-07-28` by default (`MCP_PROTOCOL_NEGOTIATION=legacy` opt-out) | stdio, Streamable HTTP, SSE, ws | Changelog 2.1.296+: "negotiate MCP protocol version 2026-07-28 by default"; docs: TS SDK 2.0 runtime |
85
+ | Claude Code | `2026-07-28` by default (`MCP_PROTOCOL_NEGOTIATION=legacy` opt-out) | stdio, Streamable HTTP, SSE, ws | Docs: the v2 runtime (TS SDK 2.0) defaults from 2.1.274+ without flag fetching and "asks stdio servers for that revision by default"; changelog 2.1.299 extended the default to cloud session and Remote Control connectors |
86
86
  | Cursor | Unpinnable from primary sources (docs show ≥ `2025-06-18` features) | stdio, Streamable HTTP, SSE | Docs feature set only; no revision stated in docs or changelog |
87
87
  | Devin | `2026-07-28` | stdio, Streamable HTTP (SSE fallback), SSE | Changelog for the locked release itself: "Support for MCP protocol revision 2026-07-28" |
88
88
  | GitHub Copilot | `2026-07-28` | stdio (`type: "local"`), Streamable HTTP, SSE | Changelog 1.0.81: "Ship MCP 2026-07-28 support to CLI, SDK, IDE, and in-memory clients" |
@@ -128,7 +128,7 @@ differences:
128
128
  Codex and Pi reject it anyway.
129
129
  3. **Build on the official SDK v2 dual-era serving.** One build then serves the full range:
130
130
  the `2024-11-05` floor set by Cline (v2 legacy support spans `2024-10-07`–`2025-11-25`)
131
- up to the `2026-07-28` negotiators (Claude Code 2.1.296+, Devin 3000.11.92, Copilot CLI
131
+ up to the `2026-07-28` negotiators (Claude Code 2.1.274+, Devin 3000.11.92, Copilot CLI
132
132
  1.0.81+). A v1.x-built server still works today — modern clients fall back to the legacy
133
133
  handshake — but it can never offer the stateless era; v2 serves both from one entry
134
134
  point.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "deepseek-web-retrieval",
4
- "version": "0.7.0",
4
+ "version": "0.8.0",
5
5
  "description": "Token-efficient DeepSeek Search and Fetch for coding agents, starting with OpenCode v2.",
6
6
  "type": "module",
7
7
  "license": "MIT",
package/src/core/env.ts CHANGED
@@ -40,18 +40,21 @@ const FALSE_ONLY_ENV = {
40
40
  fetchEnabled: ENABLE_FETCH_ENV,
41
41
  } as const;
42
42
 
43
+ /** Every option key mapped onto its `DEEPSEEK_*` variable — the inverse view of the maps above. */
44
+ export const OPTION_ENV_BY_KEY: Readonly<Record<string, string>> = {
45
+ ...NUMBER_ENV,
46
+ ...TEXT_ENV,
47
+ ...DOMAINS_ENV,
48
+ ...FALSE_ONLY_ENV,
49
+ };
50
+
43
51
  /**
44
52
  * Every option's `DEEPSEEK_*` variable name, in map order — the names a host that
45
53
  * isolates its children from the parent environment (Codex) must forward for
46
54
  * shell-set options to reach the server. `DEEPSEEK_API_KEY` is deliberately
47
55
  * absent: it is not an option variable, and installers compose it separately.
48
56
  */
49
- export const OPTION_ENV_VARS: readonly string[] = [
50
- ...Object.values(NUMBER_ENV),
51
- ...Object.values(TEXT_ENV),
52
- ...Object.values(DOMAINS_ENV),
53
- ...Object.values(FALSE_ONLY_ENV),
54
- ];
57
+ export const OPTION_ENV_VARS: readonly string[] = Object.values(OPTION_ENV_BY_KEY);
55
58
 
56
59
  /**
57
60
  * Maps `DEEPSEEK_*` environment variables onto the shared plugin option keys and