nexus-agents 2.140.1 → 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.
@@ -7,7 +7,7 @@ import {
7
7
  registerConsensusVoteTool,
8
8
  resetCorrelationTracker,
9
9
  runConsensusForGoal
10
- } from "./chunk-KUF5JK5A.js";
10
+ } from "./chunk-3Z4SZVBB.js";
11
11
  import "./chunk-75M7P45Q.js";
12
12
  import "./chunk-PUFP75ZL.js";
13
13
  import "./chunk-YI5HSN5U.js";
@@ -36,4 +36,4 @@ export {
36
36
  resetCorrelationTracker,
37
37
  runConsensusForGoal
38
38
  };
39
- //# sourceMappingURL=consensus-vote-LGFJGBLL.js.map
39
+ //# sourceMappingURL=consensus-vote-DRGGSXUQ.js.map
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-QLFU334E.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-W2X4T4JX.js";
563
+ } from "./chunk-7XOTLM3R.js";
564
564
  import {
565
565
  CliCircuitBreakerIntegration,
566
566
  createCliCircuitBreakerIntegration
@@ -616,7 +616,7 @@ import {
616
616
  generateProposalId,
617
617
  parseAgentPairKey,
618
618
  registerConsensusVoteTool
619
- } from "./chunk-KUF5JK5A.js";
619
+ } from "./chunk-3Z4SZVBB.js";
620
620
  import "./chunk-75M7P45Q.js";
621
621
  import "./chunk-JUYELG7E.js";
622
622
  import {
@@ -5953,7 +5953,7 @@ function buildVotingInput(plan, config) {
5953
5953
  }
5954
5954
  async function executeSingleVote(plan, config, log) {
5955
5955
  try {
5956
- const { executeVoting } = await import("./consensus-vote-LGFJGBLL.js");
5956
+ const { executeVoting } = await import("./consensus-vote-DRGGSXUQ.js");
5957
5957
  const input = buildVotingInput(plan, config);
5958
5958
  const result = await executeVoting(input, log);
5959
5959
  return parseVotingResult(result);
@@ -8,9 +8,9 @@ import {
8
8
  runWizard,
9
9
  setupCommand,
10
10
  setupCommandAsync
11
- } from "./chunk-FDWCMNCA.js";
11
+ } from "./chunk-VLODTBPY.js";
12
12
  import "./chunk-BU2PN7M2.js";
13
- import "./chunk-W2X4T4JX.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-UGNZID2H.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.1",
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",