nexus-agents 9.4.0 → 9.4.1

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.
Files changed (24) hide show
  1. package/dist/{chunk-AI6LKFGU.js → chunk-72IBCL2X.js} +2 -2
  2. package/dist/{chunk-TQEXRC5C.js → chunk-B5YROFD2.js} +8 -8
  3. package/dist/{chunk-ETGNAHY3.js → chunk-IU7CN5UQ.js} +2 -2
  4. package/dist/{chunk-LWLFWWA7.js → chunk-L34WFGDZ.js} +2 -2
  5. package/dist/{chunk-II4XITQ6.js → chunk-OCKU3I4A.js} +3 -3
  6. package/dist/{chunk-ONWH4UGD.js → chunk-PFGLZZ7E.js} +44 -15
  7. package/dist/{chunk-ONWH4UGD.js.map → chunk-PFGLZZ7E.js.map} +1 -1
  8. package/dist/cli.js +7 -7
  9. package/dist/{consensus-vote-RD3SME3K.js → consensus-vote-5PNCR3FT.js} +4 -4
  10. package/dist/{improvement-review-RAISKC3W.js → improvement-review-SRQQBAGG.js} +4 -4
  11. package/dist/index.d.ts +9 -3
  12. package/dist/index.js +6 -6
  13. package/dist/{setup-data-dir-5MRGQD2G.js → setup-data-dir-B6URVYUD.js} +3 -3
  14. package/node_modules/@modelcontextprotocol/sdk/README.md +8 -2
  15. package/node_modules/@modelcontextprotocol/sdk/package.json +1 -1
  16. package/package.json +1 -1
  17. /package/dist/{chunk-AI6LKFGU.js.map → chunk-72IBCL2X.js.map} +0 -0
  18. /package/dist/{chunk-TQEXRC5C.js.map → chunk-B5YROFD2.js.map} +0 -0
  19. /package/dist/{chunk-ETGNAHY3.js.map → chunk-IU7CN5UQ.js.map} +0 -0
  20. /package/dist/{chunk-LWLFWWA7.js.map → chunk-L34WFGDZ.js.map} +0 -0
  21. /package/dist/{chunk-II4XITQ6.js.map → chunk-OCKU3I4A.js.map} +0 -0
  22. /package/dist/{consensus-vote-RD3SME3K.js.map → consensus-vote-5PNCR3FT.js.map} +0 -0
  23. /package/dist/{improvement-review-RAISKC3W.js.map → improvement-review-SRQQBAGG.js.map} +0 -0
  24. /package/dist/{setup-data-dir-5MRGQD2G.js.map → setup-data-dir-B6URVYUD.js.map} +0 -0
@@ -7,7 +7,7 @@ import {
7
7
  toSdkCallback,
8
8
  toolStructuredError,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-ETGNAHY3.js";
10
+ } from "./chunk-IU7CN5UQ.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -2431,4 +2431,4 @@ export {
2431
2431
  runImprovementReview,
2432
2432
  registerImprovementReviewTool
2433
2433
  };
2434
- //# sourceMappingURL=chunk-AI6LKFGU.js.map
2434
+ //# sourceMappingURL=chunk-72IBCL2X.js.map
@@ -58,7 +58,7 @@ import {
58
58
  updateStage,
59
59
  withFileLock,
60
60
  writeJobCancelled
61
- } from "./chunk-ONWH4UGD.js";
61
+ } from "./chunk-PFGLZZ7E.js";
62
62
  import {
63
63
  normalizeTopicToCanonical,
64
64
  synthesizeResearch
@@ -77,7 +77,7 @@ import {
77
77
  } from "./chunk-JNRDNE26.js";
78
78
  import {
79
79
  withPrerequisite
80
- } from "./chunk-AI6LKFGU.js";
80
+ } from "./chunk-72IBCL2X.js";
81
81
  import {
82
82
  NOOP_NOTIFIER,
83
83
  RateLimiter,
@@ -105,7 +105,7 @@ import {
105
105
  toolSuccess,
106
106
  withProgressHeartbeat,
107
107
  wrapToolWithTimeout
108
- } from "./chunk-ETGNAHY3.js";
108
+ } from "./chunk-IU7CN5UQ.js";
109
109
  import {
110
110
  generateSecurityPlan
111
111
  } from "./chunk-6WPXQTQY.js";
@@ -187,7 +187,7 @@ import {
187
187
  import {
188
188
  DEFAULT_TASK_TTL_MS,
189
189
  clampTaskTtl
190
- } from "./chunk-II4XITQ6.js";
190
+ } from "./chunk-OCKU3I4A.js";
191
191
  import {
192
192
  allOf,
193
193
  anyOf
@@ -196,7 +196,7 @@ import {
196
196
  VERSION,
197
197
  createRequestContext,
198
198
  measuredTrustTier
199
- } from "./chunk-LWLFWWA7.js";
199
+ } from "./chunk-L34WFGDZ.js";
200
200
  import {
201
201
  isGatewayModelAdapter
202
202
  } from "./chunk-C5WECFBR.js";
@@ -47320,7 +47320,7 @@ function buildVotingInput(plan, config) {
47320
47320
  }
47321
47321
  async function executeSingleVote(plan, config, log) {
47322
47322
  try {
47323
- const { executeVoting } = await import("./consensus-vote-RD3SME3K.js");
47323
+ const { executeVoting } = await import("./consensus-vote-5PNCR3FT.js");
47324
47324
  const input = buildVotingInput(plan, config);
47325
47325
  const result = await executeVoting(input, log);
47326
47326
  return parseVotingResult(result);
@@ -49149,7 +49149,7 @@ function createVoteStage({ config, startStage }) {
49149
49149
  const strategy = config.votingStrategy ?? "higher_order";
49150
49150
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
49151
49151
  try {
49152
- const { executeVoting } = await import("./consensus-vote-RD3SME3K.js");
49152
+ const { executeVoting } = await import("./consensus-vote-5PNCR3FT.js");
49153
49153
  const proposal = buildVoteProposal(plan, research);
49154
49154
  const votingResult = await executeVoting(
49155
49155
  {
@@ -59126,4 +59126,4 @@ export {
59126
59126
  initializeSandbox,
59127
59127
  getSandboxMode
59128
59128
  };
59129
- //# sourceMappingURL=chunk-TQEXRC5C.js.map
59129
+ //# sourceMappingURL=chunk-B5YROFD2.js.map
@@ -5,7 +5,7 @@ import {
5
5
  getCurrentRequestContext,
6
6
  runWithRequestContext,
7
7
  serverCallerInfo
8
- } from "./chunk-LWLFWWA7.js";
8
+ } from "./chunk-L34WFGDZ.js";
9
9
  import {
10
10
  DEFAULT_EXECUTION_MODE
11
11
  } from "./chunk-ECJ52NSK.js";
@@ -2343,4 +2343,4 @@ export {
2343
2343
  DEFAULT_CONSENSUS_CONFIG,
2344
2344
  ConsensusMetricsSchema
2345
2345
  };
2346
- //# sourceMappingURL=chunk-ETGNAHY3.js.map
2346
+ //# sourceMappingURL=chunk-IU7CN5UQ.js.map
@@ -4,7 +4,7 @@ import {
4
4
 
5
5
  // src/version.ts
6
6
  import semver from "semver";
7
- var VERSION = true ? "9.4.0" : "dev";
7
+ var VERSION = true ? "9.4.1" : "dev";
8
8
  var NODE_ENGINE_RANGE = ">=24";
9
9
  function isNodeVersionSupported(version) {
10
10
  return semver.satisfies(version, NODE_ENGINE_RANGE);
@@ -106,4 +106,4 @@ export {
106
106
  contextForLogging,
107
107
  measuredTrustTier
108
108
  };
109
- //# sourceMappingURL=chunk-LWLFWWA7.js.map
109
+ //# sourceMappingURL=chunk-L34WFGDZ.js.map
@@ -7,7 +7,7 @@ import {
7
7
  VERSION,
8
8
  isNodeVersionSupported,
9
9
  recordServerTransport
10
- } from "./chunk-LWLFWWA7.js";
10
+ } from "./chunk-L34WFGDZ.js";
11
11
  import {
12
12
  checkGatewayHealth,
13
13
  cliFailsVerdict,
@@ -1575,7 +1575,7 @@ async function runDoctorFix(result) {
1575
1575
  writeLine2("\u2500".repeat(40));
1576
1576
  let fixCount = 0;
1577
1577
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1578
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-5MRGQD2G.js");
1578
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-B6URVYUD.js");
1579
1579
  const outcome = describeDataDirFix2(initDataDirectories2());
1580
1580
  writeLine2(outcome.line);
1581
1581
  if (outcome.counted) fixCount++;
@@ -1680,4 +1680,4 @@ export {
1680
1680
  startStdioServer,
1681
1681
  closeServer
1682
1682
  };
1683
- //# sourceMappingURL=chunk-II4XITQ6.js.map
1683
+ //# sourceMappingURL=chunk-OCKU3I4A.js.map
@@ -21,7 +21,7 @@ import {
21
21
  toolSuccess,
22
22
  withProgressHeartbeat,
23
23
  wrapToolWithTimeout
24
- } from "./chunk-ETGNAHY3.js";
24
+ } from "./chunk-IU7CN5UQ.js";
25
25
  import {
26
26
  getToolMemory
27
27
  } from "./chunk-2AN5NGCQ.js";
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-EZNIYU5T.js";
31
31
  import {
32
32
  VERSION
33
- } from "./chunk-LWLFWWA7.js";
33
+ } from "./chunk-L34WFGDZ.js";
34
34
  import {
35
35
  isGatewayModelAdapter
36
36
  } from "./chunk-C5WECFBR.js";
@@ -7631,11 +7631,20 @@ async function attachPartialsOnCancel(jobId, toolName, body) {
7631
7631
  }
7632
7632
 
7633
7633
  // src/orchestration/outcomes/outcome-store-persistence.ts
7634
- import { appendFileSync as appendFileSync2, readFileSync as readFileSync6, writeFileSync as writeFileSync3, existsSync as existsSync5 } from "node:fs";
7634
+ import {
7635
+ appendFileSync as appendFileSync2,
7636
+ readFileSync as readFileSync6,
7637
+ writeFileSync as writeFileSync3,
7638
+ existsSync as existsSync5,
7639
+ renameSync,
7640
+ rmSync
7641
+ } from "node:fs";
7635
7642
  var PersistedOutcomeSchema = TaskOutcomeSchema.loose();
7636
7643
  var PersistentOutcomeStore = class extends OutcomeStore {
7637
7644
  filePath;
7638
7645
  logger;
7646
+ /** Raw unreadable segments, including their original line terminators. */
7647
+ unreadableLines = [];
7639
7648
  constructor(config, logger12) {
7640
7649
  super(config);
7641
7650
  this.filePath = config?.filePath ?? getOutcomesFile();
@@ -7691,7 +7700,7 @@ var PersistentOutcomeStore = class extends OutcomeStore {
7691
7700
  }
7692
7701
  try {
7693
7702
  const content = readFileSync6(this.filePath, "utf-8");
7694
- const lines = content.split("\n").filter((line) => line.trim().length > 0);
7703
+ const lines = content.split(/(?<=\n)/).filter((line) => line.trim().length > 0);
7695
7704
  let loaded = 0;
7696
7705
  let skipped = 0;
7697
7706
  for (const line of lines) {
@@ -7702,16 +7711,23 @@ var PersistentOutcomeStore = class extends OutcomeStore {
7702
7711
  super.append(result.data);
7703
7712
  loaded++;
7704
7713
  } else {
7714
+ this.unreadableLines.push(line);
7705
7715
  skipped++;
7706
7716
  }
7707
- } catch (parseErr) {
7708
- this.logger.debug("Skipping malformed outcome line during hydration", {
7709
- error: getErrorMessage(parseErr),
7710
- linePreview: line.slice(0, 80)
7711
- });
7717
+ } catch {
7718
+ this.unreadableLines.push(line);
7712
7719
  skipped++;
7713
7720
  }
7714
7721
  }
7722
+ if (skipped > 0) {
7723
+ this.logger.warn(
7724
+ "Skipped unreadable outcome lines during hydration; preserving them on rewrite",
7725
+ {
7726
+ skipped,
7727
+ path: this.filePath
7728
+ }
7729
+ );
7730
+ }
7715
7731
  this.logger.info("Hydrated outcomes from disk", {
7716
7732
  loaded,
7717
7733
  skipped,
@@ -7719,25 +7735,38 @@ var PersistentOutcomeStore = class extends OutcomeStore {
7719
7735
  path: this.filePath
7720
7736
  });
7721
7737
  } catch (error) {
7722
- const msg = getErrorMessage(error);
7723
7738
  this.logger.warn("Failed to hydrate outcomes from disk", {
7724
- error: msg,
7739
+ error: getErrorMessage(error),
7725
7740
  path: this.filePath
7726
7741
  });
7727
7742
  }
7728
7743
  }
7729
- /** Rewrite the JSONL file from in-memory state after reclassification. */
7744
+ /**
7745
+ * Atomically rewrite readable records, then append unreadable segments verbatim.
7746
+ * Their relative order is preserved; their positions among readable records may
7747
+ * change after reclassification, purge or FIFO eviction (#7146).
7748
+ */
7730
7749
  rewriteFile() {
7750
+ const tmpPath = `${this.filePath}.tmp.${String(process.pid)}`;
7731
7751
  try {
7732
7752
  const entries = this.query();
7733
- const content = entries.map((e) => JSON.stringify(e)).join("\n") + "\n";
7734
- writeFileSync3(this.filePath, content, "utf-8");
7753
+ const content = entries.map((e) => JSON.stringify(e) + "\n").join("") + this.unreadableLines.join("");
7754
+ writeFileSync3(tmpPath, content, "utf-8");
7755
+ renameSync(tmpPath, this.filePath);
7735
7756
  } catch (error) {
7736
7757
  const msg = getErrorMessage(error);
7737
7758
  this.logger.warn("Failed to rewrite outcomes file after reclassification", {
7738
7759
  error: msg,
7739
7760
  path: this.filePath
7740
7761
  });
7762
+ try {
7763
+ rmSync(tmpPath, { force: true });
7764
+ } catch (cleanupError) {
7765
+ this.logger.debug("Failed to clean up temporary outcomes file", {
7766
+ error: getErrorMessage(cleanupError),
7767
+ path: tmpPath
7768
+ });
7769
+ }
7741
7770
  }
7742
7771
  }
7743
7772
  persistLine(outcome) {
@@ -9841,4 +9870,4 @@ export {
9841
9870
  CONSENSUS_VOTE_TOOL_SCHEMA,
9842
9871
  registerConsensusVoteTool
9843
9872
  };
9844
- //# sourceMappingURL=chunk-ONWH4UGD.js.map
9873
+ //# sourceMappingURL=chunk-PFGLZZ7E.js.map