@tangle-network/agent-runtime 0.131.2 → 0.131.4

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 (32) hide show
  1. package/dist/{activation-rl1Dx7jw.js → activation-Dj_M4QiT.js} +2 -2
  2. package/dist/{activation-rl1Dx7jw.js.map → activation-Dj_M4QiT.js.map} +1 -1
  3. package/dist/agent.js +2 -2
  4. package/dist/{authoring-f3ldLlMH.js → authoring-Bxlrj57J.js} +2 -2
  5. package/dist/{authoring-f3ldLlMH.js.map → authoring-Bxlrj57J.js.map} +1 -1
  6. package/dist/{graph-Cavjt5PV.js → graph-2jIp3YIw.js} +2 -2
  7. package/dist/{graph-Cavjt5PV.js.map → graph-2jIp3YIw.js.map} +1 -1
  8. package/dist/{improvement-cycle-DameJBHT.js → improvement-cycle-DPXRULfN.js} +3 -3
  9. package/dist/{improvement-cycle-DameJBHT.js.map → improvement-cycle-DPXRULfN.js.map} +1 -1
  10. package/dist/index.js +7 -7
  11. package/dist/intelligence.js +3 -3
  12. package/dist/kernel.js +6 -6
  13. package/dist/{knowledge-BoWyEh3G.js → knowledge-C7Gly1cw.js} +3 -3
  14. package/dist/{knowledge-BoWyEh3G.js.map → knowledge-C7Gly1cw.js.map} +1 -1
  15. package/dist/knowledge.js +1 -1
  16. package/dist/{loop-runner-bin-CRUMo1-y.js → loop-runner-bin-Bt9qFNkq.js} +3 -3
  17. package/dist/{loop-runner-bin-CRUMo1-y.js.map → loop-runner-bin-Bt9qFNkq.js.map} +1 -1
  18. package/dist/loop-runner-bin.js +1 -1
  19. package/dist/mcp/bin.js +3 -3
  20. package/dist/mcp/index.js +4 -4
  21. package/dist/{openai-tools-DKjfR1g-.js → openai-tools-U-hmk_yS.js} +2 -2
  22. package/dist/{openai-tools-DKjfR1g-.js.map → openai-tools-U-hmk_yS.js.map} +1 -1
  23. package/dist/{runtime-vhKaBA0X.js → runtime-BG6VzXf0.js} +6 -6
  24. package/dist/{runtime-vhKaBA0X.js.map → runtime-BG6VzXf0.js.map} +1 -1
  25. package/dist/{structural-rollout-MCQU3KCv.js → structural-rollout-C5iljirr.js} +2 -2
  26. package/dist/{structural-rollout-MCQU3KCv.js.map → structural-rollout-C5iljirr.js.map} +1 -1
  27. package/dist/{supervise-D9Tivk-p.js → supervise-eOjGprUt.js} +2 -2
  28. package/dist/{supervise-D9Tivk-p.js.map → supervise-eOjGprUt.js.map} +1 -1
  29. package/dist/{supervisor-BI6Z-8Yi.js → supervisor-BHS7T4HN.js} +97 -7
  30. package/dist/{supervisor-BI6Z-8Yi.js.map → supervisor-BHS7T4HN.js.map} +1 -1
  31. package/dist/testing.js +11 -11
  32. package/package.json +1 -1
@@ -7591,12 +7591,7 @@ function assertBridgeProfileMaterialization(value, profile, wireModel) {
7591
7591
  const missing = requiredKeys.filter((key) => !presentKeys.includes(key));
7592
7592
  const unknown = presentKeys.filter((key) => !requiredKeys.includes(key) && !optionalKeys.includes(key));
7593
7593
  if (missing.length > 0 || unknown.length > 0) throw new ValidationError("bridgeExecutor: profile materialization receipt has missing or unknown fields" + (missing.length > 0 ? ` (missing: ${missing.sort().join(", ")})` : "") + (unknown.length > 0 ? ` (unknown: ${unknown.sort().join(", ")})` : ""));
7594
- if (raw.inference !== void 0) {
7595
- const inference = raw.inference;
7596
- if (typeof inference !== "object" || inference === null || Array.isArray(inference)) throw new ValidationError("bridgeExecutor: profile materialization receipt has an invalid inference block");
7597
- const endpoint = inference.effectiveEndpoint;
7598
- if (typeof endpoint !== "string" || endpoint.length === 0) throw new ValidationError("bridgeExecutor: profile materialization inference block has no effectiveEndpoint");
7599
- }
7594
+ const inference = raw.inference === void 0 ? void 0 : parseBridgeInferenceReceipt(raw.inference);
7600
7595
  if (raw.schema !== bridgeProfileMaterializationSchema) throw new ValidationError(`bridgeExecutor: profile materialization receipt is not ${bridgeProfileMaterializationSchema}`);
7601
7596
  const effectiveProfileDigest = raw.effectiveProfileDigest;
7602
7597
  if (typeof effectiveProfileDigest !== "string" || !/^sha256:[a-f0-9]{64}$/u.test(effectiveProfileDigest)) throw new ValidationError("bridgeExecutor: profile materialization receipt has an invalid effectiveProfileDigest");
@@ -7655,11 +7650,106 @@ function assertBridgeProfileMaterialization(value, profile, wireModel) {
7655
7650
  requested,
7656
7651
  applied
7657
7652
  },
7653
+ ...inference === void 0 ? {} : { inference },
7658
7654
  workspacePlanDigest: raw.workspacePlanDigest,
7659
7655
  files: Object.freeze(files),
7660
7656
  unsupported: Object.freeze(unsupported)
7661
7657
  });
7662
7658
  }
7659
+ function parseBridgeInferenceReceipt(value) {
7660
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new ValidationError("bridgeExecutor: profile materialization receipt has an invalid inference block");
7661
+ const raw = value;
7662
+ assertBridgeReceiptKeys(raw, [
7663
+ "apiMode",
7664
+ "effectiveEndpoint",
7665
+ "transport"
7666
+ ], ["appliedMaxTokens", "observation"], "profile materialization inference block");
7667
+ const effectiveEndpoint = raw.effectiveEndpoint;
7668
+ if (typeof effectiveEndpoint !== "string" || effectiveEndpoint.length === 0) throw new ValidationError("bridgeExecutor: profile materialization inference block has no effectiveEndpoint");
7669
+ const apiMode = raw.apiMode;
7670
+ if (typeof apiMode !== "string" || apiMode.length === 0) throw new ValidationError("bridgeExecutor: profile materialization inference block has no apiMode");
7671
+ if (raw.transport !== "scoped-loopback") throw new ValidationError("bridgeExecutor: profile materialization inference block has invalid transport");
7672
+ const observation = raw.observation === void 0 ? void 0 : parseBridgeInferenceObservation(raw.observation);
7673
+ const appliedMaxTokens = raw.appliedMaxTokens === void 0 ? void 0 : bridgeInferencePositiveCount(raw.appliedMaxTokens, "appliedMaxTokens");
7674
+ return detachedSnapshot({
7675
+ effectiveEndpoint,
7676
+ apiMode,
7677
+ transport: "scoped-loopback",
7678
+ ...appliedMaxTokens === void 0 ? {} : { appliedMaxTokens },
7679
+ ...observation === void 0 ? {} : { observation }
7680
+ }, "bridgeExecutor: profile materialization inference block");
7681
+ }
7682
+ function parseBridgeInferenceObservation(value) {
7683
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new ValidationError("bridgeExecutor: profile materialization inference observation must be an object");
7684
+ const raw = value;
7685
+ assertBridgeReceiptKeys(raw, [
7686
+ "accountingMatched",
7687
+ "auxiliaryRequests",
7688
+ "failedRequests",
7689
+ "generationRequests",
7690
+ "inFlightRequests",
7691
+ "rejectedRequests",
7692
+ "requests",
7693
+ "usage",
7694
+ "usageReceipts"
7695
+ ], [], "profile materialization inference observation");
7696
+ return detachedSnapshot({
7697
+ requests: bridgeInferenceCount(raw.requests, "requests"),
7698
+ generationRequests: bridgeInferenceCount(raw.generationRequests, "generationRequests"),
7699
+ auxiliaryRequests: bridgeInferenceCount(raw.auxiliaryRequests, "auxiliaryRequests"),
7700
+ usageReceipts: bridgeInferenceCount(raw.usageReceipts, "usageReceipts"),
7701
+ rejectedRequests: bridgeInferenceCount(raw.rejectedRequests, "rejectedRequests"),
7702
+ failedRequests: bridgeInferenceCount(raw.failedRequests, "failedRequests"),
7703
+ inFlightRequests: bridgeInferenceCount(raw.inFlightRequests, "inFlightRequests"),
7704
+ accountingMatched: bridgeInferenceBoolean(raw.accountingMatched, "accountingMatched"),
7705
+ usage: parseBridgeInferenceUsage(raw.usage)
7706
+ }, "bridgeExecutor: profile materialization inference observation");
7707
+ }
7708
+ function parseBridgeInferenceUsage(value) {
7709
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new ValidationError("bridgeExecutor: profile materialization inference usage must be an object");
7710
+ const raw = value;
7711
+ assertBridgeReceiptKeys(raw, ["costKnown"], [
7712
+ "cacheReadInputTokens",
7713
+ "cacheWriteInputTokens",
7714
+ "estimatedCost",
7715
+ "freshInputTokens",
7716
+ "inputTokens",
7717
+ "outputTokens"
7718
+ ], "profile materialization inference usage");
7719
+ if (raw.costKnown !== false) throw new ValidationError("bridgeExecutor: profile materialization inference usage must report costKnown=false");
7720
+ return detachedSnapshot({
7721
+ ...raw.inputTokens === void 0 ? {} : { inputTokens: bridgeInferenceCount(raw.inputTokens, "usage.inputTokens") },
7722
+ ...raw.freshInputTokens === void 0 ? {} : { freshInputTokens: bridgeInferenceCount(raw.freshInputTokens, "usage.freshInputTokens") },
7723
+ ...raw.cacheReadInputTokens === void 0 ? {} : { cacheReadInputTokens: bridgeInferenceCount(raw.cacheReadInputTokens, "usage.cacheReadInputTokens") },
7724
+ ...raw.cacheWriteInputTokens === void 0 ? {} : { cacheWriteInputTokens: bridgeInferenceCount(raw.cacheWriteInputTokens, "usage.cacheWriteInputTokens") },
7725
+ ...raw.outputTokens === void 0 ? {} : { outputTokens: bridgeInferenceCount(raw.outputTokens, "usage.outputTokens") },
7726
+ costKnown: false,
7727
+ ...raw.estimatedCost === void 0 ? {} : { estimatedCost: bridgeInferenceMoney(raw.estimatedCost, "usage.estimatedCost") }
7728
+ }, "bridgeExecutor: profile materialization inference usage");
7729
+ }
7730
+ function assertBridgeReceiptKeys(value, required, optional, context) {
7731
+ const requiredSet = new Set(required);
7732
+ const optionalSet = new Set(optional);
7733
+ const missing = required.filter((key) => !Object.hasOwn(value, key));
7734
+ const unknown = Object.keys(value).filter((key) => !requiredSet.has(key) && !optionalSet.has(key));
7735
+ if (missing.length > 0 || unknown.length > 0) throw new ValidationError(`bridgeExecutor: ${context} has missing or unknown fields` + (missing.length > 0 ? ` (missing: ${missing.sort().join(", ")})` : "") + (unknown.length > 0 ? ` (unknown: ${unknown.sort().join(", ")})` : ""));
7736
+ }
7737
+ function bridgeInferenceCount(value, field) {
7738
+ if (!Number.isSafeInteger(value) || value < 0) throw new ValidationError(`bridgeExecutor: profile materialization inference ${field} must be a nonnegative safe integer`);
7739
+ return value;
7740
+ }
7741
+ function bridgeInferencePositiveCount(value, field) {
7742
+ if (!Number.isSafeInteger(value) || value <= 0) throw new ValidationError(`bridgeExecutor: profile materialization inference ${field} must be a positive safe integer`);
7743
+ return value;
7744
+ }
7745
+ function bridgeInferenceBoolean(value, field) {
7746
+ if (typeof value !== "boolean") throw new ValidationError(`bridgeExecutor: profile materialization inference ${field} must be boolean`);
7747
+ return value;
7748
+ }
7749
+ function bridgeInferenceMoney(value, field) {
7750
+ if (typeof value !== "number" || !Number.isFinite(value) || value < 0) throw new ValidationError(`bridgeExecutor: profile materialization inference ${field} must be finite and nonnegative`);
7751
+ return value;
7752
+ }
7663
7753
  /** Expected native control for the bridge backends that can emit the v2 acknowledgement. These
7664
7754
  * mappings mirror the actual cli-bridge argv functions, so the acknowledgement is checked against
7665
7755
  * what the process must have received rather than merely echoing the canonical request. */
@@ -11936,4 +12026,4 @@ function isNonEmptySpend(s) {
11936
12026
  //#endregion
11937
12027
  export { createSandboxLineage as $, bindReusableExecutorExecutionId as A, removeWorktree as At, workerTraceSeamKey as B, defineProfileMaterializationContract as Bt, queueOf as C, sanitizeAgentRuntimeEvent as Ct, assertValidBudget as D, runWorktreeHarness as Dt, teardownExecutor as E, runSettledCommand as Et, snapshotExecutorConfig as F, parseCodexTokenUsage as Ft, sandboxSessionTraceSource as G, promptOnlyProfileMaterialization as Gt, createSteerableSandboxSession as H, profileMaterializationAxes$1 as Ht, createWorktreeCliExecutor as I, CodexExecutionDiagnosticError as It, readWorkerProgress as J, sandboxActProfileMaterialization as Jt, DEFAULT_STALL_AFTER_MS as K, promptResourceProfileMaterialization as Kt, WORKER_TRACE_PROPAGATION as L, AGENT_PROFILE_MATERIALIZATION_AXES as Lt, cliWorktreeExecutor as M, LOCAL_HARNESSES as Mt, createExecutor as N, harnessSupportsReasoningEffort as Nt, createBudgetPool as O, captureWorktreeDiff as Ot, createExecutorRegistry as P, localHarnessExecutable as Pt, runAgentRounds as Q, readWorkerTraceContext as R, assertProfileMaterialization as Rt, freeSlots as S, createRuntimeStreamEventCollector as St, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as T, sanitizeRuntimeStreamEvent as Tt, createPushTraceSource as U, promptControlProfileMaterialization as Ut, DEFAULT_SANDBOX_STEERING_MAX_TURNS as V, fullProfileMaterialization as Vt, decodeToolPart as W, promptModelProfileMaterialization as Wt, createSandboxForSpec as X, worktreeCliProfileMaterialization as Xt, createInbox as Y, validateProfileMaterialization as Yt, defaultSelectWinner as Z, pollFor as _, loopEventToOtelSpan as _t, pickBestDelivered as a, mergeTraceEnv as at, waitUntil as b, toOtelAttributes as bt, driverChild as c, INTELLIGENCE_WIRE_VERSION as ct, deriveNodeExecutionIdentity as d, buildRuntimeEventOtelSpans as dt, probeSandboxCapabilities as et, recordScopeOwnerMaterialization as f, createOpenInferenceFileExporter as ft, isWaitOutcome as g, generateSpanId as gt, createWaitProbes as h, flatOtelSpan as ht, collectDelivered as i, createPropagatingTraceEmitter as it, captureReusableExecutorConfig as j, DEFAULT_LOCAL_HARNESS as jt, spendFromUsageEvents as k, createWorktree as kt, withDriverExecutor as l, buildLoopOtelSpans as lt, settledToIteration as m, exportEvalRuns as mt, createSupervisor as n, routerBrain as nt, runFinalizer as o, readTraceContextFromEnv as ot, scopeOwnerExecutorNodeContext as p, createOtelExporter as pt, createActivityLog as q, renderProfileMaterializationIssues as qt, bestDelivered as r, runBrainLoop as rt, runTree as s, traceContextToEnv as st, createRootHandle as t, acquireSandbox as tt, createScope as u, buildLoopSpanNodes as ut, timerAt as v, padSpanId as vt, rollingDispatch as w, sanitizeKnowledgeReadinessReport as wt, effectiveConcurrency as x, createRuntimeEventCollector as xt, validateWaitSpec as y, padTraceId as yt, workerTraceEnv as z, controlProfileMaterialization as zt };
11938
12028
 
11939
- //# sourceMappingURL=supervisor-BI6Z-8Yi.js.map
12029
+ //# sourceMappingURL=supervisor-BHS7T4HN.js.map