DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Zhihu — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

@zhengjunyao/dsh-zhihu

Zhihu

Zhihu (知乎) for DeepSeek Harness:将本地 pyzhihu-cli CLI(搜索 / 热榜 / 问题 / 回答 / 用户 / 动态 / 话题 / 收藏夹 / 通知)封装为 zhihu_* 代理工具,并提供带二维码登录、配置以及快速热榜 / 搜索功能的网页面板;发布、投票、关注和删除仍需通过显式的 readOnly 开关

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add @zhengjunyao/dsh-zhihu@0.1.1
README兼容性版本

兼容性与来源证明

Zhihu 以 @zhengjunyao/dsh-zhihu 发布,当前版本为 0.1.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/9/13

版本

0.1.1stable
2026/9/13
0.1.0stable
2026/9/12

相关插件

正在加载相关插件…

最新版
0.1.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
293.1 kB
文件数
23
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
0
最近提交
2026/9/13
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 search-research 分类下经过校验的插件。

Browser Skill Dsh Plugin@wxg-prc-cpg/browser-skill-dsh-plugin向模型提供 BrowserSkill 浏览器自动化(browser_* 工具)的 DeepSeek Harness 工具插件Free Searchdsh-free-searchDeepSeek Harness 的免费网页搜索:13 个引擎(Bing/DuckDuckGo/AnySearch/SearXNG/Exa/Tavily/Keenable/Firecrawl 无需密钥;Parallel/Perplexity/SerpBase/DeepSeek 需要密钥),支持时间筛选、平台搜索和 web_fetch,并提供网页设置界面。Find Plugindsh-find-plugin在代理中查找 DeepSeek Harness 插件——实时搜索 GitHub 上的 dsh-plugin 主题,并按星标数排序。Anysearch Dsh@anysearch/anysearch-dsh适用于 DeepSeek Harness 的 AnySearch 网络搜索和获取提供程序及高级工具

README

@zhengjunyao/dsh-zhihu

A Zhihu (知乎) plugin for DeepSeek Harness: it wraps the local zhihu CLI — pyzhihu-cli, command name zhihu — as zhihu_* agent tools. Search questions, read the hot list, inspect questions / answers / comments, look up users, browse the recommended feed, topics and notifications. Publishing, voting, following and deleting are off by default and gated behind an explicit readOnly switch.

  • Read tools call zhihu <command> --json and normalize the raw Zhihu API payload into compact items (id, type, title, URL, author, upvotes, answer count).
  • Login rides Zhihu's official QR-code API: the CLI writes the QR image to a PNG and the plugin hands the path to the agent, which can show it to the user. Pasting a cookie string is also supported — the plugin writes the CLI's cookie file directly, so the token never lands in the process list.
  • Write tools are not registered at all by default, so nothing can be published or deleted by accident.

Prerequisites

# Install the Zhihu CLI (Python 3.10+; uv keeps it in its own venv)
uv tool install pyzhihu-cli      # or: pipx install pyzhihu-cli
zhihu --version                  # zhihu-cli, version 0.2.4

The plugin resolves zhihu from $PATH, ~/.local/bin, /opt/homebrew/bin and /usr/local/bin; point cliPath at an absolute path if it lives elsewhere.

Important: every pyzhihu-cli command requires a login — even the hot list fails with Not authenticated. The first run must therefore be a zhihu_login.

Tools

Management and auth

ToolPurpose
zhihu_statusCLI availability and version, login state (cookie has z_c0/_xsrf/d_c0), read-only mode, paths, timeout. Never echoes cookie contents
zhihu_configConfigure readOnly / cliPath / timeoutMs / loginWaitMs / proxy / cliHome; reset: true restores defaults. Call with no arguments to read
zhihu_loginLog in. mode: qrcode (default) returns the QR PNG path (~/.zhihu-cli/login_qrcode.png) to show the user and can be called again to keep waiting (it never spawns a second QR code); mode: cookie accepts pasted z_c0/_xsrf/d_c0 and verifies online
zhihu_logoutRemove the CLI's cookie file
zhihu_whoamiCurrent account profile

Read

ToolPurpose
zhihu_searchSearch content (type: general|people|topic)
zhihu_hotZhihu hot list
zhihu_questionQuestion detail; answers: true adds the answer list (limit / sort)
zhihu_answerAnswer body; comments: true adds comments
zhihu_userUser profile, or their answers / articles / followers / following (include)
zhihu_feedRecommended feed; withComments: true uses the CLI's text-mode "feed + comments"
zhihu_topicTopic detail; hotQuestions: true adds the topic's hot questions
zhihu_notificationsNotifications (with offset paging)
zhihu_collectionsYour collections

Write (registered only when readOnly: false)

ToolPurpose
zhihu_publishPublish a question / pin / article (kind: ask|pin|article, optional topics and local images; dryRun: true only echoes the command)
zhihu_voteUpvote / cancel an upvote
zhihu_follow_questionFollow / unfollow a question
zhihu_deleteDelete your own question / pin / article (requires explicit confirm: true)

Web panel

Two entries, one component:

  1. A bottom-right floating ball (blue 「知」 button) — reachable from any page, opening a 380px popover.
  2. A 「知乎」 card in the settings page (settings.section).

The panel covers: login state with an inline QR code (one click, auto-detects the scan), the account summary, the read-only switch, proxy / timeout settings, and quick hot-list / search lookups with clickable links.

It talks to the loopback-only /api/dsh-zhihu/* route family (status, config, login, qrcode, logout, whoami, hot, search); non-loopback peers, foreign Host headers and cross-site Origins get 403. The QR is returned as a PNG data URL — no new files on disk.

Client changes need a browser hard refresh; host changes or dsh.client manifest changes need a dsh web restart.

Read-only switch

The plugin is read-only by default: write tools are never registered, so the model cannot even see them.

Two ways to open them up:

// 1) At install time, seed it in cordis.patch.yml
- insert:
    - id: zhihu
      name: dsh-zhihu
      config:
        readOnly: false
2) At runtime via the tool (stored in ~/.dsh/dsh-zhihu.json, remounts immediately):
   zhihu_config({ readOnly: false })     # enable write tools
   zhihu_config({ readOnly: true })      # revoke them

The store value wins over the install-time seed; with neither set, read-only applies.

Configuration

KeyDefaultMeaning
readOnlytrueOnly read tools when true; write tools are registered when false
cliPathzhihuCLI command name or absolute path
timeoutMs90000Per-invocation timeout
loginWaitMs15000How long zhihu_login waits for a scan before returning; call it again to keep waiting
proxyemptyEmpty = inherit the environment; none = force no proxy (Zhihu is a domestic site, a system proxy can actually break it); or http://host:port
cliHome~/.zhihu-cliCLI config directory. The CLI hardcodes Path.home()/".zhihu-cli", so the plugin overrides the child process's HOME

Stored in ~/.dsh/dsh-zhihu.json (mode 0600). Credentials are not stored here — the CLI keeps cookies in <cliHome>/cookies.json (the CLI chmods it 0600 itself).

Logging in

Option 1 — QR code (recommended)

zhihu_login()                     → returns qrcodePath (~/.zhihu-cli/login_qrcode.png)
   ↓ the agent shows it with read_image / present
the user scans it in the Zhihu app
zhihu_login()                     → keeps waiting; returns authenticated: true

Option 2 — paste a cookie

zhihu_login({ mode: "cookie", cookie: "z_c0=...; _xsrf=...; d_c0=..." })

The plugin writes the cookie straight into the CLI's cookies.json (byte-compatible with the CLI's own save_cookies) and then verifies it online via zhihu whoami; a failed check removes the file and reports why. Unlike zhihu login --cookie, this path never exposes the token in the process list.

Compatibility

Requires DeepSeek Harness ≥ 0.1.5-rc.1 (declared in dsh.engines.dsh, which the plugin market reads) and is tested on 0.1.5-rc.1. This build follows the DSH 0.1.5 strict tool-result contract (lossless-JSON snapshots, additionalProperties: false schema validation, output.render returning ContentBlock[]) and resolves the executable independently of the host PATH (a launchd-managed host only has /usr/bin:/bin).

Known limitations

  • The CLI's --json mode does not cover comments, the "feed + comments" command, or a topic's hot questions. Those three fall back to text mode and land in the result's text field (ANSI colour codes stripped).
  • zhihu_search / zhihu_hot accept -a/--answers only in the CLI's human-readable mode; it is ignored under --json, so the plugin does not expose it.
  • Zhihu applies risk control. This plugin is a thin wrapper — request volume and compliance are the caller's responsibility; do not crawl aggressively.
  • Zhihu's public API can change; the real command surface is whatever zhihu <cmd> --help reports locally.

Troubleshooting

SymptomCause and fix
Every command fails with Not authenticatedpyzhihu-cli needs a session for all commands, the hot list included. Run zhihu_login first.
403 with code 40352, a redirect to /account/unhuman, or "系统监测到您的网络环境存在异常"Zhihu risk control rejects the request fingerprint, not just missing cookies — so re-pasting a cookie may not help. Use zhihu_login({ mode: "browser" }) to import the real session from local Chrome, then retry. QR-code polling is anonymous and gets 403 on every poll, which is why scanning appears to do nothing.
403 with code 10003 mentioning x-zse-96The endpoint requires Zhihu's request signature. Topic detail is unavailable; zhihu_question automatically falls back to the answer list (the embedded question.title carries the title).
zhihu_status reports the CLI unavailableInstall it (uv tool install pyzhihu-cli) or point cliPath at an absolute path.
The panel's QR code never completes the loginExpected under risk control, for the reason above. Use the 「从 Chrome 导入登录态」 button in the panel instead.

Every failure now names which of these it is: failureReason classifies the CLI output instead of returning a bare timeout.

Development

pnpm install
pnpm typecheck         # tsc --noEmit (host + client)
pnpm build             # tsc for .d.ts + tsdown for lib/index.js (host) and lib/client.js (browser)
pnpm test              # smoke tests (real CLI calls; all writes land in a temp dir)
pnpm test:e2e          # drive the plugin's own tools against the real CLI (no host restart)
node tests/routes.mjs  # hit /api/dsh-zhihu/* with synthetic req/res
node tests/client.mjs  # execute lib/client.js under a synthetic __ModuleLoader__
pnpm verify:full       # portability check in an isolated DSH_HOME (tarball install + stability watch)

Portability verification follows PORTABILITY-SOP.md and must print ✅ 通过 before a release.

Artifacts: lib/index.js (host, ESM) + lib/client.js (browser closure-factory) + lib/types/ (.d.ts).

Install into a profile

dsh plugin --profile web add @zhengjunyao/dsh-zhihu
dsh plugin --profile web add link:/path/to/dsh-zhihu
# or, once published
dsh plugin --profile web add github:zhengjy01/dsh-zhihu

A DSH web restart is required afterwards (there is no hot reload).

License

MIT. The Zhihu CLI itself (pyzhihu-cli) is Apache-2.0; this project only invokes it as a subprocess and contains none of its code.