# dsh-tinyfish-search bundle layer.
#
# Three rows:
#  1. `dsh-tinyfish-search` — this plugin: registers the `tinyfish` search
#     provider on the ctx.web seam. The row references the package by name so
#     Node resolution finds the installed code (npm, tarball, or git install).
#     Its `config` mapping is the documented scaffolding: every field is
#     optional and commented out, so the shipped defaults apply until a later
#     layer (profile / home cordis.patch.yml / --patch) overrides this row by id.
#  2. `web` — points ctx.web at this provider. The dsh-base bundle pins
#     `searchProvider: deepseek-official` on the `web` row, so merely
#     registering a provider would leave web_search on the DeepSeek backend
#     even with this bundle installed. Per the layer rules a bundle patch may
#     override an earlier row by id, restating every key the row needs (config
#     is replaced wholesale, never deep-merged). Later layers (profile / home
#     cordis.patch.yml / --patch overlays) can still override this row by id.
#  3. `tool-web` — re-enables the HOST-level model-facing web tools. The
#     dsh-web-app bundle ships `tool-web` disabled because the Web app composes
#     the tools per agent preset; dsh-base keeps it enabled. Restating the row
#     with `disabled: false` re-enables the tools at the host layer, so they
#     are visible to EVERY preset on profiles that compose this bundle —
#     including presets that would not otherwise carry web tools (e.g.
#     `minimal`). Per-preset web enablement is untouched: a preset that mounts
#     its own `tool-web` row shadows this global registration for its agents.
#     If you want the tools scoped to one preset instead, remove this row in
#     your profile's cordis.patch.yml and add `tool-web` to that preset's
#     agent composition. Restates every dsh-base key for the same
#     replace-wholesale reason as above.
#
# Users can override any of these in their profile's cordis.patch.yml — the
# user layer applies after bundle layers ("last write wins per row").

- insert:
    - id: dsh-tinyfish-search
      name: dsh-tinyfish-search
      config:
        # apiKey: "literal-key"          # alternative to the env var; avoid committing it
        # apiKeyEnv: TINYFISH_API_KEY     # default
        # baseURL: https://api.search.tinyfish.ai   # default
        # location: US                    # optional geo targeting forwarded to TinyFish
        # language: en                    # optional search language forwarded to TinyFish
- id: web
  config:
    searchProvider: tinyfish
    fetchProvider: http
- id: tool-web
  # `disabled: false` is REQUIRED: the merge is per-key, so a config-only row
  # would leave the `disabled: true` shipped by the dsh-web-app bundle in place
  # and web_search would never register.
  disabled: false
  config:
    search: true
    fetch: true
    searchTimeoutMs: 60000
    fetchTimeoutMs: 30000
