@fffangchenghao/dsh-web-search 0.14.0 → 0.16.0
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/CHANGELOG.md +53 -0
- package/README.md +43 -35
- package/README.zh-CN.md +37 -33
- package/SECURITY.md +4 -0
- package/client.js +72 -5
- package/docs/rrf-ranking.md +40 -22
- package/lib/config.js +5 -5
- package/lib/domain-tool.js +2 -2
- package/lib/engines.js +96 -6
- package/lib/fetch.js +43 -3
- package/lib/index.d.ts +3 -1
- package/lib/index.js +30 -1
- package/lib/keys.d.ts +101 -0
- package/lib/keys.js +163 -0
- package/lib/parsers.d.ts +25 -0
- package/lib/parsers.js +139 -0
- package/lib/research.d.ts +158 -0
- package/lib/research.js +393 -0
- package/lib/verticals.d.ts +240 -3
- package/lib/verticals.js +1185 -78
- package/package.json +2 -1
- package/skills/dsh-web-search/SKILL.md +47 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fffangchenghao/dsh-web-search",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "DSH bundle: a key-free web search provider. Leads with the anonymous AnySearch API and falls back to public result pages (DuckDuckGo, Bing, 360), merged by reciprocal-rank fusion with a bilingual region policy, an engine cooldown and a TTL cache.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"lib",
|
|
19
|
+
"skills",
|
|
19
20
|
"client.js",
|
|
20
21
|
"locales/*.json",
|
|
21
22
|
"cordis.patch.yml",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dsh-web-search
|
|
3
|
+
description: Search the live web and read the pages behind the results when the DSH web-search plugin provides web_search, research, domain_search, search_many, read_page or web_fetch. Use it for current facts, version numbers, release notes, package metadata, or any answer that needs a citation, instead of guessing.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Live web research with dsh-web-search
|
|
7
|
+
|
|
8
|
+
The host exposes some or all of these tools. Use the narrowest one that answers
|
|
9
|
+
the question, and cite the URLs you actually read.
|
|
10
|
+
|
|
11
|
+
| Tool | Use it when |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| `web_search` | You need candidate URLs. One call returns up to eight de-duplicated rows with title, link and snippet. |
|
|
14
|
+
| `research` | The answer needs several sources or citations. One call searches up to three queries, opens the leading pages and returns an evidence pack with a URL under every excerpt. |
|
|
15
|
+
| `domain_search` | The question is about a package, repository, paper, Q&A thread or reference entry, and a structured record beats a web page. |
|
|
16
|
+
| `search_many` | You have 2–5 distinct questions that should run together instead of one at a time. |
|
|
17
|
+
| `read_page` | A page is longer than one fetch and you need the next chunk (pass the `nextOffset` from the previous call). |
|
|
18
|
+
| `web_fetch` | You already have the URL and need its readable text. |
|
|
19
|
+
|
|
20
|
+
## How to ask
|
|
21
|
+
|
|
22
|
+
- Put the **distinctive words** in the query: an error string, a version, an
|
|
23
|
+
API name. "python requests timeout parameter" beats "how do I fix my request".
|
|
24
|
+
- Do not paste whole paragraphs; a search query is a few keywords, not a
|
|
25
|
+
document.
|
|
26
|
+
- One `web_search` per fact is usually enough. If the first page of rows does
|
|
27
|
+
not contain the answer, change a word rather than repeating the same query.
|
|
28
|
+
- Prefer official documentation, release notes and the project's own repository
|
|
29
|
+
over aggregator pages. The plugin already boosts known authority domains, but
|
|
30
|
+
it cannot read the page for you.
|
|
31
|
+
|
|
32
|
+
## How to answer
|
|
33
|
+
|
|
34
|
+
- Quote the page, not the snippet: a snippet can be stale or truncated.
|
|
35
|
+
- For a factual claim, link the URL you read, not the search results page.
|
|
36
|
+
- When a source contradicts another, say so and show both links rather than
|
|
37
|
+
picking the more convenient one.
|
|
38
|
+
- If every fetch fails, report the URLs and the failure reasons; do not invent
|
|
39
|
+
content from the snippet.
|
|
40
|
+
|
|
41
|
+
## Installing this skill elsewhere
|
|
42
|
+
|
|
43
|
+
This folder follows the plain `SKILL.md` convention, so it can be copied into a
|
|
44
|
+
harness that reads skills from disk (for example `~/.claude/skills/` or a
|
|
45
|
+
project's `skills/` directory). The plugin itself is a DSH plugin; other
|
|
46
|
+
harnesses need their own way to expose the tools above, but the guidance still
|
|
47
|
+
applies whenever equivalent search and fetch tools exist.
|