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

dsh-live-room

v0.1.1

Published

dsh 插件:把会话变成免鉴权、只读、可分享的实时直播间(SSE 观看页 + 弹幕)

Readme

dsh-live-room · 会话直播间

dsh(DeepSeek Harness)插件:把任意会话变成免登录、只读、可分享的实时观看页。观众在浏览器里实时围观 agent 干活(打字机式 token 流、工具调用状态、思考过程),可发轻量弹幕;主播端一键开播/停播,也支持让 agent 自己开播。

logo

功能

  • 设置页「直播间」面板:选择会话开播(可自定义标题与 TTL),房间卡片展示观众数、缓冲条数、过期时间,一键复制本机/局域网观看链接,随时停播
  • 观看页:自包含单文件页面(无外部依赖),SSE 实时推送 + 全量快照(断线自动重连),token 打字机、思考流(暗色折叠样式)、工具调用行(运行中/完成/出错)、轮次分隔;弹幕飞屏 + 快捷表情
  • agent 工具三件套:start_live_room / stop_live_room / list_live_rooms,会话里一句"帮我把这个任务直播给同事看"即可
  • 归一化协议:宿主 ~50 种会话事件 + 持久层 chunk-run 打包行统一归一为 6 种观看帧,未知事件降级为提示行,永不崩页

安装

dsh plugin --profile web add dsh-live-room

或从源码:pnpm build 后 dsh plugin --profile web add <本目录路径>。

安全模型(必读)

  • 观看链接免登录、凭链接即看:任何拿到链接的人(同一局域网)都能实时看到该会话的完整内容,请只发给可信观众
  • 房间密钥为 24 字节随机值(SHA-256 + timingSafeEqual 校验),停播/过期立即失效
  • 观看页构造上只读:不含任何会话写路径;弹幕仅在观看层广播,不会进入会话
  • 观看服务首房自动启动、末房自动停,最小暴露窗口;绑定了独立端口(默认 0.0.0.0:33210),可在插件配置里把 host 改为 127.0.0.1 收紧到本机
  • 直播间为内存态:dsh 重启后自动清空;Windows 首次监听会弹防火墙授权

配置项

| 键 | 默认 | 说明 | |---|---|---| | port | 33210 | 观看服务端口 | | host | 0.0.0.0 | 监听地址(改 127.0.0.1 仅本机可看) | | maxFrames | 2000 | 每房间环形缓冲上限(按事件数) | | snapshotMaxEvents | 500 | 建房时回填持久化历史的末尾事件数 | | defaultTtlHours | 8 | 房间默认存活时长 | | allowReactions | true | 是否开放弹幕 | | reactionCooldownMs | 2000 | 同 IP 两条弹幕最小间隔 |

架构

宿主进程内 dsh-live-room
├─ ctx.on('session/event', …, { global: true })   ← 数据源(post-commit 免轮询)
│    └─ RoomManager(环形缓冲 · seq 去重 · callId→工具名补全 · TTL)
├─ 独立观看服务 node:http(SSE:hello → snapshot → live/viewers/chat/ended)
├─ 管理 API /live-room/api(宿主主服务同源前缀,POST 双重防御)
├─ 设置页面板(settings.section 槽位 · order 62 · React 壳 + 原生 DOM)
└─ agent 工具三件套

开发

DSH_CHECKOUT=<dsh checkout 路径> npm run typecheck
DSH_CHECKOUT=<dsh checkout 路径> npm test
DSH_CHECKOUT=<dsh checkout 路径> npm run build
node scripts/verify-live-room.mjs --base http://127.0.0.1:3080 --token <启动 token>

License

BSD-3-Clause