nexus-agents 8.22.3 → 8.22.4

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-Z7ORWDXO.js";
11
+ } from "./chunk-5HAGSY6E.js";
12
12
  import {
13
13
  capitalize
14
14
  } from "./chunk-7LP6VJRP.js";
@@ -1218,7 +1218,7 @@ async function runDoctorFix(result) {
1218
1218
  writeLine2("\u2500".repeat(40));
1219
1219
  let fixCount = 0;
1220
1220
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1221
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-2LQSQCYM.js");
1221
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-NIV65UAR.js");
1222
1222
  const outcome = describeDataDirFix2(initDataDirectories2());
1223
1223
  writeLine2(outcome.line);
1224
1224
  if (outcome.counted) fixCount++;
@@ -1320,4 +1320,4 @@ export {
1320
1320
  startStdioServer,
1321
1321
  closeServer
1322
1322
  };
1323
- //# sourceMappingURL=chunk-MGG466HO.js.map
1323
+ //# sourceMappingURL=chunk-3GFNNZTS.js.map
@@ -1,6 +1,6 @@
1
1
  // src/version.ts
2
2
  import semver from "semver";
3
- var VERSION = true ? "8.22.3" : "dev";
3
+ var VERSION = true ? "8.22.4" : "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-Z7ORWDXO.js.map
14
+ //# sourceMappingURL=chunk-5HAGSY6E.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-M4DC2HYF.js";
10
+ } from "./chunk-XNZHNPAX.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-7LFNF4PD.js.map
2162
+ //# sourceMappingURL=chunk-AXZJNY4F.js.map
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-MGG466HO.js";
24
+ } from "./chunk-3GFNNZTS.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-CN3VAMQD.js";
@@ -48,7 +48,7 @@ import {
48
48
  simulationDeniedResult,
49
49
  toJobSummary,
50
50
  writeJobCancelled
51
- } from "./chunk-TB2USTOO.js";
51
+ } from "./chunk-ZV4XS5LW.js";
52
52
  import {
53
53
  allOf
54
54
  } from "./chunk-OQB3XC5O.js";
@@ -67,7 +67,7 @@ import {
67
67
  } from "./chunk-OYTRYITB.js";
68
68
  import {
69
69
  withPrerequisite
70
- } from "./chunk-7LFNF4PD.js";
70
+ } from "./chunk-AXZJNY4F.js";
71
71
  import {
72
72
  NOOP_NOTIFIER,
73
73
  RateLimiter,
@@ -92,7 +92,7 @@ import {
92
92
  withAuditTrail,
93
93
  withProgressHeartbeat,
94
94
  wrapToolWithTimeout
95
- } from "./chunk-M4DC2HYF.js";
95
+ } from "./chunk-XNZHNPAX.js";
96
96
  import {
97
97
  createAuditTrail,
98
98
  createGraphAuditBridge,
@@ -45987,7 +45987,7 @@ function buildVotingInput(plan, config) {
45987
45987
  }
45988
45988
  async function executeSingleVote(plan, config, log) {
45989
45989
  try {
45990
- const { executeVoting } = await import("./consensus-vote-NM44VYAZ.js");
45990
+ const { executeVoting } = await import("./consensus-vote-L6YSUPHT.js");
45991
45991
  const input = buildVotingInput(plan, config);
45992
45992
  const result = await executeVoting(input, log);
45993
45993
  return parseVotingResult(result);
@@ -47759,7 +47759,7 @@ ${contextBlock}`;
47759
47759
  const strategy = config.votingStrategy ?? "higher_order";
47760
47760
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47761
47761
  try {
47762
- const { executeVoting } = await import("./consensus-vote-NM44VYAZ.js");
47762
+ const { executeVoting } = await import("./consensus-vote-L6YSUPHT.js");
47763
47763
  const votingResult = await executeVoting(
47764
47764
  {
47765
47765
  proposal: buildVoteProposal(plan, research),
@@ -56444,4 +56444,4 @@ export {
56444
56444
  shutdownFeedbackSubscriber,
56445
56445
  createEventBusBridge
56446
56446
  };
56447
- //# sourceMappingURL=chunk-NDWIQFXW.js.map
56447
+ //# sourceMappingURL=chunk-SZUUY4MP.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-Z7ORWDXO.js";
3
+ } from "./chunk-5HAGSY6E.js";
4
4
  import {
5
5
  emitClawGuardViolation
6
6
  } from "./chunk-YOT4GWJV.js";
@@ -2246,4 +2246,4 @@ export {
2246
2246
  VOTING_THRESHOLDS,
2247
2247
  ConsensusMetricsSchema
2248
2248
  };
2249
- //# sourceMappingURL=chunk-M4DC2HYF.js.map
2249
+ //# sourceMappingURL=chunk-XNZHNPAX.js.map
@@ -23,10 +23,10 @@ import {
23
23
  toolSuccessStructured,
24
24
  withProgressHeartbeat,
25
25
  wrapToolWithTimeout
26
- } from "./chunk-M4DC2HYF.js";
26
+ } from "./chunk-XNZHNPAX.js";
27
27
  import {
28
28
  VERSION
29
- } from "./chunk-Z7ORWDXO.js";
29
+ } from "./chunk-5HAGSY6E.js";
30
30
  import {
31
31
  assessPanelIndependence,
32
32
  countDistinctModels,
@@ -7205,4 +7205,4 @@ export {
7205
7205
  CONSENSUS_VOTE_TOOL_SCHEMA,
7206
7206
  registerConsensusVoteTool
7207
7207
  };
7208
- //# sourceMappingURL=chunk-TB2USTOO.js.map
7208
+ //# sourceMappingURL=chunk-ZV4XS5LW.js.map
package/dist/cli.js CHANGED
@@ -157,7 +157,7 @@ import {
157
157
  validateNexusEnv,
158
158
  validateWorkflow,
159
159
  wrapInMarkdownFence
160
- } from "./chunk-NDWIQFXW.js";
160
+ } from "./chunk-SZUUY4MP.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-MGG466HO.js";
180
+ } from "./chunk-3GFNNZTS.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-TB2USTOO.js";
199
+ } from "./chunk-ZV4XS5LW.js";
200
200
  import {
201
201
  loadUsageEvents,
202
202
  rollupByModel
@@ -236,17 +236,17 @@ import {
236
236
  registerImprovementReviewTool,
237
237
  runImprovementReview,
238
238
  scanForSecrets
239
- } from "./chunk-7LFNF4PD.js";
239
+ } from "./chunk-AXZJNY4F.js";
240
240
  import {
241
241
  createDefaultPolicyFirewall,
242
242
  setGlobalPolicyFirewall,
243
243
  stagePolicyFirewallForRollout
244
- } from "./chunk-M4DC2HYF.js";
244
+ } from "./chunk-XNZHNPAX.js";
245
245
  import {
246
246
  NODE_ENGINE_RANGE,
247
247
  VERSION,
248
248
  isNodeVersionSupported
249
- } from "./chunk-Z7ORWDXO.js";
249
+ } from "./chunk-5HAGSY6E.js";
250
250
  import "./chunk-YOT4GWJV.js";
251
251
  import {
252
252
  createUnifiedRegistry,
@@ -10089,12 +10089,13 @@ async function handleStatusCommand(args, options) {
10089
10089
  format
10090
10090
  };
10091
10091
  const result = await getResearchStatus(statusOptions);
10092
- return formatStatusResult(result, format);
10092
+ const text = formatStatusResult(result, format);
10093
+ return result.success ? text : failure(text);
10093
10094
  }
10094
10095
  async function handleOverlapCommand(args, options) {
10095
10096
  const techniqueId = args[0];
10096
10097
  if (techniqueId === void 0 || techniqueId === "") {
10097
- return "Error: technique-id is required for overlap command";
10098
+ return failure("Error: technique-id is required for overlap command");
10098
10099
  }
10099
10100
  const format = optString(options, "format") ?? "table";
10100
10101
  const overlapOptions = {
@@ -10103,12 +10104,13 @@ async function handleOverlapCommand(args, options) {
10103
10104
  format
10104
10105
  };
10105
10106
  const result = await findOverlaps(overlapOptions);
10106
- return formatOverlapResult(result, format);
10107
+ const text = formatOverlapResult(result, format);
10108
+ return result.success ? text : failure(text);
10107
10109
  }
10108
10110
  async function handleAddCommand(args, options) {
10109
10111
  const arxivId = args[0];
10110
10112
  if (arxivId === void 0 || arxivId === "") {
10111
- return "Error: arxiv-id is required for add command";
10113
+ return failure("Error: arxiv-id is required for add command");
10112
10114
  }
10113
10115
  const topic = optString(options, "topic");
10114
10116
  const priority = optString(options, "priority");
@@ -10172,7 +10174,7 @@ function renderDiscoverResponse(response) {
10172
10174
  async function handleDiscoverCommand(args, options) {
10173
10175
  const topic = args[0] ?? optString(options, "topic");
10174
10176
  if (topic === void 0 || topic === "") {
10175
- return "Error: --topic is required for discover command";
10177
+ return failure("Error: --topic is required for discover command");
10176
10178
  }
10177
10179
  const parsed = ResearchDiscoverInputSchema.safeParse({
10178
10180
  topic,
@@ -10182,7 +10184,7 @@ async function handleDiscoverCommand(args, options) {
10182
10184
  }
10183
10185
  });
10184
10186
  if (!parsed.success) {
10185
- return `Error: ${parsed.error.issues.map((i) => i.message).join("; ")}`;
10187
+ return failure(`Error: ${parsed.error.issues.map((i) => i.message).join("; ")}`);
10186
10188
  }
10187
10189
  const logger22 = createLogger({ component: "cli-research-discover" });
10188
10190
  const response = await executeDiscovery(parsed.data, logger22);
@@ -10191,7 +10193,7 @@ async function handleDiscoverCommand(args, options) {
10191
10193
  async function handleReviewCommand(args, options) {
10192
10194
  const topic = args[0] ?? optString(options, "topic");
10193
10195
  if (topic === void 0 || topic === "") {
10194
- return "Error: --topic is required for review command";
10196
+ return failure("Error: --topic is required for review command");
10195
10197
  }
10196
10198
  const maxResults = optNumber(options, "maxResults") ?? 10;
10197
10199
  const createIssues = optBoolean(options, "createIssues");
@@ -10211,7 +10213,7 @@ async function handleSynthesizeCommand(args, options) {
10211
10213
  const topic = args[0] ?? optString(options, "topic");
10212
10214
  const result = await synthesizeResearch(topic);
10213
10215
  if (!result.ok) {
10214
- return `Error: ${result.error.message}`;
10216
+ return failure(`Error: ${result.error.message}`);
10215
10217
  }
10216
10218
  return formatSynthesisResult(result.value);
10217
10219
  }
@@ -10328,26 +10330,25 @@ var VALID_SUBCOMMANDS = [
10328
10330
  function isValidResearchSubcommand(value) {
10329
10331
  return value !== void 0 && VALID_SUBCOMMANDS.includes(value);
10330
10332
  }
10333
+ function failure(text) {
10334
+ return { text, exitCode: 1 };
10335
+ }
10331
10336
  function ok2(handler) {
10332
- return async (args, options) => ({
10333
- text: await handler(args, options),
10334
- exitCode: 0
10335
- });
10337
+ return async (args, options) => {
10338
+ const result = await handler(args, options);
10339
+ if (typeof result !== "string") return result;
10340
+ return { text: result, exitCode: result.startsWith("Error:") ? 1 : 0 };
10341
+ };
10336
10342
  }
10337
10343
  async function handleIndexCommand(args) {
10338
10344
  const indexOptions = parseResearchIndexArgs(args);
10339
10345
  const result = await researchIndexCommand(indexOptions);
10340
10346
  return { text: result.message, exitCode: result.exitCode };
10341
10347
  }
10342
- async function handleAddCommandWithExit(args, options) {
10343
- const text = await handleAddCommand(args, options);
10344
- const exitCode = text.startsWith("Error:") ? 1 : 0;
10345
- return { text, exitCode };
10346
- }
10347
10348
  var SUBCOMMAND_HANDLERS = {
10348
10349
  status: ok2(handleStatusCommand),
10349
10350
  overlap: ok2(handleOverlapCommand),
10350
- add: handleAddCommandWithExit,
10351
+ add: ok2(handleAddCommand),
10351
10352
  stats: ok2((_args, options) => handleStatsCommand(options)),
10352
10353
  refresh: ok2((_args, options) => handleRefreshCommand(options)),
10353
10354
  check: ok2(() => handleCheckCommand()),
@@ -19721,7 +19722,7 @@ function startImprovementReviewScheduler(options) {
19721
19722
  let running = false;
19722
19723
  const runOnce = async () => {
19723
19724
  try {
19724
- const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-BTH44AEV.js");
19725
+ const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-RX23MLAD.js");
19725
19726
  const input = ImprovementReviewInputSchema2.parse({ fileIssues });
19726
19727
  const result = await runImprovementReview2(input, { logger: logger22 });
19727
19728
  logger22.info("Scheduled improvement_review complete", {
@@ -22552,7 +22553,8 @@ var RESEARCH_HELP = {
22552
22553
  ],
22553
22554
  flags: [
22554
22555
  { flag: "--format=<fmt>", description: "Output format: table, json", defaultValue: "table" },
22555
- { flag: "-o, --output=<path>", description: "Custom output path for refresh" }
22556
+ { flag: "-o, --output=<path>", description: "Custom output path for refresh" },
22557
+ { flag: "--source=<source>", description: "Discovery source for the discover subcommand" }
22556
22558
  ]
22557
22559
  };
22558
22560
  var FITNESS_AUDIT_HELP = {
@@ -22697,6 +22699,15 @@ function printResearchUsage() {
22697
22699
  process.stdout.write(" discover Discover papers/repos from external sources\n");
22698
22700
  process.stdout.write(" review Discover, score, and rank research findings\n");
22699
22701
  process.stdout.write(" prioritize Rank actionable techniques by priority\n");
22702
+ const flags = getCommandHelp("research")?.flags ?? [];
22703
+ if (flags.length > 0) {
22704
+ process.stdout.write("Options:\n");
22705
+ for (const entry of flags) {
22706
+ const suffix = entry.defaultValue === void 0 ? "" : ` (default: ${entry.defaultValue})`;
22707
+ process.stdout.write(` ${entry.flag} ${entry.description}${suffix}
22708
+ `);
22709
+ }
22710
+ }
22700
22711
  }
22701
22712
 
22702
22713
  // src/cli-command-suggester.ts
@@ -23017,6 +23028,16 @@ async function handleResearchCommand(args) {
23017
23028
  if (args.options.dryRun) {
23018
23029
  options["dryRun"] = true;
23019
23030
  }
23031
+ if (args.options.source !== void 0) {
23032
+ const source = ResearchDiscoverInputSchema.shape.source.safeParse(args.options.source);
23033
+ if (!source.success) {
23034
+ const message = `Invalid research source: ${args.options.source}`;
23035
+ process.stdout.write(`Error: ${message}
23036
+ `);
23037
+ return cliExit(EXIT_CODES.INVALID_ARGS, message);
23038
+ }
23039
+ options["source"] = source.data;
23040
+ }
23020
23041
  try {
23021
23042
  const result = await researchCommand(subcommand, positionalArgs, options);
23022
23043
  process.stdout.write(result.text + "\n");
@@ -24640,8 +24661,8 @@ ${colors.green}${symbols.check} All thresholds passed${colors.reset}`);
24640
24661
  }
24641
24662
  writeLine5(`
24642
24663
  ${colors.red}${symbols.cross} Threshold validation failed:${colors.reset}`);
24643
- for (const failure of failures) {
24644
- writeLine5(` ${colors.red}${symbols.bullet} ${failure}${colors.reset}`);
24664
+ for (const failure2 of failures) {
24665
+ writeLine5(` ${colors.red}${symbols.bullet} ${failure2}${colors.reset}`);
24645
24666
  }
24646
24667
  return false;
24647
24668
  }