alwith-dsh
其他 活跃维护

alwith-dsh

ALwith-ai/alwith-dsh

支持交互式ACP v2协议桥接,原生具备流式数据传输、运行状态实时上报与权限管控能力,配套ALwith Desktop参考客户端,可快速接入使用,获得流畅的交互体验。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
333 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:ALwith-ai/alwith-dsh
git clone https://github.com/ALwith-ai/alwith-dsh.git
git clone git@github.com:ALwith-ai/alwith-dsh.git
README.md main

alwith-dsh

English | 中文

An interactive ACP v2 bridge for DeepSeek Harness (dsh): exposes a dsh agent as a chat backend that desktop/editor clients can host — token-level streaming, run-state reporting (state_update), permission bridging, and cancellation. Ships as an out-of-tree plugin: no fork of dsh, dependencies pinned to exact npm versions.

Maintained by ALwith; ALwith Desktop is its reference client (the desktop form of dsh). Upstream's own ACP surface is deliberately automation-only (fresh sessions, committed output only); this bridge provides the interactive side.

Status: developer preview. Covers session/new + prompt + streaming + run-state reporting + cancel + session/resume (live-first reattach, cold resume from JSONL persistence, client-driven replayFrom history replay) + sandbox-first tools with escalation approvals + in-session model switching (session/set_config_option) + LLM session titles (deterministic first, one background generate upgrades) + all dsh presets (standard / minimal / anchored / code PTC on the Bun-patched official worker runtime / cordis creator with the vm-realm dynamic-plugin toolset and the bundled cordis-plugin-development skill) + host-facing plugins / sessions management CLIs + a multi-provider seat (ALWITH_DSH_PI_PROVIDERS: pi-ai catalog routes — openai / anthropic / google / xai / … — mounted beside the DeepSeek adapter).

Layout

File Responsibility
src/bridge.ts ACP v2 server plugin (adapted from upstream's automation-only v1 bridge, MIT)
src/codec.ts Pure wire-format translation (adapted from the upstream codec)
src/plugins.ts Plugin manifest: the composition as data (per-preset roster, core protection, overrides)
src/compose.ts Composes the runtime from the manifest (no dsh loader/profile — deterministic, runs on Bun)
src/plugins-cli.ts plugins subcommand: list and toggle plugins without a live session
src/sessions-cli.ts sessions subcommand: session-log inspection through dsh's own persistence
skills/ Skills bundled into presets (vendored from dsh's cordis preset, MIT)
src/main.ts stdio entry for hosts to spawn

Run

DEEPSEEK_API_KEY=… bun src/main.ts   # ACP v2 server over stdio
bun test                              # protocol tests with a mock adapter; no real model calls

session/resume semantics: an omitted replayFrom means context-only restore; { type: "start" } replays the whole conversation as session/update frames. Session logs live under $ALWITH_DSH_SESSIONS_ROOT (default ~/.alwith-dsh/sessions).

Plugins

The composition per preset is fixed here in code (deterministic), but users keep dsh's two degrees of freedom — per-plugin enable/disable and per-plugin config — through an overrides file ($ALWITH_DSH_PLUGINS_FILE, default ~/.alwith-dsh/plugins.json), read at spawn so changes apply to new sessions:

bun src/main.ts plugins list --preset standard   # every row of the preset, JSON
bun src/main.ts plugins set tool-web disabled    # validated before writing
{ "disabled": ["tool-web"], "config": { "bash-sandbox": { "timeoutMs": 120000 } } }

Core rows (session, llm, sandbox, approvals, …) cannot be disabled, and disabling a row another enabled row requires is rejected with the exact fix — both fail loud before anything is written. config entries shallow-merge over the row defaults.

License

MIT; portions adapted from upstream @deepseek-ai/dsh-acp are noted in THIRD_PARTY_NOTICES.md.