1.1.73: adapt DSH 0.2.1-rc.2, Apache-2.0, lab-only default-deny.

This commit is contained in:
叫我小杨同学 committed 2026-10-23 11:50:42 +08:00
1 parent 8df4406a7c
commit 1ea067189c
114 files changed
+21198 -5183

No files matched your search

+8 -3
View File
@@ -29,15 +29,20 @@ const REDTEAM_LEAD_PROTOCOL = `## Capability selection by task (redteam lead)
4. Do not ban skill or MCP for children. Leaf limits apply only to further delegation tools (\`subagent_fork\` / workflow / ralph), not to skill/MCP.
5. Vague “go investigate” briefs are wrong; task-matched skill/MCP instructions are right.`;
const REDTEAM_CHILD_PROTOCOL = `## Capability selection by task (redteam executor)
1. **Read** \`<available_skills>\` / your role skills and available MCP/CLI tools.
2. **Match** them to *your assigned task* (not every skill, not zero skills).
3. **Call** matching skills via \`skill\`, and matching MCP/CLI tools by schema, before freelancing equivalent shell work.
4. DIY only for gaps the catalog does not cover; stay in role; do not re-delegate.`;
/**
* @param {{ redteam?: boolean, redteamChild?: boolean, enabled?: boolean }} [opts]
* @returns {string}
*/
export function capabilityProtocolText(opts = {}) {
if (opts.enabled === false) return "";
// 子智能体 / 子代理跟主会话同一条:读目录 → 按任务调 skill/MCP。
// 红队 extras(角色 / 调度)另段挂上,这里不再换成另一套流程。
if (opts.redteamChild) return OFFICIAL_PROTOCOL;
if (opts.redteamChild) return REDTEAM_CHILD_PROTOCOL;
if (opts.redteam) return REDTEAM_LEAD_PROTOCOL;
return OFFICIAL_PROTOCOL;
}