@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.
@@ -334,7 +334,7 @@ function start(init) {
334
334
  return;
335
335
  }
336
336
  entry.active++;
337
- post({ t: "ack", id: req.id });
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.12",
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",