@tangle-network/agent-runtime 0.299.0 → 0.299.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.
- package/dist/{activation-sYi0Wi1i.d.ts → activation-BGqkZL87.d.ts} +3 -3
- package/dist/{activation-D0srpsxN.js → activation-CLob-w1T.js} +2 -2
- package/dist/{activation-D0srpsxN.js.map → activation-CLob-w1T.js.map} +1 -1
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-c2W1hvwL.js → coordination-driver-O9PYW2Bb.js} +2 -2
- package/dist/{coordination-driver-c2W1hvwL.js.map → coordination-driver-O9PYW2Bb.js.map} +1 -1
- package/dist/{delegate-VSkeG-3S.js → delegate-nktZRhgx.js} +2 -2
- package/dist/{delegate-VSkeG-3S.js.map → delegate-nktZRhgx.js.map} +1 -1
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +2 -2
- package/dist/{graph-DogfdeoC.js → graph-BIWWAQF8.js} +4 -4
- package/dist/{graph-DogfdeoC.js.map → graph-BIWWAQF8.js.map} +1 -1
- package/dist/{improvement-cycle--dmMEqKn.js → improvement-cycle-_MQW9ptH.js} +3 -3
- package/dist/{improvement-cycle--dmMEqKn.js.map → improvement-cycle-_MQW9ptH.js.map} +1 -1
- package/dist/{index-Ciie85Mi.d.ts → index-RwXPYXZH.d.ts} +6 -4
- package/dist/index.d.ts +6 -6
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +3 -3
- package/dist/intelligence.js +4 -4
- package/dist/kernel.d.ts +3 -3
- package/dist/kernel.js +8 -8
- package/dist/{loop-runner-bin-CmedD2zB.js → loop-runner-bin-DtCA3qua.js} +3 -3
- package/dist/{loop-runner-bin-CmedD2zB.js.map → loop-runner-bin-DtCA3qua.js.map} +1 -1
- package/dist/{loop-runner-bin-C1H-Ja0s.d.ts → loop-runner-bin-mEYBUzCJ.d.ts} +3 -3
- 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 +5 -5
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-CPqecKak.d.ts → openai-tools-DzpeoAdZ.d.ts} +2 -2
- package/dist/profiles.d.ts +2 -2
- package/dist/{provision-supervisor-CsVvIDrv.js → provision-supervisor-CBA6aKyc.js} +3 -3
- package/dist/{provision-supervisor-CsVvIDrv.js.map → provision-supervisor-CBA6aKyc.js.map} +1 -1
- package/dist/{runtime-dpb0Pk4q.js → runtime-DjKjxuBo.js} +8 -8
- package/dist/{runtime-dpb0Pk4q.js.map → runtime-DjKjxuBo.js.map} +1 -1
- package/dist/{search-method-k_i6IkUT.js → search-method-CJLzH52g.js} +2 -2
- package/dist/{search-method-k_i6IkUT.js.map → search-method-CJLzH52g.js.map} +1 -1
- package/dist/{server-BWfx2L5h.js → server-H6u1fPKW.js} +3 -3
- package/dist/{server-BWfx2L5h.js.map → server-H6u1fPKW.js.map} +1 -1
- package/dist/{stream-agent-turn-ZL_mAEzE.d.ts → stream-agent-turn-D1yA1Mi6.d.ts} +2 -2
- package/dist/{substrate-B8IoIZwD.d.ts → substrate-xLoDRRq5.d.ts} +2 -2
- package/dist/{supervise-CFFzLFAC.js → supervise-BcKC74yr.js} +11 -4
- package/dist/supervise-BcKC74yr.js.map +1 -0
- package/dist/{supervisor-CJPvBIMu.js → supervisor-Ck9oX5A9.js} +105 -12
- package/dist/supervisor-Ck9oX5A9.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +12 -12
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-CqzsTCqn.d.ts → types-mghY5giJ.d.ts} +17 -3
- package/package.json +1 -1
- package/dist/supervise-CFFzLFAC.js.map +0 -1
- package/dist/supervisor-CJPvBIMu.js.map +0 -1
|
@@ -105,6 +105,14 @@ function promptPartFromInputPart(part) {
|
|
|
105
105
|
//#region src/runtime/supervise/deadline.ts
|
|
106
106
|
const MAX_TIMER_DELAY_MS = 2147483647;
|
|
107
107
|
const DEFAULT_SUCCESSFUL_SHUTDOWN_MS = 5e3;
|
|
108
|
+
/** The abort reason a child's own deadline carries. */
|
|
109
|
+
const CHILD_DEADLINE_REASON = "child deadline exceeded";
|
|
110
|
+
/** The abort reason the root's budget deadline cascades to every node. */
|
|
111
|
+
const ROOT_DEADLINE_REASON = "root budget deadline exceeded";
|
|
112
|
+
/** Whether an abort reason is a deadline: the child's own or the root budget's. */
|
|
113
|
+
function isDeadlineAbortReason(reason) {
|
|
114
|
+
return reason === "child deadline exceeded" || reason === "root budget deadline exceeded";
|
|
115
|
+
}
|
|
108
116
|
const TEARDOWN_ACKNOWLEDGEMENT_MS = 250;
|
|
109
117
|
/** Arm a finite wall-clock deadline in safe chunks. Resource deadlines unref by default;
|
|
110
118
|
* a standalone wait opts into keeping the process alive until it settles or is cancelled. */
|
|
@@ -6429,6 +6437,27 @@ function harnessTranscriptUnavailable(reason) {
|
|
|
6429
6437
|
* Mirrors the supervise scope's `readInteractiveSession`: an absence is always a named reason,
|
|
6430
6438
|
* never `undefined`. The scope reads each child with it, and `supervise` reads the root with it.
|
|
6431
6439
|
*/
|
|
6440
|
+
/**
|
|
6441
|
+
* The longest a settle waits for an executor's final transcript. The provider executor's own
|
|
6442
|
+
* steps are bounded (the harness stop at 30 s, each native copy by its port's `nativeTimeoutMs`,
|
|
6443
|
+
* 120 s by default), so this guards only an executor that never answers.
|
|
6444
|
+
*/
|
|
6445
|
+
const HARNESS_TRANSCRIPT_SETTLE_TIMEOUT_MS = 6 * 6e4;
|
|
6446
|
+
/**
|
|
6447
|
+
* Wait, bounded, until the executor's transcript is final (`Executor.harnessTranscriptSettled`).
|
|
6448
|
+
* Never throws: on a timeout or a failure the read that follows reports what was kept.
|
|
6449
|
+
*/
|
|
6450
|
+
async function settleHarnessTranscript(executor, timeoutMs = HARNESS_TRANSCRIPT_SETTLE_TIMEOUT_MS) {
|
|
6451
|
+
if (!executor.harnessTranscriptSettled) return;
|
|
6452
|
+
let timer;
|
|
6453
|
+
try {
|
|
6454
|
+
await Promise.race([Promise.resolve().then(() => executor.harnessTranscriptSettled?.()), new Promise((resolve) => {
|
|
6455
|
+
timer = setTimeout(resolve, timeoutMs);
|
|
6456
|
+
})]);
|
|
6457
|
+
} catch {} finally {
|
|
6458
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
6459
|
+
}
|
|
6460
|
+
}
|
|
6432
6461
|
function readHarnessTranscript(executor) {
|
|
6433
6462
|
if (!executor.harnessTranscript) return harnessTranscriptUnavailable("executor-exposes-no-transcript");
|
|
6434
6463
|
let reported;
|
|
@@ -11265,6 +11294,9 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
11265
11294
|
let providerSessionId = null;
|
|
11266
11295
|
let workspaceControlRef;
|
|
11267
11296
|
let nativeStop;
|
|
11297
|
+
let harnessStopped = false;
|
|
11298
|
+
let transcriptSettled = Promise.resolve();
|
|
11299
|
+
let settleTranscript = () => {};
|
|
11268
11300
|
let runSignal;
|
|
11269
11301
|
const cancelledExplicitly = () => ctx.signal?.reason instanceof RunCancellationReason || runSignal?.reason instanceof RunCancellationReason;
|
|
11270
11302
|
const runtime = options.runtime ?? provider.name;
|
|
@@ -11385,7 +11417,7 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
11385
11417
|
nativeTimer = void 0;
|
|
11386
11418
|
await nativeInFlight;
|
|
11387
11419
|
};
|
|
11388
|
-
const captureNative = (next, phase, admitted) => {
|
|
11420
|
+
const captureNative = (next, phase, admitted, afterStop = false) => {
|
|
11389
11421
|
if (nativePort === void 0 || createProfile.harness === void 0) return Promise.resolve();
|
|
11390
11422
|
const harness = createProfile.harness;
|
|
11391
11423
|
const tracked = (nativeInFlight ?? Promise.resolve()).then(async () => {
|
|
@@ -11394,7 +11426,7 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
11394
11426
|
if (workspaceSnapshot !== void 0 && !nativeHoldsTranscript) return;
|
|
11395
11427
|
const invocationId = workspaceExecutionId;
|
|
11396
11428
|
try {
|
|
11397
|
-
const
|
|
11429
|
+
const takeCopy = () => captureProviderWorkspaceSnapshot(nativePort, {
|
|
11398
11430
|
environment: next,
|
|
11399
11431
|
executionId: invocationId,
|
|
11400
11432
|
...controlRef === void 0 ? {} : { controlRef },
|
|
@@ -11404,6 +11436,12 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
11404
11436
|
profile: createProfile,
|
|
11405
11437
|
phase
|
|
11406
11438
|
}, "native");
|
|
11439
|
+
let captured = await takeCopy();
|
|
11440
|
+
const settleBy = Date.now() + NATIVE_SETTLE_WINDOW_MS;
|
|
11441
|
+
while (afterStop && captured.coverageComplete !== true && (captured.provenance.attempts ?? []).some((attempt) => attempt.outcome === "unknown") && Date.now() < settleBy) {
|
|
11442
|
+
await sleep(NATIVE_SETTLE_POLL_MS);
|
|
11443
|
+
captured = await takeCopy();
|
|
11444
|
+
}
|
|
11407
11445
|
if (workspaceSnapshot !== void 0 && !nativeHoldsTranscript) return;
|
|
11408
11446
|
const copy = retainHarnessTranscript(providerWorkspaceCaptureReceipt({
|
|
11409
11447
|
executionId: invocationId,
|
|
@@ -11442,7 +11480,7 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
11442
11480
|
const finishNativeMirror = async (next, phase) => {
|
|
11443
11481
|
await stopNativeMirror();
|
|
11444
11482
|
if (workspaceSnapshot !== void 0 && !nativeHoldsTranscript) return;
|
|
11445
|
-
await captureNative(next, phase);
|
|
11483
|
+
await captureNative(next, phase, void 0, harnessStopped);
|
|
11446
11484
|
};
|
|
11447
11485
|
const destroyEnvironment = async (cleanupSignal) => {
|
|
11448
11486
|
if (workspaceCleanupPromise !== void 0) return await workspaceCleanupPromise;
|
|
@@ -11516,13 +11554,25 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
11516
11554
|
...retained === void 0 ? {} : { handle: retained },
|
|
11517
11555
|
signal: AbortSignal.timeout(NATIVE_STOP_TIMEOUT_MS)
|
|
11518
11556
|
}).then((stop) => {
|
|
11519
|
-
if (stop.effect
|
|
11557
|
+
if (stop.effect === "cancelled" || stop.effect === "not_live") harnessStopped = true;
|
|
11558
|
+
else if (nativeStop === stopping) nativeStop = void 0;
|
|
11520
11559
|
return stop;
|
|
11521
11560
|
});
|
|
11522
11561
|
nativeStop = stopping;
|
|
11523
11562
|
return stopping;
|
|
11524
11563
|
};
|
|
11525
11564
|
/**
|
|
11565
|
+
* A turn that its deadline or an explicit cancellation ended stops its harness, and waits within
|
|
11566
|
+
* the stop's bound for the provider to report it stopped, before the turn's final native copy.
|
|
11567
|
+
* Nothing else stops a retained execution before teardown, so that copy read a session the
|
|
11568
|
+
* harness was still writing and was stored partial (2026-10-04 trace proof:
|
|
11569
|
+
* `native_snapshot_live`, `events_not_settled`), and the harness spent past its deadline.
|
|
11570
|
+
*/
|
|
11571
|
+
const stopEndedHarness = async (signal) => {
|
|
11572
|
+
if (!isDeadlineAbortReason(signal.reason) && !cancelledExplicitly()) return;
|
|
11573
|
+
await stopNativeExecution();
|
|
11574
|
+
};
|
|
11575
|
+
/**
|
|
11526
11576
|
* A release that keeps an environment keeps its files, never its running harness. The root has
|
|
11527
11577
|
* settled and no process will reconcile this execution, so its native process stops before the
|
|
11528
11578
|
* release records what it kept.
|
|
@@ -11597,6 +11647,10 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
11597
11647
|
beginWorkspaceExecution();
|
|
11598
11648
|
const linked = linkAbort(ctx.signal, signal, controller.signal);
|
|
11599
11649
|
runSignal = linked.signal;
|
|
11650
|
+
harnessStopped = false;
|
|
11651
|
+
transcriptSettled = new Promise((resolve) => {
|
|
11652
|
+
settleTranscript = resolve;
|
|
11653
|
+
});
|
|
11600
11654
|
try {
|
|
11601
11655
|
const executionStartedAt = Date.now() - (retention?.priorSpent?.ms ?? 0);
|
|
11602
11656
|
let invocation = {
|
|
@@ -11664,6 +11718,7 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
11664
11718
|
onHarnessTranscript: (next) => {
|
|
11665
11719
|
harnessTranscript = next;
|
|
11666
11720
|
},
|
|
11721
|
+
onTranscriptSettled: () => settleTranscript(),
|
|
11667
11722
|
onUnsettledFailure: () => {
|
|
11668
11723
|
workspacePreservationRequired = true;
|
|
11669
11724
|
},
|
|
@@ -11673,6 +11728,7 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
11673
11728
|
},
|
|
11674
11729
|
captureWorkspace,
|
|
11675
11730
|
startNativeMirror,
|
|
11731
|
+
stopEndedHarness,
|
|
11676
11732
|
finishNativeMirror,
|
|
11677
11733
|
workspaceControlRef: () => workspaceControlRef,
|
|
11678
11734
|
workspaceProvenance: () => workspaceProvenance,
|
|
@@ -11710,6 +11766,7 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
11710
11766
|
} finally {
|
|
11711
11767
|
linked.release();
|
|
11712
11768
|
workspaceRunActive = false;
|
|
11769
|
+
settleTranscript();
|
|
11713
11770
|
}
|
|
11714
11771
|
};
|
|
11715
11772
|
executor = {
|
|
@@ -11747,7 +11804,7 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
11747
11804
|
if (pending && cancelledExplicitly()) stopNativeExecution();
|
|
11748
11805
|
if (options.workspaceRetention !== void 0 && workspaceRunActive) return {
|
|
11749
11806
|
destroyed: false,
|
|
11750
|
-
detail: "provider workspace retention: source preserved while the execution is still active"
|
|
11807
|
+
detail: harnessStopped ? "provider workspace retention: source preserved while the stopped execution writes its failure capture" : "provider workspace retention: source preserved while the execution is still active"
|
|
11751
11808
|
};
|
|
11752
11809
|
if (pending) return {
|
|
11753
11810
|
destroyed: false,
|
|
@@ -11826,7 +11883,8 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
11826
11883
|
return artifact;
|
|
11827
11884
|
},
|
|
11828
11885
|
traceSource: () => trace.source,
|
|
11829
|
-
harnessTranscript: () => harnessTranscript
|
|
11886
|
+
harnessTranscript: () => harnessTranscript,
|
|
11887
|
+
harnessTranscriptSettled: () => transcriptSettled
|
|
11830
11888
|
};
|
|
11831
11889
|
return attestRuntimeOwnedPendingExecutor(executor, runtime, plannedDeclaration, plannedBinding);
|
|
11832
11890
|
}
|
|
@@ -11836,6 +11894,9 @@ function admittedControlRef(retention) {
|
|
|
11836
11894
|
}
|
|
11837
11895
|
/** Bounds one provider stop: a reconnect, the exact cancellation and its status read. */
|
|
11838
11896
|
const NATIVE_STOP_TIMEOUT_MS = 3e4;
|
|
11897
|
+
/** How long the final copy of a stopped harness waits for the provider to record how it ended. */
|
|
11898
|
+
const NATIVE_SETTLE_WINDOW_MS = 15e3;
|
|
11899
|
+
const NATIVE_SETTLE_POLL_MS = 1e3;
|
|
11839
11900
|
/** The environment id the latest durable admission names, when creation got that far. */
|
|
11840
11901
|
function admittedEnvironmentId(retention) {
|
|
11841
11902
|
for (const admission of [...retention?.admissions ?? []].reverse()) {
|
|
@@ -11906,6 +11967,12 @@ async function* streamProviderExecutor(args) {
|
|
|
11906
11967
|
let failure;
|
|
11907
11968
|
let failed = false;
|
|
11908
11969
|
let unavailable;
|
|
11970
|
+
let harnessStop;
|
|
11971
|
+
const stopEndedHarness = () => {
|
|
11972
|
+
if (settled !== void 0 || !linked.aborted) return Promise.resolve();
|
|
11973
|
+
harnessStop ??= args.stopEndedHarness(linked);
|
|
11974
|
+
return harnessStop;
|
|
11975
|
+
};
|
|
11909
11976
|
try {
|
|
11910
11977
|
const toolParts = createSandboxToolPartState();
|
|
11911
11978
|
for await (const event of source.events) {
|
|
@@ -12031,6 +12098,9 @@ async function* streamProviderExecutor(args) {
|
|
|
12031
12098
|
error: error instanceof Error ? error.message : String(error),
|
|
12032
12099
|
...linked.aborted ? { errorCode: "cancelled" } : {}
|
|
12033
12100
|
};
|
|
12101
|
+
await stopEndedHarness();
|
|
12102
|
+
if (linked.aborted) await args.finishNativeMirror(environment, "failed");
|
|
12103
|
+
args.onTranscriptSettled();
|
|
12034
12104
|
try {
|
|
12035
12105
|
const retainedWorkspace = await args.captureWorkspace(environment, failureOutcome);
|
|
12036
12106
|
if (retainedWorkspace !== void 0 && args.retention?.onEvidence !== void 0) await args.retention.onEvidence({
|
|
@@ -12045,6 +12115,7 @@ async function* streamProviderExecutor(args) {
|
|
|
12045
12115
|
}
|
|
12046
12116
|
if (args.options.workspaceRetention === void 0) args.onHarnessTranscript(await captureHarnessTranscript(environment, args.profile.harness, linked));
|
|
12047
12117
|
} finally {
|
|
12118
|
+
await stopEndedHarness();
|
|
12048
12119
|
await args.finishNativeMirror(environment, failed ? "failed" : settled !== void 0 ? "settled" : "interrupted");
|
|
12049
12120
|
if ((!source.retained || settled !== void 0 && !failed) && !(source.retained && args.retention?.preserveEnvironment) && !(unavailable !== void 0 && !failed) && (args.options.destroyOnSettle ?? true)) {
|
|
12050
12121
|
const cleanup = await args.destroyEnvironment();
|
|
@@ -24545,7 +24616,7 @@ function createScope(args) {
|
|
|
24545
24616
|
cascadeAbort = () => controller.abort(args.signal.reason);
|
|
24546
24617
|
if (args.signal.aborted) controller.abort(args.signal.reason);
|
|
24547
24618
|
else args.signal.addEventListener("abort", cascadeAbort, { once: true });
|
|
24548
|
-
if (childDeadlineAtMs !== void 0) clearChildDeadline = armDeadlineTimer(Math.max(0, childDeadlineAtMs - now()), () => controller.abort(
|
|
24619
|
+
if (childDeadlineAtMs !== void 0) clearChildDeadline = armDeadlineTimer(Math.max(0, childDeadlineAtMs - now()), () => controller.abort(CHILD_DEADLINE_REASON));
|
|
24549
24620
|
const deferredOwner = {};
|
|
24550
24621
|
const workerTrace = args.workerTrace?.(args.parentId);
|
|
24551
24622
|
let markRecoveryReady;
|
|
@@ -25549,12 +25620,26 @@ function meterRuntimeOwnedAccounting(scope, spend, detail) {
|
|
|
25549
25620
|
}
|
|
25550
25621
|
const ownerMaterializationStates = /* @__PURE__ */ new WeakMap();
|
|
25551
25622
|
/**
|
|
25623
|
+
* One owner materialization write at a time. A cancelled run settles without waiting for its root
|
|
25624
|
+
* driver, so the driver's late receipt and the settlement's finalization could each read no
|
|
25625
|
+
* receipt before the other's journal append returned, and both appended one: the journal then
|
|
25626
|
+
* refused the run as corrupted (duplicate materialization receipt).
|
|
25627
|
+
*/
|
|
25628
|
+
function serializedOwnerWrite(state, write) {
|
|
25629
|
+
const next = (state.writes ?? Promise.resolve()).then(write, write);
|
|
25630
|
+
state.writes = next.catch(() => void 0);
|
|
25631
|
+
return next;
|
|
25632
|
+
}
|
|
25633
|
+
/**
|
|
25552
25634
|
* @internal Publish exact root-manager materialization from a runtime-owned adapter after dynamic
|
|
25553
25635
|
* attachments exist and before its executor starts. This is deliberately a module function backed
|
|
25554
25636
|
* by a private WeakMap, not a Scope method an Agent can call.
|
|
25555
25637
|
*/
|
|
25556
25638
|
async function recordScopeOwnerMaterialization(scope, runtime, declaration, bindingInput) {
|
|
25557
25639
|
const state = ownerMaterializationState(scope);
|
|
25640
|
+
await serializedOwnerWrite(state, () => publishOwnerMaterialization(state, runtime, declaration, bindingInput));
|
|
25641
|
+
}
|
|
25642
|
+
async function publishOwnerMaterialization(state, runtime, declaration, bindingInput) {
|
|
25558
25643
|
if (runtime !== state.runtime) {
|
|
25559
25644
|
await rejectOwnerMaterialization(state);
|
|
25560
25645
|
throw new ValidationError$1(`scope owner materialization runtime ${JSON.stringify(runtime)} does not match ${JSON.stringify(state.runtime)}`);
|
|
@@ -25667,7 +25752,11 @@ async function restoreScopeOwnerAcceptedExecution(scope) {
|
|
|
25667
25752
|
/** @internal Ensure a deferred root that never published evidence remains visibly unknown. */
|
|
25668
25753
|
async function finalizeScopeOwnerMaterialization(scope) {
|
|
25669
25754
|
const state = ownerMaterializationStates.get(scope);
|
|
25670
|
-
if (state === void 0
|
|
25755
|
+
if (state === void 0) return;
|
|
25756
|
+
await serializedOwnerWrite(state, () => finalizeOwnerMaterialization(state));
|
|
25757
|
+
}
|
|
25758
|
+
async function finalizeOwnerMaterialization(state) {
|
|
25759
|
+
if (state.publishedThisProcess || state.bindingPublished) return;
|
|
25671
25760
|
if (state.prior !== void 0) {
|
|
25672
25761
|
await appendUnknownOwnerBinding(state, state.prior, "root-agent-did-not-report");
|
|
25673
25762
|
throw new ValidationError$1("resumed scope owner did not re-attest its prior materialization before execution");
|
|
@@ -26202,6 +26291,7 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
|
|
|
26202
26291
|
};
|
|
26203
26292
|
} catch (cause) {
|
|
26204
26293
|
let err = cause;
|
|
26294
|
+
await settleHarnessTranscript(executor);
|
|
26205
26295
|
await closeRetainedWrites();
|
|
26206
26296
|
if (live.acceptedResult !== void 0 && reconciliationError === void 0 && (isAbortError(err) || teardownFailure !== void 0 && err === teardownFailure || childAbort.signal.aborted && err === childAbort.signal.reason)) {
|
|
26207
26297
|
const accepted = live.acceptedResult;
|
|
@@ -26697,6 +26787,7 @@ function driverChild(profile, driver, journal, execution, acceptedSubmission, re
|
|
|
26697
26787
|
const traceSource = driver.traceSource;
|
|
26698
26788
|
const progress = driver.progress;
|
|
26699
26789
|
const harnessTranscript = driver.harnessTranscript?.bind(driver);
|
|
26790
|
+
const harnessTranscriptSettled = driver.harnessTranscriptSettled?.bind(driver);
|
|
26700
26791
|
const spec = executableAgentSpecSnapshot({
|
|
26701
26792
|
profile,
|
|
26702
26793
|
harness: null,
|
|
@@ -26709,7 +26800,8 @@ function driverChild(profile, driver, journal, execution, acceptedSubmission, re
|
|
|
26709
26800
|
...recoverExecutor ? { recoverExecutor } : {},
|
|
26710
26801
|
...traceSource ? { traceSource } : {},
|
|
26711
26802
|
...progress ? { progress } : {},
|
|
26712
|
-
...harnessTranscript ? { harnessTranscript } : {}
|
|
26803
|
+
...harnessTranscript ? { harnessTranscript } : {},
|
|
26804
|
+
...harnessTranscriptSettled ? { harnessTranscriptSettled } : {}
|
|
26713
26805
|
}, "driverChild");
|
|
26714
26806
|
const deliver = driver.deliver?.bind(driver);
|
|
26715
26807
|
return {
|
|
@@ -26775,6 +26867,7 @@ const driverExecutorFactory = (rawSpec, ctx) => {
|
|
|
26775
26867
|
...spec.traceSource ? { traceSource: spec.traceSource } : {},
|
|
26776
26868
|
...spec.progress ? { progress: spec.progress } : {},
|
|
26777
26869
|
...spec.harnessTranscript ? { harnessTranscript: spec.harnessTranscript } : {},
|
|
26870
|
+
...spec.harnessTranscriptSettled ? { harnessTranscriptSettled: spec.harnessTranscriptSettled } : {},
|
|
26778
26871
|
...deliver ? { deliver(message) {
|
|
26779
26872
|
return deliver(message) !== false;
|
|
26780
26873
|
} } : {},
|
|
@@ -28578,9 +28671,9 @@ function createSupervisor() {
|
|
|
28578
28671
|
});
|
|
28579
28672
|
let deadlineExceeded = false;
|
|
28580
28673
|
const rootDeadlineAtMs = pool.readout().deadlineMs;
|
|
28581
|
-
if (rootDeadlineAtMs > 0 && now() >= rootDeadlineAtMs) deadlineExceeded = cascadeAbort(
|
|
28674
|
+
if (rootDeadlineAtMs > 0 && now() >= rootDeadlineAtMs) deadlineExceeded = cascadeAbort(ROOT_DEADLINE_REASON);
|
|
28582
28675
|
const clearRootDeadline = opts.budget.deadlineMs === void 0 ? void 0 : armDeadlineTimer(Math.max(0, rootDeadlineAtMs - now()), () => {
|
|
28583
|
-
deadlineExceeded = cascadeAbort(
|
|
28676
|
+
deadlineExceeded = cascadeAbort(ROOT_DEADLINE_REASON);
|
|
28584
28677
|
});
|
|
28585
28678
|
let actOutcome = {
|
|
28586
28679
|
ok: false,
|
|
@@ -29184,4 +29277,4 @@ function isNonEmptySpend(s) {
|
|
|
29184
29277
|
//#endregion
|
|
29185
29278
|
export { bindScopeRetainedOwnerProvider as $, detachedFrozen as $i, parseWorkerToolTraceArtifact as $n, sanitizeRuntimeStreamEvent as $r, isPeerMailEnvelope as $t, driverExecutorFactory as A, addResourceSpend as Aa, prepareJsonlAppend as Ai, resolveAgentEnvironmentProvider as An, contentAddress as Ar, createExecutor as At, recordScopeOwnerDriverAttempt as B, promptFromAgentTurnInput as Ba, newExecutionAttemptId as Bi, InMemoryResultBlobStore as Bn, buildRuntimeEventOtelSpans as Br, workerTraceEnv as Bt, createContinuationKeeper as C, sleep as Ca, renderProfileMaterializationIssues as Ci, readPromptOptions as Cn, runAbortable as Cr, freeSlots as Ct, passedItems as D, unmeteredSpend as Da, validateProfileMaterialization as Di, createAgentEnvironmentProviderRegistry as Dn, readHarnessTranscript as Dr, captureReusableExecutorConfig as Dt, failedItems as E, throwIfAborted as Ea, unsupportedProfileDimensions as Ei, LEAF_CONTINUATION_TASK as En, persistHarnessTranscript as Er, bindReusableExecutorExecutionId as Et, beginScopeOwnerAttempt as F, awaitAbortable$1 as Fa, authoredProfileDigest as Fi, sandboxSessionTraceSource as Fn, defaultRedactor as Fr, createSteerableSandboxSession as Ft, settledToIteration as G, runtimeOwnedExecutorMaterialization as Gi, insideCursorNamespace as Gn, loopEventToOtelSpan as Gr, createActivityLog as Gt, recordScopeOwnerPause as H, providerMessageText as Ha, recordRuntimeOwnedDriveHarnessProviderEvidence as Hi, SpawnEventIndex as Hn, createOtelExporter as Hr, workerTraceSeamKey as Ht, createScope as I, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as Ia, finalizeRuntimeOwnedPendingExecutor as Ii, registerRetainedExecutorPreparation as In, defaultRedactorIdentityMaterial as Ir, createRouterTranscript as It, pollFor as J, runtimeOwnedScopeOwnerRuntime as Ji, pendingWaits as Jn, toOtelAttributes as Jr, AUTHORITY_MARKERS as Jt, createWaitProbes as K, runtimeOwnedExecutorProviderEvidence as Ki, loadSpawnForest as Kn, padSpanId as Kr, readWorkerProgress as Kt, deriveNodeExecutionIdentity as L, armDeadlineTimer as La, inheritRuntimeOwnedExecutorAttestation as Li, retainedExecutorSeamKey as Ln, resolveRedactor as Lr, createInPlaceCliExecutor as Lt, withDriverExecutor as M, withBudgetResources as Ma, writeAllBytes as Mi, unavailableSignalOfFailure as Mn, mergeTraceEnv as Mr, snapshotExecutorConfig as Mt, SUBTREE_RESULT_LIMIT as N, decodeHarnessUsage as Na, attestRuntimeOwnedPendingExecutor as Ni, createPushTraceSource as Nn, readTraceContextFromEnv as Nr, createWorktreeCliExecutor as Nt, verdictFromJudgeScore as O, withTimeout as Oa, worktreeCliProfileMaterialization as Oi, providerAsExecutor as On, resolveHarnessTranscriptCapture as Or, cliInPlaceExecutor as Ot, assertRecursiveReservationPolicy as P, abortError$2 as Pa, attestRuntimeOwnedScopeOwner as Pi, decodeToolPart as Pn, traceContextToEnv as Pr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as Pt, bindScopeRetainedOwnerEnvironmentId as Q, executableAgentSpecSnapshot as Qi, isTraceAnalysisStore as Qn, sanitizeKnowledgeReadinessReport as Qr, createPeerMailbox as Qt, meterRuntimeOwnedAccounting as R, teardownExecutor as Ra, knownExecutionBindingReceipt as Ri, FileResultBlobStore as Rn, buildLoopOtelSpans as Rr, WORKER_TRACE_PROPAGATION as Rt, composeContinuationNote as S, randomSuffix as Sa, promptResourceProfileMaterialization as Si, assertBoxlessPromptOptions as Sn, linkAbort as Sr, startRetainedInteractiveRun as St, expandQuestions as T, throwAbort as Ta, sandboxActProfileMaterialization as Ti, runBrainLoop as Tn, harnessTranscriptArtifact as Tr, rollingDispatch as Tt, restoreScopeOwnerAcceptedExecution as U, runtimeOwnedDriveHarnessProviderEvidence as Ui, assertContentAddress as Un, flatOtelSpan as Ur, taskToPrompt as Ut, recordScopeOwnerMaterialization as V, promptOptionsFromAgentTurnInput as Va, providerAttemptEvidence as Vi, InMemorySpawnJournal as Vn, createOpenInferenceFileExporter as Vr, workerTraceHeaders as Vt, scopeOwnerExecutorNodeContext as W, runtimeOwnedExecutorExecutionBinding as Wi, encodeResultBlob as Wn, generateSpanId as Wr, DEFAULT_STALL_AFTER_MS as Wt, validateWaitSpec as X, unknownMaterializationReceipt as Xi, WORKER_TOOL_TRACE_SCHEMA_VERSION as Xn, createRuntimeStreamEventCollector as Xr, PEER_MAIL_WIRE_KEY as Xt, timerAt as Y, unknownExecutionBindingReceipt as Yi, replaySpawnTree as Yn, createRuntimeEventCollector as Yr, DEFAULT_PEER_MAIL_LIMITS as Yt, waitUntil as Z, executableAgentProfileSnapshot as Zi, captureWorkerTraceEvidence as Zn, sanitizeAgentRuntimeEvent as Zr, claimsAuthority as Zt, CheckUnavailableError as _, cloneSpend as _a, fullProfileMaterialization as _i, createSandboxLineage as _n, environmentGone as _r, readWorkerInteractiveBinding as _t, collectDelivered as a, createSandboxToolPartState as aa, DEFAULT_LOCAL_HARNESS as ai, bridgeModelRouteRefusal as an, createBudgetPool as ar, scopeRetainedOwnerPriorSpend as at, bestComposite as b, isAbortError$2 as ba, promptModelProfileMaterialization as bi, SandboxEvidenceRetentionError as bn, RunCancellationReason as br, reconnectRetainedInteractiveRun as bt, runTree as c, isSandboxTerminalEvent as ca, harnessSupportsReasoningEffort as ci, harnessUsageIsEmpty as cn, spendFromUsageEvents as cr, scopeRetainedOwnerResult as ct, classifyDriverFailure as d, notifySandboxEventObserver as da, CodexExecutionDiagnosticError as di, bridgeStopSignalKey as dn, reconnectRetainedRun as dr, hostDirectoryReader as dt, detachedSnapshot as ea, runSettledCommand as ei, peerMailTools as en, workerTraceAnalysisStore as er, consumeScopeRetainedOwnerResult as et, runDriverWithRetry as f, sandboxEventServedBackend as fa, terminateProcessTreeAndConfirm as fi, TERMINAL_DECISIONS as fn, recoverRetainedRun as fr, resolveSpawnResourcePaths as ft, CONTINUATION_FACTS as g, chargedTokens as ga, defineProfileMaterializationContract as gi, runAgentRounds as gn, destroyInteractiveEnvironment as gr, attachWorker as gt, CONTINUATIONS_DIR as h, addSpend as ha, controlProfileMaterialization as hi, isTerminalDecision as hn, retainedCreateMaterial as hr, workerInteractiveAdmissionFile as ht, bestDelivered as i, canonicalStreamEventFromSandboxEvent as ia, removeWorktree as ii, bridgeAdmissionRefusal as in, assertValidBudget as ir, scopeRetainedOwnerContext as it, isDriverSpec as j, resourceTelemetry as ja, readCommittedJsonLines as ji, unavailablePauseMs as jn, createPropagatingTraceEmitter as jr, createExecutorRegistry as jt, driverChild as k, zeroSpend as ka, isNoEntError as ki, providerAsSandboxClient as kn, retainHarnessTranscript as kr, cliWorktreeExecutor as kt, DriverAttemptsExhaustedError as l, mapSandboxEvent as la, localHarnessExecutable as li, readCodexRolloutSession as ln, spendFromUsageTotals as lr, SPAWN_RESOURCE_PATH_MAX_BYTES as lt, upstreamUnavailableSignal as m, sumSandboxUsage as ma, assertProfileMaterialization as mi, defaultSelectWinner as mn, startRetainedRunInEnvironment as mr, readWorkerInteractiveAdmissions as mt, createRootHandle as n, readSandboxOutcome as na, captureWorktreeDiff as ni, isLiveNodeStatus as nn, BudgetReconcileFault as nr, prepareScopeRetainedOwnerTask as nt, pickBestDelivered as o, createSandboxUsageLedger as oa, LOCAL_HARNESSES as oi, addHarnessUsage as on, meterUsageEvent as or, scopeRetainedOwnerResourceReader as ot, summarizeDriverAttempts as p, sandboxProgressEvents as pa, AGENT_PROFILE_MATERIALIZATION_AXES as pi, createSandboxForSpec as pn, startRetainedRun as pr, interactiveAdmissionSeamKey as pt, isWaitOutcome as q, runtimeOwnedPendingExecutorMaterialization as qi, materializeTreeView as qn, padTraceId as qr, createInbox as qt, createSupervisor as r, assertSandboxServedModel as ra, createWorktree as ri, isTerminalNodeStatus as rn, ReservationWaitRefused as rr, reconcileScopeRetainedOwnerEnvironment as rt, runFinalizer as s, extractLlmCallEvent as sa, harnessInvocation as si, createCodexRolloutStoreReader as sn, newUsageTotals as sr, scopeRetainedOwnerRestorePoint as st, DEFAULT_MAX_DEPTH as t, projectSandboxOutcome as ta, runWorktreeHarness as ti, peerMailVerbNames as tn, executorFailure as tr, noteScopeRetainedOwnerCoordination as tt, HarnessTurnFailedError as u, mapSandboxToolEvent as ua, parseCodexTokenUsage as ui, bridgeRuntimeAttachmentsKey as un, errMessage as ur, environmentReader as ut, admitContinuationPolicy as v, deleteBoxSafe as va, profileMaterializationAxes$1 as vi, probeSandboxCapabilities as vn, createWorkerSlots as vr, workerInteractiveBindingFile as vt, distillFindings as w, stringifySafe as wa, renderUnsupported as wi, routerBrain as wn, captureHarnessTranscript as wr, queueOf as wt, checkVerdictOf as x, promptCacheTokenClasses as xa, promptOnlyProfileMaterialization as xi, captureBeforeDestroy as xn, abortError as xr, recoverRetainedInteractiveRun as xt, admitFinding as y, hasCompleteCacheBreakdown as ya, promptControlProfileMaterialization as yi, acquireSandbox as yn, openSlotGroup as yr, workerInteractiveBindingsDir as yt, meterRuntimeOwnedProviderAttempt as z, teardownSurfaces as za, knownMaterializationReceipt as zi, FileSpawnJournal as zn, buildLoopSpanNodes as zr, readWorkerTraceContext as zt };
|
|
29186
29279
|
|
|
29187
|
-
//# sourceMappingURL=supervisor-
|
|
29280
|
+
//# sourceMappingURL=supervisor-Ck9oX5A9.js.map
|