@tangle-network/agent-runtime 0.132.4 → 0.132.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 (36) hide show
  1. package/README.md +2 -2
  2. package/dist/{activation-DFJBEC62.js → activation-Djhlt6gA.js} +2 -2
  3. package/dist/{activation-DFJBEC62.js.map → activation-Djhlt6gA.js.map} +1 -1
  4. package/dist/agent.js +2 -2
  5. package/dist/{authoring-WS1l0lU1.js → authoring-4Yyp4Get.js} +2 -2
  6. package/dist/{authoring-WS1l0lU1.js.map → authoring-4Yyp4Get.js.map} +1 -1
  7. package/dist/{graph-B9hFN-zX.js → graph-C-2FjZYl.js} +2 -2
  8. package/dist/{graph-B9hFN-zX.js.map → graph-C-2FjZYl.js.map} +1 -1
  9. package/dist/{improvement-cycle-DgZtiPDT.js → improvement-cycle-CcNYXtV3.js} +3 -3
  10. package/dist/{improvement-cycle-DgZtiPDT.js.map → improvement-cycle-CcNYXtV3.js.map} +1 -1
  11. package/dist/index.js +8 -8
  12. package/dist/index.js.map +1 -1
  13. package/dist/intelligence.js +3 -3
  14. package/dist/kernel.js +6 -6
  15. package/dist/{knowledge-By_lZ80W.js → knowledge-DHC3bfYP.js} +3 -3
  16. package/dist/{knowledge-By_lZ80W.js.map → knowledge-DHC3bfYP.js.map} +1 -1
  17. package/dist/knowledge.js +1 -1
  18. package/dist/{loop-runner-bin-CjsTZUVS.js → loop-runner-bin-BDKC-Pfw.js} +3 -3
  19. package/dist/{loop-runner-bin-CjsTZUVS.js.map → loop-runner-bin-BDKC-Pfw.js.map} +1 -1
  20. package/dist/loop-runner-bin.js +1 -1
  21. package/dist/mcp/bin.js +3 -3
  22. package/dist/mcp/index.js +4 -4
  23. package/dist/{openai-tools-BATxru3h.js → openai-tools-DWfAhx1n.js} +2 -2
  24. package/dist/{openai-tools-BATxru3h.js.map → openai-tools-DWfAhx1n.js.map} +1 -1
  25. package/dist/{runtime-YuPbrgG1.js → runtime-B3Ty5dJP.js} +6 -6
  26. package/dist/{runtime-YuPbrgG1.js.map → runtime-B3Ty5dJP.js.map} +1 -1
  27. package/dist/{structural-rollout-Dq0j-JHl.js → structural-rollout-lRYq5ra9.js} +16 -7
  28. package/dist/structural-rollout-lRYq5ra9.js.map +1 -0
  29. package/dist/{supervise-BDj-uFfb.js → supervise-CxYIRLFa.js} +2 -2
  30. package/dist/{supervise-BDj-uFfb.js.map → supervise-CxYIRLFa.js.map} +1 -1
  31. package/dist/{supervisor-DlVTwwJb.js → supervisor-CRYhRmN7.js} +34 -4
  32. package/dist/supervisor-CRYhRmN7.js.map +1 -0
  33. package/dist/testing.js +11 -11
  34. package/package.json +4 -4
  35. package/dist/structural-rollout-Dq0j-JHl.js.map +0 -1
  36. package/dist/supervisor-DlVTwwJb.js.map +0 -1
@@ -6453,7 +6453,12 @@ const routerToolsInlineExecutor = (spec, ctx) => {
6453
6453
  });
6454
6454
  };
6455
6455
  function assertObservedRouterModel(observed, expected, context) {
6456
- if (observed !== void 0 && observed !== expected) throw new ValidationError(`${context}: provider reported model ${JSON.stringify(observed)} but AgentProfile requires ${JSON.stringify(expected)}`);
6456
+ if (observed !== void 0 && !observedRouterModelMatches(observed, expected)) throw new ValidationError(`${context}: provider reported model ${JSON.stringify(observed)} but AgentProfile requires ${JSON.stringify(expected)}`);
6457
+ }
6458
+ function observedRouterModelMatches(observed, expected) {
6459
+ if (observed === expected) return true;
6460
+ const suffix = observed.startsWith(`${expected}@`) ? observed.slice(expected.length + 1) : "";
6461
+ return suffix.length > 0 && /^[A-Za-z0-9._-]+$/u.test(suffix);
6457
6462
  }
6458
6463
  function routerRequestIdentity(ctx) {
6459
6464
  const correlation = ctx.node?.identity?.correlation;
@@ -7146,6 +7151,8 @@ async function* streamBridgeSession(args) {
7146
7151
  let turns = 0;
7147
7152
  let transportAttempts = 0;
7148
7153
  let lastText = "";
7154
+ let observedModel;
7155
+ let observedSystemFingerprint;
7149
7156
  const toolCalls = [];
7150
7157
  const promptCache = {};
7151
7158
  let nextPrompt = taskToPrompt(args.task);
@@ -7224,6 +7231,11 @@ async function* streamBridgeSession(args) {
7224
7231
  maxReconnects: args.maxReconnects,
7225
7232
  traceHeaders: args.traceHeaders
7226
7233
  })) {
7234
+ if (chunk.model !== void 0) observedModel = mergeBridgeObservedModel(observedModel, chunk.model);
7235
+ if (chunk.systemFingerprint !== void 0) {
7236
+ if (observedSystemFingerprint !== void 0 && observedSystemFingerprint !== chunk.systemFingerprint) throw new ValidationError(`bridgeExecutor: bridge changed system fingerprint from ${JSON.stringify(observedSystemFingerprint)} to ${JSON.stringify(chunk.systemFingerprint)}`);
7237
+ observedSystemFingerprint = chunk.systemFingerprint;
7238
+ }
7227
7239
  if (chunk.content) turnText += chunk.content;
7228
7240
  for (const step of chunk.toolCalls ?? []) {
7229
7241
  toolCalls.push(step.toolName);
@@ -7322,7 +7334,8 @@ async function* streamBridgeSession(args) {
7322
7334
  };
7323
7335
  const out = {
7324
7336
  content: lastText,
7325
- model: seam.model,
7337
+ model: observedModel ?? seam.model,
7338
+ ...observedSystemFingerprint ? { system_fingerprint: observedSystemFingerprint } : {},
7326
7339
  toolCalls,
7327
7340
  transportAttempts,
7328
7341
  ...Object.keys(promptCache).length > 0 ? { promptCache } : {},
@@ -7330,7 +7343,7 @@ async function* streamBridgeSession(args) {
7330
7343
  };
7331
7344
  args.onArtifact({
7332
7345
  outRef: contentRef("bridge", {
7333
- model: seam.model,
7346
+ model: observedModel ?? seam.model,
7334
7347
  session: args.sessionId,
7335
7348
  content: lastText
7336
7349
  }),
@@ -7621,6 +7634,15 @@ async function cancelBridgeRunToTerminal(seam, run, grace, stopSignal) {
7621
7634
  function errorMessage(error) {
7622
7635
  return error instanceof Error ? error.message : String(error);
7623
7636
  }
7637
+ function mergeBridgeObservedModel(current, next) {
7638
+ if (current === void 0 || current === next) return next;
7639
+ if (bridgeModelIdentityBase(current) !== bridgeModelIdentityBase(next)) throw new ValidationError(`bridgeExecutor: bridge changed response model from ${JSON.stringify(current)} to ${JSON.stringify(next)}`);
7640
+ return current.includes("@") ? current : next;
7641
+ }
7642
+ function bridgeModelIdentityBase(model) {
7643
+ const at = model.lastIndexOf("@");
7644
+ return at > 0 ? model.slice(0, at) : model;
7645
+ }
7624
7646
  function assertBridgeProfileMaterialization(value, profile, wireModel) {
7625
7647
  if (!value || typeof value !== "object" || Array.isArray(value)) throw new ValidationError("bridgeExecutor: profile materialization receipt must be an object");
7626
7648
  const raw = value;
@@ -7949,6 +7971,14 @@ function parseSseFrame(frame) {
7949
7971
  error: new BackendTransportError("bridge", `bridgeExecutor: bridge stream error: ${parsed.error.message ?? parsed.error.type ?? "unknown"}`)
7950
7972
  };
7951
7973
  const out = {};
7974
+ if (parsed.model !== void 0) {
7975
+ if (typeof parsed.model !== "string" || parsed.model.length === 0) throw new ValidationError("bridgeExecutor: bridge response model must be a non-empty string");
7976
+ out.model = parsed.model;
7977
+ }
7978
+ if (parsed.system_fingerprint !== void 0) {
7979
+ if (typeof parsed.system_fingerprint !== "string" || parsed.system_fingerprint.length === 0) throw new ValidationError("bridgeExecutor: bridge system_fingerprint must be a non-empty string");
7980
+ out.systemFingerprint = parsed.system_fingerprint;
7981
+ }
7952
7982
  const choice = parsed.choices?.[0];
7953
7983
  const content = choice?.delta?.content ?? choice?.message?.content;
7954
7984
  if (typeof content === "string" && content.length > 0) out.content = content;
@@ -12136,4 +12166,4 @@ function isNonEmptySpend(s) {
12136
12166
  //#endregion
12137
12167
  export { runAgentRounds as $, bindReusableExecutorExecutionId as A, createWorktree as At, workerTraceHeaders as B, controlProfileMaterialization as Bt, queueOf as C, createRuntimeStreamEventCollector as Ct, assertValidBudget as D, runSettledCommand as Dt, teardownExecutor as E, sanitizeRuntimeStreamEvent as Et, snapshotExecutorConfig as F, localHarnessExecutable as Ft, decodeToolPart as G, promptModelProfileMaterialization as Gt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as H, fullProfileMaterialization as Ht, createWorktreeCliExecutor as I, parseCodexTokenUsage as It, createActivityLog as J, renderProfileMaterializationIssues as Jt, sandboxSessionTraceSource as K, promptOnlyProfileMaterialization as Kt, WORKER_TRACE_PROPAGATION as L, CodexExecutionDiagnosticError as Lt, cliWorktreeExecutor as M, DEFAULT_LOCAL_HARNESS as Mt, createExecutor as N, LOCAL_HARNESSES as Nt, createBudgetPool as O, runWorktreeHarness as Ot, createExecutorRegistry as P, harnessSupportsReasoningEffort as Pt, defaultSelectWinner as Q, readWorkerTraceContext as R, AGENT_PROFILE_MATERIALIZATION_AXES as Rt, freeSlots as S, createRuntimeEventCollector as St, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as T, sanitizeKnowledgeReadinessReport as Tt, createSteerableSandboxSession as U, profileMaterializationAxes$1 as Ut, workerTraceSeamKey as V, defineProfileMaterializationContract as Vt, createPushTraceSource as W, promptControlProfileMaterialization as Wt, createInbox as X, validateProfileMaterialization as Xt, readWorkerProgress as Y, sandboxActProfileMaterialization as Yt, createSandboxForSpec as Z, worktreeCliProfileMaterialization as Zt, pollFor as _, generateSpanId as _t, pickBestDelivered as a, createPropagatingTraceEmitter as at, waitUntil as b, padTraceId as bt, driverChild as c, traceContextToEnv as ct, deriveNodeExecutionIdentity as d, buildLoopSpanNodes as dt, createSandboxLineage as et, recordScopeOwnerMaterialization as f, buildRuntimeEventOtelSpans as ft, isWaitOutcome as g, flatOtelSpan as gt, createWaitProbes as h, exportEvalRuns as ht, collectDelivered as i, runBrainLoop as it, captureReusableExecutorConfig as j, removeWorktree as jt, spendFromUsageEvents as k, captureWorktreeDiff as kt, withDriverExecutor as l, INTELLIGENCE_WIRE_VERSION as lt, settledToIteration as m, createOtelExporter as mt, createSupervisor as n, acquireSandbox as nt, runFinalizer as o, mergeTraceEnv as ot, scopeOwnerExecutorNodeContext as p, createOpenInferenceFileExporter as pt, DEFAULT_STALL_AFTER_MS as q, promptResourceProfileMaterialization as qt, bestDelivered as r, routerBrain as rt, runTree as s, readTraceContextFromEnv as st, createRootHandle as t, probeSandboxCapabilities as tt, createScope as u, buildLoopOtelSpans as ut, timerAt as v, loopEventToOtelSpan as vt, rollingDispatch as w, sanitizeAgentRuntimeEvent as wt, effectiveConcurrency as x, toOtelAttributes as xt, validateWaitSpec as y, padSpanId as yt, workerTraceEnv as z, assertProfileMaterialization as zt };
12138
12168
 
12139
- //# sourceMappingURL=supervisor-DlVTwwJb.js.map
12169
+ //# sourceMappingURL=supervisor-CRYhRmN7.js.map