@tangle-network/agent-runtime 9.0.14 → 9.0.16
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/CHANGELOG.md +9 -1
- package/dist/{activation-Bls5eeH6.js → activation-DgT20fzX.js} +2 -2
- package/dist/{activation-Bls5eeH6.js.map → activation-DgT20fzX.js.map} +1 -1
- package/dist/{activation-druKjqeg.d.ts → activation-y6NAn3sW.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-manager-BEX00gWN.js → coordination-manager-CFtnSLPw.js} +4 -4
- package/dist/{coordination-manager-BEX00gWN.js.map → coordination-manager-CFtnSLPw.js.map} +1 -1
- package/dist/{delegate-CealSk3j.js → delegate-Cmu5OF3M.js} +2 -2
- package/dist/{delegate-CealSk3j.js.map → delegate-Cmu5OF3M.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +8 -8
- package/dist/{graph-CtabJc2O.js → graph-DqtIiS94.js} +5 -5
- package/dist/{graph-CtabJc2O.js.map → graph-DqtIiS94.js.map} +1 -1
- package/dist/{improve-CcRmhpt5.js → improve-B0vNv6e7.js} +5 -5
- package/dist/{improve-CcRmhpt5.js.map → improve-B0vNv6e7.js.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +4 -4
- package/dist/kernel.d.ts +1 -1
- package/dist/kernel.js +12 -12
- package/dist/{loop-runner-BD096jNV.js → loop-runner-BvVdDdZC.js} +2 -2
- package/dist/{loop-runner-BD096jNV.js.map → loop-runner-BvVdDdZC.js.map} +1 -1
- package/dist/{loop-runner-DN8kPiwC.d.ts → loop-runner-CfMOsISJ.d.ts} +2 -2
- 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 +1 -1
- package/dist/mcp/index.js +5 -5
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-PWn5MRu1.js → provision-supervisor-BjKluSKl.js} +4 -4
- package/dist/{provision-supervisor-PWn5MRu1.js.map → provision-supervisor-BjKluSKl.js.map} +1 -1
- package/dist/{run-cancellation-DHuvsgzo.js → run-cancellation-BvGEEwRG.js} +2 -2
- package/dist/{run-cancellation-DHuvsgzo.js.map → run-cancellation-BvGEEwRG.js.map} +1 -1
- package/dist/{run-state-Dhv9M9y2.js → run-state-Dd_AjWd6.js} +5 -5
- package/dist/{run-state-Dhv9M9y2.js.map → run-state-Dd_AjWd6.js.map} +1 -1
- package/dist/{runtime-B6lr9QqP.js → runtime-7VEM9muH.js} +12 -12
- package/dist/{runtime-B6lr9QqP.js.map → runtime-7VEM9muH.js.map} +1 -1
- package/dist/{search-executor-YzsjwtgG.js → search-executor-Dqtm1fOC.js} +3 -3
- package/dist/{search-executor-YzsjwtgG.js.map → search-executor-Dqtm1fOC.js.map} +1 -1
- package/dist/{server-C86Ttl1d.js → server-B8Kmit_v.js} +3 -3
- package/dist/{server-C86Ttl1d.js.map → server-B8Kmit_v.js.map} +1 -1
- package/dist/{settle-record-einetd2l.js → settle-record-BvH2-Ao5.js} +2 -2
- package/dist/{settle-record-einetd2l.js.map → settle-record-BvH2-Ao5.js.map} +1 -1
- package/dist/{structural-rollout-Cb0YMMV7.js → structural-rollout-CYc8PE2N.js} +3 -3
- package/dist/{structural-rollout-Cb0YMMV7.js.map → structural-rollout-CYc8PE2N.js.map} +1 -1
- package/dist/{supervise-dryx6NSa.js → supervise-BayNu7qZ.js} +5 -5
- package/dist/{supervise-dryx6NSa.js.map → supervise-BayNu7qZ.js.map} +1 -1
- package/dist/{supervision-discovery-BZRsXavN.js → supervision-discovery-Ca4QO4rG.js} +2 -2
- package/dist/{supervision-discovery-BZRsXavN.js.map → supervision-discovery-Ca4QO4rG.js.map} +1 -1
- package/dist/{supervisor-D79UJEcK.js → supervisor-Bx21Hy27.js} +5 -4
- package/dist/supervisor-Bx21Hy27.js.map +1 -0
- package/dist/{supervisor-accounting-6O0Hr0Fg.js → supervisor-accounting-StDNW1YT.js} +20 -8
- package/dist/supervisor-accounting-StDNW1YT.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +11 -11
- package/dist/{top-web-CRe6c8wu.js → top-web-Cg7ywIkF.js} +5 -5
- package/dist/{top-web-CRe6c8wu.js.map → top-web-Cg7ywIkF.js.map} +1 -1
- package/dist/tui/bin.js +3 -3
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +2 -2
- package/dist/{types-DQkRr7Iy.d.ts → types-_j53efrk.d.ts} +4 -3
- package/package.json +2 -2
- package/dist/supervisor-D79UJEcK.js.map +0 -1
- package/dist/supervisor-accounting-6O0Hr0Fg.js.map +0 -1
|
@@ -6722,6 +6722,7 @@ function registerScopeRetainedOwner(scope, args) {
|
|
|
6722
6722
|
const attempt = events.slice(start);
|
|
6723
6723
|
const admissions = attempt.flatMap((event) => event.kind === "execution-admitted" ? [event.admission] : []);
|
|
6724
6724
|
const acceptedRef = [...attempt].reverse().find((event) => event.kind === "execution-result");
|
|
6725
|
+
const acceptedConsumed = acceptedRef?.kind === "execution-result" && failedTurnReplayed(attempt, acceptedRef);
|
|
6725
6726
|
let observed = events.flatMap((event) => event.kind === "driver-attempt" ? [event.record] : []).filter((record) => record.observed).at(-1)?.observed;
|
|
6726
6727
|
const priorSession = taskEvent === void 0 ? void 0 : committedSession(events, start);
|
|
6727
6728
|
let sequence = Math.max(0, ...events.map((event) => "seq" in event ? event.seq : 0));
|
|
@@ -6735,6 +6736,7 @@ function registerScopeRetainedOwner(scope, args) {
|
|
|
6735
6736
|
inputSequence: taskEvent.seq
|
|
6736
6737
|
} : {},
|
|
6737
6738
|
...acceptedRef?.kind === "execution-result" ? { acceptedRef } : {},
|
|
6739
|
+
...acceptedConsumed ? { acceptedConsumed } : {},
|
|
6738
6740
|
...priorSession ? { priorSession } : {},
|
|
6739
6741
|
context: {
|
|
6740
6742
|
get executionId() {
|
|
@@ -6828,13 +6830,25 @@ function registerScopeRetainedOwner(scope, args) {
|
|
|
6828
6830
|
};
|
|
6829
6831
|
await args.journal.appendEvent(args.rootId, event);
|
|
6830
6832
|
state.acceptedRef = event;
|
|
6831
|
-
state.accepted = detachedSnapshot(result, "retained owner result");
|
|
6832
6833
|
state.acceptedConsumed = true;
|
|
6833
6834
|
}
|
|
6834
6835
|
}
|
|
6835
6836
|
};
|
|
6836
6837
|
owners.set(scope, state);
|
|
6837
6838
|
}
|
|
6839
|
+
/**
|
|
6840
|
+
* Whether a drive other than the one that ran this failed turn journaled an attempt after its
|
|
6841
|
+
* result. The drive that ran it records its failure under the attempt id its binding names; the
|
|
6842
|
+
* first drive after a restart replays it once under a new id. That record consumes the turn
|
|
6843
|
+
* durably: every later drive, in this process or after another restart, starts a new turn.
|
|
6844
|
+
*/
|
|
6845
|
+
function failedTurnReplayed(attempt, result) {
|
|
6846
|
+
const at = attempt.indexOf(result);
|
|
6847
|
+
const last = attempt.slice(0, at).filter((event) => event.kind === "execution-bound").at(-1);
|
|
6848
|
+
const ranBy = last?.kind === "execution-bound" ? last.binding.attemptId : void 0;
|
|
6849
|
+
const byAnotherDrive = (event) => event.kind === "driver-attempt" && event.attemptId !== ranBy;
|
|
6850
|
+
return attempt.slice(at + 1).some(byAnotherDrive) && executorFailureReason(result) !== void 0;
|
|
6851
|
+
}
|
|
6838
6852
|
/** Continue the latest committed environment, past abandoned ones. A live session stays. */
|
|
6839
6853
|
function committedSession(events, before) {
|
|
6840
6854
|
let end = before;
|
|
@@ -6931,14 +6945,13 @@ async function prepareScopeRetainedOwnerTask(scope, task, session = "native") {
|
|
|
6931
6945
|
delete state.taskRef;
|
|
6932
6946
|
state.admissions.length = 0;
|
|
6933
6947
|
}
|
|
6934
|
-
if (state.
|
|
6948
|
+
if (state.acceptedRef && state.acceptedConsumed) {
|
|
6935
6949
|
await reconcileOwnerWorkspaceBeforeReuse(state, scope.signal);
|
|
6936
6950
|
const currentEnvironment = [...state.admissions].reverse().find((admission) => admission.phase === "environment");
|
|
6937
6951
|
if (currentEnvironment?.phase === "environment") state.priorSession = currentEnvironment;
|
|
6938
6952
|
delete state.inputSequence;
|
|
6939
6953
|
delete state.taskRef;
|
|
6940
6954
|
delete state.acceptedRef;
|
|
6941
|
-
delete state.accepted;
|
|
6942
6955
|
state.admissions.length = 0;
|
|
6943
6956
|
delete state.acceptedConsumed;
|
|
6944
6957
|
}
|
|
@@ -6953,7 +6966,6 @@ async function prepareScopeRetainedOwnerTask(scope, task, session = "native") {
|
|
|
6953
6966
|
delete state.priorSession;
|
|
6954
6967
|
delete state.forceNewSession;
|
|
6955
6968
|
}
|
|
6956
|
-
state.prepared = true;
|
|
6957
6969
|
const capable = await restoreCapable(state.provider);
|
|
6958
6970
|
const restoreFor = (inputIndex) => {
|
|
6959
6971
|
if (!capable || state.priorSession !== void 0) return void 0;
|
|
@@ -6994,11 +7006,11 @@ async function prepareScopeRetainedOwnerTask(scope, task, session = "native") {
|
|
|
6994
7006
|
state.inputSequence = inputSequence;
|
|
6995
7007
|
return snapshot;
|
|
6996
7008
|
}
|
|
6997
|
-
/**
|
|
7009
|
+
/** The committed result no drive has consumed yet. Accepted backend output remains evidence,
|
|
7010
|
+
* never the supervisor's finalized output. */
|
|
6998
7011
|
async function scopeRetainedOwnerResult(scope) {
|
|
6999
7012
|
const state = owners.get(scope);
|
|
7000
|
-
if (!state?.acceptedRef) return void 0;
|
|
7001
|
-
if (state.accepted) return state.accepted;
|
|
7013
|
+
if (!state?.acceptedRef || state.acceptedConsumed) return void 0;
|
|
7002
7014
|
const event = state.acceptedRef;
|
|
7003
7015
|
const out = await state.args.blobs.get(event.outRef);
|
|
7004
7016
|
if (out === void 0 || contentAddress(out) !== event.outRef) throw new ValidationError("retained owner result is missing or corrupt");
|
|
@@ -13969,4 +13981,4 @@ function isNonEmptySpend(s) {
|
|
|
13969
13981
|
}
|
|
13970
13982
|
export { queueOf as $, captureHarnessTranscript as $n, RetainedRunProviderContractError as $r, loadSpawnForest as $t, openSlotGroup as A, verifyObserverRecords as An, knownMaterializationReceipt as Ar, noteScopeOwnerPlannedExecution as At, readWorkerInteractiveBinding as B, buildLoopSpanNodes as Bn, runtimeOwnedExecutorMaterialization as Br, scopeRetainedOwnerSettled as Bt, workerCancellationsDir as C, retainedCreateMaterial as Cn, attestRuntimeOwnedPendingExecutor as Cr, abandonScopeRetainedOwnerInvocation as Ct, writeWorkerSteer as D, FileObserverJournal as Dn, finalizeRuntimeOwnedPendingExecutor as Dr, scopeRetainedOwnerResult as Dt, writeWorkerCancellation as E, prepareInteractiveDelegation as En, authoredProfileDigest as Er, scopeRetainedOwnerPriorSpend as Et, parseWorkerToolTraceArtifact as F, workerTraceHeaders as Fn, recordRuntimeOwnedProviderDispatchNotStarted as Fr, coordinationMcpAlias as Ft, appendSpawnEvents as G, generateSpanId as Gn, unknownExecutionBindingReceipt as Gr, noteScopeRetainedOwnerCoordination as Gt, recoverRetainedInteractiveRun as H, createOpenInferenceFileExporter as Hn, runtimeOwnedPendingExecutorMaterialization as Hr, assertRetainedOwnerCoordinationRekey as Ht, workerTraceAnalysisStore as I, createPropagatingTraceEmitter as In, recordRuntimeOwnedProviderIdentityConflict as Ir, coordinationProfileToolPrefix as It, reenteredWorkers as J, createRuntimeStreamEventCollector as Jn, executableAgentSpecSnapshot as Jr, bindScopeRetainedOwnerProvider as Jt, spawnJournalRecordEvents as K, loopEventToOtelSpan as Kn, unknownMaterializationReceipt as Kr, scopeRetainedOwnerCheckpointing as Kt, nestedScopeSeamKey as L, mergeTraceEnv as Ln, recordRuntimeOwnedProviderModel as Lr, providerVisibleProfile as Lt, prepareScopeResume as M, environmentGone as Mn, providerAttemptEvidence as Mr, restoreScopeOwnerAcceptedExecution as Mt, replaySpawnTree as N, WORKER_TRACE_PROPAGATION as Nn, recordRuntimeOwnedDriveHarnessProviderEvidence as Nr, scopeOwnerExecutionObservation as Nt, writeWorkerSteerAcknowledgement as O, createFileObserverHooks as On, inheritRuntimeOwnedExecutorAttestation as Or, beginScopeOwnerAttempt as Ot, isTraceAnalysisStore as P, workerTraceEnv as Pn, recordRuntimeOwnedProviderAttemptStart as Pr, scopeOwnerExecutorNodeContext as Pt, freeSlots as Q, captureBoundHarnessTranscript as Qn, runtimeFlowBrain as Qr, scopeRetainedOwnerJournalRoot as Qt, interactiveAdmissionSeamKey as R, readTraceContextFromEnv as Rn, runtimeOwnedDriveHarnessProviderEvidence as Rr, runtimeGraphMetadataKey as Rt, workerCancelRequestsFile as S, startRetainedRunInEnvironment as Sn, attestRuntimeOwnedExecutor as Sr, resolveSpawnResourcePaths as St, workerSteerRequestsDir as T, offerInteractiveControl as Tn, authoredAgentIdentity as Tr, prepareScopeRetainedOwnerTask as Tt, startRetainedInteractiveRun as U, createOtelExporter as Un, runtimeOwnedScopeOwnerControl as Ur, reconcileScopeRetainedOwnerEnvironment as Ut, reconnectRetainedInteractiveRun as V, buildRuntimeEventOtelSpans as Vn, runtimeOwnedExecutorProviderEvidence as Vr, scopeRetainedOwnerTurnEnded as Vt, FileSpawnJournal as W, flatOtelSpan as Wn, runtimeOwnedScopeOwnerRuntime as Wr, scopeRetainedOwnerRestorePoint as Wt, assertRecursiveReservationPolicy as X, sanitizeRuntimeStreamEvent as Xn, runtimeCheckFactory as Xr, scopeOwnerLiabilities as Xt, settledToIteration as Y, sanitizeKnowledgeReadinessReport as Yn, isRuntimeFlowBrain as Yr, owners as Yt, deriveNodeExecutionIdentity as Z, HARNESS_TRANSCRIPT_SETTLE_TIMEOUT_MS as Zn, runtimeFlowAgent as Zr, scopeRetainedOwnerContext as Zt, readWorkerSteerAcknowledgement as _, assertRetainedRunReplayMaterial as _n, SeatPauseError as _r, waitForScopeChildren as _t, createRootStreamSink as a, sameControlCoordinates as ai, FileResultBlobStore as an, HARNESS_TRANSCRIPT_READ_LIMITS as ar, meterRuntimeOwnedProviderAttempt as at, supervisorRunDir as b, recoverRetainedRun as bn, subscriptionUsageLimitSignal as br, scopeRetainedOwnerResourceReader as bt, readRootStreamReceipt as c, providerMessageText as ci, insideCursorNamespace as cn, retainHarnessTranscript as cr, recordScopeOwnerDriverAttempt as ct, claimWorkerSteerDelivery as d, observeModelRequest as dn, describeToolArgs as dr, releaseHeldEnvironments as dt, assertEventBinding as ei, ownedTreeRootSpawn as en, harnessTranscriptArtifact as er, rollingDispatch as et, fileEscalateQuestion as f, NATIVE_STOP_UNCONFIRMED as fn, readWorkerProgress as fr, releaseRetainedEnvironments as ft, readWorkerCancellation as g, RetainedMaterializationTimeoutError as gn, SeatChain as gr, unconfirmedTeardowns as gt, readWorkerCancelRequests as h, verifyWorkspaceMarker as hn, SEAT_RECHECK_MS as hr, startScopeRecoveries as ht, ROOT_STREAM_FILE as i, retainedSessionReplaced as ii, nestedDriverTreeRoot as in, readHarnessTranscript as ir, meterRuntimeOwnedAccounting as it, resolveWorkerSlots as j, destroyInteractiveEnvironment as jn, newExecutionAttemptId as jr, recordScopeOwnerMaterialization as jt, createWorkerSlots as k, observerRecordDigest as kn, knownExecutionBindingReceipt as kr, finalizeScopeOwnerMaterialization as kt, appendWorkerControlEvent as l, executorObservation as ln, DEFAULT_STALL_AFTER_MS as lr, recordScopeOwnerPause as lt, legacySupervisorRunsRoot as m, stopRetainedNativeExecution as mn, isTerminalNodeStatus as mr, settleManagerWork as mt, terminalAccounting as n, exactSession as ni, attestNestedDriverTreeOwner as nn, harnessTranscriptUnavailable as nr, closeScopeAdmission as nt, nodeStreamFile as o, promptFromAgentTurnInput as oi, encodeResultBlob as on, readBoundHarnessSessions as or, pauseScopeSeatAdmission as ot, legacySupervisorRunDir as p, describeRetainedNativeStops as pn, isLiveNodeStatus as pr, retryUnconfirmedTeardowns as pt, appendTeardownConfirmation as q, createRuntimeEventCollector as qn, executableAgentProfileSnapshot as qr, bindScopeRetainedOwnerEnvironmentId as qt, createScope as r, freezeControlRef as ri, driverRuntime as rn, persistHarnessTranscript as rr, hasRetriableTeardowns as rt, readRootStream as s, promptOptionsFromAgentTurnInput as si, SpawnEventIndex as sn, resolveHarnessTranscriptCapture as sr, recordScopeOwnerBarrenPause as st, isNonEmptySpend as t, awaitAbortable$1 as ti, materializeTreeView as tn, harnessTranscriptFromLines as tr, closeRetainedSlots as tt, cancelWorker as u, executorObservationSeamKey as un, createActivityLog as ur, registerNestedTeardownScope as ut, readWorkerSteerRequests as v, mintRetainedIdentity as vn, authoredSeatStages as vr, prepareScopeRetainedOwnerSeatSwitch as vt, workerInboxFileFromEventDir as w, acceptedInteractiveControl as wn, attestRuntimeOwnedScopeOwner as wr, consumeScopeRetainedOwnerResult as wt, supervisorRunsRoot as x, startRetainedRun as xn, attestRuntimeOwnedDeferredExecutor as xr, environmentReader as xt, safeWorkerFile as y, reconnectRetainedRun as yn, seatExecutionProfile as yr, releaseScopeRetainedOwnerForSeatPause as yt, attachWorker as z, buildLoopOtelSpans as zn, runtimeOwnedExecutorExecutionBinding as zr, beginScopeRetainedOwnerDrive as zt };
|
|
13971
13983
|
|
|
13972
|
-
//# sourceMappingURL=supervisor-accounting-
|
|
13984
|
+
//# sourceMappingURL=supervisor-accounting-StDNW1YT.js.map
|