精简动作审查输入并支持审批来源定位 (#125)

* fix: 精简审查背景并区分人工消息与调度输入

* fix: 模型审查仅提交当前调用与选定背景

* feat: 审批来源定位原会话并移除 Worker 审查背景
This commit is contained in:
RuoJi6 authored and GitHub committed 2026-09-15 23:51:37 +08:00
1 parent 0d6fa880b8
commit 04d25eb133
30 files changed
+1143 -465

No files matched your search

+2 -2
View File
@@ -448,8 +448,8 @@ func (i *Interceptor) Judge(ctx context.Context, tool string, arguments json.Raw
var err error
var modelInput []byte
if contextErr != nil {
// Missing task policy must not become an implicit permission via the
// model's configurable fail-open strategy. A human can resolve the gap.
// Invalid current arguments cannot be reviewed faithfully, regardless of
// the configured model-failure strategy. A human must resolve the input.
out = Decision{Action: "ask", ModelFallback: true, Message: "审查上下文不完整,需要人工确认:" + contextErr.Error()}
} else {
modelInput, _ = json.Marshal(input)