@tangle-network/agent-runtime 0.201.0 → 0.202.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-BPxs-Iu2.d.ts → activation-B_4qFpKR.d.ts} +2 -2
- package/dist/{activation-C_FN2aqK.js → activation-D4oFb8Lt.js} +2 -2
- package/dist/{activation-C_FN2aqK.js.map → activation-D4oFb8Lt.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-qdAwriPV.js → coordination-driver-B5TLsu_f.js} +2 -2
- package/dist/{coordination-driver-qdAwriPV.js.map → coordination-driver-B5TLsu_f.js.map} +1 -1
- package/dist/{delegate-BWHG-zZW.js → delegate-B8y9EvTY.js} +2 -2
- package/dist/{delegate-BWHG-zZW.js.map → delegate-B8y9EvTY.js.map} +1 -1
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +2 -2
- package/dist/{graph-cCqKhLqz.js → graph-C3WsOkdi.js} +3 -3
- package/dist/{graph-cCqKhLqz.js.map → graph-C3WsOkdi.js.map} +1 -1
- package/dist/{improvement-cycle-VH_ZGcIj.js → improvement-cycle-RpIiIKjM.js} +3 -3
- package/dist/{improvement-cycle-VH_ZGcIj.js.map → improvement-cycle-RpIiIKjM.js.map} +1 -1
- package/dist/{index-Br191WbE.d.ts → index-BLaGPXGh.d.ts} +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +2 -2
- package/dist/kernel.js +8 -8
- package/dist/{loop-runner-bin-BNRdsDOn.d.ts → loop-runner-bin-CkmHiZgU.d.ts} +3 -3
- package/dist/{loop-runner-bin-jQ8hXO9J.js → loop-runner-bin-CqXOUcrz.js} +3 -3
- package/dist/{loop-runner-bin-jQ8hXO9J.js.map → loop-runner-bin-CqXOUcrz.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 +2 -2
- package/dist/mcp/index.js +4 -4
- package/dist/{provision-supervisor-BA2-GPth.js → provision-supervisor-hc_SOkP5.js} +3 -3
- package/dist/{provision-supervisor-BA2-GPth.js.map → provision-supervisor-hc_SOkP5.js.map} +1 -1
- package/dist/{redact-h-oaw11Q.js → redact-B5g0jY2n.js} +46 -6
- package/dist/redact-B5g0jY2n.js.map +1 -0
- package/dist/{runtime-DeqdBVeC.js → runtime-Dc-Aem9j.js} +8 -8
- package/dist/{runtime-DeqdBVeC.js.map → runtime-Dc-Aem9j.js.map} +1 -1
- package/dist/{server-U_k9NUbk.js → server-BnsMo0dR.js} +3 -3
- package/dist/{server-U_k9NUbk.js.map → server-BnsMo0dR.js.map} +1 -1
- package/dist/{stream-agent-turn-CJWthifS.d.ts → stream-agent-turn-CAj0XcwD.d.ts} +8 -5
- package/dist/{structural-rollout-BcMmrpv4.js → structural-rollout-Zbntz3jo.js} +2 -2
- package/dist/{structural-rollout-BcMmrpv4.js.map → structural-rollout-Zbntz3jo.js.map} +1 -1
- package/dist/{supervise-DmFO50N6.js → supervise-CskGiJMk.js} +3 -3
- package/dist/{supervise-DmFO50N6.js.map → supervise-CskGiJMk.js.map} +1 -1
- 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/package.json +1 -1
- package/dist/redact-h-oaw11Q.js.map +0 -1
|
@@ -7269,6 +7269,10 @@ async function* streamProviderExecutor(args) {
|
|
|
7269
7269
|
signal: linked
|
|
7270
7270
|
});
|
|
7271
7271
|
settled = {
|
|
7272
|
+
...result.outcome?.status === "failed" ? { outcome: {
|
|
7273
|
+
success: false,
|
|
7274
|
+
...result.outcome.error ? { error: result.outcome.error } : {}
|
|
7275
|
+
} } : {},
|
|
7272
7276
|
outRef: contentRef$1(`provider:${args.provider.name}`, result),
|
|
7273
7277
|
out: result,
|
|
7274
7278
|
...verdict ? { verdict } : {},
|
|
@@ -7436,6 +7440,7 @@ async function providerExecutionSource(args, turn, signal) {
|
|
|
7436
7440
|
data: {
|
|
7437
7441
|
finalText: result.text,
|
|
7438
7442
|
success: result.success,
|
|
7443
|
+
...result.error ? { error: result.error } : {},
|
|
7439
7444
|
usageMode: "cumulative"
|
|
7440
7445
|
},
|
|
7441
7446
|
...result.usage ? { usage: result.usage } : {}
|
|
@@ -11064,6 +11069,18 @@ function createBudgetPool(root, runStartedAtMs, restore = {}) {
|
|
|
11064
11069
|
};
|
|
11065
11070
|
}
|
|
11066
11071
|
//#endregion
|
|
11072
|
+
//#region src/runtime/supervise/executor-outcome.ts
|
|
11073
|
+
const outcomeSchema = AgentTurnResultSchema.pick({
|
|
11074
|
+
success: true,
|
|
11075
|
+
error: true
|
|
11076
|
+
}).strict();
|
|
11077
|
+
/** Read only the executor envelope; application output and grades are not execution status. */
|
|
11078
|
+
function executorFailureReason(result) {
|
|
11079
|
+
if (result.outcome === void 0) return void 0;
|
|
11080
|
+
const outcome = outcomeSchema.parse(result.outcome);
|
|
11081
|
+
return outcome.success ? void 0 : outcome.error ?? "Agent execution failed";
|
|
11082
|
+
}
|
|
11083
|
+
//#endregion
|
|
11067
11084
|
//#region src/durable/content-address.ts
|
|
11068
11085
|
/** Stable content address shared by result and trace artifacts. */
|
|
11069
11086
|
function contentAddress(artifact) {
|
|
@@ -11721,6 +11738,7 @@ function assertRetainedExecutionOrder(events, event) {
|
|
|
11721
11738
|
if (!admissions.some((item) => item.phase === "dispatched")) fail("result precedes dispatch");
|
|
11722
11739
|
if (!/^sha256:[0-9a-f]{64}$/.test(event.outRef)) fail("has an invalid result reference");
|
|
11723
11740
|
assertValidSpend(event.spent, "retained execution result");
|
|
11741
|
+
executorFailureReason(event);
|
|
11724
11742
|
return;
|
|
11725
11743
|
}
|
|
11726
11744
|
const admission = event.admission;
|
|
@@ -18385,13 +18403,16 @@ async function prepareInterruptedExecutors(opts, events, signal, now, parentId =
|
|
|
18385
18403
|
let seq = events.reduce((max, event) => closesCursorSlot(event) ? Math.max(max, event.seq) : max, -1) + 1;
|
|
18386
18404
|
for (const { result, violation } of accepted) {
|
|
18387
18405
|
signal.throwIfAborted();
|
|
18406
|
+
const failureReason = executorFailureReason(result);
|
|
18407
|
+
const reason = violation ?? failureReason;
|
|
18388
18408
|
await opts.journal.appendEvent(opts.runId, {
|
|
18389
18409
|
kind: "settled",
|
|
18390
18410
|
id: result.id,
|
|
18391
|
-
status:
|
|
18392
|
-
|
|
18393
|
-
|
|
18394
|
-
|
|
18411
|
+
status: reason === void 0 ? "done" : "down",
|
|
18412
|
+
outRef: result.outRef,
|
|
18413
|
+
...reason === void 0 ? {} : {
|
|
18414
|
+
infra: violation !== void 0,
|
|
18415
|
+
reason
|
|
18395
18416
|
},
|
|
18396
18417
|
spent: result.spent,
|
|
18397
18418
|
...result.verdict ? { verdict: result.verdict } : {},
|
|
@@ -18557,6 +18578,7 @@ function registerScopeRetainedOwner(scope, args) {
|
|
|
18557
18578
|
onResult: async (result) => {
|
|
18558
18579
|
scope.signal.throwIfAborted();
|
|
18559
18580
|
assertValidSpend(result.spent, "retained owner result");
|
|
18581
|
+
executorFailureReason(result);
|
|
18560
18582
|
const outRef = contentAddress(result.out);
|
|
18561
18583
|
await args.blobs.put(outRef, result.out);
|
|
18562
18584
|
scope.signal.throwIfAborted();
|
|
@@ -18566,6 +18588,7 @@ function registerScopeRetainedOwner(scope, args) {
|
|
|
18566
18588
|
outRef,
|
|
18567
18589
|
spent: detachedSnapshot(result.spent, "retained owner spend"),
|
|
18568
18590
|
...result.verdict ? { verdict: result.verdict } : {},
|
|
18591
|
+
...result.outcome ? { outcome: result.outcome } : {},
|
|
18569
18592
|
seq: ++sequence,
|
|
18570
18593
|
at: new Date(args.now()).toISOString()
|
|
18571
18594
|
};
|
|
@@ -18640,7 +18663,8 @@ async function scopeRetainedOwnerResult(scope) {
|
|
|
18640
18663
|
outRef: event.outRef,
|
|
18641
18664
|
out,
|
|
18642
18665
|
spent: event.spent,
|
|
18643
|
-
...event.verdict ? { verdict: event.verdict } : {}
|
|
18666
|
+
...event.verdict ? { verdict: event.verdict } : {},
|
|
18667
|
+
...event.outcome ? { outcome: event.outcome } : {}
|
|
18644
18668
|
};
|
|
18645
18669
|
}
|
|
18646
18670
|
async function scopeRetainedOwnerPriorSpend(scope) {
|
|
@@ -19174,6 +19198,7 @@ function createScope(args) {
|
|
|
19174
19198
|
onResult: (result) => retainedWrite(async () => {
|
|
19175
19199
|
controller.signal.throwIfAborted();
|
|
19176
19200
|
assertValidSpend(result.spent, "retained executor result");
|
|
19201
|
+
executorFailureReason(result);
|
|
19177
19202
|
await pendingEvidence?.complete();
|
|
19178
19203
|
const outRef = contentAddress(result.out);
|
|
19179
19204
|
await args.blobs.put(outRef, result.out);
|
|
@@ -19184,6 +19209,7 @@ function createScope(args) {
|
|
|
19184
19209
|
outRef,
|
|
19185
19210
|
spent: result.spent,
|
|
19186
19211
|
...result.verdict ? { verdict: result.verdict } : {},
|
|
19212
|
+
...result.outcome ? { outcome: result.outcome } : {},
|
|
19187
19213
|
seq: ordinal,
|
|
19188
19214
|
at: new Date(now()).toISOString()
|
|
19189
19215
|
});
|
|
@@ -20115,6 +20141,7 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
|
|
|
20115
20141
|
spent: child.spent,
|
|
20116
20142
|
infra: settlement.infra,
|
|
20117
20143
|
reason: settlement.reason,
|
|
20144
|
+
...settlement.outRef ? { outRef: settlement.outRef } : {},
|
|
20118
20145
|
...settlement.providerModel ? { providerModel: settlement.providerModel } : {},
|
|
20119
20146
|
trace: settlement.trace,
|
|
20120
20147
|
seq,
|
|
@@ -20374,6 +20401,14 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
|
|
|
20374
20401
|
}
|
|
20375
20402
|
const outRef = contentAddress(artifact.out);
|
|
20376
20403
|
await blobs.put(outRef, artifact.out);
|
|
20404
|
+
const failureReason = executorFailureReason(artifact);
|
|
20405
|
+
if (failureReason !== void 0) {
|
|
20406
|
+
await teardownOnce(opts.shutdown ?? 5e3).catch(() => void 0);
|
|
20407
|
+
return {
|
|
20408
|
+
...downRecord(failureReason, false, trace, ownMetered, runtimeOwnedExecutorProviderEvidence(executor)),
|
|
20409
|
+
outRef
|
|
20410
|
+
};
|
|
20411
|
+
}
|
|
20377
20412
|
await teardownOnce(opts.shutdown ?? 5e3);
|
|
20378
20413
|
return {
|
|
20379
20414
|
kind: "done",
|
|
@@ -20399,6 +20434,11 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
|
|
|
20399
20434
|
const trace = await captureTraceOnce();
|
|
20400
20435
|
await teardownOnce(opts.shutdown ?? 5e3).catch(() => void 0);
|
|
20401
20436
|
const metered = executor.metered?.();
|
|
20437
|
+
const failureReason = executorFailureReason(accepted);
|
|
20438
|
+
if (failureReason !== void 0) return {
|
|
20439
|
+
...downRecord(failureReason, false, trace, metered, runtimeOwnedExecutorProviderEvidence(executor)),
|
|
20440
|
+
outRef: accepted.outRef
|
|
20441
|
+
};
|
|
20402
20442
|
return {
|
|
20403
20443
|
kind: "done",
|
|
20404
20444
|
out: accepted.out,
|
|
@@ -21983,4 +22023,4 @@ function resolveRedactor(redact) {
|
|
|
21983
22023
|
//#endregion
|
|
21984
22024
|
export { bridgeAdmissionRefusal as $, buildRuntimeEventOtelSpans as $n, providerAttemptEvidence as $r, spendFromUsageEvents as $t, consumeScopeRetainedOwnerResult as A, promptFromAgentTurnInput as Ai, throwIfAborted as An, profileMaterializationAxes$1 as Ar, peerMailTools as At, workerInteractiveBindingFile as B, startRetainedRunInEnvironment as Bn, worktreeCliProfileMaterialization as Br, insideCursorNamespace as Bt, settledToIteration as C, notifySandboxEventObserver as Ci, hasCompleteCacheBreakdown as Cn, parseCodexTokenUsage as Cr, createInbox as Ct, timerAt as D, decodeHarnessUsage as Di, sleep as Dn, controlProfileMaterialization as Dr, claimsAuthority as Dt, pollFor as E, sumSandboxUsage as Ei, randomSuffix as En, assertProfileMaterialization as Er, PEER_MAIL_WIRE_KEY as Et, interactiveAdmissionSeamKey as F, abortError$1 as Fn, renderProfileMaterializationIssues as Fr, taskToPrompt as Ft, destroyInteractiveEnvironment as G, readCodexRolloutSession as Gn, attestRuntimeOwnedPendingExecutor as Gr, WORKER_TOOL_TRACE_SCHEMA_VERSION as Gt, reconnectRetainedInteractiveRun as H, addHarnessUsage as Hn, parseCommittedJsonLines as Hr, materializeTreeView as Ht, readWorkerInteractiveAdmissions as I, linkAbort as In, renderUnsupported as Ir, FileResultBlobStore as It, queueOf as J, readTraceContextFromEnv as Jn, finalizeRuntimeOwnedPendingExecutor as Jr, parseWorkerToolTraceArtifact as Jt, effectiveConcurrency as K, createPropagatingTraceEmitter as Kn, attestRuntimeOwnedScopeOwner as Kr, captureWorkerTraceEvidence as Kt, workerInteractiveAdmissionFile as L, reconnectRetainedRun as Ln, sandboxActProfileMaterialization as Lr, FileSpawnJournal as Lt, scopeRetainedOwnerContext as M, providerMessageText as Mi, zeroSpend as Mn, promptModelProfileMaterialization as Mr, isLiveNodeStatus as Mt, scopeRetainedOwnerPriorSpend as N, registerRetainedExecutorPreparation as Nn, promptOnlyProfileMaterialization as Nr, isTerminalNodeStatus as Nt, validateWaitSpec as O, abortError$2 as Oi, stringifySafe as On, defineProfileMaterializationContract as Or, createPeerMailbox as Ot, scopeRetainedOwnerResult as P, retainedExecutorSeamKey as Pn, promptResourceProfileMaterialization as Pr, createInPlaceCliExecutor as Pt, bindReusableExecutorExecutionId as Q, buildLoopSpanNodes as Qn, newExecutionAttemptId as Qr, createBudgetPool as Qt, attachWorker as R, recoverRetainedRun as Rn, unsupportedProfileDimensions as Rr, InMemoryResultBlobStore as Rt, scopeOwnerExecutorNodeContext as S, mapSandboxToolEvent as Si, deleteBoxSafe as Sn, localHarnessExecutable as Sr, readWorkerProgress as St, isWaitOutcome as T, sandboxProgressEvents as Ti, promptCacheTokenClasses as Tn, AGENT_PROFILE_MATERIALIZATION_AXES as Tr, DEFAULT_PEER_MAIL_LIMITS as Tt, recoverRetainedInteractiveRun as U, createCodexRolloutStoreReader as Un, prepareJsonlAppend as Ur, pendingWaits as Ut, workerInteractiveBindingsDir as V, retainedCreateMaterial as Vn, isNoEntError as Vr, loadSpawnForest as Vt, startRetainedInteractiveRun as W, harnessUsageIsEmpty as Wn, writeAllBytes as Wr, replaySpawnTree as Wt, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as X, INTELLIGENCE_WIRE_VERSION as Xn, knownExecutionBindingReceipt as Xr, contentAddress as Xt, rollingDispatch as Y, traceContextToEnv as Yn, inheritRuntimeOwnedExecutorAttestation as Yr, workerTraceAnalysisStore as Yt, teardownExecutor as Z, buildLoopOtelSpans as Zn, knownMaterializationReceipt as Zr, assertValidBudget as Zt, deriveNodeExecutionIdentity as _, createSandboxToolPartState as _i, resolveAgentEnvironmentProvider as _n, createWorktree as _r, createPushTraceSource as _t, createSupervisor as a, runtimeOwnedPendingExecutorMaterialization as ai, createSandboxLineage as an, loopEventToOtelSpan as ar, cliWorktreeExecutor as at, recordScopeOwnerMaterialization as b, isSandboxTerminalEvent as bi, chargedTokens as bn, LOCAL_HARNESSES as br, DEFAULT_STALL_AFTER_MS as bt, pickBestDelivered as c, unknownMaterializationReceipt as ci, assertBoxlessPromptOptions as cn, toOtelAttributes as cr, snapshotExecutorConfig as ct, driverChild as d, detachedFrozen as di, runBrainLoop as dn, sanitizeAgentRuntimeEvent as dr, readWorkerTraceContext as dt, recordRuntimeOwnedDriveHarnessProviderEvidence as ei, TERMINAL_DECISIONS as en, createOpenInferenceFileExporter as er, bridgeModelRouteRefusal as et, driverExecutorFactory as f, detachedSnapshot as fi, canonicalObservedModelParts as fn, sanitizeKnowledgeReadinessReport as fr, workerTraceEnv as ft, createScope as g, canonicalStreamEventFromSandboxEvent as gi, providerAsSandboxClient as gn, captureWorktreeDiff as gr, createSteerableSandboxSession as gt, beginScopeOwnerAttempt as h, assertSandboxServedModel as hi, providerAsExecutor as hn, runWorktreeHarness as hr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as ht, createRootHandle as i, runtimeOwnedExecutorProviderEvidence as ii, runAgentRounds as in, generateSpanId as ir, cliInPlaceExecutor as it, prepareScopeRetainedOwnerTask as j, promptOptionsFromAgentTurnInput as ji, unmeteredSpend as jn, promptControlProfileMaterialization as jr, peerMailVerbNames as jt, waitUntil as k, awaitAbortable$1 as ki, throwAbort as kn, fullProfileMaterialization as kr, isPeerMailEnvelope as kt, runFinalizer as l, executableAgentProfileSnapshot as li, readPromptOptions as ln, createRuntimeEventCollector as lr, createWorktreeCliExecutor as lt, withDriverExecutor as m, readSandboxOutcome as mi, createAgentEnvironmentProviderRegistry as mn, runSettledCommand as mr, workerTraceSeamKey as mt, defaultRedactorIdentityMaterial as n, runtimeOwnedExecutorExecutionBinding as ni, defaultSelectWinner as nn, exportEvalRuns as nr, bridgeStopSignalKey as nt, bestDelivered as o, runtimeOwnedScopeOwnerRuntime as oi, probeSandboxCapabilities as on, padSpanId as or, createExecutor as ot, isDriverSpec as p, projectSandboxOutcome as pi, observedModelMatchesDeclared as pn, sanitizeRuntimeStreamEvent as pr, workerTraceHeaders as pt, freeSlots as q, mergeTraceEnv as qn, authoredProfileDigest as qr, isTraceAnalysisStore as qt, resolveRedactor as r, runtimeOwnedExecutorMaterialization as ri, isTerminalDecision as rn, flatOtelSpan as rr, captureReusableExecutorConfig as rt, collectDelivered as s, unknownExecutionBindingReceipt as si, acquireSandbox as sn, padTraceId as sr, createExecutorRegistry as st, defaultRedactor as t, runtimeOwnedDriveHarnessProviderEvidence as ti, createSandboxForSpec as tn, createOtelExporter as tr, bridgeRuntimeAttachmentsKey as tt, runTree as u, executableAgentSpecSnapshot as ui, routerBrain as un, createRuntimeStreamEventCollector as ur, WORKER_TRACE_PROPAGATION as ut, meterRuntimeOwnedAccounting as v, createSandboxUsageLedger as vi, sandboxClientAsProvider as vn, removeWorktree as vr, decodeToolPart as vt, createWaitProbes as w, sandboxEventServedBackend as wi, isAbortError$2 as wn, CodexExecutionDiagnosticError as wr, AUTHORITY_MARKERS as wt, restoreScopeOwnerAcceptedExecution as x, mapSandboxEvent as xi, cloneSpend as xn, harnessSupportsReasoningEffort as xr, createActivityLog as xt, meterRuntimeOwnedProviderAttempt as y, extractLlmCallEvent as yi, addSpend as yn, DEFAULT_LOCAL_HARNESS as yr, sandboxSessionTraceSource as yt, readWorkerInteractiveBinding as z, startRetainedRun as zn, validateProfileMaterialization as zr, InMemorySpawnJournal as zt };
|
|
21985
22025
|
|
|
21986
|
-
//# sourceMappingURL=redact-
|
|
22026
|
+
//# sourceMappingURL=redact-B5g0jY2n.js.map
|