mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 11:30:22 +08:00
release: 1.1.84,尾部锚点与子代理审批接管,红队模式中文化,#194/#188
- 接线 lib/anchor.js:锚点物理追加到 system prompt sections 末尾, identity.js 支持 anchorText(对象/字符串两种入参),已有同名段先滤再追加; 锚点改为跟随操作者语言,删除写死的英文开头句(红队回答变英文的根因) - 接线 lib/subagent-control.js:子会话 approval/policy=never 改回 ask, 并在 approval/request 瀑布放行;anchorMode/subagentControl 提供回滚开关 - index.js:真实 anchorApplied / injectTail 判定、审批策略探针、iso 分支 注册锚点、applyHostHooks 注册锚点与子代理接管并统一释放 - office 技能自愈:core/desktop 增加 healOfficeSkillsRuntimeOnDisk,桌面端触发 - 红队模式中文化:preset 文案、角色名、五阶段、25 项计分规则与 POC 分类、 技能修复说明、环境适配提示、面板报错、成果报告与复现报告 - #194:hung-operator 改按内容变更缓存,加风暴/慢调用熔断;WeakMap 去重 同次 assemble 的重复改写;新增 #91 记录宿主信号退出的持久化日志 - #188(rc.4 专属部分):新增 #89 沙箱策略去品牌、#90 skill-badge 中文描述, 扩展 #32/#53 的 rc.3 变体与 marker,均 optional - 新增锚点接线与红队文案测试,81/81 通过
This commit is contained in:
1 parent
97c5de75fa
commit
624976ed1d
19 files changed
+1521
-847
No files matched your search
@@ -425,7 +425,7 @@ export function apply(ctx) {
|
||||
if (!store) {
|
||||
ctx.logger?.warn?.('redteam-tools: host ctx.redteam unavailable — tools will report store_missing')
|
||||
store = {
|
||||
openEngagement: () => { throw new Error('redteam store unavailable') },
|
||||
openEngagement: () => { throw new Error('红队资产库不可用') },
|
||||
listEngagements: () => [],
|
||||
stats: () => ({}),
|
||||
}
|
||||
@@ -984,7 +984,7 @@ export function apply(ctx) {
|
||||
async execute(args, exec) {
|
||||
const id = resolveEngagement(store, exec, args.engagement)
|
||||
const asset = store.getAsset(id, args.id)
|
||||
if (asset === undefined) return JSON.stringify({ ok: false, error: 'asset not found' })
|
||||
if (asset === undefined) return JSON.stringify({ ok: false, error: '资产不存在' })
|
||||
return JSON.stringify({ ok: true, asset }, null, 2)
|
||||
},
|
||||
})))
|
||||
@@ -1038,7 +1038,7 @@ export function apply(ctx) {
|
||||
async execute(args, exec) {
|
||||
const id = resolveEngagement(store, exec, args.engagement)
|
||||
const found = store.listPrompts(id).find((p) => p.role === args.role)
|
||||
if (found === undefined) return JSON.stringify({ ok: false, error: 'unknown role' })
|
||||
if (found === undefined) return JSON.stringify({ ok: false, error: '未知角色' })
|
||||
return JSON.stringify({
|
||||
ok: true, role: found.role, title: found.title,
|
||||
updated_at: found.updated_at, prompt: found.content,
|
||||
@@ -2072,11 +2072,11 @@ export function apply(ctx) {
|
||||
})))
|
||||
|
||||
function ledgerOf(engagementId) {
|
||||
if (typeof store.db !== 'function') throw new Error('redteam store unavailable')
|
||||
if (typeof store.db !== 'function') throw new Error('红队资产库不可用')
|
||||
return new EvidenceLedger(store.db(engagementId))
|
||||
}
|
||||
function unknownsOf(engagementId) {
|
||||
if (typeof store.db !== 'function') throw new Error('redteam store unavailable')
|
||||
if (typeof store.db !== 'function') throw new Error('红队资产库不可用')
|
||||
return new UnknownRegistry(store.db(engagementId))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user