Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

protocol.md

480 lines24.0 KB

1---
2title: The harness wire protocol
3id: harness-protocol
4order: 3
5description: "Every route, frame, and harness.* event of the harness session stream. Use it to write your own client or transport in any language."
6keywords:
7 - tanstack ai
8 - harness
9 - protocol
10 - AG-UI
11 - websocket
12 - server-sent events
13---
14​
15You want a client for a harness that is not `useChat` or `createHarnessClient`: a Python service, a mobile app, or a proxy of your own. This page lists every route, frame, and `harness.*` event, so you can write that client in any language.
16​
17Send a prompt to a thread with `curl`:
18​
19```bash
20curl -X POST https://example.com/api/harness/control \
21 -H 'authorization: Bearer my-token' \
22 -H 'content-type: application/json' \
23 -d '{"threadId":"thread-1","input":{"op":"prompt","message":"Hello"}}'
24```
25​
26The command prints the receipt, for example `{"inputId":"in-1","status":"accepted","operationId":"op-1"}`. The first prompt also makes the thread. Then open the session stream of the thread:
27​
28```bash
29curl -N -H 'authorization: Bearer my-token' \
30 'https://example.com/api/harness/events?threadId=thread-1&v=2'
31```
32​
33With no cursor, the stream starts at the first event of the thread. It shows the hello frame, then one SSE event per session event, and a ping comment when the stream is idle:
34​
35```text
36data: {"type":"harness.hello","v":2,"threadId":"thread-1"}
37​
38id: 4
39data: {"type":"harness.event","cursor":"4","threadId":"thread-1","operationId":"op-1","event":{"type":"TEXT_MESSAGE_CONTENT","messageId":"m-1","delta":"Hi"}}
40​
41: ping
42```
43​
44The rest of this page is the reference for each part.
45​
46## Transports
47​
48The server is the handler of [Connect clients to a harness](./connect). One handler and one socket serve every transport on this page:
49​
50```ts group=harness-protocol-server
51import { createHarnessHost, defineHarness, membersOnly } from '@tanstack/ai-harness'
52import { createHarnessHandler, handleHarnessSocket } from '@tanstack/ai-harness/server'
53import { memoryPersistence } from '@tanstack/ai-persistence'
54import { openaiText } from '@tanstack/ai-openai'
55import type { WebSocketLike } from '@tanstack/ai'
56​
57export const assistant = defineHarness({
58 name: 'acme/assistant',
59 adapter: openaiText('gpt-6.1-sol'),
60})
61​
62const host = createHarnessHost({
63 persistence: memoryPersistence(),
64 access: {
65 getUser: ({ request }) =>
66 request.headers.get('authorization') === `Bearer ${process.env.HARNESS_TOKEN}`
67 ? { id: 'user-1' }
68 : null,
69 rules: membersOnly(),
70 },
71})
72​
73// Mount it on `/api/harness/*`.
74export const handler = createHarnessHandler({ host, harness: assistant })
75​
76// Call it from the upgrade handler of your server.
77export function onUpgrade(socket: WebSocketLike, request: Request) {
78 handleHarnessSocket({ host, harness: assistant, socket, request })
80```
81​
82Pick the transport that your client can use:
83​
84| Transport | Events | Inputs | Use it when |
85| --- | --- | --- | --- |
86| HTTP | `GET events` (SSE) | `POST control` (JSON) | Your client can read SSE. This works through most proxies. |
87| WebSocket | `harness.event` frames | `harness.input` frames | You want one connection for events and inputs. |
88| Stdio worker | NDJSON on stdout | NDJSON on stdin | You start the harness as a child process. |
89​
90The socket and the stdio worker use the same frames. The HTTP routes send the same `harness.*` frames as SSE `data`.
91​
92### HTTP routes
93​
94These routes are enough for a full client. [Connect clients to a harness](./connect#serve-the-session-over-http) lists the others (media, sessions, and more).
95​
96- `GET events?threadId=&v=&from=`: the session stream as SSE. Each SSE `data` is one frame. On a host with `access`, a thread that has no session yet answers `404`, so send the first input before you open it.
97- `POST control`: the body is `{ threadId, input }`. The answer is the receipt as JSON.
98- `GET snapshot?threadId=` and `GET transcript?threadId=`: the state and the saved messages of the thread. When the client starts, load both.
99- `GET capabilities`: the AG-UI capabilities. `custom.tanstack.protocol` is the protocol version of the server.
100- `GET host-events?v=`: the status changes and session list changes that the user may read, as SSE. Its `harness.hello` frame has no `threadId`.
101- `POST run` and `GET run`: standard AG-UI for `useChat`. These routes send plain AG-UI events, with no `harness.*` frames around them.
102​
103`POST control` answers with these statuses:
104​
105- `200`: the receipt, `{ inputId, status, operationId?, reason? }`.
106- `400`: `{ error }`. The input has a bad shape, or `threadId` is missing.
107- `401`: `getUser` returned `null`.
108- `403`: `{ error: 'forbidden' }`. The host refused the action.
109​
110A `rejected` receipt is still `200`. Its `reason` says why, for example `not_exposed`.
111​
112### The WebSocket
113​
114The first frame from the client must be `harness.subscribe`. The host reads the user from the upgrade request, with `getUser`. A browser cannot set headers on a WebSocket, so `getUser` must read a cookie or a token in the URL.
115​
116```ts group=harness-protocol-socket-client
117import type { ControlFrame, HostFrame } from '@tanstack/ai-harness/server'
118​
119function isFrame(value: unknown): value is HostFrame {
120 return (
121 typeof value === 'object' &&
122 value !== null &&
123 'type' in value &&
124 typeof value.type === 'string'
125 )
127​
128const socket = new WebSocket('wss://example.com/api/harness/socket')
129const send = (frame: ControlFrame) => socket.send(JSON.stringify(frame))
130​
131socket.addEventListener('open', () => {
132 send({ type: 'harness.subscribe', threadId: 'thread-1', v: 2 })
133})
134​
135socket.addEventListener('message', (message) => {
136 const frame: unknown = JSON.parse(String(message.data))
137 if (!isFrame(frame)) return
138 if (frame.type === 'harness.hello') {
139 send({
140 type: 'harness.input',
141 requestId: 'req-1',
142 input: { op: 'prompt', message: 'Hello' },
143 })
144 }
145 if (frame.type === 'harness.receipt') console.log(frame.requestId, frame.status)
146 if (frame.type === 'harness.event') console.log(frame.cursor, frame.event.type)
147 if (frame.type === 'harness.error') console.warn(frame.code, frame.message)
148})
149```
150​
151The socket closes with these codes:
152​
153| Code | Why | What the client does |
154| --- | --- | --- |
155| `4401` | `getUser` refused the user. | Sign in again. |
156| `4403` | The user cannot read the thread, or lost access. | Stop. |
157| `4400` | The server does not speak the `v` of the subscribe. | Stop. Use a client of the version of the server. |
158| `4408` | The client read too slowly. See [Stream values](#stream-values). | Subscribe again from the last cursor. |
159| `1011` | The event feed of the thread ended. | Subscribe again from the last cursor. |
160​
161### The stdio worker
162​
163`runHarnessWorker` reads frames from stdin and writes frames to stdout, one JSON object per line. Put it in its own script:
164​
165```ts group=harness-protocol-worker
166import { defineHarness } from '@tanstack/ai-harness'
167import { runHarnessWorker } from '@tanstack/ai-harness/worker'
168import { openaiText } from '@tanstack/ai-openai'
169​
170const assistant = defineHarness({
171 name: 'acme/assistant',
172 adapter: openaiText('gpt-6.1-sol'),
173})
174​
175await runHarnessWorker(assistant)
176```
177​
178Start the script as a child process, then write frames to it:
179​
180```ts group=harness-protocol-worker-client
181import { spawn } from 'node:child_process'
182import { createInterface } from 'node:readline'
183import type { ControlFrame } from '@tanstack/ai-harness/server'
184​
185const worker = spawn('node', ['worker.js'], { stdio: ['pipe', 'pipe', 'inherit'] })
186const send = (frame: ControlFrame) => worker.stdin.write(`${JSON.stringify(frame)}\n`)
187​
188send({ type: 'harness.subscribe', threadId: 'thread-1', v: 2 })
189send({ type: 'harness.input', requestId: 'req-1', input: { op: 'prompt', message: 'Hello' } })
190​
191for await (const line of createInterface({ input: worker.stdout })) {
192 console.log(line)
194```
195​
196- The worker runs the frames in order, so an input right after the subscribe is safe.
197- The worker has no login. Every input runs with no user.
198- The worker sends no heartbeat.
199- When stdin closes, the worker exits. It also exits after an `unsupported_version` error.
200​
201To ship a harness as a worker with a checked bundle, see [Deploy a harness](./deploy).
202​
203## Frames
204​
205Each frame is one JSON object with a `type`. Ignore a frame with a `type` that you do not know. A later version of the server can add frames.
206​
207From the client to the host (socket and stdio worker):
208​
209| `type` | Fields | What it does |
210| --- | --- | --- |
211| `harness.subscribe` | `threadId`, `from?`, `v?` | The first frame. Starts the event stream after the cursor `from`. |
212| `harness.input` | `requestId`, `input`, `traceparent?` | Sends one input. `input` is the same object as the `input` of `POST control`. |
213| `harness.snapshot` | none | Asks for the snapshot of the session. |
214​
215`input` is one of the ops of [Send inputs to a session](./inputs), for example `{ op: 'prompt', message }` or `{ op: 'cancel', operationId }`. Pick a new `requestId` for each input. The receipt and any error frame repeat it.
216​
217From the host to the client:
218​
219| `type` | Fields | When |
220| --- | --- | --- |
221| `harness.hello` | `v`, `threadId` | First, after a subscribe that the host accepts. On SSE, the first event of `GET events`. |
222| `harness.receipt` | `requestId`, `status`, `inputId?`, `operationId?`, `reason?` | The answer to one `harness.input`. |
223| `harness.event` | `cursor`, `threadId`, `operationId`, `event` | One event of the session. |
224| `harness.snapshot` | `snapshot` | The answer to a `harness.snapshot` frame. |
225| `harness.error` | `message`, `code`, `requestId` | Something failed. See [Errors](#errors). |
226| `harness.ping` | none | A heartbeat on the socket. Ignore it. |
227​
228### The event frame
229​
230- `event` is an AG-UI event in its wire form. It has only the keys of the AG-UI spec.
231- `operationId` is the run that made the event. It is also the AG-UI `runId`.
232- `threadId` is the thread that keeps the event. On the stream of a thread, it is that thread.
233- The AG-UI `RUN_STARTED` event of a child run has `parentRunId`: the run that started it. A child run is an agent run that agent code started, or that a tool of a turn started. A top-level run has no `parentRunId`.
234- An event of a subagent also has `subagentRunId` on the `event` itself.
235​
236The stream of a thread has the events of every run of its tree, in one order. To rebuild the tree, keep the `parentRunId` of the `RUN_STARTED` of each `operationId`. For example, a lead agent that runs two helpers in a group gives these frames (the `event` is cut):
237​
238```text
239{"type":"harness.event","cursor":"9","threadId":"thread-1","operationId":"op-lead","event":{"type":"RUN_STARTED","runId":"op-lead",...}}
240{"type":"harness.event","cursor":"12","threadId":"thread-1","operationId":"op-a","event":{"type":"RUN_STARTED","runId":"op-a","parentRunId":"op-lead",...}}
241{"type":"harness.event","cursor":"13","threadId":"thread-1","operationId":"op-b","event":{"type":"RUN_STARTED","runId":"op-b","parentRunId":"op-lead",...}}
242```
243​
244`op-a` and `op-b` are children of `op-lead`.
245​
246The status of a receipt is `accepted`, `queued`, or `rejected`. A `rejected` receipt has a `reason`, for example `not_exposed`, `not_running`, or `unknown_agent`.
247​
248Give each input an `inputId`, and send the same id again after a lost answer. A `prompt`, `command`, `agent`, or `append` input with the same `inputId` runs once. The `inputId` of its receipt is the id that you sent.
249​
250The socket handles the frames of one connection in the order they came.
251​
252## Cursors and reconnects
253​
254Each `harness.event` has a `cursor`. On SSE, the `id` of each event is the same cursor. A cursor is an opaque string. Store the last one, and do not parse it.
255​
256To continue after a disconnect, connect again with the last cursor:
257​
258- On SSE, send it as the `Last-Event-ID` header, or as `?from=`. When you send both, the header wins.
259- On the socket and the stdio worker, send it as `from` in `harness.subscribe`.
260​
261```bash
262curl -N -H 'authorization: Bearer my-token' -H 'Last-Event-ID: 4' \
263 'https://example.com/api/harness/events?threadId=thread-1&v=2'
264```
265​
266The stream starts with the first event after that cursor. A disconnect does not stop a running turn. To stop a turn, send a `cancel` input.
267​
268A cursor works on every server and after a restart only on a durable host (`stores.log`). See [Cursors](./connect#cursors).
269​
270### When events are missing
271​
272Sometimes the server no longer has the events after your cursor. A truncate of the log removes old records, for example. Then the stream sends one `CUSTOM` event with the name `harness.gap`, and continues from the first event that it has:
273​
274```json
276 "type": "harness.event",
277 "cursor": "120",
278 "threadId": "thread-1",
279 "operationId": "session",
280 "event": {
281 "type": "CUSTOM",
282 "name": "harness.gap",
283 "value": { "from": "12", "resumeAt": "120", "reason": "truncated" }
284 }
286```
287​
288- `from` is the cursor that you sent.
289- `resumeAt` is the cursor of this event. The stream continues after it.
290- `reason` is `truncated` (a truncate of the log) or `evicted` (the server memory dropped old events).
291​
292When you get `harness.gap`, do these steps:
293​
2941. Delete the state that you built from events.
2952. Load `GET snapshot` and `GET transcript` again. On the socket, send `harness.snapshot`.
2963. Store `resumeAt` as your cursor, and continue to read the stream.
297​
298A [session view](./custom-ui) does these steps for you.
299​
300## Protocol version
301​
302The protocol version is `2`.
303​
304- On SSE, send `?v=2` on `GET events`.
305- On the socket and the stdio worker, send `v: 2` in `harness.subscribe`.
306- With no `v`, the server uses its current version.
307​
308The `harness.hello` frame gives the version that the server uses. If the server does not speak your `v`, it sends one error frame and closes the stream:
309​
310```json
312 "type": "harness.error",
313 "message": "Protocol version 3 is not supported. This host speaks version 2.",
314 "code": "unsupported_version",
315 "requestId": "req-1"
317```
318​
319The server speaks one version. Use a client of that version.
320​
321## Errors
322​
323A `harness.error` frame has a `code` and a `requestId`. `message` is for people, so read `code` in your code.
324​
325| `code` | Why | Does the stream close? |
326| --- | --- | --- |
327| `unauthorized` | `getUser` refused the user. | Yes. |
328| `forbidden` | The user cannot read the thread, or lost access. On the socket, also when the host refuses one input. | Yes. When the host refuses one input, no. |
329| `invalid_frame` | The frame is not valid JSON, has an unknown `type` or a bad `input`, comes before `harness.subscribe`, or is a second `harness.subscribe`. | No. |
330| `unsupported_version` | The server does not speak the `v` that you sent. | Yes. |
331| `slow_consumer` | The client read too slowly. | Yes. |
332| `internal` | The server failed to read the events, or failed to apply one input. | When the read failed, yes: connect again from the last cursor. When one input failed, no. |
333​
334On HTTP, a refused login or action before the stream starts is the `401` or `403` status of the request, with no frame.
335​
336`createHarnessClient` reads these frames for you. After `slow_consumer`, `events()` and `hostEvents()` connect again. Any other code ends the read with a `HarnessProtocolError`, which has the `code` and the `message`.
337​
338The `requestId` connects the error to its request:
339​
340- On the socket and the stdio worker, it is the `requestId` of the frame that failed. A frame with no `requestId` gets an id from the server. On the socket, that id is the id of the upgrade request.
341- On HTTP, the id is your `X-Request-Id` header when it is a short safe id: 1 to 128 letters, digits, `-`, `_`, `.`, or `:`. Else the server makes a new UUID.
342- Every HTTP answer of the handler sends the id back in the `X-Request-Id` header.
343​
344Log the `requestId` with your errors. Then you can find the request in the server logs.
345​
346## Stream values
347​
348A long stream passes through proxies and slow networks. The server keeps it open and protects itself with these values:
349​
350| Value | Option | Default | What happens |
351| --- | --- | --- | --- |
352| Heartbeat | `heartbeatMs` | 20 s | SSE gets a `: ping` comment. The socket gets `{"type":"harness.ping"}`. |
353| SSE queue | `sseQueueBytes` | 1 MiB | The server stops reading the log while this much data waits for the client. |
354| Socket buffer | `socketBufferBytes` | 8 MiB | Above this `bufferedAmount`, the server stops sending. It checks again every 50 ms. |
355| Slow close | `slowConsumerMs` | 30 s | If the client does not read for this long, the server sends `slow_consumer` and closes. |
356​
357- `POST run` and `GET run` also get the `: ping` comment. SSE parsers skip comments.
358- A slow client loses no events. The server reads them from the log when the client reads again.
359- Set the idle timeout of your proxy to more than the heartbeat.
360- A client can use the heartbeat to find a dead connection. `createHarnessClient` connects again when no bytes come for 60 s (its `idleTimeoutMs`). If you set `heartbeatMs` to 60 s or more, set a larger `idleTimeoutMs` on the client.
361- The stdio worker has no heartbeat and does not use these values.
362​
363To change a value, pass `stream` to the handler and to the socket. A value that you do not set keeps its default:
364​
365```ts group=harness-protocol-server
366// A proxy that closes idle streams after 15 s, and mobile clients that read slowly.
367const stream = { heartbeatMs: 10_000, slowConsumerMs: 60_000 }
368​
369export const slowNetworkHandler = createHarnessHandler({ host, harness: assistant, stream })
370​
371export function onSlowNetworkUpgrade(socket: WebSocketLike, request: Request) {
372 handleHarnessSocket({ host, harness: assistant, socket, request, stream })
374```
375​
376Each value must be a finite number above 0. If a value is not, `createHarnessHandler` and `handleHarnessSocket` throw at the start, and the error names the field.
377​
378## Traces
379​
380To join a turn to the trace of your app, send a W3C `traceparent`:
381​
382- On HTTP, send the `traceparent` header on `POST control` or `POST run`.
383- On the socket and the stdio worker, set `traceparent` on the `harness.input` frame.
384​
385```ts
386const response = await fetch('/api/harness/control', {
387 method: 'POST',
388 headers: {
389 'content-type': 'application/json',
390 traceparent: '00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01',
391 },
392 body: JSON.stringify({
393 threadId: 'thread-1',
394 input: { op: 'prompt', message: 'Hello' },
395 }),
396})
397console.log(response.headers.get('X-Request-Id'))
398```
399​
400What the harness does with it:
401​
402- It reads the `traceparent` of a message input only: `prompt`, `steer`, `followUp`, and the turn of `POST run`. Other inputs ignore it.
403- It drops a value that is not a valid W3C `traceparent`.
404- It stores the value on the `harness.input` record of the log. When another server owns the thread, the value goes to that server with the input.
405- When the input starts a turn, the server that runs the turn gives its `harness.operation` span a link to the value. A link is not a parent, so your trace UI shows the turn as a linked trace.
406​
407To give the host a tracer, see [Trace runs and report operations](./deploy#trace-runs-and-report-operations).
408​
409## Event catalog
410​
411A harness adds its own events to the stream as AG-UI `CUSTOM` events. `name` is the event name, and `value` has the fields below. Ignore a name that you do not know. A later version can add names.
412​
413In TypeScript, `HarnessEventValues` from `@tanstack/ai-harness` maps each name to its value type, and `HARNESS_EVENTS` has the names. A browser client imports `HARNESS_EVENTS` from `@tanstack/ai-harness/client`. `harness.plugin.warning` is the only name that is in neither.
414​
415### Runs
416​
417| `name` | `value` |
418| --- | --- |
419| `harness.operation.started` | `{ operationId, kind, agent? }`. `kind` is `chat`, `agent`, `command`, or `compact`. |
420| `harness.operation.finished` | `{ operationId, status }`. `status` is `completed`, `failed`, `cancelled`, or `interrupted`. Before it, a cancelled turn ends its open text message and sends `RUN_FINISHED` with `outcome: { type: 'cancelled' }`. A turn past its time limit sends `RUN_ERROR` with `code: 'timeout'`. |
421| `harness.operation.resumed` | `{ operationId, resumedFrom? }`. A host continued a run after another host stopped. |
422| `harness.turn.retry` | `{ operationId, retries, error: { message, code?, retryAfterMs? }, continued }`. `continued` is true when the model continues a partial answer. |
423| `harness.handoff` | `{ from, to, note?, runId, by, waitId? }`. `from` and `to` are an agent name, `null` for the main model, or `{ human: true }`. `by` is `tool`, `code`, `router`, or `operator`. A handoff to a person has the `waitId` of its wait. |
424| `harness.usage` | `{ model, sender?, source?, label?, usage, total }`. `usage` is this model call, and `total` is the new total of the thread. `source` is `plugin:<name>`, `router`, or `transfer`. A turn or an agent run has no `source`. |
425​
426### Inputs
427​
428| `name` | `value` |
429| --- | --- |
430| `harness.input.accepted` | `{ inputId, op, message? }`. `message` is the user message of a `prompt`, `steer`, or `followUp`, without the secrets of the session. |
431| `harness.input.queued` | `{ inputId, delivery }`. The owner of the log stored the input, and it waits behind the running turn or the turns before it. `delivery` is `steer` or `queue`. |
432| `harness.input.applied` | `{ inputId, operationId }` |
433| `harness.input.rejected` | `{ inputId, reason }` |
434| `harness.input.settled` | `{ inputId, operationId?, outcome, error? }`. `outcome` is `completed`, `aborted`, `interrupted`, or `failed`. Only `failed` has `error: { message, code? }`. |
435| `harness.input.delivery` | `{ inputId, delivery }`. A `setDelivery` input moved a waiting input. |
436​
437### Waits for a person
438​
439| `name` | `value` |
440| --- | --- |
441| `harness.wait.opened` | `{ waitId, kind, runId, message?, expiresAt? }`. A wait opened in the log: a question, a `step.ask`, a handoff to a person, or a wait of a background agent run. `kind` is `approval`, `question`, `sign-in`, `client-tool`, or `human`. `expiresAt` is in epoch milliseconds. The interrupts of a turn come in its `RUN_FINISHED`. |
442| `harness.wait.settled` | `{ waitId, outcome }`. `outcome` is `answered`, `cancelled`, or `expired`. |
443| `harness.question` | `{ questionId, message, schema?, secret?, url? }`. Answer it with the `answer` input. |
444| `harness.question.answered` | `{ questionId }` |
445| `harness.auth_required` | `{ connector, url?, userCode? }`. A tool needs a sign-in. |
446​
447### Session changes
448​
449When you get one of these events, load the part of the session that it names again.
450​
451| `name` | `value` |
452| --- | --- |
453| `harness.config.changed` | `{ key, value }` |
454| `harness.settings.changed` | `{ settings }` |
455| `harness.commands.changed` | `{}`. Load `GET describe` again. |
456| `harness.reloaded` | `{ error? }`. The plugins started again. Load `GET describe` again. |
457| `harness.reset` | `{ inputId, note? }`. The next turn starts a fresh model context. |
458| `harness.revert` | `{ messageId }`. `messageId` is `null` when no revert stands. Load `GET transcript` again. |
459​
460### Files, plugins, and hosts
461​
462| `name` | `value` |
463| --- | --- |
464| `harness.media` | A media record: `{ id, threadId, kind, mimeType, name, size, createdAt, source }`. See [Send and show media](./media). |
465| `harness.plugin.event` | `{ plugin, name, value }`. An event that a plugin sent. |
466| `harness.plugin.warning` | `{ plugin, message }`. A plugin hook, a listener, or a write that no one waits for failed. The work goes on. |
467| `harness.ownership.changed` | `{ epoch, reason }`. A new host owns the log, from its first write. `reason` is `taken_over` when the ownership of the old owner expired with no release (it stopped), else `acquired`. |
468| `harness.stranded` | `{ operationId?, hostId? }`. The workspace that the log binds the thread to is gone, so the workspace tools fail. `operationId` is the run that tried it. `hostId` is the host of a folder. |
469| `harness.transferred` | `{ transferId, from?, to? }`. `from` and `to` are `{ threadId }`. The conversation came from, or went to, another thread. |
470| `harness.gap` | `{ from, resumeAt, reason }`. See [When events are missing](#when-events-are-missing). |
471​
472## What you have now
473​
474- A client that reads the session stream over SSE, a WebSocket, or a stdio worker.
475- Inputs with a receipt for each one, and errors that name their request.
476- Reconnects that continue from the last cursor, and a reload when events are missing.
477- A stream that stays open through proxies.
478- The name and the value of every `harness.*` event.
479​
480Next: send your first prompt with the two `curl` commands at the top of this page, and watch the events arrive.