argo-search 2.15.0 → 2.17.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/AGENTS.md +3 -1
- package/README.es.md +32 -5
- package/README.ja.md +32 -5
- package/README.ko.md +32 -5
- package/README.md +73 -19
- package/README.zh.md +73 -19
- package/SKILL.md +7 -7
- package/assets/readme/counts.json +1 -1
- package/assets/readme/hero.svg +3 -3
- package/assets/readme/hero.template.svg +121 -0
- package/assets/readme/proof-routes.svg +17 -16
- package/backends/domain_profiles.json +222 -24
- package/backends/engine_registry.yaml +26 -2
- package/backends/env_passthrough.txt +2 -0
- package/backends/quota_profiles.json +23 -3
- package/bin/argo +3 -0
- package/config.yaml +16 -0
- package/docs/CHANGELOG.md +31 -0
- package/docs/COMMIT_STANDARD.md +10 -0
- package/docs/ENGINE_CATALOG.md +40 -37
- package/docs/MCP_SETUP.md +9 -0
- package/docs/RELEASE_NOTES_v2.16.0.md +58 -0
- package/docs/RELEASE_NOTES_v2.17.0.md +64 -0
- package/docs/RELEASING.md +1 -1
- package/engines/specs/archive_org.yaml +1 -1
- package/engines/specs/carbon_intensity.yaml +1 -1
- package/engines/specs/crates.yaml +1 -1
- package/engines/specs/crossref.yaml +6 -2
- package/engines/specs/crt_sh.yaml +1 -1
- package/engines/specs/dblp.yaml +1 -1
- package/engines/specs/devto.yaml +1 -1
- package/engines/specs/docker_hub.yaml +1 -1
- package/engines/specs/europepmc.yaml +1 -1
- package/engines/specs/fxtwitter.yaml +1 -1
- package/engines/specs/gbfs_nyc.yaml +1 -1
- package/engines/specs/gleif.yaml +1 -1
- package/engines/specs/gov_regulations.yaml +1 -1
- package/engines/specs/hackernews.yaml +2 -0
- package/engines/specs/helve.yaml +49 -0
- package/engines/specs/hf_datasets.yaml +1 -1
- package/engines/specs/hf_papers.yaml +2 -0
- package/engines/specs/huggingface.yaml +1 -1
- package/engines/specs/keenable.yaml +7 -1
- package/engines/specs/linux_do.yaml +63 -0
- package/engines/specs/local_crossref.yaml +3 -1
- package/engines/specs/local_github.yaml +1 -1
- package/engines/specs/local_npm.yaml +6 -0
- package/engines/specs/local_openstreetmap.yaml +1 -1
- package/engines/specs/maven.yaml +1 -1
- package/engines/specs/mdn.yaml +1 -1
- package/engines/specs/musicbrainz.yaml +1 -1
- package/engines/specs/nasa_images.yaml +1 -1
- package/engines/specs/nhtsa_vpic.yaml +6 -3
- package/engines/specs/npm.yaml +1 -1
- package/engines/specs/nuget.yaml +1 -1
- package/engines/specs/nvd.yaml +1 -1
- package/engines/specs/openalex.yaml +13 -4
- package/engines/specs/openreview.yaml +1 -1
- package/engines/specs/polymarket.yaml +1 -1
- package/engines/specs/sec_edgar.yaml +1 -1
- package/engines/specs/steam.yaml +1 -1
- package/engines/specs/vam.yaml +1 -1
- package/engines/specs/wikidata.yaml +1 -1
- package/engines/specs/wikipedia.yaml +1 -1
- package/engines/specs/zhihu_hot_app.yaml +1 -1
- package/package.json +3 -1
- package/packages/dsh-plugin/README.md +5 -2
- package/packages/dsh-plugin/cordis.patch.yml +4 -1
- package/packages/dsh-plugin/dsh/client.js +69 -74
- package/packages/dsh-plugin/dsh/diagnostics.js +25 -4
- package/packages/dsh-plugin/dsh/index.js +115 -21
- package/packages/dsh-plugin/dsh/route-guard.js +95 -0
- package/packages/dsh-plugin/dsh/runner.js +50 -7
- package/packages/dsh-plugin/dsh/wide-research.js +20 -18
- package/packages/dsh-plugin/dsh/workbench-client.js +895 -0
- package/packages/dsh-plugin/dsh/workbench-io.js +163 -0
- package/packages/dsh-plugin/dsh/workbench-md.js +386 -0
- package/packages/dsh-plugin/dsh/workbench-search.js +385 -0
- package/packages/dsh-plugin/dsh/workbench-suggestions.js +460 -0
- package/packages/dsh-plugin/dsh/workbench.js +703 -0
- package/packages/dsh-plugin/icon.svg +23 -0
- package/packages/dsh-plugin/package.json +6 -3
- package/packages/dsh-plugin/scripts/sync-local.mjs +4 -2
- package/packages/dsh-plugin/scripts/sync-local.sh +4 -2
- package/packages/dsh-plugin/test/client.test.js +26 -0
- package/packages/dsh-plugin/test/diagnostics.test.js +5 -2
- package/packages/dsh-plugin/test/index.test.js +150 -1
- package/packages/dsh-plugin/test/workbench-concurrency.test.js +98 -0
- package/packages/dsh-plugin/test/workbench.test.js +420 -0
- package/scripts/adaptive.py +13 -11
- package/scripts/argo_paths.py +2 -2
- package/scripts/badcase_ledger.py +9 -0
- package/scripts/browser_auth.py +178 -4
- package/scripts/cache.py +69 -70
- package/scripts/check_commit_report.py +46 -0
- package/scripts/chrome_cdp.py +71 -0
- package/scripts/circuit_breaker.py +91 -13
- package/scripts/config_cache.py +23 -10
- package/scripts/daemon.py +14 -2
- package/scripts/engine_add.py +45 -0
- package/scripts/engine_dispatch.py +32 -49
- package/scripts/engine_env.py +13 -4
- package/scripts/engine_failure.py +33 -0
- package/scripts/engine_fingerprint.py +114 -0
- package/scripts/engine_health.py +130 -0
- package/scripts/engine_states.py +50 -0
- package/scripts/engines_base.py +31 -19
- package/scripts/engines_builders_archive.py +4 -3
- package/scripts/engines_builders_batch11.py +2 -1
- package/scripts/engines_builders_batch13.py +4 -3
- package/scripts/engines_builders_batch14.py +2 -1
- package/scripts/engines_builders_batch15.py +2 -1
- package/scripts/engines_builders_batch9.py +2 -2
- package/scripts/engines_builders_cn.py +7 -7
- package/scripts/engines_builders_data.py +12 -11
- package/scripts/engines_builders_data_macro.py +5 -4
- package/scripts/engines_builders_dsh.py +2 -1
- package/scripts/engines_builders_feeds.py +34 -19
- package/scripts/engines_builders_finance.py +2 -1
- package/scripts/engines_builders_intl.py +3 -2
- package/scripts/engines_builders_media.py +59 -12
- package/scripts/engines_builders_science.py +8 -7
- package/scripts/engines_builders_search.py +19 -8
- package/scripts/engines_builders_skill.py +2 -1
- package/scripts/engines_builders_tech.py +19 -19
- package/scripts/engines_builders_weather.py +9 -4
- package/scripts/engines_fields.py +23 -0
- package/scripts/engines_http.py +50 -1
- package/scripts/engines_mcp.py +28 -6
- package/scripts/evidence_grounding.py +182 -0
- package/scripts/evidence_loop.py +15 -1
- package/scripts/extend_route_labels.py +6 -0
- package/scripts/fetch_browser.py +25 -10
- package/scripts/fetch_jina.py +98 -0
- package/scripts/fetch_v3.py +52 -93
- package/scripts/gate_manifest_check.py +75 -0
- package/scripts/gen_readme_art.py +264 -0
- package/scripts/image_vision/vision_probe +0 -0
- package/scripts/install.sh +2 -0
- package/scripts/matrix_search_eval.py +8 -10
- package/scripts/mcp_transport.py +33 -9
- package/scripts/numeric_verify.py +12 -2
- package/scripts/output_transparency.py +3 -0
- package/scripts/pre-commit +57 -8
- package/scripts/query_operators.py +229 -1
- package/scripts/quota.py +46 -63
- package/scripts/recovery.py +19 -16
- package/scripts/recovery_runner.py +29 -10
- package/scripts/redskill/redskill_engine.py +2 -1
- package/scripts/release.py +16 -1
- package/scripts/research_gates.py +85 -1
- package/scripts/route.py +8 -0
- package/scripts/route_combo.py +24 -3
- package/scripts/route_policy.py +1 -1
- package/scripts/search_attribution.py +20 -0
- package/scripts/search_entry.py +27 -0
- package/scripts/search_output.py +18 -7
- package/scripts/search_pipeline.py +3 -3
- package/scripts/semantic_evidence.py +20 -11
- package/scripts/serp_guard.py +13 -1
- package/scripts/settings_page.py +1 -0
- package/scripts/single_flight.py +1 -1
- package/scripts/social_engines/hackernews_engine.py +2 -1
- package/scripts/social_engines/reddit_engine.py +2 -1
- package/scripts/social_engines/zhihu_engine.py +2 -1
- package/scripts/source_audit.py +42 -7
- package/scripts/source_discovery.py +611 -0
- package/scripts/sync_backends.py +45 -0
- package/scripts/usage_log.py +24 -9
- package/scripts/watch.py +3 -3
- package/scripts/zhihu_quota.py +2 -1
- package/sub-skills/argo-wide-research/SKILL.md +7 -5
- package/sub-skills/ego-search/{SKILL.md → README.md} +24 -47
- package/sub-skills/ego-search/scripts/ego_search.py +195 -19
- package/sub-skills/ego-search/scripts/pacing.py +291 -0
- package/sub-skills/ego-search/scripts/quality.py +262 -6
- package/sub-skills/ego-search/scripts/runtime.py +7 -1
- package/sub-skills/ego-search/scripts/site_profiles.py +157 -0
- package/sub-skills/ego-search/scripts/webbridge_adapter.py +7 -1
- package/sub-skills/js-run/{SKILL.md → README.md} +3 -20
- package/sub-skills/local-search/{SKILL.md → README.md} +3 -8
- package/sub-skills/local-search/engine_registry.py +32 -7
- package/sub-skills/local-seek/SKILL.md +20 -22
|
@@ -17,6 +17,7 @@ import os
|
|
|
17
17
|
import sys
|
|
18
18
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
19
19
|
from net_proxy import http_get # noqa: E402
|
|
20
|
+
from engines_http import UA # noqa: E402
|
|
20
21
|
|
|
21
22
|
HN_API = "https://hn.algolia.com/api/v1/search"
|
|
22
23
|
|
|
@@ -32,7 +33,7 @@ def search(query: str, n: int = 5) -> list[dict[str, Any]]:
|
|
|
32
33
|
})
|
|
33
34
|
url = f"{HN_API}?{params}"
|
|
34
35
|
try:
|
|
35
|
-
body, _ = http_get(url, {"User-Agent":
|
|
36
|
+
body, _ = http_get(url, {"User-Agent": UA,
|
|
36
37
|
"Accept": "application/json"})
|
|
37
38
|
data = json.loads(body.decode("utf-8"))
|
|
38
39
|
except Exception as e:
|
|
@@ -22,6 +22,7 @@ import os
|
|
|
22
22
|
import sys
|
|
23
23
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
24
24
|
from net_proxy import http_get # noqa: E402
|
|
25
|
+
from engines_http import UA # noqa: E402
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
_ATOM_NS = {"atom": "http://www.w3.org/2005/Atom"}
|
|
@@ -39,7 +40,7 @@ def search_reddit_api(query: str, n: int = 5) -> list[dict]:
|
|
|
39
40
|
try:
|
|
40
41
|
# 单次 GET(stdlib,不重试):无 key 端点按 IP「一次一发」,2026-10 实测
|
|
41
42
|
# 首次 200 后即连续 429、Retry-After 达分钟级,短间隔重试必然再 429。
|
|
42
|
-
body, _ = http_get(url, {"User-Agent":
|
|
43
|
+
body, _ = http_get(url, {"User-Agent": UA}, timeout=10)
|
|
43
44
|
return _parse_reddit_rss(body, n)
|
|
44
45
|
except Exception as e:
|
|
45
46
|
# 吞异常返空会让 MCP 社交搜索把网络故障静默报成「平台成功、0 结果」
|
|
@@ -22,6 +22,7 @@ from typing import Any
|
|
|
22
22
|
import sys as _sys
|
|
23
23
|
_sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
24
24
|
from net_proxy import http_get # noqa: E402
|
|
25
|
+
from engines_http import UA # noqa: E402
|
|
25
26
|
|
|
26
27
|
ZHIHU_API = "https://developer.zhihu.com/api/v1/content/zhihu_search"
|
|
27
28
|
ZHIHU_QUESTION_ANSWERS_API = "https://developer.zhihu.com/api/v1/content/question_answers"
|
|
@@ -96,7 +97,7 @@ def zhihu_headers(secret: str) -> dict[str, str]:
|
|
|
96
97
|
"Authorization": f"Bearer {secret}",
|
|
97
98
|
"Content-Type": "application/json",
|
|
98
99
|
"X-Request-Timestamp": str(int(time.time())),
|
|
99
|
-
"User-Agent":
|
|
100
|
+
"User-Agent": UA,
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
|
package/scripts/source_audit.py
CHANGED
|
@@ -11,11 +11,17 @@ spec、派生件、文档、测试。
|
|
|
11
11
|
|
|
12
12
|
## 判据(第一性原理:价值 = 命中率 × 结果质量 / 成本)
|
|
13
13
|
|
|
14
|
-
- `route_hits`:过去 N
|
|
15
|
-
- `result_rate
|
|
14
|
+
- `route_hits`:过去 N 天被路由命中**或**在真实查询里被调用的次数
|
|
15
|
+
- `result_rate`:被调用后返回非空结果的比例
|
|
16
16
|
- `value_score`:route_hits × result_rate(命中率 × 交付率)
|
|
17
17
|
- `cost`:总调用成本(按 spec.cost_per_call 累加)
|
|
18
18
|
|
|
19
|
+
`route_hits` 必须由两路证据合并,不能只看 route 流:route 流是**采样**日志
|
|
20
|
+
(默认 1/20),而 query 流是每次搜索都写。只认 route 流时,采样一断
|
|
21
|
+
(2026-11-12 至 11-15 生产日志实测零条)就会把全部源判成「0 次命中」——
|
|
22
|
+
实测 163 个源被建议停用,其中 69 个在 query 流里有真实调用记录。
|
|
23
|
+
query 流的 `engines_used` 是「这次搜索真的打了它」,比采样命中更强的证据。
|
|
24
|
+
|
|
19
25
|
去留规则:
|
|
20
26
|
- 90 天 route_hits == 0 且非显式专用 → 建议停用(demote)
|
|
21
27
|
- 90 天 value_score < 5 且非显式专用 → 建议降级为 explicit_only(review)
|
|
@@ -106,23 +112,35 @@ def _load_route_log(days: int) -> list[dict]:
|
|
|
106
112
|
return rows
|
|
107
113
|
|
|
108
114
|
|
|
115
|
+
def _query_fingerprint(row: dict[str, Any]) -> str:
|
|
116
|
+
"""查询指纹:同一查询的多次重跑算一次命中,避免 route_hits 被刷虚高。
|
|
117
|
+
|
|
118
|
+
用 query 原文(已由 usage_log 脱敏)+ 域,不做哈希:日志在本机、不进报告,
|
|
119
|
+
可读性比省几个字节有用。字段缺失时退回 ts,保证每条都拿到稳定值。
|
|
120
|
+
"""
|
|
121
|
+
q = str(row.get("query") or "").strip()
|
|
122
|
+
if q:
|
|
123
|
+
return f"{q}\x00{row.get('domain') or ''}"
|
|
124
|
+
return str(row.get("ts") or "")
|
|
125
|
+
|
|
126
|
+
|
|
109
127
|
def _engine_usage(days: int = 90) -> dict[str, dict[str, Any]]:
|
|
110
128
|
"""统计每个引擎的使用情况。"""
|
|
111
129
|
queries = _load_query_log(days)
|
|
112
130
|
routes = _load_route_log(days)
|
|
113
131
|
|
|
114
132
|
stats: dict[str, dict[str, Any]] = defaultdict(lambda: {
|
|
115
|
-
"route_hits": 0, "
|
|
116
|
-
"domains": set(),
|
|
133
|
+
"route_hits": 0, "sampled_hits": 0, "calls": 0, "results": 0,
|
|
134
|
+
"errors": 0, "domains": set(), "hit_fps": set(),
|
|
117
135
|
})
|
|
118
136
|
|
|
119
|
-
# route
|
|
137
|
+
# route 流:被路由命中(**采样**日志,1/20)
|
|
120
138
|
for r in routes:
|
|
121
139
|
engines = r.get("engines") or r.get("engines_used") or []
|
|
122
140
|
if isinstance(engines, str):
|
|
123
141
|
engines = [engines]
|
|
124
142
|
for e in engines:
|
|
125
|
-
stats[e]["
|
|
143
|
+
stats[e]["sampled_hits"] += 1
|
|
126
144
|
dom = r.get("domain")
|
|
127
145
|
if dom:
|
|
128
146
|
stats[e]["domains"].add(dom)
|
|
@@ -140,6 +158,14 @@ def _engine_usage(days: int = 90) -> dict[str, dict[str, Any]]:
|
|
|
140
158
|
er = r.get("engine_results") or {}
|
|
141
159
|
for e in used:
|
|
142
160
|
stats[e]["calls"] += 1
|
|
161
|
+
# 实调用同样计入 route_hits:engines_used 是「这次真的打了它」,
|
|
162
|
+
# 比采样命中更强的证据。去重按 (查询指纹, 引擎) ——同一查询重跑
|
|
163
|
+
# 多次(缓存失效、A/B 复跑)不该把命中数刷成虚高。
|
|
164
|
+
_fp = _query_fingerprint(r)
|
|
165
|
+
_seen = stats[e]["hit_fps"]
|
|
166
|
+
if _fp not in _seen:
|
|
167
|
+
_seen.add(_fp)
|
|
168
|
+
stats[e]["route_hits"] += 1
|
|
143
169
|
# 优先用 engine_results(精确),缺失时用 count > 0(粗)
|
|
144
170
|
n = er.get(e)
|
|
145
171
|
if isinstance(n, int):
|
|
@@ -187,7 +213,14 @@ def audit(days: int = 90, verbose: bool = False) -> dict[str, Any]:
|
|
|
187
213
|
cost_per_call = spec.get("cost_per_call", 0.0) or 0.0
|
|
188
214
|
|
|
189
215
|
u = usage.get(name, {})
|
|
190
|
-
|
|
216
|
+
# 两路证据相加:route 流是采样命中,query 流是按查询去重后的实调用。
|
|
217
|
+
# 跨源无法去重——route 记录按设计不含 query 原文(只有 domain/engines),
|
|
218
|
+
# 同一查询若同时被采样命中又实调用会被计两次。对「去留判定」而言,
|
|
219
|
+
# 多计只会让源更不容易被误停用,方向是安全的:本模块此前的问题正是
|
|
220
|
+
# 反向(少计 → 163 个源被建议停用,其中 69 个有真实调用)。
|
|
221
|
+
sampled_hits = u.get("sampled_hits", 0)
|
|
222
|
+
flow_hits = u.get("route_hits", 0)
|
|
223
|
+
route_hits = sampled_hits + flow_hits
|
|
191
224
|
calls = u.get("calls", 0)
|
|
192
225
|
results = u.get("results", 0)
|
|
193
226
|
errors = u.get("errors", 0)
|
|
@@ -200,6 +233,8 @@ def audit(days: int = 90, verbose: bool = False) -> dict[str, Any]:
|
|
|
200
233
|
"explicit_only": explicit,
|
|
201
234
|
"enabled": enabled,
|
|
202
235
|
"route_hits": route_hits,
|
|
236
|
+
"sampled_hits": sampled_hits,
|
|
237
|
+
"flow_hits": flow_hits,
|
|
203
238
|
"calls": calls,
|
|
204
239
|
"results": results,
|
|
205
240
|
"errors": errors,
|