nexus-agents 8.26.0 → 8.26.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.
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-D2EMIL3K.js";
24
+ } from "./chunk-WSUMZZPR.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-4EZINMIF.js";
58
+ } from "./chunk-QYEKMS52.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-FETVEDXN.js";
78
+ } from "./chunk-MWYXL4HA.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-7P2GCEXB.js";
103
+ } from "./chunk-YJVIPATJ.js";
104
104
  import {
105
105
  createAuditTrail,
106
106
  createGraphAuditBridge,
@@ -45672,7 +45672,7 @@ function buildVotingInput(plan, config) {
45672
45672
  }
45673
45673
  async function executeSingleVote(plan, config, log) {
45674
45674
  try {
45675
- const { executeVoting } = await import("./consensus-vote-6WG636MI.js");
45675
+ const { executeVoting } = await import("./consensus-vote-PQMLWFST.js");
45676
45676
  const input = buildVotingInput(plan, config);
45677
45677
  const result = await executeVoting(input, log);
45678
45678
  return parseVotingResult(result);
@@ -47464,7 +47464,7 @@ ${contextBlock}`;
47464
47464
  const strategy = config.votingStrategy ?? "higher_order";
47465
47465
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47466
47466
  try {
47467
- const { executeVoting } = await import("./consensus-vote-6WG636MI.js");
47467
+ const { executeVoting } = await import("./consensus-vote-PQMLWFST.js");
47468
47468
  const votingResult = await executeVoting(
47469
47469
  {
47470
47470
  proposal: buildVoteProposal(plan, research),
@@ -56180,4 +56180,4 @@ export {
56180
56180
  shutdownFeedbackSubscriber,
56181
56181
  createEventBusBridge
56182
56182
  };
56183
- //# sourceMappingURL=chunk-TDPV3VO5.js.map
56183
+ //# sourceMappingURL=chunk-4T3NJARF.js.map
@@ -1,6 +1,6 @@
1
1
  // src/version.ts
2
2
  import semver from "semver";
3
- var VERSION = true ? "8.26.0" : "dev";
3
+ var VERSION = true ? "8.26.2" : "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-XR4LCWG2.js.map
14
+ //# sourceMappingURL=chunk-6UCSYXS7.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-7P2GCEXB.js";
10
+ } from "./chunk-YJVIPATJ.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-FETVEDXN.js.map
2162
+ //# sourceMappingURL=chunk-MWYXL4HA.js.map
@@ -23,10 +23,10 @@ import {
23
23
  toolSuccessStructured,
24
24
  withProgressHeartbeat,
25
25
  wrapToolWithTimeout
26
- } from "./chunk-7P2GCEXB.js";
26
+ } from "./chunk-YJVIPATJ.js";
27
27
  import {
28
28
  VERSION
29
- } from "./chunk-XR4LCWG2.js";
29
+ } from "./chunk-6UCSYXS7.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-4EZINMIF.js.map
7685
+ //# sourceMappingURL=chunk-QYEKMS52.js.map
@@ -8,7 +8,7 @@ import {
8
8
  NODE_ENGINE_RANGE,
9
9
  VERSION,
10
10
  isNodeVersionSupported
11
- } from "./chunk-XR4LCWG2.js";
11
+ } from "./chunk-6UCSYXS7.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-HAQK23WQ.js");
1231
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-UMMVAIQI.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-D2EMIL3K.js.map
1333
+ //# sourceMappingURL=chunk-WSUMZZPR.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-XR4LCWG2.js";
3
+ } from "./chunk-6UCSYXS7.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-7P2GCEXB.js.map
2258
+ //# sourceMappingURL=chunk-YJVIPATJ.js.map
package/dist/cli.js CHANGED
@@ -157,7 +157,7 @@ import {
157
157
  validateNexusEnv,
158
158
  validateWorkflow,
159
159
  wrapInMarkdownFence
160
- } from "./chunk-TDPV3VO5.js";
160
+ } from "./chunk-4T3NJARF.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-D2EMIL3K.js";
180
+ } from "./chunk-WSUMZZPR.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-4EZINMIF.js";
199
+ } from "./chunk-QYEKMS52.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-FETVEDXN.js";
239
+ } from "./chunk-MWYXL4HA.js";
240
240
  import {
241
241
  createDefaultPolicyFirewall,
242
242
  setGlobalPolicyFirewall,
243
243
  setSecureHandlerAuditLogger,
244
244
  stagePolicyFirewallForRollout
245
- } from "./chunk-7P2GCEXB.js";
245
+ } from "./chunk-YJVIPATJ.js";
246
246
  import {
247
247
  NODE_ENGINE_RANGE,
248
248
  VERSION,
249
249
  isNodeVersionSupported
250
- } from "./chunk-XR4LCWG2.js";
250
+ } from "./chunk-6UCSYXS7.js";
251
251
  import "./chunk-YOT4GWJV.js";
252
252
  import {
253
253
  createUnifiedRegistry,
@@ -2716,14 +2716,14 @@ var EvaluationAggregator = class {
2716
2716
  const timestamp = new Date(getTimeProvider().now());
2717
2717
  auditTrail.push({
2718
2718
  timestamp,
2719
- agent: "code-quality",
2719
+ agent: "aggregator",
2720
2720
  claim: "Aggregation started",
2721
2721
  evidence: `${String(evaluations.length)} evaluations received`,
2722
2722
  verified: true
2723
2723
  });
2724
2724
  auditTrail.push({
2725
2725
  timestamp: new Date(getTimeProvider().now()),
2726
- agent: "code-quality",
2726
+ agent: "aggregator",
2727
2727
  claim: `Component classified as ${criticality}`,
2728
2728
  evidence: componentPath,
2729
2729
  verified: true
@@ -2762,7 +2762,7 @@ var EvaluationAggregator = class {
2762
2762
  finalizeAuditTrail(auditTrail, recommendation, confidence, evidenceQuality) {
2763
2763
  auditTrail.push({
2764
2764
  timestamp: new Date(getTimeProvider().now()),
2765
- agent: "code-quality",
2765
+ agent: "aggregator",
2766
2766
  claim: `Final recommendation: ${recommendation}`,
2767
2767
  evidence: `Confidence: ${confidence.toFixed(2)}, Evidence quality: ${evidenceQuality.toFixed(2)}`,
2768
2768
  verified: true
@@ -2896,7 +2896,7 @@ function selfEvalOutcomeId(componentPath) {
2896
2896
  const sanitized = componentPath.replace(/[^a-zA-Z0-9._/-]/g, "_");
2897
2897
  return `self-eval-${sanitized}`;
2898
2898
  }
2899
- function aggregatedResultToOutcome(result) {
2899
+ function aggregatedResultToOutcome(result, timing) {
2900
2900
  const success = result.finalRecommendation === "retain";
2901
2901
  const qualitySignals = [
2902
2902
  SELF_EVAL_MARKER,
@@ -2910,7 +2910,7 @@ function aggregatedResultToOutcome(result) {
2910
2910
  category: "code_review",
2911
2911
  model: "claude-default",
2912
2912
  success,
2913
- durationMs: 0,
2913
+ durationMs: timing.durationMs,
2914
2914
  timestamp: result.timestamp.toISOString(),
2915
2915
  qualitySignals,
2916
2916
  source: "manual"
@@ -3081,11 +3081,15 @@ function printJsonMode(commandResult) {
3081
3081
  }
3082
3082
 
3083
3083
  // src/cli/self-eval.ts
3084
- function persistResults(results, store) {
3084
+ function persistResults(results, store, evaluationMsByComponent) {
3085
3085
  const log = createLogger({ component: "self-eval" });
3086
3086
  for (const result of results) {
3087
3087
  try {
3088
- store.append(aggregatedResultToOutcome(result));
3088
+ const durationMs = evaluationMsByComponent.get(result.component);
3089
+ if (durationMs === void 0) {
3090
+ throw new Error(`no measured evaluation time for ${result.component}`);
3091
+ }
3092
+ store.append(aggregatedResultToOutcome(result, { durationMs }));
3089
3093
  } catch (error) {
3090
3094
  log.warn("Failed to persist self-eval outcome", {
3091
3095
  component: result.component,
@@ -3103,14 +3107,17 @@ async function evaluateDirectory(target, timeoutMs, store = getOutcomeStore()) {
3103
3107
  skipTests: false
3104
3108
  });
3105
3109
  const evaluationsByComponent = /* @__PURE__ */ new Map();
3110
+ const evaluationMsByComponent = /* @__PURE__ */ new Map();
3106
3111
  let timedOut = false;
3107
3112
  for (const component of inventory.components) {
3108
3113
  if (time.now() > deadline) {
3109
3114
  timedOut = true;
3110
3115
  break;
3111
3116
  }
3117
+ const evalStart = performance.now();
3112
3118
  const evaluations = await evaluateComponentWithTimeout(component, deadline - time.now());
3113
3119
  evaluationsByComponent.set(component.path, [...evaluations]);
3120
+ evaluationMsByComponent.set(component.path, performance.now() - evalStart);
3114
3121
  }
3115
3122
  const aggregator = createAggregator();
3116
3123
  const results = [];
@@ -3121,7 +3128,7 @@ async function evaluateDirectory(target, timeoutMs, store = getOutcomeStore()) {
3121
3128
  }
3122
3129
  const priority = { deprecate: 0, refactor: 1, review: 2, retain: 3 };
3123
3130
  results.sort((a, b) => priority[a.finalRecommendation] - priority[b.finalRecommendation]);
3124
- persistResults(results, store);
3131
+ persistResults(results, store, evaluationMsByComponent);
3125
3132
  return {
3126
3133
  results,
3127
3134
  componentsScanned: inventory.totalFiles,
@@ -19748,7 +19755,7 @@ function startImprovementReviewScheduler(options) {
19748
19755
  let running = false;
19749
19756
  const runOnce = async () => {
19750
19757
  try {
19751
- const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-RIFOUVXG.js");
19758
+ const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-5C7DBVI2.js");
19752
19759
  const input = ImprovementReviewInputSchema2.parse({ fileIssues });
19753
19760
  const result = await runImprovementReview2(input, { logger: logger22 });
19754
19761
  logger22.info("Scheduled improvement_review complete", {