@tangle-network/agent-runtime 9.0.10 → 9.0.11
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 +12 -0
- package/dist/{activation-BuKAzxZB.js → activation-B_10QJ3D.js} +2 -2
- package/dist/{activation-BuKAzxZB.js.map → activation-B_10QJ3D.js.map} +1 -1
- package/dist/{activation-CVVpVGyG.d.ts → activation-emYXDX7T.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-manager-B-Ugh18D.js → coordination-manager-BUct8qFe.js} +2 -2
- package/dist/{coordination-manager-B-Ugh18D.js.map → coordination-manager-BUct8qFe.js.map} +1 -1
- package/dist/{delegate-Dizy-1ZC.js → delegate-DHtsLCyr.js} +2 -2
- package/dist/{delegate-Dizy-1ZC.js.map → delegate-DHtsLCyr.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +4 -4
- package/dist/{graph-Bf3axJxp.js → graph-D6KJ6wxN.js} +35 -12
- package/dist/graph-D6KJ6wxN.js.map +1 -0
- package/dist/{improve-JThdxpGB.js → improve-CUqmH45C.js} +5 -5
- package/dist/{improve-JThdxpGB.js.map → improve-CUqmH45C.js.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -8
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +2 -2
- package/dist/kernel.js +10 -10
- package/dist/{loop-runner-D8FP4oEN.js → loop-runner-CCeBurqG.js} +2 -2
- package/dist/{loop-runner-D8FP4oEN.js.map → loop-runner-CCeBurqG.js.map} +1 -1
- package/dist/{loop-runner-40_tD2d4.d.ts → loop-runner-Q9nlHcEH.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 +2 -2
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +4 -4
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-BDAXc65B.js → provision-supervisor-CNTBbuDV.js} +3 -3
- package/dist/{provision-supervisor-BDAXc65B.js.map → provision-supervisor-CNTBbuDV.js.map} +1 -1
- package/dist/{run-state-9FP-wBWK.js → run-state-C0nr4O7P.js} +2 -2
- package/dist/{run-state-9FP-wBWK.js.map → run-state-C0nr4O7P.js.map} +1 -1
- package/dist/{runtime-Czu2SSMy.js → runtime-C5yB7Vkk.js} +10 -10
- package/dist/{runtime-Czu2SSMy.js.map → runtime-C5yB7Vkk.js.map} +1 -1
- package/dist/{search-executor-Dl_WUQeH.js → search-executor-BgEY5MKQ.js} +2 -2
- package/dist/{search-executor-Dl_WUQeH.js.map → search-executor-BgEY5MKQ.js.map} +1 -1
- package/dist/{server-Dbge7VDj.js → server-X67SS4r8.js} +2 -2
- package/dist/{server-Dbge7VDj.js.map → server-X67SS4r8.js.map} +1 -1
- package/dist/{structural-rollout-DUMYWwZ3.js → structural-rollout-BSzN8a0T.js} +2 -2
- package/dist/{structural-rollout-DUMYWwZ3.js.map → structural-rollout-BSzN8a0T.js.map} +1 -1
- package/dist/{supervise-BpcWjDMr.js → supervise-RJG2ruTF.js} +180 -203
- package/dist/supervise-RJG2ruTF.js.map +1 -0
- package/dist/{supervisor-CdrDXnOJ.js → supervisor-DbtgkJyr.js} +16 -5
- package/dist/supervisor-DbtgkJyr.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +11 -11
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-DRijOelA.d.ts → types-DMqr8Tmx.d.ts} +17 -3
- package/package.json +1 -1
- package/dist/graph-Bf3axJxp.js.map +0 -1
- package/dist/supervise-BpcWjDMr.js.map +0 -1
- package/dist/supervisor-CdrDXnOJ.js.map +0 -1
|
@@ -5200,7 +5200,13 @@ function classifyDriverFailure(error, signal, stopSignal) {
|
|
|
5200
5200
|
if (signal?.aborted) return "terminal";
|
|
5201
5201
|
if (materializationTimedOut(error)) return "terminal";
|
|
5202
5202
|
if (error instanceof CheckUnavailableError || error instanceof CoordinationUnreachableError) return "unavailable";
|
|
5203
|
-
if (error instanceof RetainedExecutionPendingError && error.pendingCause === "provider-contract")
|
|
5203
|
+
if (error instanceof RetainedExecutionPendingError && (error.pendingCause === "provider-contract" || causeChain(error.cause).some((cause) => {
|
|
5204
|
+
try {
|
|
5205
|
+
return cause instanceof Error && (Reflect.get(cause, "retryable") === false || [401, 403].includes(errorHttpStatus(cause) ?? 0));
|
|
5206
|
+
} catch {
|
|
5207
|
+
return false;
|
|
5208
|
+
}
|
|
5209
|
+
}))) return "terminal";
|
|
5204
5210
|
if (undispatchedCredentialExit(error) !== void 0) return "unavailable";
|
|
5205
5211
|
const admission = retainedAdmissionCause(error);
|
|
5206
5212
|
if (admission !== void 0 && isDispatchNotAdmitted(admission)) return "terminal";
|
|
@@ -7496,6 +7502,7 @@ async function captureBeforeDestroy(scope, target, signal) {
|
|
|
7496
7502
|
// src/runtime/supervise/host-restart.ts
|
|
7497
7503
|
/** A release roll restarts a host agent for about 18 s; past this window the failure stands. */
|
|
7498
7504
|
const HOST_RESTART_WINDOW_MS = 18e4;
|
|
7505
|
+
const CAPACITY_RETRY_WINDOW_MS = 6e5;
|
|
7499
7506
|
/**
|
|
7500
7507
|
* Sandbox answers a request that outlived a planned host-agent restart's hold with 503
|
|
7501
7508
|
* `HOST_AGENT_RESTARTING`, `retryUntil` and `Retry-After` (agent-container
|
|
@@ -7503,7 +7510,9 @@ const HOST_RESTART_WINDOW_MS = 18e4;
|
|
|
7503
7510
|
* resent under one execution id once and replays its events
|
|
7504
7511
|
* (apps/sidecar/tests/integration/run-stream-resend.test.ts). `retry` waits, Retry-After at least, then doubling to `retryUntil`,
|
|
7505
7512
|
* 30 s per wait, and answers true; any other error, an abort or a spent window answers false.
|
|
7506
|
-
*
|
|
7513
|
+
* An explicit 503 capacity refusal asking to retry later uses the capacity window, giving
|
|
7514
|
+
* autoscaling room to arrive before the same retained invocation counts as a failed attempt.
|
|
7515
|
+
* `settled` opens a new window after progress; the caller's signal still bounds every wait.
|
|
7507
7516
|
*/
|
|
7508
7517
|
function hostRestartReconnect(signal, now = Date.now) {
|
|
7509
7518
|
let since;
|
|
@@ -7511,11 +7520,12 @@ function hostRestartReconnect(signal, now = Date.now) {
|
|
|
7511
7520
|
const ms = (value) => typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
7512
7521
|
return {
|
|
7513
7522
|
async retry(error) {
|
|
7523
|
+
const capacity = causeChain(error).find((cause) => cause instanceof Error && errorHttpStatus(cause) === 503 && /\bcapacity\b.*\bretry later\b/iu.test(cause.message));
|
|
7514
7524
|
const code = (cause) => Reflect.get(cause, "code") === "HOST_AGENT_RESTARTING";
|
|
7515
|
-
const refusal = causeChain(error).find(code);
|
|
7525
|
+
const refusal = capacity ?? causeChain(error).find(code);
|
|
7516
7526
|
if (refusal === void 0 || signal.aborted) return false;
|
|
7517
7527
|
since ??= now();
|
|
7518
|
-
const left = since + HOST_RESTART_WINDOW_MS - now();
|
|
7528
|
+
const left = since + (capacity ? CAPACITY_RETRY_WINDOW_MS : HOST_RESTART_WINDOW_MS) - now();
|
|
7519
7529
|
if (left <= 0) return false;
|
|
7520
7530
|
const wanted = Math.max(ms(Reflect.get(refusal, "retryAfterMs")), ms(Reflect.get(refusal, "retryUntil")) - now(), cappedDoublingMs(++waits, 1e3, 3e4));
|
|
7521
7531
|
await sleep(Math.min(left, 3e4, wanted), signal);
|
|
@@ -12377,6 +12387,7 @@ function readStatus(box) {
|
|
|
12377
12387
|
function isRetryable(err) {
|
|
12378
12388
|
if (!err || typeof err !== "object") return false;
|
|
12379
12389
|
const e = err;
|
|
12390
|
+
if (e.retryable === false) return false;
|
|
12380
12391
|
const status = e.status ?? e.statusCode;
|
|
12381
12392
|
if (typeof status === "number") return RETRYABLE_HTTP.has(status) || status >= 500;
|
|
12382
12393
|
const name = e.name ?? "";
|
|
@@ -16284,4 +16295,4 @@ async function noWinner(settled, rejection) {
|
|
|
16284
16295
|
}
|
|
16285
16296
|
export { AUTHORITY_MARKERS as $, readSandboxOutcome as $t, readPromptOptions as A, createPushTraceSource as At, toolResultText as B, assertProfileMaterializes as Bt, captureReusableExecutorConfig as C, bridgeModelRouteRefusal as Ct, createSteerableSandboxSession as D, createCodexRolloutStoreReader as Dt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as E, addHarnessUsage as Et, defaultSelectWinner as F, runWorktreeHarness as Ft, providerAsExecutor as G, promptControlProfileMaterialization as Gt, routerBrain as H, defineProfileMaterializationContract as Ht, codeModeArguments as I, LOCAL_HARNESSES as It, createWorktreeCliExecutor as J, sandboxActProfileMaterialization as Jt, LEAF_CONTINUATION_TASK as K, promptModelProfileMaterialization as Kt, codeModeModelOutput as L, harnessInvocation as Lt, createSandboxLineage as M, bridgeStopSignalKey as Mt, acquireSandbox as N, defaultRunCommand as Nt, runAgentRounds as O, harnessUsageIsEmpty as Ot, TERMINAL_DECISIONS as P, runSettledCommand as Pt, failPendingAfter as Q, projectSandboxOutcome as Qt, createCodeModeTools as R, terminateProcessTreeAndConfirm as Rt, bindReusableExecutorExecutionId as S, bridgeAdmissionRefusal as St, snapshotExecutorConfig as T, ROUTER_PRICE_SOURCE as Tt, createAgentEnvironmentProviderRegistry as U, fullProfileMaterialization as Ut, createRouterTranscript as V, controlProfileMaterialization as Vt, resolveAgentEnvironmentProvider as W, profileMaterializationAxes$1 as Wt, INBOX_RECEIPT_KEY as X, unsupportedProfileDimensions as Xt, createInPlaceCliExecutor as Y, sandboxProfileMaterialization as Yt, createInbox as Z, worktreeCliProfileMaterialization as Zt, isDriverSpec as _, CheckUnavailableError as _t, assertRunParking as a, peerMailTools as at, InMemorySpawnJournal as b, mapExecutorResult as bt, readRunParking as c, DriverAttemptsExhaustedError as ct, bestDelivered as d, classifyDriverFailure as dt, DEFAULT_PEER_MAIL_LIMITS as et, runFinalizer as f, summarizeDriverAttempts as ft, driverExecutorFactory as g, preflightPublicCoordination as gt, driverChild as h, upstreamUnavailableSignal as ht, RunParkedError as i, isPeerMailEnvelope as it, createSandboxForSpec as j, bridgeRuntimeAttachmentsKey as jt, assertBoxlessPromptOptions as k, readCodexRolloutSession as kt, sleepScopeWait as l, HarnessTurnFailedError as lt, createRootHandle as m, undispatchedCredentialExit as mt, createSupervisor as n, claimsAuthority as nt, bindScopeParkingDrain as o, peerMailVerbNames as ot, runTree as p, transientFailureKind as pt, providerAsSandboxClient as q, renderUnsupported as qt, assertResumeLimits as r, createPeerMailbox as rt, isRunParked as s, taskToPrompt$1 as st, DEFAULT_MAX_DEPTH as t, PEER_MAIL_WIRE_KEY as tt, withRunParking as u, abandonablePending as ut, withDriverExecutor as v, gateFactoryOnDeliverable as vt, createExecutor as w, priceTokens as wt, createExecutorRegistry as x, verdictFromJudgeScore as xt, InMemoryResultBlobStore as y, gateOnDeliverable as yt, runCodeMode as z, assertProfileMaterialization as zt };
|
|
16286
16297
|
|
|
16287
|
-
//# sourceMappingURL=supervisor-
|
|
16298
|
+
//# sourceMappingURL=supervisor-DbtgkJyr.js.map
|