Repository navigation
fix(dsh): activate on the DSH 0.2.2 tool-role result of the loopx skill call - #9297
Conversation
…ll call DSH 0.2.2 records a tool result as a message with role "tool" and toolCallId/isError on the message itself, not as a "tool-result" block in a user message. The activation fold only knew the older block shape, so a model-initiated loopx skill call never activated the Driver there. Accept both shapes; an error result still does not activate. Signed-off-by: xiaobaifly7 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
在 DSH 0.2.2-rc.3 中让模型调用 loopx 技能的用户,需要成功返回后由现有 Driver 继续该 Session。 该 Host 用 tool 角色消息返回技能调用结果。基线只识别旧 user 角色内的结果块,成功调用也不会进入续跑。 现有 Driver 在收到同一 call ID 的成功 tool 角色结果后安排一次续跑。失败结果仍不触发。 只补充同一 Session 的结果载体,不创建 Goal 绑定,不改变额度和已绑定宿主的唤醒权限。
改动思路 / Approach
现有权威和消费者足以解决问题。README 规定只有真实的同会话成功调用可以激活。继续用 Driver 的原有归约器匹配调用和结果,只接纳上游增加的载体。无需新状态、迁移或把错误分支转成成功。 只补充同一 Session 的结果载体,不创建 Goal 绑定,不改变额度和已绑定宿主的唤醒权限。 原先的匹配前提仍适用。失败输入继续走原有拒绝路径,只有满足现有约束的记录才能完成这一步。未调用、失败调用、普通文字和不匹配调用仍不触发。旧 user 角色结果继续由原有匹配逻辑处理。
具体改动 / Changes
精确头的净差异为两个文件 +41/-2。生产代码在已存在的匹配函数中处理当前场景,测试加入正常回读、失败或不匹配边界。README 规定只有真实的同会话成功调用可以激活。继续用 Driver 的原有归约器匹配调用和结果,只接纳上游增加的载体。 依现有合同核验了 original_9297_contract 和 unchanged_negative_gate,两个约束均有执行证据。当前主干与精确头的三方合成未产生冲突。 现有合同
关键代码讲解
- exactModelActivationCall 只收录名称精确为 skill、JSON 参数明确命名 loopx 的模型调用。 源码
- foldActivationEvent 通过同一 Session 内已记录的 call ID 匹配成功结果,保留失败和旧消息的处理。 源码
对主干的风险 / Risks
PASS。精确源码的 Driver 141 项通过,展示成功结果触发一次续跑。锁定的 DSH Session 和 LLM 依赖声明均确认 0.2.2-rc.3 的消息角色和字段。 在相同依赖和测试中替换为基线 Driver,新结果形态不会到达续跑。精确头现有回归覆盖错误结果,旧结果、普通文字和 Session 绑定用例仍通过。 包的 Driver 141 项、类型检查及 host/client 构建通过。使用真实 DSH 消息构造器的独立测试覆盖了成功、失败和错误 call ID。全包和 quality 阶段出现旧 Pause 回执在短轮询窗口内未出现。该用例调用 GoalBar 操作服务,不经过本次变化的技能激活归约器,单独运行时基线和准确头均通过。同一精确头降低本地测试并发后,全包 373 项通过。基线全包 372 项通过。 精确 Git 检出的全包结果为 ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯。 快速预合并 4 项直接检查通过,选中检查 2 项通过。未通过项已保留下列原始结果。 python3 examples/canary/dsh-loopx-plugin-validation.py --phase quality。 适用范围与残余风险已限定。Driver 接入验证使用固定版本的 DSH 消息类型和隔离的宿主夹具。未实际运行付费模型或实装宿主。
语义与 CI 对齐
使用现有协议、既有匹配条件和状态投影。未调用、失败调用、普通文字和不匹配调用仍不触发。旧 user 角色结果继续由原有匹配逻辑处理。 比较原实现与当前头的结果,没有依赖远端 CI。 回归测试
我的整体评价 / Verdict
没有阻止批准的问题。该改动恢复了正常且已经获准的后续路径,降低合法工作因数据形状中断的风险,保留错误、授权、写回和调度约束。变更在后台事件归约器,没有更改 GoalBar 或可视布局。 Driver 接入验证使用固定版本的 DSH 消息类型和隔离的宿主夹具。未实际运行付费模型或实装宿主。
English verdict: APPROVE at 5d83bcb. Recognizes the pinned DSH 0.2.2-rc.3 successful tool-role result for the matched LoopX skill call while preserving legacy and failure gates.
Goal And Delivered Outcome
tool, withtoolCallId/isErroron the message itself, not as atool-resultblock in a user message. The activation fold only knew the older shape, so a model-initiatedloopxskill call never activated the Driver on DSH 0.2.2.main.Author Declaration
Implemented against
foldActivationEventfoldActivationEventmain's Driver and passes here. Existing legacy-shape activation tests still pass.Scope And Continuation
Validation
unitpassedtests/driver.spec.ts141/141unitpassedmain(18 pre-existing on Windows)staticpassedpnpm run typecheckFrontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
N/A
Boundary Checklist
none.Signed-off-bytrailer (git commit -s).🤖 Generated with Claude Code