DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Ths Holdings — DeepSeek Harness 插件(DSH Plugin)
← Plugins

dsh-ths-holdings

Ths Holdings

DSH 持仓盈亏悬浮卡片(同花顺投资账本)— 自动同步真实持仓数据,显示今日盈亏、上证指数和当日走势图,无需手动添加股票。Real portfolio holdings overlay for the DSH web GUI — automatically syncs your positions from the Tonghuashun investment-ledger API.

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

npx -y @deepseek-ai/dsh plugin --profile web add dsh-ths-holdings@0.1.7
README兼容性版本
dsh-ths-holdings card

兼容性与来源证明

Ths Holdings 以 dsh-ths-holdings 发布,当前版本为 0.1.7。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

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

版本

0.1.7stable
2026/8/22
0.1.6stable
2026/8/22
0.1.4stable
2026/8/21

相关插件

正在加载相关插件…

最新版
0.1.7
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
284.8 kB
文件数
9
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
140
安全扫描
✓ v0.1.7 扫描通过
查看源码 ↗项目主页 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

README

dsh-ths-holdings

English | 中文

A floating position P&L card for the DeepSeek Harness (DSH) web GUI. It automatically syncs your real portfolio data from the Tonghuashun investment-ledger (同花顺投资账本) — no manual stock picking. Displays 今日盈亏 (today's P&L), 上证指数 (Shanghai Composite Index), and an intraday mini chart, all in the A-share red-up/green-down convention.

Unlike watchlist tools, this plugin reads your actual positions and shows your real profit & loss — both as a percentage and as a yuan amount — updating every 20 seconds.

Screenshots

dsh-ths-holdings card

Installation

dsh plugin --profile web add dsh-ths-holdings

Installation is pnpm add inside your web profile: the package's dsh.bundle.patch is applied to the profile layer automatically. Then restart dsh web — a floating card appears at the bottom-right corner.

To install manually (without dsh plugin), edit $DSH_HOME/profiles/web/package.json:

{
  "dependencies": {
    "dsh-ths-holdings": "^0.1.0"
  },
  "dsh": {
    "profile": {
      "bundles": [
        // ...existing bundles,
        "dsh-ths-holdings"
      ]
    }
  }
}

then cd $DSH_HOME/profiles/web && pnpm install and restart dsh web. The plugin row itself comes from the package's cordis.patch.yml — you don't write it by hand.

Usage

Recommended — auto-acquire:

  1. Open the DSH web GUI — click ⚙ on the card.
  2. Click 🖥 自动获取 Cookie(推荐) — a system browser window opens (Edge / Chrome — the first installed one wins).
  3. Sign in to the Tonghuashun investment ledger in that window (QR code / account).
  4. When the sign-in succeeds the window closes itself, the Cookie is saved automatically, and the card refreshes with your portfolio.
  5. The plugin auto-discovers your portfolio — if you have several, pick one from the dropdown. Done.

The auto-acquired Edge window ships anti-automation camouflage (hides navigator.webdriver, disables the AutomationControlled Blink feature) to pass the Tonghuashun WAF. If a specific network/time still shows Nginx forbidden, press F5 in the popped window or open https://tzzb.10jqka.com.cn manually, then click 「我已登录,继续 →」 on the card; only 10jqka-domain cookies are kept, never stored as raw plaintext.

Manual (backup):

  1. Open https://tzzb.10jqka.com.cn and log in.
  2. Press F12 → Console and run:
    copy(document.cookie)
    
  3. The cookie is now in your clipboard.
  4. Open the DSH web GUI — click ⚙ on the card, paste the cookie into STOCK_PNL_COOKIE → save.
  5. The card validates the saved cookie immediately — it shows ✓ valid or ✗ invalid (with the reason/hint).

The session cookie expires eventually — when it does, the card shows a Token 已过期 banner; re-open ⚙ and click auto-acquire (or repeat manual steps 1–4) with a fresh cookie (the v anti-bot token is handled automatically).

💡 After completing a new trade, re-upload your data from the investment-ledger app to the web version so your holdings stay consistent between the two.

Data upload tutorial

Features

  • 📊 Real-time position P&L — polls every 20 s (configurable) from your actual portfolio
  • ¥ / % toggle — show today's P&L as a yuan amount, a percentage, or both
  • 📈 Intraday chart — mini polyline with a zero axis, red-up/green-down
  • 🇨🇳 Shanghai Composite Index — displayed alongside your P&L
  • 🔄 Auto-discovery — fund_key is discovered from the portfolio list; multi-account selection via dropdown
  • 🖥 Auto-acquire Cookie — one click pops the Edge sign-in window; the cookie is saved automatically, no F12 needed
  • ✓ Validate on save — the stored cookie is checked against the ledger right after paste or auto-acquire
  • ↕ Draggable — drag the title bar vertically along the right edge (position persists in localStorage)
  • ⚙ In-place settings — paste Cookie and select portfolio from the card itself
  • 🔒 Credential-safe — the Cookie never leaves the host process

How it works

┌─────────────── Web browser ───────────────┐
│  lib/client.js (browser module)           │
│  · shell.overlay slot → floating card      │
│  · React + CSS Modules                     │
│  · config in localStorage                  │
│          │ fetch (same-origin)             │
└──────────┼─────────────────────────────────┘
           ▼
┌─────────────── DSH Host (lib/index.js) ───┐
│  cordis plugin: webServer routes          │
│  · GET /api/stock-pnl          snapshot    │
│  · GET /api/stock-pnl/portfolios  accounts │
│  · GET /api/stock-pnl/verify     cookie ok?│
│  · POST /api/stock-pnl/acquire*   sign-in │
│  resolves Cookie via ctx.credentials      │
│  auto-discovers user_id + fund_key        │
│  POSTs Tonghuashun ledger APIs            │
└───────────────────────────────────────────┘

The node half reads the login Cookie per request through the credential-reference seam (ctx.credentials) — it never reaches the browser. Credential-bearing requests never follow a redirect. The v anti-bot token is minted per request from the User-Agent; the stored Cookie only needs its session fields.

Auto-acquire runs an in-host state machine (acquire.ts): click the button → an anti-automation Edge window opens the ledger → once the sign-in is detected (userid cookie), the host collects that domain's cookies, commits them through the credential seam, and closes the window. Timeout, an early user window-close, or a WAF interception all surface as actionable notices on the card.

Config

KeyDefaultMeaning
cookieEnvSTOCK_PNL_COOKIECredential reference holding the ledger Cookie.
fundKeyEnvSTOCK_PNL_FUND_KEYCredential reference holding the ledger fund key (saved from the card's ⚙ form).
user_idthe Cookie's useridThe ledger user id, included in every form payload; an empty value falls back to the Cookie's own userid.
fund_keyauto-discoveredThe ledger fund key selecting the managed portfolio; overridden by the fundKeyEnv credential when set, auto-discovered from the account list when empty.
pnlUrlTonghuashun time_share endpointP&L endpoint override (tests point at a scripted server).
indexUrlTonghuashun getQuotes endpointIndex endpoint override (tests point at a scripted server).
pollMs20000Poll interval (ms) the card uses; reported to the browser in each response's poll_ms.

Directory structure

dsh-ths-holdings/
├── src/
│   ├── index.ts            # node half: webServer routes + credential resolution
│   ├── fetch.ts            # Tonghuashun ledger API calls + auto-discovery + cookie verify
│   ├── acquire.ts          # auto-acquire cookie (playwright-core drives Edge)
│   └── client/
│       ├── index.ts        # browser half: shell.overlay registration
│       └── StockPnlCard.tsx
├── lib/                    # built artifacts (index.js + client.js)
├── cordis.patch.yml        # dsh.bundle patch layer
├── package.json            # dsh.bundle + dsh.client manifests
├── tests/                  # ledger / verify / acquire unit tests
└── README.md

FAQ / Troubleshooting

SymptomCause & fix
Card shows 请配置 CookieSTOCK_PNL_COOKIE is empty — click auto-acquire in the ⚙ panel, or paste manually.
Card shows Token 已过期The session Cookie expired — click auto-acquire in the ⚙ panel to re-sign-in, or re-run copy(document.cookie) and paste.
Auto-acquire reports missing playwright-coreplaywright-core did not ship with the install (typically a legacy install or a manually pruned dependency tree) — re-pnpm add dsh-ths-holdings (or npm i playwright-core), restart dsh web, retry.
Popped window shows Nginx forbiddenThe Tonghuashun WAF intermittently refuses automation — F5 in the window or open the ledger URL manually, then click 「我已登录,继续 →」.
No portfolio in the dropdownThe account list needs a valid Cookie first; save the Cookie, then click ↻ to refresh.
Multiple portfoliosSelect the one you want from the dropdown — the choice is saved as STOCK_PNL_FUND_KEY.
Cookie pasted with line breaksThe plugin strips whitespace on save, so wrapped lines are fine.

Model Experience

None — the card is a browser-side overlay over a host data route and registers nothing model-facing.

KV Cache effect

None — the plugin contributes no prompt, schema, or result.

Known Limitations

  • The ledger API is an undocumented, login-gated endpoint — its response format can change and the Cookie expires; the plugin surfaces both as errors rather than retrying or caching.
  • The portfolio list endpoint (account_list) requires the Cookie to be saved first — the portfolio selector appears after you paste a valid Cookie.
  • Auto-acquire reuses a system browser — it drives the bundled playwright-core dependency against whichever of Edge / Chrome is installed (first found wins); with neither present auto-acquire is unavailable (manual paste still works) and the card says so explicitly.
  • No server-side polling — the route fetches on each request and the card polls at the configured pollMs interval; there is no shared cache or push channel.

License

MIT

相关插件

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

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Experimental Agent Team Web Profile@deepseek-ai/dsh-experimental-agent-team-web-profile用于 Agent Teams Remote 和 UI 插件的实验性 Web 配置层Remote Web Ui@linxin666/dsh-remote-web-ui通过扫码配对访问 dsh Web GUI,共享一个官方界面:设置按钮旁的二维码可将手机和 PC 配对到同一个 Web GUI(手机采用竖屏触控适配层,PC 使用完整桌面界面),通过一次性令牌和 rClient Ui Git Graph@linxin666/dsh-client-ui-git-graph外部 dsh Web GUI 插件:空会话 Git 分支选择器和 Git 图,包含实际的主机端 Git 操作与防护,作为 dsh 配置文件包