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-x-opencode-session

v0.1.0

Published

DeepSeek Harness 插件:模型请求 URL 含 opencode.ai 时附加 x-opencode-session 请求头,值复用请求自带的会话 id(同一对话固定、重启/断网不变、不同对话不同)。

Readme

dsh-x-opencode-session

DeepSeek Harness 插件:当模型调用发往 URL 包含 opencode.ai 的服务(如 OpenCode Go / Zen 网关)时,自动为请求附加请求头 x-opencode-session。

作用

该请求头用于向服务端标识当前会话,值无需任何配置,插件会自动满足:

  • 同一对话内固定 —— 同一对话的所有模型请求携带同一个值;
  • 不同对话互不相同 —— 各对话之间互不干扰;
  • 断开网络或重启后不变 —— 值来自对话自身的持久标识,重启、续聊、断网重连后依然一致。

插件直接复用对话已有的会话标识,不维护任何额外 id、映射或状态,也不影响其他请求:只有发往 opencode.ai 的模型请求会被附加该头,其他提供方与旁路请求不受影响。

安装

从 npm 安装(推荐):

dsh plugin --profile web add dsh-x-opencode-session

锁定版本:

dsh plugin --profile web add [email protected]

也可以直接从 GitHub 安装:

dsh plugin --profile web add https://github.com/Coco-king/dsh-x-opencode-session.git#v0.1.0

或从 Gitee 安装(国内用户可用;代码由 GitHub 自动镜像同步到 Gitee):

dsh plugin --profile web add https://gitee.com/kkcoco/dsh-x-opencode-session.git#v0.1.0

从 git 安装时,将 #v0.1.0 换成当前发布版本的 tag 即可锁定版本。

重启 web 服务(或刷新页面 + HMR)后生效。卸载:

dsh plugin --profile web remove dsh-x-opencode-session

开发迭代:修改代码后重新执行 dsh plugin --profile web add <本仓库路径> 即可。

验证

  1. 用 opencode-go 提供方的模型发起对话并正常使用;
  2. 通过抓包或服务端日志确认请求带上了 x-opencode-session 头;
  3. 同一对话中多次请求值一致,另开一个新对话值不同,重启 web 后再发消息值仍与之前一致。

License

MIT