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

ding-engine

v0.1.0

Published

Ding Harness 的完整能力面:引擎 + SQLite 存储 + 工具执行体 + 凭据库 + 插件(Node 侧)

Readme

ding-engine

Ding Harness 的完整能力面(Node 侧):ding-engine-core + 那些要 IO 的部件 —— SQLite 存储、工具执行体、凭据库、插件装载、以及把这一整套接起来的装配。

产品和这个包用的是同一份代码(hosts/cli/assembly.ts): 不是"再实现一遍给外面用",所以"文档上能跑"与"产品里能跑"不会漂。

用法(10 分钟那条路)

const { buildEngine } = require("ding-engine");

// ① 工作目录(工具能碰的范围)+ 数据目录(会话记录放哪)
const built = await buildEngine([process.cwd()], ".ding-data");

try {
  // ② 跑一轮:真实工具、真实落盘、事件边跑边出
  const result = await built.engine.run({
    sessionId: "task-demo",
    provider: "strata",              // 需要先配好密钥(见下)
    model: "deepseek-flash",
    messages: [{ role: "user", content: "看一下这个项目有什么文件" }],
    mode: "按需确认",                 // 写操作会拦下来等确认
    useTools: true,
    maxSteps: 8,
    onEvent: (event) => console.log(event.type, event.type === "text" ? event.text : ""),
  });
  console.log("跑完了吗:", result.ok, "记录条数:", result.records.length);
} finally {
  built.close();                     // 关掉会话库
}

密钥从哪来

resolveSecret(keyRef) 按这个优先级找:环境变量 → ~/.dsh/.credentials.yaml → 桌面加密库。 最少只要给环境变量:

STRATA_BASE_URL=http://127.0.0.1:8080/v1   # 本地服务
STRATA_API_KEY=sk-...                      # 或 DEEPSEEK_API_KEY 等,见 providers 表

公开面

packages/engine/src/index.ts 是唯一的落脚点(API 冻结清单指着它)。 里面分七组:引擎 / 装配 / 存储 / 工具执行体 / 凭据与插件 / provider 目录 / 档位词表。

边界(如实说)

  • 产物是 CommonJS(与主仓 CLI 同一条构建路);import 与 require 都能用。
  • 这个包里没有 UI、没有 MCP 连接器宿主、没有画布 —— 那些属于桌面/CLI 宿主。
  • 版本口径见主仓 RELEASE.md(破坏性变更要 ADR + major + 迁移指南)。