dsh-maestro-runtime
by zhao-wuyan
maestro-flow 的 DSH 宿主插件:守卫、上下文、KG 同步与 delegate/team/coordinator 运行时
DSH host plugin for maestro-flow: guard, context, KG sync, delegate/team/coordinator runtime
安装
dsh plugin --profile web add github:zhao-wuyan/dsh-maestro-runtimeGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
目录
English | 中文
仓库地址:https://github.com/zhao-wuyan/dsh-maestro-runtime
相关项目:
一个 DSH (DeepSeek Harness) 宿主插件,把 Maestro-Flow 的运行时能力接入 DSH 会话。
已覆盖 P0 + P1:guard(守卫)、workflow context(工作流上下文注入)、新工作区引导、后台 KG 同步、delegate 通知、team 心跳、coordinator 桥接。
功能
- guard
- 拦截危险的
bash/pwsh命令(递归删除、硬 git reset、强制 push、格式化磁盘等) - 阻止模型直接写 Maestro 受保护状态(
.workflow/state.json、.workflow/config.json、.workflow/sessions/**、.workflow/runs/**、.workflow/.maestro/**) - 执行
.workflow/config.json的 PathGuard 边界规则 - 校验
.workflow/specs/*.md的<spec-entry>格式
- 拦截危险的
- context
- 用户输入或调用
/maestro*技能时,注入去重后的<maestro-context>快照 - 包含 workflow 状态、当前 session、项目标题、specs 索引、knowhow 索引、delegate 通知
- 用户输入或调用
- onboarding
- 在没有有效 Maestro workspace 的项目中调用
/maestro*时,注入一次性的/maestro-init或/maestro "<intent>"初始化引导 - 普通非 Maestro 任务保持静默,不打扰
- 在没有有效 Maestro workspace 的项目中调用
- kg
- 缺少
maestro.db时后台执行maestro kg init(5 分钟冷却) - 已存在时后台执行
maestro kg sync --incremental(30 秒冷却) - 直接以
node maestro.js启动,不经过 cmd shell,不弹终端窗口
- 缺少
- delegate
- 同时扫描宿主 tmpdir 和一级
dsh-*会话临时目录中的maestro-notify-*.jsonl - 注入未读完成通知并标记已读
- 同时扫描宿主 tmpdir 和一级
- team
- 本地 git 身份匹配已加入成员时,向
.workflow/collab/activity.jsonl追加 60 秒去重心跳
- 本地 git 身份匹配已加入成员时,向
- coordinator
- 在
step/end和turn/end时写入maestro-coord-<dsh_session>.json桥接文件
- 在
环境要求
- DSH
0.1.0-rc.6profile(dsh web可正常运行) - Node.js >= 20
- pnpm >= 10
- 已安装
maestro-flowCLI,并能在 PATH 中找到maestro(KG 后台同步使用)
安装
DSH 插件通过 pnpm 安装到 profile,并通过 cordis.patch.yml 挂载。本插件可以直接从 GitHub 安装。
方式一:直接从 GitHub 安装(推荐)
本包声明了 dsh.bundle,因此 dsh plugin add 会同时完成依赖安装和组合层激活:
dsh plugin --profile web add "github:zhao-wuyan/dsh-maestro-runtime#v0.1.2"
等价的 pnpm 手动安装命令:
cd ~/.dsh/profiles/web
pnpm add "github:zhao-wuyan/dsh-maestro-runtime#v0.1.2"
无需手动编辑 cordis.patch.yml。重启 DSH 后验证组合层已生效:
dsh --profile web --dump-config | grep maestro-runtime
如需覆盖默认值,在 ~/.dsh/profiles/web/cordis.patch.yml 中加入(用户层优先):
- id: maestro-runtime
name: 'dsh-maestro-runtime'
config:
guardEnabled: true
contextEnabled: true
maxContextChars: 8000
kgEnabled: true
delegateMonitorEnabled: true
teamMonitorEnabled: true
coordinatorEnabled: true
固定 tag 或 commit
替换 GitHub 简写中的 fragment 即可固定到指定版本:
# 稳定 tag
pnpm add "github:zhao-wuyan/dsh-maestro-runtime#v0.1.2"
# 精确 commit
pnpm add "github:zhao-wuyan/dsh-maestro-runtime#<commit-sha>"
方式二:clone 后本地 link(开发)
git clone https://github.com/zhao-wuyan/dsh-maestro-runtime.git
cd ~/.dsh/profiles/web
dsh plugin --profile web add "<绝对路径>/dsh-maestro-runtime"
checkout 同样声明了 dsh.bundle,profile 的 bundles 列表会自动更新。完成后重启 DSH。
Windows 请使用正斜杠绝对路径,例如:
pnpm add "link:C:/Users/<you>/projects/dsh-maestro-runtime"
方式三:npm registry
如果已配置的 npm registry 中有该包:
dsh plugin --profile web add "dsh-maestro-runtime@0.1.2"
然后添加相同的挂载项并重启 DSH。
配置
| 字段 | 默认值 | 说明 |
|---|---|---|
guardEnabled |
true |
启用工具守卫 |
contextEnabled |
true |
启用 workflow 上下文注入 |
maxContextChars |
8000 |
上下文注入大小上限 |
kgEnabled |
true |
后台执行 maestro kg init / sync |
delegateMonitorEnabled |
true |
delegate 通知注入 |
teamMonitorEnabled |
true |
team 心跳写入 |
coordinatorEnabled |
true |
coordinator 桥接写入 |
遵循的 DSH 插件发布约定
- 包名遵循
dsh-*命名约定 type: module,main和exports指向构建入口- 插件入口导出
name和apply(Cordis 插件契约) inject: ['tools']声明所需服务- 运行时消费的 DSH 共享模块(
dsh-agent、dsh-llm、dsh-tools)声明为 peer dependencies,不随插件打包,避免遮蔽宿主版本 @deepseek-ai/cordis@^4.0.1与 DSH 宿主 peer 版本对齐0.1.0-rc.6- 通过 profile 的
cordis.patch.yml挂载,不修改 DSH 源码 - 导出 Schemastery
Configschema,非法配置会在加载时明确失败 - 声明
dsh.bundle,dsh plugin add自动把组合层加入dsh.profile.bundles
开发
DSH 运行时直接编辑 lib/index.js。profile 的 HMR 插件(root: ['.'])会在变更稳定后重载插件入口。
修改 package.json 依赖或 cordis.patch.yml 后,需要重启 DSH。
License
MIT
原始 README: https://github.com/zhao-wuyan/dsh-maestro-runtime/blob/main/README.zh.md ↗
同类插件
查看全部 →
k8e
k8e.sh — 开源 Agentic AI 沙箱矩阵

hol-guard
开源AI代理防病毒:运行时拦截风险工具、秘密访问、提示注入、恶意软件包、MCP服务器、插件和技能。

anolisa
ANOLISA(Agentic Nexus Operating Layer & Interface System Architecture):具备运行时、安全性、可观测性和 Tokenless 响应压缩能力的 Agentic OS,可降低 Token 使用量与成本。

mobius
首个自我演进的开源 Agent OS:连接你的团队、AI agent、设备与算力

deepseek-harness-desktop
DeepSeek Harness Tauri 桌面版 | Only 5mb installer, zero environment setup. Windows / macOS / Linux.

open-managed-agents
开源Claude管理代理API实现和自托管Claude标签式代理运行时。即插即用;在Cloudflare Workers/Durable Objects或Node.js上运行。Apache 2.0。