DeepSeek Harness Plugin

mingzeng21/dsh-stock-mentions

Stars ★ 2 Downloads (30d) 1,252 Category Plugin Markets & Managers Added 2026-08-27 npm dsh-stock-mentions

Turns stock names and codes in DSH output text into clickable buttons for quotes and company news.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-stock-mentions

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:mingzeng21/dsh-stock-mentions

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

Recognize Shanghai and Shenzhen ordinary A-share names and codes in DeepSeek Harness (DSH) assistant replies, then expose confirmed stocks as clickable buttons in the assistant action row. Clicking a button opens a market panel with quotes, intraday data, daily K-lines, and company news.

中文 | English

Supports DSH v0.1.7-rc.2. DSH still does not expose a generic Markdown text-annotation entry point, so stock buttons appear in the action row of a finalized assistant answer rather than at the original text position.

Screenshots

Quick start

Requirements

  • DeepSeek Harness v0.1.7-rc.2
  • Node.js ^22.19.0 || >=24.0.0 (matching current DSH requirements)
  • An initialized DSH web profile

Install

Install the plugin into the Web profile with the DSH CLI:

dsh plugin --profile web add dsh-stock-mentions
dsh web

If DSH Web is already running, stop and restart dsh web after installing or updating, then refresh the browser page.

Verify the feature

Ask the assistant to include a clear stock name or code, for example:

请简要介绍贵州茅台(600519.SH)的主营业务,并列出需要关注的风险。

After the answer finishes, find the “贵州茅台” button in the action row below the answer. Click it to open the market panel on the right.

Local development and testing

Install dependencies and run the complete verification from the plugin directory:

cd /path/to/dsh-stock-mentions
npm install
npm run verify

Test the plugin with a DSH checkout running from source:

cd /path/to/deepseek-harness
pnpm dsh plugin --profile web add /path/to/dsh-stock-mentions
pnpm dsh web

After changing plugin code, run npm run build or npm run verify, then restart DSH Web. A local install uses a link: package, so reinstalling is usually unnecessary.

Useful checks:

# Confirm that the plugin is in the web profile
pnpm dsh web --dump-config > /tmp/dsh-web-config.txt
grep -n "stock-mentions" /tmp/dsh-web-config.txt

# Run tests, build, or package verification separately
npm test
npm run build
npm run verify:package

Features

  • Recognizes Shanghai and Shenzhen ordinary A-share names and codes in finalized assistant replies.
  • Shows a button only after the Host uniquely confirms the security, reducing false matches for dates, amounts, and ordinary numbers.
  • Displays latest price, change, high, low, open, market cap, volume ratio, turnover, amount, volume, and previous close.
  • Supports intraday movement and daily K-lines for the latest 30 trading days, using adjusted daily data.
  • Shows the latest 10 company-news items by default.
  • Uses a 360px default panel width to match DSH’s details-column default; below 320px it switches to a compact single-column layout.
  • Follows DSH theme settings and receives Chinese/English strings through DSH locale injection.
  • Keeps timeouts, cancellation, caching, response validation, and provider fallback in the Host data layer.

Recognition scope

Supported code formats include:

600519.SH
000001.SZ
688001.SH

Official short names are also supported after unique Host confirmation, such as “贵州茅台” and “平安银行”. The plugin accepts ordinary A-shares listed in Shanghai or Shenzhen and excludes indices, funds, ETFs, bonds, B-shares, Beijing-listed securities, and sector codes.

The plugin does not parse:

  • user messages, reasoning, tool results, or unfinished streaming text;
  • Markdown links, fenced code blocks, math expressions, or literal HTML;
  • names, codes, or security types that cannot be uniquely confirmed.

Data and security

The browser client does not call market-data websites directly. It requests normalized data from the Host through the versioned /stock-mentions RPC channel. The Host uses fixed public providers, including Eastmoney, Tencent Finance, Sina Finance, and Tonghuashun, with resource-specific fallback order.

  • No API key, cookie, authorization header, or other service credential is required.
  • The browser submits only constrained candidates and normalized symbols.
  • The full assistant reply, arbitrary URLs, and user credentials are not sent upstream.
  • Market-panel state stays in the current client session and is not written to the conversation log.
  • The plugin is read-only: it does not trade, manage watchlists or positions, or provide investment advice.

Uninstall

dsh plugin --profile web remove dsh-stock-mentions

Development verification

npm run verify

This runs TypeScript checks, the Vitest suite, the production build, and npm package validation.

License

MIT © 2026 dsh-stock-mentions contributors

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.