# dsh-free-search — free web search providers (no API key needed)
# Registers the plugin into ctx.web + a settings bridge served at
# /api/dsh-free-search-settings.
# The engine is chosen from the sidebar Plugins page -> Free Search row config
# (plugins.row.config, DSH 0.1.7-rc.1+), from the /free-search-engine command,
# or directly via this entry's config, e.g.:
#   provider: bing        # engine id: ddg / bing / baidu / kimi / aliyun / doubao / auto / multi / ...
#   region: cn-zh         # DuckDuckGo region
#   bingMarket: zh-CN     # Bing market
# A legacy ~/.dsh/settings.yaml "free-search:" section is migrated into this
# entry's config once at startup (see README).
# Failed/empty engines automatically fall back to the next free engine.
# web.searchProvider must point at this plugin's provider id (ddg); the runtime
# also takes over when it is unset or still the shipped default
# (deepseek-official), and only warns when another provider was chosen
# explicitly.
- insert:
    - id: web-search-free
      name: dsh-free-search
      config:
        provider: bing
        disabledEngines: []
        bingMarket: zh-CN
# 自动接管默认搜索：让 harness 的 web_search 直接用本插件的 provider（内部含全部引擎）
# 注意 patch 语义是"整行替换 config"（DSH 0.1.2+）：必须保留 fetchProvider，否则
# web-fetch-http 会被另一层重新注册，与 base bundle 的注册造成 duplicate loader entry。
- id: web
  config:
    searchProvider: ddg
    fetchProvider: http
