Introduce web access as a first-class capability seam so the model-facing web tools stay stable while backends change. dsh-web owns ctx.web as a provider registry with registration-order-independent selection and the WebError taxonomy; dsh-web-search-exa, dsh-web-search-perplexity, and dsh-web-fetch-local register capabilities into it; dsh-tool-web is the sole owner of the model-facing web_search/web_fetch schemas, prompt sections, and HTML-to-markdown presentation. Search and fetch are deliberately one seam. Providers ship as namespace plugins that register into ctx.web (like an LlmAdapter into ctx.llm), not key-owning services, since multiple search providers cannot each own the key. Tool registration follows product enablement, not backend availability, so load order/credentials never enter the model contract; the seam resolves the provider at execution time and surfaces a structured WebError otherwise. Moves the RFC to implemented/ amended to match what shipped. Example/app configs are intentionally not wired yet (RFC migration step 6).
19 lines
571 B
TypeScript
19 lines
571 B
TypeScript
import { defineConfig } from 'tsdown'
|
|
|
|
/**
|
|
* tool-web exposes one package root plus one entry per tool plugin, so each tool
|
|
* can be loaded or replaced independently as a subpath plugin
|
|
* (`@deepseek-ai/dsh-tool-web/search`, `/fetch`). The root tsdown config only
|
|
* auto-discovers `src/index.ts`, so the subpath entries are declared here.
|
|
*/
|
|
export default defineConfig({
|
|
entry: ['src/index.ts', 'src/search.ts', 'src/fetch.ts'],
|
|
outDir: 'lib',
|
|
format: ['esm'],
|
|
platform: 'node',
|
|
target: 'es2024',
|
|
fixedExtension: false,
|
|
dts: false,
|
|
clean: false,
|
|
})
|