@jaco-tech/dsh-web-search-searxng 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,9 +7,7 @@ SearXNG-backed search provider plugin for [DeepSeek Harness](https://github.com/
7
7
 
8
8
  Registers a `WebSearchProvider` into `ctx.web` so that the existing `web_search` model tool routes through your [SearXNG](https://github.com/searxng/searxng) instance. No auth, no API key, no model calls — just a plain HTTP GET against SearXNG's JSON endpoint.
9
9
 
10
- ## Status
11
-
12
- ⚠️ **Not yet published to npm.** The CI/CD workflow builds on every push and publishes automatically when a `v*` tag is pushed. Once the first release is cut:
10
+ ## Install
13
11
 
14
12
  ```bash
15
13
  npm install @jaco-tech/dsh-web-search-searxng
@@ -17,13 +15,22 @@ npm install @jaco-tech/dsh-web-search-searxng
17
15
 
18
16
  ## Configure
19
17
 
20
- Add to your DSH profile's `cordis.patch.yml`:
18
+ ### 1. Install the package
19
+
20
+ ```bash
21
+ npm install @jaco-tech/dsh-web-search-searxng
22
+ ```
23
+
24
+ ### 2. Add it to your DSH profile
25
+
26
+ Edit `~/.dsh/profiles/web/cordis.patch.yml` (create it if it doesn't exist) and add:
21
27
 
22
28
  ```yaml
23
29
  - insert:
24
30
  - id: web-search-searxng
25
31
  name: '@jaco-tech/dsh-web-search-searxng'
26
32
  config:
33
+ # Required: point at your SearXNG instance
27
34
  baseURL: 'http://your-searxng-instance:8888'
28
35
  # Optional filters:
29
36
  language: 'en'
@@ -31,7 +38,7 @@ Add to your DSH profile's `cordis.patch.yml`:
31
38
  timeRange: ''
32
39
  ```
33
40
 
34
- Optionally pin `ctx.web` to use this provider explicitly:
41
+ If you have multiple search providers registered, pin `ctx.web` to use this one:
35
42
 
36
43
  ```yaml
37
44
  - replace:
@@ -40,6 +47,20 @@ Optionally pin `ctx.web` to use this provider explicitly:
40
47
  searchProvider: searxng
41
48
  ```
42
49
 
50
+ ### 3. Restart DSH
51
+
52
+ Stop your running `dsh` process and start it again:
53
+
54
+ ```bash
55
+ npx @deepseek-ai/dsh web
56
+ ```
57
+
58
+ The plugin will be loaded automatically. The `web_search` tool in your agent will now use your SearXNG instance.
59
+
60
+ ### 4. (Optional) Configure via the Web UI
61
+
62
+ Once DSH is running, go to **Settings → Plugins** in the Web UI. You'll see a "web-search-searxng" card where you can edit the `baseURL` and filter settings without editing YAML files.
63
+
43
64
  ## How it works
44
65
 
45
66
  This is a [Cordis](https://github.com/cordiverse/cordis) plugin that implements the `WebSearchProvider` interface from `@deepseek-ai/dsh-web`:
package/lib/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import z from "@deepseek-ai/schemastery";
2
2
  import { WebError } from "@deepseek-ai/dsh-web";
3
+ import { installSettingsSection, settingsNamespace } from "@deepseek-ai/dsh-settings";
3
4
  //#endregion
4
5
  //#region provider
5
6
  /**
@@ -142,8 +143,14 @@ const Config = z.object({
142
143
  categories: z.string().default(""),
143
144
  timeRange: z.string().default(""),
144
145
  });
146
+ /** Settings namespace for the DSH Web UI (Settings → Plugins). */
147
+ const WEB_SEARCH_SEARXNG_SETTINGS_NAMESPACE = settingsNamespace("web-search-searxng");
145
148
  function apply(ctx, config) {
146
- const current = () => config;
149
+ let current = () => config;
150
+ installSettingsSection(ctx, WEB_SEARCH_SEARXNG_SETTINGS_NAMESPACE, Config, config, {
151
+ setSource: (source) => { current = source; },
152
+ onChange: () => { },
153
+ });
147
154
  ctx.web.registerSearchProvider(new SearXngSearchProvider(() => current()));
148
155
  }
149
156
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jaco-tech/dsh-web-search-searxng",
3
3
  "description": "SearXNG-backed search provider for the DeepSeek Harness web capability seam (ctx.web). No auth, no API key.",
4
- "version": "0.1.0",
4
+ "version": "0.2.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,7 +32,8 @@
32
32
  "cordis-plugin"
33
33
  ],
34
34
  "peerDependencies": {
35
- "@deepseek-ai/dsh-web": "^0.1.0-rc.7",
35
+ "@deepseek-ai/dsh-web": "^0.1.0-rc.7 || ^0.1.1-rc.2",
36
+ "@deepseek-ai/dsh-settings": "^0.1.0-rc.7 || ^0.1.1-rc.2",
36
37
  "@deepseek-ai/cordis": "^4.0.1"
37
38
  },
38
39
  "dependencies": {
@@ -40,6 +41,7 @@
40
41
  },
41
42
  "devDependencies": {
42
43
  "@deepseek-ai/dsh-web": "^0.1.0-rc.7",
44
+ "@deepseek-ai/dsh-settings": "^0.1.0-rc.7",
43
45
  "@deepseek-ai/cordis": "^4.0.1",
44
46
  "typescript": "^5.7.0"
45
47
  },