🏆 dsh-score

September 4, 2026 · View on GitHub

🏆 dsh-score

  • 1024 商店渠道:先 npm i -g dsh1024,再 dsh1024 plugin --profile web add dsh-score(计入 deepseek1024.com 安装排行)。

为 DeepSeek Harness 插件提供多指标质量评分。

五个维度、真实 gh/npm 证据,一张加权风险卡与排行榜。

License DSH plugin Node CI Version npm version npm downloads

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


兼容性

组件版本
DeepSeek Harness0.1.2-rc.1(peer 依赖 >=0.1.0-rc.8 <0.2.0)(2026-09-04 已适配):会话信封保留 ignorable 字段但仅用于存量日志读取兼容——Session.append 仍无法盖章,门控行为不变。
Node.js^22.19.0 || >=24.0.0
包管理器pnpm@11.7.0
平台Windows / macOS / Linux(纯 host 插件)
外部工具PATH 上的 gh CLI(已认证用于 API 读取)、PATH 上的 npm CLI

你会得到什么

  • score 工具——对单个目标跑五维评分流水线;返回结构化风险卡,传 background: true 时返回 { kind: 'background', jobId }
  • /score 命令——把空白/逗号分隔的目标列表作为 score-batch 后台任务(ctx.jobs)批量评分,产出排行榜快照(JSON + Markdown)。
  • score_report 工具——按 id 取回评分卡(sc_...)、排行榜(lb_...)或最新排行榜。
  • 五个维度(权重可配置,默认合计 100):安装成功率 25、维护 20、文档 20、安全 20、合规 15
  • 证据纪律——每个维度记录其审计链接(source、脱敏后的 detailobservedAt);无证据的维度如实报告 no-evidence(得分 0,从加权总分中剔除),绝不编造数字。
  • 结构化结果——每条记录带 schema: "dsh-score/v1" 判别符,字段一等公民化,是下游工具消费的机器可读契约。

快速开始

git 通道

dsh plugin --profile web add github:PerryLink/dsh-score#<commit-sha>

首次 add 会因 pnpm 拦截该包的 prepare 构建而失败;把 pnpm 打印的精确键复制到 profile 的 pnpm-workspace.yaml 后重试:

allowBuilds:
  'dsh-score': true

npm 通道

dsh plugin --profile web add dsh-score

预构建包无需构建许可。重启 profile 后即可在会话中使用 score / /score

安装与卸载

dsh plugin --profile web add dsh-score     # 安装(npm)——或上面的 git 形式
dsh plugin --profile web remove dsh-score  # 卸载

配置

所有键均可选(括号为默认值);非法值在加载期响亮失败。

默认值说明
probeTimeoutMs60000单条 gh/npm 探测命令的截止时间(毫秒)。
outputTailBytes8000每条探测记录的脱敏输出尾部上限(字节)。
cacheMaxAgeMs86400000缓存评分卡复用的时长(0 关闭缓存)。
staleCommitWarnDays90提交/发布年龄超过该值维护维度降为 warn
staleCommitFailDays365提交/发布年龄超过该值维护维度降为 fail
staleIssueWarnDays30最久未关闭 issue 年龄(响应代理)超过该值降为 warn
staleIssueFailDays180最久未关闭 issue 年龄超过该值降为 fail
maxBatchTargets20/score 批量上限。
batchConcurrency1批量并发(串行可避免 API 限流竞争)。
weights{install:25, maintenance:20, documentation:20, security:20, compliance:15}各维度权重(每个 0–100;至少一个 > 0)。

工具与界面

score

score(target: string, refresh?: boolean, background?: boolean)
  • target——GitHub 仓库(github:owner/repoowner/repo、git/https URL)或 npm 包名。
  • refresh: true 绕过评分缓存重新采集证据。
  • background: true 启动 score-batch 任务并返回其 id。

/score <targets...>

启动一个后台批量任务;进度经任务输出流式返回,最后一行给出供 score_report 使用的排行榜 id。

score_report(id?)

返回评分卡(sc_...)、排行榜(lb_...),或不传 id 时返回最新排行榜。

score_badge(target? | id?, refresh?)

为某个目标生成可嵌入 README 的徽章与五维 JSON:

  • target — 经缓存对 GitHub 仓库或 npm 包评分并生成徽章;与 id 互斥。
  • id — 对已存评分卡(sc_...)生成徽章,不重新评分。
  • refresh: true — 绕过评分缓存(仅对 target 生效)。

返回徽章(SVG + endpoint + Markdown 嵌入)与紧凑五维 JSON——见下文「徽章与 JSON API」。

Structured result sample

{
  "schema": "dsh-score/v1",
  "scoreId": "sc_8f1c2e4a9b3d7f01",
  "target": { "kind": "repo", "spec": "github:owner/dsh-click#abc123" },
  "scoredAt": "2026-08-16T00:00:00.000Z",
  "durationMs": 3210,
  "pluginVersion": "0.1.0",
  "dimensions": {
    "install": { "dimension": "install", "status": "no-evidence", "score": 0, "weight": 25,
                 "summary": "no dsh-test-drive result recorded for this target (install success unmeasured)",
                 "evidence": [{ "source": "test-drive", "detail": "no test-drive record found in the test_drive domain", "observedAt": "2026-08-16T00:00:00.000Z" }] },
    "maintenance": { "dimension": "maintenance", "status": "pass", "score": 100, "weight": 20,
                     "summary": "active (2026-08-10T00:00:00Z; 0 open issues)",
                     "evidence": [{ "source": "gh-api", "detail": "last activity 2026-08-10T00:00:00Z", "observedAt": "2026-08-16T00:00:00.000Z" }] }
  },
  "total": 88,
  "grade": "B",
  "verdict": "healthy (weighted total 88/100)"
}

计分:总分为收集到证据维度的加权平均(no-evidence 维度被剔除并重新归一);A ≥ 90,B ≥ 75,C ≥ 60,D ≥ 40,否则 F,全无证据时为 N/A

徽章与 JSON API

score_badge 为某个已评分目标生成可嵌入 README 的徽章与五维 JSON。

徽章

  • 徽章:shields.io 扁平 SVG(badge.svg 字段 / renderScoreBadge)、文档化端点 URL、以及 Markdown 嵌入片段。

嵌入总徽章:

![dsh-score: B · 84/100](https://img.shields.io/badge/dsh--score-B_%C2%B7_84%2F100-green)

五维 JSON

  • 五维 JSONinstall/maintenance/documentation/security/compliance 各自的 status/score/weight/summary,外加加权 total 与字母 gradeschema: "dsh-score/badge/v1")。

no-evidence 维度保持诚实状态并计 0 分——徽章与 JSON 绝不伪造数字。

权限与数据

  • 只消费公开服务:ctx.subprocessctx.jobsctx.storageDomainctx.toolsctx.commands
  • 评分卡与排行榜存于 score 存储域(表 scoresleaderboards;最新排行榜指针)。组合里没有 storageDomain(如官方 headless profile)时工具仍可用,评分持久化被禁用并记录原因。
  • 子进程继承 provider 已剥离凭据的环境;gh 读取其自身的凭据存储。任何环境变量值都不被记录。
  • 所有报告/日志字符串经过纯脱敏函数:token 字面量、URL 凭据、bearer 头被脱敏,尾部按字节截断。

安全边界

  • 不执行代码。流水线只运行 gh apinpm view;绝不安装、构建或运行目标。
  • 仅 argv 子进程。每次 CLI 调用都是 argv 数组,绝不经过 shell 解释;owner/repo 段在用于端点前先做受限字符集校验。
  • 证据纪律。不编造评分:探测失败或输出不可解析时返回 no-evidence,绝不填数字。
  • 检测与脱敏分离。密钥泄露与恶意安装脚本检测复用与脱敏同一套纯正则,二者均有极端输入单测。

已知限制

  • 仓库探测需要 gh 已认证且有到 GitHub 的网络;npm 探测需要 npm 与 registry 访问。
  • 无法解析出 GitHub 仓库的目标无法检查文档、安全或合规(这些维度报告 no-evidence)。
  • 安装成功率依赖 dsh-test-drive 已挂载且已记录该目标;否则如实为 no-evidence
  • 维护维度的“issue 响应”是代理信号(最久未关闭 issue 年龄),不是直接响应时长测量。
  • 评分按目标缓存;用 refresh: true(或等过 cacheMaxAgeMs)强制重评。

开发

pnpm install
pnpm run typecheck && pnpm run typecheck:ci && pnpm test
pnpm run build && pnpm run verify:self-contained && pnpm run verify:artifacts && pnpm pack
  • typecheck 经本地 harness checkout 解析 @deepseek-ai/*typecheck:ci 对照已发布的 0.1.2-rc.1 类型。
  • 测试使用真实 Context/Session/ToolRuntime/LocalJobRegistry/存储栈,子进程 provider 为脚本化实现。
  • 真实 CLI 评分(需 PATH 有 gh/npmgh 已认证):在已挂载 profile 中调用 score
  • 发布:node scripts/release.mjs <x.y.z>(升版本、盖 CHANGELOG、重跑门禁、提交 + tag;绝不 push)。

主题

dshdsh-plugindeepseek-harnessdeepseekcordisplugin-scoringquality-scoreleaderboardsupply-chain

贡献者

PerryLink — 设计与实现。

这是 PerryLink 维护的 33 个 DeepSeek Harness 插件 之一。如果它能帮到你,其他的也会:

PluginOne-liner
dsh-dsh-auto-review审批链上的第二模型自动审查,默认失败关闭
dsh-dsh-background-agents带 Web UI 侧栏、消息与中断的持久后台子代理
dsh-dsh-budgetDeepSeek Harness 的成本治理:预算、碳排与延迟一屏呈现。
dsh-dsh-checkpoint-rewindClaude Code /rewind 等价:快照、会话 fork、一次性恢复
dsh-dsh-claude-move把 Claude Code 会话、记忆、技能与 CLAUDE.md 迁入 DSH
dsh-dsh-click跨平台原生桌面控制(DeepSeek Harness),Windows 优先。
dsh-dsh-composer-historyWeb 输入框的终端式历史:方向键、Ctrl+R 搜索
dsh-dsh-data-quality数据集质量检查与引文核查(本插件可选消费的数字核查桥)
dsh-dsh-defendDeepSeek Harness 的提示注入、越狱与密钥泄露防护。
dsh-dsh-doublecheck工程纪律守卫:需求质询、测试门禁、对手评审
dsh-dsh-drawDeepSeek Harness 的统一静态图像生成路由。
dsh-dsh-fastDeepSeek Harness 只读性能诊断。
dsh-dsh-fund-research面向中国公募基金的确定性研究报告
dsh-dsh-github面向 DSH 的 GitHub PR/issues 集成,每次写入经审批门控
dsh-dsh-industry-research行业研究编排,经本插件的 ctx.researchReport.assemble 封存交付物
dsh-dsh-libraryDeepSeek Harness 的本地文档知识库。
dsh-dsh-local-aiDeepSeek Harness 的本地模型(Ollama)接入。
dsh-dsh-lsp-actions通过语言服务器的 LSP 诊断、格式化、补全、代码操作与重命名
dsh-dsh-maskPII 脱敏中间件:模型边界匿名化、展示层还原
dsh-dsh-mcp-panel只读 MCP 运行时面板:/mcp 命令 + 带状态、工具与错误的 Settings 标签页
dsh-dsh-memento审批门控的跨会话记忆:ctx.memory 接缝 + SQLite + 记忆工具
dsh-dsh-observeDeepSeek Harness 的 OpenTelemetry 与 Langfuse 可观测导出器。
dsh-dsh-output-stylesClaude Code outputStyles 等价的运行时风格切换
dsh-dsh-permission-rulesClaude Code 风格声明式 allow/deny/ask 权限规则,带审计
dsh-dsh-plugin-guide作为按需代理技能的插件开发知识库
dsh-dsh-research-report可验证研究报告引擎:内容寻址证据账本与封存版本
dsh-dsh-session-pin在 Web 侧栏置顶会话,带持久排序
dsh-dsh-session-syncDeepSeek Harness 的跨设备会话同步——会话存储的专用 git 镜像。
dsh-dsh-skill-pack-security安全审计技能包:密钥扫描、依赖与供应链审查
dsh-dsh-talkDeepSeek Harness 的语音优先会话闭环:对它说,听它答。
dsh-dsh-test-driveDeepSeek Harness 插件的隔离试装冒烟。
dsh-dsh-translateDeepSeek Harness 的厂商参数翻译与确定性 JSON 修复。

从 DSH Desktop 市场安装

所有 PerryLink 插件均可在 DSH Desktop 内置市场中浏览:市场 → 来源 → 添加来源 → 粘贴 https://perrylink-dsh-catalog.perrylink.workers.dev/catalog-source.json → 选中。安装仍需通过市场的 npm 身份校验与你的确认。

许可证

Apache-2.0