提供支持页签和网格布局的 agent-switch CLI 交互终端、Codex 委派任务卡片,以及右侧面板中的实时与历史任务输出。需 PATH 上有 agent-switch、至少一个目标编码 CLI,并在插件页放行 node-pty 原生构建;目前只在 Windows 验证过。
安装
# npm 包(预构建)
dsh plugin --profile web add @asun-labs/dsh-plugin-agent-switch
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:asun-labs/dsh-plugin-agent-switch
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
Install the Agent Switch plugin as @asun-labs/dsh-plugin-agent-switch. Existing users can follow the upgrade guide; saved settings and terminal output are imported automatically on first launch.
@asun-labs/dsh-plugin-agent-switch connects Codex child tasks to a DeepSeek Harness conversation. A model-facing tool launches parallel Codex CLI processes through agent-switch, renders a live task card in the conversation, and opens their terminal output in the native right sidebar. The manual multi-CLI runtime panel is also available as a native right-sidebar tab.
Features
- Interactive terminals for Claude Code, Codex, CodeWhale, the DeepSeek compatibility alias, Kimi, and OpenCode
- Tabs and grid layouts with independent terminal sessions
- A custom conversation card for
agent_switch_delegatewith one child card per Codex task - A native DSH right-sidebar tab with live output and saved output replay for completed tasks
- An Agent Switch settings section for the Codex account profile, default model, and history display window
- Runtime availability and error messages, resize handling, exit status, and session cleanup
- DSH-authenticated local API and bounded output replay after a temporary connection loss
- Configurable working directory and concurrent session limit
Requirements
- Node.js
^22.19.0or>=24.0.0 - A DeepSeek Harness build with the
0.1.5or0.1.7client slot and connection APIs agent-switchinstalled on the Host PATH (agent-switch --help)- At least one target coding CLI installed on the Host PATH
The plugin includes the node-pty native dependency. Its install script must be allowed to run so interactive terminals work. This implementation is developed and tested on Windows; macOS and Linux use the same node-pty API but still need platform validation.
Install
Initialize a DSH profile if needed, then install the npm package:
dsh --profile agent-switch --from-default-profile web --dump-config | Out-Null
dsh plugin --profile agent-switch add @asun-labs/dsh-plugin-agent-switch
dsh --profile agent-switch --no-open
node-pty needs to run its native install script. If DSH reports that pnpm blocked the node-pty build, open the Web plugin page, review the named script, and use Allow these scripts and retry for that profile. The permission is recorded in that profile's allowBuilds setting.
Open the right sidebar's Agent Switch Panel tab, choose a runtime, and switch between Grid and Tabs in the panel header. Switching to another right-sidebar tab keeps its CLI sessions running; close a terminal explicitly to stop it.
To use Agent Switch, ask the Seal Harness/DSH assistant: “Use Agent Switch to delegate these tasks to Codex.” It calls agent_switch_delegate, which creates the conversation card. Click a child card to open the corresponding terminal output in the native right sidebar. The right sidebar's guide also opens Agent Switch's recent task groups for history playback.
Install from a local checkout
Build this package with Node 22.19+ or 24+:
corepack pnpm install
corepack pnpm run check
Initialize a DSH profile if needed, then install the package by absolute path:
dsh --profile agent-switch --from-default-profile web --dump-config | Out-Null
dsh plugin --profile agent-switch add <absolute-path-to-dsh-plugin-agent-switch>
dsh --profile agent-switch --dump-config
dsh --profile agent-switch --no-open
Configuration
config:
workspace: '' # empty uses the DSH Host working directory
maxSessions: 9 # 1–32
defaultModel: '' # empty uses the Codex CLI default
codexProfile: '' # empty uses the current Codex account
codexAccountId: '' # saved agent-switch account id when a profile is selected
historyDays: 30 # show groups from the last 1–365 days
Manual terminals use the Host plugin's configured working directory. Delegated Codex tasks use their parent DSH session's workspace when available, falling back to that Host directory. Browser requests cannot choose an arbitrary working directory or command; only the six fixed provider names are accepted. The settings page saves the Codex profile, selected saved-account ID, and model for new delegated tasks. It lists account labels from Agent Switch's local index but does not read or display authentication secrets. An independent Codex profile needs a saved account selected before it can run unattended.
Architecture
src/index.ts registers the model-facing tool and authenticated Host routes through DSH Connection. src/delegation.ts keys each task group by the DSH tool call ID and stores its metadata and terminal output under $DSH_HOME/agent-switch/; completed output remains viewable after restart. src/client-extras.tsx contributes the settings section, keyed tool card, and native right-sidebar tabs. src/client.tsx provides the manual runtime panel and src/sessions.ts manages its interactive PTYs.
The shell's output and captured model conversations can contain sensitive material. The agent-switch CLI stores model captures in its normal local store; this plugin also keeps delegated terminal output locally for history playback. It does not upload logs or add telemetry. A Host restart ends running processes; saved output can be reviewed, but the original PTY process cannot be resumed.
Origin and license
This plugin adapts the panel behavior from OpenAgentSeal. See NOTICE and LICENSE. The terminal stylesheet comes from xterm.js under the MIT License.
链接
同类插件
zhu1090093659/dsh-web#packages/dsh-task-board★ 10172
侧边栏多列任务看板:卡片交给真实 DSH 智能体会话执行,支持 cron 定时(Host 侧到点执行,关浏览器也生效)。
zhu1090093659/dsh-web#packages/dsh-web-all★ 10172
DSH Web UI 插件与皮肤合集:任务看板、git 图、右侧面板、远程移动端 UI、桌宠、实时 token 统计与皮肤中心。
ccch1mneyyy/dsh-TUI★ 7101
Claude Code 风格全屏终端 UI:像素鲸鱼顶栏、实时工作状态行、思考流式展开。
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 6959
右下角常驻的小鲸鱼挂件:余额、今日已用与每轮对话消耗(含峰谷价),余额预警与今日预算的泡泡内容都可编辑;泡泡点击序列模块化自定义,支持并列加权 A/B、随机台词与随机图片;内置 30+ 厂商模板(OpenAI / OpenRouter / Kimi / 硅基流动 / 方舟 / 智谱 / MiniMax 等),按模型查余额与订阅额度;另有任务结束音效、导入音频、自定义角色与资源管理。数据全在本机,无遥测。
omdsh-dev/DSH-better-sidebar★ 4959
侧边栏完整工作台:内置文件渲染编辑、终端、Git 与子代理,支持三方插件注册新 Tab。
Devin-AXIS/deepseek-design#deepseek-idesign★ 1744
可视化设计工作室,支持网站、App 原型、海报、信息卡、报告和杂志的模板创建、元素编辑、选区级 AI 草稿衔接与导出。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。