rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:hy-sde/dsh-web-search-public
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
[!NOTE] 📦 This plugin lives in the dsh-plugins monorepo — file issues & pull requests there. npm:
@hy-sde-org/dsh-web-search-public
A zero-API-key web search provider for DeepSeek Harness.
With a single web_search call it fans the query out to all five public engines in
parallel — Startpage, DuckDuckGo, Ecosia, Google, Mojeek — and consolidates the answers by
cross-engine consensus, so a single engine's bot challenge, timeout, or empty page is
absorbed by the others rather than failing the search — though coverage can shrink, and an
empty result names which engines contributed and which were blocked. No API keys, no
accounts, no fetch provider, no setup.
| Identity | Value |
|---|---|
| Package | @hy-sde-org/dsh-web-search-public |
| Plugin id | web-search-public |
| Provider id | public |
| Engines (fanned out) | startpage, duckduckgo, ecosia, google, mojeek |
Based on oh-my-pi — the credential-free engine scrapers are ported from oh-my-pi’s
web/search/providers, and the provider is a faithful port of oh-my-pi’s parallelsearchPublicWebaggregate (fan-out, soft/hard deadlines, consensus merge), adapted to the DeepSeek Harnessctx.webseam. oh-my-pi is MIT-licensed (Mario Zechner, Can Bölük); see THIRD-PARTY-NOTICES.md.
DeepSeek Harness ships search providers that need an API key (DeepSeek, Exa, Perplexity). This bundle is the credential-free default: each search is an anonymous request to every public search engine in parallel. A bot-challenged, rate-limited, or down engine is absorbed — the answer comes from whichever engines responded, and results that several engines agree on are ranked first. The whole call is bounded by soft/hard deadlines, so a hung engine can never pin a search to the tool budget.
PATH;0.2.2-rc.3 including the standard dsh CLI;Install the Harness CLI and pnpm before continuing:
npm install --global @deepseek-ai/dsh@0.2.2-rc.3 pnpm
dsh --version
dsh plugin --profile web add @hy-sde-org/dsh-web-search-public
git clone git@github.com:hy-sde/dsh-plugins.git
cd dsh-plugins/dsh-web-search-public
pnpm install
PACKAGE_TARBALL="$(pnpm pack | tail -n 1)"
dsh plugin --profile web add "$PWD/$PACKAGE_TARBALL"
cd ../..
pnpm pack runs the normal prepack build and produces a tarball containing dist/. A direct
github:<this-repo> dependency does not contain built output and is not a supported install
path — always install the built tarball (or the published package).
dsh web --dump-config
The composed tree must show a web-search-public-npm row loading
@hy-sde-org/dsh-web-search-public; on harnesses that ship the bundled provider, the bundled
web-search-public row is disabled. The bundle preserves the profile's existing
web.searchProvider and web.fetchProvider selection. Without a pinned search provider,
ctx.web auto-selects this provider when it is the sole usable search provider.
dsh web
Ask the agent to web_search something. The tool returns rendered sources from the
consensus-merged fan-out.
dsh plugin --profile web remove @hy-sde-org/dsh-web-search-public
Already shipped? If your harness checkout already mounts
web-search-publicin its base bundle, the patch disables that row and mounts this package under a distinct row id (web-search-public-npm), so the provider idpublicis registered exactly once.
The package declares a DSH bundle (dsh.bundle.patch → cordis.patch.yml), so dsh plugin
installs it and applies its patch layer to the profile:
web-search-public row when the harness ships one (a no-op patch on
harnesses without it), andweb-search-public-npm plugin row.The patch does not rewrite the web row. Existing searchProvider and fetchProvider
choices remain intact; a profile that already selects provider id public automatically uses
this replacement. Without a pinned search provider, the web service auto-selects this
credential-free provider when it is the sole usable search provider. To select it explicitly,
set web.searchProvider: public in a profile patch.
The keyed DeepSeek route (web-search-deepseek, provider id deepseek-official) is not
disabled. Deployments that prefer it keep web.searchProvider: deepseek-official and provide
the DEEPSEEK_API_KEY credential. This bundle mounts no fetch provider and changes no
tool-web settings; whether the model can fetch arbitrary URLs is decided by the profile's
fetch provider and tool-web row.
PublicSearchProvider.search() races engines concurrently (a faithful port of oh-my-pi’s
searchPublicWeb):
┌────────────────────── fan-out (one query) ──────────────────────┐
▼ ▼ ▼ ▼ ▼
startpage duckduckgo ecosia google mojeek
└────────────► consensus merge ◄────────────────┘
www./trailing-slash-normalized URLs) and
ranked by cross-engine consensus — how many engines returned a URL, counting one vote
per engine even when one engine's answer contains several URL variants of the same page —
then best rank, then engine order. The most informative snippet wins; the earlier engine’s
title/URL win equal-rank ties. The provider returns the full merged list; the web seam caps
it to the request's maxResults and sets truncated itself.OR,
site:, inurl:, intitle:, intext:, filetype:, after:/before:, and
lang: aliases — are canonicalized for each engine's supported syntax. Recognized BCP 47
lang: values map to DuckDuckGo's kl locale codes. Boolean structure is preserved rather
than rewritten: OR chains between same-field directives (intitle:guide OR intitle:manual)
stay disjunctions in both the per-engine query strings and the local filter, and unsupported
Boolean combinations are passed through verbatim. Observable site, URL, title, filetype,
and publication-date constraints are applied to merged sources. An engine is skipped when
it cannot enforce a body-text or absolute-date constraint that result metadata cannot
verify; the result notice names that coverage loss. Negative filters are never relaxed.
Positive constraints are strict by default; relaxPositiveConstraints: true permits a
positive dimension that would erase every result to be relaxed with a notice.recency: day|week|month|year; this maps to Startpage with_date,
DuckDuckGo df, Google tbs, and Mojeek since. Ecosia ignores recency rather than
changing topic or ranking mode. The published dsh-tool-web@0.2.2-rc.3 does not expose a
model-facing recency parameter; use after:/before: operators on that release.timeoutMs and its remaining aggregate
budget. A concurrency slot remains occupied until the raw engine operation settles, even
when its timeout facade has already returned.maxRetries/retryDelayMs, abort-aware sleep);
hard blocks are never retried. Once retries are exhausted—or every engine is down—the
provider fast-fails for failureCooldownMs; a search that reaches an engine while the
cooldown is armed (an overlapping call, for example) clears it, so the window measures
from the last failure, not the first. A verified no-results page is a query-level
verdict: it returns [], is not retried, and does not trip the breaker.WEB_PROVIDER_UNAVAILABLE).signal.aborted) aborts the fan-out and throws WEB_ABORTED; an aborted
fetch never escalates to the browser.WEB_PROVIDER_ERROR
with each engine’s reason (id: <reason>; …). A successful partial fan-out returns its
sources plus a structured notice naming failed, skipped, or unavailable engines. Empty
partial results use no engine returned results (…); nonempty partial results use
search coverage was degraded (…).The worst case for the default configuration is ≈ hardDeadlineMs (30 s) overall — the
deadline is the whole budget for the search including retries and their backoff — well under
the 60-second search budget dsh-tool-web books in the shipped harness bundle.
Google, Ecosia and Mojeek are browser-backed: each engine first tries a plain fetch carrying
coherent Chrome navigation headers. A recognized JavaScript, Cloudflare, ALTCHA, or unusual-
traffic wall escalates through ctx.browser.fetchPageHtml when that optional service is
mounted. Escalation may seed a home URL, wait for a results selector, or handle ALTCHA.
Browser behavior and hardening are owned by the mounted browser provider. The circuit breaker
opens only when every available transport is blocked.
Escalation resolves the browser service lazily at the first challenged fetch, so mount order
never matters. The plugin validates the live fetchPageHtml method and its html, status,
and url response fields before parsing. A missing browser keeps the original challenge or
transport classification; an incompatible response is an invalidResponse engine failure.
timeoutMs (default 30 s) is the per-engine budget covering fetch and browser steps.
All options are optional; constants fill the defaults. Configure via the plugin row’s
config: in your profile patch, or programmatically via ctx.plugin(...).
| Option | Default | Purpose |
|---|---|---|
engines |
startpage, duckduckgo, ecosia, google, mojeek |
engine ids the fan-out races; this order is the tiebreak for consensus ties; unlisted engines stay disabled; an explicit empty array is rejected at activation — omit the key for the default set |
timeoutMs |
30000 |
per-engine transport timeout (ms): bounds one engine even if it ignores aggregate cancellation; browser-backed engines may spend it on fetch → browser escalation, so the default is 30 s |
softDeadlineMs |
5000 |
soft aggregate deadline — return as soon as all engines settled or this passes with ≥1 success |
hardDeadlineMs |
30000 |
hard aggregate deadline — the overall budget across retries and their backoff; past it the call returns whatever it has, even nothing; must be ≥ softDeadlineMs |
maxRetries |
1 |
retries for the all-engines-failed aggregate when at least one engine died from a retryable transport failure (HTTP 5xx, a timeout, or a network fetch failure). Each retry re-runs the whole fan-out after a backoff, so a short engine throttle that strips the first attempt still yields results. 0 disables retrying. Hard blocks (HTTP 4xx) are never retried — they open that engine’s circuit breaker — and a pure all-no results aggregate is query-level and never retried. |
retryDelayMs |
2000 |
base delay before retry #1 (ms); doubles on each subsequent attempt. |
failureCooldownMs |
300000 |
fast-fail window (ms) after an all-engines-down failure (retry exhausted, or every engine hard-blocked/tripped): searches in this window return a clear retry in about Ns error instead of re-blasting engines that just throttled us (which would deepen the block). 0 disables the window. |
engineBackoffMs |
300000 |
base per-engine circuit-breaker window (ms): an engine that hard-blocks (HTTP 4xx), answers with a challenge wall, or is still pending at the hard deadline is skipped for this long instead of being re-blasted on every search. Doubles per consecutive trip up to maxEngineBackoffMs; resets after a successful probe. 0 disables the per-engine breaker. |
maxEngineBackoffMs |
3600000 |
cap for the doubled per-engine circuit-breaker window (ms). |
relaxPositiveConstraints |
false |
whether a positive constraint (site:, intitle:, …) that would erase every result is relaxed with a notice instead of returning []. false keeps positive filters strict — an over-narrow filter returns an empty result naming the filter — while explicit negative filters (-site:…) are never relaxed either way. |
maxConcurrentPerEngine |
1 |
cap on simultaneously in-flight operations per engine across all overlapping searches. Queued work neither contacts the engine nor consumes its per-engine timeout, queue waits respect caller aborts, and a queue wait that would outlive the aggregate hard deadline is denied without a network request. 0 disables the cap. |
userAgent |
browser-shaped constant | User-Agent sent to the engines (deliberately not the product UA) |
- id: web-search-public-npm
name: '@hy-sde-org/dsh-web-search-public'
config:
engines: [startpage, duckduckgo, google, mojeek] # drop Ecosia, reorder
timeoutMs: 30000
softDeadlineMs: 4000
hardDeadlineMs: 25000
maxRetries: 1
retryDelayMs: 2000
failureCooldownMs: 300000
engineBackoffMs: 300000
maxEngineBackoffMs: 3600000
relaxPositiveConstraints: false
maxConcurrentPerEngine: 1
PublicEngineId values are the exported engine ids; any id outside the known set is dropped
at startup, and an engines: [] config is rejected at activation with a clear message —
omit the key for the default set (a provider with no engines would be unusable).
Search failures use the web seam’s WEB_* codes:
| Code | Meaning |
|---|---|
WEB_PROVIDER_ERROR |
every engine failed; message lists id: reason; … |
A rate-limited all-failed aggregate (transport signature, retries exhausted) surfaces the
same WEB_PROVIDER_ERROR with public search engines are rate limited (…); retry in about Ns.
| WEB_ABORTED | caller aborted mid-search |
| WEB_PROVIDER_CONFIGURED_UNAVAILABLE | configured provider not available |
| WEB_PROVIDER_CONFIGURED_MISSING | configured provider id not registered |
maxConcurrentPerEngine slot budget
(default one raw operation per engine); a timed-out operation retains its slot until its
cleanup settles. Startpage alone uses a homepage GET plus a search POST; browser escalation
may add navigation, redirects, and subresource requests. See docs/operations.md.tool-web settings.redirect: "error". Browser
escalation navigates like a browser and may follow redirects.| Component | Supported contract |
|---|---|
| Node.js | 22.19 or newer |
| DeepSeek Harness | 0.2.2-rc.3 (@deepseek-ai/dsh-web ^0.2.2-rc.3, @deepseek-ai/cordis ~4.1.0) |
| Seam | ctx.web WebSearchProvider (no API key, no fetch provider) |
The provider implements only WebSearchProvider; @deepseek-ai/dsh-tool-web owns the
model-facing tool. The published dsh-tool-web@0.2.2-rc.3 forwards query and result count but
does not forward recency or render WebSearchResult.notices. Programmatic ctx.web callers
still receive both fields. Harness builds whose tool supports these fields expose them to the
model without a plugin change.
npm ci
npm run check
npm test
npm run build
npm pack --dry-run
The default suite runs parser and provider contract tests against fixture HTML (no network), including the fan-out, consensus merge, and deadline behavior. For live-network validation of the scrapers against current engine markup, run the opt-in real test — it exercises Startpage, DuckDuckGo, and Mojeek for organic results and verifies bot-challenged engines (Ecosia/Google) degrade instead of crashing:
DSH_WEB_SEARCH_REAL_E2E=1 npm run test:real
See CONTRIBUTING.md for the release checklist and design constraints, and docs/operations.md for runtime behavior and troubleshooting.
This package is licensed MIT — the same license as its upstream
oh-my-pi. The credential-free engine scrapers and the
parallel searchPublicWeb aggregate design are ported from oh-my-pi (MIT License, © Mario
Zechner 2025, © Can Bölük 2025-2026); the upstream copyright holders are recorded in LICENSE
next to this package’s own notice, and the upstream notice text is reproduced in full in
THIRD-PARTY-NOTICES.md.
This plugin is a separate installable package; the harness remains the property of its own project.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness。