argo-search 2.11.2 → 2.13.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/README.en.md +36 -21
- package/README.es.md +36 -21
- package/README.ja.md +39 -22
- package/README.ko.md +36 -21
- package/README.md +74 -51
- package/SKILL.md +8 -8
- package/assets/readme/counts.json +1 -0
- package/assets/readme/hero.svg +1 -1
- package/backends/domain_profiles.json +24 -0
- package/backends/engine_registry.yaml +59 -7
- package/backends/env_passthrough.txt +73 -0
- package/backends/quota_profiles.json +41 -1
- package/bin/argo +7 -0
- package/config.yaml +25 -3526
- package/docs/ARGO_INTRO.md +4 -3
- package/docs/CHANGELOG.md +314 -0
- package/docs/ENGINE_CATALOG.md +60 -56
- package/docs/MCP_SETUP.md +16 -4
- package/docs/QUALITY_OF_SLOW_SOURCES.md +115 -0
- package/docs/RELEASE_NOTES_v2.11.2.md +116 -0
- package/docs/RELEASE_NOTES_v2.12.0.md +65 -0
- package/docs/RELEASE_NOTES_v2.13.0.md +66 -0
- package/docs/RELEASING.md +47 -0
- package/docs//344/270/272/344/273/200/344/271/210/351/200/211/346/213/251argo.md +7 -7
- package/engines/specs/anysearch.yaml +33 -0
- package/engines/specs/archive_org.yaml +31 -0
- package/engines/specs/arxiv.yaml +18 -0
- package/engines/specs/baidu_baike.yaml +16 -0
- package/engines/specs/baidu_hot.yaml +19 -0
- package/engines/specs/bilibili.yaml +33 -0
- package/engines/specs/bilibili_hot.yaml +19 -0
- package/engines/specs/bing_rss.yaml +17 -0
- package/engines/specs/biorxiv.yaml +2 -0
- package/engines/specs/bocha.yaml +26 -0
- package/engines/specs/bocha_ai.yaml +27 -0
- package/engines/specs/brave.yaml +20 -0
- package/engines/specs/byted.yaml +33 -0
- package/engines/specs/clinicaltrials.yaml +15 -0
- package/engines/specs/cls_telegraph.yaml +19 -0
- package/engines/specs/cnii.yaml +16 -0
- package/engines/specs/cninfo.yaml +14 -0
- package/engines/specs/coingecko.yaml +25 -0
- package/engines/specs/courtlistener.yaml +15 -0
- package/engines/specs/crates.yaml +30 -0
- package/engines/specs/crossref.yaml +27 -0
- package/engines/specs/csdn.yaml +18 -0
- package/engines/specs/dblp.yaml +29 -0
- package/engines/specs/devto.yaml +26 -0
- package/engines/specs/dnb.yaml +17 -0
- package/engines/specs/doaj.yaml +17 -0
- package/engines/specs/docker_hub.yaml +30 -0
- package/engines/specs/douban_book.yaml +14 -0
- package/engines/specs/douyin_hot.yaml +21 -0
- package/engines/specs/eastmoney.yaml +16 -0
- package/engines/specs/ecosia.yaml +18 -0
- package/engines/specs/electricity_maps.yaml +17 -0
- package/engines/specs/em_flow.yaml +14 -0
- package/engines/specs/em_global_news.yaml +17 -0
- package/engines/specs/em_miaoxiang.yaml +14 -0
- package/engines/specs/eu_opendata.yaml +16 -0
- package/engines/specs/europeana.yaml +19 -0
- package/engines/specs/europepmc.yaml +29 -0
- package/engines/specs/eurostat.yaml +14 -0
- package/engines/specs/exa.yaml +20 -0
- package/engines/specs/felo.yaml +25 -0
- package/engines/specs/figshare.yaml +17 -0
- package/engines/specs/finviz.yaml +15 -0
- package/engines/specs/fr_opendata.yaml +28 -0
- package/engines/specs/frankfurter.yaml +21 -0
- package/engines/specs/fred.yaml +15 -0
- package/engines/specs/free_dictionary.yaml +16 -0
- package/engines/specs/fx_rate.yaml +14 -0
- package/engines/specs/gbfs_nyc.yaml +3 -0
- package/engines/specs/gbif.yaml +15 -0
- package/engines/specs/github.yaml +25 -0
- package/engines/specs/google_patents.yaml +16 -0
- package/engines/specs/google_scholar.yaml +16 -0
- package/engines/specs/gov_policy.yaml +31 -0
- package/engines/specs/gutenberg.yaml +15 -0
- package/engines/specs/hackernews.yaml +17 -0
- package/engines/specs/hal.yaml +16 -0
- package/engines/specs/hatena_bookmark.yaml +20 -0
- package/engines/specs/huggingface.yaml +31 -0
- package/engines/specs/imdb.yaml +18 -0
- package/engines/specs/itotii.yaml +17 -0
- package/engines/specs/itunes.yaml +19 -0
- package/engines/specs/jin10.yaml +15 -0
- package/engines/specs/juejin.yaml +16 -0
- package/engines/specs/know_your_meme.yaml +18 -0
- package/engines/specs/kor_law.yaml +17 -0
- package/engines/specs/lieu.yaml +18 -0
- package/engines/specs/listenbrainz.yaml +4 -0
- package/engines/specs/local_arxiv.yaml +18 -0
- package/engines/specs/local_baidu.yaml +30 -0
- package/engines/specs/local_bing.yaml +16 -0
- package/engines/specs/local_bing_news.yaml +22 -0
- package/engines/specs/local_crossref.yaml +23 -0
- package/engines/specs/local_github.yaml +27 -0
- package/engines/specs/local_gitlab.yaml +23 -0
- package/engines/specs/local_goodreads.yaml +16 -0
- package/engines/specs/local_google_news.yaml +15 -0
- package/engines/specs/local_imdb.yaml +17 -0
- package/engines/specs/local_npm.yaml +25 -0
- package/engines/specs/local_openstreetmap.yaml +36 -0
- package/engines/specs/local_pubmed.yaml +21 -0
- package/engines/specs/local_search.yaml +22 -0
- package/engines/specs/local_semantic_scholar.yaml +23 -0
- package/engines/specs/local_sogou.yaml +15 -0
- package/engines/specs/local_stackoverflow.yaml +26 -0
- package/engines/specs/local_wikipedia.yaml +26 -0
- package/engines/specs/local_wikiquote.yaml +26 -0
- package/engines/specs/local_wiktionary.yaml +26 -0
- package/engines/specs/marginalia.yaml +22 -0
- package/engines/specs/mdn.yaml +32 -0
- package/engines/specs/met_museum.yaml +4 -2
- package/engines/specs/metaso.yaml +19 -0
- package/engines/specs/models_dev.yaml +16 -0
- package/engines/specs/moegirl.yaml +19 -0
- package/engines/specs/musicbrainz.yaml +31 -0
- package/engines/specs/nasa_cmr.yaml +15 -0
- package/engines/specs/nbs_stats.yaml +16 -0
- package/engines/specs/ndl.yaml +17 -0
- package/engines/specs/noaa_swpc.yaml +3 -0
- package/engines/specs/npm.yaml +62 -0
- package/engines/specs/octen.yaml +16 -0
- package/engines/specs/open_library.yaml +15 -0
- package/engines/specs/open_meteo.yaml +17 -0
- package/engines/specs/openalex.yaml +27 -0
- package/engines/specs/opencitations.yaml +4 -1
- package/engines/specs/opencorporates.yaml +19 -0
- package/engines/specs/openfda.yaml +15 -0
- package/engines/specs/opensky.yaml +17 -0
- package/engines/specs/openverse.yaml +42 -0
- package/engines/specs/parallel.yaml +22 -0
- package/engines/specs/parallel_free.yaml +20 -0
- package/engines/specs/pixiv.yaml +52 -0
- package/engines/specs/polymarket.yaml +26 -0
- package/engines/specs/pubchem.yaml +15 -0
- package/engines/specs/pypi.yaml +16 -0
- package/engines/specs/qiita.yaml +28 -0
- package/engines/specs/qq_music.yaml +17 -0
- package/engines/specs/qwant.yaml +19 -0
- package/engines/specs/qweather.yaml +14 -0
- package/engines/specs/rcsb_pdb.yaml +15 -0
- package/engines/specs/reddit.yaml +28 -0
- package/engines/specs/redskill.yaml +24 -0
- package/engines/specs/rfc_editor.yaml +15 -0
- package/engines/specs/satnogs.yaml +5 -1
- package/engines/specs/searchmysite.yaml +18 -0
- package/engines/specs/searxng.yaml +18 -0
- package/engines/specs/sec_companyfacts.yaml +22 -0
- package/engines/specs/seeking_alpha.yaml +15 -0
- package/engines/specs/seltz.yaml +39 -0
- package/engines/specs/semantic_scholar.yaml +18 -0
- package/engines/specs/shenma.yaml +13 -0
- package/engines/specs/sina_quote.yaml +15 -0
- package/engines/specs/so.yaml +13 -0
- package/engines/specs/stackoverflow.yaml +18 -0
- package/engines/specs/steam.yaml +30 -0
- package/engines/specs/tatoeba.yaml +17 -0
- package/engines/specs/tavily.yaml +26 -0
- package/engines/specs/tencent_kline.yaml +18 -0
- package/engines/specs/tencent_quote.yaml +14 -0
- package/engines/specs/thesportsdb.yaml +18 -0
- package/engines/specs/ths_hot.yaml +19 -0
- package/engines/specs/tinyfish.yaml +36 -0
- package/engines/specs/tinyfish_news.yaml +34 -0
- package/engines/specs/tinyfish_paper.yaml +34 -0
- package/engines/specs/toutiao_hot.yaml +19 -0
- package/engines/specs/tracemoe.yaml +33 -0
- package/engines/specs/twitter.yaml +36 -0
- package/engines/specs/uapi.yaml +18 -0
- package/engines/specs/uniprot.yaml +16 -0
- package/engines/specs/urban_dictionary.yaml +25 -0
- package/engines/specs/usda.yaml +17 -0
- package/engines/specs/usgs.yaml +15 -0
- package/engines/specs/v2ex.yaml +33 -0
- package/engines/specs/vam.yaml +34 -0
- package/engines/specs/wallhaven.yaml +51 -0
- package/engines/specs/wallstreetcn.yaml +31 -0
- package/engines/specs/wayback_cdx.yaml +15 -0
- package/engines/specs/weather_cn.yaml +33 -0
- package/engines/specs/wechat_sogou.yaml +13 -0
- package/engines/specs/weibo.yaml +21 -0
- package/engines/specs/weibo_hot.yaml +21 -0
- package/engines/specs/wenshu.yaml +14 -0
- package/engines/specs/weread.yaml +14 -0
- package/engines/specs/wiby.yaml +18 -0
- package/engines/specs/wikidata.yaml +33 -0
- package/engines/specs/wikipedia.yaml +36 -0
- package/engines/specs/wolframalpha.yaml +18 -0
- package/engines/specs/worldbank.yaml +15 -0
- package/engines/specs/xiaohongshu.yaml +25 -0
- package/engines/specs/yahoo_finance.yaml +22 -0
- package/engines/specs/you.yaml +22 -0
- package/engines/specs/zh_wikipedia.yaml +35 -0
- package/engines/specs/zhihu.yaml +33 -0
- package/engines/specs/zhihu_global.yaml +18 -0
- package/engines/specs/zhihu_hot.yaml +36 -0
- package/engines/specs/zhihu_user.yaml +14 -0
- package/package.json +25 -24
- package/packages/dsh-plugin/README.md +28 -14
- package/packages/dsh-plugin/cordis.patch.yml +6 -2
- package/packages/dsh-plugin/dsh/client.js +67 -119
- package/packages/dsh-plugin/dsh/index.js +24 -178
- package/packages/dsh-plugin/dsh/runner.js +12 -2
- package/packages/dsh-plugin/dsh/specs.js +133 -0
- package/packages/dsh-plugin/package.json +10 -2
- package/packages/dsh-plugin/scripts/sync-local.sh +13 -11
- package/packages/dsh-plugin/test/client.test.js +20 -9
- package/packages/dsh-plugin/test/diagnostics.test.js +1 -1
- package/packages/dsh-plugin/test/index.test.js +28 -2
- package/packages/dsh-plugin/test/size-gate.test.js +2 -2
- package/scripts/ab_eval_p0p1.py +10 -4
- package/scripts/adaptive.py +101 -27
- package/scripts/archive_run.py +4 -2
- package/scripts/badcase_ledger.py +3 -1
- package/scripts/batch_probe.py +10 -8
- package/scripts/build_release_assets.sh +17 -5
- package/scripts/build_route_labels.py +122 -169
- package/scripts/cache.py +5 -5
- package/scripts/cache_guard.py +10 -5
- package/scripts/caliber_dedupe.py +4 -4
- package/scripts/caliber_isolation.py +17 -17
- package/scripts/candidate_envelope.py +7 -3
- package/scripts/circuit_breaker.py +220 -36
- package/scripts/concept_lookup.py +14 -1
- package/scripts/config.py +30 -13
- package/scripts/daemon.py +11 -2
- package/scripts/engine_add.py +32 -0
- package/scripts/engine_admission.py +35 -17
- package/scripts/engine_dispatch.py +65 -62
- package/scripts/engine_env.py +4 -0
- package/scripts/engine_failure.py +14 -18
- package/scripts/engine_families.py +6 -4
- package/scripts/engine_health.py +184 -0
- package/scripts/engine_states.py +604 -0
- package/scripts/engine_status.py +18 -11
- package/scripts/engines.py +7 -0
- package/scripts/engines_base.py +9 -9
- package/scripts/engines_builders.py +31 -19
- package/scripts/engines_builders_archive.py +303 -0
- package/scripts/engines_builders_batch11.py +63 -1
- package/scripts/engines_builders_batch9.py +9 -1
- package/scripts/engines_builders_data.py +69 -2090
- package/scripts/engines_builders_finance.py +354 -0
- package/scripts/engines_builders_intl.py +4 -1
- package/scripts/engines_builders_media.py +724 -0
- package/scripts/engines_builders_pixiv.py +633 -0
- package/scripts/engines_builders_reverse_image.py +175 -0
- package/scripts/engines_builders_science.py +784 -0
- package/scripts/env_store.py +216 -0
- package/scripts/extend_route_labels_by_capability.py +4 -4
- package/scripts/extend_route_labels_full_coverage.py +329 -0
- package/scripts/fetch_v3.py +88 -19
- package/scripts/gen_engine_catalog.py +58 -153
- package/scripts/gen_routing_snapshot.py +8 -6
- package/scripts/health_check.py +37 -4
- package/scripts/health_probe.py +28 -8
- package/scripts/install.ps1 +31 -15
- package/scripts/install.sh +266 -142
- package/scripts/job.py +35 -72
- package/scripts/lint_spec_contracts.py +7 -12
- package/scripts/local_image.py +22 -8
- package/scripts/mcp_compact.py +9 -1
- package/scripts/mcp_launch.sh +9 -17
- package/scripts/mcp_setup.py +85 -1
- package/scripts/mcp_transport.py +1 -1
- package/scripts/net_proxy.py +47 -0
- package/scripts/numeric_verify.py +20 -9
- package/scripts/output_transparency.py +21 -13
- package/scripts/plan.py +10 -7
- package/scripts/pre-commit +53 -23
- package/scripts/query_signals.py +35 -20
- package/scripts/quota.py +19 -10
- package/scripts/recovery.py +38 -13
- package/scripts/redskill/redskill_engine.py +36 -19
- package/scripts/release.py +60 -24
- package/scripts/release_check.py +20 -3
- package/scripts/research_dossier.py +10 -5
- package/scripts/research_gates.py +5 -1
- package/scripts/retry_policy.py +8 -7
- package/scripts/route.py +4 -26
- package/scripts/route_accuracy_eval.py +2 -2
- package/scripts/route_combo.py +33 -29
- package/scripts/route_domains.py +182 -50
- package/scripts/search.py +3 -12
- package/scripts/search_attribution.py +34 -3
- package/scripts/search_cli.py +12 -11
- package/scripts/search_entry.py +53 -45
- package/scripts/search_output.py +7 -2
- package/scripts/search_pipeline.py +17 -18
- package/scripts/search_rank.py +42 -66
- package/scripts/search_types.py +5 -0
- package/scripts/serp_guard.py +7 -16
- package/scripts/settings_page.py +486 -0
- package/scripts/social_engines/bilibili_engine.py +2 -30
- package/scripts/social_engines/hackernews_engine.py +4 -12
- package/scripts/social_engines/reddit_engine.py +4 -13
- package/scripts/social_engines/v2ex_engine.py +3 -12
- package/scripts/social_engines/weibo_engine.py +2 -30
- package/scripts/social_engines/zhihu_engine.py +4 -5
- package/scripts/stats_cli.py +17 -1
- package/scripts/straggler_policy.py +8 -4
- package/scripts/sync_backends.py +211 -8
- package/scripts/sync_requirements.py +159 -0
- package/scripts/tfidf_router.py +82 -24
- package/scripts/tweet.py +3 -6
- package/scripts/usage_log.py +28 -9
- package/scripts/video_fetch.py +2 -5
- package/scripts/watch.py +11 -6
- package/scripts/wechat_article.py +6 -9
- package/scripts/wx.py +6 -13
- package/sub-skills/local-search/SKILL.md +2 -2
- package/sub-skills/local-search/config.yaml +2 -1
- package/docs/DATA_SOURCE_GAPS.md +0 -81
- package/docs/DESIGN_LOCAL_DATA_FUSION.md +0 -90
- package/docs/PLATFORM_PATHS.md +0 -111
- package/docs/engines/bangumi.md +0 -27
- package/docs/engines/biorxiv.md +0 -27
- package/docs/engines/clawhub.md +0 -27
- package/docs/engines/crt_sh.md +0 -27
- package/docs/engines/datacite.md +0 -27
- package/docs/engines/deps_dev.md +0 -27
- package/docs/engines/douban_movie.md +0 -27
- package/docs/engines/endoflife.md +0 -27
- package/docs/engines/flk_law.md +0 -27
- package/docs/engines/fxtwitter.md +0 -27
- package/docs/engines/google_news.md +0 -27
- package/docs/engines/gov_regulations.md +0 -27
- package/docs/engines/guqian.md +0 -27
- package/docs/engines/hackernews.md +0 -27
- package/docs/engines/iplant.md +0 -27
- package/docs/engines/keenable.md +0 -27
- package/docs/engines/met_museum.md +0 -27
- package/docs/engines/nasa_images.md +0 -27
- package/docs/engines/netease_music.md +0 -27
- package/docs/engines/npm.md +0 -27
- package/docs/engines/nvd.md +0 -27
- package/docs/engines/openreview.md +0 -27
- package/docs/engines/openstd.md +0 -27
- package/docs/engines/parallel_free.md +0 -27
- package/docs/engines/people_daily.md +0 -27
- package/docs/engines/realtime_index.md +0 -27
- package/docs/engines/sec_edgar.md +0 -27
- package/docs/engines/seltz.md +0 -27
- package/docs/engines/skillsmp.md +0 -27
- package/docs/engines/sspai.md +0 -27
- package/docs/engines/std_samr.md +0 -27
- package/docs/engines/train.md +0 -27
- package/docs/engines/un_comtrade.md +0 -27
- package/docs/engines/wikisource.md +0 -27
- package/docs/engines/zdic.md +0 -27
- package/docs/engines/zenodo.md +0 -27
- package/docs/engines/zhihu_hot_app.md +0 -27
|
@@ -53,7 +53,7 @@ window.__ModuleLoader__.load({
|
|
|
53
53
|
routeHealthFallback: '在终端运行 `argo stats` 或 `argo engine list` 查看路由健康、引擎成功率与配额消耗。',
|
|
54
54
|
dashboardHint: '实时监控常驻 MCP 连接池、上游搜索源拓扑与额度状态,提供一键预设与快速调优。',
|
|
55
55
|
poolTitle: '常驻 MCP 连接池监控',
|
|
56
|
-
poolStatusHealthy: '
|
|
56
|
+
poolStatusHealthy: '按需连接 · 连接数不常驻',
|
|
57
57
|
presetTitle: '工作流快速预设',
|
|
58
58
|
presetHint: '一键对齐常用工作场景的并发与引擎策略,免去逐项手动调优。',
|
|
59
59
|
presetFast: '极速日常',
|
|
@@ -121,8 +121,8 @@ window.__ModuleLoader__.load({
|
|
|
121
121
|
keyRefs: '凭证转发名单(一行一个)',
|
|
122
122
|
keyRefsHint: '这些引用名会经 DSH credentials 解析后作为环境变量传给 argo 子进程;没有对应凭证的项会被跳过。',
|
|
123
123
|
structural: '结构性字段',
|
|
124
|
-
structuralHint: 'toolName / provider / searchProviderId / fetchProviderId 只能改 profile patch
|
|
125
|
-
mcpHint: 'MCP 全量工具面(mcp__argo__*)是 profile 里的独立 mcp-argo 行,不在本页开关;需要时在 patch
|
|
124
|
+
structuralHint: 'toolName / provider / searchProviderId / fetchProviderId 只能改 profile patch;watched patch 由官方 watcher 同 PID 重组,改后核对功能即可,不默认重启。',
|
|
125
|
+
mcpHint: 'MCP 全量工具面(mcp__argo__*)是 profile 里的独立 mcp-argo 行,不在本页开关;需要时在 patch 中取消注释后按 live activation 分支验证。',
|
|
126
126
|
noKey: '(未配置)',
|
|
127
127
|
tabEngines: '引擎',
|
|
128
128
|
enginesTitle: 'argo 引擎开关',
|
|
@@ -173,7 +173,7 @@ window.__ModuleLoader__.load({
|
|
|
173
173
|
routeHealthFallback: 'Run `argo stats` or `argo engine list` in a terminal to inspect routing health, engine success rates and quota usage.',
|
|
174
174
|
dashboardHint: 'Real-time overview of the resident MCP connection pool, upstream search engine matrix, and quick workflow presets.',
|
|
175
175
|
poolTitle: 'Resident MCP Pool Monitoring',
|
|
176
|
-
poolStatusHealthy: '
|
|
176
|
+
poolStatusHealthy: 'On demand · no resident connections',
|
|
177
177
|
presetTitle: 'Workflow Presets',
|
|
178
178
|
presetHint: 'One-click presets tailored for common research and search workflows.',
|
|
179
179
|
presetFast: 'Fast & Free',
|
|
@@ -241,8 +241,8 @@ window.__ModuleLoader__.load({
|
|
|
241
241
|
keyRefs: 'Credential forwarding refs (one per line)',
|
|
242
242
|
keyRefsHint: 'These refs resolve through DSH credentials and reach the argo child process as environment variables. Missing refs are skipped.',
|
|
243
243
|
structural: 'Structural fields',
|
|
244
|
-
structuralHint: 'toolName / provider / searchProviderId / fetchProviderId are profile-patch only
|
|
245
|
-
mcpHint: 'The full MCP tool face (mcp__argo__*) is a separate mcp-argo entry in the profile patch; enable it there and
|
|
244
|
+
structuralHint: 'toolName / provider / searchProviderId / fetchProviderId are profile-patch only; the watched patch is reconciled by the official watcher on the same PID. Verify the behavior, no default restart.',
|
|
245
|
+
mcpHint: 'The full MCP tool face (mcp__argo__*) is a separate mcp-argo entry in the profile patch; enable it there and verify through the live activation branch.',
|
|
246
246
|
noKey: '(not configured)',
|
|
247
247
|
tabEngines: 'Engines',
|
|
248
248
|
enginesTitle: 'argo engine switches',
|
|
@@ -306,31 +306,40 @@ window.__ModuleLoader__.load({
|
|
|
306
306
|
{ id: 'forensics', zh: '取证', en: 'Forensics', tools: ['argo_search', 'argo_fetch', 'argo_crawl', 'argo_pdf', 'argo_screenshot', 'argo_extract'], descZh: '整站/多页/PDF 留档', descEn: 'Site/multi-page/PDF archiving' },
|
|
307
307
|
];
|
|
308
308
|
|
|
309
|
+
// <generated:keys> 由 scripts/sync_backends.py 从引擎声明生成,勿手改
|
|
309
310
|
const KEYS = [
|
|
310
|
-
{ ref:
|
|
311
|
-
{ ref:
|
|
312
|
-
{ ref:
|
|
313
|
-
{ ref:
|
|
314
|
-
{ ref:
|
|
315
|
-
{ ref:
|
|
316
|
-
{ ref:
|
|
317
|
-
{ ref:
|
|
318
|
-
{ ref:
|
|
319
|
-
{ ref:
|
|
320
|
-
{ ref:
|
|
321
|
-
{ ref:
|
|
322
|
-
{ ref:
|
|
323
|
-
{ ref:
|
|
324
|
-
{ ref:
|
|
325
|
-
{ ref:
|
|
326
|
-
{ ref:
|
|
327
|
-
{ ref:
|
|
328
|
-
{ ref:
|
|
329
|
-
{ ref:
|
|
330
|
-
{ ref:
|
|
331
|
-
{ ref:
|
|
332
|
-
{ ref:
|
|
311
|
+
{ ref: "DEEPSEEK_API_KEY", common: true, label: "DeepSeek Search", en: "DeepSeek Search", engines: ["deepseek_search"] },
|
|
312
|
+
{ ref: "ARGO_YUANBAO_API_KEY", common: true, label: "腾讯元宝搜索", en: "Tencent Yuanbao", engines: ["yuanbao"] },
|
|
313
|
+
{ ref: "TAVILY_API_KEY", common: true, label: "Tavily", en: "Tavily", engines: ["tavily"] },
|
|
314
|
+
{ ref: "EXA_API_KEY", common: true, label: "Exa语义搜索", en: "Exa Semantic Search", engines: ["exa"] },
|
|
315
|
+
{ ref: "BOCHA_API_KEY", common: true, label: "博查搜索", en: "Bocha Search", engines: ["bocha", "bocha_ai"] },
|
|
316
|
+
{ ref: "BRAVE_API_KEY", common: true, label: "Brave", en: "Brave Search", engines: ["brave"] },
|
|
317
|
+
{ ref: "TINYFISH_API_KEY", common: true, label: "TinyFish 实时搜索", en: "TinyFish Live Search", engines: ["tinyfish", "tinyfish_news", "tinyfish_paper"] },
|
|
318
|
+
{ ref: "ANYSEARCH_API_KEY", common: false, label: "AnySearch", en: "AnySearch", engines: ["anysearch"] },
|
|
319
|
+
{ ref: "ARGO_PIXIV_REFRESH_TOKEN", common: false, label: "Pixiv 公开作品", en: "Pixiv App OAuth", engines: ["pixiv"] },
|
|
320
|
+
{ ref: "EASTMONEY_APIKEY", common: false, label: "东财妙想", en: "Eastmoney Miaoxiang", engines: ["em_miaoxiang"] },
|
|
321
|
+
{ ref: "FELO_API_KEY", common: false, label: "Felo AI搜索", en: "Felo AI Search", engines: ["felo"] },
|
|
322
|
+
{ ref: "FIRECRAWL_API_KEY", common: false, label: "Firecrawl", en: "Firecrawl", engines: ["firecrawl"] },
|
|
323
|
+
{ ref: "GITHUB_TOKEN", common: false, label: "GitHub", en: "GitHub", engines: ["github"] },
|
|
324
|
+
{ ref: "KEENABLE_API_KEY", common: false, label: "Keenable", en: "Keenable", engines: ["keenable"] },
|
|
325
|
+
{ ref: "METASO_API_KEY", common: false, label: "秘塔", en: "Metaso", engines: ["metaso", "metaso_doc", "metaso_image", "metaso_podcast", "metaso_scholar", "metaso_video"] },
|
|
326
|
+
{ ref: "OCTEN_API_KEY", common: false, label: "Octen", en: "Octen", engines: ["octen"] },
|
|
327
|
+
{ ref: "OPENCORPORATES_API_TOKEN", common: false, label: "OpenCorporates 公司注册", en: "OpenCorporates", engines: ["opencorporates"] },
|
|
328
|
+
{ ref: "PARALLEL_API_KEY", common: false, label: "Parallel搜索", en: "Parallel Search", engines: ["parallel"] },
|
|
329
|
+
{ ref: "QWEATHER_KEY", common: false, label: "和风天气", en: "QWeather", engines: ["qweather"] },
|
|
330
|
+
{ ref: "SAUCENAO_API_KEY", common: false, label: "SauceNAO 反搜图", en: "SauceNAO Reverse Image", engines: ["saucenao"] },
|
|
331
|
+
{ ref: "SCIVERSE_API_TOKEN", common: false, label: "Sciverse(题录)", en: "Sciverse", engines: ["sciverse"] },
|
|
332
|
+
{ ref: "SEARXNG_URL", common: false, label: "SearXNG", en: "SearXNG", engines: ["searxng"] },
|
|
333
|
+
{ ref: "SELTZ_API_KEY", common: false, label: "Seltz搜索", en: "Seltz Search", engines: ["seltz"] },
|
|
334
|
+
{ ref: "SERPAPI_API_KEY", common: false, label: "Google Lens 反搜图", en: "Google Lens (SerpAPI)", engines: ["google_lens"] },
|
|
335
|
+
{ ref: "UNPAYWALL_EMAIL", common: false, label: "Unpaywall 开放获取定位", en: "Unpaywall Open Access", engines: ["unpaywall"] },
|
|
336
|
+
{ ref: "WEB_SEARCH_API_KEY", common: false, label: "字节搜索", en: "ByteDance Search", engines: ["byted"] },
|
|
337
|
+
{ ref: "WEREAD_API_KEY", common: false, label: "微信读书", en: "WeRead", engines: ["weread"] },
|
|
338
|
+
{ ref: "WOLFRAM_APPID", common: false, label: "WolframAlpha", en: "WolframAlpha", engines: ["wolframalpha"] },
|
|
339
|
+
{ ref: "YDC_API_KEY", common: false, label: "You.com搜索", en: "You.com Search", engines: ["you"] },
|
|
340
|
+
{ ref: "ZHIHU_ACCESS_SECRET", common: false, label: "知乎", en: "Zhihu", engines: ["zhihu", "zhihu_global", "zhihu_hot", "zhihu_user"] },
|
|
333
341
|
];
|
|
342
|
+
// </generated:keys>
|
|
334
343
|
|
|
335
344
|
const CORE_ENGINES = [
|
|
336
345
|
{ id: 'deepseek', nameZh: 'DeepSeek 搜索', nameEn: 'DeepSeek Search', roleZh: '通用搜索 / 官方对齐', roleEn: 'General / Official Seam', ref: 'DEEPSEEK_API_KEY', keyless: false },
|
|
@@ -344,7 +353,7 @@ window.__ModuleLoader__.load({
|
|
|
344
353
|
{ id: 'zhihu', nameZh: '知乎 Zhihu', nameEn: 'Zhihu', roleZh: '中文专业问答舆情', roleEn: 'Professional Q&A / Social', ref: 'ZHIHU_ACCESS_SECRET', keyless: true },
|
|
345
354
|
];
|
|
346
355
|
|
|
347
|
-
// argo 引擎开关(argoEnv 的 KEY=VALUE 行)。与
|
|
356
|
+
// argo 引擎开关(argoEnv 的 KEY=VALUE 行)。与 specs.js 的 ARGO_ENV_SPECS
|
|
348
357
|
// 同一份名单,由 test/client.test.js 的漂移门禁核对;kind 决定控件:
|
|
349
358
|
// bool=开关、num=数字、str=文本、list=名单。def 仅作「未配置时显示什么」,
|
|
350
359
|
// 缺省即不写该行。开关文案写正向行为或明确的关闭动作,不再用 invert 反转
|
|
@@ -389,136 +398,74 @@ window.__ModuleLoader__.load({
|
|
|
389
398
|
const ENV_NAMES = new Set(ENGINE_TOGGLES.map((spec) => spec.name));
|
|
390
399
|
|
|
391
400
|
const DEFAULTS = {
|
|
392
|
-
searchCommand: 'npx',
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
searchIdleMs: 60000,
|
|
398
|
-
searchConcurrency: 3,
|
|
399
|
-
nativeTimeoutMs: 60000,
|
|
400
|
-
nativeMaxChars: 24000,
|
|
401
|
-
defaultWorkers: 6,
|
|
402
|
-
maxWorkers: 9,
|
|
403
|
-
maxTracks: 9,
|
|
404
|
-
maxSourcesPerTrack: 5,
|
|
405
|
-
workerMaxTokens: 5000,
|
|
406
|
-
synthesisMaxTokens: 7000,
|
|
407
|
-
reportDir: '',
|
|
401
|
+
searchCommand: 'npx', searchArgs: ['-y', 'github:taxueseek/argo'],
|
|
402
|
+
searchTimeoutMs: 30000, fetchTimeoutMs: 25000, fetchMaxChars: 50000,
|
|
403
|
+
searchIdleMs: 60000, searchConcurrency: 3, nativeTimeoutMs: 60000, nativeMaxChars: 24000,
|
|
404
|
+
defaultWorkers: 6, maxWorkers: 9, maxTracks: 9, maxSourcesPerTrack: 5,
|
|
405
|
+
workerMaxTokens: 5000, synthesisMaxTokens: 7000, reportDir: '',
|
|
408
406
|
};
|
|
409
407
|
|
|
410
408
|
const S = {
|
|
411
|
-
wrap: {
|
|
412
|
-
display: 'flex', flexDirection: 'column', gap: 14, maxWidth: 800,
|
|
413
|
-
color: 'var(--dsw-alias-label-primary, #1f2328)',
|
|
414
|
-
},
|
|
409
|
+
wrap: { display: 'flex', flexDirection: 'column', gap: 14, maxWidth: 800, color: 'var(--dsw-alias-label-primary, #1f2328)' },
|
|
415
410
|
title: { margin: 0, fontSize: 18, fontWeight: 600, lineHeight: '26px' },
|
|
416
411
|
hint: { margin: 0, fontSize: 12, lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary, #7b818b)' },
|
|
417
412
|
notice: { margin: 0, fontSize: 12, lineHeight: '18px', color: 'var(--dsw-alias-state-business-primary, #3b6ef6)' },
|
|
418
413
|
error: { margin: 0, fontSize: 12, lineHeight: '18px', color: 'var(--dsw-alias-state-error-primary, #d1242f)' },
|
|
419
|
-
tabs: {
|
|
420
|
-
display: 'flex', gap: 2, flexWrap: 'wrap',
|
|
421
|
-
borderBottom: '.5px solid var(--dsw-alias-border-l2, #e5e7eb)',
|
|
422
|
-
},
|
|
414
|
+
tabs: { display: 'flex', gap: 2, flexWrap: 'wrap', borderBottom: '.5px solid var(--dsw-alias-border-l2, #e5e7eb)' },
|
|
423
415
|
tab: (active) => ({
|
|
424
416
|
padding: '7px 12px 9px', border: 0, background: 'transparent', cursor: 'pointer',
|
|
425
|
-
font: 'inherit', fontSize: 13, lineHeight: '20px',
|
|
426
|
-
|
|
427
|
-
: 'var(--dsw-alias-label-tertiary, #7b818b)',
|
|
417
|
+
font: 'inherit', fontSize: 13, lineHeight: '20px', marginBottom: -1,
|
|
418
|
+
color: active ? 'var(--dsw-alias-label-primary, #1f2328)' : 'var(--dsw-alias-label-tertiary, #7b818b)',
|
|
428
419
|
borderBottom: active ? '2px solid var(--dsw-alias-state-business-primary, #3b6ef6)' : '2px solid transparent',
|
|
429
|
-
marginBottom: -1,
|
|
430
420
|
}),
|
|
431
|
-
card: {
|
|
432
|
-
display: 'flex', flexDirection: 'column', gap: 10, padding: '14px 16px',
|
|
433
|
-
borderRadius: 12, border: '.5px solid var(--dsw-alias-border-l3, #e5e7eb)',
|
|
434
|
-
background: 'var(--dsw-alias-settings-card-fill, #fff)',
|
|
435
|
-
},
|
|
421
|
+
card: { display: 'flex', flexDirection: 'column', gap: 10, padding: '14px 16px', borderRadius: 12, border: '.5px solid var(--dsw-alias-border-l3, #e5e7eb)', background: 'var(--dsw-alias-settings-card-fill, #fff)' },
|
|
436
422
|
cardTitle: { margin: 0, fontSize: 14, fontWeight: 600, lineHeight: '20px' },
|
|
437
423
|
row: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12 },
|
|
438
424
|
field: { display: 'flex', flexDirection: 'column', gap: 4, minWidth: 0 },
|
|
439
425
|
label: { fontSize: 13, fontWeight: 500, lineHeight: '18px' },
|
|
440
426
|
sub: { fontSize: 12, lineHeight: '18px', color: 'var(--dsw-alias-label-tertiary, #7b818b)' },
|
|
441
|
-
input: {
|
|
442
|
-
width: '100%', boxSizing: 'border-box', font: 'inherit', fontSize: 13, lineHeight: '20px',
|
|
443
|
-
padding: '7px 9px', borderRadius: 8,
|
|
444
|
-
border: '.5px solid var(--dsw-alias-border-l4, #d0d7de)',
|
|
445
|
-
background: 'var(--dsw-alias-bg-layer-1, #fff)', color: 'inherit',
|
|
446
|
-
},
|
|
427
|
+
input: { width: '100%', boxSizing: 'border-box', font: 'inherit', fontSize: 13, lineHeight: '20px', padding: '7px 9px', borderRadius: 8, border: '.5px solid var(--dsw-alias-border-l4, #d0d7de)', background: 'var(--dsw-alias-bg-layer-1, #fff)', color: 'inherit' },
|
|
447
428
|
mono: { fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace', fontSize: 12 },
|
|
448
429
|
textarea: { minHeight: 64, resize: 'vertical' },
|
|
449
430
|
grid: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(150px, 1fr))', gap: 10 },
|
|
450
431
|
toolGrid: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(230px, 1fr))', gap: 6 },
|
|
451
432
|
check: { display: 'flex', alignItems: 'center', gap: 8, fontSize: 13, cursor: 'pointer' },
|
|
452
|
-
btn: {
|
|
453
|
-
|
|
454
|
-
background: 'var(--dsw-alias-bg-layer-1, #fff)', color: 'inherit', font: 'inherit',
|
|
455
|
-
fontSize: 12, lineHeight: '18px', cursor: 'pointer',
|
|
456
|
-
},
|
|
457
|
-
btnPrimary: {
|
|
458
|
-
padding: '6px 14px', borderRadius: 8, border: '.5px solid var(--dsw-alias-state-business-primary, #3b6ef6)',
|
|
459
|
-
background: 'var(--dsw-alias-state-business-primary, #3b6ef6)', color: '#fff', font: 'inherit',
|
|
460
|
-
fontSize: 12, lineHeight: '18px', cursor: 'pointer',
|
|
461
|
-
},
|
|
433
|
+
btn: { padding: '6px 12px', borderRadius: 8, border: '.5px solid var(--dsw-alias-border-l4, #d0d7de)', background: 'var(--dsw-alias-bg-layer-1, #fff)', color: 'inherit', font: 'inherit', fontSize: 12, lineHeight: '18px', cursor: 'pointer' },
|
|
434
|
+
btnPrimary: { padding: '6px 14px', borderRadius: 8, border: '.5px solid var(--dsw-alias-state-business-primary, #3b6ef6)', background: 'var(--dsw-alias-state-business-primary, #3b6ef6)', color: '#fff', font: 'inherit', fontSize: 12, lineHeight: '18px', cursor: 'pointer' },
|
|
462
435
|
chip: (on) => ({
|
|
463
|
-
display: 'inline-flex', alignItems: 'center', gap: 6, padding: '3px 9px',
|
|
464
|
-
borderRadius: 999, fontSize: 11, lineHeight: '16px',
|
|
436
|
+
display: 'inline-flex', alignItems: 'center', gap: 6, padding: '3px 9px', borderRadius: 999, fontSize: 11, lineHeight: '16px', background: 'transparent',
|
|
465
437
|
border: '.5px solid ' + (on ? 'var(--dsw-alias-state-business-primary, #3b6ef6)' : 'var(--dsw-alias-border-l3, #e5e7eb)'),
|
|
466
438
|
color: on ? 'var(--dsw-alias-state-business-primary, #3b6ef6)' : 'var(--dsw-alias-label-tertiary, #7b818b)',
|
|
467
|
-
background: 'transparent',
|
|
468
439
|
}),
|
|
469
440
|
status: { margin: 0, fontSize: 12, minHeight: 18, lineHeight: '18px' },
|
|
470
|
-
keyRow: {
|
|
471
|
-
display: 'grid', gridTemplateColumns: 'minmax(150px, 1fr) minmax(0, 1.5fr)', gap: 10,
|
|
472
|
-
alignItems: 'start', padding: '10px 0',
|
|
473
|
-
borderTop: '.5px solid var(--dsw-alias-border-l2, #eee)',
|
|
474
|
-
},
|
|
441
|
+
keyRow: { display: 'grid', gridTemplateColumns: 'minmax(150px, 1fr) minmax(0, 1.5fr)', gap: 10, alignItems: 'start', padding: '10px 0', borderTop: '.5px solid var(--dsw-alias-border-l2, #eee)' },
|
|
475
442
|
keyHead: { display: 'flex', flexDirection: 'column', gap: 2, minWidth: 0 },
|
|
476
443
|
code: { fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace', fontSize: 10, color: 'var(--dsw-alias-label-tertiary, #7b818b)' },
|
|
477
|
-
dot: (on) => ({
|
|
478
|
-
display: 'inline-block', width: 6, height: 6, borderRadius: 999,
|
|
479
|
-
background: on ? '#2da44e' : 'var(--dsw-alias-border-l4, #d0d7de)',
|
|
480
|
-
marginRight: 5,
|
|
481
|
-
}),
|
|
444
|
+
dot: (on) => ({ display: 'inline-block', width: 6, height: 6, borderRadius: 999, background: on ? '#2da44e' : 'var(--dsw-alias-border-l4, #d0d7de)', marginRight: 5 }),
|
|
482
445
|
actions: { display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap' },
|
|
483
446
|
switchWrap: { display: 'flex', alignItems: 'center', gap: 8 },
|
|
484
447
|
divider: { height: '.5px', background: 'var(--dsw-alias-border-l2, #eee)', margin: '2px 0' },
|
|
485
448
|
metricGrid: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(170px, 1fr))', gap: 10 },
|
|
486
|
-
metricCard: {
|
|
487
|
-
display: 'flex', flexDirection: 'column', gap: 6, padding: '12px 14px',
|
|
488
|
-
borderRadius: 10, border: '.5px solid var(--dsw-alias-border-l3, #e5e7eb)',
|
|
489
|
-
background: 'var(--dsw-alias-bg-layer-2, #f8fafc)',
|
|
490
|
-
},
|
|
449
|
+
metricCard: { display: 'flex', flexDirection: 'column', gap: 6, padding: '12px 14px', borderRadius: 10, border: '.5px solid var(--dsw-alias-border-l3, #e5e7eb)', background: 'var(--dsw-alias-bg-layer-2, #f8fafc)' },
|
|
491
450
|
metricLabel: { fontSize: 11, fontWeight: 500, color: 'var(--dsw-alias-label-tertiary, #7b818b)', textTransform: 'uppercase', letterSpacing: '0.04em' },
|
|
492
451
|
metricValue: { fontSize: 18, fontWeight: 600, lineHeight: '22px', color: 'var(--dsw-alias-label-primary, #1f2328)' },
|
|
493
452
|
metricSub: { fontSize: 11, lineHeight: '16px', color: 'var(--dsw-alias-label-secondary, #4b5563)' },
|
|
494
453
|
presetGrid: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(220px, 1fr))', gap: 10 },
|
|
495
454
|
presetCard: (active) => ({
|
|
496
|
-
display: 'flex', flexDirection: 'column', gap: 6, padding: '12px 14px',
|
|
497
|
-
borderRadius: 10, cursor: 'pointer', textAlign: 'left',
|
|
455
|
+
display: 'flex', flexDirection: 'column', gap: 6, padding: '12px 14px', borderRadius: 10, cursor: 'pointer', textAlign: 'left',
|
|
498
456
|
border: active ? '1.5px solid var(--dsw-alias-state-business-primary, #3b6ef6)' : '.5px solid var(--dsw-alias-border-l3, #e5e7eb)',
|
|
499
457
|
background: active ? 'var(--dsw-alias-bg-layer-1, #fff)' : 'var(--dsw-alias-settings-card-fill, #fff)',
|
|
500
458
|
boxShadow: active ? '0 1px 3px rgba(59, 110, 246, 0.12)' : 'none',
|
|
501
459
|
}),
|
|
502
460
|
matrixGrid: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(220px, 1fr))', gap: 8 },
|
|
503
|
-
matrixCard: {
|
|
504
|
-
display: 'flex', flexDirection: 'column', gap: 4, padding: '10px 12px',
|
|
505
|
-
borderRadius: 8, border: '.5px solid var(--dsw-alias-border-l3, #e5e7eb)',
|
|
506
|
-
background: 'var(--dsw-alias-bg-layer-1, #fff)',
|
|
507
|
-
},
|
|
461
|
+
matrixCard: { display: 'flex', flexDirection: 'column', gap: 4, padding: '10px 12px', borderRadius: 8, border: '.5px solid var(--dsw-alias-border-l3, #e5e7eb)', background: 'var(--dsw-alias-bg-layer-1, #fff)' },
|
|
508
462
|
badge: (color) => ({
|
|
509
|
-
display: 'inline-flex', alignItems: 'center', gap: 4, padding: '2px 8px',
|
|
510
|
-
borderRadius: 999, fontSize: 10, fontWeight: 500, lineHeight: '14px',
|
|
463
|
+
display: 'inline-flex', alignItems: 'center', gap: 4, padding: '2px 8px', borderRadius: 999, fontSize: 10, fontWeight: 500, lineHeight: '14px',
|
|
511
464
|
background: color === 'green' ? 'rgba(46, 160, 67, 0.12)' : (color === 'blue' ? 'rgba(59, 110, 246, 0.12)' : 'rgba(100, 116, 139, 0.12)'),
|
|
512
465
|
color: color === 'green' ? '#2da44e' : (color === 'blue' ? '#3b6ef6' : '#64748b'),
|
|
513
466
|
border: '.5px solid ' + (color === 'green' ? '#2da44e' : (color === 'blue' ? '#3b6ef6' : '#64748b')),
|
|
514
467
|
}),
|
|
515
|
-
filterInput: {
|
|
516
|
-
width: '100%', boxSizing: 'border-box', font: 'inherit', fontSize: 12, lineHeight: '18px',
|
|
517
|
-
padding: '6px 10px', borderRadius: 8,
|
|
518
|
-
border: '.5px solid var(--dsw-alias-border-l4, #d0d7de)',
|
|
519
|
-
background: 'var(--dsw-alias-bg-layer-1, #fff)', color: 'inherit',
|
|
520
|
-
marginBottom: 8,
|
|
521
|
-
},
|
|
468
|
+
filterInput: { width: '100%', boxSizing: 'border-box', font: 'inherit', fontSize: 12, lineHeight: '18px', padding: '6px 10px', borderRadius: 8, border: '.5px solid var(--dsw-alias-border-l4, #d0d7de)', background: 'var(--dsw-alias-bg-layer-1, #fff)', color: 'inherit', marginBottom: 8 },
|
|
522
469
|
};
|
|
523
470
|
|
|
524
471
|
function asString(value, fallback) {
|
|
@@ -1049,7 +996,7 @@ window.__ModuleLoader__.load({
|
|
|
1049
996
|
h('div', { key: 'head', style: S.keyHead }, [
|
|
1050
997
|
h('span', { key: 'n', style: S.label }, [
|
|
1051
998
|
h('span', { key: 'dot', style: S.dot(configured) }),
|
|
1052
|
-
lang === 'en' ? entry.en : entry.
|
|
999
|
+
lang === 'en' ? (entry.en || entry.label) : entry.label,
|
|
1053
1000
|
]),
|
|
1054
1001
|
h('span', { key: 'ref', style: S.code }, entry.ref),
|
|
1055
1002
|
h('span', { key: 's', style: S.sub }, statusParts.join(' · ')),
|
|
@@ -1118,10 +1065,10 @@ window.__ModuleLoader__.load({
|
|
|
1118
1065
|
h('div', { key: 'pool', style: S.metricCard }, [
|
|
1119
1066
|
h('span', { key: 'l', style: S.metricLabel }, t('poolTitle')),
|
|
1120
1067
|
h('div', { key: 'v', style: { display: 'flex', alignItems: 'center', gap: 6 } }, [
|
|
1121
|
-
h('span', { key: 'dot', style: S.dot(
|
|
1068
|
+
h('span', { key: 'dot', style: S.dot(poolConcurrency > 0) }),
|
|
1122
1069
|
h('span', { key: 'val', style: S.metricValue }, `${poolConcurrency} 并发`),
|
|
1123
1070
|
]),
|
|
1124
|
-
h('span', { key: 's', style: S.metricSub }, `${t('poolStatusHealthy')} ·
|
|
1071
|
+
h('span', { key: 's', style: S.metricSub }, `${t('poolStatusHealthy')} · 空闲回收 ${poolIdleMs / 1000}s`),
|
|
1125
1072
|
]),
|
|
1126
1073
|
h('div', { key: 'seam', style: S.metricCard }, [
|
|
1127
1074
|
h('span', { key: 'l', style: S.metricLabel }, t('accessTitle')),
|
|
@@ -1318,7 +1265,7 @@ window.__ModuleLoader__.load({
|
|
|
1318
1265
|
//
|
|
1319
1266
|
// 历史 bug(2026-10-21 定位):`paid` 一度不在这个清单里,于是
|
|
1320
1267
|
// ARGO_PAID_SEARCH 与 ARGO_BUDGET_DEEPSEEK_SEARCH 两条开关在
|
|
1321
|
-
//
|
|
1268
|
+
// specs.js 白名单、client.js ENGINE_TOGGLES、双语文案三处都齐全,
|
|
1322
1269
|
// 却在面板上完全不显示——用户配好了预算却找不到入口,还以为是插件
|
|
1323
1270
|
// 没装。漂移门禁只核对「两边名单同集合、字段一致」,核对不到「这个
|
|
1324
1271
|
// 分组到底渲不渲染」;已由 test/client.test.js 的「engines tab renders
|
|
@@ -1421,7 +1368,7 @@ window.__ModuleLoader__.load({
|
|
|
1421
1368
|
if (tab === 'keys') {
|
|
1422
1369
|
const query = keyFilter.trim().toLowerCase();
|
|
1423
1370
|
const displayKeys = query
|
|
1424
|
-
? KEYS.filter((entry) => entry.ref.toLowerCase().includes(query) ||
|
|
1371
|
+
? KEYS.filter((entry) => entry.ref.toLowerCase().includes(query) || entry.label.toLowerCase().includes(query) || (entry.en && entry.en.toLowerCase().includes(query)) || entry.engines.some((id) => id.includes(query)))
|
|
1425
1372
|
: visibleKeys;
|
|
1426
1373
|
panel.push(h(Card, { key: 'keys', title: t('keysTitle'), hint: t('keysHint') }, [
|
|
1427
1374
|
h('input', {
|
|
@@ -1588,11 +1535,12 @@ window.__ModuleLoader__.load({
|
|
|
1588
1535
|
exports.inject = inject;
|
|
1589
1536
|
exports.ArgoPanel = ArgoPanel;
|
|
1590
1537
|
// 静态数据导出供漂移门禁核对:TOOLS 必须与 native-tools.mjs(mcp_tools.py
|
|
1591
|
-
// 生成产物)同名同集合,ENGINE_TOGGLES 必须与
|
|
1538
|
+
// 生成产物)同名同集合,ENGINE_TOGGLES 必须与 specs.js 的 ARGO_ENV_SPECS
|
|
1592
1539
|
// 同名同集合——两边任何一边增删而另一边没跟上,测试即红。
|
|
1593
1540
|
exports.TOOLS = TOOLS;
|
|
1594
1541
|
exports.TOOL_GROUPS = TOOL_GROUPS;
|
|
1595
1542
|
exports.ENGINE_TOGGLES = ENGINE_TOGGLES;
|
|
1543
|
+
exports.KEYS = KEYS;
|
|
1596
1544
|
|
|
1597
1545
|
return module.exports;
|
|
1598
1546
|
}
|
|
@@ -22,6 +22,18 @@ import { createRequire } from 'node:module'
|
|
|
22
22
|
import { dirname, join } from 'node:path'
|
|
23
23
|
import { fileURLToPath } from 'node:url'
|
|
24
24
|
import { NATIVE_TOOLS as NATIVE_TOOL_SPECS } from './native-tools.mjs'
|
|
25
|
+
import {
|
|
26
|
+
DEFAULT_CHILD_TOOLS,
|
|
27
|
+
buildChildToolFilters,
|
|
28
|
+
ARGO_ENV_SPECS,
|
|
29
|
+
ARGO_ENV_NAMES,
|
|
30
|
+
parseArgoEnvLine,
|
|
31
|
+
resolveArgoEnv,
|
|
32
|
+
setHostCredentials,
|
|
33
|
+
setActiveConfig,
|
|
34
|
+
CREDENTIAL_REF_PATTERN,
|
|
35
|
+
asStringArray,
|
|
36
|
+
} from './specs.js'
|
|
25
37
|
|
|
26
38
|
const require = createRequire(import.meta.url)
|
|
27
39
|
|
|
@@ -29,41 +41,19 @@ import {
|
|
|
29
41
|
DEFAULTS,
|
|
30
42
|
PLUGIN_VERSION as RUNNER_PLUGIN_VERSION,
|
|
31
43
|
setEnvResolver,
|
|
32
|
-
|
|
33
|
-
resolveNativeSpawn,
|
|
44
|
+
resetEnvResolver,
|
|
34
45
|
makeNativeTool,
|
|
35
|
-
nativeViaMcpPool,
|
|
36
|
-
runNativeCall,
|
|
37
46
|
disposeSharedMcp,
|
|
38
|
-
searchViaArgoMCP,
|
|
39
47
|
fetchViaArgo,
|
|
40
48
|
mapArgoToWebResult,
|
|
41
|
-
mapArgoToWebFetch,
|
|
42
49
|
classifyFetchError,
|
|
43
|
-
argoAborted,
|
|
44
|
-
argoToolError,
|
|
45
50
|
} from './runner.js'
|
|
46
51
|
|
|
47
52
|
import {
|
|
48
|
-
normalizeTracks,
|
|
49
|
-
stageTracks,
|
|
50
|
-
evaluateGates,
|
|
51
|
-
normalizeSource,
|
|
52
|
-
normalizeSourceUrl,
|
|
53
|
-
buildLocalSources,
|
|
54
|
-
parseJsonArray,
|
|
55
|
-
parseJsonObject,
|
|
56
|
-
extractValues,
|
|
57
|
-
persistReport,
|
|
58
|
-
startStructured,
|
|
59
|
-
providerSupportsStructured,
|
|
60
|
-
recomputeViaArgoMCP,
|
|
61
53
|
createWideResearchTool,
|
|
62
54
|
} from './wide-research.js'
|
|
63
55
|
|
|
64
56
|
import {
|
|
65
|
-
getMcpPoolStats,
|
|
66
|
-
resetMcpPool,
|
|
67
57
|
getRouteHealth,
|
|
68
58
|
} from './diagnostics.js'
|
|
69
59
|
|
|
@@ -92,106 +82,11 @@ function resolvePluginVersion() {
|
|
|
92
82
|
return RUNNER_PLUGIN_VERSION || '0.0.0-unknown'
|
|
93
83
|
}
|
|
94
84
|
|
|
95
|
-
|
|
85
|
+
const PLUGIN_VERSION = resolvePluginVersion()
|
|
96
86
|
|
|
97
87
|
export const name = 'wide-research'
|
|
98
88
|
export const inject = ['tools', 'subagents', 'systemPrompt', 'web']
|
|
99
89
|
|
|
100
|
-
const MCP_CHILD_TOOLS = Object.keys(NATIVE_TOOL_SPECS).map(name => `mcp__argo__${name}`)
|
|
101
|
-
const DEFAULT_CHILD_TOOLS = Object.freeze([
|
|
102
|
-
...MCP_CHILD_TOOLS,
|
|
103
|
-
'argo_search',
|
|
104
|
-
'argo_fetch',
|
|
105
|
-
'web_search',
|
|
106
|
-
'web_fetch',
|
|
107
|
-
])
|
|
108
|
-
|
|
109
|
-
export function buildChildToolFilters(config, toolName) {
|
|
110
|
-
const base = Array.isArray(config?.childToolAllow) ? config.childToolAllow : DEFAULT_CHILD_TOOLS
|
|
111
|
-
const blocked = new Set([toolName, 'mcp__argo__argo_research'])
|
|
112
|
-
const deny = [...new Set([toolName, ...asStringArray(config?.childToolDeny, 100)])]
|
|
113
|
-
const denySet = new Set(deny)
|
|
114
|
-
const allow = [...new Set(asStringArray(base, 100).filter(tool => !blocked.has(tool) && !denySet.has(tool)))]
|
|
115
|
-
return { allow, deny }
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* 面板可露出的 argo 环境变量开关(curated 白名单)。
|
|
120
|
-
*
|
|
121
|
-
* 选录标准:日常会开合的行为开关,语义单一、默认值在 argo 侧稳定;授权位
|
|
122
|
-
* (ARGO_ALLOW_RECOMPUTE / ARGO_ALLOW_PRIVATE_URLS,argo 要求 expand=False
|
|
123
|
-
* + strict=True)与路径/状态类内部变量(ARGO_STATE_DIR / ARGO_HOME /
|
|
124
|
-
* ARGO_DAEMON 等)刻意不收——前者不该一键放行,后者改了会动摇凭证 seam 的
|
|
125
|
-
* 解析前提。每个名字都在 argo 仓 scripts/ 有读取点,由
|
|
126
|
-
* tests/test_dsh_plugin_env_gate.py 对拍,防白名单漂移成 Fiction。
|
|
127
|
-
*
|
|
128
|
-
* kind:bool=开关(值 0/1)、num=数字,str=字符串,list=名单(逗号或路径分隔符分隔,照 argo 原语义)。
|
|
129
|
-
* def=argo 侧默认值(仅面板展示用,缺省即不写该行、由 argo 自己决定)。
|
|
130
|
-
*
|
|
131
|
-
* 开关文案一律写「正向行为」或「明确的关闭动作」,**不要再用 invert 反转**:
|
|
132
|
-
* 历史 bug(2026-10-22)——`关闭搜索结果缓存` 配 invert 后,未配置时面板显示
|
|
133
|
-
* 为「开」,点一下反而把 ARGO_NO_CACHE 写成 0,缓存始终没关掉。
|
|
134
|
-
*/
|
|
135
|
-
export const ARGO_ENV_SPECS = Object.freeze([
|
|
136
|
-
{ name: 'ARGO_NO_CACHE', kind: 'bool', group: 'cache', def: false, zh: '测试模式(关闭结果缓存)', en: 'Test mode (disable result cache)', hintZh: '日常保持关闭:结果缓存 1 小时。改进 Skill/插件、需要看实时结果时再打开', hintEn: 'Off by default: results are cached for 1h. Enable only when developing the skill/plugin' },
|
|
137
|
-
{ name: 'ARGO_TFIDF_RERANK', kind: 'bool', group: 'cache', def: true, zh: 'TF-IDF 重排', en: 'TF-IDF rerank', hintZh: '多引擎结果融合前的相关性重排,默认开', hintEn: 'Relevance rerank before fusion, on by default' },
|
|
138
|
-
{ name: 'ARGO_NUMBER_CROSSCHECK', kind: 'bool', group: 'cache', def: true, zh: '数值交叉校验', en: 'Number cross-check', hintZh: '对查询里的数值主张做跨源核对,默认开', hintEn: 'Cross-check numeric claims across sources, on by default' },
|
|
139
|
-
{ name: 'ARGO_MINHASH_DEDUPE', kind: 'bool', group: 'cache', def: true, zh: 'MinHash 去重', en: 'MinHash dedupe', hintZh: '近重复结果合并,默认开', hintEn: 'Merge near-duplicate results, on by default' },
|
|
140
|
-
{ name: 'ARGO_MINHASH_THRESHOLD', kind: 'num', group: 'cache', def: 0.85, min: 0.5, max: 1, step: 0.05, zh: '去重阈值', en: 'Dedupe threshold', hintZh: '越高越严(越多判为不同),默认 0.85', hintEn: 'Higher = stricter, default 0.85' },
|
|
141
|
-
{ name: 'ARGO_SERP_GUARD', kind: 'bool', group: 'cache', def: true, zh: 'SERP 守卫', en: 'SERP guard', hintZh: '拦截壳页/风控页混入结果,默认开;误杀时先关它复现', hintEn: 'Keep shell/blocked pages out of results, on by default' },
|
|
142
|
-
{ name: 'ARGO_FETCH_JINA', kind: 'bool', group: 'fetch', def: true, zh: 'Jina 阅读器抓取', en: 'Jina reader fetch', hintZh: 'r.jina.ai 正文提取,默认开', hintEn: 'r.jina.ai text extraction, on by default' },
|
|
143
|
-
{ name: 'ARGO_FETCH_MOBILE', kind: 'bool', group: 'fetch', def: true, zh: '移动端 UA 抓取', en: 'Mobile UA fetch', hintZh: '按 host 记忆移动端身份,默认开', hintEn: 'Per-host mobile identity, on by default' },
|
|
144
|
-
{ name: 'ARGO_FETCH_PARALLEL', kind: 'bool', group: 'fetch', def: true, zh: 'Parallel 免费渲染抓取', en: 'Parallel free render fetch', hintZh: 'keyless 云端渲染兜底,默认开', hintEn: 'Keyless cloud render fallback, on by default' },
|
|
145
|
-
{ name: 'ARGO_FETCH_DEADLINE_S', kind: 'num', group: 'fetch', def: 60, min: 5, max: 300, step: 5, zh: '抓取总截止(秒)', en: 'Fetch deadline (s)', hintZh: '单次抓取全链路墙钟上限,默认 60', hintEn: 'Wall-clock cap per fetch, default 60' },
|
|
146
|
-
{ name: 'ARGO_SEMANTIC_EVIDENCE', kind: 'bool', group: 'semantic', def: false, zh: '语义证据层', en: 'Semantic evidence', hintZh: '显式核验链路的零样本判定,默认关;开启后多一次外呼', hintEn: 'Zero-shot support check on the verify path, off by default' },
|
|
147
|
-
{ name: 'ARGO_ADAPTIVE_GRACE', kind: 'bool', group: 'semantic', def: true, zh: '对冲宽限自适应', en: 'Adaptive hedge grace', hintZh: '按引擎历史 p75 收窄对冲等待窗,默认开', hintEn: 'Narrow hedge window by engine p75, on by default' },
|
|
148
|
-
{ name: 'ARGO_ADAPTIVE_TAIL', kind: 'bool', group: 'semantic', def: false, zh: '分层尾宽', en: 'Layered straggler tail', hintZh: '尾宽按未回来引擎分层取值,默认关', hintEn: 'Per-engine layered tail width, off by default' },
|
|
149
|
-
{ name: 'ARGO_STRAGGLER_GRACE_S', kind: 'num', group: 'semantic', def: 1.5, min: 0, max: 30, step: 0.5, zh: '掉队宽限(秒)', en: 'Straggler grace (s)', hintZh: '已有引擎交付后还等多久,默认 1.5;0 关闭', hintEn: 'Wait after first delivery, default 1.5; 0 disables' },
|
|
150
|
-
{ name: 'ARGO_SERIAL_STAGGER_S', kind: 'num', group: 'semantic', def: 0.8, min: 0, max: 30, step: 0.5, zh: '串行起步间隔(秒)', en: 'Serial stagger (s)', hintZh: '首引擎超时前补发备选源的提前量,默认 0.8;0 最激进', hintEn: 'Lead before firing a backup source, default 0.8; 0 = fire together' },
|
|
151
|
-
{ name: 'ARGO_ENABLE_ENGINES', kind: 'list', group: 'engines', zh: '额外启用引擎', en: 'Extra enabled engines', hintZh: '逗号分隔;叠加在 config.yaml 启用集之上', hintEn: 'Comma-separated; adds to the config.yaml enabled set' },
|
|
152
|
-
{ name: 'ARGO_DISABLE_ENGINES', kind: 'list', group: 'engines', zh: '停用引擎', en: 'Disabled engines', hintZh: '逗号分隔;优先级高于启用集,调试单引擎时用', hintEn: 'Comma-separated; wins over the enabled set' },
|
|
153
|
-
{ name: 'ARGO_PROXY', kind: 'str', group: 'net', zh: 'argo 全局代理', en: 'argo global proxy', hintZh: 'http:// 代理 URL,或 direct 强制直连;留空走环境变量', hintEn: 'http:// proxy URL, or direct; empty falls back to env' },
|
|
154
|
-
{ name: 'ARGO_GDELT_PROXY', kind: 'str', group: 'net', zh: 'GDELT 代理', en: 'GDELT proxy', hintZh: 'GDELT 按出口 IP 限流,经本地代理更稳;留空自动直连', hintEn: 'GDELT rate-limits by egress IP; empty = direct' },
|
|
155
|
-
{ name: 'ARGO_LOCAL_SEEK_ROOTS', kind: 'list', group: 'local', zh: '本机检索根目录', en: 'Local seek roots', hintZh: '路径分隔符分隔;seek.py 的候选安装根,默认用打包位置', hintEn: 'Path-separated roots for seek.py; default uses the bundled copy' },
|
|
156
|
-
{ name: 'ARGO_LOCAL_SEEK_PATH', kind: 'str', group: 'local', zh: 'seek.py 绝对路径', en: 'seek.py path', hintZh: '显式指定 seek.py,优先于根目录候选', hintEn: 'Explicit seek.py, wins over root candidates' },
|
|
157
|
-
{ name: 'ARGO_LOCAL_READ_DIRS', kind: 'list', group: 'local', zh: '本机读取白名单', en: 'Local read allowlist', hintZh: '逗号分隔;不配置则 local_read 一律不放行', hintEn: 'Comma-separated; empty means local_read allows nothing' },
|
|
158
|
-
{ name: 'ARGO_TEXT_LEXICON', kind: 'str', group: 'local', zh: '词表 JSON 路径', en: 'Lexicon JSON path', hintZh: '文本处理词表覆盖,默认用打包词表', hintEn: 'Text lexicon override; default uses the bundled one' },
|
|
159
|
-
{ name: 'ARGO_PAID_SEARCH', kind: 'str', group: 'paid', def: 'auto', zh: '付费源策略', en: 'Paid source policy', hintZh: 'auto=优势域自动使用付费源;off=只用免费源。额度见下方', hintEn: 'auto = use paid sources in proven domains; off = free sources only. See quotas below' },
|
|
160
|
-
{ name: 'ARGO_BUDGET_DEEPSEEK_SEARCH', kind: 'num', group: 'paid', def: 5, min: 0, max: 1000, step: 1, zh: 'DeepSeek 月度预算(元)', en: 'DeepSeek monthly budget (CNY)', hintZh: '0=关闭;¥5≈1000次成功调用(¥0.005/次)', hintEn: '0 = off; CNY 5 ≈ 1000 successful calls (CNY 0.005 each)' },
|
|
161
|
-
{ name: 'ARGO_BUDGET_EXA', kind: 'num', group: 'paid', def: 10, min: 0, max: 10000, step: 1, zh: 'Exa 每月预算(美元)', en: 'Exa monthly budget (USD)', hintZh: '默认 $10/月(约 1000 次);0=关闭自动使用。按成功调用计费', hintEn: 'Default $10/month (~1000 calls); 0 = off. Billed per successful call' },
|
|
162
|
-
{ name: 'ARGO_QUOTA_ANYSEARCH_LIMIT', kind: 'num', group: 'paid', def: 1000, min: 0, max: 1000000, step: 1, zh: 'AnySearch 每日次数上限', en: 'AnySearch daily call cap', hintZh: '默认 1000/日;0=不限制。改动对下一次新建连接生效', hintEn: 'Default 1000/day; 0 = unlimited. Applies to new connections' },
|
|
163
|
-
{ name: 'ARGO_QUOTA_ZHIHU_LIMIT', kind: 'num', group: 'paid', def: 5000, min: 0, max: 1000000, step: 1, zh: '知乎 每日次数上限', en: 'Zhihu daily call cap', hintZh: '默认 5000/日;0=不限制。改动对下一次新建连接生效', hintEn: 'Default 5000/day; 0 = unlimited. Applies to new connections' },
|
|
164
|
-
{ name: 'ARGO_QUOTA_YUANBAO_LIMIT', kind: 'num', group: 'paid', def: 2000, min: 0, max: 1000000, step: 1, zh: '元宝 每月次数上限', en: 'Yuanbao monthly call cap', hintZh: '默认 2000/月;0=不限制。改动对下一次新建连接生效', hintEn: 'Default 2000/month; 0 = unlimited. Applies to new connections' },
|
|
165
|
-
{ name: 'ARGO_QUOTA_TAVILY_LIMIT', kind: 'num', group: 'paid', def: 1000, min: 0, max: 1000000, step: 1, zh: 'Tavily 每月次数上限', en: 'Tavily monthly call cap', hintZh: '默认 1000/月;0=不限制。改动对下一次新建连接生效', hintEn: 'Default 1000/month; 0 = unlimited. Applies to new connections' },
|
|
166
|
-
{ name: 'ARGO_NO_PREWARM', kind: 'bool', group: 'misc', def: false, zh: '关闭连接预热', en: 'Disable prewarm', hintZh: 'MCP 握手后预热引擎注册表,默认开;开启本项即关闭预热', hintEn: 'Prewarm the engine registry after handshake, on by default; enable this to turn it off' },
|
|
167
|
-
{ name: 'ARGO_USAGE_LOG', kind: 'bool', group: 'misc', def: true, zh: '使用日志', en: 'Usage log', hintZh: 'argo 侧 JSONL 使用账本,默认开', hintEn: 'argo JSONL usage ledger, on by default' },
|
|
168
|
-
{ name: 'ARGO_ENGINE_HTTP_CLIENT', kind: 'bool', group: 'misc', def: true, zh: 'HttpClient 连接池', en: 'HttpClient pool', hintZh: '引擎 HTTP 走连接池,默认开;=0 回退 urllib(诊断用)', hintEn: 'Pooled engine HTTP, on by default; =0 falls back to urllib' },
|
|
169
|
-
{ name: 'ARGO_ADMISSION_TTL_S', kind: 'num', group: 'misc', def: 1, min: 0, max: 60, step: 0.5, zh: '准入记忆 TTL(秒)', en: 'Admission memo TTL (s)', hintZh: '引擎准入状态记忆时长,默认 1;0 每次现查', hintEn: 'Admission memo window, default 1; 0 = always fresh' },
|
|
170
|
-
{ name: 'ARGO_CONFIG_STAMP_TTL_S', kind: 'num', group: 'misc', def: 1, min: 0, max: 60, step: 0.5, zh: '配置戳记忆 TTL(秒)', en: 'Config stamp memo TTL (s)', hintZh: '外部引擎扫描记忆时长,默认 1;0 每次现扫', hintEn: 'External engine scan memo window, default 1; 0 = always rescan' },
|
|
171
|
-
])
|
|
172
|
-
|
|
173
|
-
const ARGO_ENV_NAMES = new Set(ARGO_ENV_SPECS.map(spec => spec.name))
|
|
174
|
-
const ARGO_ENV_BY_NAME = new Map(ARGO_ENV_SPECS.map(spec => [spec.name, spec]))
|
|
175
|
-
|
|
176
|
-
function parseArgoEnvLine(line) {
|
|
177
|
-
const eq = line.indexOf('=')
|
|
178
|
-
if (eq <= 0) return null
|
|
179
|
-
const name = line.slice(0, eq).trim()
|
|
180
|
-
const value = line.slice(eq + 1)
|
|
181
|
-
if (!CREDENTIAL_REF_PATTERN.test(name)) return null
|
|
182
|
-
return { name, value }
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export function argoEnvOverlay(config = activeConfig) {
|
|
186
|
-
const overlay = {}
|
|
187
|
-
for (const entry of asStringArray(config?.argoEnv, 64)) {
|
|
188
|
-
const parsed = parseArgoEnvLine(entry)
|
|
189
|
-
if (parsed === null || !ARGO_ENV_NAMES.has(parsed.name)) continue
|
|
190
|
-
overlay[parsed.name] = parsed.value
|
|
191
|
-
}
|
|
192
|
-
return overlay
|
|
193
|
-
}
|
|
194
|
-
|
|
195
90
|
const isObject = (value) => typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
196
91
|
|
|
197
92
|
const VOLATILE_WRITE = Symbol.for('cosmokit.volatile.write')
|
|
@@ -225,9 +120,9 @@ const NATIVE_TOOL_NAMES = Object.keys(NATIVE_TOOL_SPECS)
|
|
|
225
120
|
|
|
226
121
|
export const Config = Schema === undefined ? undefined : Schema.object({
|
|
227
122
|
toolName: Schema.string().default(DEFAULTS.toolName)
|
|
228
|
-
.description('
|
|
123
|
+
.description('研究工具名(结构性设置,改 profile patch 后核对 Host 行与功能)'),
|
|
229
124
|
provider: Schema.string().default(DEFAULTS.provider)
|
|
230
|
-
.description('wide_research 使用的子代理 provider
|
|
125
|
+
.description('wide_research 使用的子代理 provider(结构性设置,改 profile patch 后核对 Host 行与功能)'),
|
|
231
126
|
searchProviderId: Schema.string().default(DEFAULTS.searchProviderId)
|
|
232
127
|
.description('web_search provider id(结构性设置;改动需同步 web 行 searchProvider)'),
|
|
233
128
|
fetchProviderId: Schema.string().default(DEFAULTS.fetchProviderId)
|
|
@@ -303,8 +198,6 @@ export const Config = Schema === undefined ? undefined : Schema.object({
|
|
|
303
198
|
.volatile(),
|
|
304
199
|
})
|
|
305
200
|
|
|
306
|
-
const CREDENTIAL_REF_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/
|
|
307
|
-
|
|
308
201
|
function readHostCredentials(ctx) {
|
|
309
202
|
try {
|
|
310
203
|
const service = typeof ctx?.get === 'function' ? ctx.get('credentials') : ctx?.credentials
|
|
@@ -321,34 +214,11 @@ function runEffect(ctx, fn) {
|
|
|
321
214
|
return ctx.effect(fn)
|
|
322
215
|
}
|
|
323
216
|
|
|
324
|
-
let hostCredentials = undefined
|
|
325
|
-
let activeConfig = DEFAULTS
|
|
326
|
-
|
|
327
|
-
export async function resolveArgoEnv(config = activeConfig, options = {}) {
|
|
328
|
-
const overlay = argoEnvOverlay(config)
|
|
329
|
-
const refs = asStringArray(config?.keyRefs, 20)
|
|
330
|
-
if (refs.length > 0) {
|
|
331
|
-
const provider = options.credentials ?? config?.credentials ?? hostCredentials
|
|
332
|
-
if (provider !== undefined) {
|
|
333
|
-
for (const ref of refs) {
|
|
334
|
-
try {
|
|
335
|
-
const resolved = await provider.resolve(ref)
|
|
336
|
-
if (typeof resolved?.value === 'string' && resolved.value !== '') overlay[ref] = resolved.value
|
|
337
|
-
} catch { /* ignore */ }
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
return Object.keys(overlay).length > 0 ? { ...process.env, ...overlay } : undefined
|
|
342
|
-
}
|
|
343
|
-
|
|
344
217
|
const asString = (value, fallback = '') => typeof value === 'string' ? value.trim() : fallback
|
|
345
|
-
const asStringArray = (value, maximum) => Array.isArray(value)
|
|
346
|
-
? value.filter(entry => typeof entry === 'string').map(entry => entry.trim()).filter(Boolean).slice(0, maximum)
|
|
347
|
-
: []
|
|
348
218
|
|
|
349
219
|
// 注入执行器的动态环境变量解析逻辑
|
|
350
220
|
setEnvResolver(async (options, config) => {
|
|
351
|
-
return resolveArgoEnv(config
|
|
221
|
+
return resolveArgoEnv(config, options)
|
|
352
222
|
})
|
|
353
223
|
|
|
354
224
|
export function apply(ctx, providedConfig = {}) {
|
|
@@ -388,13 +258,14 @@ export function apply(ctx, providedConfig = {}) {
|
|
|
388
258
|
}
|
|
389
259
|
}
|
|
390
260
|
|
|
391
|
-
hostCredentials = readHostCredentials(ctx)
|
|
392
|
-
|
|
261
|
+
const hostCredentials = readHostCredentials(ctx)
|
|
262
|
+
setHostCredentials(hostCredentials)
|
|
263
|
+
setActiveConfig(config)
|
|
393
264
|
|
|
394
265
|
runEffect(ctx, () => () => {
|
|
395
266
|
disposeSharedMcp()
|
|
396
|
-
|
|
397
|
-
|
|
267
|
+
setHostCredentials(undefined)
|
|
268
|
+
setActiveConfig(DEFAULTS)
|
|
398
269
|
})
|
|
399
270
|
|
|
400
271
|
const childIds = new Set()
|
|
@@ -498,6 +369,8 @@ export function apply(ctx, providedConfig = {}) {
|
|
|
498
369
|
try { dispose?.() } catch { /* ignore */ }
|
|
499
370
|
}
|
|
500
371
|
nativeRegistrations.clear()
|
|
372
|
+
resetEnvResolver()
|
|
373
|
+
disposeSharedMcp()
|
|
501
374
|
})
|
|
502
375
|
|
|
503
376
|
ctx.tools.register(createWideResearchTool(ctx, config, {
|
|
@@ -525,30 +398,3 @@ export function apply(ctx, providedConfig = {}) {
|
|
|
525
398
|
|
|
526
399
|
return { childIds, syncNativeTools }
|
|
527
400
|
}
|
|
528
|
-
|
|
529
|
-
export {
|
|
530
|
-
normalizeTracks,
|
|
531
|
-
stageTracks,
|
|
532
|
-
evaluateGates,
|
|
533
|
-
normalizeSource,
|
|
534
|
-
normalizeSourceUrl,
|
|
535
|
-
buildLocalSources,
|
|
536
|
-
parseJsonArray,
|
|
537
|
-
parseJsonObject,
|
|
538
|
-
extractValues,
|
|
539
|
-
nativeViaMcpPool,
|
|
540
|
-
runNativeCall,
|
|
541
|
-
resolveNativeSpawn,
|
|
542
|
-
makeNativeTool,
|
|
543
|
-
disposeSharedMcp,
|
|
544
|
-
startStructured,
|
|
545
|
-
providerSupportsStructured,
|
|
546
|
-
fetchViaArgo,
|
|
547
|
-
mapArgoToWebResult,
|
|
548
|
-
mapArgoToWebFetch,
|
|
549
|
-
classifyFetchError,
|
|
550
|
-
searchViaArgoMCP,
|
|
551
|
-
persistReport,
|
|
552
|
-
getMcpPoolStats,
|
|
553
|
-
resetMcpPool,
|
|
554
|
-
}
|