@tangle-network/agent-runtime 3.0.18 → 3.0.20

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.
Files changed (62) hide show
  1. package/dist/{activation-BDfK0qUP.js → activation-BZk0Bz_s.js} +2 -2
  2. package/dist/{activation-BDfK0qUP.js.map → activation-BZk0Bz_s.js.map} +1 -1
  3. package/dist/{activation-BInDGC5t.d.ts → activation-nIJyep92.d.ts} +2 -2
  4. package/dist/agent.d.ts +1 -1
  5. package/dist/agent.js +3 -3
  6. package/dist/{coordination-manager-BRJ-3FYo.js → coordination-manager-BEk8adhl.js} +4 -4
  7. package/dist/{coordination-manager-BRJ-3FYo.js.map → coordination-manager-BEk8adhl.js.map} +1 -1
  8. package/dist/{delegate-B5a4wCau.js → delegate-Bupjhk_3.js} +2 -2
  9. package/dist/{delegate-B5a4wCau.js.map → delegate-Bupjhk_3.js.map} +1 -1
  10. package/dist/durable.d.ts +1 -1
  11. package/dist/durable.js +6 -6
  12. package/dist/{graph-HaMcqUWX.js → graph-hKkudsp6.js} +5 -5
  13. package/dist/{graph-HaMcqUWX.js.map → graph-hKkudsp6.js.map} +1 -1
  14. package/dist/{improve-B4LkHUCx.js → improve-DTqGewOl.js} +6 -6
  15. package/dist/{improve-B4LkHUCx.js.map → improve-DTqGewOl.js.map} +1 -1
  16. package/dist/index.d.ts +3 -3
  17. package/dist/index.js +8 -8
  18. package/dist/intelligence.d.ts +2 -2
  19. package/dist/intelligence.js +4 -4
  20. package/dist/kernel.d.ts +1 -1
  21. package/dist/kernel.js +11 -11
  22. package/dist/{loop-runner-Df3gLvJm.js → loop-runner-08qKJIeM.js} +2 -2
  23. package/dist/{loop-runner-Df3gLvJm.js.map → loop-runner-08qKJIeM.js.map} +1 -1
  24. package/dist/{loop-runner-m1GCPOEC.d.ts → loop-runner-CX0ZrhbR.d.ts} +2 -2
  25. package/dist/loop-runner-bin.d.ts +1 -1
  26. package/dist/loop-runner-bin.js +1 -1
  27. package/dist/mcp/bin.js +3 -3
  28. package/dist/mcp/index.d.ts +1 -1
  29. package/dist/mcp/index.js +5 -5
  30. package/dist/profiles.d.ts +1 -1
  31. package/dist/{provision-supervisor-CI7KnQU5.js → provision-supervisor-44PsyM4H.js} +4 -4
  32. package/dist/{provision-supervisor-CI7KnQU5.js.map → provision-supervisor-44PsyM4H.js.map} +1 -1
  33. package/dist/{run-cancellation-pmPWcMy0.js → run-cancellation-BgxkVAMB.js} +2 -2
  34. package/dist/{run-cancellation-pmPWcMy0.js.map → run-cancellation-BgxkVAMB.js.map} +1 -1
  35. package/dist/{runtime-DuCYicSd.js → runtime-C1a1owkE.js} +11 -11
  36. package/dist/{runtime-DuCYicSd.js.map → runtime-C1a1owkE.js.map} +1 -1
  37. package/dist/{scope-BKJ_SdfW.js → scope-B7AKskjP.js} +20 -21
  38. package/dist/scope-B7AKskjP.js.map +1 -0
  39. package/dist/{search-executor-CQIV9K8q.js → search-executor-DXwfkQuk.js} +3 -3
  40. package/dist/{search-executor-CQIV9K8q.js.map → search-executor-DXwfkQuk.js.map} +1 -1
  41. package/dist/{server-BP7d8yGG.js → server-BJPBEn6j.js} +3 -3
  42. package/dist/{server-BP7d8yGG.js.map → server-BJPBEn6j.js.map} +1 -1
  43. package/dist/{structural-rollout-BGbw3v4h.js → structural-rollout-Ko9o5nLr.js} +3 -3
  44. package/dist/{structural-rollout-BGbw3v4h.js.map → structural-rollout-Ko9o5nLr.js.map} +1 -1
  45. package/dist/{supervise-BHxxCvbk.js → supervise-DDtGux2I.js} +17 -5
  46. package/dist/supervise-DDtGux2I.js.map +1 -0
  47. package/dist/{supervision-discovery-D3RjhxX4.js → supervision-discovery-CavnyD8r.js} +2 -2
  48. package/dist/{supervision-discovery-D3RjhxX4.js.map → supervision-discovery-CavnyD8r.js.map} +1 -1
  49. package/dist/{supervisor-BFoJnigz.js → supervisor-BZgJRcFI.js} +9 -24
  50. package/dist/supervisor-BZgJRcFI.js.map +1 -0
  51. package/dist/testing.d.ts +1 -1
  52. package/dist/testing.js +11 -11
  53. package/dist/{top-web-BYx8LLQ7.js → top-web-DkSIy74b.js} +4 -4
  54. package/dist/{top-web-BYx8LLQ7.js.map → top-web-DkSIy74b.js.map} +1 -1
  55. package/dist/tui/bin.js +3 -3
  56. package/dist/tui/index.d.ts +1 -1
  57. package/dist/tui/index.js +2 -2
  58. package/dist/{types-BN0Twv-5.d.ts → types-JZG7seO5.d.ts} +4 -4
  59. package/package.json +1 -1
  60. package/dist/scope-BKJ_SdfW.js.map +0 -1
  61. package/dist/supervise-BHxxCvbk.js.map +0 -1
  62. package/dist/supervisor-BFoJnigz.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { c as RetainedInteractiveAdmissionError, d as RetainedRunDispatchBindingError, f as RuntimeRunStateError, l as RetainedInteractiveBindingError, m as ValidationError, r as BackendTransportError, u as RetainedRunAdmissionError } from "./errors-AzSuGI23.js";
2
2
  import { $ as isAsyncIterable, Ct as boundedChildDeadlineAt, Dt as teardownExecutor, Et as singleFlightTeardown, F as deepFreezeCandidate, G as chargedTokens, H as abortError, K as cloneSpend, St as armDeadlineTimer, U as addSpend, W as addTokenUsage, X as fnv1a32Hex, Y as errorMessage, Z as hasCompleteCacheBreakdown, a as verifyAgentCandidateWorkspaceArtifacts, at as sleep, dt as zeroSpend, ft as zeroTokenUsage, g as workspaceLimits, gt as withBudgetResources, h as verifyAgentCandidateWorkspaceArchive, ht as resourceTelemetry, i as readAgentCandidateWorkspaceArtifactFiles, j as verifiedArtifactChunks, k as verifyWorkspaceSnapshotArtifacts, m as safeArchivePath, mt as assertResources, o as verifyAgentCandidateWorkspaceTree, pt as addResourceSpend, q as cloneTokenUsage, tt as promptCacheTokenClasses, vt as CHILD_DEADLINE_REASON, wt as checkInIdleMs, z as sha256Bytes$1 } from "./workspace-streams-8ALHaZzx.js";
3
- import { _ as errorText, b as resolveRedactor, c as withJsonlFileLock, d as detachedSnapshot, f as shareParsedStrings, i as prepareJsonlAppend, l as sha256, m as errMessage, n as isNoEntError, o as readCommittedJsonLines, p as causeChain, t as appendCommittedJsonLine, v as defaultRedactor } from "./jsonl-file-BBP9Dz9w.js";
3
+ import { _ as errorText, b as resolveRedactor, c as withJsonlFileLock, d as detachedSnapshot, f as shareParsedStrings, g as errorProperty, i as prepareJsonlAppend, l as sha256, m as errMessage, n as isNoEntError, o as readCommittedJsonLines, p as causeChain, t as appendCommittedJsonLine, v as defaultRedactor } from "./jsonl-file-BBP9Dz9w.js";
4
4
  import { t as assertExecutableAgentProfile } from "./model-policy-C-RGAUW4.js";
5
5
  import { a as writeAtomicDurableFile, n as assertNoSymlinkDescendant, o as captureRunWriteContext, r as publishExclusiveDurableFile, s as fenceRunWrite, t as appendDurableFile } from "./durable-file-DstVeHcj.js";
6
6
  import { a as withPursuitContext, i as notifyRuntimeHookEvent } from "./runtime-hooks-CsW2pfFk.js";
@@ -2773,25 +2773,22 @@ const causeMessages = {
2773
2773
  */
2774
2774
  const DISPATCH_NOT_ADMITTED_CODE = "DISPATCH_NOT_ADMITTED";
2775
2775
  /**
2776
- * The Sandbox SDK's codes for a box that cannot be provisioned for this profile, sent with HTTP
2777
- * 422 when the failure is deterministic: a profile file mount outside the box's writable roots,
2778
- * refused before any box exists, and a profile-file materialization that would fail the same way
2779
- * again. On Discovery run queens21-h22-capture-root-1-20261019c every child profile mounted
2780
- * `/work/queens21_count.c` on a read-only root filesystem, and 154 attempts across 4 workers were
2781
- * retried as a lost transport. The same codes at another status may be transient and are not
2782
- * read here.
2776
+ * The Sandbox SDK's codes for a box that cannot be provisioned for this profile, by the HTTP status
2777
+ * each is sent with: a mount outside the box's writable roots and a materialization that would fail
2778
+ * the same way again (422), a mounted file changed on both sides since the last mount (409; before
2779
+ * Sandbox typed it, a bare 500 read by its text, which magnetar-rust-sandbox-20261031g's managers
2780
+ * retried every turn). On Discovery run queens21-h22-capture-root-1-20261019c every child profile
2781
+ * mounted `/work/queens21_count.c` on a read-only root filesystem, and 154 attempts across 4
2782
+ * workers were retried as a lost transport. The same codes at another status may be transient.
2783
2783
  */
2784
- const PROVISIONING_REFUSAL_CODES = /* @__PURE__ */ new Set(["PROFILE_FILE_MOUNT_OUTSIDE_ROOTS", "PROFILE_FILES_MATERIALIZE_FAILED"]);
2784
+ const PROVISIONING_REFUSALS = /* @__PURE__ */ new Map([
2785
+ ["PROFILE_FILE_MOUNT_OUTSIDE_ROOTS", 422],
2786
+ ["PROFILE_FILES_MATERIALIZE_FAILED", 422],
2787
+ ["PROFILE_FILE_CONFLICT", 409]
2788
+ ]);
2789
+ const UNTYPED_FILE_CONFLICT = /Refusing to replace existing profile file: /u;
2785
2790
  /** True for an error that is itself a deterministic provisioning refusal (see above). */
2786
- function isProvisioningRefusal(value) {
2787
- try {
2788
- const code = readString(value, "code");
2789
- const status = readNumber(value, "status") ?? readNumber(value, "statusCode");
2790
- return code !== void 0 && status === 422 && PROVISIONING_REFUSAL_CODES.has(code);
2791
- } catch {
2792
- return false;
2793
- }
2794
- }
2791
+ const isProvisioningRefusal = (value) => refusedAs(PROVISIONING_REFUSALS, value) || value instanceof Error && UNTYPED_FILE_CONFLICT.test(errorProperty(value, "message") ?? "");
2795
2792
  /**
2796
2793
  * Platform refusals the orchestrator answers BEFORE it forwards a dispatch, by machine code and
2797
2794
  * the HTTP status it is sent with. Run 002f69d5: `HUB_CREDENTIAL_REFRESH_FAILED` at 503 left no
@@ -2799,11 +2796,13 @@ function isProvisioningRefusal(value) {
2799
2796
  */
2800
2797
  const PLATFORM_PREDISPATCH_REFUSALS = /* @__PURE__ */ new Map([["HUB_CREDENTIAL_REFRESH_FAILED", 503]]);
2801
2798
  /** True for an error that is itself a named platform refusal of a dispatch (see above). */
2802
- function isPlatformPredispatchRefusal(value) {
2799
+ const isPlatformPredispatchRefusal = (value) => refusedAs(PLATFORM_PREDISPATCH_REFUSALS, value);
2800
+ /** True when `value` carries one of `refusals`' codes at the status that code is sent with. */
2801
+ function refusedAs(refusals, value) {
2803
2802
  try {
2804
2803
  const code = readString(value, "code");
2805
2804
  const status = readNumber(value, "status") ?? readNumber(value, "statusCode");
2806
- const expected = code === void 0 ? void 0 : PLATFORM_PREDISPATCH_REFUSALS.get(code);
2805
+ const expected = code === void 0 ? void 0 : refusals.get(code);
2807
2806
  return expected !== void 0 && expected === status;
2808
2807
  } catch {
2809
2808
  return false;
@@ -16806,4 +16805,4 @@ async function recoverRetainedChildren(args, children, spawn, next) {
16806
16805
  }
16807
16806
  export { deriveNodeExecutionIdentity as $, parseCodexUsageRecord as $i, persistHarnessTranscript as $n, runtimeFailureCauseSchema as $r, insideCursorNamespace as $t, nestedScopeSeamKey as A, spendFromUsageTotals as Ai, workerTraceEnv as An, knownMaterializationReceipt as Ar, beginScopeRetainedOwnerDrive as At, beginScopeOwnerAttempt as B, extractTransportEventIdentity as Bi, flatOtelSpan as Bn, runtimeOwnedExecutorMaterialization as Br, retainedOwnerWorkspaceRetentionSeamKey as Bt, writeWorkerSteerAcknowledgement as C, hashJson as Ci, nativeCopyDelayMs as Cn, attestRuntimeOwnedPendingExecutor as Cr, environmentReader as Ct, isTraceAnalysisStore as D, meterUsageEvent as Di, openSlotGroup as Dn, finalizeRuntimeOwnedPendingExecutor as Dr, prepareScopeRetainedOwnerTask as Dt, replaySpawnTree as E, createBudgetPool as Ei, createWorkerSlots as En, authoredProfileDigest as Er, consumeScopeRetainedOwnerResult as Et, recoverRetainedInteractiveRun as F, sandboxLeafOutputFromEvents as Fi, buildLoopOtelSpans as Fn, recordRuntimeOwnedProviderDispatchNotStarted as Fr, scopeRetainedOwnerRestorePoint as Ft, scopeOwnerExecutorNodeContext as G, extractLlmCallEvent as Gi, sanitizeKnowledgeReadinessReport as Gn, unknownMaterializationReceipt as Gr, materializeTreeView as Gt, noteScopeOwnerPlannedExecution as H, canonicalSandboxUsageMode as Hi, loopEventToOtelSpan as Hn, runtimeOwnedPendingExecutorMaterialization as Hr, scopeRetainedOwnerJournalRoot as Ht, startRetainedInteractiveRun as I, sandboxOutputMarker as Ii, buildLoopSpanNodes as In, recordRuntimeOwnedProviderIdentityConflict as Ir, noteScopeRetainedOwnerCoordination as It, providerVisibleProfile as J, sameModelId as Ji, captureBoundHarnessTranscript as Jn, isRuntimeFlowBrain as Jr, nestedDriverTreeRoot as Jt, coordinationMcpAlias as K, isSandboxTerminalEvent as Ki, sanitizeRuntimeStreamEvent as Kn, executableAgentProfileSnapshot as Kr, attestNestedDriverTreeOwner as Kt, FileSpawnJournal as L, sandboxProgressEvents as Li, buildRuntimeEventOtelSpans as Ln, recordRuntimeOwnedProviderModel as Lr, scopeRetainedOwnerCheckpointing as Lt, attachWorker as M, createSandboxToolPartState as Mi, createPropagatingTraceEmitter as Mn, providerAttemptEvidence as Mr, scopeRetainedOwnerTurnEnded as Mt, readWorkerInteractiveBinding as N, mapSandboxEvent as Ni, mergeTraceEnv as Nn, recordRuntimeOwnedDriveHarnessProviderEvidence as Nr, assertRetainedOwnerCoordinationRekey as Nt, parseWorkerToolTraceArtifact as O, newUsageTotals as Oi, resolveWorkerSlots as On, inheritRuntimeOwnedExecutorAttestation as Or, scopeRetainedOwnerPriorSpend as Ot, reconnectRetainedInteractiveRun as P, mapSandboxToolEvent as Pi, readTraceContextFromEnv as Pn, recordRuntimeOwnedProviderAttemptStart as Pr, reconcileScopeRetainedOwnerEnvironment as Pt, assertRecursiveReservationPolicy as Q, decodeHarnessUsage as Qi, harnessTranscriptUnavailable as Qn, runtimeFailureCause as Qr, closesCursorSlot as Qt, appendSpawnEvents as R, terminalTextFromSandboxEvent as Ri, createOpenInferenceFileExporter as Rn, runtimeOwnedDriveHarnessProviderEvidence as Rr, bindScopeRetainedOwnerEnvironmentId as Rt, writeWorkerSteer as S, executorFailure as Si, captureProviderWorkspaceSnapshot as Sn, attestRuntimeOwnedExecutor as Sr, scopeRetainedOwnerResourceReader as St, sumSpendFromEvents as T, isCredentialRefusal as Ti, workspaceCaptureReceipt as Tn, authoredAgentIdentity as Tr, abandonScopeRetainedOwnerInvocation as Tt, recordScopeOwnerMaterialization as U, createSandboxTurnEventCollector as Ui, createRuntimeEventCollector as Un, runtimeOwnedScopeOwnerRuntime as Ur, loadSpawnForest as Ut, finalizeScopeOwnerMaterialization as V, assertSandboxServedModel as Vi, generateSpanId as Vn, runtimeOwnedExecutorProviderEvidence as Vr, scopeRetainedOwnerContext as Vt, restoreScopeOwnerAcceptedExecution as W, createSandboxUsageLedger as Wi, createRuntimeStreamEventCollector as Wn, unknownExecutionBindingReceipt as Wr, ownedTreeRootSpawn as Wt, reenteredWorkers as X, sandboxTerminalUsageField as Xi, harnessTranscriptArtifact as Xn, runtimeFlowBrain as Xr, encodeResultBlob as Xt, runtimeGraphMetadataKey as Y, sandboxEventServedBackend as Yi, captureHarnessTranscript as Yn, runtimeFlowAgent as Yr, FileResultBlobStore as Yt, settledToIteration as Z, sumSandboxUsage as Zi, harnessTranscriptFromLines as Zn, reportedFailureCause as Zr, SpawnEventIndex as Zt, supervisorRunDir as _, unavailableSignalOfFailure as _i, destroyInteractiveEnvironment as _n, abortReason as _r, startScopeRecoveries as _t, readRootStream as a, freezeControlRef as aa, isProvisioningRefusal as ai, reconnectRetainedRun as an, DEFAULT_STALL_AFTER_MS as ar, hasRetriableTeardowns as at, workerInboxFileFromEventDir as b, contentAddress as bi, assertProviderWorkspaceRetentionPort as bn, signalAbortError as br, prepareScopeRetainedOwnerSeatSwitch as bt, cancelWorker as c, promptOptionsFromAgentTurnInput as ca, retainedExecutorContext as ci, startRetainedRunInEnvironment as cn, readWorkerProgress as cr, recordScopeOwnerBarrenPause as ct, legacySupervisorRunsRoot as d, UNAVAILABLE_STATUSES as di, offerInteractiveControl as dn, SeatChain as dr, registerNestedTeardownScope as dt, recordValue as ea, runtimeFailureRemediationSchema as ei, verifyWorkspaceMarker as en, readHarnessTranscript as er, freeSlots as et, readWorkerCancelRequests as f, cappedDoublingMs as fi, prepareInteractiveDelegation as fn, SeatChainExhaustedError as fr, releaseHeldEnvironments as ft, safeWorkerFile as g, unavailableSignalInText as gi, verifyObserverRecords as gn, RunCancellationReason as gr, settleManagerWork as gt, readWorkerSteerRequests as h, unavailableResumeAt as hi, observerRecordDigest as hn, subscriptionUsageLimitSignal as hr, retryUnconfirmedTeardowns as ht, nodeStreamFile as i, exactSession as ia, RetainedExecutionPendingError as ii, mintRetainedIdentity as in, retainHarnessTranscript as ir, closeScopeAdmission as it, interactiveAdmissionSeamKey as j, assertValidBudget as ji, workerTraceHeaders as jn, newExecutionAttemptId as jr, scopeRetainedOwnerSettled as jt, workerTraceAnalysisStore as k, spendFromUsageEvents as ki, WORKER_TRACE_PROPAGATION as kn, knownExecutionBindingReceipt as kr, scopeRetainedOwnerResult as kt, claimWorkerSteerDelivery as l, providerMessageText as la, retainedExecutorSeamKey as li, retainedCreateMaterial as ln, isLiveNodeStatus as lr, recordScopeOwnerDriverAttempt as lt, readWorkerSteerAcknowledgement as m, unavailablePauseMs as mi, createFileObserverHooks as mn, seatExecutionProfile as mr, releaseRetainedEnvironments as mt, ROOT_STREAM_FILE as n, assertEventBinding as na, settlementFailureCause as ni, stopRetainedNativeExecution as nn, readBoundHarnessSessions as nr, rollingDispatch as nt, readRootStreamReceipt as o, sameControlCoordinates as oa, isSchemaRejection as oi, recoverRetainedRun as on, createActivityLog as or, meterRuntimeOwnedAccounting as ot, readWorkerCancellation as p, jitteredMs as pi, FileObserverJournal as pn, authoredSeatStages as pr, releaseManagerEnvironment as pt, coordinationProfileToolPrefix as q, notifySandboxEventObserver as qi, HARNESS_TRANSCRIPT_SETTLE_TIMEOUT_MS as qn, executableAgentSpecSnapshot as qr, driverRuntime as qt, createRootStreamSink as r, awaitAbortable$1 as ra, DISPATCH_NOT_ADMITTED_CODE as ri, assertRetainedRunReplayMaterial as rn, resolveHarnessTranscriptCapture as rr, closeRetainedSlots as rt, appendWorkerControlEvent as s, promptFromAgentTurnInput as sa, registerRetainedExecutorPreparation as si, startRetainedRun as sn, describeToolArgs as sr, meterRuntimeOwnedProviderAttempt as st, createScope as t, RetainedRunProviderContractError as ta, runtimeProviderCode as ti, describeRetainedNativeStops as tn, HARNESS_TRANSCRIPT_READ_LIMITS as tr, queueOf as tt, legacySupervisorRunDir as u, UNAVAILABLE_CODES as ui, acceptedInteractiveControl as un, isTerminalNodeStatus as ur, recordScopeOwnerPause as ut, supervisorRunsRoot as v, TRACE_ROOT_SCHEMA as vi, environmentGone as vn, linkAbort as vr, unconfirmedTeardowns as vt, prepareScopeResume as w, credentialCommandExit as wi, openNativeMirror as wn, attestRuntimeOwnedScopeOwner as wr, resolveSpawnResourcePaths as wt, writeWorkerCancellation as x, contentRef as xi, captureProviderLiveWorkspace as xn, attestRuntimeOwnedDeferredExecutor as xr, releaseScopeRetainedOwnerForSeatPause as xt, workerCancellationsDir as y, TRACE_SUMMARY_SCHEMA as yi, DEFAULT_NATIVE_CAPTURE_INTERVAL_MS as yn, runAbortable as yr, waitForScopeChildren as yt, spawnJournalRecordEvents as z, canonicalStreamEventFromSandboxEvent as zi, createOtelExporter as zn, runtimeOwnedExecutorExecutionBinding as zr, bindScopeRetainedOwnerProvider as zt };
16808
16807
 
16809
- //# sourceMappingURL=scope-BKJ_SdfW.js.map
16808
+ //# sourceMappingURL=scope-B7AKskjP.js.map