dsh-plugin-youcom
Verified@youdotcom-oss/dsh-plugin-youcom · v0.1.1 · MIT
You.com search + fetch provider plugin for DeepSeek Harness (dsh)
Install
dsh plugin add @youdotcom-oss/dsh-plugin-youcom Confirm the layer applied with dsh --profile default --dump-config — see the install guide.
Source
Tags
Creators
Readme
dsh-plugin-youcom
A You.com search + fetch provider plugin for DeepSeek Harness (dsh).
dsh-plugin-youcom is a Cordis plugin registering a WebSearchProvider (POST /v1/search) and a WebFetchProvider (POST /v1/contents) with the dsh web seam (ctx.web).
Install
Third-party providers ship as out-of-tree plugins, discovered through the dsh-plugin GitHub topic. Add this package to a profile:
dsh plugin --profile <your-profile> add @youdotcom-oss/dsh-plugin-youcom
dsh plugin forwards to pnpm in the profile directory, so pnpm must be on your PATH. Restart the profile afterward so the new bundle layer is composed into the plugin stack:
dsh --profile <your-profile>
Or mount it directly in a cordis.patch.yml. This package ships one (see cordis.patch.yml) that inserts the row below into an existing dsh-web composition:
- id: youcom
name: '@youdotcom-oss/dsh-plugin-youcom'
config:
apiKey: !!js process.env.YDC_API_KEY
The quotes around name are required. A plain YAML scalar cannot begin with @.
Set YDC_API_KEY (get one at you.com/platform/api-keys), or pass apiKey directly in config.
Config
| Field | Default | Meaning |
|---|---|---|
apiKey |
$YDC_API_KEY |
You.com API key. Empty or absent makes both providers unavailable |
baseURL |
https://ydc-index.io |
Endpoint base shared by /v1/search and /v1/contents. Must be http(s), and any path prefix it carries (a proxy mount) is kept |
numResults |
(unset) | Default search result count when a request carries no maxResults |
includeNews |
true |
Merge results.news[] into search sources alongside results.web[] |
Picking this provider when more than one is mounted
ctx.web auto-selects a provider only when it is the sole one available. Stacking this alongside another search or fetch provider needs an explicit pin on the host's web row:
- id: web
config:
searchProvider: youcom
fetchProvider: youcom
Known Limitations
fetch'sstatusCodeis always200on success./v1/contentsretrieves and extracts server-side and reports no origin HTTP status, so a page that 404'd at the origin but still yielded extractable content is indistinguishable from a clean 200 here. A raw HTTP fetch provider reports the real code.fetch'struncatedis alwaysfalse./v1/contentsdocuments no truncation signal, so this can under-report but never over-report.- Search results carry no generated answer.
/v1/searchreturns sources only, socontentis omitted rather than invented, and a source with no snippet stays snippet-less. - Search result fields are snake_case on the wire (
page_age,favicon_url). This package parses the raw response with no SDK layer in between, sosrc/types.tsmatches the wire casing directly. ApageAge-keyed mapper silently drops everypublishedAt. - Error bodies come in five shapes, depending on the endpoint and on which layer rejected the request. A gateway rejects an invalid key with
{"message": "..."}before the request reaches the app, while the app itself returns{"detail": "..."},{"error": "..."},{"detail": [{"msg": "..."}]}, or{"errors": [{"title": "..."}]}.src/error-message.tschecks all of them. - DeepSeek Harness is in developer preview and documents compatibility-breaking changes between releases. This package's peer dependencies track its prerelease line accordingly.
Development
npm install
npm run build # tsc -> lib/
npm run typecheck
npm test # vitest, but read the warning below first
npm test hits the live You.com API when YDC_API_KEY is set in your environment. tests/live-smoke.test.ts skips only when the key is absent, so a plain npm test on a configured machine spends real quota. To run the offline suite alone:
env -u YDC_API_KEY npx vitest run
License
MIT