deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:qingfengyu153781-star/dsh-approval-popup
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Native Windows popup dialogs for DeepSeek Harness (DSH) approval requests — approve or reject sandbox escalations, file writes, and shell commands from a desktop dialog instead of the Web GUI. Optionally pops a "task finished" notice when an agent turn completes.
Windows 原生弹窗插件:DSH 需要批准(沙箱提权、写文件、执行命令等)时,直接弹出桌面对话框点「是 / 否」,不用再切回 Web 界面操作;任务完成时还会弹出提醒。
是(Y) / 否(N) buttons, always-on-top, centered.allow / reject / next).~/.dsh/approval-popup.log.| Requirement | Detail |
|---|---|
| OS | Windows only (PowerShell/WinForms dialogs). The plugin no-ops elsewhere. |
| PowerShell | 5.1+ (built into Windows). |
| DSH | Any recent version (dsh web or the desktop app). Tested on 0.1.0-rc.5. |
| Profile | The web profile (default). |
# clone anywhere, then:
powershell -ExecutionPolicy Bypass -File .\install.ps1
What it does:
index.mjs + the three .ps1 helpers into %USERPROFILE%\.dsh\plugins\approval-popup\.insert entry to %USERPROFILE%\.dsh\profiles\web\cordis.patch.yml (idempotent — re-running never duplicates).Then restart dsh (exit and relaunch dsh web / the desktop app) and the dialog is live.
# 1. copy the plugin folder into the DSH plugins directory
Copy-Item -Recurse . "$env:USERPROFILE\.dsh\plugins\approval-popup"
# 2. edit %USERPROFILE%\.dsh\profiles\web\cordis.patch.yml and add:
# - insert:
# - id: approval-popup
# name: 'file:///C:/Users/<you>/.dsh/plugins/approval-popup/index.mjs'
# 3. restart dsh web
All options are environment variables read once at plugin start (set them before launching dsh, e.g. in System settings or your launch script):
| Variable | Default | Description |
|---|---|---|
DSH_APPROVAL_POPUP |
1 |
Set 0 to disable the whole plugin. |
DSH_APPROVAL_ENTER |
1 |
Set 0 to disable the global-Enter hotkey. |
DSH_APPROVAL_TIMEOUT_MS |
15000 |
Dialog timeout in ms. 0 = wait forever. |
DSH_APPROVAL_TIMEOUT_ACTION |
allow |
On timeout: allow (auto-approve), reject (auto-deny), or next (fall back to the Web GUI). |
DSH_TURN_DONE_POPUP |
1 |
Set 0 to disable the turn-finished popup. |
DSH_TURN_DONE_TIMEOUT_MS |
30000 |
Turn-finished popup auto-close in ms. |
DSH_TURN_DONE_COOLDOWN_MS |
5000 |
Min gap between two notices; prevents stacking when turns end in bursts. |
DSH_APPROVAL_POPUP_LOG |
~/.dsh/approval-popup.log |
Debug log path (empty string disables logging). |
Example (stricter policy — deny by default):
$env:DSH_APPROVAL_TIMEOUT_MS = 20000
$env:DSH_APPROVAL_TIMEOUT_ACTION = "reject"
Remove-Item -Recurse -Force "$env:USERPROFILE\.dsh\plugins\approval-popup"
# then remove the approval-popup entry from %USERPROFILE%\.dsh\profiles\web\cordis.patch.yml
# and restart dsh
~/.dsh/approval-popup.log; consider DSH_APPROVAL_TIMEOUT_ACTION=reject or DSH_APPROVAL_POPUP=0..ps1 files must stay UTF-8 with BOM (PowerShell 5.1 reads ANSI otherwise). Do not re-save them as plain UTF-8.index.mjs (title/body) and approval-dialog.ps1 / turn-done.ps1 (button labels). Edit and re-run install.ps1.approval-toast.ps1 is a standalone helper using WScript.Shell.Popup; call it from any script: powershell -File .\approval-toast.ps1 -Title "hi" -Text "hello".DSH_APPROVAL_TIMEOUT_ACTION=reject.RegisterHotKey) — any focused app's Enter key approves while the dialog is open. Disable with DSH_APPROVAL_ENTER=0 if that's surprising.| File | Purpose |
|---|---|
index.mjs |
Cordis plugin entry: answerer + turn-end popup, config, logging. |
approval-dialog.ps1 |
Yes/no dialog (WinForms) with global-Enter hotkey and timeout. |
turn-done.ps1 |
"Task finished" notice dialog, auto-closes. |
approval-toast.ps1 |
Standalone toast helper (WScript.Shell.Popup), optional. |
install.ps1 |
One-command installer: copy files + patch cordis.patch.yml. |
allow / reject / next)。prepend answerer,先于 Web 界面处理批准请求。~/.dsh/approval-popup.log。| 要求 | 说明 |
|---|---|
| 系统 | 仅 Windows(基于 PowerShell/WinForms 弹窗),其他平台自动跳过。 |
| PowerShell | 5.1+(Windows 自带)。 |
| DSH | 任意近期版本(dsh web 或桌面应用),已在 0.1.0-rc.5 验证。 |
| 配置档 | web profile(默认)。 |
# 克隆本仓库后,在仓库目录执行:
powershell -ExecutionPolicy Bypass -File .\install.ps1
脚本会:
index.mjs 和三个 .ps1 辅助脚本复制到 %USERPROFILE%\.dsh\plugins\approval-popup\。%USERPROFILE%\.dsh\profiles\web\cordis.patch.yml 中追加 insert 条目(幂等,重复执行不会产生重复条目)。然后重启 dsh(退出并重新启动 dsh web / 桌面应用)即可生效。
# 1. 复制插件目录到 DSH 插件目录
Copy-Item -Recurse . "$env:USERPROFILE\.dsh\plugins\approval-popup"
# 2. 编辑 %USERPROFILE%\.dsh\profiles\web\cordis.patch.yml,添加:
# - insert:
# - id: approval-popup
# name: 'file:///C:/Users/<你>/.dsh/plugins/approval-popup/index.mjs'
# 3. 重启 dsh web
均为环境变量,插件启动时读取一次(在启动 dsh 前设置):
| 变量 | 默认值 | 说明 |
|---|---|---|
DSH_APPROVAL_POPUP |
1 |
设为 0 关闭整个插件。 |
DSH_APPROVAL_ENTER |
1 |
设为 0 关闭全局回车快捷键。 |
DSH_APPROVAL_TIMEOUT_MS |
15000 |
弹窗超时毫秒数;0 为一直等待。 |
DSH_APPROVAL_TIMEOUT_ACTION |
allow |
超时行为:allow(自动同意)/ reject(自动拒绝)/ next(退回 Web 界面)。 |
DSH_TURN_DONE_POPUP |
1 |
设为 0 关闭任务完成弹窗。 |
DSH_TURN_DONE_TIMEOUT_MS |
30000 |
任务完成弹窗自动关闭毫秒数。 |
DSH_TURN_DONE_COOLDOWN_MS |
5000 |
两次提醒的最小间隔,防止多轮结束时叠窗。 |
DSH_APPROVAL_POPUP_LOG |
~/.dsh/approval-popup.log |
调试日志路径(空字符串关闭日志)。 |
示例(更严格策略,默认拒绝):
$env:DSH_APPROVAL_TIMEOUT_MS = 20000
$env:DSH_APPROVAL_TIMEOUT_ACTION = "reject"
Remove-Item -Recurse -Force "$env:USERPROFILE\.dsh\plugins\approval-popup"
# 再从 %USERPROFILE%\.dsh\profiles\web\cordis.patch.yml 中删除 approval-popup 条目
# 最后重启 dsh
~/.dsh/approval-popup.log;可改用 DSH_APPROVAL_TIMEOUT_ACTION=reject 或 DSH_APPROVAL_POPUP=0。.ps1 文件必须保持 UTF-8 带 BOM(PowerShell 5.1 默认按 ANSI 读取),不要另存为无 BOM 的 UTF-8。index.mjs(标题/正文)和 approval-dialog.ps1 / turn-done.ps1(按钮文字)中,改完重新执行 install.ps1。approval-toast.ps1 是独立的 WScript.Shell.Popup 助手:powershell -File .\approval-toast.ps1 -Title "hi" -Text "hello"。DSH_APPROVAL_TIMEOUT_ACTION=reject。RegisterHotKey),弹窗打开期间任何应用的 Enter 都会批准。介意的话设置 DSH_APPROVAL_ENTER=0。| 文件 | 作用 |
|---|---|
index.mjs |
Cordis 插件入口:批准应答器 + 任务完成弹窗、配置、日志。 |
approval-dialog.ps1 |
是/否弹窗(WinForms),支持全局回车与超时。 |
turn-done.ps1 |
「任务完成」提醒窗,自动关闭。 |
approval-toast.ps1 |
独立 toast 助手(WScript.Shell.Popup),可选。 |
install.ps1 |
一键安装:复制文件 + 写入 cordis.patch.yml。 |
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。