DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Opencode Session Id — DeepSeek Harness 插件(DSH Plugin)
← Plugins
O

@gausszhou/dsh-opencode-session-id

Opencode Session Id

dsh 会话 ID,适用于 opencode,无需配置。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:gausszhou/dsh-opencode-session-id#ec4b9ca952e359b6b0120b35cc3b9de01ba3d668
README兼容性版本

兼容性与来源证明

Opencode Session Id 以 @gausszhou/dsh-opencode-session-id 发布,当前版本为 0.1.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/9/14

版本

0.1.1stable
2026/9/14
0.1.0stable
2026/9/12

相关插件

正在加载相关插件…

最新版
0.1.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 13
周下载
0
最近提交
2026/9/14
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

继续浏览 memory-context 分类下经过校验的插件。

Memory Plugin@openviking/dsh-memory-plugin适用于 DeepSeek Harness 的 OpenViking 记忆与上下文套件Weknora@wxg-prc-cpg/dsh-weknora适用于 DeepSeek Harness (dsh) 的 WeKnora 知识检索工具:通过自有知识库进行语义搜索、文档阅读以及 RAG/代理回答。Memsearch Dsh@zilliz/memsearch-dsh适用于 DeepSeek Harness 的 MemSearch 插件:在多个代理之间共享 Markdown 记忆,支持捕获、步骤前上下文注入、记忆召回技能和技能候选审核面板。Reme@agentscope-ai/reme面向 TypeScript 代理的 ReMe 客户端和记忆集成

README

dsh-opencode-session-id

dsh session IDs for opencode, zero config.

English | 简体中文

A DeepSeek Harness (dsh) plugin: when you use an opencode model (providers such as opencode / opencode-go that point at the opencode.ai gateway), it makes the actual outgoing HTTP requests carry a session id — the same way the opencode client itself does.

Usage

Add the plugin to a dsh profile (install by package name once published to npm):

dsh plugin --profile web add "@gausszhou/dsh-opencode-session-id"

After installing, restart dsh web (systemctl --user restart dsh-web) so the bundle takes effect. The default configuration works out of the box: requests to opencode.ai automatically get x-opencode-session (the session header used by the opencode gateway) plus x-session-affinity / x-client-request-id / x-session-id. The header value defaults to a pure-alphanumeric nanoid(8) derived from the uuid portion of the session id (e.g. 0RpJJnxJ — the session- prefix does not participate in the hash; the token is deterministically derived from the uuid via SHA-256). With verbose: true, the journal logs the mapping between the original id and the wire token:

journalctl --user -u dsh-web -f | grep opencode-session-id

How it works

The opencode gateway branch uses x-opencode-session to carry the session id; this plugin listens on the llm/stream scope, wraps fetch, and adds that header at the wire layer. By default it hashes the uuid portion of session-<uuid> (the session- prefix is excluded) into an alphanumeric nanoid(8) before it goes on the wire. Only request headers are touched — the request body, URL, method, and everything else pass through unchanged. See docs/design.md for the full design rationale.

Configuration

Zero configuration needed by default (the install command above is all you need). To enable injection logging through the patch layer:

- id: opencode-session-id
  config:
    verbose: true

All options (each optional, defaults shown):

KeyDefaultDescription
providers[opencode, opencode-go]llm-pi-ai route names whose sessionId should be tagged
hosts[opencode.ai]URL host suffixes (including subdomains) that get session headers
baseURLs[]Additional exact URL prefixes to match (custom gateways)
headers[x-opencode-session, x-session-affinity, x-client-request-id, x-session-id]Request header names to inject
extraHeaders{}Optional static extra headers (e.g. opencode fingerprint family x-opencode-client: native / x-opencode-request: dsh)
userAgentemptyOverride User-Agent (opencode itself sends opencode/<version>; untouched by default)
sessionIdEnvemptyEnvironment variable name to fall back on for the session id
verbosefalseLog every injection (including the original id → wire token mapping)
seedSessionIdfalseSeed options.sessionId for opencode routes
nanoidSessionIdtrueHash session-<uuid> to a nanoid(8) before sending; false sends the raw id
nanoidLength8Token length (4–32)
nanoidAlphabetalphanumericalphanumeric (pure A-Za-z0-9, no _/-) or urlsafe (classic 64-character set)
disableFetchInjectionfalseWhen true, keep only the waterfall session scoping

Verification

node test/verify.mjs   # 10 checks: unit tests + real pi-ai wire request + concurrent isolation + headers-only guarantee
node test/smoke-apply.mjs  # apply() wiring: listener registration, scoped fetch, mount/dispose lifecycle

verify.mjs fires a real opencode-go request through the pi-ai bundled with the dsh CLI, asserting that the wire request headers really carry the session id; it also verifies concurrent-session isolation and that non-opencode endpoints are unaffected.

Notes & limitations

  • The session id comes from options.sessionId (agent-loop fills it in per session); without a session context, the fallback chain is sessionIdEnv > DSH_SESSION_ID (the process's startup session in web deployments) > an in-process random id.
  • Covers protocols that go through fetch, such as openai-completions / openai-responses / anthropic-messages; transport: websocket does not use fetch and is out of scope.
  • The global fetch wrapper only appends request headers when an opencode endpoint is matched — nothing else is changed. The wire token is a one-way SHA-256 hash of the uuid portion of session-<uuid> (the session- prefix excluded, e.g. 0RpJJnxJ), so the backend cannot reverse it to the original id; changing nanoidAlphabet / nanoidLength changes every token, breaking association with old records.