Перейти к основному содержимому
E

dsh-image-search

eternalsparks/dsh-image-search

Multi-engine reverse image search aggregator: Google Lens, Baidu, Yandex, TinEye, SauceNAO, IQDB, Ascii2d. Fix: upstream declared @deepseek-ai/dsh-tools as a hard dependency, so installing it overwrote the harness core package in the profile and made DSH fail to boot; this fork moves it to an optional peer dependency.

Установка

dsh plugin --profile web add github:eternalsparks/dsh-image-search

README

兼容性修复版 / Compatibility-fixed fork(v0.1.1)

原版(zimai233/dsh-image-search)把 @deepseek-ai/dsh-tools 写成硬依赖 ^0.0.1-rc.1。安装时 pnpm 会把旧版核心包装进 profile 的 node_modules 根目录,覆盖 DSH 自带的版本;旧版不提供 tools 服务,所有依赖它的插件(tool-executor-native、agent-loop、mcp-manager 等)会卡在 waiting for services,DSH 启动失败。

本版把它改成可选的 peer 依赖(peerDependenciesMeta.optional = true),不再参与安装,也不会覆盖宿主核心包。

原版为 MIT,版权归原作者;本 fork 只做依赖声明修复与文档维护。

多引擎反向图片搜索聚合器,为 DeepSeek Harness 而生。

Multi-engine reverse image search aggregator for DeepSeek Harness.

把一张公网图片 URL,一键转成 Google Lens / 百度识图 / Yandex / TinEye / Bing 视觉搜索 / 搜狗识图 / SauceNAO / IQDB / Ascii2d 的搜索链接——纯 URL 构造,零网络请求,零依赖。

Turn one public image URL into search links for Google Lens / Baidu / Yandex / TinEye / Bing Visual Search / Sogou / SauceNAO / IQDB / Ascii2d — pure URL construction, zero network calls, zero dependencies.

为什么需要它 / Why

视觉生态里已经有 OCR 和 UI 还原,但没有插件做多引擎反向图片搜索聚合——没有任何东西能把 Google Lens / 百度 / Yandex / TinEye / SauceNAO / IQDB / Ascii2d 一次配齐。

The vision ecosystem has OCR and UI restoration, but nobody aggregates multi-engine reverse image search — nothing puts Google Lens / Baidu / Yandex / TinEye / SauceNAO / IQDB / Ascii2d together in one call. This plugin is the aggregation wedge: 一次提交,全网溯源。

特性 / Features

  • image_search_urls — 返回 JSON 数组 [{ id, name, group, url }],每个引擎一条搜索链接。可按 engines(逗号分隔 id)或 group(通用 / 插画/动漫)过滤。
  • image_search_engines — 返回按分组归类的全部 9 个引擎(含模板与是否编码),用于发现引擎 id。
  • image_search_best — 返回人类可读的 Markdown 摘要:一行总览 + 每个引擎一条可点击链接。
  • 纯 URL 构造,不发起任何实际抓取请求——安全、零依赖、可离线运行。
  • 零构建步骤——纯 ESM,发布即运行时代码。无 prepare 脚本,无需构建权限。

安装 / Install

# 从本仓库安装(已修复依赖声明)
dsh plugin --profile <profile> add github:EternalSparks/dsh-image-search

# 锁定 commit(供应链更稳)
dsh plugin --profile <profile> add github:EternalSparks/dsh-image-search#<sha>

如果你在 DSH 里已经装过原版并因此启动失败,请先移除 profile 里残留的 @deepseek-ai/dsh-tools@0.0.1-rc.1,再改成本仓库的地址。

用法 / Usage

用自然语言让 agent 执行:

"帮我用这张图搜一下源头:https://example.com/img.png —— 先列出所有引擎的搜索链接"

Agent 会调用 image_search_urls:

{
  "imageUrl": "https://example.com/img.png"
}

返回示例(截取):

[
  { "id": "google", "name": "Google Lens", "group": "通用", "url": "https://lens.google.com/uploadbyurl?url=https%3A%2F%2Fexample.com%2Fimg.png" },
  { "id": "saucenao", "name": "SauceNAO", "group": "插画/动漫", "url": "https://saucenao.com/search.php?url=https://example.com/img.png" }
]

也可以限定引擎 / 分组:

{
  "imageUrl": "https://example.com/img.png",
  "engines": "google,saucenao",
  "group": "插画/动漫"
}

工具参考 / Tool Reference

Tool参数 Parameters返回 Returns
image_search_urlsimageUrl (required), engines?, group?JSON 数组 [{ id, name, group, url }]
image_search_engines—按 group 分组的 JSON,含模板与 encode 标志
image_search_bestimageUrl (required), engines?Markdown:总览行 + 每个引擎一条链接

引擎表 / Engines

idnamegroupencode
googleGoogle Lens通用✓
baidu百度识图通用✓
yandexYandex通用✓
tineyeTinEye通用✓
bingBing 视觉搜索通用✓
sogou搜狗识图通用✓
saucenaoSauceNAO插画/动漫✗
iqdbIQDB插画/动漫✗
ascii2dAscii2d插画/动漫✗

encode 为 true 的引擎走 query-string 参数(图片 URL 需 encodeURIComponent 编码);为 false 的引擎走路径式参数(需原样 URL)。

开发 / Development

npm install
npm test          # node:test 直接跑纯核心函数 buildEngineUrls / groupEngines
npm run pack      # dry-run publish (pnpm pack equivalent)

变更记录 / Changelog

0.1.1

  • 修复:@deepseek-ai/dsh-tools 从硬依赖(^0.0.1-rc.1)改为可选 peer 依赖,不再覆盖 DSH 核心包、不再导致宿主启动失败。
  • 文档:安装命令改为指向本仓库;补充故障说明与迁移提示。

0.1.0

许可证 / License

MIT。原作者版权与许可全文见 LICENSE。

Похожие плагины