toolcraft 0.0.852 → 0.0.854
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/composition.json +2 -2
- package/dist/composition.json +2 -2
- package/node_modules/@poe-code/safe-fs/dist/fs/scoped.js +8 -9
- package/node_modules/@poe-code/safe-fs/dist/python/emscripten.js +14 -1
- package/node_modules/@poe-code/safe-fs/dist/python/native.js +1 -1
- package/node_modules/tiny-stdio-mcp-server/dist/composition.json +1 -1
- package/node_modules/toolcraft-schema/package.json +1 -1
- package/package.json +2 -2
package/composition.json
CHANGED
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"name": "toolcraft",
|
|
141
|
-
"version": "0.0.
|
|
141
|
+
"version": "0.0.854",
|
|
142
142
|
"license": "MIT"
|
|
143
143
|
},
|
|
144
144
|
{
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
"name": "toolcraft-schema",
|
|
151
|
-
"version": "0.0.
|
|
151
|
+
"version": "0.0.854",
|
|
152
152
|
"license": "MIT"
|
|
153
153
|
},
|
|
154
154
|
{
|
package/dist/composition.json
CHANGED
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"name": "toolcraft",
|
|
141
|
-
"version": "0.0.
|
|
141
|
+
"version": "0.0.854",
|
|
142
142
|
"license": "MIT"
|
|
143
143
|
},
|
|
144
144
|
{
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
"name": "toolcraft-schema",
|
|
151
|
-
"version": "0.0.
|
|
151
|
+
"version": "0.0.854",
|
|
152
152
|
"license": "MIT"
|
|
153
153
|
},
|
|
154
154
|
{
|
|
@@ -82,16 +82,16 @@ export function scopeFileSystem(filesystem, charge, signal, cleanupCharge = char
|
|
|
82
82
|
close() { closed = true; return close(); },
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
|
-
let
|
|
86
|
-
let cachedCombinedSignal;
|
|
85
|
+
let combinedSignals = new WeakMap();
|
|
87
86
|
const combineSignal = (callerSignal) => {
|
|
88
87
|
if (!callerSignal || callerSignal === signal)
|
|
89
88
|
return signal;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
let combined = combinedSignals.get(callerSignal);
|
|
90
|
+
if (!combined) {
|
|
91
|
+
combined = AbortSignal.any([signal, callerSignal]);
|
|
92
|
+
combinedSignals.set(callerSignal, combined);
|
|
93
|
+
}
|
|
94
|
+
return combined;
|
|
95
95
|
};
|
|
96
96
|
const resizeOptions = (options) => {
|
|
97
97
|
const scopedOptions = {
|
|
@@ -557,8 +557,7 @@ export function scopeFileSystem(filesystem, charge, signal, cleanupCharge = char
|
|
|
557
557
|
retargeters.set(view, (nextCharge, nextSignal, nextCleanupCharge, nextMaxPathComponents) => {
|
|
558
558
|
charge = nextCharge;
|
|
559
559
|
if (signal !== nextSignal) {
|
|
560
|
-
|
|
561
|
-
cachedCombinedSignal = undefined;
|
|
560
|
+
combinedSignals = new WeakMap();
|
|
562
561
|
}
|
|
563
562
|
signal = nextSignal;
|
|
564
563
|
cleanupCharge = nextCleanupCharge;
|
|
@@ -92,7 +92,20 @@ export function mountPythonFileSystem(FS, options) {
|
|
|
92
92
|
close: (stream) => { if (stream.handle && --stream.retained.references === 0)
|
|
93
93
|
rpc('close', stream.handle); },
|
|
94
94
|
fsync: (stream) => { rpc('sync', stream.handle, false); return 0; },
|
|
95
|
-
read(stream, buffer, offset, length, position) {
|
|
95
|
+
read(stream, buffer, offset, length, position) {
|
|
96
|
+
let received = 0;
|
|
97
|
+
while (received < length) {
|
|
98
|
+
const requested = Math.min(length - received, maxTransferBytes);
|
|
99
|
+
const data = rpc('read', stream.handle, requested, stream.seekable ? position + received : null);
|
|
100
|
+
if (data.length > requested)
|
|
101
|
+
throw new FS.ErrnoError(errno.EIO);
|
|
102
|
+
buffer.set(data, offset + received);
|
|
103
|
+
received += data.length;
|
|
104
|
+
if (data.length < requested || !stream.seekable)
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
return received;
|
|
108
|
+
},
|
|
96
109
|
write: (stream, buffer, offset, length, position) => rpc('write', stream.handle, Uint8Array.from(buffer.subarray(offset, offset + Math.min(length, maxTransferBytes))), stream.pythonExplicitPosition ?? (stream.flags & 1024 || !stream.seekable ? null : position)),
|
|
97
110
|
llseek(stream, offset, whence) { if (![0, 1, 2].includes(whence) || !Number.isSafeInteger(offset))
|
|
98
111
|
throw new FS.ErrnoError(errno.EINVAL); const position = whence === 0 ? offset : whence === 1 ? stream.position + offset : rpc('fstat', stream.handle).size + offset; if (!Number.isSafeInteger(position) || position < 0)
|
|
@@ -165,7 +165,7 @@ export function createPythonNativeSyscalls(options) {
|
|
|
165
165
|
if (entry && !positioned)
|
|
166
166
|
entry.position = writing && entry.flags & 1024
|
|
167
167
|
? await request('position', entry.handle) : entry.position + transferred;
|
|
168
|
-
if (transferred < size || !writing) {
|
|
168
|
+
if (transferred < size || !writing && !entry?.seekable) {
|
|
169
169
|
view().setUint32(output, total, true);
|
|
170
170
|
return 0;
|
|
171
171
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolcraft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.854",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
"saxes"
|
|
178
178
|
],
|
|
179
179
|
"optionalDependencies": {
|
|
180
|
-
"toolcraft-schema": "0.0.
|
|
180
|
+
"toolcraft-schema": "0.0.854",
|
|
181
181
|
"toolcraft-design": "*",
|
|
182
182
|
"@poe-code/frontmatter": "*",
|
|
183
183
|
"@poe-code/agent-mcp-config": "*",
|