argo-search 1.0.1 → 2.9.8
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/LICENSE +201 -21
- package/README.en.md +735 -0
- package/README.es.md +777 -0
- package/README.ja.md +777 -0
- package/README.ko.md +777 -0
- package/README.md +778 -320
- package/SKILL.md +135 -0
- package/assets/readme/hero.svg +121 -0
- package/assets/readme/made-with-beautify.svg +10 -0
- package/assets/readme/proof-routes.svg +73 -0
- package/assets/readme/why-better.svg +104 -0
- package/assets/readme/workflow.svg +83 -0
- package/backends/domain_profiles.json +2356 -96
- package/backends/engine_registry.yaml +3428 -503
- package/backends/query_synonyms_cn.json +35 -0
- package/backends/quota_profiles.json +2488 -160
- package/backends/source_types_cn.json +109 -0
- package/backends/text_lexicon.json +44 -0
- package/bin/argo +772 -0
- package/bin/argo.js +102 -39
- package/config.yaml +5139 -367
- package/cordis.patch.yml +21 -0
- package/data/countries.json +40 -0
- package/data/lang_matrix/lang_capability.json +842 -0
- package/data/lang_matrix/matrix_2026-09-10.json +11921 -0
- package/data/regions_cn.json +1 -0
- package/docs/ADDING_NEW_ENGINE.md +184 -0
- package/docs/ARGO_INTRO.md +124 -0
- package/docs/DATA_SOURCE_GAPS.md +81 -0
- package/docs/DESIGN_LOCAL_DATA_FUSION.md +90 -0
- package/docs/ENGINE_CATALOG.md +575 -0
- package/docs/MCP_SETUP.md +108 -0
- package/docs/PLATFORM_PATHS.md +111 -0
- package/docs/RELEASE_NOTES_v2.8.0.md +71 -0
- package/docs/RELEASE_NOTES_v2.8.2.md +63 -0
- package/docs/RELEASE_NOTES_v2.8.3.md +55 -0
- package/docs/RELEASE_NOTES_v2.8.4.md +79 -0
- package/docs/RELEASE_NOTES_v2.8.5.md +102 -0
- package/docs/RELEASE_NOTES_v2.8.6.md +66 -0
- package/docs/RELEASE_NOTES_v2.8.7.md +65 -0
- package/docs/RELEASE_NOTES_v2.8.8.md +67 -0
- package/docs/RELEASE_NOTES_v2.8.9.md +67 -0
- package/docs/RELEASE_NOTES_v2.9.0.md +64 -0
- package/docs/RELEASE_NOTES_v2.9.8.md +73 -0
- package/docs/SEARCH_ARCHIVE.md +115 -0
- package/docs/assets/architecture.svg +104 -0
- package/docs/assets/hero.svg +98 -0
- package/docs/engines/bangumi.md +27 -0
- package/docs/engines/biorxiv.md +27 -0
- package/docs/engines/clawhub.md +27 -0
- package/docs/engines/crt_sh.md +27 -0
- package/docs/engines/datacite.md +27 -0
- package/docs/engines/deps_dev.md +27 -0
- package/docs/engines/douban_movie.md +27 -0
- package/docs/engines/endoflife.md +27 -0
- package/docs/engines/flk_law.md +27 -0
- package/docs/engines/fxtwitter.md +27 -0
- package/docs/engines/google_news.md +27 -0
- package/docs/engines/gov_regulations.md +27 -0
- package/docs/engines/guqian.md +27 -0
- package/docs/engines/hackernews.md +27 -0
- package/docs/engines/iplant.md +27 -0
- package/docs/engines/keenable.md +27 -0
- package/docs/engines/met_museum.md +27 -0
- package/docs/engines/nasa_images.md +27 -0
- package/docs/engines/netease_music.md +27 -0
- package/docs/engines/npm.md +27 -0
- package/docs/engines/nvd.md +27 -0
- package/docs/engines/openreview.md +27 -0
- package/docs/engines/openstd.md +27 -0
- package/docs/engines/parallel_free.md +27 -0
- package/docs/engines/people_daily.md +27 -0
- package/docs/engines/realtime_index.md +27 -0
- package/docs/engines/sec_edgar.md +27 -0
- package/docs/engines/seltz.md +27 -0
- package/docs/engines/skillsmp.md +27 -0
- package/docs/engines/sspai.md +27 -0
- package/docs/engines/std_samr.md +27 -0
- package/docs/engines/train.md +27 -0
- package/docs/engines/un_comtrade.md +27 -0
- package/docs/engines/wikisource.md +27 -0
- package/docs/engines/zdic.md +27 -0
- package/docs/engines/zenodo.md +27 -0
- package/docs/engines/zhihu_hot_app.md +27 -0
- package/docs//344/270/272/344/273/200/344/271/210/351/200/211/346/213/251argo.md +176 -0
- package/engines/README.md +10 -0
- package/engines/_template_cli.yaml +39 -0
- package/engines/_template_http.yaml +37 -0
- package/engines/plugins/_template_plugin.py +50 -0
- package/engines/specs/_cisa_kev.yaml +54 -0
- package/engines/specs/_osv.yaml +63 -0
- package/engines/specs/aljazeera.yaml +43 -0
- package/engines/specs/antara.yaml +43 -0
- package/engines/specs/artic.yaml +20 -0
- package/engines/specs/aviation_weather.yaml +39 -0
- package/engines/specs/bangumi.yaml +21 -0
- package/engines/specs/biorxiv.yaml +24 -0
- package/engines/specs/carbon_intensity.yaml +32 -0
- package/engines/specs/cfets.yaml +41 -0
- package/engines/specs/cinii.yaml +44 -0
- package/engines/specs/clawhub.yaml +49 -0
- package/engines/specs/cleveland.yaml +19 -0
- package/engines/specs/cn_ai_news.yaml +43 -0
- package/engines/specs/core.yaml +35 -0
- package/engines/specs/crt_sh.yaml +38 -0
- package/engines/specs/ct24.yaml +43 -0
- package/engines/specs/datacite.yaml +27 -0
- package/engines/specs/datagov_uk.yaml +41 -0
- package/engines/specs/ddgs_images.yaml +45 -0
- package/engines/specs/deepseek_search.yaml +74 -0
- package/engines/specs/deezer.yaml +20 -0
- package/engines/specs/defillama.yaml +38 -0
- package/engines/specs/deps_dev.yaml +21 -0
- package/engines/specs/digup.yaml +36 -0
- package/engines/specs/doi.yaml +39 -0
- package/engines/specs/douban_movie.yaml +22 -0
- package/engines/specs/dw_news.yaml +47 -0
- package/engines/specs/egov_law.yaml +21 -0
- package/engines/specs/elpais.yaml +43 -0
- package/engines/specs/endoflife.yaml +21 -0
- package/engines/specs/energy_charts.yaml +21 -0
- package/engines/specs/factcheck_org.yaml +52 -0
- package/engines/specs/faz.yaml +43 -0
- package/engines/specs/federal_register.yaml +57 -0
- package/engines/specs/firecrawl.yaml +53 -0
- package/engines/specs/flk_law.yaml +24 -0
- package/engines/specs/folha.yaml +43 -0
- package/engines/specs/france24.yaml +44 -0
- package/engines/specs/full_fact.yaml +47 -0
- package/engines/specs/fxtwitter.yaml +36 -0
- package/engines/specs/gbfs_nyc.yaml +32 -0
- package/engines/specs/gdacs.yaml +21 -0
- package/engines/specs/gdelt.yaml +64 -0
- package/engines/specs/gleif.yaml +55 -0
- package/engines/specs/google_news.yaml +22 -0
- package/engines/specs/gov_regulations.yaml +38 -0
- package/engines/specs/guardian_rss.yaml +59 -0
- package/engines/specs/hkex.yaml +40 -0
- package/engines/specs/hurriyet.yaml +43 -0
- package/engines/specs/iplant.yaml +25 -0
- package/engines/specs/jikan.yaml +24 -0
- package/engines/specs/jolpica.yaml +20 -0
- package/engines/specs/k10plus.yaml +20 -0
- package/engines/specs/keenable.yaml +44 -0
- package/engines/specs/keenable_free.yaml +36 -0
- package/engines/specs/lefigaro.yaml +43 -0
- package/engines/specs/listenbrainz.yaml +19 -0
- package/engines/specs/matichon.yaml +43 -0
- package/engines/specs/met_museum.yaml +21 -0
- package/engines/specs/nasa_images.yaml +45 -0
- package/engines/specs/netease_music.yaml +38 -0
- package/engines/specs/nhk.yaml +43 -0
- package/engines/specs/nhtsa_vpic.yaml +20 -0
- package/engines/specs/noaa_swpc.yaml +20 -0
- package/engines/specs/nvd.yaml +38 -0
- package/engines/specs/obis.yaml +20 -0
- package/engines/specs/opencitations.yaml +52 -0
- package/engines/specs/openf1.yaml +21 -0
- package/engines/specs/openfoodfacts.yaml +45 -0
- package/engines/specs/openligadb.yaml +20 -0
- package/engines/specs/openreview.yaml +37 -0
- package/engines/specs/openstd.yaml +21 -0
- package/engines/specs/people_daily.yaml +22 -0
- package/engines/specs/realtime_index.yaml +34 -0
- package/engines/specs/ror.yaml +20 -0
- package/engines/specs/satnogs.yaml +20 -0
- package/engines/specs/sec_edgar.yaml +46 -0
- package/engines/specs/shfe.yaml +39 -0
- package/engines/specs/skillsmp.yaml +50 -0
- package/engines/specs/sogou_weixin_browser.yaml +30 -0
- package/engines/specs/soilgrids.yaml +25 -0
- package/engines/specs/sspai.yaml +36 -0
- package/engines/specs/stackexchange.yaml +46 -0
- package/engines/specs/std_samr.yaml +21 -0
- package/engines/specs/tass.yaml +43 -0
- package/engines/specs/tavily_free.yaml +56 -0
- package/engines/specs/tle_mirror.yaml +21 -0
- package/engines/specs/train.yaml +37 -0
- package/engines/specs/tvmaze.yaml +20 -0
- package/engines/specs/twitter_syndication.yaml +31 -0
- package/engines/specs/un_comtrade.yaml +23 -0
- package/engines/specs/unpaywall.yaml +54 -0
- package/engines/specs/vnpress.yaml +43 -0
- package/engines/specs/weather.yaml +32 -0
- package/engines/specs/who_don.yaml +21 -0
- package/engines/specs/who_gho.yaml +20 -0
- package/engines/specs/wikimedia_commons.yaml +34 -0
- package/engines/specs/wikisource.yaml +22 -0
- package/engines/specs/worms.yaml +19 -0
- package/engines/specs/x_trending.yaml +34 -0
- package/engines/specs/yna.yaml +43 -0
- package/engines/specs/ynet.yaml +43 -0
- package/engines/specs/yuanbao.yaml +93 -0
- package/engines/specs/zbmath.yaml +40 -0
- package/engines/specs/zdic.yaml +22 -0
- package/engines/specs/zenodo.yaml +27 -0
- package/engines/specs/zhihu_hot_app.yaml +35 -0
- package/mcp/clients.yaml +106 -0
- package/package.json +55 -12
- package/packages/dsh-plugin/README.md +152 -0
- package/packages/dsh-plugin/cordis.patch.yml +48 -0
- package/packages/dsh-plugin/dsh/client.js +1533 -0
- package/packages/dsh-plugin/dsh/diagnostics.js +54 -0
- package/packages/dsh-plugin/dsh/index.js +527 -0
- package/packages/dsh-plugin/dsh/native-tools.mjs +749 -0
- package/packages/dsh-plugin/dsh/runner.js +666 -0
- package/packages/dsh-plugin/dsh/wide-research.js +878 -0
- package/packages/dsh-plugin/package.json +38 -0
- package/packages/dsh-plugin/scripts/sync-local.sh +70 -0
- package/packages/dsh-plugin/test/client.test.js +406 -0
- package/packages/dsh-plugin/test/config.test.js +30 -0
- package/packages/dsh-plugin/test/diagnostics.test.js +28 -0
- package/packages/dsh-plugin/test/index.test.js +1382 -0
- package/references/query-templates.md +96 -0
- package/references/query-templates.yaml +118 -0
- package/scripts/ab_eval.py +219 -0
- package/scripts/ab_eval_p0p1.py +266 -0
- package/scripts/adaptive.py +294 -70
- package/scripts/answer.py +154 -0
- package/scripts/archive_run.py +591 -0
- package/scripts/argo_engine_registry.py +172 -0
- package/scripts/argo_paths.py +728 -0
- package/scripts/article.py +136 -0
- package/scripts/article_meta.py +131 -0
- package/scripts/arxiv_source.py +201 -0
- package/scripts/badcase_ledger.py +252 -0
- package/scripts/batch_probe.py +241 -0
- package/scripts/benchmark.py +19 -0
- package/scripts/bounded_run.py +144 -0
- package/scripts/browser_auth.py +323 -0
- package/scripts/budget.py +247 -0
- package/scripts/budget_cli.py +93 -0
- package/scripts/build_release_assets.sh +65 -0
- package/scripts/burstiness_detector.py +147 -0
- package/scripts/cache.py +1066 -67
- package/scripts/cache_guard.py +271 -0
- package/scripts/cache_key_vdom.py +56 -0
- package/scripts/cache_similarity.py +170 -0
- package/scripts/caliber_isolation.py +195 -0
- package/scripts/calibrate_lowquality.py +210 -0
- package/scripts/candidate_envelope.py +366 -0
- package/scripts/chrome_cdp.py +871 -0
- package/scripts/ci_drift_gate.py +90 -0
- package/scripts/circuit_breaker.py +389 -0
- package/scripts/citations.py +334 -0
- package/scripts/cite_cli.py +59 -0
- package/scripts/cjk_tokens.py +95 -0
- package/scripts/clarify.py +47 -24
- package/scripts/cli_io.py +240 -0
- package/scripts/config.py +683 -45
- package/scripts/config_cache.py +402 -0
- package/scripts/conn_pool.py +220 -0
- package/scripts/content_boundary.py +46 -0
- package/scripts/content_security.py +685 -0
- package/scripts/content_signals.py +751 -0
- package/scripts/crawl.py +74 -35
- package/scripts/cross_lingual_trace.py +293 -0
- package/scripts/daemon.py +866 -0
- package/scripts/digup_bridge.py +214 -0
- package/scripts/dispatch_result.py +98 -0
- package/scripts/engine_admission.py +366 -0
- package/scripts/engine_dispatch.py +982 -0
- package/scripts/engine_env.py +539 -0
- package/scripts/engine_failure.py +411 -0
- package/scripts/engine_families.py +738 -0
- package/scripts/engine_policy.py +218 -0
- package/scripts/engine_requires.py +190 -0
- package/scripts/engine_status.py +322 -0
- package/scripts/engine_validate.py +638 -0
- package/scripts/engines.py +799 -294
- package/scripts/engines_base.py +1521 -0
- package/scripts/engines_builders.py +310 -0
- package/scripts/engines_builders_batch10.py +204 -0
- package/scripts/engines_builders_batch11.py +174 -0
- package/scripts/engines_builders_batch12.py +103 -0
- package/scripts/engines_builders_batch13.py +340 -0
- package/scripts/engines_builders_batch14.py +656 -0
- package/scripts/engines_builders_batch15.py +249 -0
- package/scripts/engines_builders_batch9.py +1468 -0
- package/scripts/engines_builders_cn.py +2283 -0
- package/scripts/engines_builders_data.py +2923 -0
- package/scripts/engines_builders_data_macro.py +775 -0
- package/scripts/engines_builders_feeds.py +255 -0
- package/scripts/engines_builders_intl.py +1239 -0
- package/scripts/engines_builders_keyless.py +111 -0
- package/scripts/engines_builders_search.py +440 -0
- package/scripts/engines_builders_tech.py +1359 -0
- package/scripts/evidence.py +620 -166
- package/scripts/evidence_loop.py +624 -0
- package/scripts/evidence_tier.py +298 -0
- package/scripts/except_sets.py +25 -0
- package/scripts/extract.py +55 -16
- package/scripts/fact_align.py +207 -0
- package/scripts/fact_crosscheck.py +230 -0
- package/scripts/fetch.py +25 -12
- package/scripts/fetch_browser.py +87 -0
- package/scripts/fetch_jsrun.py +122 -0
- package/scripts/fetch_quality.py +225 -0
- package/scripts/fetch_render_tinyfish.py +117 -0
- package/scripts/fetch_v3.py +1804 -0
- package/scripts/focus_extract.py +350 -0
- package/scripts/fulltext_store.py +169 -0
- package/scripts/fxtwitter_api.py +325 -0
- package/scripts/gen_engine_catalog.py +364 -0
- package/scripts/gen_native_tools.py +91 -0
- package/scripts/gen_routing_snapshot.py +195 -0
- package/scripts/health_check.py +140 -402
- package/scripts/health_probe.py +23 -8
- package/scripts/hot_state.py +134 -0
- package/scripts/http_client.py +1053 -0
- package/scripts/image_ops.py +430 -0
- package/scripts/image_vision/vision_probe.swift +126 -0
- package/scripts/install.ps1 +166 -0
- package/scripts/install.sh +221 -0
- package/scripts/job.py +1186 -0
- package/scripts/jump_resolver.py +235 -0
- package/scripts/lang_capability.py +150 -0
- package/scripts/lang_detect.py +289 -0
- package/scripts/lang_matrix_probe.py +329 -0
- package/scripts/lang_pref.py +311 -0
- package/scripts/link_source.py +340 -0
- package/scripts/local_image.py +970 -0
- package/scripts/local_seek.py +402 -0
- package/scripts/macro_countries.py +97 -0
- package/scripts/matrix_search_eval.py +1187 -0
- package/scripts/mcp_compact.py +234 -0
- package/scripts/mcp_diag.py +8 -3
- package/scripts/mcp_handlers.py +492 -0
- package/scripts/mcp_handlers_surface.py +157 -0
- package/scripts/mcp_launch.sh +124 -0
- package/scripts/mcp_local.py +241 -0
- package/scripts/mcp_server.py +125 -419
- package/scripts/mcp_setup.py +431 -0
- package/scripts/mcp_tools.py +331 -0
- package/scripts/mcp_transport.py +191 -0
- package/scripts/mcp_warm.py +127 -0
- package/scripts/min_version_scan.py +335 -0
- package/scripts/net_proxy.py +258 -0
- package/scripts/network_aware.py +152 -0
- package/scripts/output_transparency.py +200 -0
- package/scripts/paid_policy.py +98 -0
- package/scripts/paper.py +274 -0
- package/scripts/pdf_extract.py +518 -0
- package/scripts/phrase_filter.py +66 -0
- package/scripts/plan.py +422 -0
- package/scripts/postprocess_signals.py +150 -0
- package/scripts/pre-commit +48 -0
- package/scripts/query_enhance.py +157 -0
- package/scripts/query_operators.py +196 -0
- package/scripts/query_rewriter.py +116 -7
- package/scripts/query_signals.py +300 -0
- package/scripts/query_templates.py +167 -0
- package/scripts/query_understanding.py +411 -0
- package/scripts/query_variants.py +298 -0
- package/scripts/quota.py +633 -76
- package/scripts/rank_signals.py +775 -0
- package/scripts/ranking_eval.py +319 -0
- package/scripts/readability_extract.py +433 -0
- package/scripts/recompute.py +415 -0
- package/scripts/recovery.py +616 -0
- package/scripts/recovery_l0.py +160 -0
- package/scripts/recovery_runner.py +150 -0
- package/scripts/redskill/redskill_engine.py +332 -0
- package/scripts/regression_p0p1.py +318 -0
- package/scripts/replay_eval.py +658 -0
- package/scripts/rerank_tfidf.py +225 -0
- package/scripts/research.py +607 -403
- package/scripts/research_cli.py +361 -0
- package/scripts/research_dossier.py +492 -0
- package/scripts/research_expand.py +169 -0
- package/scripts/research_gates.py +272 -0
- package/scripts/research_report.py +209 -0
- package/scripts/research_strategy.py +37 -0
- package/scripts/research_work_packages.py +195 -0
- package/scripts/result_lang.py +311 -0
- package/scripts/retry_policy.py +76 -0
- package/scripts/robots_guard.py +259 -0
- package/scripts/route.py +921 -254
- package/scripts/route_bangs.py +40 -0
- package/scripts/route_cache.py +243 -0
- package/scripts/route_combo.py +917 -0
- package/scripts/route_domains.py +341 -0
- package/scripts/route_lang.py +605 -0
- package/scripts/route_log.py +63 -0
- package/scripts/route_policy.py +250 -0
- package/scripts/rrf_classic.py +66 -0
- package/scripts/screenshot.py +73 -0
- package/scripts/search.py +886 -406
- package/scripts/search_attribution.py +185 -0
- package/scripts/search_benchmark.py +407 -0
- package/scripts/search_cli.py +640 -0
- package/scripts/search_entry.py +395 -0
- package/scripts/search_output.py +690 -0
- package/scripts/search_pipeline.py +926 -0
- package/scripts/search_rank.py +991 -0
- package/scripts/search_types.py +129 -16
- package/scripts/seek_locator.py +68 -0
- package/scripts/semantic_evidence.py +391 -0
- package/scripts/serp_guard.py +336 -0
- package/scripts/serp_kill_log.py +74 -0
- package/scripts/single_flight.py +120 -0
- package/scripts/social_engines/__init__.py +10 -0
- package/scripts/social_engines/bilibili_engine.py +131 -0
- package/scripts/social_engines/hackernews_engine.py +113 -0
- package/scripts/social_engines/reddit_engine.py +172 -0
- package/scripts/social_engines/twitter_engine.py +397 -0
- package/scripts/social_engines/v2ex_engine.py +101 -0
- package/scripts/social_engines/weibo_engine.py +128 -0
- package/scripts/social_engines/xiaohongshu_engine.py +137 -0
- package/scripts/social_engines/zhihu_engine.py +139 -0
- package/scripts/social_research.py +201 -0
- package/scripts/sogou_weixin_browser.py +318 -0
- package/scripts/source_ledger.py +249 -0
- package/scripts/stage_timing.py +58 -0
- package/scripts/stats_cli.py +107 -0
- package/scripts/straggler_policy.py +60 -0
- package/scripts/stylometry_detector.py +231 -0
- package/scripts/sync_backends.py +353 -0
- package/scripts/sync_installs.py +29 -0
- package/scripts/template_cli.py +127 -0
- package/scripts/text_lexicon.py +72 -0
- package/scripts/tfidf_router.py +109 -37
- package/scripts/time_utils.py +233 -0
- package/scripts/topic_research_profiles.py +643 -0
- package/scripts/train.py +737 -0
- package/scripts/tweet.py +596 -0
- package/scripts/url_canon.py +217 -0
- package/scripts/url_optimize.py +56 -0
- package/scripts/url_safety.py +236 -0
- package/scripts/usage_log.py +116 -0
- package/scripts/usage_log_clean.py +113 -0
- package/scripts/v2ex_nodes.py +311 -0
- package/scripts/variant_recall.py +188 -0
- package/scripts/watch.py +205 -0
- package/scripts/wechat_article.py +258 -0
- package/scripts/wide_research.py +447 -0
- package/scripts/wx.py +349 -0
- package/scripts/x_article_fetch.py +141 -0
- package/scripts/x_search.py +234 -0
- package/scripts/x_trending.py +189 -0
- package/scripts/yaml_load.py +67 -0
- package/scripts/zhihu_quota.py +139 -0
- package/sub-skills/ego-search/SKILL.md +253 -0
- package/sub-skills/ego-search/scripts/ego_search.py +800 -0
- package/sub-skills/ego-search/scripts/merge.py +226 -0
- package/sub-skills/ego-search/scripts/quality.py +64 -0
- package/sub-skills/ego-search/scripts/runtime.py +172 -0
- package/sub-skills/ego-search/scripts/safety.py +109 -0
- package/sub-skills/ego-search/scripts/serp_spec.py +109 -0
- package/sub-skills/ego-search/scripts/webbridge_adapter.py +374 -0
- package/sub-skills/js-run/SKILL.md +67 -0
- package/sub-skills/js-run/scripts/jsrun.py +112 -0
- package/sub-skills/js-run/scripts/shim.js +188 -0
- package/sub-skills/local-search/SKILL.md +50 -53
- package/sub-skills/local-search/bm25.py +186 -0
- package/sub-skills/local-search/cli_runner.py +331 -0
- package/sub-skills/local-search/config.yaml +152 -55
- package/sub-skills/local-search/engine_registry.py +91 -26
- package/sub-skills/local-search/{health_check.py → local_health_check.py} +140 -10
- package/sub-skills/local-search/local_search_adapter.py +13 -2
- package/sub-skills/local-search/parse_maps.yaml +40 -42
- package/sub-skills/local-search/parsers.py +328 -0
- package/sub-skills/local-search/search_v3.py +716 -242
- package/sub-skills/local-search/smart_router.py +47 -7
- package/sub-skills/local-seek/SKILL.md +110 -0
- package/sub-skills/local-seek/config/domains.yaml +20 -0
- package/sub-skills/local-seek/scripts/eval_rank.py +216 -0
- package/sub-skills/local-seek/scripts/eval_seek.py +224 -0
- package/sub-skills/local-seek/scripts/seek.py +1465 -0
- package/sub-skills/local-seek/scripts/seek_frecency.py +126 -0
- package/sub-skills/local-seek/scripts/seek_fts.py +430 -0
- package/sub-skills/local-seek/scripts/seek_rank.py +197 -0
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""cli_runner.py — local-search CLI 工具引擎调度(ddgs 等)。
|
|
3
|
+
|
|
4
|
+
拆分自 search_v3.py:负责外部命令行搜索工具执行、临时结构化输出文件管理、
|
|
5
|
+
错误标记探测与快速失败重试策略。
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import atexit
|
|
11
|
+
import json
|
|
12
|
+
import os
|
|
13
|
+
import re
|
|
14
|
+
import subprocess
|
|
15
|
+
import time
|
|
16
|
+
from typing import Any
|
|
17
|
+
|
|
18
|
+
# ddgs -o 的结构化输出临时文件清理
|
|
19
|
+
_TMP_FILES: set[str] = set()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _cleanup_tmp_files() -> None:
|
|
23
|
+
for p in list(_TMP_FILES):
|
|
24
|
+
try:
|
|
25
|
+
os.unlink(p)
|
|
26
|
+
except OSError:
|
|
27
|
+
pass
|
|
28
|
+
_TMP_FILES.discard(p)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
atexit.register(_cleanup_tmp_files)
|
|
32
|
+
|
|
33
|
+
# ddgs CLI 可用性检查缓存
|
|
34
|
+
_CLI_AVAIL_CACHE: dict[str, tuple[float, bool]] = {}
|
|
35
|
+
_CLI_AVAIL_TTL = 60.0
|
|
36
|
+
|
|
37
|
+
_DDGS_TIMELIMITS: dict[str, set[str]] = {
|
|
38
|
+
"text": {"d", "w", "m", "y"},
|
|
39
|
+
"news": {"d", "w", "m", "y"},
|
|
40
|
+
"images": {"d", "w", "m", "y"},
|
|
41
|
+
"videos": {"d", "w", "m"},
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
_CLI_ERROR_MARKERS: tuple[str, ...] = (
|
|
45
|
+
"DDGSException", "No results", "ConnectError", "ConnectTimeout",
|
|
46
|
+
"ReadTimeout", "Timeout", "backends do not exist",
|
|
47
|
+
)
|
|
48
|
+
_CLI_RETRIES = 1
|
|
49
|
+
_RETRY_FAST_S = 2.5
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _since_to_ddgs_timelimit(since: str | None, until: str | None) -> str | None:
|
|
53
|
+
"""Convert since/until to ddgs timelimit argument."""
|
|
54
|
+
if not since:
|
|
55
|
+
return None
|
|
56
|
+
match = re.match(r"^(\d+)([dwmy])$", since.lower())
|
|
57
|
+
if match:
|
|
58
|
+
num, unit = match.groups()
|
|
59
|
+
num = int(num)
|
|
60
|
+
if unit == "y":
|
|
61
|
+
return "y"
|
|
62
|
+
elif unit == "m":
|
|
63
|
+
return "m"
|
|
64
|
+
elif unit == "w":
|
|
65
|
+
return "w"
|
|
66
|
+
elif unit == "d":
|
|
67
|
+
if num >= 365:
|
|
68
|
+
return "y"
|
|
69
|
+
elif num >= 30:
|
|
70
|
+
return "m"
|
|
71
|
+
elif num >= 7:
|
|
72
|
+
return "w"
|
|
73
|
+
else:
|
|
74
|
+
return "d"
|
|
75
|
+
return None
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def _check_cli_available(cmd: str) -> bool:
|
|
79
|
+
"""Check if a CLI command is available(结果缓存 TTL=_CLI_AVAIL_TTL)。"""
|
|
80
|
+
import shutil
|
|
81
|
+
now = time.time()
|
|
82
|
+
hit = _CLI_AVAIL_CACHE.get(cmd)
|
|
83
|
+
if hit is not None and now - hit[0] < _CLI_AVAIL_TTL:
|
|
84
|
+
return hit[1]
|
|
85
|
+
ok = shutil.which(cmd) is not None
|
|
86
|
+
_CLI_AVAIL_CACHE[cmd] = (time.time(), ok)
|
|
87
|
+
return ok
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def _parse_cli_json(data: Any, engine_name: str) -> list[dict[str, Any]]:
|
|
91
|
+
"""解析 ddgs 结构化 JSON 输出(-o json 写入文件)。"""
|
|
92
|
+
if not isinstance(data, list):
|
|
93
|
+
return []
|
|
94
|
+
results: list[dict[str, Any]] = []
|
|
95
|
+
for item in data:
|
|
96
|
+
if not isinstance(item, dict):
|
|
97
|
+
continue
|
|
98
|
+
title = item.get("title", "")
|
|
99
|
+
url = item.get("href", item.get("url", item.get("link", "")))
|
|
100
|
+
snippet = item.get("body", item.get("snippet",
|
|
101
|
+
item.get("description", item.get("content", ""))))
|
|
102
|
+
if not title and not url:
|
|
103
|
+
continue
|
|
104
|
+
r: dict[str, Any] = {
|
|
105
|
+
"title": str(title),
|
|
106
|
+
"url": str(url),
|
|
107
|
+
"snippet": str(snippet),
|
|
108
|
+
"source": engine_name,
|
|
109
|
+
}
|
|
110
|
+
for key in ("image", "thumbnail", "source", "duration", "provider",
|
|
111
|
+
"height", "width"):
|
|
112
|
+
if key in item and item[key] not in (None, ""):
|
|
113
|
+
r[key] = item[key]
|
|
114
|
+
date = item.get("date")
|
|
115
|
+
if date:
|
|
116
|
+
r["published_at"] = str(date)[:64]
|
|
117
|
+
meta = " · ".join(
|
|
118
|
+
str(item[k]) for k in ("author", "publisher", "info")
|
|
119
|
+
if item.get(k)
|
|
120
|
+
)
|
|
121
|
+
if meta:
|
|
122
|
+
r["snippet"] = (str(snippet) + " · " + meta)[:400] if snippet else meta[:400]
|
|
123
|
+
results.append(r)
|
|
124
|
+
return results
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def _parse_cli_output(stdout: str, engine_name: str) -> tuple[list[dict[str, Any]], str]:
|
|
128
|
+
"""Parse output from CLI search tools like ddgs."""
|
|
129
|
+
results = []
|
|
130
|
+
try:
|
|
131
|
+
data = json.loads(stdout)
|
|
132
|
+
if isinstance(data, list):
|
|
133
|
+
for item in data:
|
|
134
|
+
result = {
|
|
135
|
+
"title": item.get("title", ""),
|
|
136
|
+
"url": item.get("href", item.get("url", item.get("link", ""))),
|
|
137
|
+
"snippet": item.get("body", item.get("snippet", item.get("description", item.get("content", "")))),
|
|
138
|
+
"source": engine_name,
|
|
139
|
+
}
|
|
140
|
+
for key in ["date", "image", "thumbnail", "source"]:
|
|
141
|
+
if key in item:
|
|
142
|
+
result[key] = item[key]
|
|
143
|
+
results.append(result)
|
|
144
|
+
return results, ""
|
|
145
|
+
except json.JSONDecodeError:
|
|
146
|
+
pass
|
|
147
|
+
|
|
148
|
+
current_result = {}
|
|
149
|
+
current_field = None
|
|
150
|
+
|
|
151
|
+
for line in stdout.split("\n"):
|
|
152
|
+
line_stripped = line.strip()
|
|
153
|
+
if not line_stripped:
|
|
154
|
+
continue
|
|
155
|
+
if re.fullmatch(r"\d+\.\s*", line_stripped):
|
|
156
|
+
if current_result:
|
|
157
|
+
results.append(current_result)
|
|
158
|
+
current_result = {}
|
|
159
|
+
current_field = None
|
|
160
|
+
continue
|
|
161
|
+
|
|
162
|
+
field_matched = False
|
|
163
|
+
for field, target_key in [
|
|
164
|
+
("title", "title"),
|
|
165
|
+
("href", "url"),
|
|
166
|
+
("url", "url"),
|
|
167
|
+
("body", "snippet"),
|
|
168
|
+
("snippet", "snippet"),
|
|
169
|
+
("description", "snippet"),
|
|
170
|
+
("content", "snippet"),
|
|
171
|
+
("date", "date"),
|
|
172
|
+
("image", "image"),
|
|
173
|
+
("thumbnail", "thumbnail"),
|
|
174
|
+
("source", "source"),
|
|
175
|
+
("duration", "duration"),
|
|
176
|
+
("provider", "provider"),
|
|
177
|
+
("height", "height"),
|
|
178
|
+
("width", "width"),
|
|
179
|
+
]:
|
|
180
|
+
if line_stripped.startswith(field) and len(line_stripped) > len(field):
|
|
181
|
+
value = line_stripped[len(field):].strip()
|
|
182
|
+
if value:
|
|
183
|
+
current_result[target_key] = value
|
|
184
|
+
current_field = field
|
|
185
|
+
field_matched = True
|
|
186
|
+
break
|
|
187
|
+
|
|
188
|
+
if not field_matched and current_field:
|
|
189
|
+
if current_field in ("body", "snippet", "description", "content"):
|
|
190
|
+
current_result.setdefault("snippet", "")
|
|
191
|
+
current_result["snippet"] += " " + line_stripped
|
|
192
|
+
|
|
193
|
+
if current_result:
|
|
194
|
+
results.append(current_result)
|
|
195
|
+
|
|
196
|
+
for i, r in enumerate(results):
|
|
197
|
+
r.setdefault("source", engine_name)
|
|
198
|
+
r.setdefault("title", "")
|
|
199
|
+
r.setdefault("url", "")
|
|
200
|
+
r.setdefault("snippet", "")
|
|
201
|
+
r.setdefault("score", round(0.9 - (i * 0.05), 2))
|
|
202
|
+
return results, ""
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def _attempt_loop(cmd: list[str], cli_cmd: str, key: str,
|
|
206
|
+
tmp_path: str | None, timeout: float):
|
|
207
|
+
"""CLI 引擎的单引擎尝试循环。"""
|
|
208
|
+
last_err = ""
|
|
209
|
+
for attempt in range(_CLI_RETRIES + 1):
|
|
210
|
+
t_attempt = time.monotonic()
|
|
211
|
+
try:
|
|
212
|
+
result = subprocess.run(
|
|
213
|
+
cmd,
|
|
214
|
+
capture_output=True,
|
|
215
|
+
text=True,
|
|
216
|
+
encoding="utf-8",
|
|
217
|
+
errors="replace",
|
|
218
|
+
timeout=timeout,
|
|
219
|
+
)
|
|
220
|
+
except subprocess.TimeoutExpired:
|
|
221
|
+
return [], f"{cli_cmd} timed out after {timeout}s"
|
|
222
|
+
except FileNotFoundError:
|
|
223
|
+
return [], f"{cli_cmd} not found"
|
|
224
|
+
except Exception as e:
|
|
225
|
+
return [], f"{cli_cmd} error: {e}"
|
|
226
|
+
|
|
227
|
+
combined_output = result.stdout + result.stderr
|
|
228
|
+
|
|
229
|
+
if tmp_path is not None:
|
|
230
|
+
json_ok = False
|
|
231
|
+
try:
|
|
232
|
+
with open(tmp_path, encoding="utf-8") as f:
|
|
233
|
+
data = json.load(f)
|
|
234
|
+
parsed = _parse_cli_json(data, key)
|
|
235
|
+
if parsed:
|
|
236
|
+
return parsed, ""
|
|
237
|
+
json_ok = True
|
|
238
|
+
except (OSError, ValueError):
|
|
239
|
+
json_ok = False
|
|
240
|
+
finally:
|
|
241
|
+
try:
|
|
242
|
+
os.unlink(tmp_path)
|
|
243
|
+
except OSError:
|
|
244
|
+
pass
|
|
245
|
+
if json_ok:
|
|
246
|
+
return [], ""
|
|
247
|
+
else:
|
|
248
|
+
json_ok = False
|
|
249
|
+
|
|
250
|
+
err_marker = next(
|
|
251
|
+
(m for m in _CLI_ERROR_MARKERS if m in combined_output), None
|
|
252
|
+
)
|
|
253
|
+
if err_marker:
|
|
254
|
+
detail = combined_output.strip().replace("\n", " ")[:120]
|
|
255
|
+
last_err = f"{cli_cmd}: {err_marker}: {detail}"
|
|
256
|
+
if attempt < _CLI_RETRIES and time.monotonic() - t_attempt <= _RETRY_FAST_S:
|
|
257
|
+
time.sleep(0.3)
|
|
258
|
+
continue
|
|
259
|
+
return [], last_err
|
|
260
|
+
if result.returncode != 0:
|
|
261
|
+
last_err = f"{cli_cmd} exit {result.returncode}: {combined_output[:200]}"
|
|
262
|
+
if attempt < _CLI_RETRIES and time.monotonic() - t_attempt <= _RETRY_FAST_S:
|
|
263
|
+
time.sleep(0.3)
|
|
264
|
+
continue
|
|
265
|
+
return [], last_err
|
|
266
|
+
|
|
267
|
+
parsed, parse_err = _parse_cli_output(result.stdout, key)
|
|
268
|
+
if parsed:
|
|
269
|
+
return parsed, parse_err
|
|
270
|
+
last_err = f"{cli_cmd}: empty output"
|
|
271
|
+
if attempt < _CLI_RETRIES and time.monotonic() - t_attempt <= _RETRY_FAST_S:
|
|
272
|
+
time.sleep(0.3)
|
|
273
|
+
continue
|
|
274
|
+
return [], last_err
|
|
275
|
+
return [], last_err
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
def _run_cli_engine(spec: dict[str, Any], query: str, n: int, timeout: float,
|
|
279
|
+
since: str | None = None, until: str | None = None,
|
|
280
|
+
lang_param_fn=None) -> tuple[list[dict[str, Any]], str]:
|
|
281
|
+
"""Run a CLI-based search engine (e.g., ddgs)."""
|
|
282
|
+
cli_cmd = spec.get("cli_command", "")
|
|
283
|
+
cli_args_template = spec.get("cli_args", [])
|
|
284
|
+
key = spec.get("key", cli_cmd)
|
|
285
|
+
|
|
286
|
+
if not cli_cmd:
|
|
287
|
+
return [], "CLI engine missing cli_command"
|
|
288
|
+
|
|
289
|
+
if not _check_cli_available(cli_cmd):
|
|
290
|
+
return [], f"{cli_cmd} not available"
|
|
291
|
+
|
|
292
|
+
time_limit = _since_to_ddgs_timelimit(since, until)
|
|
293
|
+
|
|
294
|
+
cli_args = []
|
|
295
|
+
for arg in cli_args_template:
|
|
296
|
+
formatted = arg.format(query=query, n=n)
|
|
297
|
+
cli_args.append(formatted)
|
|
298
|
+
|
|
299
|
+
if time_limit and "-t" not in cli_args and "--timelimit" not in cli_args:
|
|
300
|
+
sub = next((a for a in cli_args_template if not str(a).startswith("-")), None)
|
|
301
|
+
allowed = _DDGS_TIMELIMITS.get(str(sub), _DDGS_TIMELIMITS["text"])
|
|
302
|
+
if time_limit in allowed:
|
|
303
|
+
cli_args.extend(["-t", time_limit])
|
|
304
|
+
|
|
305
|
+
if spec.get("use_lang_region") and not any(a in ("-r", "--region") for a in cli_args) and lang_param_fn:
|
|
306
|
+
region = lang_param_fn("region", query)
|
|
307
|
+
if region:
|
|
308
|
+
cli_args.extend(["-r", region])
|
|
309
|
+
|
|
310
|
+
output_format = spec.get("output_format", "")
|
|
311
|
+
tmp_path: str | None = None
|
|
312
|
+
if output_format == "json" and not any(
|
|
313
|
+
a in ("-o", "--output") for a in cli_args
|
|
314
|
+
):
|
|
315
|
+
import tempfile
|
|
316
|
+
fd, tmp_path = tempfile.mkstemp(suffix=".json", prefix="ddgs_")
|
|
317
|
+
os.close(fd)
|
|
318
|
+
_TMP_FILES.add(tmp_path)
|
|
319
|
+
cli_args.extend(["-o", tmp_path])
|
|
320
|
+
|
|
321
|
+
cmd = [cli_cmd] + cli_args
|
|
322
|
+
|
|
323
|
+
try:
|
|
324
|
+
return _attempt_loop(cmd, cli_cmd, key, tmp_path, timeout)
|
|
325
|
+
finally:
|
|
326
|
+
if tmp_path is not None:
|
|
327
|
+
try:
|
|
328
|
+
os.unlink(tmp_path)
|
|
329
|
+
except OSError:
|
|
330
|
+
pass
|
|
331
|
+
_TMP_FILES.discard(tmp_path)
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# local-search 子技能专属配置
|
|
2
|
-
# 与
|
|
2
|
+
# 与 argo/config.yaml 解耦,local_search_adapter.py / search_v3.py 直接读取本文件。
|
|
3
3
|
|
|
4
4
|
settings:
|
|
5
5
|
default_timeout: 8
|
|
6
6
|
default_results: 5
|
|
7
|
-
|
|
7
|
+
# 27 个启用引擎 ÷ 12 ≈ 3 波串发(此前 5 并发 6 波,长尾实测可到 7s);
|
|
8
|
+
# ddgs 免费源瞬时 12 并发有熔断器兜底。
|
|
9
|
+
max_parallel_engines: 12
|
|
8
10
|
user_agent: "Mozilla/5.0 (compatible; unified-search-local/1.0.1; +https://local)"
|
|
9
|
-
request_interval_ms: 500
|
|
10
11
|
health_check:
|
|
11
12
|
canary_query: "test"
|
|
12
13
|
ttl_minutes: 5
|
|
@@ -17,68 +18,105 @@ settings:
|
|
|
17
18
|
|
|
18
19
|
engines:
|
|
19
20
|
local_bing:
|
|
20
|
-
type:
|
|
21
|
+
type: cli
|
|
21
22
|
enabled: true
|
|
22
23
|
categories: [web_general]
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
cli_command: ddgs
|
|
25
|
+
cli_args: ["text", "-q", "{query}", "-m", "{n}", "-b", "bing"]
|
|
26
|
+
key: local_bing
|
|
26
27
|
timeout: 8
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
output_format: json
|
|
29
|
+
use_lang_region: true
|
|
30
|
+
fallback_type: html
|
|
31
|
+
fallback_url: "https://www.bing.com/search"
|
|
32
|
+
fallback_param: q
|
|
33
|
+
fallback_params:
|
|
29
34
|
setlang: zh-Hans
|
|
30
35
|
|
|
31
|
-
|
|
32
|
-
type:
|
|
33
|
-
enabled:
|
|
34
|
-
categories: [web_general]
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
local_yandex:
|
|
37
|
+
type: cli
|
|
38
|
+
enabled: true
|
|
39
|
+
categories: [web_general, japanese]
|
|
40
|
+
cli_command: ddgs
|
|
41
|
+
cli_args: ["text", "-q", "{query}", "-m", "{n}", "-b", "yandex"]
|
|
42
|
+
key: local_yandex
|
|
38
43
|
timeout: 8
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
output_format: json
|
|
45
|
+
use_lang_region: true
|
|
46
|
+
# html fallback 已删:yandex.com 直连被 SmartCaptcha 墙(2026-09-26 实测),
|
|
47
|
+
# 无 selectors 可用,cli 失败即诚实空
|
|
42
48
|
|
|
43
|
-
|
|
44
|
-
type:
|
|
49
|
+
local_duckduckgo:
|
|
50
|
+
type: cli
|
|
45
51
|
enabled: true
|
|
46
52
|
categories: [web_general]
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
timeout:
|
|
51
|
-
|
|
53
|
+
cli_command: ddgs
|
|
54
|
+
cli_args: ["text", "-q", "{query}", "-m", "{n}"]
|
|
55
|
+
key: local_duckduckgo
|
|
56
|
+
timeout: 8
|
|
57
|
+
output_format: json
|
|
58
|
+
use_lang_region: true
|
|
59
|
+
fallback_type: html
|
|
60
|
+
fallback_url: "https://html.duckduckgo.com/html/"
|
|
61
|
+
fallback_param: q
|
|
52
62
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
63
|
+
# ddgs brave backend(实测 ~1.1s 稳定可用)
|
|
64
|
+
local_brave:
|
|
65
|
+
type: cli
|
|
66
|
+
enabled: true
|
|
56
67
|
categories: [web_general]
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
timeout:
|
|
61
|
-
|
|
68
|
+
cli_command: ddgs
|
|
69
|
+
cli_args: ["text", "-q", "{query}", "-m", "{n}", "-b", "brave"]
|
|
70
|
+
key: local_brave
|
|
71
|
+
timeout: 8
|
|
72
|
+
output_format: json
|
|
73
|
+
use_lang_region: true
|
|
62
74
|
|
|
63
|
-
|
|
64
|
-
|
|
75
|
+
# ddgs yahoo backend(实测 ~1.1s 稳定可用)
|
|
76
|
+
local_yahoo:
|
|
77
|
+
type: cli
|
|
65
78
|
enabled: true
|
|
66
79
|
categories: [web_general]
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
timeout:
|
|
71
|
-
|
|
80
|
+
cli_command: ddgs
|
|
81
|
+
cli_args: ["text", "-q", "{query}", "-m", "{n}", "-b", "yahoo"]
|
|
82
|
+
key: local_yahoo
|
|
83
|
+
timeout: 8
|
|
84
|
+
output_format: json
|
|
85
|
+
use_lang_region: true
|
|
72
86
|
|
|
73
|
-
|
|
74
|
-
|
|
87
|
+
# ddgs CLI 增强版引擎(支持 news/images/videos)
|
|
88
|
+
local_ddgs_news:
|
|
89
|
+
type: cli
|
|
75
90
|
enabled: true
|
|
76
|
-
categories: [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
91
|
+
categories: [news]
|
|
92
|
+
cli_command: ddgs
|
|
93
|
+
cli_args: ["news", "-q", "{query}", "-m", "{n}"]
|
|
94
|
+
key: local_ddgs_news
|
|
80
95
|
timeout: 8
|
|
81
|
-
|
|
96
|
+
output_format: json
|
|
97
|
+
use_lang_region: true
|
|
98
|
+
|
|
99
|
+
local_ddgs_images:
|
|
100
|
+
type: cli
|
|
101
|
+
enabled: true
|
|
102
|
+
categories: [images]
|
|
103
|
+
cli_command: ddgs
|
|
104
|
+
cli_args: ["images", "-q", "{query}", "-m", "{n}"]
|
|
105
|
+
key: local_ddgs_images
|
|
106
|
+
timeout: 8
|
|
107
|
+
output_format: json
|
|
108
|
+
use_lang_region: true
|
|
109
|
+
|
|
110
|
+
local_ddgs_videos:
|
|
111
|
+
type: cli
|
|
112
|
+
enabled: true
|
|
113
|
+
categories: [videos]
|
|
114
|
+
cli_command: ddgs
|
|
115
|
+
cli_args: ["videos", "-q", "{query}", "-m", "{n}"]
|
|
116
|
+
key: local_ddgs_videos
|
|
117
|
+
timeout: 8
|
|
118
|
+
output_format: json
|
|
119
|
+
use_lang_region: true
|
|
82
120
|
|
|
83
121
|
local_baidu:
|
|
84
122
|
type: html
|
|
@@ -89,6 +127,10 @@ engines:
|
|
|
89
127
|
method: GET
|
|
90
128
|
timeout: 8
|
|
91
129
|
format: html
|
|
130
|
+
# 结果链接走 baidu.com/link 跳转壳:与主链 baidu 引擎同契约(engines_base
|
|
131
|
+
# 同名同义),不解析会在主链 serp_guard 整批被杀。解不开的按不可核验
|
|
132
|
+
# 信源丢弃。
|
|
133
|
+
resolve_redirects: true
|
|
92
134
|
extra_params:
|
|
93
135
|
ie: utf-8
|
|
94
136
|
|
|
@@ -101,6 +143,36 @@ engines:
|
|
|
101
143
|
method: GET
|
|
102
144
|
timeout: 8
|
|
103
145
|
format: html
|
|
146
|
+
# 结果链接走 sogou.com/link 会话型跳转壳:Chrome 指纹下是 200 小页 +
|
|
147
|
+
# window.location.replace(真实URL),可无会话解析(2026-10-06 实测);
|
|
148
|
+
# 不解析会在主链 serp_guard 整批被杀(returned 10 → kept 1 的根因)。
|
|
149
|
+
resolve_redirects: true
|
|
150
|
+
|
|
151
|
+
local_360:
|
|
152
|
+
type: html
|
|
153
|
+
enabled: true
|
|
154
|
+
categories: [chinese]
|
|
155
|
+
family: web_general
|
|
156
|
+
url: "https://www.so.com/s"
|
|
157
|
+
query_param: q
|
|
158
|
+
method: GET
|
|
159
|
+
timeout: 8
|
|
160
|
+
format: html
|
|
161
|
+
# 不声明 resolve_redirects(2026-10-06 实测):so.com/link 需 QiHoo GUID
|
|
162
|
+
# cookie 链,chrome131 指纹直连仍 400,声明了只会把结果整条丢弃。
|
|
163
|
+
extra_params:
|
|
164
|
+
ie: utf-8
|
|
165
|
+
|
|
166
|
+
local_jisilu:
|
|
167
|
+
type: html
|
|
168
|
+
enabled: true
|
|
169
|
+
categories: [finance, chinese]
|
|
170
|
+
family: social
|
|
171
|
+
url: "https://www.jisilu.cn/explore/"
|
|
172
|
+
query_param: keyword
|
|
173
|
+
method: GET
|
|
174
|
+
timeout: 8
|
|
175
|
+
format: html
|
|
104
176
|
|
|
105
177
|
local_arxiv:
|
|
106
178
|
type: xml
|
|
@@ -128,6 +200,11 @@ engines:
|
|
|
128
200
|
db: pubmed
|
|
129
201
|
retmode: json
|
|
130
202
|
retmax: "{n}"
|
|
203
|
+
datetype: pdat
|
|
204
|
+
# 时间窗下推:mindate/maxdate + datetype=pdat(出版日期)
|
|
205
|
+
filter_args:
|
|
206
|
+
since: [[mindate, "{since_iso}"]]
|
|
207
|
+
until: [[maxdate, "{until_iso}"]]
|
|
131
208
|
|
|
132
209
|
local_crossref:
|
|
133
210
|
type: json
|
|
@@ -166,6 +243,7 @@ engines:
|
|
|
166
243
|
format: rss
|
|
167
244
|
extra_params:
|
|
168
245
|
format: rss
|
|
246
|
+
note: ddgs bing news backend unreliable, use RSS directly
|
|
169
247
|
|
|
170
248
|
local_google_news:
|
|
171
249
|
type: rss
|
|
@@ -176,16 +254,20 @@ engines:
|
|
|
176
254
|
method: GET
|
|
177
255
|
timeout: 8
|
|
178
256
|
format: rss
|
|
257
|
+
note: ddgs google news backend unreliable, use RSS directly
|
|
179
258
|
|
|
180
259
|
local_duckduckgo_news:
|
|
181
|
-
type:
|
|
182
|
-
enabled:
|
|
260
|
+
type: cli
|
|
261
|
+
enabled: true
|
|
183
262
|
categories: [news]
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
timeout:
|
|
188
|
-
|
|
263
|
+
cli_command: ddgs
|
|
264
|
+
cli_args: ["news", "-q", "{query}", "-m", "{n}"]
|
|
265
|
+
key: local_duckduckgo_news
|
|
266
|
+
timeout: 15
|
|
267
|
+
output_format: json
|
|
268
|
+
fallback_type: html
|
|
269
|
+
fallback_url: "https://duckduckgo.com/html/"
|
|
270
|
+
fallback_param: q
|
|
189
271
|
|
|
190
272
|
local_github:
|
|
191
273
|
type: json
|
|
@@ -201,6 +283,10 @@ engines:
|
|
|
201
283
|
headers:
|
|
202
284
|
Accept: application/vnd.github.v3+json
|
|
203
285
|
User-Agent: unified-search-local/1.0.1
|
|
286
|
+
# 时间窗下推:created 限定符追加进 q(参数名与 query_param 相同时自动追加,不重复 query)
|
|
287
|
+
filter_args:
|
|
288
|
+
since: [[q, "created:>={since_iso}"]]
|
|
289
|
+
until: [[q, "created:<={until_iso}"]]
|
|
204
290
|
|
|
205
291
|
local_stackoverflow:
|
|
206
292
|
type: json
|
|
@@ -216,6 +302,10 @@ engines:
|
|
|
216
302
|
pagesize: "{n}"
|
|
217
303
|
order: desc
|
|
218
304
|
sort: relevance
|
|
305
|
+
# 时间窗下推:fromdate/todate(unix 时间戳)
|
|
306
|
+
filter_args:
|
|
307
|
+
since: [[fromdate, "{since_epoch}"]]
|
|
308
|
+
until: [[todate, "{until_epoch}"]]
|
|
219
309
|
|
|
220
310
|
local_gitlab:
|
|
221
311
|
type: json
|
|
@@ -229,6 +319,10 @@ engines:
|
|
|
229
319
|
extra_params:
|
|
230
320
|
per_page: "{n}"
|
|
231
321
|
scope: projects
|
|
322
|
+
# 时间窗下推:created_after/created_before(ISO 日期)
|
|
323
|
+
filter_args:
|
|
324
|
+
since: [[created_after, "{since_iso}"]]
|
|
325
|
+
until: [[created_before, "{until_iso}"]]
|
|
232
326
|
|
|
233
327
|
local_npm:
|
|
234
328
|
type: json
|
|
@@ -256,6 +350,7 @@ engines:
|
|
|
256
350
|
list: search
|
|
257
351
|
format: json
|
|
258
352
|
srlimit: "{n}"
|
|
353
|
+
note: ddgs wikipedia backend unreliable, use MediaWiki API directly
|
|
259
354
|
|
|
260
355
|
local_wiktionary:
|
|
261
356
|
type: json
|
|
@@ -288,6 +383,8 @@ engines:
|
|
|
288
383
|
srlimit: "{n}"
|
|
289
384
|
|
|
290
385
|
local_imdb:
|
|
386
|
+
# 与主仓 imdb 同源:suggestion API(由 argo 主引擎 type=imdb 实现;
|
|
387
|
+
# local-search 内 html 路径已弃用,保留条目供垂直分类与健康探测)
|
|
291
388
|
type: html
|
|
292
389
|
enabled: false
|
|
293
390
|
categories: [vertical]
|