opencode/packages
Ryan Vogel 89e1975ba6 fix(browser-extension): keep the relay up when a WebSocket message is too large
Reported with Browser Control (CLI 0.8.3, extension 0.0.25), whose relay this
is: the relay crashed on startup with "unhandled RangeError: Max payload size
exceeded (WS_ERR_UNSUPPORTED_MESSAGE_LENGTH)" when the extension sent an
oversized message, and kept crashing until the extension was reloaded.

ws closes a socket that exceeds maxPayload (100 MiB by default) and reports
it as an "error" event on that socket. The relay had no "error" listener on
the extension or CDP client sockets, so Node treated the event as unhandled
and the process died; the extension reconnected, resent, and crashed it again.

- The relay accepts messages up to 256 MiB, as Playwright's own CDP client
  does (large screenshots and response bodies come close to 100 MiB).
- The extension and CDP client sockets, and the HTTP server after it starts
  listening, log errors to relay.log (extension.error, client.error,
  http.error) instead of crashing; ws then closes the offending socket.
- The extension checks the size of what it sends (UTF-8 bytes, measured only
  when the text could be over the limit, and tolerating a result too large to
  serialize): an oversized command result fails that one command with "Result
  too large to send ... request less data" instead of breaking the connection
  and every command in flight; an oversized event is dropped and logged.

Verified against a relay and a headless Chrome on an isolated port: a 240 MB
CDP result now passes (it crashed the relay before); a client message over
256 MiB makes the relay log client.error and close that socket with 1009
while it stays up; an earlier 200 MB cap answered 210 MB with the "Result too
large" error. A result over ~256 MB crashes the extension's own process in
Chrome before it reaches this code (the relay stays up); that is a browser
limit.
2026-10-18 18:16:01 -04:00
..
ai fix(ai): treat null Responses stream fields as absent (#56669) 2026-10-18 00:50:51 -05:00
app test(app): fix races in the mobile timeline scroll e2e tests (#55881) 2026-10-18 00:06:23 +02:00
browser-extension fix(browser-extension): keep the relay up when a WebSocket message is too large 2026-10-18 18:16:01 -04:00
cli fix(core): tolerate sandboxed filesystem denials during location boot (#55817) 2026-10-17 22:41:23 -05:00
client fix(protocol): accept idle in the message type filter (#56504) 2026-10-17 20:43:33 -05:00
codemode chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
console chore(console): retire the Black pages and redirect them to Go (#56612) 2026-10-17 18:10:12 -07:00
containers chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
core chore(core): refresh bundled models.dev snapshot 2026-10-18 12:20:54 +00:00
desktop chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
effect-drizzle-sqlite sync release versions for v1.18.35 2026-10-06 20:18:36 +00:00
function sync release versions for v2.0.32 [skip ci] 2026-10-16 22:17:00 +00:00
gui-extensions chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
http-recorder chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
httpapi-codegen chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
identity
latex chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
merman chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
plugin chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
plugin-browser chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
plugins chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
posts chore: enable noUnusedLocals in already-clean packages (#52849) 2026-10-02 15:23:50 -07:00
protocol fix(protocol): accept idle in the message type filter (#56504) 2026-10-17 20:43:33 -05:00
schema chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
script chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
sdk chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
server fix(protocol): accept idle in the message type filter (#56504) 2026-10-17 20:43:33 -05:00
session-ui chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
simulation chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
stats chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
storybook test: fix Windows flakes in cli standalone, Storybook and snapshot tests (#56181) 2026-10-16 18:24:02 +02:00
theme chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
tui chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
ui chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
util fix(core): tolerate sandboxed filesystem denials during location boot (#55817) 2026-10-17 22:41:23 -05:00
web sync release versions for v2.0.32 [skip ci] 2026-10-16 22:17:00 +00:00