Skip to content

Commit 02d46ee

Browse files
yanxue06cursoragent
andcommitted
docs(webhooks): drop avatar content arm — not officially supported
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 8cc81ba commit 02d46ee

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

docs-src/webhooks/events.mdx.vel

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ const dedupeKey = `${webhookId}:${payload.message.id}`;
151151

152152
#### Content shapes
153153

154-
`content` is a discriminated union tagged by `type`. Every arm has a fixed wire projection — function thunks (`read()`, `stream()`, async OG accessors) and server-internal fields (filesystem paths) are stripped before delivery, since neither survives `JSON.stringify` nor is useful to a remote handler. The SDK's <TypeTooltip name="Content" type={`{{ content.signature }}`} /> union has 12 published arms today plus two forward-compat arms (`rename`, `avatar`) the worker handles defensively; the two you'll see on the vast majority of inbound deliveries are `text` and `attachment`:
154+
`content` is a discriminated union tagged by `type`. Every arm has a fixed wire projection — function thunks (`read()`, `stream()`, async OG accessors) and server-internal fields (filesystem paths) are stripped before delivery, since neither survives `JSON.stringify` nor is useful to a remote handler. The SDK's <TypeTooltip name="Content" type={`{{ content.signature }}`} /> union has 12 published arms today plus one forward-compat arm (`rename`) the worker handles defensively; the two you'll see on the vast majority of inbound deliveries are `text` and `attachment`:
155155

156156
```ts
157157
type Content =
@@ -178,7 +178,7 @@ type Content =
178178
| `application/*` | Document or file | `application/pdf`, `application/zip` |
179179

180180
<Warning>
181-
**Byte-bearing arms ship metadata, not bytes.** `attachment`, `voice`, `avatar` (set arm), and `contact.photo` all carry `mimeType` / `size` / filename — never the raw bytes themselves and never a download URL. To process the actual content you need an additional retrieval step. Hold a [`spectrum-ts`](/spectrum-ts/getting-started) instance in a long-lived process and call its byte accessors, or contact support if you need attachment retrieval — the `message.id` from the webhook is the canonical handle any future retrieval API will accept. A first-class HTTP download endpoint is on the roadmap.
181+
**Byte-bearing arms ship metadata, not bytes.** `attachment`, `voice`, and `contact.photo` all carry `mimeType` / `size` / filename — never the raw bytes themselves and never a download URL. To process the actual content you need an additional retrieval step. Hold a [`spectrum-ts`](/spectrum-ts/getting-started) instance in a long-lived process and call its byte accessors, or contact support if you need attachment retrieval — the `message.id` from the webhook is the canonical handle any future retrieval API will accept. A first-class HTTP download endpoint is on the roadmap.
182182
</Warning>
183183

184184
##### Per-arm wire reference
@@ -297,15 +297,6 @@ Every arm of the `Content` union, post-projection. Hand-written rather than vell
297297
| `displayName` | `string` | The new chat name. |
298298
</Accordion>
299299

300-
<Accordion title="avatar" description="A chat icon update. Forward-compat — handled defensively until the SDK pin lands it in the published `Content` union.">
301-
| Field | Type | Description |
302-
| --- | --- | --- |
303-
| `type` | `"avatar"` | Discriminator. |
304-
| `action` | `{ kind: "set"; mimeType: string } \| { kind: "clear" }` | Whether the avatar was set (with the new image's `mimeType`; bytes retrieved out of band) or cleared. |
305-
306-
On `kind: "set"` the `read()` byte thunk is stripped — only `mimeType` rides. The `clear` arm carries no extra data.
307-
</Accordion>
308-
309300
<Accordion title="(unknown future arm)" description="A new arm the SDK ships before the worker has a hand-shaped projection.">
310301
| Field | Type | Description |
311302
| --- | --- | --- |

0 commit comments

Comments
 (0)