dsh-fund-researchDeepSeek Harness plugin

DeepSeek Harness plugin: deterministic research reports for Chinese public mutual funds

Stars
19
Forks
0
License
Apache-2.0
Last commit
Sep 2, 2026
Latest release
v0.4.2

Overview

DeepSeek Harness plugin: deterministic research reports for Chinese public mutual funds

Original README

Cached from the project repository on Sep 3, 2026. This is source content, separate from the Agents.md review above.

View source

📊 dsh-fund-research

  • 1024 store channel: npm i -g dsh1024 once, then dsh1024 plugin --profile web add dsh-fund-research (counts toward the deepseek1024.com install ranking). Gitee

Deterministic research reports for Chinese public mutual funds, on DeepSeek Harness.

Every key number in every report traces back to a hashed source snapshot — gaps declared, never invented. Research only; not investment advice.

License DSH plugin Node CI npm version npm downloads

English · 简体中文 · Español · Português · हिन्दी


Compatibility

ComponentVersion
DeepSeek Harness0.1.2-alpha.5 (peer dependencies pinned)
Node.js^22.19.0 || >=24.0.0
Package managerpnpm@11.7.0
PlatformWindows / macOS / Linux (host-only plugin)
Data sourcesTiantian Fund / Eastmoney public endpoints (no key, no login)

What you get

  • fund_research tool — one fund code in, a versioned Markdown research report out: overview, performance decomposition, holdings penetration, simplified style attribution, manager profile, risk & gap declarations, disclaimer, and a number-traceability appendix mapping every key figure to its snapshot JSON path and verification verdict. Sealed to fund-reports/{code}/{YYYYMMDD-HHmmss}/ as report.md + manifest.json + snapshot.json. background: true runs it as a fund-report background job.
  • fund_snapshot tool — a light snapshot card (latest NAV, published stage returns, scale, manager, top-3 holdings) sealed into the fund's day directory.
  • Deterministic metrics, zero model arithmetic — period/annualized return, volatility, max drawdown, Sharpe; top-N concentration, HHI, industry distribution, quarter-over-quarter holdings comparison; size-value style bands; manager tenure and peer comparison. All pure functions over the sealed snapshot.
  • Traceability as a first-class feature — before sealing, every key number is checked against the sealed snapshot.json through the optional dsh-data-quality service when it is installed, or through the built-in isomorphic fallback checker (builtin-fallback) otherwise. The appendix table records value ↔ path ↔ verdict.
  • Honest gaps — a failed or degraded data source produces an explicit 数据缺口 (data gap) declaration in the affected section. The plugin never fills a gap with an invented number.
  • Offline modeoffline: true (config or tool argument) serves everything from the storage-domain snapshot layer or the newest on-disk version snapshot, with zero outbound requests. Ideal for tests and reproduction.
  • asOf cutoffasOfDate (ISO YYYY-MM-DD) truncates the NAV series to data on or before that date and stamps the snapshot + report with the cutoff; invalid or future dates fail loudly.
  • Checkpoint resume<reportRoot>/.run-state.json records each pipeline stage (snapshot/report) with timestamps and an input fingerprint; resume: true continues from the first incomplete stage, reusing sealed artifacts, and rejects a fingerprint mismatch.
  • Source discovery record — every acquisition seals a code-generated sources-discovery.json (endpoint roster, primary/fallback resolution, per-source coverage and gaps, degradation reasons) and folds it into the report appendix as 数据源与缺口声明.
  • Multi-fund fan-outcodes accepts an array of fund codes; each fund runs the pipeline independently with per-fund failure isolation (failures become summary gaps), and the result is a summary card (code / asOf / seal hash / verdicts / failure reason).
  • Tracking ledger — every successful seal appends a deterministic line to <reportRoot>/.tracking.jsonl; includeComparison: true renders a deterministic 与上次对比 section (NAV range / scale / top holdings) with a gap declaration when no prior record exists.
  • Read-only review — after sealing, a fund-review job reviews the sealed artifacts (gap-declaration completeness, traceability-table consistency, disclaimer) and writes review-note.md; it skips gracefully (recorded in run-state) when no jobs service is present.
  • Per-source quality signals — every source carries deterministic quality metadata (requested/succeeded/fieldsPresent/parseWarnings/degraded), rendered in the appendix and surfaced in tool values so downstream can downweight (never hard-filter) a low-quality source.
  • Walk-forward stability summaryincludeWalkForward: true adds a 样本外稳定性摘要 section: deterministic rolling-window return/Sharpe sign persistence and mean/std, explicitly labelled as statistical description only, not a prediction.
  • Session audit eventsfund-research/snapshot and fund-research/report log-only events carry the code, version directory, manifest hash, and gap list (model-visible ⟺ logged).
  • Methodology skill — a bundled fund-research skill teaches the model the metric口径 (definitions), gap handling, and compliance wording. Computation stays in code.

Quick start

> 用 fund_research 出一份 161725 的研究报告

The agent calls fund_research({ code: "161725" }); a minute later the workspace holds:

fund-reports/161725/20260819-153012/
├── snapshot.json            # raw extracted data + computed metrics + per-source sha256
├── sources-discovery.json   # code-generated endpoint roster + coverage + gaps
├── report.md                # the research report with the traceability appendix
└── manifest.json            # snapshot/report hashes, parameters, verify engine, gaps

.run-state.json sits at the report root and records the pipeline stages for resume: true. Every number in report.md's appendix carries a verified / mismatch / not-found / unverifiable verdict against snapshot.json — recompute any of them from raw.* with the documented口径 to audit the plugin itself.

Install & uninstall

sh
dsh plugin --profile web add dsh-fund-research     # install (npm or tarball)
dsh plugin --profile web remove dsh-fund-research  # uninstall

Restart the profile after installing (bundle activation is restart-based). The bundle patch composes the storage stack (dsh-storage + dsh-storage-json + dsh-storage-domain) the snapshot layer needs.

Configuration

All keys are optional (defaults shown); invalid values fail loudly at load.

KeyDefaultDescription
enabledtrueMaster switch; false mounts nothing at all.
eastmoneyBaseUrlhttps://fund.eastmoney.comTiantian Fund pingzhongdata host.
f10BaseUrlhttps://fundf10.eastmoney.comTiantian Fund F10 host (holdings + manager pages).
quoteBaseUrlhttps://push2.eastmoney.comEastmoney quote host for per-stock valuation snapshots.
quoteFallbackBaseUrlhttps://push2delay.eastmoney.comFallback quote host tried per stock when the primary fails (Eastmoney's own delayed-quote host); '' disables it.
requestIntervalMs1000Minimum gap between outbound requests (polite collection).
timeoutMs15000Per-request timeout.
retries2Retries per request with exponential backoff.
cacheTtlHours12Storage-domain snapshot reuse window.
riskFreeRate0.02Annual risk-free rate for the Sharpe ratio.
offlinefalseNever send requests; read the snapshot layer only.
reportRootfund-reportsWorkspace-relative (or absolute) report tree root.
styleQuotestrueFetch per-stock valuation quotes for style attribution.

Tools & surfaces

fund_research

ArgumentTypeDescription
codestringSix-digit fund code, e.g. "161725" (single fund). Mutually exclusive with codes.
codesstring[]Multiple six-digit fund codes: a fan-out with per-fund failure isolation (returns a summary). Mutually exclusive with code.
sectionsstring[]Section ids to render (overview/performance/holdings/style/manager/benchmark/risk/disclaimer). Default: all.
offlinebooleanRead the snapshot layer only (no network). Default: plugin config.
asOfDatestringISO 8601 date (YYYY-MM-DD) cutoff: only data on or before it is used (NAV series truncated). Empty = no cutoff; future dates fail loudly.
resumebooleanResume the recorded .run-state.json run from the first incomplete stage (reuses sealed artifacts); rejects a fingerprint mismatch. Default: false.
includeComparisonbooleanRender a deterministic 与上次对比 section against the previous .tracking.jsonl record; missing evidence is declared as a gap. Default: false.
includeWalkForwardbooleanRender a deterministic 样本外稳定性摘要 (walk-forward) section: rolling-window return/Sharpe sign persistence and mean/std. Statistical description only, not a prediction. Default: false.
backgroundbooleanRun as a fund-report background job; returns { kind: "background", jobId }. Default: false.

fund_snapshot

ArgumentTypeDescription
code (required)stringSix-digit fund code.
offlinebooleanRead the snapshot layer only. Default: plugin config.
asOfDatestringISO 8601 date (YYYY-MM-DD) cutoff: only data on or before it is used. Empty = no cutoff; future dates fail loudly.

Report sections

概览 overview · 业绩拆解 performance decomposition · 持仓穿透 holdings penetration · 风格归因 style attribution (simplified) · 经理画像 manager profile · 同类/指数基准对比 benchmark & peer comparison · 风险与缺口声明 risk & gaps · 免责声明 disclaimer · 附录:数字回溯表 traceability appendix.

Permissions & data

  • Reads the public Tiantian Fund / Eastmoney endpoints (fund.eastmoney.com/pingzhongdata/*.js, fundf10.eastmoney.com F10 pages, push2.eastmoney.com quotes) with a browser User-Agent and configurable polite pacing. No key, no login, no paid API, no anti-crawler circumvention.
  • Writes only under the configured report root inside the session workspace, plus the dsh_fund_research storage domain (latest snapshot per fund).
  • Never evaluates remote JavaScript (the pingzhongdata block is scanned, never executed), never stores credentials, never trades.
  • Session events are log-only audit records that ride an adaptive gate: hosts that know the vocabulary append plainly, hosts with the ignorable envelope append with the marker, and envelope-less hosts (rc.6–rc.8, 0.1.1-rc.2, and 0.1.2-alpha.5, which removed the envelope and fails closed on unknown types at read) get no append — the tool results and sealed artifacts remain the reconstructable audit trail. 0.1.2-alpha.5 (adapted 2026-09-02): the session envelope keeps its ignorable field for stored-log read compatibility only - Session.append still cannot stamp it, so audit-gate behavior is unchanged.

Security boundaries

  • Fund codes are validated as exactly six digits before touching a path or a URL; the report root resolves inside the session workspace.
  • Source payloads are hashed (SHA-256) at acquisition; the sealed manifest lets you detect silent upstream edits between runs.
  • Verification never blocks a seal: a broken optional dsh-data-quality service degrades to the built-in checker, and the engine used is recorded in the manifest and the appendix.
  • See SECURITY.md for the reporting policy.

Known limitations

  • Upstream structure drift. The parsers are strict by design: if Tiantian Fund changes a var Data_* shape or an F10 table layout, the affected source throws a SourceParseError naming the field, and the section degrades to a declared gap (the core pingzhongdata block failing aborts the run loudly). This is deliberate — a silent misparse is worse than a declared gap.
  • Style attribution is估算口径. Fixed size bands (≥1000亿 / 300–1000亿 / <300亿) and PE bands, plus within-holdings quintiles — no full-market distribution is consulted. The report labels this.
  • Holdings are quarterly disclosure data (披露滞后); the F10 page carries the latest two quarters.
  • One fund per call; no portfolio analysis, no PDF annual reports, no real-time quotes (the fundgz.1234567.com.cn realtime endpoint is dead and deliberately unused).
  • The Web UI "deliverables" turn row keys off mutation-tool call cards; this plugin's produced files surface through the tool call card's follow-along location (the fund's report directory), not per-file rows.

Development

sh
pnpm install
pnpm run typecheck && pnpm run typecheck:ci   # types, incl. CI-strict
pnpm test                                     # 124 tests over real harness seams
pnpm run test:e2e                              # opt-in LIVE-network E2E (LIVE_E2E=1)
pnpm run build && pnpm run verify:artifacts   # tsdown + tsc declarations
pnpm run verify:self-contained                # no out-of-repo dependency specs
node scripts/check-readme-sync.mjs            # five-language README gate
node scripts/check-endpoints.mjs              # M3 endpoint-liveness probe (4 eastmoney hosts)
pnpm pack                                     # tarball

Tests run the REAL Context/SessionStore/ToolRuntime/LocalJobRegistry/storage seam from the 0.1.2-alpha.5 peers; the network is replaced only at the fetch boundary by saved real-response fixtures (fixtures/, fund 161725). Refresh fixtures with the collector scripts in .tmp/.

Topics

dsh · dsh-plugin · deepseek-harness · cordis · fund-research · mutual-fund · investment-research · finance · research-report

Contributors

  • PerryLink — maintainer: the collector/metrics/report-seal pipeline, the endpoint-liveness probe, CI and releases, and the five-language docs.
  • dsh-fund-research contributors — collective author of the foundational build (plugin contract, config schema, tools, tests, packaging).

No external contributors yet — 0 community PRs/issues merged. Open an issue via the forms in .github/ISSUE_TEMPLATE/ or a pull request against main to be listed here.

Part of a family of standalone DeepSeek Harness plugins sharing one engineering baseline: pinned 0.1.2-alpha.5 peers, fail-loud Schemastery config, five-language READMEs, and real-seam vitest coverage.

This project is one of the 33 DeepSeek Harness plugins maintained by PerryLink. If this one helps you, the others likely will too:

PluginOne-liner
dsh-dsh-auto-reviewSecond-model auto-review on the approval chain, fail-closed by default
dsh-dsh-background-agentsDurable background child agents with a Web UI sidebar, messaging and interrupt
dsh-dsh-budgetCost governance for DeepSeek Harness: budgets, carbon, and latency in one panel.
dsh-dsh-checkpoint-rewindClaude Code /rewind-equivalent: snapshots, session forks, one-shot restore
dsh-dsh-claude-moveMigrate Claude Code sessions, memory, skills and CLAUDE.md into DSH
dsh-dsh-clickCross-platform native desktop control for DeepSeek Harness — Windows first.
dsh-dsh-composer-historyTerminal-style input history for the web composer: arrows, Ctrl+R search
dsh-dsh-data-qualityDataset quality checks and citation cross-checks (the optional numeric bridge consumed here)
dsh-dsh-defendPrompt-injection, jailbreak, and secret-leak defense for DeepSeek Harness.
dsh-dsh-doublecheckEngineering-discipline guard: requirements grill, test gates, adversary review
dsh-dsh-drawUnified static-image generation routing for DeepSeek Harness.
dsh-dsh-fastRead-only performance diagnostics for DeepSeek Harness.
dsh-dsh-githubGitHub PR/issues integration for DSH, every write gated by approval
dsh-dsh-industry-researchIndustry research orchestration that seals its deliverables through this plugin's ctx.researchReport.assemble
dsh-dsh-libraryLocal document knowledge base for DeepSeek Harness.
dsh-dsh-local-aiLocal-model (Ollama) integration for DeepSeek Harness.
dsh-dsh-lsp-actionsLSP diagnostics, formatting, completion, code actions and rename over language servers
dsh-dsh-maskPII masking middleware: anonymize at the model boundary, restore at the display layer
dsh-dsh-mcp-panelRead-only MCP runtime panel: /mcp command + Settings tab with status, tools and errors
dsh-dsh-mementoApproval-gated cross-session memory: ctx.memory seam + SQLite + memory tool
dsh-dsh-observeOpenTelemetry and Langfuse observability exporter for DeepSeek Harness.
dsh-dsh-output-stylesClaude Code outputStyles-equivalent runtime style switching
dsh-dsh-permission-rulesClaude Code-style declarative allow/deny/ask permission rules with audit
dsh-dsh-plugin-guidePlugin-development knowledge base as an on-demand agent skill
dsh-dsh-research-reportVerifiable research-report engine: content-addressed evidence ledger and sealed versions
dsh-dsh-scoreMulti-dimensional quality scoring for DeepSeek Harness plugins.
dsh-dsh-session-pinPin sessions in the Web sidebar with durable ordering
dsh-dsh-session-syncCross-device session sync for DeepSeek Harness — a dedicated git mirror of your session store.
dsh-dsh-skill-pack-securitySecurity-audit skill pack: secret scan, dependency and supply-chain review
dsh-dsh-talkVoice-first session loop for DeepSeek Harness: talk to it, hear it answer.
dsh-dsh-test-driveIsolated install-and-smoke test drives for DeepSeek Harness plugins.
dsh-dsh-translateVendor parameter translation and deterministic JSON repair for DeepSeek Harness.

License

Apache-2.0. Third-party notices: THIRD_PARTY_NOTICES.md.

Disclaimer: this plugin produces research artifacts only. Nothing it outputs constitutes investment advice.