A local journal for your own price calls: draw the next candles, fill in the actuals when they come due, and see your personal bias profile built only from your own records. No market feed, no auto-fetch, no advice — every number comes from a file you import or a value you confirm.
Install
# from npm (prebuilt)
dsh plugin --profile web add @zhangxij/dsh-yupan
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:zhang-1239/dsh-yupan
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
This plugin publishes its README in Chinese only.
先画下你认为的走势,到期再填实际值;偏差只跟自己比。
预判是 DeepSeek Harness 的插件:一个挂在 Web 侧边栏里的个人面板,用来管理多条价格预测记录,用四种价格(开盘/最高/最低/收盘)画出你认为的未来走势;到期后手动填实际值,偏差按你自己的历史累计成画像。
边界:不接行情接口,不自动获取价格,不分析个股,不预测涨跌,不输出买卖建议。所有历史数据、预测值、实际值都来自你导入的文件、截图确认结果或手动输入。截图识别和列名辅助只用于录入,结果必须逐项确认后才写入。
是什么
- 未来预测:不导入数据也能直接开始。点「直接开始」进入画布,名称、起始日期都可以不填;按第 1 根、第 2 根记录,也可以随时手动填实际值。
- 回放挑战:用已导入的历史 K 线,遮住末尾 N 根,画完立即揭晓;需要先「导入历史数据」。
- 画布:每根预测 K 线有四个手柄;右侧表格可输入四个数字(回车下一根);模板可「沿用昨收画平」或「复制上一根」;Ctrl/⌘ + Z 撤销。周期 1–60 根可调。
- 状态:待画 / 待揭晓 / 待填实际值 / 已完成。支持筛选、排序、编辑、删除。
- 我的画像:方向偏差、幅度偏差、模式标签,只统计你自己的记录,不打分、不排名。
- 到期提醒:未来预测填了起始日期后,按工作日排期,到期在对话底部提示。
怎么装
需要带插件系统的 DSH(dsh web 或 DSH Desktop)。
从 npm 安装(发布后)
dsh plugin --profile desktop add @zhangxij/dsh-yupan
从本地目录安装(开发时)
dsh plugin --profile desktop add file:D:\yupan\plugin
把 --profile desktop 换成你自己的 profile 名(dsh 默认 profile 一般是 web)。
包名已设为
@zhangxij/dsh-yupan。如果 fork 到别的 scope,要同步改三处:package.json的name、cordis.patch.yml的name、client.js里__ModuleLoader__.load({ id })的 id,否则宿主会找不到浏览器半侧。旧包名@local/yupan的记录会留在原数据目录里,见下面的「数据在哪」。
安装后重启或刷新 DSH:左侧栏出现「预判」入口,点开就是面板。
使用
- 左侧边栏点「预判」图标打开面板。首页直接给出两个入口:未来预测 和 回放挑战。
- 未来预测:
- 名称可选(不填为「未命名预测」);
- 起始日期可选(不填就不设到期提醒,随时可手动对比;填了按工作日排期);
- 周期 1–60 根可调,画布和表格即时同步。
- 回放挑战:选数据集、周期、可选起点;画完立即从本机数据库取实际值揭晓。
- 未来预测填实际值时也支持上传截图识别;识别结果先填入表格,逐项核对并勾选确认后才能保存。联网开关就在该窗口里,关闭则只能手动填。
导入与确认
- CSV / XLSX 在 Host 本地解析(支持 UTF-8/GBK/UTF-16、Excel 日期序列、字段别名、无表头启发式)。确认页展示解析后的日期与四价、字段映射、重复策略,勾选确认后才写库。
- 同一标的同一日期默认跳过;可选覆盖。覆盖会更新原行的数值并把该行归到新数据集。
- 截图识别:设置里开启「联网辅助」并配置 OpenAI 兼容的
chat/completions地址、模型、可选 Key。识别结果逐根展示,每根单独勾选「已核对」后才可写入;识别失败不猜值、不自动填充。关闭开关后只能手动录入。 - 列名辅助:映射不确定时可调用同一服务给出建议,仍由你确认。
数据在哪
数据目录按下面的顺序取,取到第一个就用它:
- 插件配置
config.dataRoot(cordis.patch.yml里的config.dataRoot); - 环境变量
DSH_YUPAN_DATA; - 仓库内
data/——仅开发时:插件目录不在node_modules里,且data/已经存在(跑过node seed.js才会有); - 仓库父级的
data/——仅开发时,兼容旧版本默认的D:\yupan\data; - 用户目录
~/.yupan(Windows 上是C:\Users\<你的用户名>\.yupan)。
任何一步解析到 node_modules 里,都会退回 ~/.yupan;安装后的包不会往自己的安装目录写数据。数据是一个 SQLite 文件 yupan.db(WAL 模式),表结构:
| 表 | 内容 |
|---|---|
datasets |
每次导入的元数据 |
bars |
原始 K 线,主键 (symbol, date),按标的、日期建索引;查询永远带日期范围与 LIMIT |
predictions |
预测记录;回放挑战用 dataset_id 关联数据集,未来预测可以为空;predicted_json / actual_json 保存四价 |
comparisons |
预测与实际的分项对比、标签和摘要 |
settings |
联网开关、识别服务地址/模型/Key、是否保留原文件 |
originals |
仅在显式开启「保留原文件/原图」时保存 Blob |
- 备份:关掉 DSH,复制整个数据目录(含
yupan.db、yupan.db-wal、yupan.db-shm)。 - 清空:面板「数据」里可清空全部;或关掉 DSH 后删除数据目录。
- 卸载插件不会删除数据目录,需要手动清理。
隐私与权限
- 不获取行情:插件没有行情接口、没有行情轮询、没有遥测或第三方统计。
- 外部请求只有一个开关:只有你在设置里主动开启「联网辅助」并填写地址后,截图识别和列名辅助才会把你确认要识别的截图/表头发给你配置的 OpenAI 兼容服务;地址由你填,插件不自带、不硬编码任何服务端。开关关闭时插件不发起外部请求。
- DSH 访问检查:HTTP 只注册同源路由
GET /yupan/state、POST /yupan/predictions等(完整清单见index.js),每个请求都在任何路由逻辑之前调用ctx.connection.requestRejection:没有有效 DSH 凭据返回 401,跨站请求返回 403;同源校验只是最前面的廉价一层,不是唯一一层。 - 客户端走 DSH 连接:浏览器端只请求同源的
/yupan/*,桌面壳暴露__DSH_TRANSPORT__.fetch时优先用它,否则用同源fetch自动携带 DSH 的dsh-auth-*会话 Cookie;不裸连第三方。 - 文件访问:只读写上面解析出的数据目录;不扫描其它目录,不写
node_modules。 - Key:OCR 的 API Key 只存本机数据库;JSON 导出不含 Key,也不含保留的原文件 Blob。
- 导出:面板「数据」里可导出全部 JSON(数据集、原始 K 线、预测、对比、设置),也可按标的/时间清除原始数据、删除单个数据集、清空全部。
已知限制
- 中文优先:界面文案是中文;
locale/zh.json、locale/en.json目前只有插件市场用的标题和描述,界面本身没有做多语言。 - 只做记录,不做判断:偏差画像是「你自己的预测 − 你自己的实际值」的累计,不是准确率排名,也不能预测下一次。
- 识别依赖外部服务:截图识别和列名辅助依赖你配置的 OpenAI 兼容服务;模型识别错、漏、串行时不会自动写入,必须逐项勾选「已核对」。
- 单机单用户:没有账号、同步、协作;数据是本地 SQLite,落盘不加密。
- 需要 Node 内置 SQLite:依赖
node:sqlite(DSH 自带的 Node 24 已包含);在更老的 Node 上无法加载。 - 原文件按需保留:默认不保留上传的 CSV/XLSX/截图;开启后才会写进
originals表。 - 开发时会切数据目录:如果仓库内存在
data/,开发中的插件会优先用它而不是~/.yupan。跑过seed.js后如果看不到原有记录,先检查这一点;删掉仓库内data/即可回到用户目录。
开发
index.js 宿主端:数据目录、SQLite、/yupan 路由、导入解析、OCR 调用
client.js 浏览器端:侧边栏面板、画布、列表、画像、到期提示
lib/db.js SQLite 表结构与查询
lib/parse.js CSV/XLSX 解析、字段映射、日期归一化
lib/compare.js 偏差对比与个人画像聚合
lib/ocr.js 可选的截图识别 / 列名辅助
seed.js 本地演示数据(只写仓库内 data/ 或 --dir 指定的目录)
cordis.patch.yml 插件挂载
locale/*.json 市场用的中英文标题与描述
icon.svg 插件图标
icon-512.png 市场用 512×512 图标
screenshots.json 市场截图清单
market/ 市场条目模板(提交到 awesome-dsh-plugin 用)
docs/screenshots/ 截图目录与拍摄说明
常用命令:
node --check index.js
node --check client.js
node --check seed.js
npm run check
# 往仓库内 data/ 写一份演示数据(已存在则拒绝,需 --force)
node seed.js
# 写到临时目录,不碰仓库和用户目录
node seed.js --dir D:\tmp\yupan-demo --force
# 检查 npm 包会带哪些文件
npm pack --dry-run
本地联调时可以用环境变量把数据指到临时目录:
$env:DSH_YUPAN_DATA = 'D:\tmp\yupan-dev'
发布(维护者)
- 包名:已设为
@zhangxij/dsh-yupan。如果换 scope,同时同步cordis.patch.yml的name和client.js里__ModuleLoader__.load({ id })的 id,并更新 profile 的dependencies与dsh.profile.bundles。 - 建仓库:仓库地址按
https://github.com/zhang-1239/dsh-yupan写在repository/homepage/bugs里;需要先在 GitHub 上创建这个仓库。若实际地址不同,改这三处和market/里的条目文件名、url、icon。 - Repository About → Topics:加上
dsh-plugin(市场收录的公开要求);package.json的keywords也已带上dsh-plugin。 - 发布:
npm publish --access public(prepublishOnly会先跑语法检查)。 - 上架市场:把
market/zhang-1239__dsh-yupan.yml提交到 awesome-dsh-plugin;截图放到docs/screenshots/(见该目录的 README)。
English
Yupan (預判, "forecast") is a personal forecast journal plugin for DeepSeek Harness. Draw the next N candles with four prices (open/high/low/close), fill in the actuals when the window closes, and see a bias profile built only from your own records.
- Install:
dsh plugin --profile desktop add @zhangxij/dsh-yupan(local dev:... add file:D:\yupan\plugin). If you publish under a different scope, update the package name inpackage.json,cordis.patch.yml, and the__ModuleLoader__id inclient.jstogether, plus the profile'sdependenciesanddsh.profile.bundles. - Data:
config.dataRoot→DSH_YUPAN_DATA→ repo-localdata/(development only, and only if it exists) → legacy siblingdata/(development only) →~/.yupan. Nevernode_modules. One SQLite database (yupan.db, WAL) holds datasets, bars, predictions, comparisons, settings, and optional original blobs. - Privacy: no market feed, no polling, no telemetry. The only outbound path is the optional screenshot OCR / column-name helper: it is off by default and, when you turn it on and configure a compatible endpoint, sends only the image or headers you chose to that endpoint. Every HTTP route calls
ctx.connection.requestRejectionbefore any route logic (401 without a valid DSH credential, 403 for an untrusted origin). The browser half calls only same-origin/yupan/*, preferring__DSH_TRANSPORT__.fetchwhen the desktop shell provides it. - Limitations: Chinese-first UI; local single-user SQLite with no encryption or sync; OCR quality depends on your configured service and every value must be confirmed; requires Node's built-in
node:sqlite(bundled with DSH's Node 24); original files are kept only when you opt in.
License
MIT © 2026 zhang-1239
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38385
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37218
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
yikart/AiToEarn#dsh-plugin-aitoearn★ 28812
Generate copy, images and short videos, and publish with one click to Douyin, Kuaishou, Xiaohongshu, WeChat Official, Bilibili, Facebook, TikTok and more, covering the full content lifecycle from creation to publishing and monetization.
superdesigndev/treg★ 9804
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6039
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
Hithink-Tech-Org/Financial-API#hithink-finance★ 4659
Query Hithink Finance data in DeepSeek Harness, view charts in chat, and save refreshable dashboards.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.