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-bridge-connector

v0.7.4

Published

Loopback bridge that lets an Obsidian plugin drive DSH sessions and inject vault notes into the system prompt.

Readme

dsh-bridge-connector

Bridge 是一个插件的两头:一头插 Obsidian,一头插 DSH。

| 这一头 | 那一头 | |---|---| | 本包(packages/dsh-bridge-connector):跑在 DSH 进程里的插件,在 127.0.0.1:8812 起回环 HTTP/SSE 服务 | obsidian-bridge(同一个仓库的另一个包):跑在 Obsidian 进程里的插件,把命令/编辑器/工作区/库读写暴露成本机 HTTP(8811) |

两头都装才完整——只装一头没有对端。它让 Obsidian 面板能

  • 列出会话、向某个会话发消息、新建会话
  • 把库内笔记(最多 10 篇)挂进 DSH 的系统提示词段 bridge:context,每轮重新组装、不进对话历史
  • 读/切「注入」开关

它不是 Obsidian 本人:笔记的读写由 Bridge 插件(Obsidian 内部,8811)完成,这个连接器只负责跟 DSH 对话。

两个包在同一个仓库里(Charliewhale/bridge),一头一个:本包装进 DSH,obsidian-bridge 装进 Obsidian。只装这个连接器没有可对话的对端。

安装

市场里点安装即可。手动装:

dsh plugin --profile web add https://github.com/Charliewhale/bridge/releases/latest/download/dsh-bridge-connector.tgz

没有发布到 npm(npm 现在要求发布时提供 2FA 验证码),所以走 GitHub Release 的预构建 tarball,安装时不需要构建。

装完重启 DSH。服务与 token 信息写在 ~/.dsh-bridge/connector.json。

端点

除 /health 外都要 x-bridge-token(或 Bearer)。

| 方法 | 路径 | 作用 | |---|---|---| | GET | /health | 服务身份、订阅数、注入开关 | | GET | /sessions | 会话清单 | | GET | /session?sessionId= | 单个会话详情 | | POST | /task | 向会话发一条消息 | | POST | /session | 新建会话 | | GET/POST | /config | 读/写注入开关 | | GET | /inject | 当前注入列表 | | POST | /inject | 注入一篇(≤512KB,最多 10 篇,同标题覆盖) | | POST | /inject/clear | 清一篇(带 id)或全部 | | GET | /events | SSE 事件流 |

配置

| 键 | 默认 | 说明 | |---|---:|---| | port | 8812 | 端口被占时自动向后找 5 个 | | host | 127.0.0.1 | 只允许回环 | | injection | false | 首次启动的默认值;之后以 ~/.dsh-bridge/state.json 为准 | | injectionTtlMs | 0 | 注入过期时间,0 = 永不过期(只能手动清) |

行为说明

  • 注入写进系统提示词段(order 250),下一轮生效,不写入对话历史
  • 段是进程级的,所有会话共享(包括 QQ 那条线)
  • 注入开关会落盘(~/.dsh-bridge/state.json),DSH 重启后保持上次状态
  • 注入内容也会落盘(~/.dsh-bridge/injections.json):DSH 重启后自动读回,不用重新注。要清就手动删单篇或全部清
    • 注意:内容活过 DSH 重启,但不会自动过期——想让它只在一段时间内生效,把 injectionTtlMs 设成正数(毫秒)
  • 注入内容有 512KB/篇 的预算:它在系统提示词里,每轮都要重发

测试

npm test

License

MIT