引擎切换
A pure engine-switching runtime: routes DeepSeek Harness (DSH) top-level sessions to pluggable engines by agent-preset.
이것은 DeepSeek Harness(DSH) 플러그인입니다. 이 사이트는 GitHub README, 설치 정보, 유지보수 상태, 공개 보안 시그널을 모아 보여줍니다.
업스트림에서 중국어 README를 제공하지 않아 저장소 원본 내용을 표시합니다.
dsh-engine-switch
English | 中文
A pure engine-switching runtime: routes DeepSeek Harness (DSH) top-level sessions to pluggable engines by agent-preset.
🚧 Pre-release — not yet usable. Routing/swap paths are not end-to-end validated. Do not use in production.
What it is
A standard + runtime that lets presets connect to engines while keeping engines and sessions transparent to each other:
- Engine = a driver implementing the DSH
Agentinterface (same interface as the native ReactLoop), registered by a downstream plugin. - This plugin ships no engine and no preset. It defines the integration contract and provides three things: preset → engine routing, swap while the session is blank, and preset installation.
Transparency:
- Engine is preset-unaware —
makeAgentreceivessession/options/engineConfig, never a preset. - Session is switch-unaware — the session drives a single
Agent; switching engines only swaps the agent driving it (while blank).
Install
dsh plugin --profile web add github:Yuki-takuya-kun/dsh-engine-switch
# then install at least one downstream engine plugin, e.g.:
dsh plugin --profile web add github:<your-account>/dsh-engine-claude-code
Enable
Edit ~/.dsh/profiles/web/cordis.patch.yml:
- id: dsh-engine-switch
config:
enabled: true
# optional: point a preset at an engine
# engineByPreset:
# research: claude-code
Restart the web app. Presets registered by downstream engines appear in the picker; selecting one routes to that engine, anything else → DeepSeek.
Registering a downstream engine
A downstream plugin injects engineSwitch:
export const inject = ["engineSwitch"];
export function apply(ctx) {
ctx.engineSwitch.register({
id: "claude-code", // engine id = preset directory name
name: "Claude Code",
description: "…",
presetDir: fileURLToPath(new URL("./presets/claude-code/", import.meta.url)),
makeAgent(loopCtx, id, options, session, engineConfig) {
return new ClaudeCodeAgent(loopCtx, id, options, session, engineConfig);
},
});
}
presetDir holds agent.cordis.yml + preset.yml; the framework installs it to ~/.dsh/.agent-presets/<id>/. See Engine API for the full contract.
How it works
- Replaces the agent factory and routes by preset:
engineByPreset[preset]→ "preset id = engine id" →defaultEngine. - Switching preset while blank (either direction) disposes the old agent and rebuilds a fresh session + the target engine's agent. DSH only allows switching before input, so the framework needs no extra lock.
- Subagents always delegate to DeepSeek; resume infers the engine from the session log's current preset (
resolveSessionPreset).
Config
| Key | Default | Meaning |
|---|---|---|
| enabled | false | master switch: false = plugin does nothing |
| defaultEngine | "deepseek" | engine for unlisted presets (and preset-less sessions); deepseek = delegate sentinel |
| engineByPreset | {} | preset id → engine id overrides |
| engines | {} | engine id → engine-private config (forwarded verbatim) |
Known limitations
- Pre-release: routing/swap not end-to-end validated.
- Swap is blank-only (DSH locks the preset once a session has input).
License
MIT. See THIRD_PARTY_NOTICES.md.
보안 및 설치 증거
이 점수는 공개 저장소 메타데이터와 이 사이트에 등록된 설치 증거에만 기반하며, 코드 보안 감사와 다릅니다.
공개 플러그인 카탈로그에서 왔으며, 공개 GitHub 저장소로 연결됩니다.
저장소가 MIT 라이선스를 선언했습니다.
최근 180일 내 코드 업데이트가 있습니다.
재현 가능한 정확한 설치 메타데이터가 아직 등록되지 않았습니다. 저장소 설명에 따라 직접 확인하세요.
검사한 패키지 메타데이터에 설치 라이프사이클 스크립트가 선언되지 않았습니다.