feat(security): 代审口径 A 落地(仅子代理发起的敏感调用做实质判定 + fail-closed + 理由进审计与小字)
This commit is contained in:
1 parent
fa850f9599
commit
20160c66d8
13 files changed
+1479
-83
No files matched your search
@@ -304,6 +304,10 @@ func (s *Scheduler) run(ctx context.Context, sub *SubAgent) {
|
||||
// 工具白名单(design/05 §7 裁决 02.4.1)随运行上下文传递:名单非空时
|
||||
// 只放行所列工具;空名单=全开,与挂载前的行为一致。
|
||||
runCtx = loop.WithToolWhitelist(runCtx, sub.ToolWhitelist)
|
||||
// 派给该子代理的任务目标随运行上下文传递(design/11 §4 的口径 A):敏感操作代审
|
||||
// 据此**结构化**识别「这次调用由子代理发起」,并拿到判「有没有越界」所需的任务,
|
||||
// 而不是从提示词、模型文本或会话 id 形态去猜(项目红线)。
|
||||
runCtx = loop.WithSubagentTask(runCtx, sub.Goal)
|
||||
// 派发标记挂在原始 ctx 上(不是 runCtx):它是这一批派发/收束的
|
||||
// orchestration 节点(裁决 11.4.2),与子代理泳道根并列成链。
|
||||
orchSpan := s.orchSpan(ctx, sub)
|
||||
|
||||
Reference in new issue
Block a user