You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update server.md for binary helpers and current route table
Document the new toArrayBuffer / binaryResponse helpers introduced in
server/binary.ts. Add a "Binary helpers" subsection under HTTP helpers
and list the file in the Related → source-of-truth section.
Also bring the route table up to date: replace the removed
tryServeAgent / tryServeAgentToolResult entries with tryServeAi
(/admin/api/ai/*), and add the missing tryServeHoleRuntimeAsset,
tryServeHole, tryServePublicFormRuntimeAsset, and tryServePublicForm
handlers that landed in earlier commits.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-`tryServeCmsApi`ismatched**after**`tryServeAgent`and`tryServeAgentToolResult`sotheagentendpoints (under`/admin/api/agent*` — not`/admin/api/cms/*`) aren't swallowed by the CMS dispatcher.
89
+
-`tryServeAi`ismatched**before**`tryServeCmsApi`sotheAIendpoints (`/admin/api/ai/*`) aren't swallowed by the broader CMS dispatcher (`/admin/api/cms/*`).
|`toArrayBuffer(bytes: Uint8Array)`|Copiestheview's logical range into a fresh, exactly-sized `ArrayBuffer`. Required because a `Uint8Array` is only a view — its `.buffer` may be larger (pooled or sliced backing store) and resolves to `ArrayBuffer \| SharedArrayBuffer` which transfer/body slots reject. |
214
+
|`binaryResponse(bytes, init?)`|Conveniencewrapper: calls`toArrayBuffer`thenwrapstheresultina`new Response(...)`. Useforevery"serve raw bytes"responseinroutehandlers. |
0 commit comments