Files
deepseek-harness/packages/web
Yichen Jiang c62d6f3a44 refactor(net): make the proxy a util library with six functions
Review asked why this is a plugin and why it exports so much. The design note
this branch shipped answered the second question itself — "a pure resolution
function plus an installation function" — and the code drifted to seventeen
exports and a Cordis plugin nobody approved or mounted.

The plugin is gone. Transport policy has one answer per process: nothing to
swap, and no scope narrower than the process to give one. Its `Config` was also
the only supplier of a configuration branch, so resolution now reads the
environment and nothing else — `mode`, the config-sourced fields, and the
`config` policy source were unreachable the moment the plugin left.

Four exports nothing outside the package used are internal again, and
`currentProxyPolicy` answers with the direct policy instead of `undefined`, so
`DIRECT_POLICY` no longer needs a public face. Nine functions remain, one per
way a caller can need the policy; two is not reachable with six consumer seams.

The package moves to `util/`. The note claimed a dependency on `undici`
disqualified it from that group; the charter governs harness dependencies, not
external ones, and the process note that says so predates this branch. The real
blocker was the harness dependency: resolution needed one method of
`LaunchEnvironmentSnapshot`, so it names a structural `EnvLookup` and the
launcher passes its snapshot unchanged. `net/` is dissolved.

Dropping the group's line from the repository layout also returns `AGENTS.md`
to its original ceiling, so the raise the merge needed is reverted.
2026-09-01 11:01:05 +08:00
..
2026-08-30 21:19:29 +08:00
2026-08-30 21:19:29 +08:00

description, kind
description kind
Package map for the web access capability family: the search/fetch service, its provider backends, and the model-facing tools that consume them. package-group

web/ — web access capability family

English | 中文

Summary

The web/ group gives the harness web access — searching the web and fetching URLs — through one provider-neutral service (ctx.web) and the backends and tools that use it. A deployment mounts one or more backends — Exa, Perplexity, or DeepSeek for search, anonymous HTTP(S) for fetch — and the service picks a usable provider per operation, so the model-facing tools stay stable while backends come and go. Six packages split the family: the web/ service that owns provider selection and errors, three search backends, one fetch backend, and tool-web/, which exposes web_search and web_fetch to the model. The group owns web access only: no browsing or extraction, no per-URL policy, and each backend keeps its own resource caps. Search and fetch deliberately share one service so selection, cancellation, errors, and configuration have a single owner.

Table of Contents


Packages

Six packages play the web roles; the subsystem reference owns the exhaustive vocabulary and contracts.

Package Role ctx key
web/ Search/fetch service: search and fetch URLs through interchangeable backends, one selection and error policy ctx.web
web-search-exa/ Searches the web through Exa registers on ctx.web
web-search-perplexity/ Searches the web through Perplexity registers on ctx.web
web-search-deepseek/ Searches the web through DeepSeek native search registers on ctx.web
web-fetch-http/ Fetches public HTTP(S) pages anonymously registers on ctx.web
tool-web/ Exposes web_search and web_fetch to the model registers on ctx.tools

Start with the subsystem reference for the shared vocabulary, then the design decision behind the single provider-selection service.

  • Web subsystem — the search/fetch requests and results, provider availability, WebError, and public-address enforcement.
  • Web capability seam decision — why search and fetch share one provider-selection service.

Dev Note

Working context for maintainers — click to expand

None.