argo-search 2.14.0 → 2.15.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.
Files changed (207) hide show
  1. package/AGENTS.md +8 -6
  2. package/README.es.md +56 -824
  3. package/README.ja.md +55 -825
  4. package/README.ko.md +55 -823
  5. package/README.md +128 -868
  6. package/README.zh.md +206 -0
  7. package/SKILL.md +17 -18
  8. package/assets/readme/counts.json +1 -1
  9. package/assets/readme/hero.svg +23 -23
  10. package/backends/concept_vectors.bin +0 -0
  11. package/backends/domain_profiles.json +66 -0
  12. package/backends/engine_concept_vectors.json +1525 -1525
  13. package/backends/engine_registry.yaml +193 -46
  14. package/backends/quota_profiles.json +110 -0
  15. package/bin/argo +30 -17
  16. package/config.yaml +196 -36
  17. package/docs/ADDING_NEW_ENGINE.md +10 -0
  18. package/docs/ARGO_INTRO.md +1 -1
  19. package/docs/CHANGELOG.md +45 -0
  20. package/docs/ENGINE_CATALOG.md +128 -112
  21. package/docs/MCP_SETUP.md +2 -2
  22. package/docs/RELEASE_NOTES_v2.14.0.md +12 -1
  23. package/docs/RELEASE_NOTES_v2.14.1.md +80 -0
  24. package/docs/RELEASE_NOTES_v2.15.0.md +50 -0
  25. package/docs/RELEASING.md +53 -1
  26. package/engines/specs/ai_labs.yaml +89 -0
  27. package/engines/specs/artic.yaml +11 -1
  28. package/engines/specs/bilibili_hot.yaml +11 -1
  29. package/engines/specs/brave.yaml +3 -3
  30. package/engines/specs/cisa_alerts.yaml +40 -0
  31. package/engines/specs/cleveland.yaml +15 -1
  32. package/engines/specs/clinicaltrials.yaml +16 -1
  33. package/engines/specs/cn_ai_news.yaml +10 -8
  34. package/engines/specs/cnii.yaml +15 -4
  35. package/engines/specs/deezer.yaml +12 -1
  36. package/engines/specs/digup.yaml +11 -6
  37. package/engines/specs/doaj.yaml +14 -1
  38. package/engines/specs/douyin_hot.yaml +11 -1
  39. package/engines/specs/dw_news.yaml +4 -2
  40. package/engines/specs/endoflife.yaml +16 -1
  41. package/engines/specs/eng_blogs.yaml +63 -0
  42. package/engines/specs/eu_opendata.yaml +11 -1
  43. package/engines/specs/europeana.yaml +22 -5
  44. package/engines/specs/feed.yaml +62 -0
  45. package/engines/specs/felo.yaml +3 -3
  46. package/engines/specs/figshare.yaml +12 -1
  47. package/engines/specs/firecrawl.yaml +3 -0
  48. package/engines/specs/fourget.yaml +5 -2
  49. package/engines/specs/france24.yaml +6 -4
  50. package/engines/specs/fxtwitter.yaml +29 -6
  51. package/engines/specs/grepapp_mcp.yaml +62 -0
  52. package/engines/specs/guardian_rss.yaml +6 -4
  53. package/engines/specs/hackernews.yaml +17 -2
  54. package/engines/specs/hal.yaml +19 -1
  55. package/engines/specs/hf_datasets.yaml +59 -0
  56. package/engines/specs/hf_papers.yaml +17 -1
  57. package/engines/specs/itotii.yaml +13 -1
  58. package/engines/specs/jikan.yaml +12 -10
  59. package/engines/specs/kaggle.yaml +5 -3
  60. package/engines/specs/lobsters.yaml +41 -0
  61. package/engines/specs/local_seek.yaml +6 -0
  62. package/engines/specs/maven.yaml +61 -0
  63. package/engines/specs/nasa_cmr.yaml +12 -1
  64. package/engines/specs/nuget.yaml +57 -0
  65. package/engines/specs/open_meteo.yaml +1 -1
  66. package/engines/specs/redskill.yaml +2 -0
  67. package/engines/specs/searxng.yaml +4 -2
  68. package/engines/specs/sec_edgar.yaml +8 -3
  69. package/engines/specs/tatoeba.yaml +14 -1
  70. package/engines/specs/tinyfish.yaml +2 -0
  71. package/engines/specs/tinyfish_news.yaml +2 -0
  72. package/engines/specs/tinyfish_paper.yaml +2 -0
  73. package/engines/specs/toutiao_hot.yaml +11 -1
  74. package/engines/specs/train.yaml +3 -0
  75. package/engines/specs/tvmaze.yaml +5 -1
  76. package/engines/specs/twitter.yaml +4 -0
  77. package/engines/specs/unpaywall.yaml +6 -0
  78. package/engines/specs/usda.yaml +14 -1
  79. package/engines/specs/vam.yaml +17 -3
  80. package/engines/specs/weibo_hot.yaml +11 -1
  81. package/engines/specs/wolframalpha.yaml +3 -3
  82. package/engines/specs/xiaohongshu.yaml +2 -0
  83. package/engines/specs/zhihu.yaml +3 -18
  84. package/engines/specs/zhihu_kb.yaml +18 -0
  85. package/engines/specs/zhihu_questions.yaml +19 -0
  86. package/package.json +4 -2
  87. package/packages/dsh-plugin/README.md +9 -14
  88. package/packages/dsh-plugin/dsh/client.js +467 -1024
  89. package/packages/dsh-plugin/dsh/diagnostics.js +71 -20
  90. package/packages/dsh-plugin/dsh/native-tools.mjs +61 -113
  91. package/packages/dsh-plugin/dsh/runner.js +2 -0
  92. package/packages/dsh-plugin/dsh/wide-research.js +1 -1
  93. package/packages/dsh-plugin/package.json +8 -3
  94. package/packages/dsh-plugin/scripts/sync-local.mjs +87 -0
  95. package/packages/dsh-plugin/scripts/sync-local.sh +13 -1
  96. package/packages/dsh-plugin/test/diagnostics.test.js +38 -1
  97. package/packages/dsh-plugin/test/size-gate.test.js +2 -9
  98. package/scripts/adaptive.py +7 -1
  99. package/scripts/archive_run.py +112 -53
  100. package/scripts/argo_paths.py +40 -3
  101. package/scripts/badcase_ledger.py +153 -10
  102. package/scripts/build_concept_table.py +112 -55
  103. package/scripts/build_release_assets.sh +43 -15
  104. package/scripts/cache.py +5 -1
  105. package/scripts/caliber_isolation.py +60 -23
  106. package/scripts/circuit_breaker.py +56 -8
  107. package/scripts/cli_io.py +20 -2
  108. package/scripts/config_cache.py +31 -0
  109. package/scripts/daemon.py +146 -51
  110. package/scripts/dormant_ledger.py +239 -0
  111. package/scripts/engine_dispatch.py +3 -3
  112. package/scripts/engine_env.py +182 -1
  113. package/scripts/engine_families.py +50 -7
  114. package/scripts/engine_states.py +9 -51
  115. package/scripts/engine_validate.py +150 -6
  116. package/scripts/engines.py +15 -67
  117. package/scripts/engines_base.py +68 -124
  118. package/scripts/engines_builders.py +0 -51
  119. package/scripts/engines_builders_batch10.py +346 -100
  120. package/scripts/engines_builders_batch11.py +2 -75
  121. package/scripts/engines_builders_batch9.py +15 -228
  122. package/scripts/engines_builders_cn.py +0 -194
  123. package/scripts/engines_builders_feeds.py +203 -35
  124. package/scripts/engines_builders_intl.py +15 -443
  125. package/scripts/engines_builders_pixiv.py +2 -16
  126. package/scripts/engines_builders_science.py +0 -85
  127. package/scripts/engines_builders_search.py +7 -14
  128. package/scripts/engines_builders_tech.py +5 -112
  129. package/scripts/engines_builders_weather.py +236 -0
  130. package/scripts/engines_fields.py +91 -0
  131. package/scripts/engines_http.py +135 -0
  132. package/scripts/engines_mcp.py +383 -0
  133. package/scripts/engines_parsers.py +196 -27
  134. package/scripts/engines_schema_drift.py +260 -0
  135. package/scripts/evidence.py +13 -0
  136. package/scripts/evidence_loop.py +93 -5
  137. package/scripts/fetch_jsrun.py +15 -11
  138. package/scripts/fetch_v3.py +28 -28
  139. package/scripts/fulltext_store.py +42 -1
  140. package/scripts/fxtwitter_api.py +8 -7
  141. package/scripts/gen_engine_catalog.py +4 -4
  142. package/scripts/gen_native_tools.py +2 -1
  143. package/scripts/general_pool.py +15 -4
  144. package/scripts/health_check.py +1 -1
  145. package/scripts/link_source.py +65 -24
  146. package/scripts/local_intent.py +51 -15
  147. package/scripts/local_seek.py +37 -4
  148. package/scripts/local_seek_adapter.py +57 -17
  149. package/scripts/mcp_handlers.py +173 -99
  150. package/scripts/mcp_handlers_surface.py +6 -18
  151. package/scripts/mcp_server.py +1 -1
  152. package/scripts/mcp_tools.py +143 -61
  153. package/scripts/mcp_transport.py +42 -10
  154. package/scripts/min_version_scan.py +7 -3
  155. package/scripts/network_aware.py +7 -13
  156. package/scripts/pre-commit +57 -31
  157. package/scripts/query_understanding.py +30 -6
  158. package/scripts/quota.py +6 -1
  159. package/scripts/rank_signals.py +9 -0
  160. package/scripts/recompute.py +15 -5
  161. package/scripts/recovery.py +21 -15
  162. package/scripts/release.py +29 -32
  163. package/scripts/release_check.py +6 -26
  164. package/scripts/replay_eval.py +2 -2
  165. package/scripts/research_cli.py +40 -0
  166. package/scripts/research_notes.py +368 -0
  167. package/scripts/route.py +32 -70
  168. package/scripts/route_audit.py +259 -0
  169. package/scripts/route_combo.py +10 -4
  170. package/scripts/route_domains.py +150 -23
  171. package/scripts/route_lang.py +20 -7
  172. package/scripts/route_log.py +26 -9
  173. package/scripts/route_policy.py +91 -7
  174. package/scripts/route_telemetry_export.py +199 -0
  175. package/scripts/rrf_classic.py +5 -22
  176. package/scripts/search.py +2 -1
  177. package/scripts/search_attribution.py +33 -10
  178. package/scripts/search_cli.py +44 -7
  179. package/scripts/search_entry.py +5 -1
  180. package/scripts/search_output.py +5 -4
  181. package/scripts/search_pipeline.py +12 -0
  182. package/scripts/search_rank.py +21 -11
  183. package/scripts/secret_guard.py +106 -0
  184. package/scripts/semantic_evidence.py +539 -117
  185. package/scripts/settings_page.py +83 -11
  186. package/scripts/social_engines/xiaohongshu_engine.py +2 -1
  187. package/scripts/social_engines/zhihu_engine.py +251 -43
  188. package/scripts/sogou_weixin_browser.py +5 -6
  189. package/scripts/source_audit.py +77 -0
  190. package/scripts/source_ledger.py +2 -15
  191. package/scripts/source_selection.py +45 -20
  192. package/scripts/straggler_policy.py +1 -2
  193. package/scripts/sync_backends.py +24 -0
  194. package/scripts/tfidf_router.py +23 -11
  195. package/scripts/time_utils.py +54 -1
  196. package/scripts/train.py +68 -2
  197. package/scripts/usage_log.py +26 -1
  198. package/sub-skills/argo-wide-research/SKILL.md +68 -0
  199. package/sub-skills/ego-search/SKILL.md +1 -1
  200. package/sub-skills/local-seek/scripts/seek_fts.py +67 -4
  201. package/README.en.md +0 -826
  202. package/scripts/caliber_dedupe.py +0 -66
  203. package/scripts/engines_builders_batch16.py +0 -186
  204. package/scripts/health_probe.py +0 -253
  205. package/scripts/image_vision/vision_probe +0 -0
  206. package/scripts/social_engines/twitter_engine.py +0 -514
  207. package/scripts/sync_installs.py +0 -29
@@ -12,45 +12,96 @@ import { join } from 'node:path'
12
12
  const MAX_BYTES = 1024 * 1024 // 显式读取上限 1MB,防超大日志文件撑爆内存
13
13
  const BYTE_LIMIT_GUARD = 'maxBytes guard: 1024 * 1024'
14
14
 
15
+ /**
16
+ * 解析 argo 运行时状态目录,遵循 argo_paths.py 跨平台约定:
17
+ * 显式参数 > ARGO_STATE_DIR > 已存在的 ~/.cache/unified-search >
18
+ * Windows LOCALAPPDATA / POSIX XDG_CACHE_HOME > ~/.cache/unified-search。
19
+ *
20
+ * @param {string} [stateDir]
21
+ */
22
+ export function resolveStateDir(stateDir) {
23
+ if (stateDir) return stateDir
24
+ if (process.env.ARGO_STATE_DIR) return process.env.ARGO_STATE_DIR
25
+ const legacyDir = join(homedir(), '.cache', 'unified-search')
26
+ if (existsSync(legacyDir)) return legacyDir
27
+ if (process.platform === 'win32' && process.env.LOCALAPPDATA) {
28
+ return join(process.env.LOCALAPPDATA, 'unified-search')
29
+ }
30
+ if (process.env.XDG_CACHE_HOME) {
31
+ return join(process.env.XDG_CACHE_HOME, 'unified-search')
32
+ }
33
+ return legacyDir
34
+ }
35
+
15
36
  /**
16
37
  * 读 argo 的本地使用日志,汇总成「路由观测」卡片数据。
17
38
  *
18
39
  * 数据来源与 stats_cli.py / usage_log.py 同一处(<state>/usage_log/*.jsonl),
19
- * 只读、不写、不出本机。argo 未运行过(无日志)时返回 { samples: [] },
20
- * 面板据此显示终端命令提示——不假装有数据。
40
+ * 只读、不写、不出本机。不回传 query 原文;仅解析 route.jsonl 真实字段并汇总
41
+ * 语言分布与兜底率。
21
42
  *
22
- * @param {string} [stateDir] - argo 状态目录;缺省用 ARGO_STATE_DIR 或平台惯例
23
- * @param {number} [limit] - 最近几条
43
+ * @param {string} [stateDir] - argo 状态目录;缺省走 resolveStateDir()
44
+ * @param {number} [limit] - 最近几条样本
24
45
  */
25
46
  export async function getRouteHealth(stateDir, limit = 10) {
26
- const dir = stateDir
27
- || process.env.ARGO_STATE_DIR
28
- || join(homedir(), '.cache', 'unified-search')
29
- const samples = []
47
+ const dir = resolveStateDir(stateDir)
48
+ const parsed = []
49
+ const langCounts = {}
50
+ const domainCounts = {}
51
+ let fallbackCount = 0
30
52
  try {
31
53
  const routePath = join(dir, 'usage_log', 'route.jsonl')
32
54
  if (existsSync(routePath)) {
33
55
  const text = await fs.readFile(routePath, 'utf8')
34
56
  const truncated = text.length > MAX_BYTES ? text.slice(-MAX_BYTES) : text
35
57
  const lines = truncated.split('\n').filter(Boolean)
36
- for (const line of lines.slice(-limit)) {
58
+ for (const line of lines) {
37
59
  try {
38
60
  const row = JSON.parse(line)
39
- if (row && typeof row === 'object') {
40
- samples.push({
41
- query: row.query || row.original_query || '',
42
- engine: row.engine || (row.decision && row.decision.engine) || '',
43
- domain: row.domain || (row.decision && row.decision.domain) || '',
44
- confidence: row.confidence || (row.decision && row.decision.confidence) || '',
45
- reason: row.reason || (row.decision && row.decision.reason) || '',
46
- ts: row.ts || row.timestamp || '',
47
- })
48
- }
61
+ if (!row || typeof row !== 'object') continue
62
+ const engine = row.engine || (row.decision && row.decision.engine) || ''
63
+ const engines = Array.isArray(row.engines)
64
+ ? row.engines
65
+ : (engine ? [engine] : [])
66
+ const domain = row.domain || (row.decision && row.decision.domain) || ''
67
+ const lang = row.effective_lang || row.lang_override || row.primary_lang || ''
68
+ const intents = Array.isArray(row.intents) ? row.intents : []
69
+ const confidence = row.confidence ?? (row.decision && row.decision.confidence) ?? ''
70
+ const mode = row.mode || ''
71
+ if (!domain) fallbackCount += 1
72
+ const langKey = lang || 'unknown'
73
+ langCounts[langKey] = (langCounts[langKey] || 0) + 1
74
+ const domKey = domain || 'fallback'
75
+ domainCounts[domKey] = (domainCounts[domKey] || 0) + 1
76
+ parsed.push({
77
+ domain,
78
+ engine,
79
+ engines,
80
+ primary_lang: row.primary_lang || '',
81
+ effective_lang: lang,
82
+ lang_override: row.lang_override || null,
83
+ intents,
84
+ confidence,
85
+ mode,
86
+ ts: row.ts || row.timestamp || '',
87
+ })
49
88
  } catch { /* 单行坏数据不影响其余 */ }
50
89
  }
51
90
  }
52
91
  } catch { /* 读不到就空 */ }
53
- return { samples, source: 'usage_log/route.jsonl', stateDir: dir }
92
+ const total = parsed.length
93
+ const samples = parsed.slice(-Math.max(1, limit))
94
+ const summary = {
95
+ total,
96
+ fallbackCount,
97
+ fallbackRate: total > 0 ? Number((fallbackCount / total).toFixed(3)) : 0,
98
+ langCounts,
99
+ topDomains: Object.entries(domainCounts)
100
+ .sort((a, b) => b[1] - a[1])
101
+ .slice(0, 5)
102
+ .map(([name, count]) => ({ name, count })),
103
+ }
104
+ return { samples, summary, source: 'usage_log/route.jsonl', stateDir: dir }
54
105
  }
55
106
 
56
107
  /**
@@ -12,7 +12,7 @@
12
12
  //
13
13
  export const NATIVE_TOOLS = {
14
14
  "argo_search": {
15
- "description": "统一网络搜索:多引擎融合、支持时间过滤与域名过滤,返回带来源与摘要的结果。查资料、找答案、搜新闻/学术/代码/多语言内容等通用场景的首选工具。",
15
+ "description": "统一搜索(网络/社交/招聘/本地):多引擎融合、支持时间过滤与域名过滤。默认网络搜索;按 domain 可切换社交 UGC、岗位招聘或本机文件。查资料、找答案、找人找帖的首选工具。",
16
16
  "parameters": {
17
17
  "type": "object",
18
18
  "properties": {
@@ -20,17 +20,23 @@ export const NATIVE_TOOLS = {
20
20
  "type": "string",
21
21
  "description": "搜索查询词"
22
22
  },
23
+ "domain": {
24
+ "type": "string",
25
+ "enum": [
26
+ "web",
27
+ "social",
28
+ "job",
29
+ "local"
30
+ ],
31
+ "description": "搜索领域:web 统一网络搜索(默认),social 社交媒体/论坛讨论,job 招聘岗位聚合,local 本机文件搜索"
32
+ },
23
33
  "engine": {
24
34
  "type": "string",
25
- "description": "指定搜索引擎(auto 自动选择;可选 octen/anysearch/exa/zhihu/eastmoney/arxiv/byted/bocha/tavily/deepseek_search/github/wikipedia/semantic_scholar/local_search 等;deepseek_search 为按次计费的官方 DeepSeek 搜索,结果带权威分级与发布时间,新闻时事类查询优先考虑)",
26
- "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 搜索,结果带权威分级与发布时间,新闻时事类查询优先考虑)"
27
36
  },
28
37
  "max_results": {
29
38
  "type": "integer",
30
- "description": "返回结果条数",
31
- "default": 5,
32
- "minimum": 1,
33
- "maximum": 20
39
+ "description": "返回结果条数(1-20,默认 5)"
34
40
  },
35
41
  "depth": {
36
42
  "type": "string",
@@ -39,8 +45,7 @@ export const NATIVE_TOOLS = {
39
45
  "balanced",
40
46
  "deep"
41
47
  ],
42
- "description": "搜索深度:fast 快、deep 全(慢)",
43
- "default": "fast"
48
+ "description": "搜索深度:fast 快、deep 全(慢),默认 fast"
44
49
  },
45
50
  "mode": {
46
51
  "type": "string",
@@ -48,10 +53,10 @@ export const NATIVE_TOOLS = {
48
53
  "fast",
49
54
  "auto",
50
55
  "deep",
51
- "budget"
56
+ "budget",
57
+ "sentiment"
52
58
  ],
53
- "description": "预算模式:fast=免费优先, auto=成本感知, deep=质量优先, budget=配额控制",
54
- "default": "auto"
59
+ "description": "预算模式:fast=免费优先, auto=成本感知, deep=质量优先, budget=配额控制,默认 auto;仅 domain=social 时可写 sentiment(舆情聚合),其余 domain 不认"
55
60
  },
56
61
  "since": {
57
62
  "type": "string",
@@ -68,34 +73,29 @@ export const NATIVE_TOOLS = {
68
73
  "oldest",
69
74
  "newest"
70
75
  ],
71
- "description": "排序:relevance=相关度, oldest=最早在前, newest=最新在前",
72
- "default": "relevance"
76
+ "description": "排序:relevance=相关度, oldest=最早在前, newest=最新在前,默认 relevance"
73
77
  },
74
78
  "include_domains": {
75
79
  "type": "array",
76
80
  "items": {
77
81
  "type": "string"
78
82
  },
79
- "description": "仅保留这些域名(含子域),如 [\"github.com\"]",
80
- "default": []
83
+ "description": "仅保留这些域名(含子域),如 [\"github.com\"]"
81
84
  },
82
85
  "exclude_domains": {
83
86
  "type": "array",
84
87
  "items": {
85
88
  "type": "string"
86
89
  },
87
- "description": "排除这些域名(含子域),如 [\"pinterest.com\"]",
88
- "default": []
90
+ "description": "排除这些域名(含子域),如 [\"pinterest.com\"]"
89
91
  },
90
92
  "include_local": {
91
93
  "type": "boolean",
92
- "description": "并入本机文件命中(seek 结果尾部,source=local_files,不参与融合评分;默认开)",
93
- "default": true
94
+ "description": "并入本机文件命中(seek 结果尾部,source=local_files,不参与融合评分;默认开)"
94
95
  },
95
96
  "summary": {
96
97
  "type": "boolean",
97
- "description": "精简输出:截断摘要、去掉重字段,省 token",
98
- "default": true
98
+ "description": "精简输出:截断摘要、去掉重字段,省 token(默认开)"
99
99
  }
100
100
  },
101
101
  "required": [
@@ -105,6 +105,7 @@ export const NATIVE_TOOLS = {
105
105
  },
106
106
  "allowed": [
107
107
  "query",
108
+ "domain",
108
109
  "engine",
109
110
  "max_results",
110
111
  "depth",
@@ -129,20 +130,15 @@ export const NATIVE_TOOLS = {
129
130
  },
130
131
  "path": {
131
132
  "type": "string",
132
- "description": "搜索目录;缩小范围更快更准",
133
- "default": "~"
133
+ "description": "搜索目录;缩小范围更快更准(默认 \"~\")"
134
134
  },
135
135
  "max_results": {
136
136
  "type": "integer",
137
- "description": "返回结果条数",
138
- "default": 5,
139
- "minimum": 1,
140
- "maximum": 20
137
+ "description": "返回结果条数(1-20,默认 5)"
141
138
  },
142
139
  "exact": {
143
140
  "type": "boolean",
144
- "description": "精确匹配,关闭中文扩展",
145
- "default": false
141
+ "description": "精确匹配,关闭中文扩展(默认关)"
146
142
  }
147
143
  },
148
144
  "required": [
@@ -168,15 +164,11 @@ export const NATIVE_TOOLS = {
168
164
  },
169
165
  "max_chars": {
170
166
  "type": "integer",
171
- "description": "预览字符数上限",
172
- "default": 4000,
173
- "minimum": 200,
174
- "maximum": 20000
167
+ "description": "预览字符数上限(200-20000,默认 4000)"
175
168
  },
176
169
  "line_start": {
177
170
  "type": "integer",
178
- "description": "起始行号(1 基,可选)",
179
- "minimum": 1
171
+ "description": "起始行号(1 基,可选)"
180
172
  },
181
173
  "line_end": {
182
174
  "type": "integer",
@@ -210,20 +202,15 @@ export const NATIVE_TOOLS = {
210
202
  },
211
203
  "timeout_s": {
212
204
  "type": "integer",
213
- "description": "超时秒数",
214
- "default": 30,
215
- "minimum": 1,
216
- "maximum": 120
205
+ "description": "超时秒数(1-120,默认 30)"
217
206
  },
218
207
  "max_mem_mb": {
219
208
  "type": "integer",
220
- "description": "内存上限 MB(尽力而为)",
221
- "default": 512
209
+ "description": "内存上限 MB(尽力而为,默认 512)"
222
210
  },
223
211
  "allow_exec": {
224
212
  "type": "boolean",
225
- "description": "是否授权运行(不授权就不执行;未授权时返回 skipped_reason)",
226
- "default": false
213
+ "description": "是否授权运行(不授权就不执行;未授权时返回 skipped_reason,默认关)"
227
214
  }
228
215
  },
229
216
  "required": [
@@ -254,8 +241,7 @@ export const NATIVE_TOOLS = {
254
241
  },
255
242
  "max_results": {
256
243
  "type": "integer",
257
- "description": "自动搜索时的结果条数",
258
- "default": 10
244
+ "description": "自动搜索时的结果条数(默认 10)"
259
245
  }
260
246
  },
261
247
  "required": [
@@ -303,22 +289,15 @@ export const NATIVE_TOOLS = {
303
289
  "sitemap",
304
290
  "bfs"
305
291
  ],
306
- "description": "爬取策略",
307
- "default": "bfs"
292
+ "description": "爬取策略,默认 bfs"
308
293
  },
309
294
  "max_pages": {
310
295
  "type": "integer",
311
- "description": "最大抓取页数",
312
- "default": 10,
313
- "minimum": 1,
314
- "maximum": 50
296
+ "description": "最大抓取页数(1-50,默认 10)"
315
297
  },
316
298
  "max_depth": {
317
299
  "type": "integer",
318
- "description": "BFS 最大深度",
319
- "default": 2,
320
- "minimum": 1,
321
- "maximum": 5
300
+ "description": "BFS 最大深度(1-5,默认 2)"
322
301
  }
323
302
  },
324
303
  "required": [
@@ -334,22 +313,23 @@ export const NATIVE_TOOLS = {
334
313
  ]
335
314
  },
336
315
  "argo_fetch": {
337
- "description": "智能页面抓取:HTTP 优先,遇 Cloudflare/JS 渲染自动升级反检测浏览器。支持 BM25 聚焦提取(focus 省 80%+ token)与结构化提取(mode=extract 抽表格/元数据/JSON-LD)。",
316
+ "description": "智能页面/长文/PDF抓取:HTTP 优先,遇反爬自动升级反检测浏览器;微信公众号文章(mp.weixin.qq.com)与 PDF 自动感知适配解析;支持 BM25 聚焦提取(focus 省 80%+ token)与结构化提取(mode=extract 抽表格/元数据/JSON-LD)。通读正文与获取文档的首选工具。",
338
317
  "parameters": {
339
318
  "type": "object",
340
319
  "properties": {
341
320
  "url": {
342
321
  "type": "string",
343
- "description": "目标 URL"
322
+ "description": "目标 URL 或本地 PDF 路径"
344
323
  },
345
324
  "mode": {
346
325
  "type": "string",
347
326
  "enum": [
348
327
  "text",
349
- "extract"
328
+ "extract",
329
+ "article",
330
+ "pdf"
350
331
  ],
351
- "description": "text=正文/聚焦文本, extract=结构化提取",
352
- "default": "text"
332
+ "description": "抓取模式:text=正文/聚焦文本(默认 text), extract=结构化提取, article=公众号全文, pdf=PDF解析。微信与PDF链接自动识别"
353
333
  },
354
334
  "extract_mode": {
355
335
  "type": "string",
@@ -359,8 +339,7 @@ export const NATIVE_TOOLS = {
359
339
  "jsonld",
360
340
  "all"
361
341
  ],
362
- "description": "mode=extract 时的提取子模式",
363
- "default": "all"
342
+ "description": "mode=extract 时的提取子模式,默认 all"
364
343
  },
365
344
  "focus": {
366
345
  "type": "string",
@@ -368,20 +347,15 @@ export const NATIVE_TOOLS = {
368
347
  },
369
348
  "max_chars": {
370
349
  "type": "integer",
371
- "description": "返回正文最大字符数",
372
- "default": 8000,
373
- "minimum": 500,
374
- "maximum": 50000
350
+ "description": "返回正文最大字符数(500-50000,默认 8000)"
375
351
  },
376
352
  "use_browser": {
377
353
  "type": "boolean",
378
- "description": "强制用反检测浏览器(HTTP 失败时已自动升级)",
379
- "default": false
354
+ "description": "强制用反检测浏览器(HTTP 失败时已自动升级,默认关)"
380
355
  },
381
356
  "include_links": {
382
357
  "type": "boolean",
383
- "description": "附带正文内链接(最多 30 条;默认只回 links_count,省 token)",
384
- "default": false
358
+ "description": "附带正文内链接(最多 30 条;默认只回 links_count,省 token,默认关)"
385
359
  }
386
360
  },
387
361
  "required": [
@@ -410,8 +384,7 @@ export const NATIVE_TOOLS = {
410
384
  },
411
385
  "full_page": {
412
386
  "type": "boolean",
413
- "description": "全页截图(默认仅当前视口)",
414
- "default": false
387
+ "description": "全页截图(默认仅当前视口,默认关)"
415
388
  },
416
389
  "output_path": {
417
390
  "type": "string",
@@ -473,20 +446,15 @@ export const NATIVE_TOOLS = {
473
446
  "text",
474
447
  "sentiment"
475
448
  ],
476
- "description": "text=帖子列表, sentiment=舆情聚合分析",
477
- "default": "text"
449
+ "description": "text=帖子列表, sentiment=舆情聚合分析,默认 text"
478
450
  },
479
451
  "platforms": {
480
452
  "type": "string",
481
- "description": "平台列表,逗号分隔;可选 hackernews,v2ex,zhihu,bilibili,twitter,reddit,xiaohongshu,weibo",
482
- "default": "hackernews,zhihu,bilibili"
453
+ "description": "平台列表,逗号分隔;可选 hackernews,v2ex,zhihu,bilibili,twitter,reddit,xiaohongshu,weibo,默认 hackernews,zhihu,bilibili"
483
454
  },
484
455
  "max_results": {
485
456
  "type": "integer",
486
- "description": "每个平台的结果条数",
487
- "default": 5,
488
- "minimum": 1,
489
- "maximum": 20
457
+ "description": "每个平台的结果条数(1-20,默认 5)"
490
458
  }
491
459
  },
492
460
  "required": [
@@ -512,10 +480,7 @@ export const NATIVE_TOOLS = {
512
480
  },
513
481
  "max_chars": {
514
482
  "type": "integer",
515
- "description": "返回正文最大字符数",
516
- "default": 20000,
517
- "minimum": 500,
518
- "maximum": 50000
483
+ "description": "返回正文最大字符数(500-50000,默认 20000)"
519
484
  }
520
485
  },
521
486
  "required": [
@@ -543,27 +508,19 @@ export const NATIVE_TOOLS = {
543
508
  },
544
509
  "num": {
545
510
  "type": "integer",
546
- "description": "每后端条数",
547
- "default": 5,
548
- "minimum": 1,
549
- "maximum": 20
511
+ "description": "每后端条数(1-20,默认 5)"
550
512
  },
551
513
  "platforms": {
552
514
  "type": "string",
553
- "description": "逗号分隔平台: zhipin,liepin,zhaopin,51job,597,jrzp;空=全部",
554
- "default": ""
515
+ "description": "逗号分隔平台: zhipin,liepin,zhaopin,51job,597,jrzp;空=全部"
555
516
  },
556
517
  "loose": {
557
518
  "type": "boolean",
558
- "description": "宽松:异地岗位也保留;默认严格地区过滤",
559
- "default": false
519
+ "description": "宽松:异地岗位也保留;默认严格地区过滤(默认关)"
560
520
  },
561
521
  "fetch_detail": {
562
522
  "type": "integer",
563
- "description": "对前 N 条高命中结果抓详情页补全结构化字段(0=仅 snippet 提取)",
564
- "default": 0,
565
- "minimum": 0,
566
- "maximum": 10
523
+ "description": "对前 N 条高命中结果抓详情页补全结构化字段(0=仅 snippet 提取,范围 0-10,默认 0)"
567
524
  }
568
525
  },
569
526
  "required": [
@@ -597,15 +554,11 @@ export const NATIVE_TOOLS = {
597
554
  "jsonld",
598
555
  "all"
599
556
  ],
600
- "description": "提取内容:tables=HTML表格, metadata=Meta元数据, jsonld=JSON-LD, all=全部",
601
- "default": "all"
557
+ "description": "提取内容:tables=HTML表格, metadata=Meta元数据, jsonld=JSON-LD, all=全部,默认 all"
602
558
  },
603
559
  "max_chars": {
604
560
  "type": "integer",
605
- "description": "抓取页面最大字符数",
606
- "default": 50000,
607
- "minimum": 1000,
608
- "maximum": 200000
561
+ "description": "抓取页面最大字符数(1000-200000,默认 50000)"
609
562
  }
610
563
  },
611
564
  "required": [
@@ -629,13 +582,11 @@ export const NATIVE_TOOLS = {
629
582
  "items": {
630
583
  "type": "string"
631
584
  },
632
- "description": "待预检的 URL 列表",
633
- "minItems": 1
585
+ "description": "待预检的 URL 列表"
634
586
  },
635
587
  "probe": {
636
588
  "type": "boolean",
637
- "description": "联网探测存活(404/410 判死;默认纯本地规则)",
638
- "default": false
589
+ "description": "联网探测存活(404/410 判死;默认纯本地规则,默认关)"
639
590
  }
640
591
  },
641
592
  "required": [
@@ -698,8 +649,7 @@ export const NATIVE_TOOLS = {
698
649
  },
699
650
  "note": {
700
651
  "type": "string",
701
- "description": "备注(add 可选)",
702
- "default": ""
652
+ "description": "备注(add 可选,默认空)"
703
653
  }
704
654
  },
705
655
  "required": [
@@ -723,8 +673,7 @@ export const NATIVE_TOOLS = {
723
673
  "items": {
724
674
  "type": "string"
725
675
  },
726
- "description": "DOI 列表,如 [\"10.1038/s41586-024-0001-x\"]",
727
- "minItems": 1
676
+ "description": "DOI 列表,如 [\"10.1038/s41586-024-0001-x\"]"
728
677
  },
729
678
  "style": {
730
679
  "type": "string",
@@ -734,8 +683,7 @@ export const NATIVE_TOOLS = {
734
683
  "apa",
735
684
  "bibtex"
736
685
  ],
737
- "description": "引用格式",
738
- "default": "gbt7714"
686
+ "description": "引用格式,默认 gbt7714"
739
687
  }
740
688
  },
741
689
  "required": [
@@ -78,6 +78,7 @@ export const DEFAULTS = Object.freeze({
78
78
  'FELO_API_KEY',
79
79
  'FIRECRAWL_API_KEY',
80
80
  'FOURGET_URL',
81
+ 'GEMINI_API_KEY',
81
82
  'GITHUB_TOKEN',
82
83
  'KEENABLE_API_KEY',
83
84
  'METASO_API_KEY',
@@ -90,6 +91,7 @@ export const DEFAULTS = Object.freeze({
90
91
  'SEARXNG_URL',
91
92
  'SELTZ_API_KEY',
92
93
  'SERPAPI_API_KEY',
94
+ 'TYPESAFE_API_KEY',
93
95
  'UNPAYWALL_EMAIL',
94
96
  'WEB_SEARCH_API_KEY',
95
97
  'WEREAD_API_KEY',
@@ -645,7 +645,7 @@ export function createWideResearchTool(ctx, config, options = {}) {
645
645
  perspective: { type: 'string', description: 'Optional decomposition lens such as technical, market, policy, or skeptical review.' },
646
646
  file_inputs: { type: 'string', description: '本地一手数据文件 JSON 数组(白名单制):[{"path":"~/data/company.xlsx","role":"原始数据"}]。登记血缘(sha256/路径),内容不入账;供 recompute 重算。' },
647
647
  recompute: { type: 'string', description: '可复算契约 JSON 对象:{"script":"...","expect":"0.23左右","budget":{"timeout_s":30,"max_mem_mb":512}}。在编排器侧受限执行,验证重算数值。' },
648
- include_local: { type: 'boolean', description: 'worker 搜索时并入本机文件命中(argo_search include_local,默认 false)。', default: false },
648
+ include_local: { type: 'boolean', description: 'worker 搜索时并入本机文件命中(argo_search include_local,默认 false)。' },
649
649
  max_workers: { type: 'number', description: 'Requested concurrent workers. Defaults to the configured default and is capped by the configured maximum.' },
650
650
  response_language: { type: 'string', description: 'Language for the final report. Defaults to the question language.' },
651
651
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taxueseek/argo-dsh",
3
- "version": "2.14.0",
3
+ "version": "2.15.0",
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",
@@ -31,15 +31,20 @@
31
31
  "compatibility": {
32
32
  "dsh": "^0.2.0-rc.1 || ^0.2.1 || ^0.2.2-0",
33
33
  "dshReleases": {
34
- "0.2.2-rc.1": "compatible"
34
+ "0.2.2-rc.1": "compatible",
35
+ "0.2.2-rc.2": "compatible"
35
36
  }
36
37
  }
37
38
  },
38
39
  "engines": {
39
40
  "node": ">=18"
40
41
  },
42
+ "optionalDependencies": {
43
+ "@deepseek-ai/schemastery": "^3.19.0"
44
+ },
41
45
  "scripts": {
42
- "check": "node --check dsh/index.js && node --check dsh/specs.js && node --check dsh/runner.js && node --check dsh/wide-research.js && node --check dsh/diagnostics.js && node --check dsh/client.js",
46
+ "check": "node --check dsh/index.js && node --check dsh/specs.js && node --check dsh/runner.js && node --check dsh/wide-research.js && node --check dsh/diagnostics.js && node --check dsh/client.js && node --check scripts/sync-local.mjs",
47
+ "sync-local": "node scripts/sync-local.mjs",
43
48
  "typecheck": "npm run check",
44
49
  "test": "node --test test/*.test.js"
45
50
  }