@tangle-network/agent-runtime 0.326.0 → 0.326.1
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-BOuZKUcx.js → activation-DfhOPF9_.js} +2 -2
- package/dist/{activation-BOuZKUcx.js.map → activation-DfhOPF9_.js.map} +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-CEsj6iI_.js → coordination-driver-CwisRZNE.js} +2 -2
- package/dist/{coordination-driver-CEsj6iI_.js.map → coordination-driver-CwisRZNE.js.map} +1 -1
- package/dist/{delegate-TPezY9gJ.js → delegate-SNxVKolU.js} +2 -2
- package/dist/{delegate-TPezY9gJ.js.map → delegate-SNxVKolU.js.map} +1 -1
- package/dist/durable.js +3 -3
- package/dist/{graph-DGc1kGWV.js → graph-C4kRA087.js} +4 -4
- package/dist/{graph-DGc1kGWV.js.map → graph-C4kRA087.js.map} +1 -1
- package/dist/{improvement-cycle-BKI6qB1p.js → improvement-cycle-sd7Y_buy.js} +3 -3
- package/dist/{improvement-cycle-BKI6qB1p.js.map → improvement-cycle-sd7Y_buy.js.map} +1 -1
- package/dist/index.js +7 -7
- package/dist/intelligence.js +3 -3
- package/dist/kernel.js +8 -8
- package/dist/{loop-runner-bin-DbP6GVB-.js → loop-runner-bin-7QRTmVT4.js} +3 -3
- package/dist/{loop-runner-bin-DbP6GVB-.js.map → loop-runner-bin-7QRTmVT4.js.map} +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.js +4 -4
- package/dist/{provision-supervisor-BYUxHCgu.js → provision-supervisor-Dckc-egc.js} +3 -3
- package/dist/{provision-supervisor-BYUxHCgu.js.map → provision-supervisor-Dckc-egc.js.map} +1 -1
- package/dist/{runtime-Hb6ZFlqF.js → runtime-DtG9pERP.js} +8 -8
- package/dist/{runtime-Hb6ZFlqF.js.map → runtime-DtG9pERP.js.map} +1 -1
- package/dist/{search-executor-CReOgSNN.js → search-executor-BgMpZuhl.js} +2 -2
- package/dist/{search-executor-CReOgSNN.js.map → search-executor-BgMpZuhl.js.map} +1 -1
- package/dist/{server-Dx-PsYOy.js → server-Bu-aEHwV.js} +3 -3
- package/dist/{server-Dx-PsYOy.js.map → server-Bu-aEHwV.js.map} +1 -1
- package/dist/{supervise-CNjvqKUG.js → supervise-DZMOajvP.js} +3 -3
- package/dist/{supervise-CNjvqKUG.js.map → supervise-DZMOajvP.js.map} +1 -1
- package/dist/{supervisor-D02lhi8K.js → supervisor-hIpqcCJr.js} +43 -3
- package/dist/supervisor-hIpqcCJr.js.map +1 -0
- package/dist/testing.js +12 -12
- package/dist/tui/index.js +1 -1
- package/package.json +1 -1
- package/dist/supervisor-D02lhi8K.js.map +0 -1
|
@@ -10251,6 +10251,28 @@ function nativeSlots(port) {
|
|
|
10251
10251
|
}
|
|
10252
10252
|
return key;
|
|
10253
10253
|
}
|
|
10254
|
+
const nativeMirrors = /* @__PURE__ */ new WeakMap();
|
|
10255
|
+
/** Count one running native mirror on `port`; the returned close is idempotent. @internal */
|
|
10256
|
+
function openNativeMirror(port) {
|
|
10257
|
+
nativeMirrors.set(port, (nativeMirrors.get(port) ?? 0) + 1);
|
|
10258
|
+
let open = true;
|
|
10259
|
+
return () => {
|
|
10260
|
+
if (!open) return;
|
|
10261
|
+
open = false;
|
|
10262
|
+
nativeMirrors.set(port, Math.max(0, (nativeMirrors.get(port) ?? 1) - 1));
|
|
10263
|
+
};
|
|
10264
|
+
}
|
|
10265
|
+
/**
|
|
10266
|
+
* The delay before a mirror's next running copy: its interval, or longer when the port's mirrors
|
|
10267
|
+
* need more copy time than its slots hold in that interval. queens21-h22-swarm16-20261018b copied
|
|
10268
|
+
* 9 sessions every 2 minutes through 4 slots at a median 134 s each, so all 4 slots stayed busy,
|
|
10269
|
+
* each copy waited behind the others, and copies past the 30-minute bound were dropped. @internal
|
|
10270
|
+
*/
|
|
10271
|
+
function nativeCopyDelayMs(port, intervalMs, lastCopyMs) {
|
|
10272
|
+
const mirrors = Math.max(1, nativeMirrors.get(port) ?? 1);
|
|
10273
|
+
const slots = port.maxConcurrentCaptures ?? mirrors;
|
|
10274
|
+
return Math.max(intervalMs, Math.ceil(lastCopyMs * mirrors / slots));
|
|
10275
|
+
}
|
|
10254
10276
|
const capturesInFlight = /* @__PURE__ */ new WeakMap();
|
|
10255
10277
|
async function withCaptureSlot(port, signal, capture) {
|
|
10256
10278
|
if (port.maxConcurrentCaptures === void 0) return capture();
|
|
@@ -12412,6 +12434,10 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
12412
12434
|
const nativePort = options.workspaceRetention?.captureNative === void 0 ? void 0 : options.workspaceRetention;
|
|
12413
12435
|
let nativeInFlight;
|
|
12414
12436
|
let nativeTimer;
|
|
12437
|
+
let nativeEvents = 0;
|
|
12438
|
+
let nativeEventsAtCopy;
|
|
12439
|
+
let lastNativeCopyMs = 0;
|
|
12440
|
+
let closeNativeMirror;
|
|
12415
12441
|
const livePort = options.workspaceRetention?.captureLive === void 0 ? void 0 : options.workspaceRetention;
|
|
12416
12442
|
let liveInFlight;
|
|
12417
12443
|
let liveTimer;
|
|
@@ -12465,6 +12491,8 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
12465
12491
|
const stopNativeMirror = async () => {
|
|
12466
12492
|
if (nativeTimer !== void 0) clearTimeout(nativeTimer);
|
|
12467
12493
|
nativeTimer = void 0;
|
|
12494
|
+
closeNativeMirror?.();
|
|
12495
|
+
closeNativeMirror = void 0;
|
|
12468
12496
|
await nativeInFlight;
|
|
12469
12497
|
};
|
|
12470
12498
|
const captureNative = (next, phase, admitted, afterStop = false) => {
|
|
@@ -12475,6 +12503,8 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
12475
12503
|
const sessionId = providerSessionId ?? admitted?.sessionId ?? null;
|
|
12476
12504
|
if (workspaceSnapshot !== void 0 && !nativeHoldsTranscript) return;
|
|
12477
12505
|
const invocationId = workspaceExecutionId;
|
|
12506
|
+
const eventsAtStart = nativeEvents;
|
|
12507
|
+
const copyStartedAt = Date.now();
|
|
12478
12508
|
try {
|
|
12479
12509
|
const takeCopy = () => captureProviderWorkspaceSnapshot(nativePort, {
|
|
12480
12510
|
environment: next,
|
|
@@ -12507,8 +12537,11 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
12507
12537
|
if (nativeHoldsTranscript && !(copy.status === "retained" && copy.fileCount > 0)) return;
|
|
12508
12538
|
harnessTranscript = copy;
|
|
12509
12539
|
nativeHoldsTranscript = true;
|
|
12540
|
+
nativeEventsAtCopy = eventsAtStart;
|
|
12510
12541
|
} catch (error) {
|
|
12511
12542
|
noteCaptureFailure(error);
|
|
12543
|
+
} finally {
|
|
12544
|
+
lastNativeCopyMs = Date.now() - copyStartedAt;
|
|
12512
12545
|
}
|
|
12513
12546
|
}).finally(() => {
|
|
12514
12547
|
if (nativeInFlight === tracked) nativeInFlight = void 0;
|
|
@@ -12520,12 +12553,15 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
12520
12553
|
startLiveMirror(next);
|
|
12521
12554
|
if (nativePort === void 0) return;
|
|
12522
12555
|
if (nativeTimer !== void 0) clearTimeout(nativeTimer);
|
|
12556
|
+
closeNativeMirror?.();
|
|
12557
|
+
closeNativeMirror = openNativeMirror(nativePort);
|
|
12558
|
+
const port = nativePort;
|
|
12523
12559
|
const interval = nativePort.nativeIntervalMs ?? 12e4;
|
|
12524
12560
|
const schedule = () => {
|
|
12525
12561
|
nativeTimer = setTimeout(() => {
|
|
12526
|
-
if (nativeInFlight === void 0) captureNative(next, "running");
|
|
12562
|
+
if (nativeInFlight === void 0 && !(nativeHoldsTranscript && nativeEventsAtCopy === nativeEvents)) captureNative(next, "running");
|
|
12527
12563
|
schedule();
|
|
12528
|
-
}, interval);
|
|
12564
|
+
}, nativeCopyDelayMs(port, interval, lastNativeCopyMs));
|
|
12529
12565
|
nativeTimer.unref?.();
|
|
12530
12566
|
};
|
|
12531
12567
|
schedule();
|
|
@@ -12784,6 +12820,9 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
12784
12820
|
},
|
|
12785
12821
|
captureWorkspace,
|
|
12786
12822
|
startNativeMirror,
|
|
12823
|
+
noteProviderEvent: () => {
|
|
12824
|
+
nativeEvents += 1;
|
|
12825
|
+
},
|
|
12787
12826
|
stopEndedHarness,
|
|
12788
12827
|
finishNativeMirror,
|
|
12789
12828
|
workspaceControlRef: () => workspaceControlRef,
|
|
@@ -13096,6 +13135,7 @@ async function* streamProviderExecutor(args) {
|
|
|
13096
13135
|
try {
|
|
13097
13136
|
const toolParts = createSandboxToolPartState();
|
|
13098
13137
|
for await (const event of source.events) {
|
|
13138
|
+
args.noteProviderEvent();
|
|
13099
13139
|
archive.append(event);
|
|
13100
13140
|
text += textFromEnvironmentEvent(event);
|
|
13101
13141
|
const sandboxEvent = sandboxEventFromEnvironmentEvent(event);
|
|
@@ -31785,4 +31825,4 @@ function isNonEmptySpend(s) {
|
|
|
31785
31825
|
//#endregion
|
|
31786
31826
|
export { environmentReader as $, InMemoryResultBlobStore as $i, readHarnessTranscript as $n, renderUnsupported as $r, DEFAULT_PEER_MAIL_LIMITS as $t, scopeOwnerExecutorNodeContext as A, runtimeFailureCause as Ai, providerAsSandboxClient as An, captureWorktreeDiff as Ar, bindReusableExecutorExecutionId as At, consumeScopeRetainedOwnerResult as B, createSandboxToolPartState as Bi, startRetainedRunInEnvironment as Bn, terminateProcessTreeAndConfirm as Br, createRouterTranscript as Bt, deriveNodeExecutionIdentity as C, defaultRedactor as Ca, unknownMaterializationReceipt as Ci, assertBoxlessPromptOptions as Cn, createRuntimeEventCollector as Cr, checkVerdictOf as Ct, recordScopeOwnerMaterialization as D, promptOptionsFromAgentTurnInput as Da, readSandboxOutcome as Di, LEAF_CONTINUATION_TASK as Dn, sanitizeRuntimeStreamEvent as Dr, failedItems as Dt, recordScopeOwnerDriverAttempt as E, promptFromAgentTurnInput as Ea, projectSandboxOutcome as Ei, runBrainLoop as En, sanitizeKnowledgeReadinessReport as Er, expandQuestions as Et, seatExecutionProfile as F, unavailableSignalOfFailure as Fi, bridgeRuntimeAttachmentsKey as Fn, harnessInvocation as Fr, createExecutorRegistry as Ft, scopeRetainedOwnerContext as G, mapSandboxToolEvent as Gi, openSlotGroup as Gn, defineProfileMaterializationContract as Gr, workerTraceHeaders as Gt, prepareScopeRetainedOwnerSeatSwitch as H, extractLlmCallEvent as Hi, destroyInteractiveEnvironment as Hn, assertProfileMaterialization as Hr, WORKER_TRACE_PROPAGATION as Ht, abandonScopeRetainedOwnerInvocation as I, TRACE_ROOT_SCHEMA as Ii, bridgeStopSignalKey as In, harnessSupportsReasoningEffort as Ir, snapshotExecutorConfig as It, scopeRetainedOwnerResourceReader as J, sandboxProgressEvents as Ji, linkAbort as Jn, promptControlProfileMaterialization as Jr, DEFAULT_STALL_AFTER_MS as Jt, scopeRetainedOwnerJournalRoot as K, notifySandboxEventObserver as Ki, RunCancellationReason as Kn, fullProfileMaterialization as Kr, workerTraceSeamKey as Kt, beginScopeRetainedOwnerDrive as L, TRACE_SUMMARY_SCHEMA as Li, reconnectRetainedRun as Ln, localHarnessExecutable as Lr, createWorktreeCliExecutor as Lt, SeatChain as M, registerRetainedExecutorPreparation as Mi, createPushTraceSource as Mn, removeWorktree as Mr, cliInPlaceExecutor as Mt, SeatChainExhaustedError as N, retainedExecutorSeamKey as Ni, decodeToolPart as Nn, DEFAULT_LOCAL_HARNESS as Nr, cliWorktreeExecutor as Nt, recordScopeOwnerPause as O, providerMessageText as Oa, abortError$1 as Oi, createAgentEnvironmentProviderRegistry as On, runSettledCommand as Or, passedItems as Ot, authoredSeatStages as P, unavailablePauseMs as Pi, sandboxSessionTraceSource as Pn, LOCAL_HARNESSES as Pr, createExecutor as Pt, SPAWN_RESOURCE_PATH_MAX_BYTES as Q, FileSpawnJournal as Qi, persistHarnessTranscript as Qn, renderProfileMaterializationIssues as Qr, AUTHORITY_MARKERS as Qt, bindScopeRetainedOwnerEnvironmentId as R, assertSandboxServedModel as Ri, recoverRetainedRun as Rn, parseCodexTokenUsage as Rr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as Rt, createScope as S, spendFromUsageTotals as Sa, unknownExecutionBindingReceipt as Si, captureBeforeDestroy as Sn, toOtelAttributes as Sr, bestComposite as St, meterRuntimeOwnedProviderAttempt as T, resolveRedactor as Ta, executableAgentSpecSnapshot as Ti, routerBrain as Tn, sanitizeAgentRuntimeEvent as Tr, distillFindings as Tt, prepareScopeRetainedOwnerTask as U, isSandboxTerminalEvent as Ui, environmentGone as Un, assertProfileMaterializes as Ur, readWorkerTraceContext as Ut, noteScopeRetainedOwnerCoordination as V, createSandboxUsageLedger as Vi, retainedCreateMaterial as Vn, AGENT_PROFILE_MATERIALIZATION_AXES as Vr, createInPlaceCliExecutor as Vt, reconcileScopeRetainedOwnerEnvironment as W, mapSandboxEvent as Wi, createWorkerSlots as Wn, controlProfileMaterialization as Wr, workerTraceEnv as Wt, scopeRetainedOwnerResult as X, decodeHarnessUsage as Xi, captureHarnessTranscript as Xn, promptOnlyProfileMaterialization as Xr, readWorkerProgress as Xt, scopeRetainedOwnerRestorePoint as Y, sumSandboxUsage as Yi, runAbortable as Yn, promptModelProfileMaterialization as Yr, createActivityLog as Yt, scopeRetainedOwnerTurnEnded as Z, FileResultBlobStore as Zi, harnessTranscriptArtifact as Zn, promptResourceProfileMaterialization as Zr, createInbox as Zt, isDriverSpec as _, assertValidBudget as _a, runtimeOwnedExecutorExecutionBinding as _i, isTerminalDecision as _n, flatOtelSpan as _r, CONTINUATIONS_DIR as _t, collectDelivered as a, WORKER_TOOL_TRACE_SCHEMA_VERSION as aa, attestRuntimeOwnedPendingExecutor as ai, peerMailVerbNames as an, priceTokens as ar, runtimeGraphMetadataKey as at, assertRecursiveReservationPolicy as b, newUsageTotals as ba, runtimeOwnedPendingExecutorMaterialization as bi, acquireSandbox as bn, padSpanId as br, admitContinuationPolicy as bt, runTree as c, parseWorkerToolTraceArtifact as ca, authoredProfileDigest as ci, bridgeAdmissionRefusal as cn, createPropagatingTraceEmitter as cr, readWorkerInteractiveBinding as ct, classifyDriverFailure as d, detachedFrozen as da, knownExecutionBindingReceipt as di, createCodexRolloutStoreReader as dn, traceContextToEnv as dr, startRetainedInteractiveRun as dt, InMemorySpawnJournal as ea, sandboxActProfileMaterialization as ei, PEER_MAIL_WIRE_KEY as en, resolveHarnessTranscriptCapture as er, hostDirectoryReader as et, runDriverWithRetry as f, detachedSnapshot as fa, knownMaterializationReceipt as fi, harnessUsageIsEmpty as fn, buildLoopOtelSpans as fr, freeSlots as ft, driverExecutorFactory as g, ReservationWaitRefused as ga, runtimeOwnedDriveHarnessProviderEvidence as gi, defaultSelectWinner as gn, createOtelExporter as gr, mapExecutorResult as gt, driverChild as h, BudgetReconcileFault as ha, recordRuntimeOwnedDriveHarnessProviderEvidence as hi, createSandboxForSpec as hn, createOpenInferenceFileExporter as hr, gateOnDeliverable as ht, bestDelivered as i, replaySpawnTree as ia, worktreeCliProfileMaterialization as ii, peerMailTools as in, runCodeMode as ir, providerVisibleProfile as it, settledToIteration as j, settlementFailureCause as ji, resolveAgentEnvironmentProvider as jn, createWorktree as jr, captureReusableExecutorConfig as jt, restoreScopeOwnerAcceptedExecution as k, awaitAbortable$1 as ki, providerAsExecutor as kn, runWorktreeHarness as kr, verdictFromJudgeScore as kt, DriverAttemptsExhaustedError as l, workerTraceAnalysisStore as la, finalizeRuntimeOwnedPendingExecutor as li, bridgeModelRouteRefusal as ln, mergeTraceEnv as lr, reconnectRetainedInteractiveRun as lt, upstreamUnavailableSignal as m, errMessage as ma, providerAttemptEvidence as mi, TERMINAL_DECISIONS as mn, buildRuntimeEventOtelSpans as mr, rollingDispatch as mt, createRootHandle as n, loadSpawnForest as na, unsupportedProfileDimensions as ni, createPeerMailbox as nn, createCodeModeTools as nr, coordinationMcpAlias as nt, pickBestDelivered as o, captureWorkerTraceEvidence as oa, attestRuntimeOwnedScopeOwner as oi, isLiveNodeStatus as on, routerTokenPrice as or, interactiveAdmissionSeamKey as ot, summarizeDriverAttempts as p, executorFailure as pa, newExecutionAttemptId as pi, readCodexRolloutSession as pn, buildLoopSpanNodes as pr, queueOf as pt, scopeRetainedOwnerPriorSpend as q, sandboxEventServedBackend as qi, abortError as qn, profileMaterializationAxes$1 as qr, taskToPrompt as qt, createSupervisor as r, materializeTreeView as ra, validateProfileMaterialization as ri, isPeerMailEnvelope as rn, describeCodeModeTools as rr, coordinationProfileToolPrefix as rt, runFinalizer as s, isTraceAnalysisStore as sa, authoredAgentIdentity as si, isTerminalNodeStatus as sn, ROUTER_PRICE_SOURCE as sr, attachWorker as st, DEFAULT_MAX_DEPTH as t, insideCursorNamespace as ta, sandboxProfileMaterialization as ti, claimsAuthority as tn, retainHarnessTranscript as tr, resolveSpawnResourcePaths as tt, HarnessTurnFailedError as u, contentAddress as ua, inheritRuntimeOwnedExecutorAttestation as ui, addHarnessUsage as un, readTraceContextFromEnv as ur, recoverRetainedInteractiveRun as ut, withDriverExecutor as v, createBudgetPool as va, runtimeOwnedExecutorMaterialization as vi, runAgentRounds as vn, generateSpanId as vr, CONTINUATION_FACTS as vt, meterRuntimeOwnedAccounting as w, defaultRedactorIdentityMaterial as wa, executableAgentProfileSnapshot as wi, readPromptOptions as wn, createRuntimeStreamEventCollector as wr, createContinuationKeeper as wt, beginScopeOwnerAttempt as x, spendFromUsageEvents as xa, runtimeOwnedScopeOwnerRuntime as xi, SandboxEvidenceRetentionError as xn, padTraceId as xr, admitFinding as xt, SUBTREE_RESULT_LIMIT as y, meterUsageEvent as ya, runtimeOwnedExecutorProviderEvidence as yi, createSandboxLineage as yn, loopEventToOtelSpan as yr, CheckUnavailableError as yt, bindScopeRetainedOwnerProvider as z, canonicalStreamEventFromSandboxEvent as zi, startRetainedRun as zn, CodexExecutionDiagnosticError as zr, createSteerableSandboxSession as zt };
|
|
31787
31827
|
|
|
31788
|
-
//# sourceMappingURL=supervisor-
|
|
31828
|
+
//# sourceMappingURL=supervisor-hIpqcCJr.js.map
|