nexus-agents 8.46.12 → 8.46.13

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.
@@ -8,7 +8,7 @@ import {
8
8
  NODE_ENGINE_RANGE,
9
9
  VERSION,
10
10
  isNodeVersionSupported
11
- } from "./chunk-K6EG4H2Y.js";
11
+ } from "./chunk-DWWD7E2S.js";
12
12
  import {
13
13
  capitalize
14
14
  } from "./chunk-7LP6VJRP.js";
@@ -1227,7 +1227,7 @@ async function runDoctorFix(result) {
1227
1227
  writeLine2("\u2500".repeat(40));
1228
1228
  let fixCount = 0;
1229
1229
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1230
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-EVVSBUH3.js");
1230
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-YFIVZI6E.js");
1231
1231
  const outcome = describeDataDirFix2(initDataDirectories2());
1232
1232
  writeLine2(outcome.line);
1233
1233
  if (outcome.counted) fixCount++;
@@ -1329,4 +1329,4 @@ export {
1329
1329
  startStdioServer,
1330
1330
  closeServer
1331
1331
  };
1332
- //# sourceMappingURL=chunk-7JSICUB5.js.map
1332
+ //# sourceMappingURL=chunk-LMODIZE4.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-QVUWED65.js";
10
+ } from "./chunk-YS5V5OIK.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -2173,4 +2173,4 @@ export {
2173
2173
  runImprovementReview,
2174
2174
  registerImprovementReviewTool
2175
2175
  };
2176
- //# sourceMappingURL=chunk-YZ3RVX52.js.map
2176
+ //# sourceMappingURL=chunk-LVU7XCFO.js.map
@@ -23,10 +23,10 @@ import {
23
23
  toolSuccessStructured,
24
24
  withProgressHeartbeat,
25
25
  wrapToolWithTimeout
26
- } from "./chunk-QVUWED65.js";
26
+ } from "./chunk-YS5V5OIK.js";
27
27
  import {
28
28
  VERSION
29
- } from "./chunk-K6EG4H2Y.js";
29
+ } from "./chunk-DWWD7E2S.js";
30
30
  import {
31
31
  assessPanelIndependence,
32
32
  countDistinctModels,
@@ -7850,4 +7850,4 @@ export {
7850
7850
  CONSENSUS_VOTE_TOOL_SCHEMA,
7851
7851
  registerConsensusVoteTool
7852
7852
  };
7853
- //# sourceMappingURL=chunk-RENU7KZA.js.map
7853
+ //# sourceMappingURL=chunk-NBAUSAGE.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-K6EG4H2Y.js";
3
+ } from "./chunk-DWWD7E2S.js";
4
4
  import {
5
5
  emitClawGuardViolation
6
6
  } from "./chunk-3AWXED62.js";
@@ -2317,4 +2317,4 @@ export {
2317
2317
  VOTING_THRESHOLDS,
2318
2318
  ConsensusMetricsSchema
2319
2319
  };
2320
- //# sourceMappingURL=chunk-QVUWED65.js.map
2320
+ //# sourceMappingURL=chunk-YS5V5OIK.js.map
package/dist/cli.js CHANGED
@@ -157,7 +157,7 @@ import {
157
157
  validateNexusEnv,
158
158
  validateWorkflow,
159
159
  wrapInMarkdownFence
160
- } from "./chunk-Z7XY4BJR.js";
160
+ } from "./chunk-JHN32PTL.js";
161
161
  import "./chunk-YO6PT4CN.js";
162
162
  import "./chunk-DGWT7DXX.js";
163
163
  import "./chunk-M7DUOIAK.js";
@@ -177,7 +177,7 @@ import {
177
177
  doctorCommand,
178
178
  initDataDirectories,
179
179
  runDoctor
180
- } from "./chunk-7JSICUB5.js";
180
+ } from "./chunk-LMODIZE4.js";
181
181
  import {
182
182
  buildOpenAICompatAdapters,
183
183
  readOpenAICompatEnv
@@ -196,7 +196,7 @@ import {
196
196
  recordAuthenticVote,
197
197
  registerConsensusVoteTool,
198
198
  toRecordDecision
199
- } from "./chunk-RENU7KZA.js";
199
+ } from "./chunk-NBAUSAGE.js";
200
200
  import {
201
201
  loadUsageEvents,
202
202
  rollupByModel
@@ -236,18 +236,18 @@ import {
236
236
  registerImprovementReviewTool,
237
237
  runImprovementReview,
238
238
  scanForSecrets
239
- } from "./chunk-YZ3RVX52.js";
239
+ } from "./chunk-LVU7XCFO.js";
240
240
  import {
241
241
  createDefaultPolicyFirewall,
242
242
  setGlobalPolicyFirewall,
243
243
  setSecureHandlerAuditLogger,
244
244
  stagePolicyFirewallForRollout
245
- } from "./chunk-QVUWED65.js";
245
+ } from "./chunk-YS5V5OIK.js";
246
246
  import {
247
247
  NODE_ENGINE_RANGE,
248
248
  VERSION,
249
249
  isNodeVersionSupported
250
- } from "./chunk-K6EG4H2Y.js";
250
+ } from "./chunk-DWWD7E2S.js";
251
251
  import "./chunk-3AWXED62.js";
252
252
  import {
253
253
  createUnifiedRegistry,
@@ -19948,7 +19948,7 @@ function startImprovementReviewScheduler(options) {
19948
19948
  let running = false;
19949
19949
  const runOnce = async () => {
19950
19950
  try {
19951
- const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-VJ5SQLBA.js");
19951
+ const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-PK4HWORW.js");
19952
19952
  const input = ImprovementReviewInputSchema2.parse({ fileIssues });
19953
19953
  const result = await runImprovementReview2(input, { logger: logger22 });
19954
19954
  logger22.info("Scheduled improvement_review complete", {
@@ -11,11 +11,11 @@ import {
11
11
  resetCorrelationTracker,
12
12
  runConsensusForGoal,
13
13
  unwrapVoteOrThrow
14
- } from "./chunk-RENU7KZA.js";
14
+ } from "./chunk-NBAUSAGE.js";
15
15
  import "./chunk-K46JS3AR.js";
16
16
  import "./chunk-OQB3XC5O.js";
17
- import "./chunk-QVUWED65.js";
18
- import "./chunk-K6EG4H2Y.js";
17
+ import "./chunk-YS5V5OIK.js";
18
+ import "./chunk-DWWD7E2S.js";
19
19
  import "./chunk-3AWXED62.js";
20
20
  import "./chunk-2SEIMNKE.js";
21
21
  import "./chunk-YGJRO5JK.js";
@@ -50,4 +50,4 @@ export {
50
50
  runConsensusForGoal,
51
51
  unwrapVoteOrThrow
52
52
  };
53
- //# sourceMappingURL=consensus-vote-QEDB75LI.js.map
53
+ //# sourceMappingURL=consensus-vote-R3FV4QFQ.js.map
@@ -11,9 +11,9 @@ import {
11
11
  loadSelfEvalSignals,
12
12
  registerImprovementReviewTool,
13
13
  runImprovementReview
14
- } from "./chunk-YZ3RVX52.js";
15
- import "./chunk-QVUWED65.js";
16
- import "./chunk-K6EG4H2Y.js";
14
+ } from "./chunk-LVU7XCFO.js";
15
+ import "./chunk-YS5V5OIK.js";
16
+ import "./chunk-DWWD7E2S.js";
17
17
  import "./chunk-3AWXED62.js";
18
18
  import "./chunk-KHCFW5LJ.js";
19
19
  import "./chunk-MTYJPPIG.js";
@@ -33,4 +33,4 @@ export {
33
33
  registerImprovementReviewTool,
34
34
  runImprovementReview
35
35
  };
36
- //# sourceMappingURL=improvement-review-VJ5SQLBA.js.map
36
+ //# sourceMappingURL=improvement-review-PK4HWORW.js.map
package/dist/index.d.ts CHANGED
@@ -22857,6 +22857,13 @@ interface StoredRoutingDecision {
22857
22857
  readonly reason: string;
22858
22858
  readonly taskProfile: Record<string, unknown>;
22859
22859
  readonly requestId?: string | undefined;
22860
+ /**
22861
+ * Whether a router actually attributed this decision (#5915, closing the
22862
+ * third step of #5812). Absent on a decision read back from a row written
22863
+ * before the column existed, and absence reads as UNMEASURED everywhere —
22864
+ * a legacy row carries no more evidence than the fallback does.
22865
+ */
22866
+ readonly routerTypeMeasured?: boolean | undefined;
22860
22867
  }
22861
22868
  /**
22862
22869
  * Stored task outcome record.
package/dist/index.js CHANGED
@@ -552,7 +552,7 @@ import {
552
552
  withLogging,
553
553
  withRetry,
554
554
  withRetryWrapper
555
- } from "./chunk-Z7XY4BJR.js";
555
+ } from "./chunk-JHN32PTL.js";
556
556
  import {
557
557
  FALLBACK_SCANNER_DATA,
558
558
  buildPlanFromAnalysis,
@@ -585,7 +585,7 @@ import {
585
585
  connectTransport,
586
586
  createServer,
587
587
  startStdioServer
588
- } from "./chunk-7JSICUB5.js";
588
+ } from "./chunk-LMODIZE4.js";
589
589
  import {
590
590
  OPENAI_MODELS,
591
591
  OPENAI_MODEL_ALIASES,
@@ -643,7 +643,7 @@ import {
643
643
  generateProposalId,
644
644
  parseAgentPairKey,
645
645
  registerConsensusVoteTool
646
- } from "./chunk-RENU7KZA.js";
646
+ } from "./chunk-NBAUSAGE.js";
647
647
  import "./chunk-K46JS3AR.js";
648
648
  import {
649
649
  allOf
@@ -701,7 +701,7 @@ import {
701
701
  import {
702
702
  ImprovementReviewInputSchema,
703
703
  registerImprovementReviewTool
704
- } from "./chunk-YZ3RVX52.js";
704
+ } from "./chunk-LVU7XCFO.js";
705
705
  import {
706
706
  AgentPerformanceSchema,
707
707
  ConsensusAlgorithmSchema,
@@ -737,10 +737,10 @@ import {
737
737
  toolSuccess,
738
738
  toolSuccessStructured,
739
739
  validateToolInput
740
- } from "./chunk-QVUWED65.js";
740
+ } from "./chunk-YS5V5OIK.js";
741
741
  import {
742
742
  VERSION
743
- } from "./chunk-K6EG4H2Y.js";
743
+ } from "./chunk-DWWD7E2S.js";
744
744
  import {
745
745
  AuditTrail,
746
746
  createAuditTrail,
@@ -1003,9 +1003,16 @@ function createDecisionsTable(db) {
1003
1003
  confidence REAL NOT NULL,
1004
1004
  reason TEXT NOT NULL,
1005
1005
  task_profile TEXT NOT NULL,
1006
- request_id TEXT
1006
+ request_id TEXT,
1007
+ router_type_measured INTEGER
1007
1008
  )
1008
1009
  `);
1010
+ migrateDecisionsTable(db);
1011
+ }
1012
+ function migrateDecisionsTable(db) {
1013
+ const columns = db.prepare("PRAGMA table_info(routing_decisions)").all();
1014
+ if (columns.some((c) => c.name === "router_type_measured")) return;
1015
+ db.exec("ALTER TABLE routing_decisions ADD COLUMN router_type_measured INTEGER");
1009
1016
  }
1010
1017
  function createOutcomesTable(db) {
1011
1018
  db.exec(`
@@ -1064,7 +1071,11 @@ function rowToDecision(row) {
1064
1071
  confidence: row.confidence,
1065
1072
  reason: row.reason,
1066
1073
  taskProfile,
1067
- requestId: row.request_id ?? void 0
1074
+ requestId: row.request_id ?? void 0,
1075
+ // NULL (legacy row, pre-#5915) and 0 both mean UNMEASURED. Defaulting a
1076
+ // NULL to measured would re-create the exact inflation #5812 removed, on
1077
+ // the history rather than the live stats.
1078
+ routerTypeMeasured: row.router_type_measured === 1
1068
1079
  };
1069
1080
  }
1070
1081
  function rowToOutcome(row) {
@@ -1093,8 +1104,8 @@ function rowToStats(row) {
1093
1104
  var INSERT_DECISION_SQL = `
1094
1105
  INSERT OR REPLACE INTO routing_decisions
1095
1106
  (id, trace_id, timestamp, router_type, selected_model, alternative_models,
1096
- confidence, reason, task_profile, request_id)
1097
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
1107
+ confidence, reason, task_profile, request_id, router_type_measured)
1108
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
1098
1109
  `;
1099
1110
  var INSERT_OUTCOME_SQL = `
1100
1111
  INSERT OR REPLACE INTO task_outcomes
@@ -1222,7 +1233,12 @@ var SQLiteOutcomeStorage = class {
1222
1233
  decision.confidence,
1223
1234
  decision.reason,
1224
1235
  JSON.stringify(decision.taskProfile),
1225
- decision.requestId ?? null
1236
+ decision.requestId ?? null,
1237
+ // Only an explicit `true` is measured. `undefined` writes 0, not NULL:
1238
+ // a decision built today that did not say it was measured is not the
1239
+ // same thing as a row from before the column existed, and conflating
1240
+ // them would make the migration indistinguishable from a live gap.
1241
+ decision.routerTypeMeasured === true ? 1 : 0
1226
1242
  );
1227
1243
  this.logger.debug("Stored routing decision", {
1228
1244
  id: decision.id,