Skip to content

Commit 30539cd

Browse files
committed
chore(mothership): sync protocol — span envelope type + subagent scope
Claude-Session: https://claude.ai/code/session_01CgaxNAaeD3taGdghbXn17w
1 parent a4d838e commit 30539cd

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

apps/sim/lib/mothership/generated/protocol.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,23 @@ export interface ExecuteMessage {
136136
*/
137137
export interface StreamEnvelope {
138138
v: 1;
139-
type: "session" | "text" | "tool" | "run" | "resource" | "error" | "complete";
139+
type: "session" | "text" | "tool" | "span" | "run" | "resource" | "error" | "complete";
140140
seq: number;
141141
/** ISO timestamp. */
142142
ts: string;
143143
stream: { streamId: string; chatId?: string | undefined; cursor?: string | undefined };
144144
trace?: { requestId?: string | undefined } | undefined;
145+
/** Subagent-lane attribution (mothership-stream-v1 scope): frames carrying it render
146+
* inside the named root-level lane instead of the main transcript. */
147+
scope?: StreamScope | undefined;
145148
payload: Record<string, unknown>;
146149
}
150+
151+
/** One subagent lane: keyed by the delegating tool call; agentId/spanId identify the lane. */
152+
export interface StreamScope {
153+
lane: "subagent";
154+
agentId?: string | undefined;
155+
parentToolCallId?: string | undefined;
156+
spanId?: string | undefined;
157+
parentSpanId?: string | undefined;
158+
}

0 commit comments

Comments
 (0)