dsh-web-search-ddg
aooyoo
Zero-token DuckDuckGo search provider for the DeepSeek Harness (DSH) web seam — local headless browser, no API key, no m…
PROJECT TOPICS
PROJECT README
DeepSeek Harness(DSH)的本地 Docker 容器管理部署级插件。
在 Web 会话视图环中新增「容器」页签,提供 仅观察 / 干预 双模式 UI、18 个模型可用工具、只读实时 Shell 观察 与/dock-api/*HTTP 路由,让智能体和用户无需离开对话即可完成容器生命周期管理、状态监控与故障排查。
webServer 暴露的 /dock-api/* 路由获取。docker_* 系列工具,覆盖 Docker 高频操作与 CLI 直通能力,可在对话中直接驱动容器资源。| 模式 | 说明 |
|---|---|
| 仅观察(observe) | 默认模式。隐藏启动、停止、删除等操作按钮,仅可查看详情、日志与 Shell 输出,适合只读审计与安全演示。 |
| 干预(intervene) | 显式开启后显示常用操作按钮,支持启动 / 停止 / 删除;删除操作带二次确认,降低误操作风险。 |
docker top)。docker logs -f 的流式输出,无 stdin、无法干预命令运行;支持暂停、清空、重连,90 秒无读取自动回收。为智能体提供以下 18 个工具:
docker_info · docker_ps · docker_images · docker_pull · docker_run · docker_start · docker_stop · docker_restart · docker_rm · docker_rmi · docker_logs · docker_exec · docker_inspect · docker_stats · docker_network · docker_volume · docker_build · docker_cli
其中 docker_cli 可直通任意 Docker 子命令,作为高级逃生舱;其余工具覆盖镜像、容器、网络、卷、构建与资源统计等日常运维场景。
浏览器 (client, lib/client.js) Node (host, lib/index.js)
┌─────────────────────────────────────┐ fetch ┌────────────────────────────────────┐
│ window.__ModuleLoader__.load({...}) │ ── /dock-api/status|inspect|logs|top|op|watch ─▶ │ webServer.register({kind:'exact'}) │
│ slots.inject('conversation.view') │ ◀────────── └────────────────────────────────────┘
│ 双模式 UI / Shell 只读观察 │ JSON │ tools.register × 18 (docker_*) │
└─────────────────────────────────────┘ │ execFile/spawn('docker', ...) │
└────────────────────────────────────┘
node:child_process / node:util;负责执行 Docker CLI、维护日志观察子进程、注册 HTTP 路由与模型工具。react(浏览器平台模块),以 CJS closure-factory bundle 形式注入会话视图。需要已安装 pnpm 与 dsh CLI:
# 从 GitHub 仓库安装(public 仓库,无需认证)
npx -p @deepseek-ai/dsh dsh plugin --profile web add https://github.com/GHJIVHIDD/dsh-plugin-container
# 或使用 git 简写
npx -p @deepseek-ai/dsh dsh plugin --profile web add GHJIVHIDD/dsh-plugin-container
安装过程由官方机制自动完成:
dependencies。dsh.bundle 声明自动 reconcile 进 dsh.profile.bundles 层。cordis.patch.yml 补丁,自动向组合树插入 ui-container 行,无需手工编辑配置文件。重启 dsh(web 或 headless)后生效,刷新浏览器即可看到「容器」页签。
# 1. 将包复制到 profile 的插件目录
cp -R dsh-plugin-container ~/.dsh/profiles/web/node_modules/@dsh-community/
# 2. 在用户补丁层注册插件行
cat >> ~/.dsh/profiles/web/cordis.patch.yml << 'EOF'
- insert:
- id: ui-container
name: '@dsh-community/dsh-plugin-container'
EOF
# 3. 重启 profile(或等待 HMR 事务性重读用户补丁)
# 通过官方 CLI 安装的
dsh plugin --profile web remove @dsh-community/dsh-plugin-container
# 手动安装的:移除补丁中的 ui-container 行并删除包目录
rm -rf ~/.dsh/profiles/web/node_modules/@dsh-community/dsh-plugin-container
仓库内置离线验证脚本:
node scripts/verify.mjs
覆盖内容:
docker_info 调用(尽力而为)dsh-plugin-container/
├── package.json # dsh.bundle + dsh.client 声明、exports["./client"]
├── cordis.patch.yml # 向组合树插入 ui-container 的补丁
├── lib/
│ ├── index.js # Host 半区(ESM:apply/inject)
│ ├── client.js # Client 半区(CJS closure-factory bundle)
│ └── types/index.d.ts # Host 类型声明
├── scripts/verify.mjs # 离线验证
└── README.md / LICENSE
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。