nexus-agents 4.15.1 → 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.1" : "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-BDTCPVZN.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-DHKW65FK.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-DHKW65FK.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-Q22YNC7J.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-Q22YNC7J.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-DHKW65FK.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
@@ -3818,9 +3819,12 @@ var PARSE_ARGS_CONFIG = {
3818
3819
  type: "string",
3819
3820
  short: "p"
3820
3821
  },
3822
+ // No `short`. `parseArgs` takes one options object for every command, so
3823
+ // a short letter is global: `-t` was already `task`, which won, and
3824
+ // `vote -t supermajority` silently ran a simple-majority vote. Long form
3825
+ // only — `cli-types.test.ts` pins that no two options share a letter.
3821
3826
  threshold: {
3822
- type: "string",
3823
- short: "t"
3827
+ type: "string"
3824
3828
  },
3825
3829
  quick: {
3826
3830
  type: "boolean",
@@ -3895,9 +3899,10 @@ var PARSE_ARGS_CONFIG = {
3895
3899
  default: false
3896
3900
  },
3897
3901
  // Learning-metrics command options
3902
+ // No `short` — `-p` is `proposal`, which was declared first and won. See
3903
+ // the note on `threshold`.
3898
3904
  period: {
3899
- type: "string",
3900
- short: "p"
3905
+ type: "string"
3901
3906
  },
3902
3907
  export: {
3903
3908
  type: "string"
@@ -7271,6 +7276,22 @@ function systemReviewCommand(options = {}) {
7271
7276
 
7272
7277
  // src/cli/vote-command.ts
7273
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
7274
7295
  function generateVoteHash(role, vote) {
7275
7296
  const data = JSON.stringify({ role, decision: vote.decision, reasoning: vote.reasoning });
7276
7297
  const hash = crypto.createHash("sha256").update(data).digest("hex").slice(0, 16);
@@ -7445,7 +7466,10 @@ async function runVote(options) {
7445
7466
  votes: result.votes,
7446
7467
  totalTimeMs: result.totalTimeMs,
7447
7468
  simulateVotes: result.simulateVotes,
7448
- 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
7449
7473
  };
7450
7474
  }
7451
7475
  function printDryRunBanner() {
@@ -7488,6 +7512,19 @@ function exitCodeForDecision(decision, policy) {
7488
7512
  if (decision === "no_quorum") return policy === "exit2" ? 2 : 1;
7489
7513
  return 1;
7490
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
+ }
7491
7528
  async function voteCommand(options) {
7492
7529
  writeLine(`
7493
7530
  ${colors.bold}Nexus Agents Consensus Vote${colors.reset}`);
@@ -7513,6 +7550,7 @@ ${colors.bold}Nexus Agents Consensus Vote${colors.reset}`);
7513
7550
  if (options.verbose === true) printHashes(result.votes);
7514
7551
  writeLine(`${colors.dim}Completed in ${String(result.totalTimeMs)}ms${colors.reset}
7515
7552
  `);
7553
+ persistToAuditChain(options, result);
7516
7554
  handleRecording(options, result, result.decision);
7517
7555
  return exitCodeForDecision(result.decision, onNoQuorum);
7518
7556
  } catch (error) {
@@ -22109,13 +22147,13 @@ var VOTE_HELP = {
22109
22147
  command: "vote",
22110
22148
  examples: [
22111
22149
  'nexus-agents vote --proposal "Add caching layer"',
22112
- 'nexus-agents vote -p "Migrate to PostgreSQL" -t supermajority',
22150
+ 'nexus-agents vote -p "Migrate to PostgreSQL" --threshold supermajority',
22113
22151
  'nexus-agents vote -p "Quick decision" --quick',
22114
22152
  'nexus-agents vote -p "Test idea" --dry-run'
22115
22153
  ],
22116
22154
  flags: [
22117
22155
  { flag: "-p, --proposal <text>", description: "Proposal text to vote on (required)" },
22118
- { flag: "-t, --threshold <t>", description: "Threshold: majority, supermajority, unanimous" },
22156
+ { flag: "--threshold <t>", description: "Threshold: majority, supermajority, unanimous" },
22119
22157
  { flag: "--quick", description: "Use 3 agents instead of the full 7 for faster votes" },
22120
22158
  { flag: "--dry-run", description: "Simulate votes without agent execution" },
22121
22159
  { flag: "--timeout=<seconds>", description: "Timeout per vote in seconds", defaultValue: "90" },