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

@asteroida/dsh-codeg-adapter

v0.1.1

Published

Launch DeepSeek Harness (DSH) as an ACP agent for Codeg

Readme

dsh-codeg-adapter

Launch DeepSeek Harness (DSH) as an Agent Client Protocol (ACP) agent for Codeg.

DSH already ships a first-party ACP server (@deepseek-ai/dsh-acp) and a ready app (@deepseek-ai/dsh-acp-demo). This repo wraps them into one installable command (dsh-codeg) that:

  • pins the DSH rc line so npx doesn't grab the stale 'latest' tag,
  • injects DEEPSEEK_API_KEY from env / .env / ~/.dsh/.env,
  • points the app at a bundled cordis.yml by absolute path (Codeg launches the agent with cwd set to the project, so a relative config would never resolve).

Install

Requires Node.js >= 20.

npm install -g @asteroida/dsh-codeg-adapter
# or, once published: npx @asteroida/dsh-codeg-adapter

Set the key:

export DEEPSEEK_API_KEY=sk-...
# or: echo 'DEEPSEEK_API_KEY=sk-...' > ~/.dsh/.env

Register in Codeg

Install dsh-codeg first (global install puts it on PATH; Codeg's launch gate prefers a PATH-resolved command over the npx fallback):

npm install -g @asteroida/dsh-codeg-adapter

Then add it as a custom agent. Three equivalent ways:

  1. Form (simplest): Codeg -> Settings -> Custom Agent -> Add, choose the npx channel and fill in package @asteroida/[email protected], command dsh-codeg, args empty, Node >= 20.
  2. Paste JSON: paste the contents of codeg-paste.json (the stored CustomAgentDef shape).
  3. Registry (after publishing the adapter to the public ACP registry): pick dsh-acp from the catalog (see codeg-agent.json for the registry-entry shape).

In every case, turn off MCP forwarding for this agent (the supports_mcp toggle) — the current DSH ACP bridge rejects session/new.mcpServers and the connection fails otherwise.

Then pick the agent in a conversation and send a prompt. Verified end-to-end up to the LLM call: ACP protocol version is 1 on both sides (Codeg's ProtocolVersion::LATEST = V1, DSH's PROTOCOL_VERSION = 1), and initialize + session/new succeed over stdio.

What works today (automation-only)

  • initialize (version negotiation)
  • session/new (fresh session, per-session cwd)
  • session/prompt (one in-flight prompt per session) -> committed assistant/message text
  • per-session cancellation, concurrent sessions, teardown on disconnect
  • one-shot session/request_permission (allow-once / reject-once / cancel)

Known gaps (upstream design)

DSH's ACP bridge is deliberately automation-only:

  • no session/load / session/resume / session/fork (fresh sessions only; Codeg falls back to fresh sessions since these are not advertised)
  • session/new.mcpServers is rejected (hence the supports_mcp=false step)
  • only committed text is emitted (no tool traces / diffs / terminal on the ACP wire)
  • no commands / modes / model switching / plan review / human elicitation

The gap that matters most for Codeg is MCP. Since the DSH repo does not accept public merges today, the path is to fork @deepseek-ai/dsh-acp (MIT) in this repo and patch newSession to accept mcpServers and wire them into @deepseek-ai/dsh-mcp-client.

Development

npm install
npm run smoke   # boots the ACP server, sends initialize + session/new, prints results

The smoke test does not need a real key (only session/prompt calls the model); it sets a dummy DEEPSEEK_API_KEY so the wrapper's boot path runs unchanged.

边界与非目标(为什么是薄壳,而不是适配器)

本仓库不实现任何 ACP 能力——ACP 能力全部来自上游已发布的 @deepseek-ai/dsh-acp + @deepseek-ai/dsh-acp-demo。本仓库只做打包与启动:锁版本、声明 叶子插件依赖、内置 cordis.yml、绝对路径、key 注入、文档化 supports_mcp=false。

因此没有本仓库 codeg 也能调用 DSH:手动安装 dsh-acp-demo 及 11 个叶子插件、手写 cordis.yml、处理 cwd 与 key,再注册 dsh-acp-demo -c /abs/cordis.yml 即可。本仓库只是 把这串收成一条 npm install + 一次注册。

已知边界(DSH 上游 automation-only 设计,非本仓库可修)

  • 无 session/resume / load / fork:在 codeg 里「继续」一段 DSH 对话时,重连后 agent 全新启动、丢失上下文(codeg 只加 continues_from 链接,不重放历史)。同一连接内 的多轮不受影响。
  • 无 MCP 转发:必须在 codeg 里关掉 supports_mcp,否则 session/new 会被拒绝。
  • 仅提交文本:无 tool 轨迹 / diff / terminal 上 ACP 线。

三条路线的结论

  • A(本仓库,现状):已达成 codeg 一等公民集成,停止于此。codeg 里其他 agent 本身 就能力参差(OpenClaw 无 MCP、Pi 丢弃 MCP、多数无 steering),DSH 的边界是正常光谱。
  • B(vendor 桥补 resume / 富 update):不推荐。resume 收益窄(仅「重连不失忆」),且逆 上游设计方向、需长期维护 fork。若上游将来把 resume 加回 bridge,本仓库自动受益。
  • C(补 MCP):除非有明确刚需,否则不做。需 vendor dsh-acp + dsh-mcp-client (其 startConnection 不导出)+ 用 dsh-scope 做 session 级工具隔离,是一个独立工程。

平台支持

  • macOS / Linux:用 cordis.yml(bash 执行器)。
  • Windows:wrapper 按 process.platform 自动选 cordis.windows.yml(PowerShell 执行器 dsh-pwsh-sandbox;沙盒 seam 在 Windows 上自动解析到 ACL 受限令牌链)。

启动层(codeg 的 resolve_npx_command + node_required 版本检查 + npm 的 .cmd shim)三端一致, DSH 走 npx 分发,与 Claude/Codex/Gemini 相同。Windows 的 pwsh 组合尚未在真机验证, 需要的 pwsh 依赖(dsh-pwsh-sandbox / dsh-pwsh-local)已加入 package.json。