npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yuanyang749/dsh-model-pk

v0.1.3

Published

PK 2-10 models on the same prompt, files, and tools in DeepSeek Harness.

Readme

Model PK for DeepSeek Harness

Model PK 用来在 DeepSeek Harness 里做模型同题 PK:选 2 到 10 个已配置模型,只准备一次题目、图片和起始文件,各模型按同一套规则分开跑。过程可以同屏看,某一路挂了能单独重跑,结果互不覆盖。

插件不锁定 DSH 运行版本;安装后通过模型快照、会话新鲜度、沙箱隔离和原生 helper 等运行时能力探针判定是否可执行。V1 不做自动打分、自动排名或跨实验排行榜;谁更好由你自己看完再排。

V1 功能

  • 设置页 Model PK 入口打开全屏 UI:创建、Preflight、Experiment 详情、Attempt 历史、双栏原始输出对照、本地存储管理。
  • 单个 ACTIVE Experiment;实验内持久 FIFO 调度,默认并发 min(4, N)。
  • 文本、最多 10 张原始图片、最多 5 GiB / 200,000 文件的完整 Baseline 快照。
  • Stop、Stop All、Retry、Run Again、原子 Retry Failed。
  • 执行会话按 PK · 实验名 · 模型名 保留;实验页可按模型与 Attempt 返回 DeepSeek 会话查看完整执行过程。
  • 实验报告汇总状态、耗时、首次响应、请求数、输入/输出/缓存 Token、产物与重试次数;用户可拖拽设置人工质量顺序,并导出带实验名称和时间的 PNG 报告。
  • Host 崩溃后的 STARTING、执行未知窗口、FINALIZING 和 Seal 收敛。
  • 插件专属 SQLite(BEGIN IMMEDIATE、synchronous=FULL、CAS、partial unique indexes)。
  • Rust 平台原生 no-follow 文件边界(macOS openat/fstatat、Windows handle/reparse 检查)、内容寻址快照、fencing token、物理预分配双缓冲控制 slot。
  • macOS deny-default Seatbelt 或 Windows AppContainer;仅允许读写本次 Attempt workspace,使用独立 HOME/TEMP,允许出站联网,并以进程组 / Job Object 收敛整棵子进程树。
  • 自包含归档、不可变 Seal、Finder / Explorer 打开和 Durable Delete receipt。

V1 不包含自动评分、自动质量排名、Judge、Elo、跨实验排行榜、批量 Benchmark 或外部 Agent CLI。实验报告中的质量顺序完全由用户人工评定,仅保存在本机,不会自动选择“最佳模型”或改变实验结果。

兼容策略

  • DSH 运行时:不限定精确版本或 source commit
  • DSH 构建/测试基线:0.1.1-rc.2 / b150a551b8d465e31e418e1b2eaf5e79bbb7d28e
  • Node: ^22.19 || >=24
  • macOS: arm64 / x64 原生可选包
  • Windows: arm64 / x64 原生可选包

Windows 的运行数据根目录需位于支持 ACL 的本地卷;启动时的 Compatibility Gate 会实际验证 AppContainer 的 workspace 读写、出站联网、越界拒绝与孤儿进程清理,而不是仅按系统版本放行。

Adapter、图片 wire path、session 新鲜度、隔离、归档和控制容量均由启动时 Compatibility Gate 动态证明;DSH 版本和 commit 仅记录为诊断信息,不单独阻断 Start。

pi-ai 内置模型的 wire protocol、上下文与输出 token 能力来自锁定的 @earendil-works/[email protected] catalog;自定义 route 从脱敏 profile 解析。Preflight 诊断会展示这些能力、Serializer 依赖与最终 fingerprint,公共输出能力低于 8192 时直接阻断。

开发与验证

corepack enable
pnpm install
pnpm build:native
pnpm check

完整自动化检查同时覆盖 macOS 与 Windows:TypeScript strict typecheck、领域/SQLite/RPC/UI 测试、Rust helper 真实文件系统测试,以及 Seatbelt 或 AppContainer/Job Object hostile-orphan 隔离测试。Windows 开发机需要 Rust MSVC toolchain;pnpm build:native 会自动产出当前系统/架构的可选包。

从 npm 安装到 DSH Web Profile

dsh plugin --profile web add @yuanyang749/dsh-model-pk
dsh --profile web

包管理器会根据当前系统自动安装对应的 @yuanyang749/model-pk-native-* 原生包。当前支持 macOS arm64 / x64 和 Windows arm64 / x64。四个平台包由 release workflow 在对应 runner 上构建;推送 v* tag 会发布到 npm 并创建 GitHub Release。

本地开发版本可使用:

pnpm dsh:bootstrap -- --profile web
pnpm exec dsh --profile web

插件只增加:

  • Host RPC /model-pk 与 /model-pk-native,均为 loopback authority;
  • settings.section 的 Model PK 入口;
  • shell.overlay 的全屏产品界面。

它不会替换 DSH 的 conversation UI。

运行后的权威 Compatibility 报告位于:

$DSH_HOME/model-pk/v1/control/compatibility-report.json
$DSH_HOME/model-pk/v1/control/compatibility-report.md

查看并用非零退出码表达 BLOCKED:

pnpm compat

数据布局

$DSH_HOME/model-pk/v1/
├── control/
│   ├── control.sqlite
│   ├── capacity/slot-*.journal
│   └── compatibility-report.{json,md}
├── drafts/
├── experiments/YYYY-MM-DD/<experiment-id>-<slug>/
├── runtime/<experiment-id>/<attempt-id>/
└── trash/

macOS 使用目录 0700、文件 0600;Windows 使用用户 ACL 与 Attempt 专属 AppContainer ACL。Experiment 永久保留,只能在 SETTLED 且没有进行中 Action 时手动删除。

关键实现入口

  • Host 生命周期:src/host/runtime.ts
  • RPC 边界:src/host/rpc-router.ts
  • 调度与恢复:src/host/scheduler.ts
  • SQLite 控制面:src/storage/store.ts
  • 固定 Harness:src/host/harness.ts
  • 原生 helper:native/model-pk-helper/src/{unix,windows}.rs
  • 正式 UI:src/client/App.tsx
  • 兼容与发布证据:docs/COMPATIBILITY_REPORT.md

许可证

MIT