nexus-agents 11.0.1 → 11.0.2

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.
@@ -5,7 +5,7 @@ import {
5
5
  getCurrentRequestContext,
6
6
  runWithRequestContext,
7
7
  serverCallerInfo
8
- } from "./chunk-CXRZQ4NH.js";
8
+ } from "./chunk-Y34BCT36.js";
9
9
  import {
10
10
  DEFAULT_EXECUTION_MODE
11
11
  } from "./chunk-TYLE7Z2S.js";
@@ -2343,4 +2343,4 @@ export {
2343
2343
  DEFAULT_CONSENSUS_CONFIG,
2344
2344
  ConsensusMetricsSchema
2345
2345
  };
2346
- //# sourceMappingURL=chunk-6Y55UUWK.js.map
2346
+ //# sourceMappingURL=chunk-G667EEZ7.js.map
@@ -21,7 +21,7 @@ import {
21
21
  toolSuccess,
22
22
  withProgressHeartbeat,
23
23
  wrapToolWithTimeout
24
- } from "./chunk-6Y55UUWK.js";
24
+ } from "./chunk-G667EEZ7.js";
25
25
  import {
26
26
  getToolMemory
27
27
  } from "./chunk-RR2Y2HVZ.js";
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-EZNIYU5T.js";
31
31
  import {
32
32
  VERSION
33
- } from "./chunk-CXRZQ4NH.js";
33
+ } from "./chunk-Y34BCT36.js";
34
34
  import {
35
35
  ModelBoundAdapter,
36
36
  UNVERIFIABLE_STDERR_RE,
@@ -88,6 +88,7 @@ import {
88
88
  createLogger,
89
89
  createdOf,
90
90
  err,
91
+ findCanonicalModel,
91
92
  foldCompletionUsage,
92
93
  formatPercentage,
93
94
  formatZodError,
@@ -134,6 +135,7 @@ import {
134
135
  } from "./chunk-CH6IBWXH.js";
135
136
  import {
136
137
  CLI_NAMES,
138
+ CliNameSchema,
137
139
  MCP_TIMEOUTS,
138
140
  OPERATION_CLASSES,
139
141
  VOTE_TIMEOUTS,
@@ -6134,8 +6136,42 @@ function isDispatchMode(value) {
6134
6136
  function answeringSeats(votes) {
6135
6137
  return votes.filter((v) => v.source === "llm");
6136
6138
  }
6139
+ function realModel(id) {
6140
+ return id === void 0 || id === "" || id === UNRESOLVED_MODEL_ID ? void 0 : id;
6141
+ }
6142
+ function requestedModel(v) {
6143
+ return realModel(v.model);
6144
+ }
6137
6145
  function resolvedModel(v) {
6138
- return v.model === void 0 || v.model === "" || v.model === UNRESOLVED_MODEL_ID ? void 0 : v.model;
6146
+ const served = realModel(v.servedModel);
6147
+ return served === void 0 ? requestedModel(v) : qualifiedServedModel(v, served);
6148
+ }
6149
+ function qualifiedServedModel(v, served) {
6150
+ if (vendorFamilyOf(served) !== "unknown") return served;
6151
+ const cli = CliNameSchema.safeParse(v.cli === void 0 ? void 0 : bareCliName(v.cli));
6152
+ if (!cli.success) return served;
6153
+ return findCanonicalModel(cli.data, served)?.id ?? served;
6154
+ }
6155
+ function servedElsewhere(v) {
6156
+ const requested = requestedModel(v);
6157
+ if (requested === void 0 || realModel(v.servedModel) === void 0) return false;
6158
+ return countDistinctModels([requested, resolvedModel(v) ?? ""]) > 1;
6159
+ }
6160
+ function servedSubstitutions(votes) {
6161
+ const out = [];
6162
+ for (const v of answeringSeats(votes)) {
6163
+ if (v.fallback !== void 0 || !servedElsewhere(v)) continue;
6164
+ out.push({ role: v.role, requested: v.model ?? "", served: resolvedModel(v) ?? "" });
6165
+ }
6166
+ return out;
6167
+ }
6168
+ function servedModelLabel(answered, served) {
6169
+ const requested = [
6170
+ ...new Set(
6171
+ answered.filter(servedElsewhere).map(requestedModel).filter((m) => m !== void 0)
6172
+ )
6173
+ ];
6174
+ return requested.length === 0 ? served : `${requested.join(", ")} \u2192 served ${served}`;
6139
6175
  }
6140
6176
  function seatFallbacks(votes) {
6141
6177
  const out = [];
@@ -6182,7 +6218,7 @@ function singleModelPanelWarning(votes) {
6182
6218
  if (panelDiversityOf(votes).distinctModels !== 1) return void 0;
6183
6219
  const silent = votes.length - answered.length;
6184
6220
  const missing = silent > 0 ? ` (${String(silent)} did not answer)` : "";
6185
- return `All ${String(answered.length)} seats answered on ${model}${missing}; independence is weaker than assigned.`;
6221
+ return `All ${String(answered.length)} seats answered on ${servedModelLabel(answered, model)}${missing}; independence is weaker than assigned.`;
6186
6222
  }
6187
6223
  function singleFamilyPanelWarning(votes) {
6188
6224
  if (votes.length < MIN_PANEL_FOR_DIVERSITY_WARNING) return void 0;
@@ -6195,7 +6231,7 @@ function singleFamilyPanelWarning(votes) {
6195
6231
  return `All ${String(answered.length)} answering seats ran ${vendorFamilyOf(model)} models (${String(distinctModels)} distinct); independence is weaker than assigned.`;
6196
6232
  }
6197
6233
  function assignedFallbackFamily(v, fallback) {
6198
- const model = resolvedModel({ ...v, model: fallback.fromModel ?? v.pinnedModel });
6234
+ const model = requestedModel({ model: fallback.fromModel ?? v.pinnedModel });
6199
6235
  return vendorFamilyOf(model ?? CLI_TO_MODELSDEV_VENDOR[fallback.fromCli] ?? "");
6200
6236
  }
6201
6237
  function crossFamilyFallbackWarning(votes) {
@@ -9842,6 +9878,7 @@ export {
9842
9878
  createWeightedVoting,
9843
9879
  CorrelationTracker,
9844
9880
  createCorrelationTracker,
9881
+ servedSubstitutions,
9845
9882
  seatFallbacks,
9846
9883
  panelDiversityOf,
9847
9884
  VotingStrategySchema,
@@ -9868,4 +9905,4 @@ export {
9868
9905
  CONSENSUS_VOTE_TOOL_SCHEMA,
9869
9906
  registerConsensusVoteTool
9870
9907
  };
9871
- //# sourceMappingURL=chunk-HBEZ2J4F.js.map
9908
+ //# sourceMappingURL=chunk-LSQ2IFMP.js.map