@tangle-network/agent-runtime 0.132.8 → 0.132.10

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 (53) hide show
  1. package/dist/{activation-BNyOriQ_.js → activation-BEhVpy8z.js} +2 -2
  2. package/dist/{activation-BNyOriQ_.js.map → activation-BEhVpy8z.js.map} +1 -1
  3. package/dist/agent.d.ts +1 -1
  4. package/dist/agent.js +2 -2
  5. package/dist/{authoring-BpIDTX_5.js → authoring-CWl3YO4M.js} +2 -2
  6. package/dist/{authoring-BpIDTX_5.js.map → authoring-CWl3YO4M.js.map} +1 -1
  7. package/dist/candidate-execution/index.d.ts +2 -2
  8. package/dist/candidate-execution/index.js +2 -2
  9. package/dist/{candidate-execution-DxL_I3xx.js → candidate-execution-DUefVdnW.js} +65 -2
  10. package/dist/candidate-execution-DUefVdnW.js.map +1 -0
  11. package/dist/{graph-lB5TUusP.js → graph-ClQdNdZt.js} +2 -2
  12. package/dist/{graph-lB5TUusP.js.map → graph-ClQdNdZt.js.map} +1 -1
  13. package/dist/{improvement-cycle-BSK4bjDT.js → improvement-cycle-CILFx4nC.js} +3 -3
  14. package/dist/{improvement-cycle-BSK4bjDT.js.map → improvement-cycle-CILFx4nC.js.map} +1 -1
  15. package/dist/{index-B3bHsVLw.d.ts → index-C8WhH5Yt.d.ts} +44 -5
  16. package/dist/{index-B2vnuE5e.d.ts → index-CWnUn15M.d.ts} +2 -2
  17. package/dist/{index-B6vqfzZt.d.ts → index-DHwZyU_t.d.ts} +3 -3
  18. package/dist/index.d.ts +7 -7
  19. package/dist/index.js +9 -9
  20. package/dist/intelligence.d.ts +2 -2
  21. package/dist/intelligence.js +3 -3
  22. package/dist/kernel.d.ts +2 -2
  23. package/dist/kernel.js +6 -6
  24. package/dist/{knowledge-CAGriDRo.js → knowledge-Cy5u9O8r.js} +3 -3
  25. package/dist/{knowledge-CAGriDRo.js.map → knowledge-Cy5u9O8r.js.map} +1 -1
  26. package/dist/knowledge.d.ts +1 -1
  27. package/dist/knowledge.js +1 -1
  28. package/dist/{loop-runner-bin-DVqbR72k.js → loop-runner-bin-3f0gTZMM.js} +3 -3
  29. package/dist/{loop-runner-bin-DVqbR72k.js.map → loop-runner-bin-3f0gTZMM.js.map} +1 -1
  30. package/dist/{loop-runner-bin-C5oxfyi9.d.ts → loop-runner-bin-C-u6nlIN.d.ts} +2 -2
  31. package/dist/loop-runner-bin.d.ts +1 -1
  32. package/dist/loop-runner-bin.js +1 -1
  33. package/dist/mcp/bin.js +3 -3
  34. package/dist/mcp/index.d.ts +2 -2
  35. package/dist/mcp/index.js +4 -4
  36. package/dist/{openai-tools-C2v4x1Lv.js → openai-tools-FkObX-yC.js} +2 -2
  37. package/dist/{openai-tools-C2v4x1Lv.js.map → openai-tools-FkObX-yC.js.map} +1 -1
  38. package/dist/primeintellect/index.d.ts +1 -1
  39. package/dist/{redact-CJpB66r5.d.ts → redact-DMqkOZNV.d.ts} +2 -2
  40. package/dist/{runtime-laujrVXP.d.ts → runtime-CIVruNqK.d.ts} +6 -4
  41. package/dist/{runtime-D7It83FH.js → runtime-CJLL8uTR.js} +6 -6
  42. package/dist/{runtime-D7It83FH.js.map → runtime-CJLL8uTR.js.map} +1 -1
  43. package/dist/{structural-rollout-Cd8ZM0dD.js → structural-rollout-A9U4b_R_.js} +2 -2
  44. package/dist/{structural-rollout-Cd8ZM0dD.js.map → structural-rollout-A9U4b_R_.js.map} +1 -1
  45. package/dist/{supervise-D8I1BRWe.js → supervise-j81XyzQL.js} +2 -2
  46. package/dist/{supervise-D8I1BRWe.js.map → supervise-j81XyzQL.js.map} +1 -1
  47. package/dist/{supervisor-Dr3AoSh0.js → supervisor-B9BzXJu9.js} +43 -13
  48. package/dist/supervisor-B9BzXJu9.js.map +1 -0
  49. package/dist/testing.d.ts +2 -2
  50. package/dist/testing.js +11 -11
  51. package/package.json +1 -1
  52. package/dist/candidate-execution-DxL_I3xx.js.map +0 -1
  53. package/dist/supervisor-Dr3AoSh0.js.map +0 -1
@@ -5932,6 +5932,7 @@ const cliSeamKey = "cli";
5932
5932
  const bridgeSeamKey = "bridge";
5933
5933
  const maxBridgeTimeoutMs = 2147483647;
5934
5934
  const bridgeModelCredentialHeader = "x-cli-bridge-model-credential";
5935
+ const bridgeModelBaseUrlHeader = "x-cli-bridge-model-base-url";
5935
5936
  const bridgeProfileMaterializationSchema = "cli-bridge.profile-materialization.v2";
5936
5937
  const bridgeUsageCostSchema = "cli-bridge.usage-cost.v1";
5937
5938
  const cliWorktreeSeamKey = "cli-worktree";
@@ -5953,10 +5954,19 @@ function isLoopbackBridgeUrl(value) {
5953
5954
  /** Validate and capture the non-serialisable credential service without reading its value. */
5954
5955
  function captureBridgeModelCredential(value, context) {
5955
5956
  if (value === null || typeof value !== "object") throw new ValidationError(`${context}: modelCredential must be an object`);
5956
- assertExactConfigKeys(value, /* @__PURE__ */ new Set(["key", "provider"]), `${context} modelCredential`);
5957
+ assertExactConfigKeys(value, /* @__PURE__ */ new Set([
5958
+ "baseUrlKey",
5959
+ "key",
5960
+ "provider"
5961
+ ]), `${context} modelCredential`);
5957
5962
  if (typeof value.key !== "string" || value.key.trim().length === 0) throw new ValidationError(`${context}: modelCredential.key must be a non-empty string`);
5963
+ if (typeof value.baseUrlKey !== "string" || value.baseUrlKey.trim().length === 0) throw new ValidationError(`${context}: modelCredential.baseUrlKey must be a non-empty string`);
5964
+ if (value.baseUrlKey === value.key) throw new ValidationError(`${context}: modelCredential.baseUrlKey must differ from key`);
5958
5965
  if (!value.provider || typeof value.provider.get !== "function") throw new ValidationError(`${context}: modelCredential.provider must implement get(name)`);
5959
- const captured = { key: value.key };
5966
+ const captured = {
5967
+ key: value.key,
5968
+ baseUrlKey: value.baseUrlKey
5969
+ };
5960
5970
  Object.defineProperty(captured, "provider", {
5961
5971
  configurable: false,
5962
5972
  enumerable: false,
@@ -5970,18 +5980,35 @@ function validateBridgeModelCredential(value, bridgeUrl, context) {
5970
5980
  if (!isLoopbackBridgeUrl(bridgeUrl)) throw new ValidationError(`${context}: modelCredential is allowed only for a loopback bridge URL`);
5971
5981
  return captureBridgeModelCredential(value, context);
5972
5982
  }
5973
- /** Resolve only at the outbound boundary. Provider errors are redacted because they may contain
5974
- * the protected value; diagnostics identify the key name, never the value or provider error. */
5975
- async function resolveBridgeModelCredential(credential, context) {
5976
- if (credential === void 0) return void 0;
5977
- let value;
5983
+ function resolveProtectedModelBaseUrl(value, context) {
5984
+ let target;
5978
5985
  try {
5979
- value = await credential.provider.get(credential.key);
5986
+ target = new URL(value);
5980
5987
  } catch {
5981
- throw new ValidationError(`${context}: modelCredential provider failed for '${credential.key}'`);
5988
+ throw new ValidationError(`${context}: modelCredential.baseUrl must be an absolute HTTPS URL`);
5982
5989
  }
5983
- if (typeof value !== "string" || value.length === 0 || /[\r\n]/u.test(value)) throw new ValidationError(`${context}: modelCredential provider has no usable value for '${credential.key}'`);
5984
- return value;
5990
+ if (target.protocol !== "https:" || target.username || target.password || target.search || target.hash) throw new ValidationError(`${context}: modelCredential.baseUrl must be an HTTPS URL without credentials, query, or fragment`);
5991
+ return target.toString().replace(/\/$/u, "");
5992
+ }
5993
+ /** Resolve only at the outbound boundary. Provider errors are redacted because they may contain
5994
+ * the protected value; diagnostics identify key names, never values or provider errors. */
5995
+ async function resolveBridgeModelCredential(credential, context) {
5996
+ if (credential === void 0) return void 0;
5997
+ const resolveValue = async (key) => {
5998
+ let value;
5999
+ try {
6000
+ value = await credential.provider.get(key);
6001
+ } catch {
6002
+ throw new ValidationError(`${context}: modelCredential provider failed for '${key}'`);
6003
+ }
6004
+ if (typeof value !== "string" || value.length === 0 || /[\r\n\0]/u.test(value)) throw new ValidationError(`${context}: modelCredential provider has no usable value for '${key}'`);
6005
+ return value;
6006
+ };
6007
+ const [token, baseUrl] = await Promise.all([resolveValue(credential.key), resolveValue(credential.baseUrlKey)]);
6008
+ return {
6009
+ token,
6010
+ baseUrl: resolveProtectedModelBaseUrl(baseUrl, context)
6011
+ };
5985
6012
  }
5986
6013
  /** Deterministic content hash for an `outRef`. FNV-1a 32-bit over the canonical
5987
6014
  * JSON of the result — not cryptographic, sufficient for content-addressing the
@@ -7554,7 +7581,10 @@ async function bridgeStreamPost(url, args) {
7554
7581
  ...args.traceHeaders,
7555
7582
  "content-type": "application/json",
7556
7583
  authorization: `Bearer ${args.bearer}`,
7557
- ...modelCredential === void 0 ? {} : { [bridgeModelCredentialHeader]: modelCredential },
7584
+ ...modelCredential === void 0 ? {} : {
7585
+ [bridgeModelCredentialHeader]: modelCredential.token,
7586
+ [bridgeModelBaseUrlHeader]: modelCredential.baseUrl
7587
+ },
7558
7588
  "x-session-id": args.sessionId,
7559
7589
  "x-run-id": args.runId,
7560
7590
  ...args.afterEventId > 0 ? { "last-event-id": String(args.afterEventId) } : {},
@@ -12229,4 +12259,4 @@ function isNonEmptySpend(s) {
12229
12259
  //#endregion
12230
12260
  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 };
12231
12261
 
12232
- //# sourceMappingURL=supervisor-Dr3AoSh0.js.map
12262
+ //# sourceMappingURL=supervisor-B9BzXJu9.js.map