DeepSeek Harness 插件

dsh-web-search-opencli

OpenCLI Google AI Mode search provider for DeepSeek Harness web_search(英文原文)

跳到安装方式

来源信息

GitHub 仓库
sincerity711/dsh-web-search-opencli
最近更新
2026年8月19日
分类
文档与渲染
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/sincerity711/dsh-web-search-opencli
插件名:dsh-web-search-opencli
作者:sincerity711

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-web-search-opencli

Use Google AI Mode as a DeepSeek Harness web_search provider through OpenCLI.

dsh-web-search-opencli registers a DSH ctx.web search provider. When an agent calls web_search, the plugin drives your existing Chrome or Edge browser through OpenCLI, opens Google Search AI Mode (udm=50), waits for the AI answer, extracts the answer and cited source URLs, and returns DSH's standard WebSearchResult.

Features

  • Google AI Mode answers exposed through DSH web_search.
  • OpenCLI browser automation instead of a scraped HTTP endpoint.
  • Source URL extraction from AI Mode citations and links.
  • Markdown conversion for the AI answer body.
  • Reuses the configured OpenCLI browser session tab by default.
  • Configurable provider id, OpenCLI command/session/window mode, timeout, and best-effort tab cleanup.

Requirements

  • Node.js ^22.19.0 || >=24.0.0.
  • A DeepSeek Harness install that provides @deepseek-ai/dsh-web.
  • OpenCLI installed and connected to its browser extension.
  • Chrome or Edge signed in to a Google account that can use AI Mode.
  • Google AI Mode available for the browser account, region, and locale.

The provider uses the current browser profile. It does not read or store Google cookies.

Verify OpenCLI first:

opencli doctor

Install

Preferred npm install:

dsh plugin --profile web add dsh-web-search-opencli

From a DeepSeek Harness source checkout, use the checkout wrapper:

pnpm dsh plugin --profile web add dsh-web-search-opencli

Before npm publication, install from GitHub:

dsh plugin --profile web add github:sincerity711/dsh-web-search-opencli

For local development:

git clone https://github.com/sincerity711/dsh-web-search-opencli.git
cd dsh-web-search-opencli
npm install
npm run build

dsh plugin --profile web add /path/to/dsh-web-search-opencli

The package includes built lib/ artifacts in npm releases. GitHub installs run the package prepare script to build them.

Bundle patch

The package includes cordis.patch.yml, so the normal plugin install can apply this default web-profile patch:

- id: web
  config:
    searchProvider: google-ai-mode

- insert:
    - id: web-search-opencli
      name: dsh-web-search-opencli
      config:
        providerId: google-ai-mode
        opencliSession: dsh-google-ai-mode
        opencliWindow: background
        timeoutMs: 45000
        closeTabAfterSearch: false

If you manually edit a profile patch, preserve any existing web config fields you still need. A patch replaces the targeted row's whole config.

Verify

Dump the resolved web profile:

dsh --profile web --dump-config

The output should include:

- id: web
  name: '@deepseek-ai/dsh-web'
  config:
    searchProvider: google-ai-mode

and:

- id: web-search-opencli
  name: dsh-web-search-opencli
  config:
    providerId: google-ai-mode

Restart DSH Web after changing the profile:

dsh web

Architecture reference

See [docs/architecture.md](docs/architecture.md) for the runtime flow, provider registration, OpenCLI command sequence, extraction pipeline, and error mapping.

Config

FieldDefaultMeaning
providerIdgoogle-ai-modeProvider id registered into ctx.web.
opencliCommandopencliExecutable name or path.
opencliSessiondsh-google-ai-modeOpenCLI browser session used for Google tabs.
opencliWindowbackgroundValue passed as both OPENCLI_WINDOW and OpenCLI --window for browser commands.
timeoutMs45000Per-search timeout budget in milliseconds.
closeTabAfterSearchfalseOptional best-effort tab close after each search. Disabled by default because Chrome can replace the final tab in OpenCLI's automation window with about:blank.

Behavior

  • content contains the Google AI Mode answer converted to markdown.
  • sources[] contains URLs cited or linked by the AI Mode answer.
  • Duplicate source URLs are collapsed in first-use order.
  • Ordinary Google search results outside the AI Mode answer are not used as a fallback.
  • DSH ctx.web enforces maxResults after the provider returns.
  • The default background OpenCLI window mode avoids stealing focus.
  • The provider reuses its OpenCLI automation tab by default. Set closeTabAfterSearch: true only if you prefer best-effort tab cleanup.

Errors

The provider throws DSH WebError values:

  • WEB_SEARCH_OPENCLI_CAPTCHA: Google showed a CAPTCHA or unusual-traffic page.
  • WEB_SEARCH_OPENCLI_AI_MODE_UNAVAILABLE: AI Mode is unavailable for the current account, region, or language.
  • WEB_SEARCH_OPENCLI_TIMEOUT: the OpenCLI operation exceeded timeoutMs.
  • WEB_PROVIDER_ERROR: OpenCLI failed or extraction returned an unexpected result.
  • WEB_ABORTED: the DSH call was cancelled.

Troubleshooting

Searches fail with OpenCLI errors

Run opencli doctor, then make sure Chrome or Edge is open and the OpenCLI browser extension is connected.

Google asks for CAPTCHA

Open Google manually in the browser, solve the CAPTCHA, and retry the DSH search.

AI Mode is unavailable

Google AI Mode availability depends on the account, region, and locale. Sign in with an account that can access AI Mode, or switch back to another DSH web search provider.

Concurrent searches fail with detached browser errors

OpenCLI browser sessions are stateful. Avoid running concurrent searches against the same opencliSession. Use separate session names or serialize searches if you need parallelism.

Community plugin discovery

This repository is prepared for the current DeepSeek Harness community plugin discovery flow. Add these GitHub topics to the public repository:

dsh-plugin
deepseek-harness
dsh
web-search
opencli

The npm package carries matching keywords and declares the DSH bundle patch.

Development

npm install
npm run check