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

@master0071/dsh-autoresearch

v0.1.6

Published

Autonomous experiment loop for DeepSeek Harness: try an idea, benchmark it, keep improvements, revert regressions, repeat. init/run/log experiment tools over an append-only .auto/log.jsonl with auto-commit retention. Port of pi-autoresearch (karpathy/auto

Readme

dsh-autoresearch

自主实验循环:试一个想法 → 测量 → 留下改进、回退回归 → 重复。适用于任何可量化指标的优化目标(测试耗时、bundle 体积、构建时间、Lighthouse 分数)。移植自 pi-autoresearch(Pi 生态 7825★,源自 karpathy/autoresearch)。

状态:v0.1.5 已发布(npm:@master0071/dsh-autoresearch,本机 npm publish 发布;另见 CHANGELOG)。注意:无作用域包名 dsh-autoresearch 已被其他作者占用,故改用作用域包名;仓库不包含发布 workflow(GitHub Actions 仅保留 CI 质量门禁),发布流程见 docs/DEVELOPMENT.md。工具面与终端仪表盘已完备;Web 仪表盘与外层循环驱动器见 §里程碑。

为什么做

  • DSH Get 查重(2026-08-24 快照,3496 个插件):experiment loop、benchmark optimization 均 0 命中,autoresearch 仅 1 个无关技能包——完全空白。
  • Pi 侧 7825 星验证了需求;DSH 侧积木齐全(tool-ralph、jobs、goal、subprocess),缺的只是产品封装。

设计

持久状态在 <workspace>/.auto/:prompt.md(本次优化会话的章程:目标、指标、方向)+ log.jsonl(只追加的实验史,永不改写)。

单 dispatch 工具 autoresearch,支持五个动作:

| action | 做什么 | |---|---| | init | 写会话章程:名称、指标、单位、方向(越大越好/越小越好);生成含协议规则的结构化章程模板(0.1.3) | | run | 执行任意命令,计 wall-clock,留有界输出(支持配置 shell) | | log | 记录结果,自动提交 .auto 留存,判定 keep/revert(支持 autoRevert) | | status | 汇报 best/worst/趋势(支持 format: 'trend' / 'table' / 'full' 渲染终端报表) | | revert | 显式一键回退工作区改动至基线(排除 .auto/) |

关键取舍:

  • 留优回退靠 git:每条实验自动 commit .auto,改进保留、回归支持通过 autoRevert: true 或 action: revert 自动恢复工作区代码——审计链完整,不发明自己的存储。

  • 单工具 + action 分发:五个动词一个工具,控制每请求 schema 预算。

  • 实验命令走 ctx.subprocess,支持指定 shell(pwsh/cmd/bash 等),共享沙箱策略,不自建执行器。

  • 动态上下文注入(0.1.3):宿主提供 systemPrompt 服务时,自动向模型上下文挂载 autoresearch:status 状态快照(轮数/最优值),模型无需显式调 status 即可感知进度。

  • 外层循环可选骑 tool-ralph(DSH 官方的认知循环工具),本插件只管实验记录与留存——关注点分离。

配置

见 cordis.patch.yml,字段与默认值与 src/index.ts 的 Config 一一对应。

里程碑

  • M1 log 核心 ✅(0.1.0):log.jsonl 追加器 + best/worst 追踪 + commit 留存路径。
  • M2 run ✅(0.1.0):subprocess 执行 + 计时 + 有界输出留存 + 超时(0.1.2 起支持配置 shell)。
  • M3 工具注册 ✅(0.1.0):单 dispatch 工具全动作接线(init/run/log/status/revert)。
  • M4 循环与面板 ◐:终端 ASCII 趋势图与报表 ✅(0.1.3,status format: 'trend'/'table'/'full');/autoresearch 循环命令、ralph 挂载与 Web 仪表盘待实施。

每步先 npm run typecheck,行为验收走真实 dsh --patch 会话。

运行数据与审计

控制面事件写入 JSONL 台账(默认 ~/.dsh-autoresearch/traces.jsonl,tracePath 可配,超限自动轮转到 .1);实验数据本体在 <workspace>/.auto/log.jsonl(append-only,永不改写):

| 文件 | 内容 | | --- | --- | | ~/.dsh-autoresearch/traces.jsonl | init / run / experiment-logged / auto-commit-failed / auto-reverted / auto-revert-failed / workspace-reverted / revert-failed / error 控制面事件 | | <workspace>/.auto/log.jsonl | 实验记录(index/idea/command/value/unit/kept/timestamp) | | <workspace>/.auto/prompt.md | 优化会话章程 |

最小收集原则:run 命令只保留前 120 字符,输出内容不入台账。查看:Get-Content ~/.dsh-autoresearch/traces.jsonl。

FAQ

  • auto-commit 会提交我的其他改动吗? 不会(0.1.0 起):只 git add -- .auto 再 commit,工作区其他已跟踪改动不受影响。
  • 运行超时了怎么办? run 按 experimentTimeoutMs(默认 10 分钟)强制终止并标注 (timed out),随后可 log 记录超时结果或重试。
  • 实验日志会不会损坏? log.jsonl 只追加;init 幂等(已有日志时拒绝重复初始化),防止方向混杂;单行损坏会被自动跳过并告警,不影响后续 status/log(0.1.2)。
  • Windows 上命令用什么 shell 执行? 默认 cmd /c(非 Windows 为 sh -c);可通过配置 shell 指定 pwsh / bash 等,调用参数自动补齐(0.1.2)。
  • 如何参与开发/发布? 见 docs/DEVELOPMENT.md 与 CHANGELOG.md。

参考