@tangle-network/agent-runtime 0.163.0 → 0.165.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.
- package/dist/{activation-DxGP0h_p.js → activation-DmUIq51m.js} +3 -3
- package/dist/{activation-DxGP0h_p.js.map → activation-DmUIq51m.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{authoring-kO7vE_c9.js → authoring-Cm122Duf.js} +2 -2
- package/dist/{authoring-kO7vE_c9.js.map → authoring-Cm122Duf.js.map} +1 -1
- package/dist/candidate-execution/index.js +4 -4
- package/dist/{candidate-execution-izJj02pU.js → candidate-execution-DC0T8l2p.js} +4 -4
- package/dist/{candidate-execution-izJj02pU.js.map → candidate-execution-DC0T8l2p.js.map} +1 -1
- package/dist/conversation.d.ts +1 -1
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +1 -1
- package/dist/{environment-provider-BXFFK_rZ.d.ts → environment-provider-DWjbGH8W.d.ts} +2 -2
- package/dist/environment-provider.d.ts +1 -1
- package/dist/{graph-COikUkrj.js → graph-DGri_zJm.js} +3 -3
- package/dist/{graph-COikUkrj.js.map → graph-DGri_zJm.js.map} +1 -1
- package/dist/graph.d.ts +155 -53
- package/dist/graph.js +946 -330
- package/dist/graph.js.map +1 -1
- package/dist/{improvement-cycle-dGtgX1vr.js → improvement-cycle-BOd5DFeG.js} +4 -4
- package/dist/{improvement-cycle-dGtgX1vr.js.map → improvement-cycle-BOd5DFeG.js.map} +1 -1
- package/dist/{index-CbyKCjR7.d.ts → index-BGQtpQuJ.d.ts} +5 -5
- package/dist/{index-CykKDPnB.d.ts → index-BgptUCKl.d.ts} +4 -4
- package/dist/{index-OFOvnNc2.d.ts → index-CFMB9ux3.d.ts} +2 -2
- package/dist/index.d.ts +7 -7
- package/dist/index.js +11 -11
- package/dist/intelligence.d.ts +4 -4
- package/dist/intelligence.js +5 -5
- package/dist/kernel.d.ts +5 -5
- package/dist/kernel.js +7 -7
- package/dist/{knowledge-CZT8ahp6.js → knowledge-7_IfyD9R.js} +5 -5
- package/dist/{knowledge-CZT8ahp6.js.map → knowledge-7_IfyD9R.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-DrN092ew.d.ts → loop-runner-bin-C2NXQK7J.d.ts} +3 -3
- package/dist/{loop-runner-bin-CIjmKf7v.js → loop-runner-bin-Dx-5GZQK.js} +3 -3
- package/dist/{loop-runner-bin-CIjmKf7v.js.map → loop-runner-bin-Dx-5GZQK.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +3 -3
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-DG779Z6S.js → openai-tools-CDS7eSww.js} +2 -2
- package/dist/{openai-tools-DG779Z6S.js.map → openai-tools-CDS7eSww.js.map} +1 -1
- package/dist/{prepare-VLGnSyav.js → prepare-BCScSDCv.js} +7 -5
- package/dist/prepare-BCScSDCv.js.map +1 -0
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/{protected-model-port-CcCH0Uji.js → protected-model-port-D-5E3HBe.js} +2 -2
- package/dist/{protected-model-port-CcCH0Uji.js.map → protected-model-port-D-5E3HBe.js.map} +1 -1
- package/dist/{redact-DL_ZtFvR.d.ts → redact-DkObldQP.d.ts} +3 -3
- package/dist/{runtime-CCbeY1KO.d.ts → runtime-B0HZbuEv.d.ts} +4 -4
- package/dist/{runtime-BT00zfIS.js → runtime-DESENUe1.js} +7 -7
- package/dist/{runtime-BT00zfIS.js.map → runtime-DESENUe1.js.map} +1 -1
- package/dist/{spawn-journal-oewq1g2h.js → spawn-journal-Tgvp5VS5.js} +8 -2
- package/dist/{spawn-journal-oewq1g2h.js.map → spawn-journal-Tgvp5VS5.js.map} +1 -1
- package/dist/{stream-agent-turn-Dx2YrEWW.d.ts → stream-agent-turn-DxQ3GOuR.d.ts} +2 -2
- package/dist/{structural-rollout-DAenyNls.js → structural-rollout-DZGDg0yX.js} +3 -3
- package/dist/{structural-rollout-DAenyNls.js.map → structural-rollout-DZGDg0yX.js.map} +1 -1
- package/dist/{supervise-Di6xvnOL.js → supervise-Da20R0PO.js} +3 -3
- package/dist/{supervise-Di6xvnOL.js.map → supervise-Da20R0PO.js.map} +1 -1
- package/dist/{supervisor-DmWq4vkU.js → supervisor-DpIKMlPJ.js} +114 -40
- package/dist/supervisor-DpIKMlPJ.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +12 -12
- package/dist/{types-C2l1jaos.d.ts → types-DjVO-p7R.d.ts} +58 -3
- package/dist/{workspace-archive-BptlGCEU.js → workspace-archive-CHY5HvrF.js} +2 -2
- package/dist/{workspace-archive-BptlGCEU.js.map → workspace-archive-CHY5HvrF.js.map} +1 -1
- package/package.json +1 -1
- package/dist/prepare-VLGnSyav.js.map +0 -1
- package/dist/supervisor-DmWq4vkU.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as runtimeOwnedScopeOwnerRuntime, S as runtimeOwnedPendingExecutorMaterialization, T as unknownMaterializationReceipt, _ as runtimeOwnedDeferredExecutorRuntime, a as authoredProfileDigest, b as runtimeOwnedExecutorMaterialization, c as knownExecutionBindingReceipt, g as recordRuntimeOwnedProviderModel, h as recordRuntimeOwnedProviderIdentityConflict, l as knownMaterializationReceipt, m as recordRuntimeOwnedProviderDispatchNotStarted, n as attestRuntimeOwnedExecutor, o as finalizeRuntimeOwnedPendingExecutor, p as recordRuntimeOwnedProviderAttemptStart, r as attestRuntimeOwnedPendingExecutor, s as inheritRuntimeOwnedExecutorAttestation, t as attestRuntimeOwnedDeferredExecutor, u as newExecutionAttemptId, w as unknownExecutionBindingReceipt, x as runtimeOwnedExecutorProviderEvidence, y as runtimeOwnedExecutorExecutionBinding } from "./materialization-Ct3I4wu3.js";
|
|
2
2
|
import { f as RuntimeRunStateError, m as ValidationError, r as BackendTransportError } from "./errors-CDZ8XsVj.js";
|
|
3
3
|
import { n as detachedSnapshot } from "./snapshot-CTAf4uuA.js";
|
|
4
|
-
import { _ as captureWorkerTraceEvidence, a as aggregateProviderModelEvidence, c as loadSpawnForest, d as replaySpawnTree, f as attestNestedDriverTreeOwner, h as runtimeOwnedNestedDriverTreeRoot, l as materializeTreeView, m as nestedDriverTreeRoot, o as closesCursorSlot, p as driverRuntime, u as pendingWaits, x as contentAddress } from "./spawn-journal-
|
|
4
|
+
import { _ as captureWorkerTraceEvidence, a as aggregateProviderModelEvidence, c as loadSpawnForest, d as replaySpawnTree, f as attestNestedDriverTreeOwner, h as runtimeOwnedNestedDriverTreeRoot, l as materializeTreeView, m as nestedDriverTreeRoot, o as closesCursorSlot, p as driverRuntime, u as pendingWaits, x as contentAddress } from "./spawn-journal-Tgvp5VS5.js";
|
|
5
5
|
import { _ as unmeteredSpend, a as cloneTokenUsage, b as zeroTokenUsage, d as randomSuffix, f as randomUuid, g as throwIfAborted, h as throwAbort, l as mapWithConcurrency, m as stringifySafe, n as addTokenUsage, o as deleteBoxSafe, p as sleep, r as chargedTokens, s as hasCompleteCacheBreakdown, t as addSpend, u as promptCacheTokenClasses, v as withTimeout, y as zeroSpend } from "./util-D6ZEuBMi.js";
|
|
6
6
|
import { c as notifySandboxEventObserver, i as extractLlmCallEvent, l as sandboxEventServedBackend, r as createSandboxToolPartState, s as mapSandboxToolEvent, t as assertSandboxServedModel, u as sandboxProgressEvents } from "./sandbox-events-BVjstFgb.js";
|
|
7
7
|
import { n as executableAgentSpecSnapshot, r as projectSandboxOutcome, t as executableAgentProfileSnapshot } from "./executable-spec-CkGvdPds.js";
|
|
@@ -513,7 +513,25 @@ const HARNESS_INVOCATIONS = {
|
|
|
513
513
|
ultracode: "max"
|
|
514
514
|
},
|
|
515
515
|
args: (level) => ["--variant", level]
|
|
516
|
-
}
|
|
516
|
+
},
|
|
517
|
+
permissionBypassArgs: () => ["--auto"]
|
|
518
|
+
},
|
|
519
|
+
pi: {
|
|
520
|
+
command: "pi",
|
|
521
|
+
buildArgs: (taskPrompt) => ["--print", taskPrompt],
|
|
522
|
+
modelArgs: (model) => ["--model", model],
|
|
523
|
+
reasoning: {
|
|
524
|
+
levels: {
|
|
525
|
+
minimal: "minimal",
|
|
526
|
+
low: "low",
|
|
527
|
+
medium: "medium",
|
|
528
|
+
high: "high",
|
|
529
|
+
xhigh: "xhigh",
|
|
530
|
+
ultracode: "max"
|
|
531
|
+
},
|
|
532
|
+
args: (level) => ["--thinking", level]
|
|
533
|
+
},
|
|
534
|
+
permissionBypassArgs: () => ["--approve"]
|
|
517
535
|
}
|
|
518
536
|
};
|
|
519
537
|
/** Every local harness, in table order — the one list `AGENT_RUNTIME_LOCAL_HARNESSES` and any
|
|
@@ -691,7 +709,7 @@ var RollingByteCapture = class {
|
|
|
691
709
|
async function runLocalHarness(options) {
|
|
692
710
|
const { harness, cwd, taskPrompt } = options;
|
|
693
711
|
if (options.codexReproducible && harness !== "codex") throw new Error("runLocalHarness: codexReproducible requires the Codex harness");
|
|
694
|
-
if (options.codexReproducible &&
|
|
712
|
+
if (options.codexReproducible && !isSupportedCodexPlatform()) throw new Error(`runLocalHarness: codexReproducible does not support ${process.platform}/${process.arch}; supported: linux and darwin on x64 or arm64`);
|
|
695
713
|
if (options.codexReadDeniedPaths !== void 0 && !options.codexReproducible) throw new Error("runLocalHarness: codexReadDeniedPaths requires codexReproducible");
|
|
696
714
|
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
697
715
|
const maxOutputBytes = options.maxOutputBytes ?? DEFAULT_MAX_OUTPUT_BYTES;
|
|
@@ -1194,7 +1212,7 @@ async function isolateCodexHome(opts) {
|
|
|
1194
1212
|
const stagedPath = join(candidateRoot, ".agent-runtime-bin");
|
|
1195
1213
|
if (readDeniedPaths.some((path) => isSameOrDescendant(candidateRoot, path) || isSameOrDescendant(stagedPath, path) || isSameOrDescendant(path, stagedPath))) throw new Error("runLocalHarness: codexReadDeniedPaths cannot contain the candidate root or staged executable");
|
|
1196
1214
|
const nativeExecutable = await opts.resolveExecutable(opts.command, opts.baseEnv);
|
|
1197
|
-
if (!await
|
|
1215
|
+
if (!await isVendoredCodexExecutable(nativeExecutable)) throw new Error("runLocalHarness: reproducible Codex mode requires the vendored native Codex build (a static musl ELF on linux, a Mach-O executable on darwin), not a PATH wrapper");
|
|
1198
1216
|
const sourceExecutableSha256 = await sha256File(nativeExecutable);
|
|
1199
1217
|
stagedExecutableDir = stagedPath;
|
|
1200
1218
|
try {
|
|
@@ -1207,7 +1225,7 @@ async function isolateCodexHome(opts) {
|
|
|
1207
1225
|
await copyFile(nativeExecutable, stagedExecutable, constants.COPYFILE_FICLONE);
|
|
1208
1226
|
await chmod(stagedExecutable, 320);
|
|
1209
1227
|
const executableSha256 = await sha256File(stagedExecutable);
|
|
1210
|
-
if (executableSha256 !== sourceExecutableSha256 || !await
|
|
1228
|
+
if (executableSha256 !== sourceExecutableSha256 || !await isVendoredCodexExecutable(stagedExecutable)) throw new Error("runLocalHarness: staged Codex executable digest mismatch");
|
|
1211
1229
|
await chmod(stagedExecutableDir, 320);
|
|
1212
1230
|
workspaceTemp = await mkdtemp(join(candidateRoot, ".agent-runtime-tmp-"));
|
|
1213
1231
|
await chmod(workspaceTemp, 448);
|
|
@@ -1357,7 +1375,7 @@ async function resolveCodexNativeExecutable(command, env) {
|
|
|
1357
1375
|
}
|
|
1358
1376
|
if (seen.has(resolved)) continue;
|
|
1359
1377
|
seen.add(resolved);
|
|
1360
|
-
if (await
|
|
1378
|
+
if (await isVendoredCodexExecutable(resolved)) return resolved;
|
|
1361
1379
|
const packageRoot = await findCodexPackageRoot(resolved);
|
|
1362
1380
|
if (!packageRoot) continue;
|
|
1363
1381
|
const bundled = await findBundledCodexExecutable(packageRoot);
|
|
@@ -1377,51 +1395,103 @@ async function findCodexPackageRoot(file) {
|
|
|
1377
1395
|
}
|
|
1378
1396
|
}
|
|
1379
1397
|
async function findBundledCodexExecutable(packageRoot) {
|
|
1380
|
-
const target =
|
|
1398
|
+
const target = codexTarget();
|
|
1381
1399
|
const candidates = [join(packageRoot, "node_modules", "@openai", target.packageName, "vendor", target.triple, "bin", "codex"), join(packageRoot, "vendor", target.triple, "bin", "codex")];
|
|
1382
|
-
for (const executable of candidates) if (await
|
|
1400
|
+
for (const executable of candidates) if (await isVendoredCodexExecutable(executable)) return executable;
|
|
1383
1401
|
}
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1402
|
+
/**
|
|
1403
|
+
* The vendored Codex build for this host.
|
|
1404
|
+
*
|
|
1405
|
+
* `@openai/codex` ships a per-platform binary for linux, darwin and win32 on x64 and arm64.
|
|
1406
|
+
* Reproducible mode needs the vendored native executable rather than a PATH wrapper, so the
|
|
1407
|
+
* table maps host to package name plus Rust target triple. Linux vendors static musl builds;
|
|
1408
|
+
* darwin vendors Mach-O against the system libc, which is why the executable check below is
|
|
1409
|
+
* per-format rather than ELF-only.
|
|
1410
|
+
*/
|
|
1411
|
+
function codexTarget() {
|
|
1412
|
+
const target = {
|
|
1413
|
+
"linux-x64": {
|
|
1414
|
+
packageName: "codex-linux-x64",
|
|
1415
|
+
triple: "x86_64-unknown-linux-musl"
|
|
1416
|
+
},
|
|
1417
|
+
"linux-arm64": {
|
|
1418
|
+
packageName: "codex-linux-arm64",
|
|
1419
|
+
triple: "aarch64-unknown-linux-musl"
|
|
1420
|
+
},
|
|
1421
|
+
"darwin-x64": {
|
|
1422
|
+
packageName: "codex-darwin-x64",
|
|
1423
|
+
triple: "x86_64-apple-darwin"
|
|
1424
|
+
},
|
|
1425
|
+
"darwin-arm64": {
|
|
1426
|
+
packageName: "codex-darwin-arm64",
|
|
1427
|
+
triple: "aarch64-apple-darwin"
|
|
1428
|
+
}
|
|
1429
|
+
}[`${process.platform}-${process.arch}`];
|
|
1430
|
+
if (!target) throw new Error(`runLocalHarness: reproducible Codex mode does not support ${process.platform}/${process.arch}`);
|
|
1431
|
+
return target;
|
|
1432
|
+
}
|
|
1433
|
+
/** Hosts with a vendored Codex build reproducible mode can verify and run. */
|
|
1434
|
+
function isSupportedCodexPlatform() {
|
|
1435
|
+
return (process.platform === "linux" || process.platform === "darwin") && (process.arch === "x64" || process.arch === "arm64");
|
|
1395
1436
|
}
|
|
1396
|
-
|
|
1437
|
+
/**
|
|
1438
|
+
* Is this the vendored native Codex build for this host?
|
|
1439
|
+
*
|
|
1440
|
+
* Reproducible mode must run the vendored binary, never a shell wrapper that could re-enter
|
|
1441
|
+
* a different toolchain, so the check reads the file's own header rather than trusting its
|
|
1442
|
+
* path. The two vendor formats differ: linux ships a STATIC musl ELF (an interpreter segment
|
|
1443
|
+
* would mean a dynamic build, which is rejected), darwin ships Mach-O linked against the
|
|
1444
|
+
* system libc, where dynamic linkage is normal and not a signal of the wrong artifact.
|
|
1445
|
+
*/
|
|
1446
|
+
async function isVendoredCodexExecutable(path) {
|
|
1397
1447
|
let handle;
|
|
1398
1448
|
try {
|
|
1399
1449
|
await access(path, constants.X_OK);
|
|
1400
1450
|
handle = await open(path, "r");
|
|
1401
1451
|
const header = Buffer.alloc(64);
|
|
1402
1452
|
const { bytesRead } = await handle.read(header, 0, header.length, 0);
|
|
1403
|
-
if (bytesRead !== header.length
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
76,
|
|
1407
|
-
70
|
|
1408
|
-
])) || header[4] !== 2 || header[5] !== 1) return false;
|
|
1409
|
-
const programHeaderOffset = Number(header.readBigUInt64LE(32));
|
|
1410
|
-
const programHeaderSize = header.readUInt16LE(54);
|
|
1411
|
-
const programHeaderCount = header.readUInt16LE(56);
|
|
1412
|
-
const expectedMachine = process.arch === "x64" ? 62 : process.arch === "arm64" ? 183 : -1;
|
|
1413
|
-
if (![2, 3].includes(header.readUInt16LE(16)) || header.readUInt16LE(18) !== expectedMachine || !Number.isSafeInteger(programHeaderOffset) || programHeaderOffset < 64 || programHeaderSize < 56 || programHeaderSize > 1024 || programHeaderCount === 0 || programHeaderCount > 1024) return false;
|
|
1414
|
-
const tableSize = programHeaderSize * programHeaderCount;
|
|
1415
|
-
const table = Buffer.alloc(tableSize);
|
|
1416
|
-
if ((await handle.read(table, 0, tableSize, programHeaderOffset)).bytesRead !== tableSize) return false;
|
|
1417
|
-
for (let index = 0; index < programHeaderCount; index += 1) if (table.readUInt32LE(index * programHeaderSize) === 3) return false;
|
|
1418
|
-
return true;
|
|
1453
|
+
if (bytesRead !== header.length) return false;
|
|
1454
|
+
if (process.platform === "darwin") return isMachOExecutable(header);
|
|
1455
|
+
return await isStaticElf(header, handle);
|
|
1419
1456
|
} catch {
|
|
1420
1457
|
return false;
|
|
1421
1458
|
} finally {
|
|
1422
1459
|
await handle?.close();
|
|
1423
1460
|
}
|
|
1424
1461
|
}
|
|
1462
|
+
/**
|
|
1463
|
+
* A 64-bit Mach-O executable for this architecture, or a universal binary containing one.
|
|
1464
|
+
*
|
|
1465
|
+
* Magics: 0xfeedfacf is a little-endian 64-bit Mach-O; 0xcafebabe/0xbebafeca is a fat header,
|
|
1466
|
+
* whose slices are checked by the loader at exec time rather than here.
|
|
1467
|
+
*/
|
|
1468
|
+
function isMachOExecutable(header) {
|
|
1469
|
+
const magic = header.readUInt32LE(0);
|
|
1470
|
+
const MH_MAGIC_64 = 4277009103;
|
|
1471
|
+
const MH_CIGAM_64 = 3489328638;
|
|
1472
|
+
if (magic === 3199925962 || magic === 3405691582) return true;
|
|
1473
|
+
if (magic !== MH_MAGIC_64 && magic !== MH_CIGAM_64) return false;
|
|
1474
|
+
return (magic === MH_MAGIC_64 ? header.readUInt32LE(4) : header.readUInt32BE(4)) === (process.arch === "x64" ? 16777223 : 16777228);
|
|
1475
|
+
}
|
|
1476
|
+
/** A statically linked ELF for this architecture: no PT_INTERP segment (type 3). */
|
|
1477
|
+
async function isStaticElf(header, handle) {
|
|
1478
|
+
if (!header.subarray(0, 4).equals(Buffer.from([
|
|
1479
|
+
127,
|
|
1480
|
+
69,
|
|
1481
|
+
76,
|
|
1482
|
+
70
|
|
1483
|
+
])) || header[4] !== 2 || header[5] !== 1) return false;
|
|
1484
|
+
const programHeaderOffset = Number(header.readBigUInt64LE(32));
|
|
1485
|
+
const programHeaderSize = header.readUInt16LE(54);
|
|
1486
|
+
const programHeaderCount = header.readUInt16LE(56);
|
|
1487
|
+
const expectedMachine = process.arch === "x64" ? 62 : process.arch === "arm64" ? 183 : -1;
|
|
1488
|
+
if (![2, 3].includes(header.readUInt16LE(16)) || header.readUInt16LE(18) !== expectedMachine || !Number.isSafeInteger(programHeaderOffset) || programHeaderOffset < 64 || programHeaderSize < 56 || programHeaderSize > 1024 || programHeaderCount === 0 || programHeaderCount > 1024) return false;
|
|
1489
|
+
const tableSize = programHeaderSize * programHeaderCount;
|
|
1490
|
+
const table = Buffer.alloc(tableSize);
|
|
1491
|
+
if ((await handle.read(table, 0, tableSize, programHeaderOffset)).bytesRead !== tableSize) return false;
|
|
1492
|
+
for (let index = 0; index < programHeaderCount; index += 1) if (table.readUInt32LE(index * programHeaderSize) === 3) return false;
|
|
1493
|
+
return true;
|
|
1494
|
+
}
|
|
1425
1495
|
function sha256File(path) {
|
|
1426
1496
|
return new Promise((resolveDigest, reject) => {
|
|
1427
1497
|
const hash = createHash("sha256");
|
|
@@ -10508,13 +10578,16 @@ function createWaitProbes(entries) {
|
|
|
10508
10578
|
function isWaitOutcome(value) {
|
|
10509
10579
|
return typeof value === "object" && value !== null && value.waitOutcome === true;
|
|
10510
10580
|
}
|
|
10511
|
-
/** The absolute instant a spec is bounded by, or `undefined` for an unbounded
|
|
10581
|
+
/** The absolute instant a spec is bounded by, or `undefined` for an unbounded wait. */
|
|
10512
10582
|
function waitUntil(spec) {
|
|
10513
|
-
|
|
10583
|
+
if (spec.kind === "timer") return spec.untilMs;
|
|
10584
|
+
if (spec.kind === "token") return spec.expiresAtMs;
|
|
10585
|
+
return spec.timeoutAtMs;
|
|
10514
10586
|
}
|
|
10515
10587
|
/** Structural validation, independent of the run. Returns null when the spec is usable. */
|
|
10516
10588
|
function validateWaitSpec(spec) {
|
|
10517
10589
|
if (spec.kind === "timer") return Number.isFinite(spec.untilMs) ? null : "timer.untilMs must be a finite epoch-ms instant";
|
|
10590
|
+
if (spec.kind === "token") return "token waits are graph-engine-owned; deliver them through engine resume/expire";
|
|
10518
10591
|
if (typeof spec.probe !== "string" || spec.probe.length === 0) return "poll.probe must be a non-empty probe name";
|
|
10519
10592
|
if (!Number.isFinite(spec.intervalMs) || spec.intervalMs <= 0) return "poll.intervalMs must be > 0";
|
|
10520
10593
|
if (spec.timeoutAtMs !== void 0 && !Number.isFinite(spec.timeoutAtMs)) return "poll.timeoutAtMs must be a finite epoch-ms instant";
|
|
@@ -10557,6 +10630,7 @@ async function runWait(args) {
|
|
|
10557
10630
|
outcome: outcome("timer", "fired", label, spec.untilMs, armedAt, now(), 0, 0, resumed)
|
|
10558
10631
|
};
|
|
10559
10632
|
}
|
|
10633
|
+
if (spec.kind === "token") throw new ValidationError(`wait '${label}': token waits are graph-engine-owned; deliver them through engine resume/expire`);
|
|
10560
10634
|
const probe = args.probes?.resolve(spec.probe);
|
|
10561
10635
|
if (!probe) throw new ValidationError(`wait '${label}': poll probe '${spec.probe}' is not registered in this run's WaitProbeRegistry`);
|
|
10562
10636
|
let polls = 0;
|
|
@@ -13317,6 +13391,6 @@ function isNonEmptySpend(s) {
|
|
|
13317
13391
|
return s.iterations > 0 || s.tokens.input > 0 || s.tokens.output > 0 || s.usd > 0 || s.ms > 0 || s.tokensKnown === false || s.usdKnown === false;
|
|
13318
13392
|
}
|
|
13319
13393
|
//#endregion
|
|
13320
|
-
export {
|
|
13394
|
+
export { createPushTraceSource as $, createWorktree as $t, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as A, readTraceContextFromEnv as At, captureReusableExecutorConfig as B, generateSpanId as Bt, timerAt as C, acquireSandbox as Ct, freeSlots as D, observedModelMatchesDeclared as Dt, effectiveConcurrency as E, canonicalObservedModel as Et, bindReusableExecutorExecutionId as F, buildRuntimeEventOtelSpans as Ft, createWorktreeCliExecutor as G, createRuntimeEventCollector as Gt, createExecutor as H, padSpanId as Ht, bridgeAdmissionRead as I, createOpenInferenceFileExporter as It, workerTraceEnv as J, sanitizeKnowledgeReadinessReport as Jt, WORKER_TRACE_PROPAGATION as K, createRuntimeStreamEventCollector as Kt, bridgeModelRouteRefusal as L, createOtelExporter as Lt, assertValidBudget as M, INTELLIGENCE_WIRE_VERSION as Mt, createBudgetPool as N, buildLoopOtelSpans as Nt, queueOf as O, createPropagatingTraceEmitter as Ot, spendFromUsageEvents as P, buildLoopSpanNodes as Pt, createSteerableSandboxSession as Q, captureWorktreeDiff as Qt, bridgeRuntimeAttachmentsKey as R, exportEvalRuns as Rt, pollFor as S, worktreeCliProfileMaterialization as Sn, probeSandboxCapabilities as St, waitUntil as T, runBrainLoop as Tt, createExecutorRegistry as U, padTraceId as Ut, cliWorktreeExecutor as V, loopEventToOtelSpan as Vt, snapshotExecutorConfig as W, toOtelAttributes as Wt, workerTraceSeamKey as X, runSettledCommand as Xt, workerTraceHeaders as Y, sanitizeRuntimeStreamEvent as Yt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as Z, runWorktreeHarness as Zt, recordScopeOwnerMaterialization as _, renderProfileMaterializationIssues as _n, createSandboxForSpec as _t, uncertainSpawnBudgets as a, parseCodexTokenUsage as an, createInbox as at, createWaitProbes as b, unsupportedProfileDimensions as bn, runAgentRounds as bt, pickBestDelivered as c, assertProfileMaterialization as cn, PEER_MAIL_WIRE_KEY as ct, driverChild as d, fullProfileMaterialization as dn, isPeerMailEnvelope as dt, removeWorktree as en, decodeToolPart as et, withDriverExecutor as f, profileMaterializationAxes$1 as fn, peerMailTools as ft, meterRuntimeOwnedProviderAttempt as g, promptResourceProfileMaterialization as gn, TERMINAL_DECISIONS as gt, meterRuntimeOwnedAccounting as h, promptOnlyProfileMaterialization as hn, isTerminalNodeStatus as ht, sumMeasuredSpendFromEvents as i, localHarnessExecutable as in, readWorkerProgress as it, teardownExecutor as j, traceContextToEnv as jt, rollingDispatch as k, mergeTraceEnv as kt, runFinalizer as l, controlProfileMaterialization as ln, claimsAuthority as lt, deriveNodeExecutionIdentity as m, promptModelProfileMaterialization as mn, isLiveNodeStatus as mt, createSupervisor as n, LOCAL_HARNESSES as nn, DEFAULT_STALL_AFTER_MS as nt, bestDelivered as o, CodexExecutionDiagnosticError as on, AUTHORITY_MARKERS as ot, createScope as p, promptControlProfileMaterialization as pn, peerMailVerbNames as pt, readWorkerTraceContext as q, sanitizeAgentRuntimeEvent as qt, maxSeqOf as r, harnessSupportsReasoningEffort as rn, createActivityLog as rt, collectDelivered as s, AGENT_PROFILE_MATERIALIZATION_AXES as sn, DEFAULT_PEER_MAIL_LIMITS as st, createRootHandle as t, DEFAULT_LOCAL_HARNESS as tn, sandboxSessionTraceSource as tt, runTree as u, defineProfileMaterializationContract as un, createPeerMailbox as ut, scopeOwnerExecutorNodeContext as v, renderUnsupported as vn, defaultSelectWinner as vt, validateWaitSpec as w, routerBrain as wt, isWaitOutcome as x, validateProfileMaterialization as xn, createSandboxLineage as xt, settledToIteration as y, sandboxActProfileMaterialization as yn, isTerminalDecision as yt, bridgeStopSignalKey as z, flatOtelSpan as zt };
|
|
13321
13395
|
|
|
13322
|
-
//# sourceMappingURL=supervisor-
|
|
13396
|
+
//# sourceMappingURL=supervisor-DpIKMlPJ.js.map
|