nexus-agents 4.15.2 → 4.15.3

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.
@@ -6714,6 +6714,7 @@ export {
6714
6714
  VoteThresholdSchema,
6715
6715
  ConsensusVoteInputSchema,
6716
6716
  mapOutcomeToDecision,
6717
+ recordAuthenticVote,
6717
6718
  recordDecisionCost,
6718
6719
  checkSimulationAllowed,
6719
6720
  simulationDeniedResult,
@@ -6728,4 +6729,4 @@ export {
6728
6729
  CONSENSUS_VOTE_TOOL_SCHEMA,
6729
6730
  registerConsensusVoteTool
6730
6731
  };
6731
- //# sourceMappingURL=chunk-KTMBBIFH.js.map
6732
+ //# sourceMappingURL=chunk-E4JHFE2E.js.map
@@ -170,7 +170,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
170
170
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
171
171
 
172
172
  // src/version.ts
173
- var VERSION = true ? "4.15.2" : "dev";
173
+ var VERSION = true ? "4.15.3" : "dev";
174
174
 
175
175
  // src/mcp/task-store.ts
176
176
  import { InMemoryTaskStore } from "@modelcontextprotocol/sdk/experimental/tasks";
@@ -1134,7 +1134,7 @@ async function runDoctorFix(result) {
1134
1134
  writeLine2("\u2500".repeat(40));
1135
1135
  let fixCount = 0;
1136
1136
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1137
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-ZHLVXYUG.js");
1137
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-XHS4W5YR.js");
1138
1138
  const outcome = describeDataDirFix2(initDataDirectories2());
1139
1139
  writeLine2(outcome.line);
1140
1140
  if (outcome.counted) fixCount++;
@@ -1237,4 +1237,4 @@ export {
1237
1237
  startStdioServer,
1238
1238
  closeServer
1239
1239
  };
1240
- //# sourceMappingURL=chunk-227I7IM7.js.map
1240
+ //# sourceMappingURL=chunk-QUKSHEEJ.js.map
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-227I7IM7.js";
24
+ } from "./chunk-QUKSHEEJ.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-VR76FPIN.js";
@@ -45,7 +45,7 @@ import {
45
45
  simulationDeniedResult,
46
46
  toJobSummary,
47
47
  writeJobCancelled
48
- } from "./chunk-KTMBBIFH.js";
48
+ } from "./chunk-E4JHFE2E.js";
49
49
  import {
50
50
  allOf
51
51
  } from "./chunk-OQB3XC5O.js";
@@ -47187,7 +47187,7 @@ ${contextBlock}`;
47187
47187
  const strategy = config.votingStrategy ?? "higher_order";
47188
47188
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47189
47189
  try {
47190
- const { executeVoting } = await import("./consensus-vote-BGJUZRZJ.js");
47190
+ const { executeVoting } = await import("./consensus-vote-I673JOAQ.js");
47191
47191
  const votingResult = await executeVoting(
47192
47192
  {
47193
47193
  proposal: buildVoteProposal(plan, research),
@@ -55776,4 +55776,4 @@ export {
55776
55776
  shutdownFeedbackSubscriber,
55777
55777
  createEventBusBridge
55778
55778
  };
55779
- //# sourceMappingURL=chunk-MEMPWKAD.js.map
55779
+ //# sourceMappingURL=chunk-SFWBN3PE.js.map
package/dist/cli.js CHANGED
@@ -153,7 +153,7 @@ import {
153
153
  validateNexusEnv,
154
154
  validateWorkflow,
155
155
  wrapInMarkdownFence
156
- } from "./chunk-MEMPWKAD.js";
156
+ } from "./chunk-SFWBN3PE.js";
157
157
  import "./chunk-YMCIDGNP.js";
158
158
  import "./chunk-HFOQKCD2.js";
159
159
  import "./chunk-RSMG2DPB.js";
@@ -173,7 +173,7 @@ import {
173
173
  doctorCommand,
174
174
  initDataDirectories,
175
175
  runDoctor
176
- } from "./chunk-227I7IM7.js";
176
+ } from "./chunk-QUKSHEEJ.js";
177
177
  import {
178
178
  buildOpenAICompatAdapters,
179
179
  readOpenAICompatEnv
@@ -189,8 +189,9 @@ import {
189
189
  VoteThresholdSchema,
190
190
  executeVoting,
191
191
  mapOutcomeToDecision,
192
+ recordAuthenticVote,
192
193
  registerConsensusVoteTool
193
- } from "./chunk-KTMBBIFH.js";
194
+ } from "./chunk-E4JHFE2E.js";
194
195
  import {
195
196
  loadUsageEvents,
196
197
  rollupByModel
@@ -7275,6 +7276,22 @@ function systemReviewCommand(options = {}) {
7275
7276
 
7276
7277
  // src/cli/vote-command.ts
7277
7278
  import * as crypto from "crypto";
7279
+
7280
+ // src/cli/vote-audit-line.ts
7281
+ function auditLineFor(outcome) {
7282
+ if (outcome.persisted) {
7283
+ return `${colors.dim}Audit record #${String(outcome.record.sequence)} written (${outcome.record.id})${colors.reset}
7284
+ `;
7285
+ }
7286
+ if (outcome.reason === "all-simulated") {
7287
+ return `${colors.dim}No audit record \u2014 votes were simulated${colors.reset}
7288
+ `;
7289
+ }
7290
+ return `${colors.yellow}Vote NOT recorded to the audit chain: ${outcome.detail}${colors.reset}
7291
+ `;
7292
+ }
7293
+
7294
+ // src/cli/vote-command.ts
7278
7295
  function generateVoteHash(role, vote) {
7279
7296
  const data = JSON.stringify({ role, decision: vote.decision, reasoning: vote.reasoning });
7280
7297
  const hash = crypto.createHash("sha256").update(data).digest("hex").slice(0, 16);
@@ -7449,7 +7466,10 @@ async function runVote(options) {
7449
7466
  votes: result.votes,
7450
7467
  totalTimeMs: result.totalTimeMs,
7451
7468
  simulateVotes: result.simulateVotes,
7452
- decision: result.decision ?? mapOutcomeToDecision(result.result.outcome)
7469
+ decision: result.decision ?? mapOutcomeToDecision(result.result.outcome),
7470
+ // Carried past the narrowing above so the audit record states the strategy
7471
+ // that was applied. `threshold` is the display value and can differ (#4924).
7472
+ strategy: result.strategy
7453
7473
  };
7454
7474
  }
7455
7475
  function printDryRunBanner() {
@@ -7492,6 +7512,19 @@ function exitCodeForDecision(decision, policy) {
7492
7512
  if (decision === "no_quorum") return policy === "exit2" ? 2 : 1;
7493
7513
  return 1;
7494
7514
  }
7515
+ function persistToAuditChain(options, result) {
7516
+ if (options.dryRun === true) return;
7517
+ writeLine(
7518
+ auditLineFor(
7519
+ recordAuthenticVote({
7520
+ proposal: result.proposal,
7521
+ strategy: result.strategy,
7522
+ result: result.result,
7523
+ votes: result.votes
7524
+ })
7525
+ )
7526
+ );
7527
+ }
7495
7528
  async function voteCommand(options) {
7496
7529
  writeLine(`
7497
7530
  ${colors.bold}Nexus Agents Consensus Vote${colors.reset}`);
@@ -7517,6 +7550,7 @@ ${colors.bold}Nexus Agents Consensus Vote${colors.reset}`);
7517
7550
  if (options.verbose === true) printHashes(result.votes);
7518
7551
  writeLine(`${colors.dim}Completed in ${String(result.totalTimeMs)}ms${colors.reset}
7519
7552
  `);
7553
+ persistToAuditChain(options, result);
7520
7554
  handleRecording(options, result, result.decision);
7521
7555
  return exitCodeForDecision(result.decision, onNoQuorum);
7522
7556
  } catch (error) {