# dddmuc/dsh-free-search architecture

> Architecture diagram of the GitHub repository dddmuc/dsh-free-search, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dddmuc/dsh-free-search
- Repository: https://github.com/dddmuc/dsh-free-search

## Overview

dsh-free-search is a DeepSeek Harness plugin that replaces the default web search provider with configurable multi-engine search. The main workflow routes web_search through engine selection, caching, and fallback; additional tools provide time-filtered search, multi-engine aggregation, engine diagnostics, and platform-specific search. A settings card and popup command configure the plugin, while a system prompt informs the agent about engine use and untrusted results. README documents web_fetch support, but its implementation is not present in the supplied tree. The graph reflects excerpts and README claims; unsampled internal call relationships are omitted.

Main entry points: [`lib/index.js`](https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js) (Web search provider), [`lib/client.js`](https://github.com/dddmuc/dsh-free-search/blob/master/lib/client.js) (Settings card)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_integration["Harness Integration"]
  node_plugin["Plugin registration<br/>[index.js]"]
  node_websearch["Web search provider<br/>[index.js]"]
  node_prompt["Search guidance<br/>[index.js]"]
  node_config[("Plugin configuration<br/>[index.js]")]
end

subgraph group_search["Search Runtime"]
  node_engine["Engine adapters<br/>[index.js]"]
  node_fallback["Routing and fallback<br/>[index.js]"]
  node_cache[("Result cache<br/>[index.js]")]
  node_multi["Multi-engine merge<br/>[index.js]"]
end

subgraph group_tools["Search Tools"]
  node_advanced["Advanced search<br/>[index.js]"]
  node_platform["Platform search<br/>[index.js]"]
  node_test["Engine testing<br/>[index.js]"]
  node_fetch["Web fetch provider"]
end

subgraph group_settings["Configuration UI"]
  node_settings["Settings card<br/>[client.js]"]
  node_popup["Engine popup<br/>[client.js]"]
end

node_agent(("Harness agent"))
node_user(("Plugin user"))

node_plugin -->|"registers"| node_websearch
node_agent -->|"searches via"| node_websearch
node_websearch -->|"routes through"| node_fallback
node_fallback -->|"tries engines"| node_engine
node_websearch -->|"reads/writes"| node_cache
node_fallback -->|"dispatches"| node_multi
node_multi -->|"queries"| node_engine
node_agent -->|"invokes"| node_advanced
node_advanced -->|"uses fallback"| node_websearch
node_agent -->|"invokes"| node_platform
node_agent -->|"invokes"| node_test
node_agent -.->|"fetches pages"| node_fetch
node_plugin -->|"injects guidance"| node_prompt
node_user -->|"configures"| node_settings
node_settings -->|"updates"| node_config
node_user -->|"selects engine"| node_popup
node_popup -->|"updates"| node_config
node_config -->|"configures"| node_websearch

click node_plugin "https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js"
click node_websearch "https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js"
click node_prompt "https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js"
click node_engine "https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js"
click node_fallback "https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js"
click node_cache "https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js"
click node_multi "https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js"
click node_advanced "https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js"
click node_platform "https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js"
click node_test "https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js"
click node_settings "https://github.com/dddmuc/dsh-free-search/blob/master/lib/client.js"
click node_popup "https://github.com/dddmuc/dsh-free-search/blob/master/lib/client.js"
click node_config "https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plugin,node_websearch,node_prompt,node_config,node_user toneBlue
class node_engine,node_fallback,node_cache,node_multi toneAmber
class node_advanced,node_platform,node_test,node_fetch toneMint
class node_settings,node_popup toneRose
class node_agent toneIndigo
```

## Components

### Harness Integration

- [Plugin registration](https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js): `lib/index.js`
- [Web search provider](https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js): `lib/index.js`
- [Search guidance](https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js): `lib/index.js`
- [Plugin configuration](https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js): `lib/index.js`

### Search Runtime

- [Engine adapters](https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js): `lib/index.js`
- [Routing and fallback](https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js): `lib/index.js`
- [Result cache](https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js): `lib/index.js`
- [Multi-engine merge](https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js): `lib/index.js`

### Search Tools

- [Advanced search](https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js): `lib/index.js`
- [Platform search](https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js): `lib/index.js`
- [Engine testing](https://github.com/dddmuc/dsh-free-search/blob/master/lib/index.js): `lib/index.js`
- **Web fetch provider**

### Configuration UI

- [Settings card](https://github.com/dddmuc/dsh-free-search/blob/master/lib/client.js): `lib/client.js`
- [Engine popup](https://github.com/dddmuc/dsh-free-search/blob/master/lib/client.js): `lib/client.js`

### Other components

- **Harness agent**
- **Plugin user**

## Connections

- Plugin registration → Web search provider: registers (evidence: `README.md`)
- Harness agent → Web search provider: searches via (evidence: `README.md`)
- Web search provider → Routing and fallback: routes through (evidence: `lib/index.js`)
- Routing and fallback → Engine adapters: tries engines (evidence: `README.md`)
- Web search provider → Result cache: reads/writes (evidence: `lib/index.js`)
- Routing and fallback → Multi-engine merge: dispatches (evidence: `lib/index.js`)
- Multi-engine merge → Engine adapters: queries (evidence: `README.md`)
- Harness agent → Advanced search: invokes (evidence: `lib/index.js`)
- Advanced search → Web search provider: uses fallback (evidence: `README.md`)
- Harness agent → Platform search: invokes (evidence: `lib/index.js`)
- Harness agent → Engine testing: invokes (evidence: `lib/index.js`)
- Harness agent → Web fetch provider: fetches pages (evidence: `README.md`)
- Plugin registration → Search guidance: injects guidance (evidence: `README.md`)
- Plugin user → Settings card: configures (evidence: `README.md`)
- Settings card → Plugin configuration: updates (evidence: `lib/client.js`)
- Plugin user → Engine popup: selects engine (evidence: `lib/client.js`)
- Engine popup → Plugin configuration: updates (evidence: `lib/client.js`)
- Plugin configuration → Web search provider: configures (evidence: `README.md`)
