@tangle-network/agent-runtime 0.133.3 → 0.133.5

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 (37) hide show
  1. package/dist/{activation-WLt7Dmfv.js → activation-CeZdt1R3.js} +2 -2
  2. package/dist/{activation-WLt7Dmfv.js.map → activation-CeZdt1R3.js.map} +1 -1
  3. package/dist/agent.js +2 -2
  4. package/dist/{authoring-BmzFs-eQ.js → authoring-Cbz3BYqD.js} +2 -2
  5. package/dist/{authoring-BmzFs-eQ.js.map → authoring-Cbz3BYqD.js.map} +1 -1
  6. package/dist/{environment-provider-mDsjfGjY.js → environment-provider-DTJA4ZiM.js} +10 -5
  7. package/dist/{environment-provider-mDsjfGjY.js.map → environment-provider-DTJA4ZiM.js.map} +1 -1
  8. package/dist/environment-provider.js +1 -1
  9. package/dist/{graph-Ck6Lm5XP.js → graph-BcwxFLW_.js} +2 -2
  10. package/dist/{graph-Ck6Lm5XP.js.map → graph-BcwxFLW_.js.map} +1 -1
  11. package/dist/{improvement-cycle-ClbcuXvP.js → improvement-cycle-CXY8XmhV.js} +3 -3
  12. package/dist/{improvement-cycle-ClbcuXvP.js.map → improvement-cycle-CXY8XmhV.js.map} +1 -1
  13. package/dist/index.js +7 -7
  14. package/dist/intelligence.js +4 -4
  15. package/dist/kernel.js +7 -7
  16. package/dist/{knowledge-jGnr0Fpn.js → knowledge-vEyPvtRm.js} +3 -3
  17. package/dist/{knowledge-jGnr0Fpn.js.map → knowledge-vEyPvtRm.js.map} +1 -1
  18. package/dist/knowledge.js +1 -1
  19. package/dist/{loop-runner-bin-SvKBQeUG.js → loop-runner-bin-BrF0g950.js} +3 -3
  20. package/dist/{loop-runner-bin-SvKBQeUG.js.map → loop-runner-bin-BrF0g950.js.map} +1 -1
  21. package/dist/loop-runner-bin.js +1 -1
  22. package/dist/mcp/bin.js +3 -3
  23. package/dist/mcp/index.js +4 -4
  24. package/dist/{openai-tools-Sh1Q_4vy.js → openai-tools-BEeoh5i0.js} +2 -2
  25. package/dist/{openai-tools-Sh1Q_4vy.js.map → openai-tools-BEeoh5i0.js.map} +1 -1
  26. package/dist/{runtime-BdtZvPzb.js → runtime-BX5c47Qm.js} +7 -7
  27. package/dist/{runtime-BdtZvPzb.js.map → runtime-BX5c47Qm.js.map} +1 -1
  28. package/dist/{structural-rollout-BfOB1pIb.js → structural-rollout-CHq3qJau.js} +2 -2
  29. package/dist/{structural-rollout-BfOB1pIb.js.map → structural-rollout-CHq3qJau.js.map} +1 -1
  30. package/dist/{supervise-DG11q6jc.js → supervise-D-e9RIuG.js} +35 -6
  31. package/dist/supervise-D-e9RIuG.js.map +1 -0
  32. package/dist/{supervisor-D8sBmGYd.js → supervisor-GBIOnjUo.js} +25 -15
  33. package/dist/supervisor-GBIOnjUo.js.map +1 -0
  34. package/dist/testing.js +11 -11
  35. package/package.json +1 -1
  36. package/dist/supervise-DG11q6jc.js.map +0 -1
  37. package/dist/supervisor-D8sBmGYd.js.map +0 -1
@@ -5,7 +5,7 @@ import { c as randomUuid, d as throwAbort, f as throwIfAborted, l as sleep, m as
5
5
  import { a as notifySandboxEventObserver, n as extractLlmCallEvent } from "./sandbox-events-vIwmuPdl.js";
6
6
  import { a as concreteProfileModel, l as resolveRouterRetryPolicy, o as profileBridgeWireModel, s as profileModelExecutionSettings, t as assertExecutableAgentProfile, u as agentHarness } from "./model-policy-Bv1DU2fw.js";
7
7
  import { C as unknownMaterializationReceipt, S as unknownExecutionBindingReceipt, T as executableAgentSpecSnapshot, _ as runtimeOwnedExecutorExecutionBinding, a as authoredProfileDigest, b as runtimeOwnedPendingExecutorMaterialization, c as knownExecutionBindingReceipt, f as recordRuntimeOwnedProviderAttemptStart, h as runtimeOwnedDeferredExecutorRuntime, l as knownMaterializationReceipt, m as recordRuntimeOwnedProviderModel, n as attestRuntimeOwnedExecutor, o as finalizeRuntimeOwnedPendingExecutor, p as recordRuntimeOwnedProviderIdentityConflict, r as attestRuntimeOwnedPendingExecutor, t as attestRuntimeOwnedDeferredExecutor, u as newExecutionAttemptId, v as runtimeOwnedExecutorMaterialization, w as executableAgentProfileSnapshot, x as runtimeOwnedScopeOwnerRuntime, y as runtimeOwnedExecutorProviderEvidence } from "./materialization-D2bdTfkK.js";
8
- import { i as resolveAgentEnvironmentProvider, n as providerAsExecutor, r as providerAsSandboxClient } from "./environment-provider-mDsjfGjY.js";
8
+ import { i as resolveAgentEnvironmentProvider, n as providerAsExecutor, r as providerAsSandboxClient } from "./environment-provider-DTJA4ZiM.js";
9
9
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-C7iJOWm3.js";
10
10
  import { estimateCost, isModelPriced } from "@tangle-network/agent-eval";
11
11
  import { AGENT_PROFILE_MATERIALIZATION_AXES, REASONING_EFFORTS, agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, profileMaterializationAxes, profileMaterializationAxes as profileMaterializationAxes$1, sha256DigestSchema } from "@tangle-network/agent-interface";
@@ -6206,7 +6206,7 @@ const routerInlineExecutor = (spec, ctx) => {
6206
6206
  return artifact;
6207
6207
  },
6208
6208
  teardown(_grace) {
6209
- controller.abort();
6209
+ controller.abort("executor torn down");
6210
6210
  return Promise.resolve({ destroyed: true });
6211
6211
  },
6212
6212
  resultArtifact() {
@@ -6530,7 +6530,7 @@ const routerToolsInlineExecutor = (spec, ctx) => {
6530
6530
  return artifact;
6531
6531
  },
6532
6532
  teardown(_grace) {
6533
- controller.abort();
6533
+ controller.abort("executor torn down");
6534
6534
  return Promise.resolve({ destroyed: true });
6535
6535
  },
6536
6536
  resultArtifact() {
@@ -6734,11 +6734,12 @@ const sandboxExecutor = (spec, ctx) => {
6734
6734
  };
6735
6735
  async function* streamSandboxLeaf(args) {
6736
6736
  const linked = new AbortController();
6737
- const cascade = () => linked.abort();
6738
- if (args.signal.aborted || args.controller.signal.aborted) linked.abort();
6737
+ const cascadeExternal = () => linked.abort(abortReasonOf(args.signal));
6738
+ const cascadeScope = () => linked.abort(abortReasonOf(args.controller.signal));
6739
+ if (args.signal.aborted || args.controller.signal.aborted) linked.abort(abortReasonOf(args.signal.aborted ? args.signal : args.controller.signal));
6739
6740
  else {
6740
- args.signal.addEventListener("abort", cascade, { once: true });
6741
- args.controller.signal.addEventListener("abort", cascade, { once: true });
6741
+ args.signal.addEventListener("abort", cascadeExternal, { once: true });
6742
+ args.controller.signal.addEventListener("abort", cascadeScope, { once: true });
6742
6743
  }
6743
6744
  const agentRun = {
6744
6745
  profile: args.spec.profile,
@@ -6811,8 +6812,8 @@ async function* streamSandboxLeaf(args) {
6811
6812
  ...usdKnown ? {} : { usdKnown: false }
6812
6813
  };
6813
6814
  } finally {
6814
- args.signal.removeEventListener("abort", cascade);
6815
- args.controller.signal.removeEventListener("abort", cascade);
6815
+ args.signal.removeEventListener("abort", cascadeExternal);
6816
+ args.controller.signal.removeEventListener("abort", cascadeScope);
6816
6817
  }
6817
6818
  }
6818
6819
  /** The loop's own failure, when NO iteration produced an output: the first error it
@@ -8857,15 +8858,24 @@ function singleShotDriver(maxIterations) {
8857
8858
  function linkSignals(a, b) {
8858
8859
  if (a.aborted || b.aborted) {
8859
8860
  const c = new AbortController();
8860
- c.abort();
8861
+ c.abort(abortReasonOf(a.aborted ? a : b));
8861
8862
  return c.signal;
8862
8863
  }
8863
8864
  const c = new AbortController();
8864
- const onAbort = () => c.abort();
8865
- a.addEventListener("abort", onAbort, { once: true });
8866
- b.addEventListener("abort", onAbort, { once: true });
8865
+ a.addEventListener("abort", () => c.abort(abortReasonOf(a)), { once: true });
8866
+ b.addEventListener("abort", () => c.abort(abortReasonOf(b)), { once: true });
8867
8867
  return c.signal;
8868
8868
  }
8869
+ /** The reason a signal carries, or a named fallback. A cascade that drops the upstream reason
8870
+ * turns every downstream death into the generic "execution aborted": the worker's `down`
8871
+ * record then says nothing about WHY, which is what makes a whole class of child mortality
8872
+ * undiagnosable from the journal alone. */
8873
+ function abortReasonOf(signal, fallback = "aborted by parent scope") {
8874
+ const reason = signal.reason;
8875
+ if (typeof reason === "string" && reason.length > 0) return reason;
8876
+ if (reason instanceof Error && reason.name !== "AbortError" && reason.message.length > 0) return reason.message;
8877
+ return fallback;
8878
+ }
8869
8879
  /** Combine N abort signals into one that fires when ANY does. Node-portable (no `AbortSignal.any`,
8870
8880
  * which needs >=20.3 — the package floor is >=20). Module-exported (not package surface) so
8871
8881
  * sibling leaf executors share the one portable implementation. */
@@ -12111,7 +12121,7 @@ async function drainLiveChildren(scope, controller, settleGraceMs = 0) {
12111
12121
  if (settleGraceMs > 0 && !controller.signal.aborted) {
12112
12122
  graceTimer = setTimeout(() => controller.abort("root driver failed; child settle grace expired"), settleGraceMs);
12113
12123
  graceTimer.unref?.();
12114
- } else if (!controller.signal.aborted) controller.abort();
12124
+ } else if (!controller.signal.aborted) controller.abort("root driver failed; no child settle grace configured");
12115
12125
  try {
12116
12126
  await drainCursor(scope);
12117
12127
  } finally {
@@ -12350,4 +12360,4 @@ function isNonEmptySpend(s) {
12350
12360
  //#endregion
12351
12361
  export { defaultSelectWinner as $, validateProfileMaterialization as $t, spendFromUsageEvents as A, runSettledCommand as At, workerTraceEnv as B, CodexExecutionDiagnosticError as Bt, freeSlots as C, padTraceId as Ct, teardownExecutor as D, sanitizeAgentRuntimeEvent as Dt, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as E, createRuntimeStreamEventCollector as Et, createExecutorRegistry as F, DEFAULT_LOCAL_HARNESS as Ft, createPushTraceSource as G, fullProfileMaterialization as Gt, workerTraceSeamKey as H, assertProfileMaterialization as Ht, snapshotExecutorConfig as I, LOCAL_HARNESSES as It, DEFAULT_STALL_AFTER_MS as J, promptModelProfileMaterialization as Jt, decodeToolPart as K, profileMaterializationAxes$1 as Kt, createWorktreeCliExecutor as L, harnessSupportsReasoningEffort as Lt, captureReusableExecutorConfig as M, captureWorktreeDiff as Mt, cliWorktreeExecutor as N, createWorktree as Nt, assertValidBudget as O, sanitizeKnowledgeReadinessReport as Ot, createExecutor as P, removeWorktree as Pt, createSandboxForSpec as Q, sandboxActProfileMaterialization as Qt, WORKER_TRACE_PROPAGATION as R, localHarnessExecutable as Rt, effectiveConcurrency as S, padSpanId as St, rollingDispatch as T, createRuntimeEventCollector as Tt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as U, controlProfileMaterialization as Ut, workerTraceHeaders as V, AGENT_PROFILE_MATERIALIZATION_AXES as Vt, createSteerableSandboxSession as W, defineProfileMaterializationContract as Wt, readWorkerProgress as X, promptResourceProfileMaterialization as Xt, createActivityLog as Y, promptOnlyProfileMaterialization as Yt, createInbox as Z, renderProfileMaterializationIssues as Zt, isWaitOutcome as _, createOtelExporter as _t, pickBestDelivered as a, runBrainLoop as at, validateWaitSpec as b, generateSpanId as bt, driverChild as c, createPropagatingTraceEmitter as ct, deriveNodeExecutionIdentity as d, traceContextToEnv as dt, worktreeCliProfileMaterialization as en, runAgentRounds as et, meterRuntimeOwnedProviderAttempt as f, INTELLIGENCE_WIRE_VERSION as ft, createWaitProbes as g, createOpenInferenceFileExporter as gt, settledToIteration as h, buildRuntimeEventOtelSpans as ht, collectDelivered as i, routerBrain as it, bindReusableExecutorExecutionId as j, runWorktreeHarness as jt, createBudgetPool as k, sanitizeRuntimeStreamEvent as kt, withDriverExecutor as l, mergeTraceEnv as lt, scopeOwnerExecutorNodeContext as m, buildLoopSpanNodes as mt, createSupervisor as n, probeSandboxCapabilities as nt, runFinalizer as o, canonicalObservedModel as ot, recordScopeOwnerMaterialization as p, buildLoopOtelSpans as pt, sandboxSessionTraceSource as q, promptControlProfileMaterialization as qt, bestDelivered as r, acquireSandbox as rt, runTree as s, observedModelMatchesDeclared as st, createRootHandle as t, createSandboxLineage as tt, createScope as u, readTraceContextFromEnv as ut, pollFor as v, exportEvalRuns as vt, queueOf as w, toOtelAttributes as wt, waitUntil as x, loopEventToOtelSpan as xt, timerAt as y, flatOtelSpan as yt, readWorkerTraceContext as z, parseCodexTokenUsage as zt };
12352
12362
 
12353
- //# sourceMappingURL=supervisor-D8sBmGYd.js.map
12363
+ //# sourceMappingURL=supervisor-GBIOnjUo.js.map