@tangle-network/agent-runtime 10.0.10 → 10.0.12

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 (46) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/{activation-D9ENOWud.d.ts → activation-BmdINnh5.d.ts} +12 -4
  3. package/dist/{activation-s2z6kO2P.js → activation-zUNFNlNv.js} +2 -2
  4. package/dist/{activation-s2z6kO2P.js.map → activation-zUNFNlNv.js.map} +1 -1
  5. package/dist/agent.js +2 -2
  6. package/dist/{delegate-4KpqPGv3.js → delegate--YvqtF0p.js} +2 -2
  7. package/dist/{delegate-4KpqPGv3.js.map → delegate--YvqtF0p.js.map} +1 -1
  8. package/dist/{driver-control-acknowledgers-Bnbn34Mp.js → driver-control-acknowledgers-o88fvQcq.js} +2 -2
  9. package/dist/{driver-control-acknowledgers-Bnbn34Mp.js.map → driver-control-acknowledgers-o88fvQcq.js.map} +1 -1
  10. package/dist/durable.js +4 -4
  11. package/dist/{graph-CDZWVNys.js → graph-5b9UtR5E.js} +4 -4
  12. package/dist/{graph-CDZWVNys.js.map → graph-5b9UtR5E.js.map} +1 -1
  13. package/dist/{improve-D_HT75pe.js → improve-DNO2U69i.js} +40 -14
  14. package/dist/{improve-D_HT75pe.js.map → improve-DNO2U69i.js.map} +1 -1
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +8 -8
  17. package/dist/intelligence.d.ts +1 -1
  18. package/dist/intelligence.js +3 -3
  19. package/dist/kernel.js +10 -10
  20. package/dist/{loop-runner-C_ruSZRz.js → loop-runner-D-oI6FUI.js} +2 -2
  21. package/dist/{loop-runner-C_ruSZRz.js.map → loop-runner-D-oI6FUI.js.map} +1 -1
  22. package/dist/loop-runner-bin.js +1 -1
  23. package/dist/mcp/bin.js +2 -2
  24. package/dist/mcp/index.js +4 -4
  25. package/dist/{provision-supervisor-Cv5X_ITd.js → provision-supervisor-C_sePBrX.js} +3 -3
  26. package/dist/{provision-supervisor-Cv5X_ITd.js.map → provision-supervisor-C_sePBrX.js.map} +1 -1
  27. package/dist/{run-state-BWWardB0.js → run-state-BjM79-9H.js} +2 -2
  28. package/dist/{run-state-BWWardB0.js.map → run-state-BjM79-9H.js.map} +1 -1
  29. package/dist/{runtime-vv3D3bx6.js → runtime-C4hWti_g.js} +10 -10
  30. package/dist/{runtime-vv3D3bx6.js.map → runtime-C4hWti_g.js.map} +1 -1
  31. package/dist/{search-executor-C-kp1eg-.js → search-executor-B_xLH8Yq.js} +2 -2
  32. package/dist/{search-executor-C-kp1eg-.js.map → search-executor-B_xLH8Yq.js.map} +1 -1
  33. package/dist/{server-CqADHr2f.js → server-BzBOnewO.js} +2 -2
  34. package/dist/{server-CqADHr2f.js.map → server-BzBOnewO.js.map} +1 -1
  35. package/dist/{structural-rollout-Ct_uQtGw.js → structural-rollout-mKdhfxlJ.js} +20 -4
  36. package/dist/structural-rollout-mKdhfxlJ.js.map +1 -0
  37. package/dist/{supervise-CRz9bjPA.js → supervise-C-mQSV-1.js} +6 -4
  38. package/dist/supervise-C-mQSV-1.js.map +1 -0
  39. package/dist/{supervisor-B9A_Cnxo.js → supervisor-1csecp8d.js} +31 -8
  40. package/dist/supervisor-1csecp8d.js.map +1 -0
  41. package/dist/testing.js +11 -11
  42. package/dist/tui/index.js +1 -1
  43. package/package.json +1 -1
  44. package/dist/structural-rollout-Ct_uQtGw.js.map +0 -1
  45. package/dist/supervise-CRz9bjPA.js.map +0 -1
  46. package/dist/supervisor-B9A_Cnxo.js.map +0 -1
@@ -8146,9 +8146,9 @@ var RetainedObservation = class {
8146
8146
  let firstFailure;
8147
8147
  while (true) {
8148
8148
  this.lastObservedAt = Date.now();
8149
- if ((yield* this.drain(session, replayedFrom ?? this.resumedFrom)) || this.sawTerminal) break;
8149
+ if ((yield* this.drain(session, replayedFrom)) || this.sawTerminal) break;
8150
8150
  firstFailure ??= this.failure;
8151
- if (!await this.restart.retry(this.failure?.error) && (this.lastReplayPosition === void 0 || this.lastReplayPosition === replayedFrom)) {
8151
+ if (!await this.restart.retry(this.failure?.error) && !this.canReplayAfter(replayedFrom)) {
8152
8152
  this.failure = firstFailure;
8153
8153
  break;
8154
8154
  }
@@ -8165,6 +8165,9 @@ var RetainedObservation = class {
8165
8165
  while (!await this.exactOrQuiet()) await this.stopQuietObservation();
8166
8166
  yield await this.resultFrame();
8167
8167
  }
8168
+ canReplayAfter(replayedFrom) {
8169
+ return this.lastReplayPosition !== void 0 && this.lastReplayPosition !== replayedFrom;
8170
+ }
8168
8171
  exactOrQuiet() {
8169
8172
  let unwatch = [() => {}];
8170
8173
  return new Promise((resolve) => {
@@ -8350,8 +8353,9 @@ var RetainedObservation = class {
8350
8353
  this.readExactResult();
8351
8354
  return true;
8352
8355
  }
8353
- async *drain(session, since) {
8356
+ async *drain(session, replayedFrom) {
8354
8357
  const subscription = linkAbort(this.signal);
8358
+ const since = replayedFrom ?? this.resumedFrom;
8355
8359
  let iterator;
8356
8360
  try {
8357
8361
  iterator = session.events({
@@ -8382,7 +8386,15 @@ var RetainedObservation = class {
8382
8386
  return false;
8383
8387
  }
8384
8388
  if (observed.kind === "quiet") {
8385
- if (this.silenceHandledAt === void 0) yield this.awaitingResult(this.lastObservedAt);
8389
+ const awaiting = this.silenceHandledAt !== void 0;
8390
+ if (!awaiting) {
8391
+ yield this.awaitingResult(this.lastObservedAt);
8392
+ this.lastObservedAt = Date.now();
8393
+ }
8394
+ if (!this.canReplayAfter(replayedFrom)) {
8395
+ if (awaiting) await this.stopQuietObservation();
8396
+ continue;
8397
+ }
8386
8398
  this.failure ??= { error: streamFailure("retained provider stream stalled before its exact result") };
8387
8399
  return false;
8388
8400
  }
@@ -10689,9 +10701,19 @@ function chatCompletionBody(cfg, messages, opts) {
10689
10701
  ...maxTokens !== void 0 ? { max_tokens: maxTokens } : {},
10690
10702
  ...maxCompletionTokens !== void 0 ? { max_completion_tokens: maxCompletionTokens } : {},
10691
10703
  ...opts?.seed !== void 0 ? { seed: opts.seed } : {},
10692
- ...opts?.reasoningEffort ? { reasoning_effort: opts.reasoningEffort } : {}
10704
+ ...opts?.reasoningEffort ? { reasoning_effort: opts.reasoningEffort } : {},
10705
+ ...explicitNoneToolChoice(opts?.toolChoice) ? { tool_choice: "none" } : {}
10693
10706
  };
10694
10707
  }
10708
+ /**
10709
+ * The only `tool_choice` a no-tool completion can carry: an explicit `none`. `auto` and
10710
+ * `required` name tool-selection behavior, so they are refused here rather than silently
10711
+ * omitted — a caller that asked for them must learn the request will not carry them.
10712
+ */
10713
+ function explicitNoneToolChoice(toolChoice) {
10714
+ if (toolChoice === void 0 || toolChoice === "none") return toolChoice === "none";
10715
+ throw new ValidationError$1(`chatCompletionBody: toolChoice ${JSON.stringify(toolChoice)} is not carryable without tools; only "none" is`);
10716
+ }
10695
10717
  /** The OpenAI-shape request body both tool-calling transports send. One builder so the streamed
10696
10718
  * turn cannot drift from the buffered one on model, temperature, tool_choice, or the ceiling. */
10697
10719
  function toolCompletionBody(cfg, messages, tools, opts) {
@@ -10718,7 +10740,7 @@ function toolCompletionBody(cfg, messages, tools, opts) {
10718
10740
  function: fn
10719
10741
  })),
10720
10742
  tool_choice: opts?.toolChoice ?? "auto"
10721
- } : {},
10743
+ } : opts?.toolChoice === "none" ? { tool_choice: "none" } : {},
10722
10744
  ...opts?.temperature !== void 0 ? { temperature: opts.temperature } : {},
10723
10745
  ...opts?.maxTokens ? { max_tokens: opts.maxTokens } : {},
10724
10746
  ...maxCompletionTokens !== void 0 ? { max_completion_tokens: maxCompletionTokens } : {},
@@ -11384,7 +11406,7 @@ function routerProfileExecution(profile, seam, mode) {
11384
11406
  if (settings.stream === true && seam.complete !== void 0) throw new ValidationError$1("routerInlineExecutor: AgentProfile.model.metadata.stream requires the HTTP Router transport; RouterSeam.complete returns one buffered completion and cannot serve a stream");
11385
11407
  const declaredTools = profile.tools ?? {};
11386
11408
  const suppliedTools = seam.tools ?? [];
11387
- if (settings.toolChoice !== void 0 && suppliedTools.length === 0) throw new ValidationError$1("routerInlineExecutor: AgentProfile.model.metadata.toolChoice requires at least one enabled tool");
11409
+ if (settings.toolChoice !== void 0 && settings.toolChoice !== "none" && suppliedTools.length === 0) throw new ValidationError$1("routerInlineExecutor: AgentProfile.model.metadata.toolChoice must be \"none\" to run without enabled tools; auto and required select among tools");
11388
11410
  const suppliedNames = /* @__PURE__ */ new Set();
11389
11411
  for (const tool of suppliedTools) {
11390
11412
  const name = tool.function.name;
@@ -11608,6 +11630,7 @@ const routerInlineExecutor = (spec, ctx) => {
11608
11630
  }) : (profileExecution.stream === true ? streamRouterChatWithUsage : routerChatWithUsage)(routerTransportConfig(seam, model, profileExecution.retry), messages, {
11609
11631
  ...profileExecution.temperature !== void 0 ? { temperature: profileExecution.temperature } : {},
11610
11632
  ...linked ? { signal: linked } : {},
11633
+ ...profileExecution.toolChoice === "none" ? { toolChoice: "none" } : {},
11611
11634
  ...routerGenerationOptions(profileExecution),
11612
11635
  ...requestIdentity
11613
11636
  })));
@@ -16625,4 +16648,4 @@ async function noWinner(settled, rejection) {
16625
16648
  }
16626
16649
  export { failPendingAfter as $, worktreeCliProfileMaterialization as $t, readPromptOptions as A, readCodexRolloutSession as At, toolResultText as B, terminateProcessTreeAndConfirm as Bt, captureReusableExecutorConfig as C, bridgeAdmissionRefusal as Ct, createSteerableSandboxSession as D, addHarnessUsage as Dt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as E, ROUTER_PRICE_SOURCE as Et, defaultSelectWinner as F, defaultRunCommand as Ft, providerAsExecutor as G, fullProfileMaterialization as Gt, routerBrain as H, assertProfileMaterializes as Ht, codeModeArguments as I, runSettledCommand as It, providerAsSandboxClient as J, promptModelProfileMaterialization as Jt, providerOutputOptions as K, profileMaterializationAxes$1 as Kt, codeModeModelOutput as L, runWorktreeHarness as Lt, createSandboxLineage as M, bridgeRuntimeAttachmentsKey as Mt, acquireSandbox as N, bridgeRuntimeEnvKey as Nt, runAgentRounds as O, createCodexRolloutStoreReader as Ot, TERMINAL_DECISIONS as P, bridgeStopSignalKey as Pt, createInbox as Q, unsupportedProfileDimensions as Qt, createCodeModeTools as R, LOCAL_HARNESSES as Rt, bindReusableExecutorExecutionId as S, verdictFromJudgeScore as St, snapshotExecutorConfig as T, priceTokens as Tt, createAgentEnvironmentProviderRegistry as U, controlProfileMaterialization as Ut, createRouterTranscript as V, assertProfileMaterialization as Vt, resolveAgentEnvironmentProvider as W, defineProfileMaterializationContract as Wt, createInPlaceCliExecutor as X, sandboxActProfileMaterialization as Xt, createWorktreeCliExecutor as Y, renderUnsupported as Yt, INBOX_RECEIPT_KEY as Z, sandboxProfileMaterialization as Zt, isDriverSpec as _, preflightPublicCoordination as _t, awaitRootWake as a, isPeerMailEnvelope as at, InMemorySpawnJournal as b, gateOnDeliverable as bt, readRunParking as c, taskToPrompt$1 as ct, bestDelivered as d, abandonablePending as dt, projectSandboxOutcome as en, AUTHORITY_MARKERS as et, runFinalizer as f, classifyDriverFailure as ft, driverExecutorFactory as g, upstreamUnavailableSignal as gt, driverChild as h, undispatchedCredentialExit as ht, assertRunParking as i, createPeerMailbox as it, createSandboxForSpec as j, createPushTraceSource as jt, assertBoxlessPromptOptions as k, harnessUsageIsEmpty as kt, sleepScopeWait as l, DriverAttemptsExhaustedError as lt, createRootHandle as m, transientFailureKind as mt, createSupervisor as n, PEER_MAIL_WIRE_KEY as nt, bindScopeParkingDrain as o, peerMailTools as ot, runTree as p, summarizeDriverAttempts as pt, LEAF_CONTINUATION_TASK as q, promptControlProfileMaterialization as qt, RunParkedError as r, claimsAuthority as rt, isRunParked as s, peerMailVerbNames as st, DEFAULT_MAX_DEPTH as t, readSandboxOutcome as tn, DEFAULT_PEER_MAIL_LIMITS as tt, withRunParking as u, HarnessTurnFailedError as ut, withDriverExecutor as v, CheckUnavailableError as vt, createExecutor as w, bridgeModelRouteRefusal as wt, createExecutorRegistry as x, mapExecutorResult as xt, InMemoryResultBlobStore as y, gateFactoryOnDeliverable as yt, runCodeMode as z, harnessInvocation as zt };
16627
16650
 
16628
- //# sourceMappingURL=supervisor-B9A_Cnxo.js.map
16651
+ //# sourceMappingURL=supervisor-1csecp8d.js.map