Web UI
产品入口是 dsh CLI(@deepseek-ai/dsh)。npx @deepseek-ai/dsh web(= dsh --profile web)启动本地 server + browser client 双半结构(默认 http://127.0.0.1:3080):packages/host(API gateway + HTTP route server)+ packages/client(browser shell、ui-* plugins);apps/web 只是 Vite build 入口(React 18 + Vite 6),产物由 dsh web 静态托管。
使用流程:
- Settings → Models 填 DeepSeek API key(保存后立即生效,无需重启)。
- Choose workspace(
dsh进程以调用目录为默认 filesystem 位置;未选中 workspace 时 session composer 不可用)。 - 开始 session 发任务。agent 可读写 workspace 文件、跑命令、delegate、维护 plan;需审批的操作按 permission policy 弹窗(见 security-sandbox)。
另有 headless 一次性模式:dsh --profile headless "task"(无 server、无端口、只打印最终回答)。
Provider 配置
配置入口 Settings → Models;模型变更下一次请求即生效。Keys are write-only:页面只拿 redacted descriptor,密钥存 $DSH_HOME/.credentials.yaml,settings 只存 credential reference(见 security-sandbox)。三类 provider:
- DeepSeek:单 API-key 字段。
- Catalog provider:内置目录(Anthropic、OpenAI 等),目录自带 endpoint/protocol/model list。原生认证 provider 不能用 API key 配置:Bedrock = AWS credentials + region、Vertex = ADC project、Azure =
api-version、Codex = OAuth。 - Custom provider:企业网关/自建服务器;需填 Provider ID(小写、永久不可改)、base URL、API protocol、credential、至少一个 model。支持 Fetch available models(OpenAI-compatible
GET /models;Azure/Codex 排除在 discovery 外)。
Image input 规则:手填 model 默认 text-only;vision model 需在 $DSH_HOME/settings.yaml 给模型加 input: [text, image],或用 route 级 defaultInput fallback;catalog provider 用 modelOverrides 收窄。声明只是 claim 不做端点验证。故障排查关键词:MISSING_CREDENTIAL、UNKNOWN_MODEL、fetch 401、图片 pre-send 拒绝。
CLI 命令
apps/cli/src 只有 6 个文件(bin/args/profile-boot/plugin/dump-config/process-shutdown)——launcher 极薄,一切能力来自插件树:
| 命令 | 用途 |
|---|---|
dsh --profile <name> | 启动 $DSH_HOME/profiles/<name> |
dsh --profile headless "job" | 一次性任务:新 persisted session,打印最终答案后退出(completed 退 0 否则 1) |
dsh web | --profile web 别名;--host/--port/--trusted-host(可重复) |
dsh plugin --profile <name> <pnpm args> | 转发 pnpm 管理 profile 的 out-of-tree 插件 |
dsh --dump-config / --dump-default-config | 不 boot 查看合成插件树 |
Launcher flags 在前,第一个不认识的 token 之后全部交给被启动的 app(经 dsh-cmdline 共享不可变快照)。web/headless profile 首次使用自动从 shipped template 初始化。Profile/bundle 机制见 architecture。
Python SDK:把 dsh 当 subprocess 驱动
不是 benchmark/embedding SDK,而是 agent SDK——client 与 bundled runtime 之间走 stdio 上的 newline-delimited JSON-RPC(基于 dsh-sdk-jsonrpc-server)。
deepseek-harness-sdk(python/sdk,importdeepseek_harness):高层 turns API——DeepSeekHarnesscontext manager,harness.run(prompt, session_id=...)返回final_response;另有低层 JSON-RPC client。deepseek-harness-runtime-bin(python/sdk-runtime):bundled runtime binaries 载体 + 默认 agent 配置。装 SDK 自动装同版本 runtime wheel,运行时不需要系统 Node.js。两种 carrier:exe(production,唯一进 wheel)——单文件 Node 可执行(macOS 附 node-pty spawn helper);node(dev-only)——需系统 Node ≥22.19,DSH_RUNTIME_MODE=node显式选择,绝不自动选中。- sdk vs runtime 的区别:client 选 channel 并提供默认配置;runtime 本身永远要求显式配置(
DSH_CORDIS_CONFIG或 argv config path,缺失 fail loud)。 - 零配置路径:SDK 默认注入 runtime 里 checked-in 的
runtime/cordis.yml(JSON-RPC server + agent core + 预载 DeepSeek adapter + JSONL persistence + semantic checkpoint + local bash + 受限 workspace-instruction)。凭证走DEEPSEEK_API_KEY/DEEPSEEK_BASE_URL。 - 教程示例
examples/jsonrpc-agent/minimal.py:只暴露bash+str_replace_editor(bash 超时 300s、editor 输出上限 16k、compaction 关闭)、danger-full-access;仅支持 Linux x64/arm64 与 macOS 14+ arm64(PTY 需 POSIX)。同 harness + 同 session id 复用可保留 persistent Bash 状态。 - 发行:三平台 wheel(manylinux_2_28 x86_64/aarch64、macosx_14_0_arm64)+ 纯 SDK wheel;release tag
python-v<repo-version>;PyPI Trusted Publishing(OIDC),public attestations 关闭以免暴露私有发布者身份。
相关页面
- architecture — profile/bundle 层叠
- extension-development —
dsh plugin与 bundle 发布细节