nexus-agents 2.140.2 → 2.141.0

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.
@@ -42,7 +42,7 @@ import {
42
42
  } from "./chunk-DHVMSIT5.js";
43
43
 
44
44
  // src/version.ts
45
- var VERSION = true ? "2.140.2" : "dev";
45
+ var VERSION = true ? "2.141.0" : "dev";
46
46
 
47
47
  // src/config/schemas-core.ts
48
48
  import { z } from "zod";
@@ -2132,7 +2132,7 @@ async function runDoctorFix(result) {
2132
2132
  writeLine2("\u2500".repeat(40));
2133
2133
  let fixCount = 0;
2134
2134
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
2135
- const { runSetup } = await import("./setup-command-SR7SNTMD.js");
2135
+ const { runSetup } = await import("./setup-command-SP3Q6YW6.js");
2136
2136
  const setupResult = runSetup({
2137
2137
  skipMcp: true,
2138
2138
  skipRules: true,
@@ -2245,4 +2245,4 @@ export {
2245
2245
  startStdioServer,
2246
2246
  closeServer
2247
2247
  };
2248
- //# sourceMappingURL=chunk-FLDT5YWH.js.map
2248
+ //# sourceMappingURL=chunk-7XOTLM3R.js.map
@@ -8,7 +8,7 @@ import {
8
8
  checkSqlite,
9
9
  defaultConfig,
10
10
  initDataDirectories
11
- } from "./chunk-FLDT5YWH.js";
11
+ } from "./chunk-7XOTLM3R.js";
12
12
  import {
13
13
  BUILT_IN_EXPERTS
14
14
  } from "./chunk-ZM4O442V.js";
@@ -2000,4 +2000,4 @@ export {
2000
2000
  setupCommand,
2001
2001
  setupCommandAsync
2002
2002
  };
2003
- //# sourceMappingURL=chunk-JO2EX53W.js.map
2003
+ //# sourceMappingURL=chunk-VLODTBPY.js.map
package/dist/cli.js CHANGED
@@ -22,7 +22,7 @@ import "./chunk-JYH6CMLW.js";
22
22
  import {
23
23
  setupCommandAsync,
24
24
  verifyCommand
25
- } from "./chunk-JO2EX53W.js";
25
+ } from "./chunk-VLODTBPY.js";
26
26
  import "./chunk-BU2PN7M2.js";
27
27
  import {
28
28
  AuthHandler,
@@ -142,7 +142,7 @@ import {
142
142
  validateCommand,
143
143
  validateWorkflow,
144
144
  wrapInMarkdownFence
145
- } from "./chunk-66LTZALB.js";
145
+ } from "./chunk-4VCLI2T3.js";
146
146
  import "./chunk-5RJHWUHT.js";
147
147
  import "./chunk-3B3ER6KT.js";
148
148
  import "./chunk-HFOQKCD2.js";
@@ -170,7 +170,7 @@ import {
170
170
  loadConfig,
171
171
  runDoctor,
172
172
  validateNexusEnv
173
- } from "./chunk-FLDT5YWH.js";
173
+ } from "./chunk-7XOTLM3R.js";
174
174
  import "./chunk-HO4C3E6W.js";
175
175
  import {
176
176
  shutdownExpertBridge
package/dist/index.d.ts CHANGED
@@ -26594,6 +26594,51 @@ interface Finding {
26594
26594
  readonly verified: boolean;
26595
26595
  }
26596
26596
 
26597
+ /**
26598
+ * nexus-agents/mcp — PR-Review Audit-Record Producer (#4031).
26599
+ *
26600
+ * The pr_review side of the #3831 Option-C arc: turn a completed review into an
26601
+ * authentic, self-hashed governance record bound to {prNumber, baseSha,
26602
+ * reviewedDiffHash, verdict}, so the warn-first governor-review gate can find a
26603
+ * diff-bound record for the PR it is checking. Split out of pr-review-tool.ts to
26604
+ * keep that file's single-purpose review flow lean.
26605
+ *
26606
+ * Best-effort and never-throws: a missing binding or a write failure is surfaced
26607
+ * as a structured {@link PrReviewRecordOutcome}, never an exception into the
26608
+ * review path (an audit sink must not break the operation it observes).
26609
+ *
26610
+ * @module mcp/tools/pr-review-record-producer
26611
+ */
26612
+
26613
+ /**
26614
+ * Structured outcome of the best-effort Option-C audit-record persistence
26615
+ * (#4031). Surfaced on the pr_review response so an MCP caller can SEE whether a
26616
+ * record was written and, when not, WHY — mirroring the consensus_vote
26617
+ * `voteRecordPersisted` observability. Reasons:
26618
+ * - `binding-inputs-absent` — `prNumber` and/or `baseSha` were not supplied, so
26619
+ * there is nothing to bind the record to (the warn-first skip; not an error).
26620
+ * - `simulated` — the review used simulated voters; a committed record would
26621
+ * seed governance from non-live output (mirrors #2319 for votes).
26622
+ * - `no-live-votes` — every voter errored, so the aggregate verdict was produced
26623
+ * by NO live opinion. Persisting would write a gate-satisfying record for a
26624
+ * review that never actually happened (the governor-review analogue of the
26625
+ * consensus_vote `no_quorum` void, #4053). Skipped so a failed review cannot
26626
+ * silently flip the #3831 gate from warn to a false pass.
26627
+ * - `write-failed` — the binding was present but the ledger path was unresolved
26628
+ * or the append failed (the producer already logged the underlying cause).
26629
+ */
26630
+ type PrReviewRecordOutcome = {
26631
+ readonly persisted: true;
26632
+ readonly prNumber: number;
26633
+ readonly baseSha: string;
26634
+ readonly reviewedDiffHash: string;
26635
+ readonly sequence: number;
26636
+ } | {
26637
+ readonly persisted: false;
26638
+ readonly reason: 'binding-inputs-absent' | 'simulated' | 'no-live-votes' | 'write-failed';
26639
+ readonly detail: string;
26640
+ };
26641
+
26597
26642
  /**
26598
26643
  * nexus-agents/mcp - PR Review Tool (#2233 Child 1)
26599
26644
  *
@@ -26626,6 +26671,8 @@ declare const PrReviewInputSchema: z.ZodObject<{
26626
26671
  repoContext: z.ZodOptional<z.ZodString>;
26627
26672
  baseRef: z.ZodOptional<z.ZodString>;
26628
26673
  headRef: z.ZodOptional<z.ZodString>;
26674
+ prNumber: z.ZodOptional<z.ZodNumber>;
26675
+ baseSha: z.ZodOptional<z.ZodString>;
26629
26676
  simulate: z.ZodDefault<z.ZodBoolean>;
26630
26677
  dispatch: z.ZodDefault<z.ZodEnum<{
26631
26678
  async: "async";
@@ -26680,6 +26727,12 @@ interface PrReviewResponse {
26680
26727
  * adapter reported no usage are counted as unmeasured, not a measured $0).
26681
26728
  */
26682
26729
  readonly costSummary?: DecisionCostSummary;
26730
+ /**
26731
+ * Option-C audit-record persistence outcome (#4031). Present on every
26732
+ * response: `persisted: true` with the record's binding + sequence when an
26733
+ * authentic record was written, otherwise `persisted: false` with the reason.
26734
+ */
26735
+ readonly recordOutcome?: PrReviewRecordOutcome;
26683
26736
  }
26684
26737
  interface PrReviewDeps extends BaseMcpToolDeps {
26685
26738
  /**
package/dist/index.js CHANGED
@@ -520,7 +520,7 @@ import {
520
520
  validateWorkflow,
521
521
  validateWorkflowDependencies,
522
522
  withLogging
523
- } from "./chunk-66LTZALB.js";
523
+ } from "./chunk-4VCLI2T3.js";
524
524
  import {
525
525
  OPENAI_MODELS,
526
526
  OPENAI_MODEL_ALIASES,
@@ -560,7 +560,7 @@ import {
560
560
  getKnownNexusVarNames,
561
561
  startStdioServer,
562
562
  validateNexusEnv
563
- } from "./chunk-FLDT5YWH.js";
563
+ } from "./chunk-7XOTLM3R.js";
564
564
  import {
565
565
  CliCircuitBreakerIntegration,
566
566
  createCliCircuitBreakerIntegration
@@ -8,9 +8,9 @@ import {
8
8
  runWizard,
9
9
  setupCommand,
10
10
  setupCommandAsync
11
- } from "./chunk-JO2EX53W.js";
11
+ } from "./chunk-VLODTBPY.js";
12
12
  import "./chunk-BU2PN7M2.js";
13
- import "./chunk-FLDT5YWH.js";
13
+ import "./chunk-7XOTLM3R.js";
14
14
  import "./chunk-NUBSJGQZ.js";
15
15
  import "./chunk-6T3EPABN.js";
16
16
  import "./chunk-ZM4O442V.js";
@@ -35,4 +35,4 @@ export {
35
35
  setupCommand,
36
36
  setupCommandAsync
37
37
  };
38
- //# sourceMappingURL=setup-command-SR7SNTMD.js.map
38
+ //# sourceMappingURL=setup-command-SP3Q6YW6.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexus-agents",
3
- "version": "2.140.2",
3
+ "version": "2.141.0",
4
4
  "description": "Governance substrate for AI coding agents — adversarial PR review, drift-detected rules, tamper-evident audit, and closed-loop outcome routing for Claude, Codex, Gemini, and OpenCode",
5
5
  "mcpName": "io.github.nexus-substrate/nexus-agents",
6
6
  "license": "MIT",