feat(gateway,loop): A1 流式帧附加 sessionId/turnId — 多会话并发流式可路由
- model.StreamEvent 增 SessionID/TurnID(适配器在 loop 之下,恒留零值) - loop 在回合边界注入;覆盖 stream.go 与 tools.go 的 tool_execution 发射点 - 网关 runTurn 每回合生成 turnID 并经 loop.WithTurnID 挂进运行上下文(编排层与 legacy 直连的唯一收口点);broadcastStream 填充 wsEvent - Docs/api-client v0.36 契约与变更日志;v0.10 条目标注为已被补齐 - 新增 loop/gateway 测试,含变异验证
This commit is contained in:
1 parent
29aa60d0eb
commit
61cc32c44b
9 files changed
+332
-10
No files matched your search
@@ -312,7 +312,10 @@ func (l *Loop) emitToolExecution(ctx context.Context, name, phase string) {
|
||||
if l.onStream == nil || isMutedBroadcast(ctx) {
|
||||
return
|
||||
}
|
||||
l.onStream(model.StreamEvent{Kind: model.StreamKindToolExecution, Delta: phase + ":" + name})
|
||||
ev := model.StreamEvent{Kind: model.StreamKindToolExecution, Delta: phase + ":" + name}
|
||||
ev.SessionID = loopSession(ctx)
|
||||
ev.TurnID = loopTurn(ctx)
|
||||
l.onStream(ev)
|
||||
}
|
||||
|
||||
// invokeParallel runs calls at idxs concurrently, capped at the loop's
|
||||
|
||||
Reference in new issue
Block a user