@cuylabs/agent-runtime 0.10.0 → 0.11.0

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.
@@ -1068,11 +1068,11 @@ var AgentOrchestrator = class {
1068
1068
  return current;
1069
1069
  }
1070
1070
  return await new Promise((resolve, reject) => {
1071
- let timeout;
1071
+ const timeoutRef = {};
1072
1072
  let abortHandler;
1073
1073
  const cleanup = () => {
1074
- if (timeout) {
1075
- clearTimeout(timeout);
1074
+ if (timeoutRef.current) {
1075
+ clearTimeout(timeoutRef.current);
1076
1076
  }
1077
1077
  if (abortHandler && options.signal) {
1078
1078
  options.signal.removeEventListener("abort", abortHandler);
@@ -1116,10 +1116,10 @@ var AgentOrchestrator = class {
1116
1116
  return;
1117
1117
  }
1118
1118
  const timeoutMs = Math.floor(options.timeoutMs);
1119
- timeout = setTimeout(() => {
1119
+ timeoutRef.current = setTimeout(() => {
1120
1120
  waiter.reject(new Error(`Timed out waiting for run "${normalizedRunId}" after ${timeoutMs}ms`));
1121
1121
  }, timeoutMs);
1122
- timeout.unref?.();
1122
+ timeoutRef.current.unref?.();
1123
1123
  });
1124
1124
  }
1125
1125
  async close(runId, options = {}) {
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  createWorkloadRuntime,
11
11
  isTerminalRunStatus,
12
12
  silentRuntimeLogger
13
- } from "./chunk-EIX3NFRL.js";
13
+ } from "./chunk-U7M333GT.js";
14
14
  import {
15
15
  computeNextRunAtMs,
16
16
  normalizeSchedule
@@ -3,7 +3,7 @@ import {
3
3
  InMemoryOrchestratorRunStore,
4
4
  createAgentOrchestrator,
5
5
  isTerminalRunStatus
6
- } from "../chunk-EIX3NFRL.js";
6
+ } from "../chunk-U7M333GT.js";
7
7
  import "../chunk-ZVISWF7S.js";
8
8
  export {
9
9
  AgentOrchestrator,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuylabs/agent-runtime",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Workload runtime orchestration layer - scheduling, execution, and pluggable runtime drivers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",