dsh-api
by kelemiao
DeepSeek Harness本地HTTP API:通过官方ApiProxy路由让其他代理控制DSH会话。
Local HTTP API for DeepSeek Harness: let other agents control DSH sessions through official ApiProxy routes.
安装
dsh plugin --profile web add github:kelemiao/dsh-apiGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
Local HTTP API for DeepSeek Harness (DSH). Other AI agents use it to control DSH through plain HTTP instead of the GUI.
Milestone one covers session control: list and create sessions, read history,
send prompts, stream replies, and cancel turns. Everything else remains
available through the raw /api/* passthrough.
Install
Install the plugin into a DSH web profile:
dsh plugin --profile web add link:C:/path/to/dsh-api
The package declares dsh.bundle.patch, so dsh plugin registers it in the
profile's dsh.profile.bundles automatically. No manual cordis patch is
needed. Once published, install from the registry with
dsh plugin --profile web add @kelemiao/dsh-api.
Settings live in the GUI Settings page under dsh-api and apply immediately.
Settings
| Field | Type | Default | Notes |
|---|---|---|---|
| enabled | bool | true | server on/off |
| port | int | 4777 | 1-65535, loopback only |
| token | secret | generated on first run | fixed bearer token |
Endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /health |
Public health check. |
| GET | /api/sessions |
List sessions: { items: SessionSummary[] }. |
| POST | /api/sessions |
Create session; body { cwd?, workspaceId?, agentPreset? }. |
| GET | /api/sessions/:id/history |
Read history; query beforeSeq?, maxMessages?. |
| POST | /api/sessions/:id/prompt |
Send prompt; body { content, mode? }. |
| POST | /api/sessions/:id/cancel |
Cancel the running turn. |
| GET | /api/sessions/:id/stream |
SSE stream filtered to this session. |
| POST | /api/* |
Raw official ApiProxy JSON RPC passthrough. |
| GET | /api/events.mux |
Raw official aggregated SSE stream. |
Convenience routes win over the passthrough; any other request whose path
starts with /api/ is forwarded verbatim to the official ApiProxy transport.
Authentication
All routes except /health require Authorization: Bearer <token>. The
server binds 127.0.0.1 only. Missing or wrong tokens get 401.
SSE
curl -N -H "Authorization: Bearer $DSH_API_TOKEN" \
http://127.0.0.1:4777/api/sessions/<sessionId>/stream
Frames are official MuxFrame objects, filtered by session id. A prompt whose
single text block starts with / runs as a slash command, like the GUI.
Smoke test
With the plugin enabled in a running DSH:
DSH_API_TOKEN=<token> node scripts/smoke.mjs
DSH_API_URL defaults to http://127.0.0.1:4777.
Scope
Out of milestone one: ergonomic wrappers for approvals, subagents, goals, jobs, settings, credentials, and workspace mutation; TLS; remote bind; multi-user tokens.
原始 README: https://github.com/kelemiao/dsh-api/blob/main/README.md ↗
同类插件
查看全部 →
archify
Agent 技能:生成美观、可校验的架构图、工作流图、时序图、数据流图与生命周期图——自包含 HTML、带动画与清晰导出

dsh-turn-rewind
对话回退:基于持久 Change Ledger 回滚会话与工作区状态。

dsh-plugin-cc
把 DeepSeek Harness 接入 Claude Code:评审、批评、委派与会话导入

dsh-interconnect
跨实例互联:经 interconnect 服务在多个 DSH 实例间转发消息与事件。

dsh-chat-import
把 13 家 coding agent(Claude Code、Codex、ChatGPT、Cursor、Gemini、opencode 等)的完整对话历史导入为可续聊的 DeepSeek Harness 会话,并支持反向导出回 Claude Code。

dsh-crew
DSH 插件:从 Claude Code / Codex 向 DSH agent 派活——原生 subagent 进度、宿主内 worker 会话(分级预设),以及为纯文本宿主补上视觉与图像生成的多模态桥