证据快照复核于 2026-09-16GitHub 数据核对日期: 2026-08-21
来源已审查资源自动化与智能体dsh Profile

dsh-eval

用于通过无头会话轨迹和脚本化 mock LLM 用例评估 dsh 插件行为的源码框架。

快速了解

它能做什么

用于通过无头会话轨迹和脚本化 mock LLM 用例评估 dsh 插件行为的源码框架。

本站提供的是中文说明,不代表该项目或 Plugin 自身提供中文界面;语言支持请以上游文档为准。

能力
自动化与智能体智能体测试工作流自动化

选择前先看

dsh-eval 是面向插件作者的 dsh 原生评估层。它在真实 dsh 无头运行中测试由插件、profile、patch 和工具注册表组成的整体图,并使用会话轨迹 matcher 给出断言,而非指标分数。它还提供独立的理解度评审实验层,用于判断新的模型能否理解插件输出及下一步操作。

适合谁

拥有已构建 deepseek-harness checkout,且希望为工具选择、轨迹行为、mock 写入往返或输出理解度建立可复现证据的插件作者。

常见任务

  • 编写断言指定工具被调用的 mock 行为用例。
  • 在具备凭据时,针对选定 dsh profile 运行真实意图用例。
  • 无需模型地 dry run 理解度评审实验。
  • 通过 dsh-eval.config.mjs 输出 JSON 报告,或配置 profile、仓库路径、模式、跳过处理和禁用行。

权限与数据

通过 dsh 无头工作流运行评估,并创建临时评估产物。

权限
  • 访问已构建的 deepseek-harness checkout。
  • 需要已安装被测插件的 dsh profile。
  • 真实运行可能需要由 dsh 解析的凭据。
数据处理
  • 行为运行会检查会话轨迹,并可能写入报告或运行产物。
  • README 声明会清理临时目录和链接,且不会污染真实 profile 存储。
外部服务
  • 真实行为运行在具备凭据时会通过 dsh 使用真实模型。
凭据
  • 真实用例需要凭据;mock 用例和评审 dry run 不需要凭据。

局限

  • 它不是通用智能体评估平台、仪表盘、数据集托管、指标目录、基准排名工具,也不是 DeepEval 或 OpenAI Evals 的替代品。
  • 必须手动连接兼容的 @deepseek-ai/dsh-llm peer;npm 自动安装可能选择不兼容版本。
  • 提供的证据未声明受支持的 dsh 或 deepseek-harness 版本范围。

DSHub 已核对

  • 源码固定在提交 4218d4c396870851c60a338a1472e7c22b3d3ebf。
  • 仓库文档描述了行为与评审 CLI、mock 用例、真实用例、配置发现和 MIT 许可。
  • README 声明真实用例会在缺少凭据时自动跳过,mock 和评审 dry run 不需要凭据。

DSHub 未核对

  • 未验证 npm 包发布、安装或实际运行。
  • 未验证其与某个具体 dsh 或 deepseek-harness 版本的兼容性。
  • 未独立执行文档所述的清理保证或轨迹断言。

固定版本安装

主要操作

这个资源没有 DSH Plugin 安装操作,请根据源码文档使用真实交付方式。

访问源码项目

维护者原文

项目 README

查看 commit 4218d4c 对应的 README
维护者编写的上游内容原文于 2026/9/14README.md 获取,正文和仓库相对媒体固定到 commit 4218d4c39687,内容哈希为 4599dc4b329b。以下是未经 DSHub 翻译的上游原文,语言可能与当前页面不同;第三方托管的 badge 可能独立更新。

@catheadowl/dsh-eval

English | 中文

A dsh-native agent evaluation layer for plugin authors: behavior cases run against real headless dsh traces, while review experiments test whether fresh models understand plugin outputs.

It evaluates the assembled agent harness (the graph a plugin + profile + patch + tool registry form inside a real dsh headless run), not isolated functions; verdicts come from dsh-native session-trace projections and matchers (contract assertions), not metric scores. It is not a general agent-eval platform (no dashboard / dataset hosting / metric catalog, no benchmark ranking) and not a DeepEval / OpenAI Evals replacement — those projects proved the problem space; this package picks the dsh-native vertical solution.

Documentation is Chinese-first; deep contracts live in docs/ (matchers / boundary contracts / review / report structure / host wiring / known issues).

Why it exists

Layer Question Verdict Execution
unit / shape test are deterministic fields and values correct automatic the plugin's own node:test
behavior real does natural-language intent pick the right tool trace matcher dsh + real model
behavior mock is the tool pipeline and write round-trip stable trace matcher + workspace inspect dsh + scripted mock LLM
comprehension review can a fresh model understand the output and the next step manual rubric, converged over runs abstract review experiment + replaceable executor

A dsh plugin is correct when the assembled graph really wires tools, steers, prompts, and gates together — plugin unit tests cover only part of that, and "is the output understandable" is not a string regression at all. This package turns both layers into replayable evidence instead of manual trial runs.

plugin-owned experiment             shared framework
fixtures + prompt + rubric + observe ──► experiment/review.mjs
                                               │ task
                                               ▼
                                        adapters/dsh/review.mjs ──► dsh headless

behavior *.eval.mjs ───────────────────► dsh behavior runner (trace + mock)
  • src/experiment/ is the model- and runtime-agnostic experiment layer: blind review, live observation, byte-identical evidence across reviewers. It does not import dsh.
  • src/adapters/dsh/ is the landing layer: hands the abstract task to an isolated dsh headless run.
  • Your eval/ keeps only domain fixtures, projections/observe, prompts, rubrics, and cases — no runner duplication.

Install

npm i -D @catheadowl/dsh-eval

Requirements (wiring details and failure self-diagnostics in docs/host-wiring.md):

  • a built deepseek-harness checkout (apps/cli/lib/bin.js);
  • the plugin under test installed into a dsh profile;
  • the peer dependency @deepseek-ai/dsh-llm must be wired manually (npm auto-installs an incompatible antique version; replace it with a link pointing at the host checkout).

Quickstart

<plugin>/eval/behavior/mock/smoke.eval.mjs:

import { firstTool, toolCalled, toolCallStep, textStep } from '@catheadowl/dsh-eval'

export default {
  id: 'my-first-case',
  mode: 'mock',
  task: 'rename guide.md to intro.md',
  async prepare(workspace) { /* seed fixture files */ },
  script: { steps: [toolCallStep('md_rename', { oldPath: 'guide.md', newPath: 'intro.md' }), textStep('done')] },
  expect: [toolCalled('md_rename')],
}
dsh-eval run --mode mock eval/behavior/mock
dsh-review --dry-run eval/comprehension     # model-free dry run of the review layer

The command needs to know which dsh profile to use: pass --profile <name> explicitly, or drop a dsh-eval.config.mjs at the package root (see "Unified config" below).

Real runs use dsh-eval run --profile <p> --repo <harness checkout> <case path>; all flags (--mode/--keep-artifacts/--fail-on-skip/--format/--report) are documented in docs/report.md. Real cases auto-skip without credentials (dsh resolves credentials itself); mock and dry runs need no credentials.

Canonical layout

<plugin>/eval/
  .gitignore                 # .runs/ (no path prefix)
  README.md
  behavior/                  # optional
    real/*.eval.mjs
    mock/*.eval.mjs
    _fixtures/
  comprehension/             # optional
    <name>.review.mjs
    fixtures.json
    prompt.md
    rubric.md

Unified config dsh-eval.config.mjs

Drop one at the consumer package root; both CLIs walk upward from the working directory, and flags always override config:

export default {
  profile: 'headless',              // dsh profile
  repo: '../../deepseek-harness',   // relative, anchored at the config file's directory
  mode: 'mock',                     // behavior CLI's --mode default (review has none)
  failOnSkip: false,                // behavior CI gate default
  report: 'eval-report.json',       // --report default (anchored at the config dir)
  disableRows: ['gates'],           // plugin rows disabled by default; case-level declarations win
                                     // (explicit [] = all enabled, for gate-interaction cases)
}

Unknown keys fail loudly (typos never degrade silently). The disableRows semantics and the turn-close gate boundary contract are in docs/disablerows.md.

Docs

Doc Topic
host-wiring peer wiring (incl. the npm antique-peer trap), building the CLI, profiles, credentials, spawn requirements
review comprehension review: experiment definition, blank-environment reviewers, artifacts, the six review rules
matchers the full trace-matcher and mock-helper set (tool face / text face / model-visible face)
disablerows disableRows and the turn-close gate boundary contract
rowconfig the rowConfig per-row config override contract (whole-segment replacement, restate needed keys)
cross-turn the followups cross-turn async driving contract (driver-row swap, subagent settle wait, single-cursor mock orchestration, bounded-redispatch assertions)
experiments behavior experiments: arms as case-field overrides × repeats × guards × aggregation (defineBehaviorExperiment, arm deep-merge, INVALID discipline, preregistered decision rule)
intent-cases real intent-case spec: when to write one, assertion face, guards, CI semantics
report machine-readable report structure (--format json / --report)
known-issues known issues and workarounds (e.g. REQUEST_EXTENSION in staged homes)
runner-api programmatic runner API: runEvalCase options contract, EvalRunResult fields, crossing tiers for cliPath
experimental experimental subpath symbol list (escape hatch, no compatibility promise)

Runtime guarantees

The runner uses try/finally so temp directories and links are cleaned up on every path (prepare throwing, mock validation failure, spawn errors) — the real profile store is never polluted. The behavior and review CLIs share directory scanning (skipping .runs and node_modules); the behavior CLI validates case shapes and detects cross-file duplicate ids at load time, failing as early as possible.

License: MIT. The framework's own tests and release self-checks are carried by the repository CI and do not ship with the package.

有意识地管理

安装与管理

前置条件与目标 Profile

目标 dsh Profile

交付方式 仅文档 — https://github.com/CatheadOwl/dsh-eval/tree/4218d4c396870851c60a338a1472e7c22b3d3ebf

兼容性与访问范围

Requires a built deepseek-harness checkout and a dsh profile Not declared in supplied evidence

检查兼容性证据

风险事实

凭据

Real evaluation runs may use credentials resolved by dsh; mock and review dry runs do not require them.

证据
host-wiring

The peer dependency must be manually linked to the host checkout because npm may install an incompatible version.

证据
证据与编辑审查Manifest、Bundle patch、分发与新鲜度

不可变证据

审查状态与源码活动

AI 已审查

由于提供的快照没有包清单或 DSH Skill 定义,尽管 README 记录了 npm 安装命令,仍将其收录为源码资源。

AI 审查于 2026/9/14 UTC 14:25GitHub 事实核对日期: 2026/9/14 UTC 14:25

自当前证据基线以来,没有记录到重要源码变化。

下一步

比较生态 Artifact 类型

订阅重要变化: dsh-eval