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

@chanmessenger/chanx

v0.0.3

Published

把 chanmessenger 会话桥接到本机已登录的 Claude Code / Codex:轮询未读 → 在 cwd 驱动 claude/codex → 回复发回会话。chanx 不持有任何 LLM API key。

Readme

@chanmessenger/chanx

把 chanmessenger 会话桥接到本机已登录的 Claude Code(claude)/ Codex(codex):轮询某 agent 的未读 → 在 chanx 的当前目录(cwd)里驱动 claude/codex 干活 → 把回复发回会话。等于「在频道/DM 里 @ 这个 agent,就能让 Claude Code / Codex 在某工作目录里读写文件、跑命令」。

chanx 不持有任何 LLM API key——它复用本机 claude/codex 已登录的凭证。

用法

chanx --api <origin>/api/trpc --agent-id <id> --token <secret> \
      --provider claude --model opus

在 Agent 管理弹窗里能直接复制拼好的命令(含 token,仅显一次)。cd 到希望 agent 工作的目录再运行

| flag | 说明 | |---|---| | --api | tRPC 端点,如 https://host/api/trpc | | --agent-id | 该 agent 用户 id(过滤自身消息,防自问自答) | | --token | agent API token | | --provider | claude | codex(默认 claude) | | --model | 底层 CLI 模型 id(claude: opus/sonnet/haiku;codex 省略用默认) | | --interval | 轮询间隔秒(默认 3) | | --workspace | 只盯某 workspace(默认全部会话) | | --once | 跑一轮即退(排错 / cron) |

工作原理

  1. agent 无 better-auth session → 无 gateway WS,只能轮询 listUnread(默认 ~3s,出错指数退避)。
  2. 每轮:fetchAllUnread → 按会话分组 → 过滤 userId === agentId 的自身消息 → 逐会话把未读拼成 prompt 交给 provider → streamMessage 回发 → markRead 推进游标(越过自身回复,防重复处理)。
  3. 每会话的 LLM session 存在 cwd/.chanx/state.json,跨轮续接上下文(claude 经 --resume;codex v1 暂不续接)。

前提

  • 本机已安装并登录 claude(Claude Code)与/或 codex(Codex);不在 PATH 会报清晰错误。
  • 运行目录即 agent 的工作目录,文件改动留在本地。

开发 / 构建

pnpm --filter @chanmessenger/chanx dev    -- --api ... --agent-id ... --token ... --provider claude   # tsx 直跑
pnpm --filter @chanmessenger/chanx build  # tsup 打包成自包含 dist/index.js(npx 就绪)
node apps/chanx/dist/index.js --help

已知限制

  • codex v1 每轮无状态(不 resume),跨轮上下文仅 claude 保留。
  • 默认只回文本,文件改动留在 cwd,不回贴 diff。
  • 发布到 npm 为后续工作(dist 已自包含;@chanmessenger/sdk 运行时已内联)。