@orkestrel/mcp 0.0.23 → 0.0.24
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.
|
@@ -371,6 +371,14 @@ function extractLines(buffer, chunk) {
|
|
|
371
371
|
* The completion callback is the writable channel's backpressure boundary. A callback error and
|
|
372
372
|
* a synchronous `write` throw reject the returned promise with the original value.
|
|
373
373
|
*
|
|
374
|
+
* That callback is the ONLY thing that settles the promise: this helper holds no timer and no
|
|
375
|
+
* abort, so an output that neither confirms nor fails the write parks the promise for as long as
|
|
376
|
+
* the caller-owned stream holds the callback. A caller wanting a bound races this promise against
|
|
377
|
+
* one it owns — {@link import('./transports/StdioServerTransport.js').StdioServerTransport}
|
|
378
|
+
* registers such a bound per send and rejects it on `close()`, so closing the transport settles
|
|
379
|
+
* the CALLER's `send` while the abandoned write stays with the stream that still holds its
|
|
380
|
+
* callback, reachable from nothing the transport retains.
|
|
381
|
+
*
|
|
374
382
|
* @param output - The writable stream that receives the line
|
|
375
383
|
* @param line - The complete line to write
|
|
376
384
|
* @returns Resolves when the stream confirms the write; rejects when the write fails
|
|
@@ -1240,7 +1248,11 @@ var WebSocketServerTransport = class {
|
|
|
1240
1248
|
* event (the reply the {@link import('@orkestrel/mcp').MCPClientInterface} correlates by `id`); a
|
|
1241
1249
|
* non-JSON / non-message frame surfaces on `error` and is dropped. The socket's `close`
|
|
1242
1250
|
* / `error` bridge to this transport's events.
|
|
1243
|
-
* - **Outbound (`send`).** `send(message)` writes one masked text frame.
|
|
1251
|
+
* - **Outbound (`send`).** `send(message)` writes one masked text frame. A socket write is not
|
|
1252
|
+
* confirmed, so this transport answers a closed channel from its OWN state: a `send` with no
|
|
1253
|
+
* bound socket — before `start()`, after `close()`, or after the peer ended the socket —
|
|
1254
|
+
* REJECTS with `WebSocket transport is not connected`. It neither drops the message (the
|
|
1255
|
+
* browser face's posture) nor queues it for a connection this transport is not holding.
|
|
1244
1256
|
* - **`close()`** unsubscribes from the socket, closes it, and fires `close` (idempotent). An
|
|
1245
1257
|
* upgrade still on the wire is DESTROYED, so a `close()` during the handshake ends the
|
|
1246
1258
|
* transport at once instead of waiting for a peer that may never answer — the suspended
|