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