deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
作者从reasonix得到的灵感,实现权限控制+子代理角色分配的agent模板
兼容性:DSH = v0.1.7-rc.1 ~ v0.2.0-rc.2、qqbot 0.5.0(暂未测试)。旧版本兼容详见Releases
通过设定 主会话、探查者、pro规划、执行者、验收者 五个角色,让DSH工作时按照明确的流程进行分工
并合并了DSH Agent预设模式中的 PTC模式、创造模式 包含的功能,可以直接在本模式同时体验
$repo='luca3xxvsoo/dsh-extra-plan'; $q="$repo#path:/plugins/dsh-qqbot-user-questions"; $allow='@local/dsh-qqbot-user-questions@git+https://github.com/luca3xxvsoo/dsh-extra-plan.git'; dsh plugin --profile qqbot add $q --allow-build="$allow"; $exitCode=$LASTEXITCODE; if($exitCode -ne 0){dsh plugin --profile qqbot approve-builds --all; dsh plugin --profile qqbot add $q --allow-build="$allow"; $exitCode=$LASTEXITCODE}; if($exitCode -eq 0){dsh plugin --profile qqbot approve-builds --all; if($LASTEXITCODE -eq 0){$profileDir=Join-Path $env:USERPROFILE '.dsh\profiles\qqbot'; Push-Location $profileDir; try { node -e "const fs=require('node:fs'),p='package.json';if(!fs.existsSync('node_modules/@local/dsh-extra-plan'))throw new Error('缺少 qqbot 到 web 的 dsh-extra-plan 链接');const j=JSON.parse(fs.readFileSync(p,'utf8'));j.dsh=j.dsh||{};j.dsh.profile=j.dsh.profile||{};const b=j.dsh.profile.bundles=Array.isArray(j.dsh.profile.bundles)?j.dsh.profile.bundles:[];let changed=false;for(const n of ['@local/dsh-qqbot-user-questions','@local/dsh-extra-plan'])if(!b.includes(n)){b.push(n);changed=true};if(changed){fs.copyFileSync(p,p+'.bak');fs.writeFileSync(p,JSON.stringify(j,null,2)+'\n')}" ; $nodeExit=$LASTEXITCODE } finally { Pop-Location }; if($nodeExit -eq 0){Write-Host '完整安装并激活成功,请重启 QQBot'}else{Write-Error 'bundle 激活失败'}}}else{Write-Error '插件安装失败'}
或
$src='[解压路径]\dsh-extra-plan-main'; $pkg=(Resolve-Path (Join-Path $src 'plugins\dsh-qqbot-user-questions')).Path -replace '\\','/'; $spec="file:///$pkg"; $allow="@local/dsh-qqbot-user-questions@file:$pkg"; dsh plugin --profile qqbot add $spec --allow-build="$allow"; $exitCode=$LASTEXITCODE; if($exitCode -ne 0){dsh plugin --profile qqbot approve-builds --all; dsh plugin --profile qqbot add $spec --allow-build="$allow"; $exitCode=$LASTEXITCODE}; if($exitCode -eq 0){dsh plugin --profile qqbot approve-builds --all; if($LASTEXITCODE -eq 0){$profileDir=Join-Path $env:USERPROFILE '.dsh\profiles\qqbot'; Push-Location $profileDir; try { node -e "const fs=require('node:fs'),p='package.json';if(!fs.existsSync('node_modules/@local/dsh-extra-plan'))throw new Error('缺少 qqbot 到 web 的 dsh-extra-plan 链接');const j=JSON.parse(fs.readFileSync(p,'utf8'));j.dsh=j.dsh||{};j.dsh.profile=j.dsh.profile||{};const b=j.dsh.profile.bundles=Array.isArray(j.dsh.profile.bundles)?j.dsh.profile.bundles:[];let c=false;for(const n of ['@local/dsh-qqbot-user-questions','@local/dsh-extra-plan'])if(!b.includes(n)){b.push(n);c=true};if(c){fs.copyFileSync(p,p+'.bak');fs.writeFileSync(p,JSON.stringify(j,null,2)+'\n')}" ; $nodeExit=$LASTEXITCODE } finally { Pop-Location }; if($nodeExit -eq 0){Write-Host '本地插件安装并激活完成,请重启 QQBot'}}}
dsh plugin --profile web remove @local/dsh-extra-plan
dsh plugin --profile qqbot remove @local/dsh-extra-plan
dsh plugin --profile qqbot remove @local/dsh-qqbot-user-questions
跨平台兼容改造的逻辑层已由 pe-test/tools/step-00-跨平台写拦截.mjs 验证(本仓库 Windows 环境实测 68 用例全过,脚本三平台通用);但仅在 Windows 环境实测正常,Linux/macOS 尚未在真实环境验证
cordis_inspect_query 无超时导致探查者、执行者、验收者调用直接卡死。避免方案:创造模式开关设置为关
DSH web界面 -> 插件 -> @local/dsh-extra-plan -> 按需规划模式配置
通用设置:
pro规划:
dsh-extra-plan/
├── plugins/
│ ├── dsh-extra-plan/ # 模式核心插件(四级闸门/探查上限/save_plan 等)
│ │ ├── assets/presets/extra-plan/
│ │ │ ├── agent.cordis.yml # 预设主配置(persona/工具/插件行/delegation)
│ │ │ ├── preset-patch.generated.yml # 预设投递载体文件
│ │ │ └── preset.yml # 预设元信息(GUI 显示名称与描述)
│ │ ├── lib/ # 模块目录
│ │ │ ├── agent-runtime.js # 角色运行态:createAgentRuntime 的 per-apply 判定与缓存
│ │ │ ├── agent-session.js # 角色判定:sessionEvents/isSubagentChild 唯一来源
│ │ │ ├── assembly-presentation.js # 展示投影:A/C/M 投影与 skill catalog
│ │ │ ├── client-bridge.js # 客户端桥接行
│ │ │ ├── client.js # 设置页前端 UI
│ │ │ ├── executor-spawn.js # 执行者委托层(workflow/ralph worker 注入)
│ │ │ ├── gate-decisions.js # 闸门纯决策:路由/目的/澄清/批准与只读判定
│ │ │ ├── gate-words.js # 闸门词契约:字段规格/整组校验/运行时派生
│ │ │ ├── live-config.js # 热修改支持模块
│ │ │ ├── model-routing.js # 子代理模型选择:planner/非 planner 路由解析
│ │ │ ├── planner-budget.js # 探查预算:用量计数与提醒/耗尽文案
│ │ │ ├── preset-defaults.generated.js # 构建期生成:exploreBudget 默认值
│ │ │ ├── preset-settings.js # 设置项 descriptor 与 YAML 处理 facade(供迁移复用)
│ │ │ ├── preset-sync.js # 预设分发与启动自愈
│ │ │ ├── preset-yaml.js # 预设 YAML 解析、定位与保格式改写纯模块
│ │ │ ├── run-code-scanner.js # run_code 无宿主状态词法与调用点扫描
│ │ │ ├── run-code-static.js # run_code:静态解析与理由函数
│ │ │ ├── runtime-lifecycle.js # session 生命周期与计数状态工厂
│ │ │ ├── runtime-static.js # 静态纯函数:显式参数 helper
│ │ │ ├── save-contract.js # save_plan/save_probe:合同常量与 Markdown 渲染
│ │ │ ├── save-persistence.js # save_plan/save_probe:原子落盘内核与 journal 自愈
│ │ │ ├── save-probe-validation.js # save_probe:参数与路径/range/evidence 校验
│ │ │ ├── save-tool-factories.js # save_plan/save_probe:工具定义
│ │ │ ├── sdk-text-cache.js # tools:sdk缓存复用
│ │ │ ├── settings-contract.js # 设置项单一合同:键、默认值、校验与元数据
│ │ │ ├── settings.js # 设置页宿主端
│ │ │ ├── shell-mutation.js # 写操作判定:跨平台命令解码与写形态
│ │ │ └── usage-ledger.js # usage 账本与 cursor 增量折叠
│ │ ├── locale/
│ │ │ ├── preset-sync/
│ │ │ │ ├── en.json
│ │ │ │ └── zh.json
│ │ │ ├── settings/
│ │ │ │ ├── en.json
│ │ │ │ └── zh.json
│ │ │ ├── en.json
│ │ │ └── zh.json
│ │ ├── scripts/generate-runtime-defaults.mjs # 构建期生成器:exploreBudget 叶值 → preset-defaults.generated.js
│ │ ├── cordis.patch.yml
│ │ ├── index.js # 四级闸门:路由/目的/澄清/批准 + apply 接线
│ │ └── package.json
│ └── dsh-qqbot-user-questions/
│ ├── lib/heal.js # 自愈函数
│ ├── scripts/heal.mjs # 自愈分发
│ ├── cordis.patch.yml
│ ├── index.js
│ └── package.json
├── pe-test/ # 自检/取证工具
│ ├── README.md # 自检/取证工具介绍
│ ├── _shared/
│ │ ├── host-deps.mjs
│ │ ├── preset-hash.mjs
│ │ ├── session-finder.mjs
│ │ ├── v4-tool-result.mjs
│ │ └── zstd-frames.mjs
│ ├── docs/ # AI文档
│ │ ├── ai-概览.md
│ │ ├── ai-机制设计.md
│ │ ├── ai-流程备查.md
│ │ ├── ai-维护手册.md
│ │ ├── ai-实机闸门测试流程.md
│ │ ├── ai-宿主耦合台账.md
│ │ ├── ai-宿主耦合历史归档.md
│ │ ├── ai-历史故障与机制归档.md
│ │ └── ai-代码地图.md
│ └── tools/ # 测试工具
│ ├── 一键step测试.mjs # 可以通过输入真实session_id进行测试
│ ├── step-00-跨平台写拦截.mjs
│ ├── step-00-全流程回归.mjs
│ ├── step-01-executor-spawn注册幂等.mjs
│ ├── step-01-安装同步.mjs
│ ├── step-01-设置迁移.mjs
│ ├── step-01-设置页配置.mjs
│ ├── step-01-预设完整性.mjs
│ ├── step-01-qqbot-安装映射.mjs
│ ├── step-01-qqbot-安装映射.mjs
│ ├── step-04-工具清单查看.mjs
│ ├── step-04-路由与写闸门.mjs
│ ├── step-05-会话解码.mjs
│ ├── step-06-08-v4取证回归.mjs
│ ├── step-06-线索落盘.mjs
│ ├── step-06-真实会话查看.mjs
│ ├── step-07-子代理模型与引导取证.mjs
│ ├── step-08-方案配对查看.mjs
│ ├── step-99-用量统计.mjs
│ ├── 代码地图生成.mjs
│ └── readme.md
├── README.md # 本文档
├── READAI.md # AI 入口导航(分层)
└── LICENSE # MIT 许可
本项目基于 MIT License 发布
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。