[Feat] surface spawnedBy in chat and agent broadcast payloads (#63244)

Merged via squash.

Prepared head SHA: ff0fe5db38
Co-authored-by: samzong <13782141+samzong@users.noreply.github.com>
Co-authored-by: frankekn <4488090+frankekn@users.noreply.github.com>
Reviewed-by: @frankekn
This commit is contained in:
samzong
2026-04-29 20:48:59 +08:00
committed by GitHub
parent 390a7598c9
commit 443ca4865d
7 changed files with 482 additions and 1 deletions

View File

@@ -385,6 +385,7 @@ public struct AgentEvent: Codable, Sendable {
public let seq: Int
public let stream: String
public let ts: Int
public let spawnedby: String?
public let data: [String: AnyCodable]
public init(
@@ -392,12 +393,14 @@ public struct AgentEvent: Codable, Sendable {
seq: Int,
stream: String,
ts: Int,
spawnedby: String?,
data: [String: AnyCodable])
{
self.runid = runid
self.seq = seq
self.stream = stream
self.ts = ts
self.spawnedby = spawnedby
self.data = data
}
@@ -406,6 +409,7 @@ public struct AgentEvent: Codable, Sendable {
case seq
case stream
case ts
case spawnedby = "spawnedBy"
case data
}
}
@@ -4753,6 +4757,7 @@ public struct ChatInjectParams: Codable, Sendable {
public struct ChatEvent: Codable, Sendable {
public let runid: String
public let sessionkey: String
public let spawnedby: String?
public let seq: Int
public let state: AnyCodable
public let message: AnyCodable?
@@ -4764,6 +4769,7 @@ public struct ChatEvent: Codable, Sendable {
public init(
runid: String,
sessionkey: String,
spawnedby: String?,
seq: Int,
state: AnyCodable,
message: AnyCodable?,
@@ -4774,6 +4780,7 @@ public struct ChatEvent: Codable, Sendable {
{
self.runid = runid
self.sessionkey = sessionkey
self.spawnedby = spawnedby
self.seq = seq
self.state = state
self.message = message
@@ -4786,6 +4793,7 @@ public struct ChatEvent: Codable, Sendable {
private enum CodingKeys: String, CodingKey {
case runid = "runId"
case sessionkey = "sessionKey"
case spawnedby = "spawnedBy"
case seq
case state
case message