argo-search 2.13.0 → 2.14.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/AGENTS.md +93 -0
- package/README.es.md +30 -8
- package/README.ja.md +30 -8
- package/README.ko.md +30 -8
- package/README.md +511 -596
- package/README.zh.md +975 -0
- package/SKILL.md +1 -1
- package/assets/readme/counts.json +1 -1
- package/backends/domain_profiles.json +90 -6
- package/backends/engine_registry.yaml +222 -32
- package/backends/env_passthrough.txt +2 -0
- package/backends/quota_profiles.json +151 -11
- package/bin/argo +3 -0
- package/config.yaml +50 -4
- package/docs/CHANGELOG.md +45 -0
- package/docs/COMMIT_STANDARD.md +98 -0
- package/docs/ENGINE_CATALOG.md +100 -81
- package/docs/MCP_SETUP.md +1 -1
- package/docs/RELEASE_NOTES_v2.14.0.md +88 -0
- package/docs/RELEASE_NOTES_v2.14.1.md +80 -0
- package/docs/RELEASING.md +52 -0
- package/engines/specs/artic.yaml +11 -1
- package/engines/specs/cleveland.yaml +15 -1
- package/engines/specs/clinicaltrials.yaml +24 -1
- package/engines/specs/cnii.yaml +17 -1
- package/engines/specs/coingecko.yaml +10 -2
- package/engines/specs/dbpedia.yaml +32 -0
- package/engines/specs/deezer.yaml +12 -1
- package/engines/specs/doaj.yaml +14 -1
- package/engines/specs/endoflife.yaml +16 -1
- package/engines/specs/eu_opendata.yaml +11 -1
- package/engines/specs/europeana.yaml +19 -1
- package/engines/specs/feed.yaml +62 -0
- package/engines/specs/figshare.yaml +12 -1
- package/engines/specs/fourget.yaml +23 -0
- package/engines/specs/grep_app.yaml +19 -0
- package/engines/specs/hackernews.yaml +17 -1
- package/engines/specs/hal.yaml +19 -1
- package/engines/specs/hf_datasets.yaml +59 -0
- package/engines/specs/hf_papers.yaml +42 -0
- package/engines/specs/jikan.yaml +12 -10
- package/engines/specs/kaggle.yaml +46 -0
- package/engines/specs/local_baidu.yaml +5 -0
- package/engines/specs/local_seek.yaml +34 -0
- package/engines/specs/local_yandex.yaml +37 -0
- package/engines/specs/maven.yaml +61 -0
- package/engines/specs/mojeek.yaml +31 -0
- package/engines/specs/mwmbl.yaml +39 -0
- package/engines/specs/nasa_cmr.yaml +12 -1
- package/engines/specs/nuget.yaml +57 -0
- package/engines/specs/openaire.yaml +34 -0
- package/engines/specs/repology.yaml +18 -0
- package/engines/specs/tatoeba.yaml +14 -1
- package/engines/specs/tvmaze.yaml +5 -1
- package/engines/specs/usda.yaml +14 -1
- package/package.json +14 -10
- package/packages/dsh-plugin/dsh/client.js +1 -0
- package/packages/dsh-plugin/dsh/native-tools.mjs +85 -116
- package/packages/dsh-plugin/dsh/runner.js +35 -1
- package/packages/dsh-plugin/dsh/specs.js +3 -1
- package/packages/dsh-plugin/dsh/wide-research.js +5 -3
- package/packages/dsh-plugin/package.json +1 -1
- package/packages/dsh-plugin/test/client.test.js +6 -0
- package/packages/dsh-plugin/test/config.test.js +5 -1
- package/packages/dsh-plugin/test/index.test.js +3 -1
- package/packages/dsh-plugin/test/size-gate.test.js +2 -2
- package/scripts/badcase_causes.py +81 -0
- package/scripts/badcase_ledger.py +336 -19
- package/scripts/build_release_assets.sh +43 -15
- package/scripts/cache.py +3 -3
- package/scripts/check_commit_report.py +168 -0
- package/scripts/dormant_ledger.py +225 -0
- package/scripts/engine_admission.py +9 -5
- package/scripts/engine_families.py +13 -2
- package/scripts/engine_policy.py +1 -1
- package/scripts/engine_states.py +398 -8
- package/scripts/engine_status.py +31 -0
- package/scripts/engine_validate.py +224 -40
- package/scripts/engines.py +4 -34
- package/scripts/engines_base.py +53 -147
- package/scripts/engines_builders.py +2 -33
- package/scripts/engines_builders_batch12.py +168 -0
- package/scripts/engines_builders_batch16.py +13 -0
- package/scripts/engines_builders_batch9.py +0 -204
- package/scripts/engines_builders_feeds.py +148 -30
- package/scripts/engines_builders_intl.py +0 -328
- package/scripts/engines_builders_science.py +0 -85
- package/scripts/engines_builders_tech.py +0 -98
- package/scripts/engines_parsers.py +924 -0
- package/scripts/evidence_loop.py +91 -4
- package/scripts/fetch_browser.py +4 -2
- package/scripts/fetch_jsrun.py +2 -1
- package/scripts/fetch_v3.py +22 -22
- package/scripts/gen_engine_catalog.py +2 -2
- package/scripts/gen_native_tools.py +46 -18
- package/scripts/local_intent.py +175 -0
- package/scripts/local_seek.py +256 -91
- package/scripts/local_seek_adapter.py +87 -0
- package/scripts/mcp_handlers.py +124 -72
- package/scripts/mcp_server.py +1 -1
- package/scripts/mcp_tools.py +143 -61
- package/scripts/mcp_transport.py +42 -10
- package/scripts/pre-commit +68 -1
- package/scripts/recovery.py +14 -5
- package/scripts/recovery_l0.py +5 -3
- package/scripts/release.py +20 -11
- package/scripts/release_check.py +1 -1
- package/scripts/research.py +1 -1
- package/scripts/research_gates.py +3 -3
- package/scripts/route_lang.py +6 -1
- package/scripts/route_policy.py +26 -14
- package/scripts/search.py +33 -25
- package/scripts/search_cli.py +52 -6
- package/scripts/search_output.py +83 -16
- package/scripts/secret_guard.py +106 -0
- package/scripts/semantic_evidence.py +230 -15
- package/scripts/settings_page.py +80 -8
- package/scripts/source_audit.py +408 -0
- package/scripts/sync_backends.py +38 -1
- package/scripts/wechat_article.py +5 -3
- package/scripts/wide_research.py +4 -1
- package/scripts/x_article_fetch.py +2 -1
- package/sub-skills/local-search/parsers.py +6 -1
- package/sub-skills/local-seek/scripts/seek.py +390 -24
- package/sub-skills/local-seek/scripts/seek_fts.py +28 -9
- package/sub-skills/local-seek/scripts/seek_rank.py +64 -1
- package/README.en.md +0 -814
- package/engines/specs/cinii.yaml +0 -44
- package/scripts/image_vision/vision_probe +0 -0
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
// 本文件由 scripts/gen_native_tools.py 从
|
|
2
|
-
//
|
|
1
|
+
// 本文件由 scripts/gen_native_tools.py 从 Python 真源生成 —— 勿手改;
|
|
2
|
+
// 改 mcp_tools.py 或 engine_states.py 后重新生成,
|
|
3
3
|
// tests/test_native_tools_sync.py 负责漂移门禁。
|
|
4
4
|
//
|
|
5
5
|
// 说明:
|
|
6
|
-
// - description / parameters 与 MCP 模型可见 schema 完全一致
|
|
6
|
+
// - NATIVE_TOOLS:description / parameters 与 MCP 模型可见 schema 完全一致
|
|
7
7
|
// - allowed = parameters.properties 键序(原生侧 pickArgs 白名单)
|
|
8
8
|
// - 不含 argo_research:分钟级编排不适合 CLI 单发(默认超时会中断),
|
|
9
9
|
// 走 MCP 形态或 wide_research 入口
|
|
10
|
+
// - STATES:engine_states.py 状态词表的只读投影,按状态机分组;
|
|
11
|
+
// JS 侧一律从这里取值,不再手写 ready/low/running 等字面量
|
|
10
12
|
//
|
|
11
13
|
export const NATIVE_TOOLS = {
|
|
12
14
|
"argo_search": {
|
|
13
|
-
"description": "
|
|
15
|
+
"description": "统一搜索(网络/社交/招聘/本地):多引擎融合、支持时间过滤与域名过滤。默认网络搜索;按 domain 可切换社交 UGC、岗位招聘或本机文件。查资料、找答案、找人找帖的首选工具。",
|
|
14
16
|
"parameters": {
|
|
15
17
|
"type": "object",
|
|
16
18
|
"properties": {
|
|
@@ -18,17 +20,23 @@ export const NATIVE_TOOLS = {
|
|
|
18
20
|
"type": "string",
|
|
19
21
|
"description": "搜索查询词"
|
|
20
22
|
},
|
|
23
|
+
"domain": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"enum": [
|
|
26
|
+
"web",
|
|
27
|
+
"social",
|
|
28
|
+
"job",
|
|
29
|
+
"local"
|
|
30
|
+
],
|
|
31
|
+
"description": "搜索领域:web 统一网络搜索(默认),social 社交媒体/论坛讨论,job 招聘岗位聚合,local 本机文件搜索"
|
|
32
|
+
},
|
|
21
33
|
"engine": {
|
|
22
34
|
"type": "string",
|
|
23
|
-
"description": "指定搜索引擎(auto 自动选择;可选 octen/anysearch/exa/zhihu/eastmoney/arxiv/byted/bocha/tavily/deepseek_search/github/wikipedia/semantic_scholar/local_search
|
|
24
|
-
"default": "auto"
|
|
35
|
+
"description": "指定搜索引擎(auto 自动选择;可选 octen/anysearch/exa/zhihu/eastmoney/arxiv/byted/bocha/tavily/deepseek_search/github/wikipedia/semantic_scholar/local_search 等,默认 auto;deepseek_search 为按次计费的官方 DeepSeek 搜索,结果带权威分级与发布时间,新闻时事类查询优先考虑)"
|
|
25
36
|
},
|
|
26
37
|
"max_results": {
|
|
27
38
|
"type": "integer",
|
|
28
|
-
"description": "
|
|
29
|
-
"default": 5,
|
|
30
|
-
"minimum": 1,
|
|
31
|
-
"maximum": 20
|
|
39
|
+
"description": "返回结果条数(1-20,默认 5)"
|
|
32
40
|
},
|
|
33
41
|
"depth": {
|
|
34
42
|
"type": "string",
|
|
@@ -37,8 +45,7 @@ export const NATIVE_TOOLS = {
|
|
|
37
45
|
"balanced",
|
|
38
46
|
"deep"
|
|
39
47
|
],
|
|
40
|
-
"description": "搜索深度:fast 快、deep
|
|
41
|
-
"default": "fast"
|
|
48
|
+
"description": "搜索深度:fast 快、deep 全(慢),默认 fast"
|
|
42
49
|
},
|
|
43
50
|
"mode": {
|
|
44
51
|
"type": "string",
|
|
@@ -46,10 +53,10 @@ export const NATIVE_TOOLS = {
|
|
|
46
53
|
"fast",
|
|
47
54
|
"auto",
|
|
48
55
|
"deep",
|
|
49
|
-
"budget"
|
|
56
|
+
"budget",
|
|
57
|
+
"sentiment"
|
|
50
58
|
],
|
|
51
|
-
"description": "预算模式:fast=免费优先, auto=成本感知, deep=质量优先, budget
|
|
52
|
-
"default": "auto"
|
|
59
|
+
"description": "预算模式:fast=免费优先, auto=成本感知, deep=质量优先, budget=配额控制,默认 auto;仅 domain=social 时可写 sentiment(舆情聚合),其余 domain 不认"
|
|
53
60
|
},
|
|
54
61
|
"since": {
|
|
55
62
|
"type": "string",
|
|
@@ -66,34 +73,29 @@ export const NATIVE_TOOLS = {
|
|
|
66
73
|
"oldest",
|
|
67
74
|
"newest"
|
|
68
75
|
],
|
|
69
|
-
"description": "排序:relevance=相关度, oldest=最早在前, newest
|
|
70
|
-
"default": "relevance"
|
|
76
|
+
"description": "排序:relevance=相关度, oldest=最早在前, newest=最新在前,默认 relevance"
|
|
71
77
|
},
|
|
72
78
|
"include_domains": {
|
|
73
79
|
"type": "array",
|
|
74
80
|
"items": {
|
|
75
81
|
"type": "string"
|
|
76
82
|
},
|
|
77
|
-
"description": "仅保留这些域名(含子域),如 [\"github.com\"]"
|
|
78
|
-
"default": []
|
|
83
|
+
"description": "仅保留这些域名(含子域),如 [\"github.com\"]"
|
|
79
84
|
},
|
|
80
85
|
"exclude_domains": {
|
|
81
86
|
"type": "array",
|
|
82
87
|
"items": {
|
|
83
88
|
"type": "string"
|
|
84
89
|
},
|
|
85
|
-
"description": "排除这些域名(含子域),如 [\"pinterest.com\"]"
|
|
86
|
-
"default": []
|
|
90
|
+
"description": "排除这些域名(含子域),如 [\"pinterest.com\"]"
|
|
87
91
|
},
|
|
88
92
|
"include_local": {
|
|
89
93
|
"type": "boolean",
|
|
90
|
-
"description": "并入本机文件命中(seek 结果尾部,source=local_files,不参与融合评分;默认开)"
|
|
91
|
-
"default": true
|
|
94
|
+
"description": "并入本机文件命中(seek 结果尾部,source=local_files,不参与融合评分;默认开)"
|
|
92
95
|
},
|
|
93
96
|
"summary": {
|
|
94
97
|
"type": "boolean",
|
|
95
|
-
"description": "精简输出:截断摘要、去掉重字段,省 token"
|
|
96
|
-
"default": true
|
|
98
|
+
"description": "精简输出:截断摘要、去掉重字段,省 token(默认开)"
|
|
97
99
|
}
|
|
98
100
|
},
|
|
99
101
|
"required": [
|
|
@@ -103,6 +105,7 @@ export const NATIVE_TOOLS = {
|
|
|
103
105
|
},
|
|
104
106
|
"allowed": [
|
|
105
107
|
"query",
|
|
108
|
+
"domain",
|
|
106
109
|
"engine",
|
|
107
110
|
"max_results",
|
|
108
111
|
"depth",
|
|
@@ -127,20 +130,15 @@ export const NATIVE_TOOLS = {
|
|
|
127
130
|
},
|
|
128
131
|
"path": {
|
|
129
132
|
"type": "string",
|
|
130
|
-
"description": "
|
|
131
|
-
"default": "~"
|
|
133
|
+
"description": "搜索目录;缩小范围更快更准(默认 \"~\")"
|
|
132
134
|
},
|
|
133
135
|
"max_results": {
|
|
134
136
|
"type": "integer",
|
|
135
|
-
"description": "
|
|
136
|
-
"default": 5,
|
|
137
|
-
"minimum": 1,
|
|
138
|
-
"maximum": 20
|
|
137
|
+
"description": "返回结果条数(1-20,默认 5)"
|
|
139
138
|
},
|
|
140
139
|
"exact": {
|
|
141
140
|
"type": "boolean",
|
|
142
|
-
"description": "
|
|
143
|
-
"default": false
|
|
141
|
+
"description": "精确匹配,关闭中文扩展(默认关)"
|
|
144
142
|
}
|
|
145
143
|
},
|
|
146
144
|
"required": [
|
|
@@ -166,15 +164,11 @@ export const NATIVE_TOOLS = {
|
|
|
166
164
|
},
|
|
167
165
|
"max_chars": {
|
|
168
166
|
"type": "integer",
|
|
169
|
-
"description": "
|
|
170
|
-
"default": 4000,
|
|
171
|
-
"minimum": 200,
|
|
172
|
-
"maximum": 20000
|
|
167
|
+
"description": "预览字符数上限(200-20000,默认 4000)"
|
|
173
168
|
},
|
|
174
169
|
"line_start": {
|
|
175
170
|
"type": "integer",
|
|
176
|
-
"description": "起始行号(1 基,可选)"
|
|
177
|
-
"minimum": 1
|
|
171
|
+
"description": "起始行号(1 基,可选)"
|
|
178
172
|
},
|
|
179
173
|
"line_end": {
|
|
180
174
|
"type": "integer",
|
|
@@ -208,20 +202,15 @@ export const NATIVE_TOOLS = {
|
|
|
208
202
|
},
|
|
209
203
|
"timeout_s": {
|
|
210
204
|
"type": "integer",
|
|
211
|
-
"description": "
|
|
212
|
-
"default": 30,
|
|
213
|
-
"minimum": 1,
|
|
214
|
-
"maximum": 120
|
|
205
|
+
"description": "超时秒数(1-120,默认 30)"
|
|
215
206
|
},
|
|
216
207
|
"max_mem_mb": {
|
|
217
208
|
"type": "integer",
|
|
218
|
-
"description": "内存上限 MB
|
|
219
|
-
"default": 512
|
|
209
|
+
"description": "内存上限 MB(尽力而为,默认 512)"
|
|
220
210
|
},
|
|
221
211
|
"allow_exec": {
|
|
222
212
|
"type": "boolean",
|
|
223
|
-
"description": "是否授权运行(不授权就不执行;未授权时返回 skipped_reason
|
|
224
|
-
"default": false
|
|
213
|
+
"description": "是否授权运行(不授权就不执行;未授权时返回 skipped_reason,默认关)"
|
|
225
214
|
}
|
|
226
215
|
},
|
|
227
216
|
"required": [
|
|
@@ -252,8 +241,7 @@ export const NATIVE_TOOLS = {
|
|
|
252
241
|
},
|
|
253
242
|
"max_results": {
|
|
254
243
|
"type": "integer",
|
|
255
|
-
"description": "
|
|
256
|
-
"default": 10
|
|
244
|
+
"description": "自动搜索时的结果条数(默认 10)"
|
|
257
245
|
}
|
|
258
246
|
},
|
|
259
247
|
"required": [
|
|
@@ -301,22 +289,15 @@ export const NATIVE_TOOLS = {
|
|
|
301
289
|
"sitemap",
|
|
302
290
|
"bfs"
|
|
303
291
|
],
|
|
304
|
-
"description": "
|
|
305
|
-
"default": "bfs"
|
|
292
|
+
"description": "爬取策略,默认 bfs"
|
|
306
293
|
},
|
|
307
294
|
"max_pages": {
|
|
308
295
|
"type": "integer",
|
|
309
|
-
"description": "
|
|
310
|
-
"default": 10,
|
|
311
|
-
"minimum": 1,
|
|
312
|
-
"maximum": 50
|
|
296
|
+
"description": "最大抓取页数(1-50,默认 10)"
|
|
313
297
|
},
|
|
314
298
|
"max_depth": {
|
|
315
299
|
"type": "integer",
|
|
316
|
-
"description": "BFS
|
|
317
|
-
"default": 2,
|
|
318
|
-
"minimum": 1,
|
|
319
|
-
"maximum": 5
|
|
300
|
+
"description": "BFS 最大深度(1-5,默认 2)"
|
|
320
301
|
}
|
|
321
302
|
},
|
|
322
303
|
"required": [
|
|
@@ -332,22 +313,23 @@ export const NATIVE_TOOLS = {
|
|
|
332
313
|
]
|
|
333
314
|
},
|
|
334
315
|
"argo_fetch": {
|
|
335
|
-
"description": "
|
|
316
|
+
"description": "智能页面/长文/PDF抓取:HTTP 优先,遇反爬自动升级反检测浏览器;微信公众号文章(mp.weixin.qq.com)与 PDF 自动感知适配解析;支持 BM25 聚焦提取(focus 省 80%+ token)与结构化提取(mode=extract 抽表格/元数据/JSON-LD)。通读正文与获取文档的首选工具。",
|
|
336
317
|
"parameters": {
|
|
337
318
|
"type": "object",
|
|
338
319
|
"properties": {
|
|
339
320
|
"url": {
|
|
340
321
|
"type": "string",
|
|
341
|
-
"description": "目标 URL"
|
|
322
|
+
"description": "目标 URL 或本地 PDF 路径"
|
|
342
323
|
},
|
|
343
324
|
"mode": {
|
|
344
325
|
"type": "string",
|
|
345
326
|
"enum": [
|
|
346
327
|
"text",
|
|
347
|
-
"extract"
|
|
328
|
+
"extract",
|
|
329
|
+
"article",
|
|
330
|
+
"pdf"
|
|
348
331
|
],
|
|
349
|
-
"description": "text
|
|
350
|
-
"default": "text"
|
|
332
|
+
"description": "抓取模式:text=正文/聚焦文本(默认 text), extract=结构化提取, article=公众号全文, pdf=PDF解析。微信与PDF链接自动识别"
|
|
351
333
|
},
|
|
352
334
|
"extract_mode": {
|
|
353
335
|
"type": "string",
|
|
@@ -357,8 +339,7 @@ export const NATIVE_TOOLS = {
|
|
|
357
339
|
"jsonld",
|
|
358
340
|
"all"
|
|
359
341
|
],
|
|
360
|
-
"description": "mode=extract
|
|
361
|
-
"default": "all"
|
|
342
|
+
"description": "mode=extract 时的提取子模式,默认 all"
|
|
362
343
|
},
|
|
363
344
|
"focus": {
|
|
364
345
|
"type": "string",
|
|
@@ -366,20 +347,15 @@ export const NATIVE_TOOLS = {
|
|
|
366
347
|
},
|
|
367
348
|
"max_chars": {
|
|
368
349
|
"type": "integer",
|
|
369
|
-
"description": "
|
|
370
|
-
"default": 8000,
|
|
371
|
-
"minimum": 500,
|
|
372
|
-
"maximum": 50000
|
|
350
|
+
"description": "返回正文最大字符数(500-50000,默认 8000)"
|
|
373
351
|
},
|
|
374
352
|
"use_browser": {
|
|
375
353
|
"type": "boolean",
|
|
376
|
-
"description": "强制用反检测浏览器(HTTP
|
|
377
|
-
"default": false
|
|
354
|
+
"description": "强制用反检测浏览器(HTTP 失败时已自动升级,默认关)"
|
|
378
355
|
},
|
|
379
356
|
"include_links": {
|
|
380
357
|
"type": "boolean",
|
|
381
|
-
"description": "附带正文内链接(最多 30 条;默认只回 links_count,省 token
|
|
382
|
-
"default": false
|
|
358
|
+
"description": "附带正文内链接(最多 30 条;默认只回 links_count,省 token,默认关)"
|
|
383
359
|
}
|
|
384
360
|
},
|
|
385
361
|
"required": [
|
|
@@ -408,8 +384,7 @@ export const NATIVE_TOOLS = {
|
|
|
408
384
|
},
|
|
409
385
|
"full_page": {
|
|
410
386
|
"type": "boolean",
|
|
411
|
-
"description": "
|
|
412
|
-
"default": false
|
|
387
|
+
"description": "全页截图(默认仅当前视口,默认关)"
|
|
413
388
|
},
|
|
414
389
|
"output_path": {
|
|
415
390
|
"type": "string",
|
|
@@ -471,20 +446,15 @@ export const NATIVE_TOOLS = {
|
|
|
471
446
|
"text",
|
|
472
447
|
"sentiment"
|
|
473
448
|
],
|
|
474
|
-
"description": "text=帖子列表, sentiment
|
|
475
|
-
"default": "text"
|
|
449
|
+
"description": "text=帖子列表, sentiment=舆情聚合分析,默认 text"
|
|
476
450
|
},
|
|
477
451
|
"platforms": {
|
|
478
452
|
"type": "string",
|
|
479
|
-
"description": "平台列表,逗号分隔;可选 hackernews,v2ex,zhihu,bilibili,twitter,reddit,xiaohongshu,weibo"
|
|
480
|
-
"default": "hackernews,zhihu,bilibili"
|
|
453
|
+
"description": "平台列表,逗号分隔;可选 hackernews,v2ex,zhihu,bilibili,twitter,reddit,xiaohongshu,weibo,默认 hackernews,zhihu,bilibili"
|
|
481
454
|
},
|
|
482
455
|
"max_results": {
|
|
483
456
|
"type": "integer",
|
|
484
|
-
"description": "
|
|
485
|
-
"default": 5,
|
|
486
|
-
"minimum": 1,
|
|
487
|
-
"maximum": 20
|
|
457
|
+
"description": "每个平台的结果条数(1-20,默认 5)"
|
|
488
458
|
}
|
|
489
459
|
},
|
|
490
460
|
"required": [
|
|
@@ -510,10 +480,7 @@ export const NATIVE_TOOLS = {
|
|
|
510
480
|
},
|
|
511
481
|
"max_chars": {
|
|
512
482
|
"type": "integer",
|
|
513
|
-
"description": "
|
|
514
|
-
"default": 20000,
|
|
515
|
-
"minimum": 500,
|
|
516
|
-
"maximum": 50000
|
|
483
|
+
"description": "返回正文最大字符数(500-50000,默认 20000)"
|
|
517
484
|
}
|
|
518
485
|
},
|
|
519
486
|
"required": [
|
|
@@ -541,27 +508,19 @@ export const NATIVE_TOOLS = {
|
|
|
541
508
|
},
|
|
542
509
|
"num": {
|
|
543
510
|
"type": "integer",
|
|
544
|
-
"description": "
|
|
545
|
-
"default": 5,
|
|
546
|
-
"minimum": 1,
|
|
547
|
-
"maximum": 20
|
|
511
|
+
"description": "每后端条数(1-20,默认 5)"
|
|
548
512
|
},
|
|
549
513
|
"platforms": {
|
|
550
514
|
"type": "string",
|
|
551
|
-
"description": "逗号分隔平台: zhipin,liepin,zhaopin,51job,597,jrzp;空=全部"
|
|
552
|
-
"default": ""
|
|
515
|
+
"description": "逗号分隔平台: zhipin,liepin,zhaopin,51job,597,jrzp;空=全部"
|
|
553
516
|
},
|
|
554
517
|
"loose": {
|
|
555
518
|
"type": "boolean",
|
|
556
|
-
"description": "
|
|
557
|
-
"default": false
|
|
519
|
+
"description": "宽松:异地岗位也保留;默认严格地区过滤(默认关)"
|
|
558
520
|
},
|
|
559
521
|
"fetch_detail": {
|
|
560
522
|
"type": "integer",
|
|
561
|
-
"description": "对前 N 条高命中结果抓详情页补全结构化字段(0=仅 snippet
|
|
562
|
-
"default": 0,
|
|
563
|
-
"minimum": 0,
|
|
564
|
-
"maximum": 10
|
|
523
|
+
"description": "对前 N 条高命中结果抓详情页补全结构化字段(0=仅 snippet 提取,范围 0-10,默认 0)"
|
|
565
524
|
}
|
|
566
525
|
},
|
|
567
526
|
"required": [
|
|
@@ -595,15 +554,11 @@ export const NATIVE_TOOLS = {
|
|
|
595
554
|
"jsonld",
|
|
596
555
|
"all"
|
|
597
556
|
],
|
|
598
|
-
"description": "提取内容:tables=HTML表格, metadata=Meta元数据, jsonld=JSON-LD, all
|
|
599
|
-
"default": "all"
|
|
557
|
+
"description": "提取内容:tables=HTML表格, metadata=Meta元数据, jsonld=JSON-LD, all=全部,默认 all"
|
|
600
558
|
},
|
|
601
559
|
"max_chars": {
|
|
602
560
|
"type": "integer",
|
|
603
|
-
"description": "
|
|
604
|
-
"default": 50000,
|
|
605
|
-
"minimum": 1000,
|
|
606
|
-
"maximum": 200000
|
|
561
|
+
"description": "抓取页面最大字符数(1000-200000,默认 50000)"
|
|
607
562
|
}
|
|
608
563
|
},
|
|
609
564
|
"required": [
|
|
@@ -627,13 +582,11 @@ export const NATIVE_TOOLS = {
|
|
|
627
582
|
"items": {
|
|
628
583
|
"type": "string"
|
|
629
584
|
},
|
|
630
|
-
"description": "待预检的 URL 列表"
|
|
631
|
-
"minItems": 1
|
|
585
|
+
"description": "待预检的 URL 列表"
|
|
632
586
|
},
|
|
633
587
|
"probe": {
|
|
634
588
|
"type": "boolean",
|
|
635
|
-
"description": "联网探测存活(404/410
|
|
636
|
-
"default": false
|
|
589
|
+
"description": "联网探测存活(404/410 判死;默认纯本地规则,默认关)"
|
|
637
590
|
}
|
|
638
591
|
},
|
|
639
592
|
"required": [
|
|
@@ -696,8 +649,7 @@ export const NATIVE_TOOLS = {
|
|
|
696
649
|
},
|
|
697
650
|
"note": {
|
|
698
651
|
"type": "string",
|
|
699
|
-
"description": "备注(add
|
|
700
|
-
"default": ""
|
|
652
|
+
"description": "备注(add 可选,默认空)"
|
|
701
653
|
}
|
|
702
654
|
},
|
|
703
655
|
"required": [
|
|
@@ -721,8 +673,7 @@ export const NATIVE_TOOLS = {
|
|
|
721
673
|
"items": {
|
|
722
674
|
"type": "string"
|
|
723
675
|
},
|
|
724
|
-
"description": "DOI 列表,如 [\"10.1038/s41586-024-0001-x\"]"
|
|
725
|
-
"minItems": 1
|
|
676
|
+
"description": "DOI 列表,如 [\"10.1038/s41586-024-0001-x\"]"
|
|
726
677
|
},
|
|
727
678
|
"style": {
|
|
728
679
|
"type": "string",
|
|
@@ -732,8 +683,7 @@ export const NATIVE_TOOLS = {
|
|
|
732
683
|
"apa",
|
|
733
684
|
"bibtex"
|
|
734
685
|
],
|
|
735
|
-
"description": "
|
|
736
|
-
"default": "gbt7714"
|
|
686
|
+
"description": "引用格式,默认 gbt7714"
|
|
737
687
|
}
|
|
738
688
|
},
|
|
739
689
|
"required": [
|
|
@@ -747,3 +697,22 @@ export const NATIVE_TOOLS = {
|
|
|
747
697
|
]
|
|
748
698
|
}
|
|
749
699
|
};
|
|
700
|
+
|
|
701
|
+
export const STATES = {
|
|
702
|
+
"plugin": {
|
|
703
|
+
"loading": "loading",
|
|
704
|
+
"ready": "ready",
|
|
705
|
+
"unavailable": "unavailable"
|
|
706
|
+
},
|
|
707
|
+
"daemon": {
|
|
708
|
+
"busy": "busy",
|
|
709
|
+
"idle": "idle",
|
|
710
|
+
"running": "running",
|
|
711
|
+
"stopped": "stopped"
|
|
712
|
+
},
|
|
713
|
+
"conclusionCap": {
|
|
714
|
+
"high": "high",
|
|
715
|
+
"low": "low",
|
|
716
|
+
"medium": "medium"
|
|
717
|
+
}
|
|
718
|
+
};
|
|
@@ -63,7 +63,41 @@ export const DEFAULTS = Object.freeze({
|
|
|
63
63
|
searchIdleMs: 60_000,
|
|
64
64
|
searchConcurrency: 3,
|
|
65
65
|
reportDir: join(homedir(), '.dsh-research'),
|
|
66
|
-
|
|
66
|
+
// <generated:keyrefs> 由 scripts/sync_backends.py 从引擎声明生成,勿手改
|
|
67
|
+
keyRefs: [
|
|
68
|
+
'DEEPSEEK_API_KEY',
|
|
69
|
+
'ARGO_YUANBAO_API_KEY',
|
|
70
|
+
'TAVILY_API_KEY',
|
|
71
|
+
'EXA_API_KEY',
|
|
72
|
+
'BOCHA_API_KEY',
|
|
73
|
+
'BRAVE_API_KEY',
|
|
74
|
+
'TINYFISH_API_KEY',
|
|
75
|
+
'ANYSEARCH_API_KEY',
|
|
76
|
+
'ARGO_PIXIV_REFRESH_TOKEN',
|
|
77
|
+
'EASTMONEY_APIKEY',
|
|
78
|
+
'FELO_API_KEY',
|
|
79
|
+
'FIRECRAWL_API_KEY',
|
|
80
|
+
'FOURGET_URL',
|
|
81
|
+
'GITHUB_TOKEN',
|
|
82
|
+
'KEENABLE_API_KEY',
|
|
83
|
+
'METASO_API_KEY',
|
|
84
|
+
'OCTEN_API_KEY',
|
|
85
|
+
'OPENCORPORATES_API_TOKEN',
|
|
86
|
+
'PARALLEL_API_KEY',
|
|
87
|
+
'QWEATHER_KEY',
|
|
88
|
+
'SAUCENAO_API_KEY',
|
|
89
|
+
'SCIVERSE_API_TOKEN',
|
|
90
|
+
'SEARXNG_URL',
|
|
91
|
+
'SELTZ_API_KEY',
|
|
92
|
+
'SERPAPI_API_KEY',
|
|
93
|
+
'UNPAYWALL_EMAIL',
|
|
94
|
+
'WEB_SEARCH_API_KEY',
|
|
95
|
+
'WEREAD_API_KEY',
|
|
96
|
+
'WOLFRAM_APPID',
|
|
97
|
+
'YDC_API_KEY',
|
|
98
|
+
'ZHIHU_ACCESS_SECRET',
|
|
99
|
+
],
|
|
100
|
+
// </generated:keyrefs>
|
|
67
101
|
argoEnv: [],
|
|
68
102
|
})
|
|
69
103
|
|
|
@@ -115,7 +115,9 @@ export function argoEnvOverlay(config = activeConfig) {
|
|
|
115
115
|
export async function resolveArgoEnv(config, options = {}) {
|
|
116
116
|
const cfg = config ?? activeConfig
|
|
117
117
|
const overlay = argoEnvOverlay(cfg)
|
|
118
|
-
|
|
118
|
+
// 上限 64:默认名单由 sync_backends.py 派生全量 ref(2026-11-10 实测 26 个),
|
|
119
|
+
// 旧上限 20 会静默截断派生名单,靠后的引擎凭证又被挡在子进程外(issue #41 回归面)。
|
|
120
|
+
const refs = asStringArray(cfg?.keyRefs, 64)
|
|
119
121
|
if (refs.length > 0) {
|
|
120
122
|
const provider = options.credentials ?? cfg?.credentials ?? hostCredentials
|
|
121
123
|
if (provider !== undefined) {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import { mkdir, writeFile } from 'node:fs/promises'
|
|
12
12
|
import { join } from 'node:path'
|
|
13
13
|
import { acquireMcp, DEFAULTS } from './runner.js'
|
|
14
|
+
import { STATES } from './native-tools.mjs'
|
|
14
15
|
|
|
15
16
|
const text = (value) => [{ type: 'text', text: value }]
|
|
16
17
|
const isObject = (value) => typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
@@ -180,7 +181,7 @@ export const outputSchema = {
|
|
|
180
181
|
required: ['passed', 'conclusion_cap', 'failures', 'warnings'],
|
|
181
182
|
properties: {
|
|
182
183
|
passed: { type: 'boolean' },
|
|
183
|
-
conclusion_cap: { type: 'string', enum:
|
|
184
|
+
conclusion_cap: { type: 'string', enum: Object.values(STATES.conclusionCap) },
|
|
184
185
|
failures: {
|
|
185
186
|
type: 'array',
|
|
186
187
|
items: {
|
|
@@ -506,7 +507,8 @@ export function evaluateGates(output) {
|
|
|
506
507
|
}
|
|
507
508
|
}
|
|
508
509
|
|
|
509
|
-
const
|
|
510
|
+
const caps = STATES.conclusionCap
|
|
511
|
+
const cap = failures.length ? caps.low : (warnings.length ? caps.medium : caps.high)
|
|
510
512
|
return { passed: failures.length === 0, conclusion_cap: cap, failures, warnings }
|
|
511
513
|
}
|
|
512
514
|
|
|
@@ -643,7 +645,7 @@ export function createWideResearchTool(ctx, config, options = {}) {
|
|
|
643
645
|
perspective: { type: 'string', description: 'Optional decomposition lens such as technical, market, policy, or skeptical review.' },
|
|
644
646
|
file_inputs: { type: 'string', description: '本地一手数据文件 JSON 数组(白名单制):[{"path":"~/data/company.xlsx","role":"原始数据"}]。登记血缘(sha256/路径),内容不入账;供 recompute 重算。' },
|
|
645
647
|
recompute: { type: 'string', description: '可复算契约 JSON 对象:{"script":"...","expect":"0.23左右","budget":{"timeout_s":30,"max_mem_mb":512}}。在编排器侧受限执行,验证重算数值。' },
|
|
646
|
-
include_local: { type: 'boolean', description: 'worker 搜索时并入本机文件命中(argo_search include_local,默认 false)。'
|
|
648
|
+
include_local: { type: 'boolean', description: 'worker 搜索时并入本机文件命中(argo_search include_local,默认 false)。' },
|
|
647
649
|
max_workers: { type: 'number', description: 'Requested concurrent workers. Defaults to the configured default and is capped by the configured maximum.' },
|
|
648
650
|
response_language: { type: 'string', description: 'Language for the final report. Defaults to the question language.' },
|
|
649
651
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taxueseek/argo-dsh",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.1",
|
|
4
4
|
"description": "Argo 阿尔戈 — DSH plugin:argo 原生搜索/抓取工具 + web_search seam + wide_research 编排;自带设置页(接入/工具/API 密钥/研究/高级);argo MCP 19 工具全量面按需挂载。安装:dsh plugin --profile web add @taxueseek/argo-dsh(或从 GitHub main 装:dsh plugin --profile web add \"github:taxueseek/argo#main&path:packages/dsh-plugin\")",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -4,6 +4,7 @@ import { readFileSync } from 'node:fs'
|
|
|
4
4
|
import vm from 'node:vm'
|
|
5
5
|
import { NATIVE_TOOLS } from '../dsh/native-tools.mjs'
|
|
6
6
|
import { ARGO_ENV_SPECS } from '../dsh/specs.js'
|
|
7
|
+
import { DEFAULTS } from '../dsh/runner.js'
|
|
7
8
|
|
|
8
9
|
/** 在最小沙箱里执行 lazy-CJS bundle,返回 ModuleLoader 收到的定义。 */
|
|
9
10
|
function loadBundle() {
|
|
@@ -215,6 +216,11 @@ test('keys tab exposes the Yuanbao credential ref and bilingual labels', () => {
|
|
|
215
216
|
assert.ok(typeof k.label === 'string' && k.label.length > 0, `${k.ref} 缺中文 label`)
|
|
216
217
|
assert.ok(typeof k.en === 'string' && k.en.length > 0, `${k.ref} 缺英文 en 标签`)
|
|
217
218
|
}
|
|
219
|
+
// issue #41 收口:DEFAULTS.keyRefs 必须与 KEYS 派生清单同源——新装即全量
|
|
220
|
+
// 转发,而不是硬编码单条让其余凭证全靠用户进面板手动加。
|
|
221
|
+
assert.deepEqual(
|
|
222
|
+
new Set(DEFAULTS.keyRefs), new Set(mod.KEYS.map((k) => k.ref)),
|
|
223
|
+
'DEFAULTS.keyRefs 与 KEYS 派生清单不同源(跑 python3 scripts/sync_backends.py 重新派生)')
|
|
218
224
|
})
|
|
219
225
|
|
|
220
226
|
test('ArgoPanel renders every tab without undefined references', () => {
|
|
@@ -20,7 +20,11 @@ test('Config: volatile settings expose defaults and reject unknown native tools'
|
|
|
20
20
|
assert.equal(plain(parsed, 'nativeTimeoutMs'), 60000)
|
|
21
21
|
assert.equal(plain(parsed, 'searchConcurrency'), 3)
|
|
22
22
|
assert.deepEqual(plain(parsed, 'nativeTools'), ['argo_search', 'argo_fetch'])
|
|
23
|
-
|
|
23
|
+
// keyRefs 默认名单由 sync_backends.py 派生(issue #41 收口),不再是单条硬编码
|
|
24
|
+
const keyRefs = plain(parsed, 'keyRefs')
|
|
25
|
+
assert.ok(Array.isArray(keyRefs) && keyRefs.length > 1,
|
|
26
|
+
'keyRefs 默认名单应由派生块供给全量 ref(issue #41)')
|
|
27
|
+
assert.ok(keyRefs.includes('DEEPSEEK_API_KEY'), '派生名单丢了历史默认项')
|
|
24
28
|
|
|
25
29
|
const source = parsed.nativeTools
|
|
26
30
|
assert.equal(typeof source.get, 'function', 'nativeTools 必须是 volatile 引用,设置页才能热改')
|
|
@@ -1189,7 +1189,9 @@ test('pool: a new connection after idle recycle re-resolves credentials', async
|
|
|
1189
1189
|
const baseline = resolveCalls
|
|
1190
1190
|
disposeSharedMcp()
|
|
1191
1191
|
await tool.execute({ query: 'b' })
|
|
1192
|
-
|
|
1192
|
+
// 乘法口径:resolve 调用数 = 名单长度 × 连接数,默认名单已是派生全量
|
|
1193
|
+
// ref(issue #41 收口),硬编码 +1 会在名单扩容时误报。
|
|
1194
|
+
assert.equal(resolveCalls, baseline * 2, `回收后新建连接应再解析一遍全部 ref,实际从 ${baseline} 到 ${resolveCalls}`)
|
|
1193
1195
|
assert.equal(spawnCount(), 2)
|
|
1194
1196
|
})
|
|
1195
1197
|
|
|
@@ -34,9 +34,9 @@ const HARD_LIMIT = 1000
|
|
|
34
34
|
// 路径 → [上限行数, 为什么不拆/拆到哪一步]
|
|
35
35
|
const GRANDFATHERED = new Map([
|
|
36
36
|
['dsh/client.js', [
|
|
37
|
-
|
|
37
|
+
1548,
|
|
38
38
|
'web 设置面板单页(接入/工具/密钥/研究/高级五段 UI + 状态机);' +
|
|
39
|
-
'2026-11-
|
|
39
|
+
'2026-11-09 同步新增独立引擎(mojeek、repology 等)声明密钥至 1,548;' +
|
|
40
40
|
'拆分候选:把各段表单渲染抽成 render-* 模块,状态机留在本文件',
|
|
41
41
|
]],
|
|
42
42
|
])
|