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

pipilot-desktop-relay

v0.1.0

Published

Read-only session relay and fenced remote-control adapter for PiPilot

Readme

PiPilot Desktop Relay

这是 PiPilot Source Hub 的桌面 TUI 适配器。它将当前 pi TUI 已加载的会话快照和实时事件发送到本机 bridge,并接受经过 owner lease 与 fencing token 校验的少量远程命令。

安全边界

  • 只在 pi 的 tui 模式启动;不会在 rpc、print 或 json 模式注册。
  • 快照只调用 ReadonlySessionManager 的读取 API,不写会话文件。
  • 远程命令白名单只有 prompt、abort、set_model、set_thinking_level。
  • 不支持任意 shell、文件路径、slash command、会话切换、fork、reload 或第三方扩展弹窗。
  • bridge 注册连接仅允许 loopback,并使用独立于手机 token 的 desktop token。
  • 每次 session start/reload/new/resume/fork 都生成新 epoch;旧 runtime、旧 epoch 和旧 fence 会被拒绝。

安装

在项目根目录执行:

cd bridge
npm run install:extension

安装器会:

  1. 备份 ~/.pi/agent/settings.json。
  2. 在 bridge/config.json 生成并保存 desktop token。
  3. 写入权限为 0600 的 ~/.pi/agent/pipilot-sync.json。
  4. 用 pi install <本地 extension 目录> 注册此 package。

安装不会打开或修改 ~/.pi/agent/sessions 下的任何 JSONL。安装后,在需要同步的桌面 pi TUI 中执行 /reload;其他窗口不会自动成为当前 source。

配置

默认配置文件:~/.pi/agent/pipilot-sync.json

{
  "url": "ws://127.0.0.1:9377/desktop",
  "token": "独立 desktop token"
}

也可使用环境变量覆盖:

  • PIPILOT_HUB_URL
  • PIPILOT_DESKTOP_TOKEN
  • PIPILOT_DESKTOP_LABEL

relay 强制使用 loopback 主机。手机仍通过 bridge 的 LAN/Tailscale 地址连接。

开发验证

npm run typecheck
npm test

测试使用 fake context 与临时 loopback WebSocket,不创建或打开真实 session。