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

@piex-dev/dap

v0.1.1

Published

DAP (Debug Adapter Protocol) extension for pi — debug programs directly from your coding agent

Readme

dap

DAP(Debug Adapter Protocol)调试扩展,注册 debug 工具。

功能

  • debug 工具: 完整的 DAP 协议客户端
  • 14 个 debug adapter: gdb, lldb-dap, codelldb, debugpy (Python), dlv (Go), js-debug-adapter (JS/TS), netcoredbg (C#), kotlin-debug-adapter, rdbg (Ruby), php-debug-adapter, bash-debug-adapter, dart-debug-adapter, flutter-debug-adapter, elixir-ls-debugger
  • 会话管理: launch/attach/terminate
  • 断点: 文件断点、函数断点、指令断点、数据断点
  • 执行控制: continue/step_over/step_in/step_out/pause
  • 状态检查: stack_trace/threads/scopes/variables/evaluate
  • 内存操作: read_memory/write_memory/disassemble
  • 自动适配器选择: 根据文件扩展名 + 项目标记自动选择

架构

dap.ts                         # pi 扩展入口
├── client.ts                  # DapClient — JSON-RPC over DAP
├── session.ts                 # DapSessionManager — 会话管理
├── config.ts                  # 适配器配置 + 发现
├── types.ts                   # 完整 DAP 类型 (~370 行)
├── defaults.json              # 14 个适配器默认配置
├── non-interactive-env.ts     # 非交互环境变量
└── utils.ts                   # 工具函数

支持的 action

launch, attach, terminate, sessions, output
set_breakpoint, remove_breakpoint
continue, step_over, step_in, step_out, pause
- `Node.js 移植仅支持 stdio transport,不支持 TCP/WebSocket 远程调试`
evaluate, stack_trace, threads, scopes, variables
disassemble, read_memory, write_memory
modules, loaded_sources, custom_request

Node.js 移植说明

从 omp(Bun)移植到 Node.js 的主要变更:

| Bun API | Node.js 替代 | |---------|-------------| | Bun.spawn() | child_process.spawn() | | Bun.sleep(ms) | new Promise(r => setTimeout(r, ms)) | | Bun.env | process.env |

安装

pi install npm:@piex-dev/dap

前提条件

需要安装对应的 debug adapter:

pip install debugpy        # Python
brew install llvm           # lldb-dap
go install github.com/go-delve/delve/cmd/dlv@latest  # Go

来源

与 omp 实现差异

| omp | dap | |-----|---------| | 双传输层(stdio + TCP) | 仅 stdio(不支持 TCP/WebSocket 远程调试) | | 数据断点、指令断点、异常断点 | 未实现(需手动补全) | | completions、exceptionInfo | 未实现(session 层已支持,工具未暴露) | | TUI inline rendering | 纯文本输出 |

功能特性来自 oh-my-pipackages/coding-agent/src/dap