Merge remote-tracking branch 'origin/master' into codex/simp-prune-web-seam-fields

# Conflicts:
#	docs/config-catalog.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/web.md
#	docs/rfc/implemented/simplification/2026-07-04-drop-unconsumed-web-observation-surface.md
#	packages/web/tool-web/tests/integration.spec.ts
#	packages/web/web-fetch-local/README.md
#	packages/web/web-fetch-local/src/provider.ts
#	packages/web/web/src/types.ts
This commit is contained in:
Tianyi Cui
2026-07-14 17:57:50 +08:00
562 changed files with 4438 additions and 12571 deletions

View File

@@ -35,7 +35,7 @@ This is an **implementation** package: it registers a provider into `ctx.web`, i
### Conversation tool result, indirectly
**What the model sees**: Through `dsh-tool-web`, the conversation model sees the generated answer plus structured result metadata or URL-only citations. Failures become `Error: Perplexity search aborted`, `Error: Perplexity search request failed: <error>`, or `Error: Perplexity returned an unprocessable response body: <error>`; HTTP failures pass through their provider message after `Error:`.
**What the model sees**: Through [`dsh-tool-web`](../tool-web/README.md), the conversation model sees the generated answer plus structured result metadata or URL-only citations. This provider's exact failures are `Perplexity search aborted`, `Perplexity search request failed: <error>`, and `Perplexity returned an unprocessable response body: <error>`; HTTP failures preserve the provider message. The consumer owns the error wrapper.
**Token effect**: Zero direct conversation tokens from registration. Answer and source tokens are data-dependent, source count is seam-bounded, and the retained result or error is resent until compaction.

View File

@@ -1,15 +1,8 @@
/**
* `PerplexitySearchProvider`: a `WebSearchProvider` backed by the Perplexity
* search API (an OpenAI-compatible `POST /chat/completions`). Maps the generated
* answer (`choices[0].message.content`) into `content`, and prefers the
* structured `search_results[]` for `sources[]`, falling back to the URL-only
* `citations[]` when `search_results` is absent.
*
* Network requests use platform-native `fetch` at the repo's Node floor, mirroring
* `@deepseek-ai/dsh-llm-deepseek`'s adapter. The OpenAI-compatible request shape
* is a provider-private detail and does NOT make this provider depend on
* Perplexity search over its OpenAI-compatible chat-completions endpoint. The generated answer
* becomes `content`; sources prefer structured `search_results[]` and fall back to URL-only
* `citations[]`. The wire format and native `fetch` client are provider-private and do not use
* `ctx.llm`.
*
* @module @deepseek-ai/dsh-web-search-perplexity/provider
*/

View File

@@ -1,13 +1,7 @@
/**
* Wire types for the Perplexity search API
* (`POST https://api.perplexity.ai/chat/completions`, an OpenAI-compatible chat
* shape). Types only — no runtime code. Perplexity returns a generated answer in
* `choices[0].message.content` plus citation surfaces: a structured
* `search_results[]` (preferred) and a URL-only `citations[]` fallback.
*
* The OpenAI-compatible wire shape is a provider-private detail; it does not make
* this provider depend on `ctx.llm`.
*
* Wire types for the Perplexity search API (`POST https://api.perplexity.ai/chat/completions`,
* an OpenAI-compatible chat shape). Results prefer structured `search_results` and fall back to
* URL-only `citations`; the provider-private wire shape does not depend on `ctx.llm`.
* @module @deepseek-ai/dsh-web-search-perplexity/types
*/