omp-fabric 1.18.0 → 1.18.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.
@@ -11,7 +11,7 @@ import {
11
11
  MemoryProvider,
12
12
  actionArgNormalizer,
13
13
  uniqueDeclaredKeyForSpelling
14
- } from "./chunks/chunk-I3XEFTXH.js";
14
+ } from "./chunks/chunk-N5DHCLLX.js";
15
15
  import "./chunks/chunk-2KEWFW56.js";
16
16
  import "./chunks/chunk-U5FYOMG5.js";
17
17
  import {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,2BAA2B,CAAC;AAoKnC,wBAA8B,SAAS,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA+wBxE;AAED,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,2BAA2B,CAAC;AAqKnC,wBAA8B,SAAS,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAuxBxE;AAED,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -5318,6 +5318,7 @@ var REFRESH_CARDS_PER_TICK = 3;
5318
5318
  import { existsSync as existsSync4 } from "node:fs";
5319
5319
  import path9 from "node:path";
5320
5320
  import { fileURLToPath as fileURLToPath2 } from "node:url";
5321
+ var ENTROPY_SETTLE_BUDGET_MS = 600;
5321
5322
  var FABRIC_EXTENSION_ENTRY_PATH = path9.resolve(fileURLToPath2(import.meta.url));
5322
5323
  var FABRIC_ENTRY_DIR = path9.dirname(FABRIC_EXTENSION_ENTRY_PATH);
5323
5324
  var FABRIC_RUNTIME_PATHS = {
@@ -5611,8 +5612,15 @@ async function ompFabric(omp) {
5611
5612
  }
5612
5613
  launchEntropyCompile(request);
5613
5614
  };
5614
- const settleEntropyCompiles = async () => {
5615
- while (entropyCompileInFlight) await entropyCompileInFlight;
5615
+ const settleEntropyCompiles = async (deadline = Number.POSITIVE_INFINITY) => {
5616
+ const until = Date.now() + deadline;
5617
+ while (entropyCompileInFlight && Date.now() < until) {
5618
+ const grace = new Promise((resolve2) => {
5619
+ const timer = setTimeout(resolve2, Math.max(0, until - Date.now()));
5620
+ timer.unref?.();
5621
+ });
5622
+ await Promise.race([entropyCompileInFlight, grace]);
5623
+ }
5616
5624
  };
5617
5625
  omp.on("session_start", async (_event, context) => {
5618
5626
  entropyLifecycleEpoch += 1;
@@ -5935,7 +5943,7 @@ ${guidance}`],
5935
5943
  entropyEvidenceThisTurn = false;
5936
5944
  scheduleEntropyCompile(context, 0);
5937
5945
  }
5938
- await settleEntropyCompiles();
5946
+ await settleEntropyCompiles(ENTROPY_SETTLE_BUDGET_MS);
5939
5947
  entropyLifecycleEpoch += 1;
5940
5948
  entropyCompilePending = void 0;
5941
5949
  unsubscribeComponentRegistration();