deepseek-web-retrieval 0.4.0 → 0.5.1
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 +99 -244
- package/README.md +16 -11
- package/dist/cli.js +1366 -615
- package/docs/agents/codex.md +28 -7
- package/docs/agents/opencode-v2.md +1 -1
- package/docs/agents/pi.md +88 -86
- package/docs/design/installer-design.md +72 -9
- package/docs/hosts.jsonc +2 -2
- package/docs/integration.md +14 -9
- package/docs/research/control-matrix.md +48 -13
- package/docs/research/mcp-compatibility.md +9 -4
- package/examples/pi.settings.jsonc +17 -0
- package/index.ts +2 -2
- package/package.json +35 -4
- package/src/core/auth.ts +4 -6
- package/src/core/client.ts +65 -53
- package/src/core/constants.ts +24 -24
- package/src/core/descriptions.ts +30 -6
- package/src/core/domains.ts +56 -67
- package/src/core/env.ts +112 -0
- package/src/core/format.ts +53 -50
- package/src/core/index.ts +9 -9
- package/src/core/jsonc.ts +6 -6
- package/src/core/object.ts +4 -0
- package/src/core/options.ts +20 -25
- package/src/core/search.ts +45 -44
- package/src/core/transport.ts +109 -113
- package/src/core/types.ts +47 -47
- package/src/core/url.ts +20 -20
- package/src/installer/apply.ts +256 -81
- package/src/installer/cli.ts +135 -104
- package/src/installer/detect.ts +46 -31
- package/src/installer/formats/index.ts +26 -28
- package/src/installer/formats/json.ts +81 -77
- package/src/installer/formats/rules.ts +55 -28
- package/src/installer/formats/toml.ts +88 -81
- package/src/installer/formats/value.ts +34 -30
- package/src/installer/hosts/codex.ts +100 -54
- package/src/installer/hosts/index.ts +126 -41
- package/src/installer/hosts/opencode.ts +70 -51
- package/src/installer/hosts/pi.ts +269 -75
- package/src/installer/hosts/shared.ts +19 -14
- package/src/installer/operation-lock.ts +54 -0
- package/src/installer/ownership.ts +129 -0
- package/src/installer/paths.ts +7 -5
- package/src/installer/persistence.ts +66 -0
- package/src/installer/render.ts +29 -29
- package/src/installer/revert.ts +33 -29
- package/src/installer/rulesContent.ts +24 -13
- package/src/installer/state.ts +116 -31
- package/src/installer/types.ts +74 -56
- package/src/installer/uninstall.ts +40 -17
- package/src/mcp/auth.ts +7 -8
- package/src/mcp/cli.ts +38 -20
- package/src/mcp/client.ts +35 -0
- package/src/mcp/server.ts +68 -97
- package/src/opencode/auth.ts +24 -26
- package/src/opencode/plugin.ts +99 -87
- package/src/pi/extension.ts +164 -0
- package/src/pi/settings.ts +49 -0
- package/src/mcp/config.ts +0 -112
package/CHANGELOG.md
CHANGED
|
@@ -1,258 +1,113 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to this project are documented here.
|
|
3
|
+
All notable changes to this project are documented here, with one sentence per item.
|
|
4
|
+
|
|
5
|
+
## 0.5.1
|
|
6
|
+
|
|
7
|
+
- Publish npm packages through GitHub Actions trusted publishing and create GitHub Releases automatically from version tags.
|
|
8
|
+
- Gate releases on matching versions and changelog entries, the existing CI matrix, and installation tests of the exact release tarball.
|
|
9
|
+
- Resume interrupted releases safely by verifying published package integrity and preserving existing GitHub Releases.
|
|
10
|
+
|
|
11
|
+
## 0.5.0
|
|
12
|
+
|
|
13
|
+
- Add a native Pi extension as the default integration, with shared environment configuration and settings-based capability switches.
|
|
14
|
+
- Add Pi `--path extension|mcp` and preserve uninstall snapshots when migrating between paths.
|
|
15
|
+
- Enforce Pi forced tiers by disabling supported competitors and refusing competitors the host cannot exclude.
|
|
16
|
+
- Shape MCP results for each client, including readable text for Codex.
|
|
17
|
+
- Use Codex's `disabled_tools` for capability off tiers and report host-version drift during init.
|
|
18
|
+
- Keep each capability's preferred rules independent of the other capability's tier.
|
|
19
|
+
- Make host SDK peers optional for standalone MCP installs and limit Pi peers to the compatible `^1.3.0` range.
|
|
20
|
+
- Reject valued `--apply` flags such as `--apply=false` before writing files.
|
|
21
|
+
- Validate install records and refuse corrupt or unreadable records with repair guidance.
|
|
22
|
+
- Track shared config ownership to prevent installs from different projects overwriting or uninstalling one another.
|
|
23
|
+
- Atomically replace individual files, preserve permissions and symlinks, and serialize conflicting writes with operation locks.
|
|
24
|
+
- Verify writes and recovery, reporting `rolled_back` or `recovery_required` when apply fails.
|
|
25
|
+
- Preserve user content, original competitor snapshots, and rules separators during re-init and uninstall.
|
|
26
|
+
- Use platform-native paths and reject malformed or duplicate rules markers.
|
|
27
|
+
- Apply identical Fetch URL validation to string and URL-object inputs.
|
|
28
|
+
- Allow unscored search results when `minRerank` is zero while retaining positive-threshold filtering.
|
|
29
|
+
- Add injectable retrieval clients so adapter tests no longer replace global `fetch`.
|
|
30
|
+
- Remove `formatFetchContent` in favor of `formatFetchedContent`, which also reports truncation.
|
|
31
|
+
- Add Biome checks, read-only docs drift detection, and clearer stdio handshake diagnostics.
|
|
32
|
+
- Gate releases on full checks, installed-package validation across Node 20/22/24/26 in CI, and keyless Docker regressions.
|
|
33
|
+
- Add a published 0.4.0 upgrade regression covering all three hosts, Pi path migration, and restoration of original configuration on uninstall.
|
|
34
|
+
- Upgrade existing installs from their original project and scope, selecting `--path mcp` explicitly to retain Pi's MCP path.
|
|
35
|
+
- Preserve install records for recovery and inspect interrupted operation locks before removing them.
|
|
4
36
|
|
|
5
37
|
## 0.4.0
|
|
6
38
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
authority, so `maxResults` moves 5 → 10 (matching the API `count` default) and the
|
|
11
|
-
`minRerank`/`minAuthority` thresholds move to 0 with `allowUnknownAuthority` flipping
|
|
12
|
-
to `true` — the pass-through default returns what DeepSeek ranked, and the thresholds
|
|
13
|
-
remain available as opt-ins. `DEEPSEEK_SEARCH_ALLOW_UNKNOWN_AUTHORITY` becomes a
|
|
14
|
-
false-only switch (`false`/`0`/`no`/`off` disables) since the default is now on.
|
|
15
|
-
Unchanged and now evidence-backed: `maxRetries=0` (search-API SDK cohort: tavily-python
|
|
16
|
-
and Linkup ship no retries; the 2-retry defaults belong to chat-completion SDKs), the
|
|
17
|
-
30 s timeout, and the 1,200/16,000-character truncations
|
|
18
|
-
- Drop the "Token- and cost-efficient" bullet from the README's Features section —
|
|
19
|
-
the default parameters are no longer endorsed as a selling point, and their behavior
|
|
20
|
-
is stated neutrally in General behavior
|
|
39
|
+
- Align search defaults with [industry defaults](docs/research/search-api-defaults.md): return up to ten results with score and authority filtering disabled unless explicitly enabled.
|
|
40
|
+
- Make `DEEPSEEK_SEARCH_ALLOW_UNKNOWN_AUTHORITY` default to true, with `false`, `0`, `no`, or `off` disabling it.
|
|
41
|
+
- Replace the README's cost-efficiency claim with neutral descriptions of default behavior.
|
|
21
42
|
|
|
22
43
|
## 0.3.0
|
|
23
44
|
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- Make the installer CLI edge testable and explicit: command output is injectable,
|
|
57
|
-
input validation returns a discriminated result instead of smuggling exit codes as
|
|
58
|
-
numbers, and the config home is an explicit input with the XDG comparison resolved
|
|
59
|
-
once at the entry (behavior unchanged)
|
|
60
|
-
- Track the project's domain documentation: `CONTEXT.md` (the glossary hosts, adapters,
|
|
61
|
-
tiers, plans, records, reverts, codecs are written in) and `docs/adr/` now live in
|
|
62
|
-
the repository, alongside the `docs/agents/` agent-skills configuration (GitHub
|
|
63
|
-
Issues as the tracker, default triage labels, single-context domain docs)
|
|
64
|
-
- Enforce the forced tier's exclusivity promise and complete the detect phase: other
|
|
65
|
-
registered MCP servers are now classified web-capable from their name plus
|
|
66
|
-
command/args/url (a heuristic the plan notes state openly). Under a forced tier, Pi
|
|
67
|
-
disables the web-capable ones via their per-server `enabled` key with the prior value
|
|
68
|
-
snapshotted for uninstall, while Codex — which has no per-server kill switch — refuses
|
|
69
|
-
the tier with guidance instead of promising non-exclusive routing (OpenCode's forced is
|
|
70
|
-
replacement, which no third-party server overrides). The target rules file is scanned
|
|
71
|
-
for steering toward other web tools (the installer's own marked block excluded) and the
|
|
72
|
-
conflict is reported, not resolved; every forced-tier plan names the README's "Privacy
|
|
73
|
-
and cost" section; the both-off error and the stay-registered/replacement notes become
|
|
74
|
-
shared strings instead of per-planner copies
|
|
75
|
-
- Refuse cross-scope installs that would claim one config file: Codex's project-scope
|
|
76
|
-
fallback writes the user-level `~/.codex/config.toml`, so a project install beside a
|
|
77
|
-
global one left both scopes' records claiming `mcp_servers.deepseek` in that file, and
|
|
78
|
-
whichever uninstalled first reverted the other's registration. The plan now refuses a
|
|
79
|
-
second scope whose edits overlap the other scope's recorded files (pointing at the
|
|
80
|
-
uninstall command to run instead), and uninstall runs the same check defensively for
|
|
81
|
-
records that predate the guard. Pi and OpenCode scope pairs map to disjoint files and
|
|
82
|
-
install side by side as before
|
|
83
|
-
- Split installer config editing into `configFile` (JSONC text editing) and
|
|
84
|
-
`configValue` (the parsed-object model), unifying the duplicated path walkers,
|
|
85
|
-
append-array dedupe, created-parents pruning, and the isPlainObject guard along the
|
|
86
|
-
way (no behavior change); add a guard test that every version literal in installer
|
|
87
|
-
prose appears in `docs/hosts.jsonc`, so a version bump without the re-verification
|
|
88
|
-
pass fails tests instead of shipping stale facts in user-facing plan notes
|
|
89
|
-
- Close the remaining high- and medium-value e2e coverage gaps with four new Docker
|
|
90
|
-
scenarios: `installer` (keyless — the installer CLI's own product: init/apply/uninstall
|
|
91
|
-
for all three hosts, verified through the real agents' config readers, including the
|
|
92
|
-
Codex kill-switch write and the OpenCode engine replacement), `pkg` (keyless — the
|
|
93
|
-
`npm pack` tarball installed with npm in the container, its bin executed directly,
|
|
94
|
-
then registered as the Pi server for a real handshake), `capability-off` (keyless —
|
|
95
|
-
`DEEPSEEK_ENABLE_FETCH=false` leaves exactly the search tool, both flags false refuses
|
|
96
|
-
to start, and a registration without `exposure` reports `codemode`), and `preferred`
|
|
97
|
-
(billed — installer product at Pi project scope with preferred tiers, then
|
|
98
|
-
natural-language prompts that name no tool, so only the AGENTS.md rules block can steer
|
|
99
|
-
the model). The harness now accepts multiple scenario names, packs the npm tarball
|
|
100
|
-
before running, gives each scenario an isolated HOME and project dir (cleaned up
|
|
101
|
-
afterwards) while sharing one npm download cache per run, and suggests the keyless
|
|
102
|
-
subset when `DEEPSEEK_API_KEY` is missing
|
|
103
|
-
- Fix the installer's secret guard refusing its own output: a re-init over an existing
|
|
104
|
-
entry whose `DEEPSEEK_API_KEY` is the `${DEEPSEEK_API_KEY}` indirection form was
|
|
105
|
-
rejected as a literal credential. Pure `${VAR}` expansions now pass the guard (found
|
|
106
|
-
by the new installer e2e scenario running after pi-billed in a shared HOME); literal
|
|
107
|
-
keys are still refused
|
|
108
|
-
- Fix the `codex` e2e scenario, which had never actually completed a turn: the slim
|
|
109
|
-
Node base image ships no system CA bundle, so Codex's static-musl TLS stack (rustls,
|
|
110
|
-
unlike Node's bundled store) failed every HTTPS request as an opaque
|
|
111
|
-
"Reconnecting... waiting for network" loop — the Dockerfile now installs
|
|
112
|
-
`ca-certificates`. The scenario config also follows DeepSeek's official Codex
|
|
113
|
-
integration: a vendored `test/e2e/codex-models.json` catalog is written to
|
|
114
|
-
`~/.codex/models.json` and referenced via `model_catalog_json` (without it Codex
|
|
115
|
-
cannot resolve DeepSeek model slugs), with `wire_api = "responses"` and the key
|
|
116
|
-
still forwarded through `env_key`/`env_vars` instead of the official script's
|
|
117
|
-
bearer-token-in-file. The scenario now exercises the `web_search = "disabled"`
|
|
118
|
-
kill switch for real. All four scenarios (pi, pi-billed, opencode, codex) pass in
|
|
119
|
-
Docker with real billed requests
|
|
120
|
-
- Add the billed `pi-billed` e2e scenario, bringing Pi to the same invocation-level
|
|
121
|
-
coverage as the opencode and codex scenarios: headless `pi --print` prompts whose
|
|
122
|
-
LLM is Pi's native DeepSeek provider (`deepseek/deepseek-flash`), so one key pays
|
|
123
|
-
for both legs and the model really calls `deepseek_fetch` / `deepseek_web_search`
|
|
124
|
-
through Pi's own MCP client. The keyless `pi` handshake scenario stays
|
|
125
|
-
- Drop Continue and Gemini from the host matrix — they will not be supported.
|
|
126
|
-
Both generated tables, the per-host reference, the protocol research, the
|
|
127
|
-
installer examples, and the host-count invariants shrink accordingly (the
|
|
128
|
-
MCP-capable host count is now seven)
|
|
129
|
-
- Fix the critical code-review findings on the installer: a tier-change re-init now
|
|
130
|
-
reverts the previous init's artifacts explicitly (shown in the plan, undone on
|
|
131
|
-
apply) instead of orphaning them; the plan renders old values for every set op and
|
|
132
|
-
existing counts for appends; TOML comment-loss detection covers trailing comments
|
|
133
|
-
(string-aware); rules-block markers are per host so pi and codex can share one
|
|
134
|
-
AGENTS.md; install records are written 0600 with `.deepseek-web-retrieval/`
|
|
135
|
-
gitignored; replacing an entry that contains a literal credential-looking key is
|
|
136
|
-
refused instead of snapshotted; the CLI resolves `--cwd`, falls back to
|
|
137
|
-
`os.homedir()`, rejects unknown flags/positionals with targeted messages, and
|
|
138
|
-
apply refuses to clobber non-array/non-object config values before writing
|
|
139
|
-
anything; the e2e runner rejects stale flags (including `--local`) and forwards
|
|
140
|
-
empty env values as empty instead of passing host values through
|
|
141
|
-
- Add the installer CLI (`deepseek-web-retrieval init` / `uninstall` / `list`) for
|
|
142
|
-
OpenCode, Pi, and Codex: plan-then-apply with per-capability tiers (optional /
|
|
143
|
-
preferred / forced / off) and a first-class project/global scope, JSON edits that
|
|
144
|
-
preserve comments (jsonc-parser), TOML support (smol-toml), snapshot-based surgical
|
|
145
|
-
rollback that never clobbers user edits, and detect notes for competitors, other
|
|
146
|
-
registered MCP servers, and Codex's `[tools] web_search` no-op trap
|
|
147
|
-
- Add `DEEPSEEK_ENABLE_SEARCH` / `DEEPSEEK_ENABLE_FETCH` (and the OpenCode
|
|
148
|
-
`searchEnabled` / `fetchEnabled` options) for per-capability control on every host;
|
|
149
|
-
the MCP server refuses to start when both tools are disabled
|
|
150
|
-
- Promote Codex to supported: MCP-server adapter, the `docs/agents/codex.md` guide,
|
|
151
|
-
tier table with the top-level `web_search = "disabled"` kill switch, and
|
|
152
|
-
`env_vars`-based key forwarding that respects Codex's stdio env allowlist
|
|
153
|
-
- Make the e2e suites Docker-only (remove `--local`) and add the billed `codex`
|
|
154
|
-
scenario: headless `codex exec` in an isolated HOME with DeepSeek as the Codex LLM
|
|
155
|
-
over the Responses wire (Codex 0.163.0 dropped `wire_api = "chat"`; DeepSeek serves
|
|
156
|
-
the Responses endpoint), one key paying for both legs
|
|
157
|
-
- Replace the hand-written JSONC stripper with jsonc-parser (now also
|
|
158
|
-
`src/core/jsonc.ts`); drop `scripts/jsonc.ts`
|
|
159
|
-
|
|
160
|
-
- Fix documentation review findings: resolve the Pi `structuredContent` contradiction
|
|
161
|
-
against the v1.3.0 source (content-first, structuredContent as a no-content
|
|
162
|
-
fallback), add the missing `extension` mechanism to the taxonomy and re-path
|
|
163
|
-
OpenCode to its native mechanisms, qualify the Forced tier in the Tiers table
|
|
164
|
-
itself, de-restate version locks and the baseline in CONTRIBUTING/integration,
|
|
165
|
-
replace "planned" with "shipped" for the MCP server, tighten installer rollback
|
|
166
|
-
and forced-unavailable/session-scoped semantics, and dedupe the provenance and
|
|
167
|
-
quirk summaries
|
|
168
|
-
- State the installer principles — never overwrite user configuration without the
|
|
169
|
-
user's knowledge, and post-install behavior and impact scope must be controllable
|
|
170
|
-
and knowable — and specify the detect/merge/verify flow, tier semantics against
|
|
171
|
-
stock configuration, snapshot-based rollback, and a first-class project/global
|
|
172
|
-
scope choice (honor or report, never silently downgrade) in
|
|
173
|
-
`docs/design/installer-design.md`; qualify the control matrix's exclusion flavor as
|
|
174
|
-
relative to built-in competitors only
|
|
175
|
-
- Categorize `docs/`: per-agent guides in `docs/agents/`, research notes in
|
|
176
|
-
`docs/research/`, and design notes in `docs/design/`; the integration hub and
|
|
177
|
-
`docs/hosts.jsonc` stay at the root
|
|
178
|
-
- Add `docs/research/control-matrix.md`: control-tier research (optional / preferred /
|
|
179
|
-
forced, per host and capability) with a consolidated per-host reference — built-in web
|
|
180
|
-
tools and their kill switches, MCP registration, and rules files. The control matrix is
|
|
181
|
-
generated from the new `control` field in `docs/hosts.jsonc` (`bun run docs:matrix`;
|
|
182
|
-
drift fails tests)
|
|
183
|
-
- Correct the Continue host note (the CLI has no built-in `search_web`; it is
|
|
184
|
-
IDE-extension-only) and state the built-in web tools in the Codex, Cursor, Devin, and
|
|
185
|
-
Copilot notes; extend the host-evaluation checklist with the rules and built-in
|
|
186
|
-
kill-switch questions
|
|
187
|
-
- Move install-time tier planning to `docs/design/installer-design.md`, and fold the
|
|
188
|
-
`docs/research/mcp-compatibility.md` per-host setup notes and quirk catalog into the
|
|
189
|
-
control-matrix per-host reference; `integration.md` host notes now link there instead
|
|
190
|
-
of restating details
|
|
191
|
-
- Fix the hosts.jsonc drift guard: the matrix renderer no longer rewrites
|
|
192
|
-
docs/integration.md when imported by tests, and CI and `bun run check` now fail
|
|
193
|
-
on drift (`docs:matrix --check`)
|
|
194
|
-
- Serve both MCP tools end to end at every pinned client revision, not only
|
|
195
|
-
`listTools`
|
|
196
|
-
- Build `dist/cli.js` on demand for the stdio smoke test instead of silently
|
|
197
|
-
skipping it on a fresh checkout
|
|
198
|
-
- Share the fetch pipeline (parse, host policy, fetch, format) between the
|
|
199
|
-
OpenCode and MCP adapters through `fetchDocument` in the core
|
|
200
|
-
- Stop restating host version locks in narrative docs; reference
|
|
201
|
-
`docs/hosts.jsonc` instead
|
|
202
|
-
- Pin the e2e Docker base image (`node:22.23.3-slim`) and correct the 0.2.0
|
|
203
|
-
changelog wording about where e2e versions are pinned
|
|
204
|
-
- Type the `DEEPSEEK_*` environment mapping so option keys and variable names
|
|
205
|
-
cannot drift apart
|
|
45
|
+
- Add keyless re-init coverage for tier downgrades, snapshot restoration, scope collisions, listing, and XDG config routing.
|
|
46
|
+
- Refuse apply when configuration has changed or stopped parsing since the plan was generated.
|
|
47
|
+
- Consolidate installer codecs, host planning, reversible edits, and shared retrieval behavior behind dedicated modules.
|
|
48
|
+
- Make CLI output injectable and resolve input validation and config-home selection at the CLI boundary.
|
|
49
|
+
- Add the domain glossary, architecture decisions, and agent workflow documentation.
|
|
50
|
+
- Detect competing web tools and refuse forced tiers when the host cannot enforce exclusivity.
|
|
51
|
+
- Refuse cross-scope installs that would claim the same config file.
|
|
52
|
+
- Separate JSONC editing from value manipulation and guard installer version claims against the host registry.
|
|
53
|
+
- Add isolated Docker scenarios for installation, packaging, capability switches, and preferred routing.
|
|
54
|
+
- Accept `${VAR}` credential references during re-init while continuing to reject literal secrets.
|
|
55
|
+
- Fix Codex end-to-end execution with system CA certificates, a model catalog, and the Responses API.
|
|
56
|
+
- Add a billed Pi scenario that verifies real model calls to both retrieval tools.
|
|
57
|
+
- Remove Continue and Gemini from the support matrix.
|
|
58
|
+
- Harden installer previews, orphan reverts, config-shape checks, rules markers, private records, and CLI validation.
|
|
59
|
+
- Add reversible `init`, `uninstall`, and `list` commands for OpenCode, Pi, and Codex with project/global scopes and per-capability tiers.
|
|
60
|
+
- Add independent Search and Fetch switches and refuse MCP startup when both are disabled.
|
|
61
|
+
- Promote Codex to supported with documented MCP setup, built-in search control, and environment-based key forwarding.
|
|
62
|
+
- Make end-to-end tests Docker-only and add a billed Codex scenario.
|
|
63
|
+
- Replace the handwritten JSONC parser with `jsonc-parser`.
|
|
64
|
+
- Correct integration documentation for Pi content handling, native extensions, control tiers, and rollback limits.
|
|
65
|
+
- Document installer preview, scope, verification, and snapshot-based recovery guarantees.
|
|
66
|
+
- Organize documentation into agent guides, research, and design notes.
|
|
67
|
+
- Generate the capability control matrix from `docs/hosts.jsonc` with drift checks.
|
|
68
|
+
- Correct built-in web-tool facts and expand the host evaluation checklist.
|
|
69
|
+
- Consolidate host setup and compatibility details in the control-matrix reference.
|
|
70
|
+
- Prevent matrix-renderer imports from rewriting documentation and fail checks on generated-doc drift.
|
|
71
|
+
- Exercise both MCP tools at every pinned client protocol revision.
|
|
72
|
+
- Build the CLI before stdio smoke tests instead of skipping fresh checkouts.
|
|
73
|
+
- Share the Fetch pipeline between OpenCode and MCP through the core's `fetchDocument`.
|
|
74
|
+
- Reference the host registry instead of repeating version locks in narrative documentation.
|
|
75
|
+
- Pin the Docker base image and clarify where end-to-end host versions are configured.
|
|
76
|
+
- Type the environment-variable mapping to prevent option names from drifting.
|
|
206
77
|
|
|
207
78
|
## 0.2.0
|
|
208
79
|
|
|
209
|
-
- Make `docs/hosts.jsonc` the
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
- Add
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
-
|
|
219
|
-
|
|
220
|
-
-
|
|
221
|
-
|
|
222
|
-
-
|
|
223
|
-
|
|
224
|
-
-
|
|
225
|
-
|
|
226
|
-
-
|
|
227
|
-
|
|
228
|
-
-
|
|
229
|
-
2025-11-25, and 2026-07-28, plus a real stdio smoke test of the built entry
|
|
230
|
-
- Enforce the fetch host policy inside the core client so direct core consumers cannot bypass it
|
|
231
|
-
- Fail fast on a missing API key before the fetch permission prompt, and reject non-string `url` inputs
|
|
232
|
-
- Move OpenCode-specific missing-key guidance out of the agent-agnostic core
|
|
233
|
-
- Document that `maxResults: 0` returns no results
|
|
234
|
-
- Cover response body reads with the request timeout and cancellation signal
|
|
235
|
-
- Reject successful API responses larger than 5 MiB
|
|
236
|
-
- Reject search queries that exceed 128 characters after adding search operators
|
|
237
|
-
- Block IPv4-mapped IPv6 private addresses in the fetch host policy
|
|
238
|
-
- Truncate API error bodies by Unicode code points
|
|
239
|
-
- Move OpenCode-specific setup and usage into `docs/opencode-v2.md`
|
|
240
|
-
- Add `docs/integration.md` with a version-locked host support matrix
|
|
241
|
-
- Calibrate the OpenCode v2 install and uninstall guide against verified behavior:
|
|
242
|
-
plugin hot reload, `plugin add` not selecting the provider, and `plugin remove` leftovers
|
|
80
|
+
- Make `docs/hosts.jsonc` the source for host facts, generated tables, CI matrices, and Docker version arguments.
|
|
81
|
+
- Add local end-to-end tests for keyless Pi handshakes and billed OpenCode requests, using Docker by default with an optional local mode.
|
|
82
|
+
- Add a stdio MCP adapter exposing Search and Fetch across protocol revisions 2024-11-05 through 2026-07-28.
|
|
83
|
+
- Configure the MCP adapter through shared `DEEPSEEK_*` environment options.
|
|
84
|
+
- Add Pi setup documentation and an MCP config example as the first supported MCP host.
|
|
85
|
+
- Add a primary-source review of MCP compatibility across the host matrix.
|
|
86
|
+
- Add the Node 20+ CLI build and executable alongside the Bun workflow.
|
|
87
|
+
- Test pinned MCP client revisions and the built CLI's stdio transport.
|
|
88
|
+
- Enforce Fetch host policy inside the core client.
|
|
89
|
+
- Reject missing credentials before prompting for Fetch permission and reject non-string URLs.
|
|
90
|
+
- Move OpenCode-specific credential guidance out of the shared core.
|
|
91
|
+
- Document that `maxResults: 0` returns no results.
|
|
92
|
+
- Apply timeout and cancellation to response-body reads.
|
|
93
|
+
- Reject successful API responses larger than 5 MiB.
|
|
94
|
+
- Reject search queries longer than 128 characters after operators are added.
|
|
95
|
+
- Block IPv4-mapped IPv6 private addresses.
|
|
96
|
+
- Truncate API error bodies by Unicode code points.
|
|
97
|
+
- Move OpenCode setup and usage into its dedicated guide.
|
|
98
|
+
- Add an integration guide with a version-locked support matrix.
|
|
99
|
+
- Correct OpenCode installation and removal guidance for hot reload, provider selection, and leftover configuration.
|
|
243
100
|
|
|
244
101
|
## 0.1.0
|
|
245
102
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
-
|
|
249
|
-
-
|
|
250
|
-
-
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
255
|
-
-
|
|
256
|
-
-
|
|
257
|
-
- Unicode-safe truncation and secret redaction in errors
|
|
258
|
-
- Unit tests and CI
|
|
103
|
+
- Add a DeepSeek Search provider for OpenCode v2.
|
|
104
|
+
- Add the `deepseek_fetch` tool backed by DeepSeek Fetch.
|
|
105
|
+
- Offer an optional replacement for OpenCode's built-in `webfetch`.
|
|
106
|
+
- Reuse the active DeepSeek credential stored in OpenCode.
|
|
107
|
+
- Support `DEEPSEEK_API_KEY` fallback and `apiKeySource` selection.
|
|
108
|
+
- Return summary-only search results with score filtering and URL deduplication.
|
|
109
|
+
- Return Markdown Fetch content with a configurable character limit.
|
|
110
|
+
- Add domain allow/deny lists and private-host blocking.
|
|
111
|
+
- Retry selected transient HTTP failures with bounded attempts and `Retry-After` support.
|
|
112
|
+
- Preserve Unicode boundaries and redact secrets in errors.
|
|
113
|
+
- Add unit tests and CI.
|
package/README.md
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
**Bringing [DeepSeek's in-house Search and Fetch APIs](https://api-docs.deepseek.com/guides/search) to coding agents.**
|
|
4
4
|
|
|
5
5
|
An adapter layer for coding agents. The core is agent-agnostic; each adapter exposes the
|
|
6
|
-
same retrieval behavior to a specific agent. OpenCode v2 has a native plugin adapter,
|
|
7
|
-
an MCP server covers MCP-capable
|
|
8
|
-
coding agents are in progress.
|
|
6
|
+
same retrieval behavior to a specific agent. OpenCode v2 has a native plugin adapter, Pi a
|
|
7
|
+
native extension adapter, and an MCP server covers every other MCP-capable host. Guides for
|
|
8
|
+
other coding agents are in progress.
|
|
9
9
|
|
|
10
10
|
This is an unofficial community project. It is not affiliated with OpenCode or DeepSeek.
|
|
11
11
|
|
|
12
12
|
## Features
|
|
13
13
|
|
|
14
|
-
- **One core, every host** — a native OpenCode v2 plugin plus a
|
|
15
|
-
server for everything else; identical retrieval behavior on each
|
|
14
|
+
- **One core, every host** — a native OpenCode v2 plugin, a native Pi extension, plus a
|
|
15
|
+
stdio MCP server for everything else; identical retrieval behavior on each
|
|
16
16
|
- **Tiered routing** — optional, preferred, forced, or off, per capability;
|
|
17
17
|
forced refuses when exclusivity is impossible
|
|
18
18
|
- **Plan-then-apply installer** — every write previewed as old → new before
|
|
@@ -20,7 +20,8 @@ This is an unofficial community project. It is not affiliated with OpenCode or D
|
|
|
20
20
|
exactly what was applied
|
|
21
21
|
- **Trap-aware detection** — catches what the agents' own docs don't warn
|
|
22
22
|
about: Codex's silent `[tools] web_search` no-op, Pi's codemode hiding MCP
|
|
23
|
-
tools; conflicting rules and web-capable servers surface in the plan
|
|
23
|
+
tools; conflicting rules and web-capable servers surface in the plan, and
|
|
24
|
+
`init` notes a Codex release that drifts from the tested lock
|
|
24
25
|
- **Git-safe installs** — the key never enters config files
|
|
25
26
|
(`${DEEPSEEK_API_KEY}` indirection or `env_vars`), so a project-scope
|
|
26
27
|
install commits clean
|
|
@@ -32,7 +33,7 @@ This is an unofficial community project. It is not affiliated with OpenCode or D
|
|
|
32
33
|
Shipped adapters:
|
|
33
34
|
|
|
34
35
|
- [OpenCode v2 setup and usage](docs/agents/opencode-v2.md) — native plugin API
|
|
35
|
-
- [Pi setup and usage](docs/agents/pi.md) —
|
|
36
|
+
- [Pi setup and usage](docs/agents/pi.md) — native extension API (MCP fallback)
|
|
36
37
|
- [Codex setup and usage](docs/agents/codex.md) — MCP server over stdio
|
|
37
38
|
|
|
38
39
|
The MCP server works with any host that supports MCP tools over stdio. The
|
|
@@ -60,8 +61,10 @@ binary files, per-request billing) are documented there.
|
|
|
60
61
|
full page content never enters the results.
|
|
61
62
|
- Returns at most ten results by default (matching the API's `count` default and the
|
|
62
63
|
industry norm for AI-native search APIs), deduplicating URLs. Optional
|
|
63
|
-
`rerank_score` and `authority` thresholds are off by default
|
|
64
|
-
|
|
64
|
+
`rerank_score` and `authority` thresholds are off by default — the default
|
|
65
|
+
returns exactly what DeepSeek ranked, including results without a score;
|
|
66
|
+
when a positive threshold is set, results below it (or without a score to
|
|
67
|
+
compare) are dropped.
|
|
65
68
|
- Builds `blockedDomains`, `includeDomains`, and `language` into query operators and
|
|
66
69
|
rejects the final query locally when it exceeds the API's 128-character limit.
|
|
67
70
|
- An empty result set is normal and is not an error.
|
|
@@ -100,10 +103,12 @@ see the official docs for pricing and rate limits before enabling a team deploym
|
|
|
100
103
|
|
|
101
104
|
```bash
|
|
102
105
|
bun install
|
|
103
|
-
bun run
|
|
104
|
-
bun test
|
|
106
|
+
bun run check
|
|
105
107
|
```
|
|
106
108
|
|
|
109
|
+
Use `bun run lint:fix` to apply Biome's safe lint fixes and formatting. See
|
|
110
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) for the development checks and e2e scenarios.
|
|
111
|
+
|
|
107
112
|
The test suite mocks the DeepSeek HTTP API and the OpenCode plugin host, and drives the
|
|
108
113
|
MCP server with SDK clients pinned to each supported protocol revision. Real API calls
|
|
109
114
|
require a funded DeepSeek account. Shared retrieval logic lives in `src/core/`; adapters
|