@promigence/sdk 0.1.0-beta.12 → 0.1.0-beta.13
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/dist/caller.js +10 -0
- package/dist/cjs/caller.js +10 -0
- package/dist/cjs/client.d.ts +16 -6
- package/dist/cjs/client.js +1180 -1129
- package/dist/cjs/core.d.ts +1 -1
- package/dist/cjs/core.js +1 -1
- package/dist/cjs/dispatcher.d.ts +2 -0
- package/dist/cjs/dispatcher.js +5 -0
- package/dist/cjs/http2.d.ts +10 -0
- package/dist/cjs/http2.js +143 -51
- package/dist/cjs/keyed.d.ts +6 -0
- package/dist/cjs/keyed.js +59 -0
- package/dist/cjs/proxy.js +11 -0
- package/dist/cjs/sandbox.d.ts +3 -1
- package/dist/cjs/sandbox.js +33 -20
- package/dist/cjs/transport-worker.js +11 -2
- package/dist/client.d.ts +16 -6
- package/dist/client.js +1179 -1127
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/dispatcher.d.ts +2 -0
- package/dist/dispatcher.js +5 -0
- package/dist/http2.d.ts +10 -0
- package/dist/http2.js +142 -51
- package/dist/keyed.d.ts +6 -0
- package/dist/keyed.js +55 -0
- package/dist/proxy.js +11 -0
- package/dist/sandbox.d.ts +3 -1
- package/dist/sandbox.js +33 -20
- package/dist/transport-worker.js +11 -2
- package/package.json +1 -1
package/dist/transport-worker.js
CHANGED
|
@@ -334,7 +334,7 @@ function start(init) {
|
|
|
334
334
|
return;
|
|
335
335
|
}
|
|
336
336
|
entry.active++;
|
|
337
|
-
|
|
337
|
+
Atomics.store(init.acks, req.mark, req.id);
|
|
338
338
|
const sent = init.trace !== true ? 0 : granted > 0 ? granted : hrNow();
|
|
339
339
|
let head = 0;
|
|
340
340
|
let status = 0;
|
|
@@ -443,11 +443,20 @@ function start(init) {
|
|
|
443
443
|
else
|
|
444
444
|
armIdle(init.idleMs);
|
|
445
445
|
};
|
|
446
|
+
let wedged = false;
|
|
446
447
|
port.on("message", (m) => {
|
|
447
|
-
if (closed)
|
|
448
|
+
if (closed || wedged)
|
|
449
|
+
return;
|
|
450
|
+
if (m?.t === "wedge-for-test") {
|
|
451
|
+
wedged = true;
|
|
448
452
|
return;
|
|
453
|
+
}
|
|
449
454
|
if (m?.t === "req")
|
|
450
455
|
void run(m);
|
|
456
|
+
else if (m?.t === "reqs") {
|
|
457
|
+
for (const r of m.list)
|
|
458
|
+
void run(r);
|
|
459
|
+
}
|
|
451
460
|
else if (m?.t === "drain")
|
|
452
461
|
drain("asked");
|
|
453
462
|
else if (m?.t === "cancel" && typeof m.id === "number") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promigence/sdk",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.13",
|
|
4
4
|
"description": "The fastest sandboxes for AI agents and code. The Promigence TypeScript SDK: snapshot an environment once, fork it as often as you need, run commands in every copy. A simple Sandbox class and the full PromigenceClient, with zero runtime dependencies.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://www.promigence.ai",
|