omdsh-dev/dsh-tool-stat
DSH 统计工具插件:描述统计/百分位数/频数分布/相关性,零依赖纯函数确定性
Project Overview项目介绍
This is a native tool plugin built exclusively for DeepSeek Harness (DSH), designed to provide reliable statistical computing capabilities for AI agents working with numerical data. It supports four core types of calculation: descriptive statistics, percentile queries, frequency distribution, and correlation coefficient calculation. All core algorithms are implemented from scratch, with zero third-party dependencies, and it produces fully deterministic output: the same input will always return the same result, with no randomness or side effects. To install it, you can run the DSH plugin command directly to pull from the public GitHub repository, and it works with both web and headless DSH profiles.
This tool is designed for DSH users who need to analyze numerical data extracted from sources like CSV or JSON. The typical workflow is straightforward: after an AI agent extracts numerical arrays from raw data, it calls this stat tool with the required calculation action and valid input parameters. The tool returns a structured JSON result that the agent can use for further reasoning and analysis. This removes the need for the AI model to compute statistics directly, which eliminates calculation errors and produces fully reproducible results that you can inspect and verify.
The plugin is released under the open source MIT license, and it enforces strict constraints on input and output to guarantee numerical stability and correctness. It rejects non-finite values like NaN or Infinity with clear error messages that indicate the position of the bad input. It supports up to 100,000 observations, a maximum of 100 percentile requests per call, and truncates distinct frequency output to 10,000 entries to avoid performance issues. After installation, you can verify the plugin is working correctly by running a simple test command with DSH to compute descriptive statistics for a sample input array.
这是一款专为DeepSeek Harness(DSH)开发的原生统计工具插件,提供描述统计、百分位数计算、频数分布分析、相关系数计算四大核心能力,零依赖、纯函数实现,输出结果完全确定可复现。它解决了现有DSH工具无法完成数值聚合分析的痛点,在Agent从CSV/JSON提取出数值数组后,可一次性完成统计计算,毫秒级返回结构化JSON报告。
本工具面向需要在DSH Agent工作流中处理数值数据的开发者和分析人员,典型工作流为:当Agent从源数据提取出一组或多组数值观测后,调用本工具指定计算动作(如描述统计、相关性分析)并传入参数,即可获得符合规范的结构化统计结果,供Agent进行后续分析判断,避免模型直接心算带来的错误和不可复现问题。
本插件采用MIT许可协议,所有统计算法均手写实现,无第三方数值库依赖,对输入输出有严格的数值约束,最大支持10万条观测值,最多可请求100个百分位数,频数分布不同值输出截断为1万条。可通过DSH官方插件命令直接从GitHub仓库安装,支持web和headless两种DSH profile,安装后可立即通过工具调用验证可用性。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-tool-stat(omdsh-dev/dsh-tool-stat)
仓库:https://github.com/omdsh-dev/dsh-tool-stat
本站详情页:https://www.yhbd.top/plugins/omdsh-dev-dsh-tool-stat/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 6 · 最近提交 2026-09-10 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 6 stars - very few users, little community feedback星标只有 6,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:omdsh-dev/dsh-tool-stat
把 omdsh-dev/dsh-tool-stat 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-tool-stat
DSH 统计工具插件 —— 描述统计、百分位数、频数分布、相关性计算。零依赖、纯函数、确定性。
动机
Agent 处理数值数据时,从 CSV / JSON 提取出数值数组后往往需要聚合分析(均值、分位数、分布、相关性)。现有工具链没有这类能力:
calculator只做单表达式求值——一个表达式算不出分位数分布,更算不了相关系数dsh-tool-csv的stats只报告行/列结构——不提供对一组观测值的统计聚合- 模型"心算"统计不可验证——均值、方差、百分位、相关性涉及大量浮点运算,手算错误率极高,且无法给用户展示可复现的过程
本插件接收显式传入的有限数值数组或成对观测值,提供确定性的统计计算:一次函数调用,毫秒级返回结构化 JSON 报告。不读取文件、不访问网络、不创建进程、不保存状态——相同输入永远得到相同输出。
安全模型
- 零依赖:Neumaier 补偿求和、Welford 在线方差、线性插值百分位、Spearman midrank 全部手写,无第三方数值库
- 有限数强约束:拒绝
NaN/Infinity(错误信息带下标定位,如values[3] must be a finite number (got Infinity));-0在输入与输出中均规范化为0 - 溢出回检:所有结果在返回前再次做有限数检查,中间或最终结果溢出返回
numeric-overflow错误——canonical 输出绝不含非有限值 - 纯函数:输入数组永不被修改(只读遍历;需要排序时先拷贝)
- 零方差语义:
correlation遇零方差配对返回defined: false+reason: "zero-variance",而不是 NaN 或 ±Infinity - 预算:
- 观测值 1..100,000(超限直接报错)
- 百分位请求 ≤ 100 个
- distinct 输出 ≤ 10,000(超出按确定规则截断并标注)
timeoutMs: 2000
- 工具参数会记入会话日志,不要传入敏感数据
工具声明
注册 stat 工具(@deepseek-ai/dsh-tool-stat,row id tool-stat),统一输出 JSON 文本字符串。
| action | 作用 | 输出 |
|---|---|---|
describe |
描述统计 | count / sum / min / max / mean / median / variance / standardDeviation / q1 / q3 / iqr(Neumaier 补偿求和 + Welford 方差,population 或 sample) |
percentile |
百分位数 | 一个或多个百分位(线性插值 h=(n-1)*p,0..100),输出按请求顺序、重复保留 |
frequency |
频数分布 | value / count / ratio 分组(严格相等分组、升序输出、ratio 分母为原始计数) |
correlation |
相关系数 | Pearson 或 Spearman(midrank 平均秩)相关系数;零方差返回 defined:false + reason |
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
action |
string | ✅ | describe / percentile / frequency / correlation |
values |
array | ✅ | 有限数值观测(1..100,000);-0 归一化为 0 |
other |
array | correlation 的配对观测;长度须与 values 相同(≥2) |
|
percentiles |
array | percentile 的百分位(0..100,1..100 项) |
|
method |
string | 相关系数方法:pearson(默认)/ spearman |
|
sample |
boolean | 方差分母:true 用样本(n-1),默认 false(总体 n) |
输出示例
{"action":"describe","count":5,"sum":15,"min":1,"max":5,"mean":3,"median":3,"variance":2,
"standardDeviation":1.4142135623730951,"q1":2,"q3":4,"iqr":2,"sample":false}
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
nocobase/nocobase
TencentCloudBase/CloudBase-AI-Toolkit
WYH66666666/DSH-Transparent-UI-Plugin
Nagi-ovo/dsh-visualize
SepineTam/mcp-for-stata
omdsh-dev/dsh-data-agent
morluto/jacobian
youdotcom-oss/agent-skills