nexus-agents 8.26.9 → 8.27.0

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.
@@ -1,6 +1,6 @@
1
1
  // src/version.ts
2
2
  import semver from "semver";
3
- var VERSION = true ? "8.26.9" : "dev";
3
+ var VERSION = true ? "8.27.0" : "dev";
4
4
  var NODE_ENGINE_RANGE = ">=22.5.0";
5
5
  function isNodeVersionSupported(version) {
6
6
  return semver.satisfies(version, NODE_ENGINE_RANGE);
@@ -11,4 +11,4 @@ export {
11
11
  NODE_ENGINE_RANGE,
12
12
  isNodeVersionSupported
13
13
  };
14
- //# sourceMappingURL=chunk-U246Z2VX.js.map
14
+ //# sourceMappingURL=chunk-3S3KL7WX.js.map
@@ -23,10 +23,10 @@ import {
23
23
  toolSuccessStructured,
24
24
  withProgressHeartbeat,
25
25
  wrapToolWithTimeout
26
- } from "./chunk-5FLFU76I.js";
26
+ } from "./chunk-IXGDK6QY.js";
27
27
  import {
28
28
  VERSION
29
- } from "./chunk-U246Z2VX.js";
29
+ } from "./chunk-3S3KL7WX.js";
30
30
  import {
31
31
  assessPanelIndependence,
32
32
  countDistinctModels,
@@ -7682,4 +7682,4 @@ export {
7682
7682
  CONSENSUS_VOTE_TOOL_SCHEMA,
7683
7683
  registerConsensusVoteTool
7684
7684
  };
7685
- //# sourceMappingURL=chunk-M2MA3LYG.js.map
7685
+ //# sourceMappingURL=chunk-BCYTVOQM.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-5FLFU76I.js";
10
+ } from "./chunk-IXGDK6QY.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -2159,4 +2159,4 @@ export {
2159
2159
  runImprovementReview,
2160
2160
  registerImprovementReviewTool
2161
2161
  };
2162
- //# sourceMappingURL=chunk-GDHFAXR7.js.map
2162
+ //# sourceMappingURL=chunk-CH2VUXZ4.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-U246Z2VX.js";
3
+ } from "./chunk-3S3KL7WX.js";
4
4
  import {
5
5
  emitClawGuardViolation
6
6
  } from "./chunk-YOT4GWJV.js";
@@ -2255,4 +2255,4 @@ export {
2255
2255
  VOTING_THRESHOLDS,
2256
2256
  ConsensusMetricsSchema
2257
2257
  };
2258
- //# sourceMappingURL=chunk-5FLFU76I.js.map
2258
+ //# sourceMappingURL=chunk-IXGDK6QY.js.map
@@ -8,7 +8,7 @@ import {
8
8
  NODE_ENGINE_RANGE,
9
9
  VERSION,
10
10
  isNodeVersionSupported
11
- } from "./chunk-U246Z2VX.js";
11
+ } from "./chunk-3S3KL7WX.js";
12
12
  import {
13
13
  capitalize
14
14
  } from "./chunk-7LP6VJRP.js";
@@ -1228,7 +1228,7 @@ async function runDoctorFix(result) {
1228
1228
  writeLine2("\u2500".repeat(40));
1229
1229
  let fixCount = 0;
1230
1230
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1231
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-EAFYGHIW.js");
1231
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-EVTC3IYW.js");
1232
1232
  const outcome = describeDataDirFix2(initDataDirectories2());
1233
1233
  writeLine2(outcome.line);
1234
1234
  if (outcome.counted) fixCount++;
@@ -1330,4 +1330,4 @@ export {
1330
1330
  startStdioServer,
1331
1331
  closeServer
1332
1332
  };
1333
- //# sourceMappingURL=chunk-G3FON2IP.js.map
1333
+ //# sourceMappingURL=chunk-Q777UIJY.js.map
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-G3FON2IP.js";
24
+ } from "./chunk-Q777UIJY.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-CN3VAMQD.js";
@@ -55,7 +55,7 @@ import {
55
55
  toJobSummary,
56
56
  updateStage,
57
57
  writeJobCancelled
58
- } from "./chunk-M2MA3LYG.js";
58
+ } from "./chunk-BCYTVOQM.js";
59
59
  import {
60
60
  allOf,
61
61
  anyOf
@@ -75,7 +75,7 @@ import {
75
75
  } from "./chunk-OYTRYITB.js";
76
76
  import {
77
77
  withPrerequisite
78
- } from "./chunk-GDHFAXR7.js";
78
+ } from "./chunk-CH2VUXZ4.js";
79
79
  import {
80
80
  NOOP_NOTIFIER,
81
81
  RateLimiter,
@@ -100,7 +100,7 @@ import {
100
100
  withAuditTrail,
101
101
  withProgressHeartbeat,
102
102
  wrapToolWithTimeout
103
- } from "./chunk-5FLFU76I.js";
103
+ } from "./chunk-IXGDK6QY.js";
104
104
  import {
105
105
  createAuditTrail,
106
106
  createGraphAuditBridge,
@@ -45677,7 +45677,7 @@ function buildVotingInput(plan, config) {
45677
45677
  }
45678
45678
  async function executeSingleVote(plan, config, log) {
45679
45679
  try {
45680
- const { executeVoting } = await import("./consensus-vote-C7UOQMS4.js");
45680
+ const { executeVoting } = await import("./consensus-vote-IFERTMFX.js");
45681
45681
  const input = buildVotingInput(plan, config);
45682
45682
  const result = await executeVoting(input, log);
45683
45683
  return parseVotingResult(result);
@@ -47469,7 +47469,7 @@ ${contextBlock}`;
47469
47469
  const strategy = config.votingStrategy ?? "higher_order";
47470
47470
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47471
47471
  try {
47472
- const { executeVoting } = await import("./consensus-vote-C7UOQMS4.js");
47472
+ const { executeVoting } = await import("./consensus-vote-IFERTMFX.js");
47473
47473
  const votingResult = await executeVoting(
47474
47474
  {
47475
47475
  proposal: buildVoteProposal(plan, research),
@@ -56185,4 +56185,4 @@ export {
56185
56185
  shutdownFeedbackSubscriber,
56186
56186
  createEventBusBridge
56187
56187
  };
56188
- //# sourceMappingURL=chunk-GLNBYX4I.js.map
56188
+ //# sourceMappingURL=chunk-VH43TS6U.js.map
package/dist/cli.js CHANGED
@@ -157,7 +157,7 @@ import {
157
157
  validateNexusEnv,
158
158
  validateWorkflow,
159
159
  wrapInMarkdownFence
160
- } from "./chunk-GLNBYX4I.js";
160
+ } from "./chunk-VH43TS6U.js";
161
161
  import "./chunk-22EEMQUS.js";
162
162
  import "./chunk-DGWT7DXX.js";
163
163
  import "./chunk-64GMIUM5.js";
@@ -177,7 +177,7 @@ import {
177
177
  doctorCommand,
178
178
  initDataDirectories,
179
179
  runDoctor
180
- } from "./chunk-G3FON2IP.js";
180
+ } from "./chunk-Q777UIJY.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-M2MA3LYG.js";
199
+ } from "./chunk-BCYTVOQM.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-GDHFAXR7.js";
239
+ } from "./chunk-CH2VUXZ4.js";
240
240
  import {
241
241
  createDefaultPolicyFirewall,
242
242
  setGlobalPolicyFirewall,
243
243
  setSecureHandlerAuditLogger,
244
244
  stagePolicyFirewallForRollout
245
- } from "./chunk-5FLFU76I.js";
245
+ } from "./chunk-IXGDK6QY.js";
246
246
  import {
247
247
  NODE_ENGINE_RANGE,
248
248
  VERSION,
249
249
  isNodeVersionSupported
250
- } from "./chunk-U246Z2VX.js";
250
+ } from "./chunk-3S3KL7WX.js";
251
251
  import "./chunk-YOT4GWJV.js";
252
252
  import {
253
253
  createUnifiedRegistry,
@@ -19767,7 +19767,7 @@ function startImprovementReviewScheduler(options) {
19767
19767
  let running = false;
19768
19768
  const runOnce = async () => {
19769
19769
  try {
19770
- const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-OWAZANRS.js");
19770
+ const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-2RXHBKXD.js");
19771
19771
  const input = ImprovementReviewInputSchema2.parse({ fileIssues });
19772
19772
  const result = await runImprovementReview2(input, { logger: logger22 });
19773
19773
  logger22.info("Scheduled improvement_review complete", {
@@ -11,11 +11,11 @@ import {
11
11
  resetCorrelationTracker,
12
12
  runConsensusForGoal,
13
13
  unwrapVoteOrThrow
14
- } from "./chunk-M2MA3LYG.js";
14
+ } from "./chunk-BCYTVOQM.js";
15
15
  import "./chunk-QEZGPM4S.js";
16
16
  import "./chunk-OQB3XC5O.js";
17
- import "./chunk-5FLFU76I.js";
18
- import "./chunk-U246Z2VX.js";
17
+ import "./chunk-IXGDK6QY.js";
18
+ import "./chunk-3S3KL7WX.js";
19
19
  import "./chunk-YOT4GWJV.js";
20
20
  import "./chunk-4O7NQB46.js";
21
21
  import "./chunk-JC3O7WTI.js";
@@ -50,4 +50,4 @@ export {
50
50
  runConsensusForGoal,
51
51
  unwrapVoteOrThrow
52
52
  };
53
- //# sourceMappingURL=consensus-vote-C7UOQMS4.js.map
53
+ //# sourceMappingURL=consensus-vote-IFERTMFX.js.map
@@ -11,9 +11,9 @@ import {
11
11
  loadSelfEvalSignals,
12
12
  registerImprovementReviewTool,
13
13
  runImprovementReview
14
- } from "./chunk-GDHFAXR7.js";
15
- import "./chunk-5FLFU76I.js";
16
- import "./chunk-U246Z2VX.js";
14
+ } from "./chunk-CH2VUXZ4.js";
15
+ import "./chunk-IXGDK6QY.js";
16
+ import "./chunk-3S3KL7WX.js";
17
17
  import "./chunk-YOT4GWJV.js";
18
18
  import "./chunk-QOKSFHWH.js";
19
19
  import "./chunk-7WJGV5DN.js";
@@ -33,4 +33,4 @@ export {
33
33
  registerImprovementReviewTool,
34
34
  runImprovementReview
35
35
  };
36
- //# sourceMappingURL=improvement-review-OWAZANRS.js.map
36
+ //# sourceMappingURL=improvement-review-2RXHBKXD.js.map
package/dist/index.d.ts CHANGED
@@ -25544,6 +25544,11 @@ interface QualityMetrics {
25544
25544
  readonly mrr: number;
25545
25545
  /** Normalized discounted cumulative gain at k. */
25546
25546
  readonly ndcgAtK: number;
25547
+ /**
25548
+ * Queries whose search call returned an error (#5689). Each is scored as
25549
+ * zero precision/recall/MRR rather than dropped from the average.
25550
+ */
25551
+ readonly failedQueries?: number;
25547
25552
  }
25548
25553
  /**
25549
25554
  * Resource usage metrics.
@@ -34026,6 +34031,12 @@ interface TokenBenchmarkResult {
34026
34031
  readonly optimized: TokenMetrics;
34027
34032
  readonly savingsPercent: number;
34028
34033
  readonly meetsMemZeroTarget: boolean;
34034
+ /**
34035
+ * Search calls that returned an error (#5689). When every search failed the
34036
+ * "optimized" context is empty for the wrong reason, so `savingsPercent` is
34037
+ * reported as 0 and the target as not met — not as a 100% saving.
34038
+ */
34039
+ readonly searchesFailed: number;
34029
34040
  }
34030
34041
  /**
34031
34042
  * Estimate token count from text content.
package/dist/index.js CHANGED
@@ -553,7 +553,7 @@ import {
553
553
  withLogging,
554
554
  withRetry,
555
555
  withRetryWrapper
556
- } from "./chunk-GLNBYX4I.js";
556
+ } from "./chunk-VH43TS6U.js";
557
557
  import {
558
558
  FALLBACK_SCANNER_DATA,
559
559
  buildPlanFromAnalysis,
@@ -586,7 +586,7 @@ import {
586
586
  connectTransport,
587
587
  createServer,
588
588
  startStdioServer
589
- } from "./chunk-G3FON2IP.js";
589
+ } from "./chunk-Q777UIJY.js";
590
590
  import {
591
591
  OPENAI_MODELS,
592
592
  OPENAI_MODEL_ALIASES,
@@ -644,7 +644,7 @@ import {
644
644
  generateProposalId,
645
645
  parseAgentPairKey,
646
646
  registerConsensusVoteTool
647
- } from "./chunk-M2MA3LYG.js";
647
+ } from "./chunk-BCYTVOQM.js";
648
648
  import "./chunk-QEZGPM4S.js";
649
649
  import {
650
650
  allOf
@@ -702,7 +702,7 @@ import {
702
702
  import {
703
703
  ImprovementReviewInputSchema,
704
704
  registerImprovementReviewTool
705
- } from "./chunk-GDHFAXR7.js";
705
+ } from "./chunk-CH2VUXZ4.js";
706
706
  import {
707
707
  AgentPerformanceSchema,
708
708
  ConsensusAlgorithmSchema,
@@ -738,10 +738,10 @@ import {
738
738
  toolSuccess,
739
739
  toolSuccessStructured,
740
740
  validateToolInput
741
- } from "./chunk-5FLFU76I.js";
741
+ } from "./chunk-IXGDK6QY.js";
742
742
  import {
743
743
  VERSION
744
- } from "./chunk-U246Z2VX.js";
744
+ } from "./chunk-3S3KL7WX.js";
745
745
  import {
746
746
  AuditTrail,
747
747
  createAuditTrail,
@@ -3318,13 +3318,18 @@ async function measureSearchQuality(backend, data, config) {
3318
3318
  let totalRecall = 0;
3319
3319
  let totalMrr = 0;
3320
3320
  let queries = 0;
3321
+ let failedQueries = 0;
3321
3322
  for (const pattern of config.searchPatterns) {
3322
3323
  const relevant = data.entries.filter(
3323
3324
  (e) => e.content.includes(pattern) || e.tags.includes(pattern)
3324
3325
  );
3325
3326
  if (relevant.length === 0) continue;
3326
3327
  const searchResult = await backend.search(pattern, 10);
3327
- if (!searchResult.ok) continue;
3328
+ if (!searchResult.ok) {
3329
+ queries++;
3330
+ failedQueries++;
3331
+ continue;
3332
+ }
3328
3333
  const retrieved = searchResult.value.map((r) => r.key);
3329
3334
  const metrics = calculatePatternMetrics(retrieved, relevant);
3330
3335
  totalPrecision += metrics.precision;
@@ -3332,7 +3337,10 @@ async function measureSearchQuality(backend, data, config) {
3332
3337
  totalMrr += metrics.mrr;
3333
3338
  queries++;
3334
3339
  }
3335
- return computeAverageMetrics(totalPrecision, totalRecall, totalMrr, queries);
3340
+ return {
3341
+ ...computeAverageMetrics(totalPrecision, totalRecall, totalMrr, queries),
3342
+ failedQueries
3343
+ };
3336
3344
  }
3337
3345
  async function benchmarkSearch(backend, data, config) {
3338
3346
  for (const entry of data.entries) {
@@ -3467,23 +3475,28 @@ async function runTokenBenchmark(backend, config = {}) {
3467
3475
  }
3468
3476
  const baseline = calculateTokenMetrics(data.entries, cfg.searchPatterns.length);
3469
3477
  const searchResults = [];
3478
+ let searchesFailed = 0;
3470
3479
  for (const pattern of cfg.searchPatterns) {
3471
3480
  const result = await backend.search(pattern, 10);
3472
3481
  if (result.ok) {
3473
3482
  searchResults.push(...result.value);
3483
+ } else {
3484
+ searchesFailed++;
3474
3485
  }
3475
3486
  }
3487
+ const searchesSucceeded = cfg.searchPatterns.length - searchesFailed;
3476
3488
  const optimizedEntries = searchResults.map((r) => ({
3477
3489
  content: String(r.value)
3478
3490
  }));
3479
3491
  const optimized = calculateTokenMetrics(optimizedEntries, cfg.searchPatterns.length);
3480
- const savingsPercent = baseline.totalTokens > 0 ? (baseline.totalTokens - optimized.totalTokens) / baseline.totalTokens * 100 : 0;
3492
+ const savingsPercent = baseline.totalTokens > 0 && searchesSucceeded > 0 ? (baseline.totalTokens - optimized.totalTokens) / baseline.totalTokens * 100 : 0;
3481
3493
  results.push({
3482
3494
  datasetSize: size,
3483
3495
  baseline,
3484
3496
  optimized,
3485
3497
  savingsPercent,
3486
- meetsMemZeroTarget: savingsPercent >= 90
3498
+ meetsMemZeroTarget: searchesSucceeded > 0 && savingsPercent >= 90,
3499
+ searchesFailed
3487
3500
  });
3488
3501
  }
3489
3502
  return results;
@@ -3777,6 +3790,13 @@ function formatAdapterLatencyReport(result) {
3777
3790
  lines.push("*Generated by nexus-agents adapter-latency-benchmark*");
3778
3791
  return lines.join("\n");
3779
3792
  }
3793
+ function invocationFailures(results) {
3794
+ return results.filter((r) => r.failureCount > 0).map((r) => {
3795
+ const total = r.successCount + r.failureCount;
3796
+ const detail = r.errors.length > 0 ? ` (${r.errors.join("; ")})` : "";
3797
+ return `${r.adapterName}/${r.scenario}: ${String(r.failureCount)}/${String(total)} invocations failed${detail}`;
3798
+ });
3799
+ }
3780
3800
  function toSuiteResult(result) {
3781
3801
  const operations = result.results.map((r) => ({
3782
3802
  operation: `${r.adapterName}/${r.scenario}`,
@@ -3794,9 +3814,20 @@ function toSuiteResult(result) {
3794
3814
  },
3795
3815
  timestamp: result.timestamp
3796
3816
  }));
3817
+ if (operations.length === 0) {
3818
+ return {
3819
+ name: "CLI Adapter Latency",
3820
+ component: "cli-adapters",
3821
+ version: "1.0.0",
3822
+ operations,
3823
+ environment: result.environment,
3824
+ summary: createBenchmarkSummary([])
3825
+ };
3826
+ }
3797
3827
  const totalDurationMs = operations.reduce((s, op) => s + op.throughput.durationMs, 0);
3798
3828
  const totalOps = operations.reduce((s, op) => s + op.throughput.totalOps, 0);
3799
- const avgP95 = operations.length > 0 ? operations.reduce((s, op) => s + op.latency.p95, 0) / operations.length : 0;
3829
+ const avgP95 = operations.reduce((s, op) => s + op.latency.p95, 0) / operations.length;
3830
+ const failures = invocationFailures(result.results);
3800
3831
  return {
3801
3832
  name: "CLI Adapter Latency",
3802
3833
  component: "cli-adapters",
@@ -3808,8 +3839,8 @@ function toSuiteResult(result) {
3808
3839
  totalOperations: totalOps,
3809
3840
  overallThroughput: totalDurationMs > 0 ? totalOps / totalDurationMs * 1e3 : 0,
3810
3841
  avgP95Latency: avgP95,
3811
- passed: true,
3812
- failures: []
3842
+ passed: failures.length === 0,
3843
+ failures
3813
3844
  }
3814
3845
  };
3815
3846
  }