Open History to see the last commit
1---
2id: WsRunContext
3title: WsRunContext
4---
5
6Defined in: [packages/ai/src/stream-to-websocket.ts:62](https://github.com/TanStack/ai/blob/main/packages/ai/src/stream-to-websocket.ts#L62)
7
8Per-turn context for one inbound `run` frame on a conversation-scoped socket.
9
10## Properties
11
12### forwardedProps?
13
14```ts
15optional forwardedProps?: Record<string, unknown>;
16```
17
18Defined in: [packages/ai/src/stream-to-websocket.ts:66](https://github.com/TanStack/ai/blob/main/packages/ai/src/stream-to-websocket.ts#L66)
19
20***
21
22### messages
23
24```ts
25messages: (
26 | UIMessage<unknown>
27 | ModelMessage<
28 | string
29 | ContentPart<unknown, unknown, unknown, unknown, unknown>[]
30 | null>)[];
31```
32
33Defined in: [packages/ai/src/stream-to-websocket.ts:63](https://github.com/TanStack/ai/blob/main/packages/ai/src/stream-to-websocket.ts#L63)
34
35***
36
37### request
38
39```ts
40request: Request;
41```
42
43Defined in: [packages/ai/src/stream-to-websocket.ts:68](https://github.com/TanStack/ai/blob/main/packages/ai/src/stream-to-websocket.ts#L68)
44
45Synthetic per-turn request carrying `?runId=` so durability keys correctly.
46
47***
48
49### runId
50
51```ts
52runId: string;
53```
54
55Defined in: [packages/ai/src/stream-to-websocket.ts:65](https://github.com/TanStack/ai/blob/main/packages/ai/src/stream-to-websocket.ts#L65)
56
57***
58
59### signal
60
61```ts
62signal: AbortSignal;
63```
64
65Defined in: [packages/ai/src/stream-to-websocket.ts:70](https://github.com/TanStack/ai/blob/main/packages/ai/src/stream-to-websocket.ts#L70)
66
67Aborts on socket close or an `abort` control frame for this run.
68
69***
70
71### threadId
72
73```ts
74threadId: string;
75```
76
77Defined in: [packages/ai/src/stream-to-websocket.ts:64](https://github.com/TanStack/ai/blob/main/packages/ai/src/stream-to-websocket.ts#L64)