Back to home@v587d

dsh-search-first

Search first, verify facts, reply last — enforced by DSH.

Stars
1
Language
TypeScript
Created
Sep 1, 2026
Updated
Sep 1, 2026
GitHub repo

Introduction

Search First

中文 Search first, verify facts, reply last — enforced by DSH.

Search First — demo walkthrough

▶ Demo walkthrough: https://youtu.be/rGc5OCydHyY

A DeepSeek Harness (dsh) Cordis plugin that forces multi-source web search before the model answers. On agent/pre-step, when Search First is enabled, it runs Query Extraction → Unified Search Engine (AnySearch / TinyFish / Tavily) → fetch → organize → cache + runs/ persistence → inject the organized live leeds guiding verification next, then returns control to the agent loop. Final answers stay with the LLM.

Installation

Prerequisites: a mounted dsh web profile (dsh ≥ 0.1.1-rc.2), Node ≥ 22.

# install from the GitHub repo:
dsh plugin --profile web add https://github.com/v587d/dsh-search-first.git

Uninstall: dsh plugin --profile web remove dsh-search-first (then restart).

Build from source

pnpm install
pnpm check      # vitest + typecheck (host + client)
pnpm build      # lib/ (host ESM + d.ts) + lib/client.js (browser bundle)
pnpm test

Quick start

[!IMPORTANT] Export at least one API key (AnySearch / Tinyfish / Tavily) before running.
Free tier is ENOUGH.

  1. Restart dsh web after installing.
  2. Open Settings → Search firstSearch APIsTest all connections (configure keys first via step 3, or the probe reports a key-missing result).
  3. Provide at least one provider key — add it to $DSH_HOME/.credentials.yaml or export TAVILY_API_KEY / ANYSEARCH_API_KEY / TINYFISH_API_KEY in the environment. AnySearch also works anonymously (Bearer header omitted).
  4. Back in a session, the Search First toggle under the input box decides per session (right-click the toggle to return to the global default).

Configuration (Settings → Search first)

SectionFields
Generaldefault enabled, failure policy (continue / block), injection mode, overall timeout
Query Extractionexplicit provider/model (empty = follow session model), timeout, max tokens
Cachedir (empty = $DSH_HOME/search-first; root applies after restart), search/fetch TTL, clear button
Limitsmax search results, max fetch pages, max inject chars
Search APIsmode (sequential failover / parallel fan-out + merge), big-three enable/credential-ref/priority, per-provider timeout, ctx.web fallback, local HTTP fallback, Test all connections

License

MIT — see LICENSE.