Birfy/dsh-jiuwen-adapter ↗★ 1

@dsh-jiuwen/adapter

JiuwenSwarm as a dsh (DeepSeek Harness) LLM provider: route any dsh agent to a Jiuwen agent/swarm over the Gateway, with /jiuwen commands. Zero dependencies, compatibility-first.

包名
@dsh-jiuwen/adapter
兼容性
待验证
Harness 依赖范围
>=0.2.1-rc.2 <0.3.0
Cordis 依赖范围
^4.0.5
版本
0.2.0
许可证
Apache-2.0
最近更新
2026年10月31日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Birfy/dsh-jiuwen-adapter

dsh-jiuwen-adapter

Use JiuwenSwarm as the brain of dsh, with your other dsh plugins still working.

CI

version

dsh range

license

中文 · Quickstart · Config · dsh integration · Changelog


A Cordis plugin that registers a jiuwen provider on ctx.llm. dsh still handles the UI, sessions, approvals and plugins. Each turn goes to the JiuwenSwarm Gateway, which runs its own agents, tools and memory.

flowchart LR
  D["dsh + your plugins"] -->|ctx.llm · provider=jiuwen| A["jiuwen adapter"] -->|"WS chat.send"| G["JiuwenSwarm Gateway :19000"]

30-second quickstart

# 1. Brain: start JiuwenSwarm (put your model key in ~/.jiuwenswarm/config/.env)
uv pip install workswarm && jiuwenswarm-init && jiuwenswarm-start app

# 2. Plugin: install into a dsh profile (dsh >= 0.2.1-rc.2: npm i -g @deepseek-ai/dsh@next)
dsh plugin --profile web add "git+https://github.com/Birfy/dsh-jiuwen-adapter.git"

# 3. Make it the default model, then chat
printf -- '- id: agent-default-model\n  config:\n    provider: jiuwen\n    model: jiuwen-default\n' >> ~/.dsh/profiles/web/cordis.patch.yml
dsh --profile web

Step-by-step guide for Mac and Linux: docs/quickstart.md. To try it without a Gateway, run npm run mock:gateway.

Features

What you getDefault
🧠 Jiuwen brainOne dsh turn is one Gateway chat.send. Agents, team mode, skills and memory run in Jiuwenon
💬 Live activityReasoning, 🔧 tool calls, subtasks and token usage stream into dshon
✅ dsh approvals and questionsJiuwen permission prompts, plan approval and ask_user go through dsh's own dialogs, and deny when no answer comeson
🔁 Session continuitydsh sessions map to Jiuwen sessions. Only new text is sent after the first turnon
🛟 Drop recoveryIf the Gateway drops mid-answer, the reply is recovered from history and marked as recoveredon
🧾 Local titles and compactionTitles and /compact are handled locally, so they never cost a Jiuwen turnon
⌨️ /jiuwen commandSessions, models, modes, skills, agents, cron, MCP and more (list)on
🖼️ MultimodalImage and file parts are sent as Jiuwen mediaon
🪪 System prompt → JiuweninjectSystem: persona|full sends the host persona (or whole system prompt) once per Jiuwen session, resent only on changedefault persona (off to disable)
🪜 Full trajectorytrajectoryDetail: full renders Jiuwen tool calls, results, subtasks and plan steps as Markdown steps in the reasoning blockdefault full (summary to disable)
🔌 dsh tools → JiuwenAllowlisted dsh tools exposed to Jiuwen over MCP, each call gated by an approvalopt-in
🧭 BridgesModel discovery, session sync, plan bridge, typed eventsopt-in
🩺 Config validationUnknown keys get a "did you mean" hint and deprecated keys get a warning. Never throwson

Compatibility

Other dsh plugins must keep working. The adapter is tested against the full dsh agent runtime (dsh-agent, dsh-agent-loop, compaction, subagents, goals, plan mode, a bash sandbox, approvals and user-questions). The same scripted session runs once with jiuwen loaded and once without. Every row of the compat matrix must match, covering events, tool calls, plan exit, goal rounds, auto-compaction, subagents, bash, host event counts, globals and load failures.

ComponentSupportedTested in CI
dsh>=0.2.1-rc.2 =2222, 24
JiuwenSwarm0.2.x Gateway0.2.7 (live)

The adapter also works in any Cordis app that has an llm service (usage).

Docs

Development

npm test                      # unit, mock-gateway and runtime suites
npm run compat -- --diff      # with vs. without jiuwen compat matrix (needs DSH_NM=)
npm run market:index          # regenerate market/index.json

Licensed under Apache-2.0.