@opencode/ai 0.0.0-dev-19868 → 0.0.0-dev-19870

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -145,7 +145,9 @@ export const open = (input) => Effect.gen(function* () {
145
145
  });
146
146
  export const fromWebSocket = (ws, input) => Effect.gen(function* () {
147
147
  yield* waitOpen(ws, input);
148
- const messages = yield* Queue.bounded(128);
148
+ // The socket pushes frames synchronously and cannot be paused, so the hand-off to the consumer
149
+ // fiber must absorb whole read buffers. Bun delivers over a thousand small frames in one tick.
150
+ const messages = yield* Queue.unbounded();
149
151
  const oversized = (message) => typeof message === "string" ? new Blob([message]).size > MAX_FRAME_BYTES : message.byteLength > MAX_FRAME_BYTES;
150
152
  const rejectOversized = (message) => {
151
153
  if (!oversized(message))
@@ -164,15 +166,7 @@ export const fromWebSocket = (ws, input) => Effect.gen(function* () {
164
166
  const offer = (message) => {
165
167
  if (rejectOversized(message))
166
168
  return;
167
- if (Queue.offerUnsafe(messages, message))
168
- return;
169
- Queue.failCauseUnsafe(messages, Cause.fail(transportError("WebSocket inbound queue overflow", {
170
- body: typeof message === "string" ? message : new TextDecoder().decode(message),
171
- url: input.url,
172
- operation: "read",
173
- code: "queue-overflow",
174
- phase: "receive",
175
- })));
169
+ Queue.offerUnsafe(messages, message);
176
170
  };
177
171
  const onMessage = (event) => {
178
172
  if (typeof event.data === "string")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "0.0.0-dev-19868",
3
+ "version": "0.0.0-dev-19870",
4
4
  "name": "@opencode/ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "devDependencies": {
31
31
  "@clack/prompts": "1.0.0-alpha.1",
32
32
  "@effect/platform-node": "4.0.0-rc.112",
33
- "@opencode/http-recorder": "0.0.0-dev-19868",
33
+ "@opencode/http-recorder": "0.0.0-dev-19870",
34
34
  "@tsconfig/bun": "1.0.9",
35
35
  "@types/bun": "1.4.0",
36
36
  "@typescript/native-preview": "7.0.0-dev.20251207.1",
@@ -40,7 +40,7 @@
40
40
  "@aws-sdk/credential-providers": "3.1057.0",
41
41
  "@smithy/eventstream-codec": "4.2.14",
42
42
  "@smithy/util-utf8": "4.2.2",
43
- "@opencode/schema": "0.0.0-dev-19868",
43
+ "@opencode/schema": "0.0.0-dev-19870",
44
44
  "aws4fetch": "1.0.20",
45
45
  "effect": "4.0.0-rc.112",
46
46
  "google-auth-library": "10.5.0"