toolcraft 0.0.852 → 0.0.853

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 CHANGED
@@ -138,7 +138,7 @@
138
138
  },
139
139
  {
140
140
  "name": "toolcraft",
141
- "version": "0.0.852",
141
+ "version": "0.0.853",
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.852",
151
+ "version": "0.0.853",
152
152
  "license": "MIT"
153
153
  },
154
154
  {
@@ -138,7 +138,7 @@
138
138
  },
139
139
  {
140
140
  "name": "toolcraft",
141
- "version": "0.0.852",
141
+ "version": "0.0.853",
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.852",
151
+ "version": "0.0.853",
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 cachedCallerSignal;
86
- let cachedCombinedSignal;
85
+ let combinedSignals = new WeakMap();
87
86
  const combineSignal = (callerSignal) => {
88
87
  if (!callerSignal || callerSignal === signal)
89
88
  return signal;
90
- if (callerSignal === cachedCallerSignal && cachedCombinedSignal)
91
- return cachedCombinedSignal;
92
- cachedCallerSignal = callerSignal;
93
- cachedCombinedSignal = AbortSignal.any([signal, callerSignal]);
94
- return cachedCombinedSignal;
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
- cachedCallerSignal = undefined;
561
- cachedCombinedSignal = undefined;
560
+ combinedSignals = new WeakMap();
562
561
  }
563
562
  signal = nextSignal;
564
563
  cleanupCharge = nextCleanupCharge;
@@ -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
  }
@@ -8,7 +8,7 @@
8
8
  },
9
9
  {
10
10
  "name": "toolcraft-schema",
11
- "version": "0.0.852",
11
+ "version": "0.0.853",
12
12
  "license": "MIT"
13
13
  }
14
14
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft-schema",
3
- "version": "0.0.852",
3
+ "version": "0.0.853",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft",
3
- "version": "0.0.852",
3
+ "version": "0.0.853",
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.852",
180
+ "toolcraft-schema": "0.0.853",
181
181
  "toolcraft-design": "*",
182
182
  "@poe-code/frontmatter": "*",
183
183
  "@poe-code/agent-mcp-config": "*",