@mcp-b/do-runtime 0.2.1 → 0.2.2
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.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 31cb2a6: Gate the streams `pipeThrough` and `pipeTo` produce. Native pipe machinery reads a gated body through internal spec operations and hands back a brand-new uninstrumented stream, so `res.body.pipeThrough(new TextDecoderStream()).getReader().read()` — the MCP SDK's SSE path — resumed foreign on every chunk and the next storage call threw "no input lock available in this context". `pipeThrough` now re-gates the readable it returns (recursively, so chains stay covered) and `pipeTo`'s settlement resumes gated.
|
|
8
|
+
|
|
3
9
|
## 0.2.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -3750,6 +3750,8 @@ var BYOB_READER_UNGATABLE_MESSAGE = "getReader({ mode: 'byob' }): a BYOB reader
|
|
|
3750
3750
|
function gateReadableStream(ctx, stream) {
|
|
3751
3751
|
const getReader = stream.getReader.bind(stream);
|
|
3752
3752
|
const tee = stream.tee.bind(stream);
|
|
3753
|
+
const pipeThrough = stream.pipeThrough.bind(stream);
|
|
3754
|
+
const pipeTo = stream.pipeTo.bind(stream);
|
|
3753
3755
|
Object.defineProperties(stream, {
|
|
3754
3756
|
getReader: {
|
|
3755
3757
|
configurable: true,
|
|
@@ -3766,6 +3768,20 @@ function gateReadableStream(ctx, stream) {
|
|
|
3766
3768
|
const [a, b] = tee();
|
|
3767
3769
|
return [gateReadableStream(ctx, a), gateReadableStream(ctx, b)];
|
|
3768
3770
|
}
|
|
3771
|
+
},
|
|
3772
|
+
pipeThrough: {
|
|
3773
|
+
configurable: true,
|
|
3774
|
+
writable: true,
|
|
3775
|
+
value(transform, options) {
|
|
3776
|
+
return gateReadableStream(ctx, pipeThrough(transform, options));
|
|
3777
|
+
}
|
|
3778
|
+
},
|
|
3779
|
+
pipeTo: {
|
|
3780
|
+
configurable: true,
|
|
3781
|
+
writable: true,
|
|
3782
|
+
value(destination, options) {
|
|
3783
|
+
return ctx.awaitIo(pipeTo(destination, options));
|
|
3784
|
+
}
|
|
3769
3785
|
}
|
|
3770
3786
|
});
|
|
3771
3787
|
return stream;
|