@tangle-network/agent-runtime 3.0.16 → 3.0.17
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-DJ40anIr.js → activation-BDfK0qUP.js} +2 -2
- package/dist/{activation-DJ40anIr.js.map → activation-BDfK0qUP.js.map} +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-manager-CFfarnFh.js → coordination-manager-BRJ-3FYo.js} +2 -2
- package/dist/{coordination-manager-CFfarnFh.js.map → coordination-manager-BRJ-3FYo.js.map} +1 -1
- package/dist/{delegate-Byo3YB6N.js → delegate-B9hjoWtv.js} +2 -2
- package/dist/{delegate-Byo3YB6N.js.map → delegate-B9hjoWtv.js.map} +1 -1
- package/dist/durable.js +3 -3
- package/dist/{graph-DuUW-LNW.js → graph-DITmb_sh.js} +4 -4
- package/dist/{graph-DuUW-LNW.js.map → graph-DITmb_sh.js.map} +1 -1
- package/dist/{improve-K6AzvHcf.js → improve-B4LkHUCx.js} +5 -5
- package/dist/{improve-K6AzvHcf.js.map → improve-B4LkHUCx.js.map} +1 -1
- package/dist/index.js +7 -7
- package/dist/intelligence.js +3 -3
- package/dist/kernel.js +9 -9
- package/dist/{loop-runner-DwepGENE.js → loop-runner-DYrzAEL1.js} +2 -2
- package/dist/{loop-runner-DwepGENE.js.map → loop-runner-DYrzAEL1.js.map} +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +2 -2
- package/dist/mcp/index.js +4 -4
- package/dist/{provision-supervisor-DOgH75Qk.js → provision-supervisor-CI7KnQU5.js} +3 -3
- package/dist/{provision-supervisor-DOgH75Qk.js.map → provision-supervisor-CI7KnQU5.js.map} +1 -1
- package/dist/{runtime-5CO88Rt2.js → runtime-Bv8Fg8_o.js} +9 -9
- package/dist/{runtime-5CO88Rt2.js.map → runtime-Bv8Fg8_o.js.map} +1 -1
- package/dist/{search-executor-BX2Wwftx.js → search-executor-CQIV9K8q.js} +2 -2
- package/dist/{search-executor-BX2Wwftx.js.map → search-executor-CQIV9K8q.js.map} +1 -1
- package/dist/{server-wdjqe8et.js → server-CJKgAwAC.js} +2 -2
- package/dist/{server-wdjqe8et.js.map → server-CJKgAwAC.js.map} +1 -1
- package/dist/{structural-rollout-oXgpKkEo.js → structural-rollout-BGbw3v4h.js} +2 -2
- package/dist/{structural-rollout-oXgpKkEo.js.map → structural-rollout-BGbw3v4h.js.map} +1 -1
- package/dist/{supervise-BpvUVtSI.js → supervise-Cm10bCQE.js} +3 -3
- package/dist/{supervise-BpvUVtSI.js.map → supervise-Cm10bCQE.js.map} +1 -1
- package/dist/{supervisor-XWLIHK-U.js → supervisor-BFoJnigz.js} +20 -22
- package/dist/supervisor-BFoJnigz.js.map +1 -0
- package/dist/testing.js +11 -11
- package/dist/tui/index.js +1 -1
- package/package.json +2 -2
- package/dist/supervisor-XWLIHK-U.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $i as parseCodexUsageRecord, A as nestedScopeSeamKey, An as workerTraceEnv, Ar as knownMaterializationReceipt, Bi as extractTransportEventIdentity, Br as runtimeOwnedExecutorMaterialization, Bt as retainedOwnerWorkspaceRetentionSeamKey, Ci as hashJson, Cn as nativeCopyDelayMs, Cr as attestRuntimeOwnedPendingExecutor, Dr as finalizeRuntimeOwnedPendingExecutor, Ei as createBudgetPool, Fi as sandboxLeafOutputFromEvents, Fr as recordRuntimeOwnedProviderDispatchNotStarted, Gr as unknownMaterializationReceipt, Hi as canonicalSandboxUsageMode, Ii as sandboxOutputMarker, Ir as recordRuntimeOwnedProviderIdentityConflict, Ji as sameModelId, Jt as nestedDriverTreeRoot, Ki as isSandboxTerminalEvent, Kr as executableAgentProfileSnapshot, Kt as attestNestedDriverTreeOwner, Li as sandboxProgressEvents, Lr as recordRuntimeOwnedProviderModel, Lt as scopeRetainedOwnerCheckpointing, Mi as createSandboxToolPartState, Nn as mergeTraceEnv, On as resolveWorkerSlots, Or as inheritRuntimeOwnedExecutorAttestation, Pr as recordRuntimeOwnedProviderAttemptStart, Q as assertRecursiveReservationPolicy, Qn as harnessTranscriptUnavailable, Qr as runtimeFailureCause, Qt as closesCursorSlot, R as appendSpawnEvents, Sn as captureProviderWorkspaceSnapshot, Sr as attestRuntimeOwnedExecutor, T as sumSpendFromEvents, Ti as isCredentialRefusal, Tn as workspaceCaptureReceipt, Ui as createSandboxTurnEventCollector, Ur as runtimeOwnedScopeOwnerRuntime, Ut as loadSpawnForest, V as finalizeScopeOwnerMaterialization, Vi as assertSandboxServedModel, Wi as createSandboxUsageLedger, Wr as unknownExecutionBindingReceipt, Wt as ownedTreeRootSpawn, X as reenteredWorkers, Xi as sandboxTerminalUsageField, Xt as encodeResultBlob, Yi as sandboxEventServedBackend, Yn as captureHarnessTranscript, Zn as harnessTranscriptFromLines, Zr as reportedFailureCause, Zt as SpawnEventIndex, _i as unavailableSignalOfFailure, _r as abortReason, _t as startScopeRecoveries, aa as freezeControlRef, ai as isProvisioningRefusal, an as reconnectRetainedRun, at as hasRetriableTeardowns, bi as contentAddress, bn as assertProviderWorkspaceRetentionPort, ca as promptOptionsFromAgentTurnInput, ci as retainedExecutorContext, di as UNAVAILABLE_STATUSES, dt as registerNestedTeardownScope, ea as recordValue, ei as runtimeFailureRemediationSchema, en as verifyWorkspaceMarker, ft as releaseHeldEnvironments, gi as unavailableSignalInText, gr as RunCancellationReason, gt as settleManagerWork, hr as subscriptionUsageLimitSignal, ht as retryUnconfirmedTeardowns, ia as exactSession, ii as RetainedExecutionPendingError, in as mintRetainedIdentity, ir as retainHarnessTranscript, it as closeScopeAdmission, jn as workerTraceHeaders, jr as newExecutionAttemptId, jt as scopeRetainedOwnerSettled, kn as WORKER_TRACE_PROPAGATION, kr as knownExecutionBindingReceipt, li as retainedExecutorSeamKey, lr as isLiveNodeStatus, mi as unavailablePauseMs, mt as releaseRetainedEnvironments, na as assertEventBinding, nn as stopRetainedNativeExecution, oa as sameControlCoordinates, oi as isSchemaRejection, on as recoverRetainedRun, or as createActivityLog, pt as releaseManagerEnvironment, qi as notifySandboxEventObserver, qn as HARNESS_TRANSCRIPT_SETTLE_TIMEOUT_MS, qr as executableAgentSpecSnapshot, qt as driverRuntime, ra as awaitAbortable, ri as DISPATCH_NOT_ADMITTED_CODE, rn as assertRetainedRunReplayMaterial, rt as closeRetainedSlots, sn as startRetainedRun, sr as describeToolArgs, t as createScope, ta as RetainedRunProviderContractError, ti as runtimeProviderCode, tn as describeRetainedNativeStops, ui as UNAVAILABLE_CODES, vn as environmentGone, vr as linkAbort, vt as unconfirmedTeardowns, w as prepareScopeResume, wi as credentialCommandExit, wn as openNativeMirror, xi as contentRef, xn as captureProviderLiveWorkspace, xr as attestRuntimeOwnedDeferredExecutor, yr as runAbortable, yt as waitForScopeChildren, zr as runtimeOwnedExecutorExecutionBinding } from "./scope-BKJ_SdfW.js";
|
|
2
|
-
import { f as RuntimeRunStateError,
|
|
2
|
+
import { f as RuntimeRunStateError, m as ValidationError$1, r as BackendTransportError, t as AgentEvalError } from "./errors-AzSuGI23.js";
|
|
3
3
|
import { $ as isAsyncIterable, J as deleteBoxSafe, Ot as teardownSurfaces, Q as isAbortError, St as armDeadlineTimer, Tt as isDeadlineAbortReason, U as addSpend, V as hasControlCharacter, W as addTokenUsage, Y as errorMessage, _t as ACCEPTED_RESULT_GRACE_MS, at as sleep, ct as throwIfAborted, dt as zeroSpend, et as mapWithConcurrency, ft as zeroTokenUsage, gt as withBudgetResources, it as roundBoxMinutes, lt as unmeteredSpend, nt as randomSuffix, ot as stringifySafe, pt as addResourceSpend, q as cloneTokenUsage, rt as randomUuid, st as throwAbort, tt as promptCacheTokenClasses, ut as withTimeout, xt as ROOT_DEADLINE_REASON } from "./workspace-streams-8ALHaZzx.js";
|
|
4
4
|
import { t as runTaskQueue } from "./task-queue-DbpZAp6C.js";
|
|
5
5
|
import { _ as errorText, d as detachedSnapshot, g as errorProperty, h as errorHttpStatus, l as sha256, m as errMessage, p as causeChain, v as defaultRedactor } from "./jsonl-file-BBP9Dz9w.js";
|
|
@@ -5522,6 +5522,14 @@ const DETERMINISTIC_BRIDGE_CODES = /* @__PURE__ */ new Set([
|
|
|
5522
5522
|
"SEAT_NOT_LOGGED_IN"
|
|
5523
5523
|
]);
|
|
5524
5524
|
/**
|
|
5525
|
+
* A model provider's content filter refuses the same prompt every time, so the turn is terminal
|
|
5526
|
+
* and the agent settles failed with this reason, for its parent to reword or re-scope the task.
|
|
5527
|
+
* Codex names it only in text, under the generic `AGENT_EXECUTION_FAILED`: on Discovery run
|
|
5528
|
+
* magnetar-rust-sandbox-20261031f two workers resent one refused prompt 6 and 5 times.
|
|
5529
|
+
*/
|
|
5530
|
+
const CONTENT_FILTER_REASON = "refused by the model provider's content filter";
|
|
5531
|
+
const isContentFilterRefusal = (error) => causeChain(error).some((cause) => cause instanceof Error && /\bcontent was flagged for possible\b/iu.test(errorProperty(cause, "message") ?? ""));
|
|
5532
|
+
/**
|
|
5525
5533
|
* A driver's harness turn ran to its terminal result, and that result reported failure.
|
|
5526
5534
|
*
|
|
5527
5535
|
* A provider executor reports a failed turn as a returned outcome, not a thrown error, so without
|
|
@@ -5529,8 +5537,8 @@ const DETERMINISTIC_BRIDGE_CODES = /* @__PURE__ */ new Set([
|
|
|
5529
5537
|
* A 53-minute turn ended `status code 524`, and another ended `Invalid API key` after a platform
|
|
5530
5538
|
* key expired mid-turn. A new turn succeeds in both cases.
|
|
5531
5539
|
*
|
|
5532
|
-
* `errorCode` is the provider's machine code when it reported one. The classifier reads the code
|
|
5533
|
-
*
|
|
5540
|
+
* `errorCode` is the provider's machine code when it reported one. The classifier reads the code;
|
|
5541
|
+
* text decides only a printed capacity code and a content-filter refusal, which have none.
|
|
5534
5542
|
*/
|
|
5535
5543
|
var HarnessTurnFailedError = class extends Error {
|
|
5536
5544
|
runtime;
|
|
@@ -5612,19 +5620,12 @@ function upstreamUnavailableSignal(error) {
|
|
|
5612
5620
|
* `upstream_unavailable`) when the subscription account owner has no account with room.
|
|
5613
5621
|
*/
|
|
5614
5622
|
function capacityCode(error) {
|
|
5615
|
-
let code;
|
|
5616
5623
|
try {
|
|
5617
|
-
code = Reflect.get(error, "code");
|
|
5624
|
+
const code = Reflect.get(error, "code");
|
|
5625
|
+
return typeof code === "string" && UNAVAILABLE_CODES.has(code.toLowerCase()) ? code.toLowerCase() : void 0;
|
|
5618
5626
|
} catch {
|
|
5619
5627
|
return;
|
|
5620
5628
|
}
|
|
5621
|
-
if (typeof code !== "string") return void 0;
|
|
5622
|
-
const normalized = code.toLowerCase();
|
|
5623
|
-
return UNAVAILABLE_CODES.has(normalized) ? normalized : void 0;
|
|
5624
|
-
}
|
|
5625
|
-
/** True when the upstream refused for capacity and the same request will succeed later. */
|
|
5626
|
-
function isUpstreamUnavailable(error) {
|
|
5627
|
-
return upstreamUnavailableSignal(error) !== void 0;
|
|
5628
5629
|
}
|
|
5629
5630
|
/**
|
|
5630
5631
|
* Classify one driver failure. Runtime's own typed refusals are decisions and stay terminal; an
|
|
@@ -5649,23 +5650,20 @@ function classifyDriverFailure(error, signal, stopSignal) {
|
|
|
5649
5650
|
if (error instanceof Error && errorProperty(error, "name") === "AbortError") return stopSignal?.aborted === true ? "terminal" : "transient";
|
|
5650
5651
|
if (error instanceof Error && isProviderSchemaRejection(error)) return "terminal";
|
|
5651
5652
|
if (isCredentialRefusal(error)) return "terminal";
|
|
5652
|
-
if (causeChain(error).some(isProvisioningRefusal)) return "terminal";
|
|
5653
|
+
if (causeChain(error).some(isProvisioningRefusal) || isContentFilterRefusal(error)) return "terminal";
|
|
5653
5654
|
if (error instanceof HarnessTurnFailedError) {
|
|
5654
5655
|
if (error.errorCode !== void 0 && DETERMINISTIC_BRIDGE_CODES.has(error.errorCode)) return "terminal";
|
|
5655
|
-
if (
|
|
5656
|
+
if (upstreamUnavailableSignal(error) !== void 0) return "unavailable";
|
|
5656
5657
|
return foreignHttpStatusVerdict(error) ?? "transient";
|
|
5657
5658
|
}
|
|
5658
5659
|
if (error instanceof BackendTransportError) {
|
|
5659
5660
|
if (error.upstreamCode !== void 0 && DETERMINISTIC_BRIDGE_CODES.has(error.upstreamCode)) return "terminal";
|
|
5660
|
-
if (
|
|
5661
|
+
if (upstreamUnavailableSignal(error) !== void 0) return "unavailable";
|
|
5661
5662
|
const status = error.status;
|
|
5662
|
-
|
|
5663
|
-
if (status === 408 || status >= 500) return "transient";
|
|
5664
|
-
return "terminal";
|
|
5663
|
+
return status === void 0 || status === 408 || status >= 500 ? "transient" : "terminal";
|
|
5665
5664
|
}
|
|
5666
|
-
if (error instanceof ValidationError$1 || error instanceof ConfigError || error instanceof RuntimeRunStateError) return "terminal";
|
|
5667
5665
|
if (error instanceof AgentEvalError) return "terminal";
|
|
5668
|
-
if (
|
|
5666
|
+
if (upstreamUnavailableSignal(error) !== void 0) return "unavailable";
|
|
5669
5667
|
return foreignHttpStatusVerdict(error) ?? "transient";
|
|
5670
5668
|
}
|
|
5671
5669
|
/** The credential command's exit code when it failed before Runtime journaled a dispatch: no
|
|
@@ -5738,7 +5736,7 @@ var DriverAttemptsExhaustedError = class extends RuntimeRunStateError {
|
|
|
5738
5736
|
const firstFailure = attempts.find((attempt) => attempt.error !== void 0)?.error;
|
|
5739
5737
|
const pauses = attempts.filter((attempt) => attempt.classification === "unavailable");
|
|
5740
5738
|
const pausedMs = pauses.reduce((sum, attempt) => sum + (attempt.retryInMs ?? 0), 0);
|
|
5741
|
-
super(`supervisor driver failed after ${attempts.length} attempt(s) — stopped by ${stop}; ` + (pauses.length === 0 ? "" : `${pauses.length} attempt(s) met an unavailable upstream and paused ${Math.round(pausedMs / 1e3)} s in total; `) + (firstFailure !== void 0 && firstFailure !== last?.error ? `first failure: ${errorText(firstFailure)}; ` : "") + `last cause: ${causeText}` + (last?.classification ? ` (classified ${last.classification})` : ""), { cause });
|
|
5739
|
+
super(`supervisor driver failed after ${attempts.length} attempt(s) — stopped by ${stop}` + (isContentFilterRefusal(cause) ? `: ${CONTENT_FILTER_REASON}; ` : "; ") + (pauses.length === 0 ? "" : `${pauses.length} attempt(s) met an unavailable upstream and paused ${Math.round(pausedMs / 1e3)} s in total; `) + (firstFailure !== void 0 && firstFailure !== last?.error ? `first failure: ${errorText(firstFailure)}; ` : "") + `last cause: ${causeText}` + (last?.classification ? ` (classified ${last.classification})` : ""), { cause });
|
|
5742
5740
|
this.attempts = Object.freeze([...attempts]);
|
|
5743
5741
|
this.stop = stop;
|
|
5744
5742
|
}
|
|
@@ -17427,4 +17425,4 @@ async function noWinner(settled, rejection) {
|
|
|
17427
17425
|
}
|
|
17428
17426
|
export { DEFAULT_PEER_MAIL_LIMITS as $, sandboxActProfileMaterialization as $t, createSandboxForSpec as A, ROUTER_PRICE_SOURCE as At, createRouterTranscript as B, runWorktreeHarness as Bt, createExecutor as C, checkVerdictOf as Ct, runAgentRounds as D, bridgeAdmissionRefusal as Dt, createSteerableSandboxSession as E, isFiniteNumber as Et, codeModeArguments as F, createPushTraceSource as Ft, LEAF_CONTINUATION_TASK as G, assertProfileMaterializes as Gt, createAgentEnvironmentProviderRegistry as H, harnessInvocation as Ht, codeModeModelOutput as I, bridgeRuntimeAttachmentsKey as It, createInPlaceCliExecutor as J, fullProfileMaterialization as Jt, providerAsSandboxClient as K, controlProfileMaterialization as Kt, createCodeModeTools as L, bridgeStopSignalKey as Lt, acquireSandbox as M, createCodexRolloutStoreReader as Mt, TERMINAL_DECISIONS as N, harnessUsageIsEmpty as Nt, assertBoxlessPromptOptions as O, bridgeModelRouteRefusal as Ot, defaultSelectWinner as P, readCodexRolloutSession as Pt, AUTHORITY_MARKERS as Q, renderUnsupported as Qt, runCodeMode as R, defaultRunCommand as Rt, captureReusableExecutorConfig as S, bestComposite as St, DEFAULT_SANDBOX_STEERING_MAX_TURNS as T, failedItems as Tt, resolveAgentEnvironmentProvider as U, terminateProcessTreeAndConfirm as Ut, routerBrain as V, LOCAL_HARNESSES as Vt, providerAsExecutor as W, assertProfileMaterialization as Wt, createInbox as X, promptControlProfileMaterialization as Xt, INBOX_RECEIPT_KEY as Y, profileMaterializationAxes$1 as Yt, failPendingAfter as Z, promptModelProfileMaterialization as Zt, withDriverExecutor as _, gateOnDeliverable as _t, assertRunParking as a, peerMailVerbNames as at, createExecutorRegistry as b, CONTINUATIONS_DIR as bt, sleepScopeWait as c, HarnessTurnFailedError as ct, runFinalizer as d, classifyDriverFailure as dt, sandboxProfileMaterialization as en, PEER_MAIL_WIRE_KEY as et, runTree as f, summarizeDriverAttempts as ft, isDriverSpec as g, gateFactoryOnDeliverable as gt, driverExecutorFactory as h, CheckUnavailableError as ht, RunParkedError as i, readSandboxOutcome as in, peerMailTools as it, createSandboxLineage as j, addHarnessUsage as jt, readPromptOptions as k, priceTokens as kt, withRunParking as l, abandonablePending as lt, driverChild as m, upstreamUnavailableSignal as mt, createSupervisor as n, worktreeCliProfileMaterialization as nn, createPeerMailbox as nt, bindScopeParkingDrain as o, taskToPrompt$1 as ot, createRootHandle as p, undispatchedCredentialExit as pt, createWorktreeCliExecutor as q, defineProfileMaterializationContract as qt, assertResumeLimits as r, projectSandboxOutcome as rn, isPeerMailEnvelope as rt, readRunParking as s, DriverAttemptsExhaustedError as st, DEFAULT_MAX_DEPTH as t, unsupportedProfileDimensions as tn, claimsAuthority as tt, bestDelivered as u, causedByPartialFailure as ut, InMemoryResultBlobStore as v, mapExecutorResult as vt, snapshotExecutorConfig as w, createContinuationKeeper as wt, bindReusableExecutorExecutionId as x, admitContinuationPolicy as xt, InMemorySpawnJournal as y, verdictFromJudgeScore as yt, toolResultText as z, runSettledCommand as zt };
|
|
17429
17427
|
|
|
17430
|
-
//# sourceMappingURL=supervisor-
|
|
17428
|
+
//# sourceMappingURL=supervisor-BFoJnigz.js.map
|