nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:sw503544488/dsh-opencode-go-session
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
OpenCode's Console gateway asks every client to send one stable session id per conversation in the x-opencode-session header, so the gateway can route that conversation consistently and reuse its prompt cache. A hardcoded value makes every conversation look like the same one; no value means no affinity at all.
This DeepSeek Harness plugin makes the value dynamic: every inference call over the pi-ai adapter sends the DSH session id of the conversation that made it. One conversation keeps one value for its whole life, a new conversation gets a new one, and each subagent speaks for its own session.
It has no interface of its own: enabling the plugin is the whole setup.
llm-pi-ai/request-headers waterfall and sets the header on each call that carries a DSH session id.*.opencode.ai); one config field widens it to every pi-ai provider.x-opencode-session left in the provider's headers, so a profile can keep that line while this plugin overrides it per conversation.The plugin adds one row, opencode-go-session. No configuration is required. It is published on npm as dsh-opencode-go-session.
Change the row's config in cordis.patch.yml (the loader restarts the plugin when it changes):
| Key | Default | Meaning |
|---|---|---|
headerName |
x-opencode-session |
Header that carries the conversation id. |
endpoints |
opencode |
opencode sends it only to *.opencode.ai; all sends it to every pi-ai provider route. |
fallbackValue |
(empty) | Value for calls with no DSH session id, such as a helper request from outside a conversation. Empty omits the header on those calls. |
- id: opencode-go-session
name: 'dsh-opencode-go-session'
config:
endpoints: opencode
The plugin reports what it sent on a read-only endpoint of the Host:
curl http://127.0.0.1:3080/plugins/opencode-go-session/api/status
{
"ok": true,
"value": {
"version": "0.1.1",
"headerName": "x-opencode-session",
"endpoints": "opencode",
"fallbackValue": "",
"stats": { "requests": 34, "injected": 34, "errors": 0, "lastAt": "2026-11-16T13:35:17.549Z", "lastError": null },
"sessions": [
{ "sessionId": "session-b53b6603-…", "provider": "opencode-deepseek-v4-1-flash", "model": "deepseek-v4.1-flash", "count": 34, "firstAt": "…", "lastAt": "…" }
]
}
}
A conversation appears the first time it reaches an OpenCode endpoint after the plugin loads. requests counts every pi-ai call the plugin saw, injected the ones that received the header.
@deepseek-ai/dsh-llm-pi-ai are covered, which is where OpenCode providers are configured. A provider on another adapter (for example @deepseek-ai/dsh-llm-deepseek) receives nothing from this plugin.Needs a Harness release that emits llm-pi-ai/request-headers (verified on 0.2.2-rc.3). On older releases the plugin loads and the status endpoint reports that nothing has been sent.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: prompt-cache。