beijingwahw/dsh-computer-use-plugin ↗★ 3
dsh-computer-use-plugin
提供基于视觉的自动化桌面操作工具 适合需要通过 VLM 自动控制键鼠、截屏和操作桌面的任务。
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:beijingwahw/dsh-computer-use-plugin說明文件
閱讀完整 README ↗使用方法
配置任一通道即点亮云脑:
config:
vlmApiKey: '你的智谱 API Key' # 或 env:GLM_API_KEY / ZHIPUAI_API_KEY / ZAI_API_KEY
# vlmBaseUrl / vlmModel 已有默认值,按部署覆写;vlmAssistOcr: true 开启 OCR 兜底
点亮后 ask_screen 工具与系统提示词使用准则自动注入;vlmAssistOcr: true 激活 semanticConfirm 的 VLM 第三路径。审判数字:vlm 家族 127 测试 0 败(十器官 121 + 集成 6);typecheck 0 错;build dist/vlm 全量产出;smoke 141 模块 import 干净。
使用方法
config:
autonomyEnabled: true # 立法者显式开启
# autonomyMaxSteps: 24 / autonomyTimeBudgetSec: 300 / autonomyAllowTiers: 'benign'
# autonomyVlmWhenUncertain: true / autonomyForbiddenKeywords: ''
调用 autonomous_run({ goal: '打开系统设置并进入蓝牙页', success_criteria: ['蓝牙'] });锚点结构:{phase, steps, criteria:{met,total}, verdict, score, lessons, next_run_advice, …}。审判数字:autonomy 家族 164 测试 0 败(十器官 158 + 集成 6);typecheck 0 错;smoke 154 模块 import 干净。
使用方法
三种点亮方式任选其一:
# 方式一:单平台 env(零配置)——任一平台密钥在 env 即自动识别并点亮整套系统
### 使用方法
```yaml
config:
autonomyTracePath: 'C:/dsh/autonomy-trace.jsonl' # Σ-3:非空 ⇒ 运行档案落盘,resume token 跨进程存活(缺省空 = 纯内存,行为不变)
- 合议庭(Σ-1):编程面铸庭(经 providers 桶导出,密钥走各平台 env)——
createEnsembleCourt({ provider: 'openai', extraProviders: ['anthropic', 'gemini'] });问询面askText / askVerdict / askElements,fetchImpl可注入 - 训练营(Σ-2):
new AutonomyGym({ seed: 4242 }).train(4)——四世界各一轮;同 seed 两次 train 逐字段一致 - 续跑(Σ-3):
autonomous_run非达成终局锚点携带resume_token(如AUTO-1a2b3c4d)⇒autonomy_resume({ token })判据回放后续跑;已 done 的 token 诚实拒绝 - 跨屏(Σ-5):
take_screenshot({ display: 1 })——0 起索引,锚点携带display与目标屏active_display(origin/resolution);不带参数 = 主屏现状,字节不变
审判数字:纪元 Σ 新增 63 测试(vlm.providers.ensemble 16 / autonomy.gym 8 / epochSigma.plan 7 / epochSigma.resume 7 / epochSigma.identity 11 / epochSigma.display 9(真 FastAPI 端到端 + TS 纯逻辑)/ epochSigma.dashboard 5);新工具 autonomy_resume、metrics_dashboard 与 take_screenshot 的 display 参数;新配置 autonomyTracePath。
使用方法
- 离线进化:
new AutonomyGym({ seed }).train()训练 →gym.lab检视台账与血统 →kernelRegistry.promoteFrom(gym.lab.registry)晋升。 - 手动调参:
kernelRegistry.set(key, value)(越界自动夹取,回执带 clampedTo)。 - 观察漂移:
metrics_dashboard('kernel')——每键一行(key/器官/现值/缺省/漂移%/证据/代际)。
审判数字:纪元 Θ 新增 49 测试(kernel.registry 16 / kernel.calibrator 23 含血统 7 / kernel.gym 5 / epochTheta.wiring 5)0 败;无新工具、无新配置(入册不设开关,恒入册、值全默认)。
使用方法
config:
kernelStatePath: 'C:/dsh/kernel-state.json' # 进化成果存档(缺省 '' = 纯内存)
kernelEvolutionEnabled: true # 生产进化总开关(缺省 false = 只记账不进化)
实验室多代进化:new AutonomyGym({ seed }).trainGenerations(10, 4) → 检视 report.trends(血统趋势)/ report.converged(已知良好值收敛探针)→ kernelRegistry.promoteFrom(gym.lab.registry) 显式晋升。
审判数字:纪元 Ξ 新增 33 测试(kernel.store 10 / kernel.conductor 7 / kernel.selfverify 5 / kernel.generations 6 / epochXi.wiring 5)0 败;新配置 kernelStatePath('')/ kernelEvolutionEnabled(false);新 API AutonomyGym.trainGenerations(gens, rounds) / EvolutionConductor.maybeTick / KernelStore.save·load·applyTo;无新工具。
使用方法
三种点亮方式沿用纪元 Ψ(env 自动识别 / 显式 vlmProvider / 备选链),本纪元补第四种——什么都不配:本机跑着 Ollama/LM Studio/vLLM 即被自动接管,开箱即亮;全无则向导页自动弹出,用户贴一次密钥两分钟内即亮。④⑤ 两级各设开关:vlmAutoAdoptLocal: false / vlmOnboardingEnabled: false。
审判数字:纪元 Λ 新增 46 测试(vlm.connection 16 / vlm.onboarding 15 / vlm.tools 7 / epochLambda.onboarding 8)0 败;新工具 switch_vision_model / vlm_wizard;新配置 vlmAutoAdoptLocal(true)/ vlmOnboardingEnabled(true)/ vlmOnboardingPort(18432)。
Usage
Any one of three ways lights it up:
### Usage
```yaml
config:
autonomyEnabled: true # the legislator explicitly opts in
# autonomyMaxSteps: 24 / autonomyTimeBudgetSec: 300 / autonomyAllowTiers: 'benign'
# autonomyVlmWhenUncertain: true / autonomyForbiddenKeywords: ''
Call autonomous_run({ goal: 'Open System Settings and go to the Bluetooth page', success_criteria: ['Bluetooth'] }); anchor structure: {phase, steps, criteria:{met,total}, verdict, score, lessons, next_run_advice, …}. Judgment numbers: the autonomy family — 164 tests, 0 failures (ten organs 158 + integration 6); typecheck 0 errors; smoke — 154 modules import clean.
Usage
Configure any one channel to light up the cloud brain:
config:
vlmApiKey: 'your Zhipu API key' # or env: GLM_API_KEY / ZHIPUAI_API_KEY / ZAI_API_KEY
# vlmBaseUrl / vlmModel already have defaults — override per deployment; vlmAssistOcr: true enables the OCR fallback
Once lit, the ask_screen tool and its system-prompt usage rules are injected automatically; vlmAssistOcr: true activates the VLM third path of semanticConfirm. Judgment numbers: the vlm family — 127 tests, 0 failures (ten organs 121 + integration 6); typecheck 0 errors; the build emits the full dist/vlm; smoke — 141 modules import clean.
Configuration for the cloud cortex & autonomy
All fields below have code defaults; the cloud cortex and the autonomy loop are strictly opt-in:
config:
# Cloud cortex (Epoch Ω) — any one channel lights it up:
vlmApiKey: 'your-api-key' # or env: GLM_API_KEY / ZHIPUAI_API_KEY / ZAI_API_KEY
# vlmBaseUrl: 'https://open.bigmodel.cn/api/paas/v4' (default)
# vlmModel: 'glm-5.3-flash' (default)
# vlmAssistOcr: true # VLM reads the screen as the third path when both local OCR paths fail
# One brain, every platform (Epoch Ψ) — explicit platform + CSV fallback chain:
# vlmProvider: 'openai' # or anthropic / gemini / qwen / moonshot / doubao / xai /
# # siliconflow / openrouter / ollama / lmstudio / vllm
# # empty = auto-detect from env (any platform key works)
# vlmFallbackProviders: 'anthropic,gemini' # backups step up when the primary trips
# Autonomy loop (Epoch Φ) — off by default; the legislator explicitly opts in:
# autonomyEnabled: true
# autonomyMaxSteps: 24 / autonomyTimeBudgetSec: 300 / autonomyAllowTiers: 'benign'
# autonomyVlmWhenUncertain: true / autonomyForbiddenKeywords: ''
With no key configured, the cloud cortex reports degraded and performs zero network calls — the local reflex layer keeps running unchanged. With autonomyEnabled: true, one autonomous_run({ goal: '…', success_criteria: ['…'] }) call drives the whole perceive → judge → constitution → execute → verify → evolve loop; use vlm_platforms({ probe: true }) to check which of the 13 vision platforms are configured and healthy.