nexus-agents 8.48.0 → 8.48.2

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 (126) hide show
  1. package/dist/{ast-rule-runner-74D2KNCC.js → ast-rule-runner-SUEOULTY.js} +3 -3
  2. package/dist/{child-mcp-config-KTR6MPNZ.js → child-mcp-config-Y3GST6L4.js} +2 -2
  3. package/dist/{chunk-7XT6WVSB.js → chunk-2CB4RKGK.js} +2 -2
  4. package/dist/{chunk-LO36HW55.js → chunk-2EH4T5I6.js} +2 -2
  5. package/dist/{chunk-7I3LY4HJ.js → chunk-4Y5TFSYP.js} +2 -2
  6. package/dist/{chunk-DVBGHGU3.js → chunk-53EL53NC.js} +2 -2
  7. package/dist/{chunk-2SINF73A.js → chunk-5IB64MNO.js} +4 -4
  8. package/dist/{chunk-CJ5FEUI2.js → chunk-6AX4544S.js} +3 -3
  9. package/dist/{chunk-QOKB6MWY.js → chunk-6GKP2RLC.js} +4 -4
  10. package/dist/{chunk-7YHOHQJR.js → chunk-A4WAADEC.js} +5 -5
  11. package/dist/{chunk-X7EXIH67.js → chunk-CE6OZA5X.js} +4 -4
  12. package/dist/{chunk-TRV4NNEE.js → chunk-DTUJCA6M.js} +54 -23
  13. package/dist/chunk-DTUJCA6M.js.map +1 -0
  14. package/dist/{chunk-RBNJYWQ6.js → chunk-F6LB2JEI.js} +4 -4
  15. package/dist/{chunk-GLDBWMOB.js → chunk-FASXNWT3.js} +5 -5
  16. package/dist/{chunk-JHDP6Z2M.js → chunk-G3KKGHWY.js} +8 -8
  17. package/dist/{chunk-SBCEQWUN.js → chunk-GFW5IMOF.js} +8 -8
  18. package/dist/{chunk-7QY3RIIY.js → chunk-GLDK3R2H.js} +7 -7
  19. package/dist/{chunk-F6HORFHH.js → chunk-GTCZLDKW.js} +2 -2
  20. package/dist/{chunk-USBSYHBT.js → chunk-HEVB6YLR.js} +3 -3
  21. package/dist/{chunk-CKG2K5WC.js → chunk-HHCWN5PM.js} +50 -42
  22. package/dist/{chunk-CKG2K5WC.js.map → chunk-HHCWN5PM.js.map} +1 -1
  23. package/dist/{chunk-4TE5DJHO.js → chunk-KITJQPDR.js} +2 -2
  24. package/dist/{chunk-JOVBHYWW.js → chunk-MOVW4ZFU.js} +2 -2
  25. package/dist/{chunk-2HRAO3DD.js → chunk-MPJILKDK.js} +3 -3
  26. package/dist/{chunk-DF6M73XJ.js → chunk-N56KU4KM.js} +2 -2
  27. package/dist/{chunk-KRPSDJOP.js → chunk-NEKNNWPU.js} +2 -2
  28. package/dist/{chunk-62CSX5QU.js → chunk-P6D43B4F.js} +2 -2
  29. package/dist/{chunk-TE6UUPOA.js → chunk-PJKJF6FQ.js} +2 -2
  30. package/dist/{chunk-5ONSIV4D.js → chunk-RCTVIHUT.js} +2 -2
  31. package/dist/{chunk-SBMYB6N3.js → chunk-RJSW5FD3.js} +2 -2
  32. package/dist/{chunk-YPU4OHBU.js → chunk-VDBBLFZR.js} +2 -2
  33. package/dist/{chunk-AZPM542H.js → chunk-VKBFV6OD.js} +8 -3
  34. package/dist/{chunk-AZPM542H.js.map → chunk-VKBFV6OD.js.map} +1 -1
  35. package/dist/{chunk-ODPVHHUW.js → chunk-WNEVQONR.js} +2 -2
  36. package/dist/{chunk-R247RR7W.js → chunk-YLTUPAKL.js} +2 -2
  37. package/dist/{chunk-WID3S2DT.js → chunk-YYQ6NX5R.js} +2 -2
  38. package/dist/{chunk-E4GEUHMH.js → chunk-ZQVU3NKP.js} +6 -6
  39. package/dist/{chunk-L7DROS6X.js → chunk-ZWJOB76B.js} +2 -2
  40. package/dist/{cli-circuit-breaker-QZLD2EOM.js → cli-circuit-breaker-BDQFZL7E.js} +3 -3
  41. package/dist/cli.js +43 -43
  42. package/dist/{composite-router-JLXK7CPT.js → composite-router-XPWI4EAG.js} +2 -2
  43. package/dist/{consensus-vote-MMWVMVH2.js → consensus-vote-M4EZ7UV4.js} +17 -17
  44. package/dist/{context-retriever-7RE3EZCH.js → context-retriever-JLTSIPDG.js} +8 -8
  45. package/dist/{doctor-deep-LVNRCVLP.js → doctor-deep-CGDO6NJC.js} +3 -3
  46. package/dist/{doctor-live-5JJSWTEW.js → doctor-live-A56SMTQ7.js} +9 -9
  47. package/dist/{expert-bridge-VKTP3RAL.js → expert-bridge-GK7M6JDD.js} +4 -4
  48. package/dist/{factory-XV6E75D7.js → factory-AX4DQMR4.js} +5 -5
  49. package/dist/{factory-GESVEWDP.js → factory-K6QWZRX3.js} +9 -9
  50. package/dist/{improvement-review-NX7446V6.js → improvement-review-PPA3G3XP.js} +6 -6
  51. package/dist/index.js +31 -31
  52. package/dist/{init-opencode-522IQ3OS.js → init-opencode-ED575MZA.js} +6 -6
  53. package/dist/issue-triage-7QOEFZP5.js +17 -0
  54. package/dist/{pr-reviewer-helpers-UZVC2NQW.js → pr-reviewer-helpers-FYY7JOX6.js} +4 -4
  55. package/dist/{registry-command-257AWC4P.js → registry-command-TKJBG3DI.js} +2 -2
  56. package/dist/{repo-security-plan-BF7VE3ML.js → repo-security-plan-MTS46MYL.js} +3 -3
  57. package/dist/{research-helpers-synthesize-RNF6Y7XV.js → research-helpers-synthesize-5LWQYXLC.js} +4 -4
  58. package/dist/{routing-memory-RBKPFXHQ.js → routing-memory-S3FP5MQY.js} +2 -2
  59. package/dist/{session-memory-BQVXGS2D.js → session-memory-JUYGIQI4.js} +3 -3
  60. package/dist/{setup-config-IXTT2I5T.js → setup-config-KIZ2V5PW.js} +3 -3
  61. package/dist/{setup-custom-api-75HAWD5G.js → setup-custom-api-DUEOVPOA.js} +4 -4
  62. package/dist/setup-data-dir-EGXVKKV2.js +30 -0
  63. package/dist/{tool-memory-FU5M6HD5.js → tool-memory-XD7YZBBU.js} +5 -5
  64. package/dist/{unified-registry-YJ2Z43E2.js → unified-registry-MUUCHM4T.js} +10 -10
  65. package/dist/{weather-report-ME2HVR3F.js → weather-report-7M3VSROJ.js} +2 -2
  66. package/package.json +1 -1
  67. package/dist/chunk-TRV4NNEE.js.map +0 -1
  68. package/dist/issue-triage-WCJZQONF.js +0 -17
  69. package/dist/setup-data-dir-O7Y4FGDJ.js +0 -30
  70. /package/dist/{ast-rule-runner-74D2KNCC.js.map → ast-rule-runner-SUEOULTY.js.map} +0 -0
  71. /package/dist/{child-mcp-config-KTR6MPNZ.js.map → child-mcp-config-Y3GST6L4.js.map} +0 -0
  72. /package/dist/{chunk-7XT6WVSB.js.map → chunk-2CB4RKGK.js.map} +0 -0
  73. /package/dist/{chunk-LO36HW55.js.map → chunk-2EH4T5I6.js.map} +0 -0
  74. /package/dist/{chunk-7I3LY4HJ.js.map → chunk-4Y5TFSYP.js.map} +0 -0
  75. /package/dist/{chunk-DVBGHGU3.js.map → chunk-53EL53NC.js.map} +0 -0
  76. /package/dist/{chunk-2SINF73A.js.map → chunk-5IB64MNO.js.map} +0 -0
  77. /package/dist/{chunk-CJ5FEUI2.js.map → chunk-6AX4544S.js.map} +0 -0
  78. /package/dist/{chunk-QOKB6MWY.js.map → chunk-6GKP2RLC.js.map} +0 -0
  79. /package/dist/{chunk-7YHOHQJR.js.map → chunk-A4WAADEC.js.map} +0 -0
  80. /package/dist/{chunk-X7EXIH67.js.map → chunk-CE6OZA5X.js.map} +0 -0
  81. /package/dist/{chunk-RBNJYWQ6.js.map → chunk-F6LB2JEI.js.map} +0 -0
  82. /package/dist/{chunk-GLDBWMOB.js.map → chunk-FASXNWT3.js.map} +0 -0
  83. /package/dist/{chunk-JHDP6Z2M.js.map → chunk-G3KKGHWY.js.map} +0 -0
  84. /package/dist/{chunk-SBCEQWUN.js.map → chunk-GFW5IMOF.js.map} +0 -0
  85. /package/dist/{chunk-7QY3RIIY.js.map → chunk-GLDK3R2H.js.map} +0 -0
  86. /package/dist/{chunk-F6HORFHH.js.map → chunk-GTCZLDKW.js.map} +0 -0
  87. /package/dist/{chunk-USBSYHBT.js.map → chunk-HEVB6YLR.js.map} +0 -0
  88. /package/dist/{chunk-4TE5DJHO.js.map → chunk-KITJQPDR.js.map} +0 -0
  89. /package/dist/{chunk-JOVBHYWW.js.map → chunk-MOVW4ZFU.js.map} +0 -0
  90. /package/dist/{chunk-2HRAO3DD.js.map → chunk-MPJILKDK.js.map} +0 -0
  91. /package/dist/{chunk-DF6M73XJ.js.map → chunk-N56KU4KM.js.map} +0 -0
  92. /package/dist/{chunk-KRPSDJOP.js.map → chunk-NEKNNWPU.js.map} +0 -0
  93. /package/dist/{chunk-62CSX5QU.js.map → chunk-P6D43B4F.js.map} +0 -0
  94. /package/dist/{chunk-TE6UUPOA.js.map → chunk-PJKJF6FQ.js.map} +0 -0
  95. /package/dist/{chunk-5ONSIV4D.js.map → chunk-RCTVIHUT.js.map} +0 -0
  96. /package/dist/{chunk-SBMYB6N3.js.map → chunk-RJSW5FD3.js.map} +0 -0
  97. /package/dist/{chunk-YPU4OHBU.js.map → chunk-VDBBLFZR.js.map} +0 -0
  98. /package/dist/{chunk-ODPVHHUW.js.map → chunk-WNEVQONR.js.map} +0 -0
  99. /package/dist/{chunk-R247RR7W.js.map → chunk-YLTUPAKL.js.map} +0 -0
  100. /package/dist/{chunk-WID3S2DT.js.map → chunk-YYQ6NX5R.js.map} +0 -0
  101. /package/dist/{chunk-E4GEUHMH.js.map → chunk-ZQVU3NKP.js.map} +0 -0
  102. /package/dist/{chunk-L7DROS6X.js.map → chunk-ZWJOB76B.js.map} +0 -0
  103. /package/dist/{cli-circuit-breaker-QZLD2EOM.js.map → cli-circuit-breaker-BDQFZL7E.js.map} +0 -0
  104. /package/dist/{composite-router-JLXK7CPT.js.map → composite-router-XPWI4EAG.js.map} +0 -0
  105. /package/dist/{consensus-vote-MMWVMVH2.js.map → consensus-vote-M4EZ7UV4.js.map} +0 -0
  106. /package/dist/{context-retriever-7RE3EZCH.js.map → context-retriever-JLTSIPDG.js.map} +0 -0
  107. /package/dist/{doctor-deep-LVNRCVLP.js.map → doctor-deep-CGDO6NJC.js.map} +0 -0
  108. /package/dist/{doctor-live-5JJSWTEW.js.map → doctor-live-A56SMTQ7.js.map} +0 -0
  109. /package/dist/{expert-bridge-VKTP3RAL.js.map → expert-bridge-GK7M6JDD.js.map} +0 -0
  110. /package/dist/{factory-GESVEWDP.js.map → factory-AX4DQMR4.js.map} +0 -0
  111. /package/dist/{factory-XV6E75D7.js.map → factory-K6QWZRX3.js.map} +0 -0
  112. /package/dist/{improvement-review-NX7446V6.js.map → improvement-review-PPA3G3XP.js.map} +0 -0
  113. /package/dist/{init-opencode-522IQ3OS.js.map → init-opencode-ED575MZA.js.map} +0 -0
  114. /package/dist/{issue-triage-WCJZQONF.js.map → issue-triage-7QOEFZP5.js.map} +0 -0
  115. /package/dist/{pr-reviewer-helpers-UZVC2NQW.js.map → pr-reviewer-helpers-FYY7JOX6.js.map} +0 -0
  116. /package/dist/{registry-command-257AWC4P.js.map → registry-command-TKJBG3DI.js.map} +0 -0
  117. /package/dist/{repo-security-plan-BF7VE3ML.js.map → repo-security-plan-MTS46MYL.js.map} +0 -0
  118. /package/dist/{research-helpers-synthesize-RNF6Y7XV.js.map → research-helpers-synthesize-5LWQYXLC.js.map} +0 -0
  119. /package/dist/{routing-memory-RBKPFXHQ.js.map → routing-memory-S3FP5MQY.js.map} +0 -0
  120. /package/dist/{session-memory-BQVXGS2D.js.map → session-memory-JUYGIQI4.js.map} +0 -0
  121. /package/dist/{setup-config-IXTT2I5T.js.map → setup-config-KIZ2V5PW.js.map} +0 -0
  122. /package/dist/{setup-custom-api-75HAWD5G.js.map → setup-custom-api-DUEOVPOA.js.map} +0 -0
  123. /package/dist/{setup-data-dir-O7Y4FGDJ.js.map → setup-data-dir-EGXVKKV2.js.map} +0 -0
  124. /package/dist/{tool-memory-FU5M6HD5.js.map → tool-memory-XD7YZBBU.js.map} +0 -0
  125. /package/dist/{unified-registry-YJ2Z43E2.js.map → unified-registry-MUUCHM4T.js.map} +0 -0
  126. /package/dist/{weather-report-ME2HVR3F.js.map → weather-report-7M3VSROJ.js.map} +0 -0
@@ -9,8 +9,8 @@ import {
9
9
  getBuiltInAstRulesPath,
10
10
  loadRules,
11
11
  runAstQaRules
12
- } from "./chunk-KRPSDJOP.js";
13
- import "./chunk-AZPM542H.js";
12
+ } from "./chunk-NEKNNWPU.js";
13
+ import "./chunk-VKBFV6OD.js";
14
14
  import "./chunk-MTYJPPIG.js";
15
15
  import "./chunk-BTYRPZON.js";
16
16
  import "./chunk-ZPWHCABL.js";
@@ -26,4 +26,4 @@ export {
26
26
  loadRules,
27
27
  runAstQaRules
28
28
  };
29
- //# sourceMappingURL=ast-rule-runner-74D2KNCC.js.map
29
+ //# sourceMappingURL=ast-rule-runner-SUEOULTY.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-T46RV7Y7.js";
4
4
  import {
5
5
  createLogger
6
- } from "./chunk-AZPM542H.js";
6
+ } from "./chunk-VKBFV6OD.js";
7
7
  import "./chunk-MTYJPPIG.js";
8
8
  import "./chunk-BTYRPZON.js";
9
9
  import "./chunk-ZPWHCABL.js";
@@ -60,4 +60,4 @@ export {
60
60
  generateMcpConfig,
61
61
  getDefaultAllowedTools
62
62
  };
63
- //# sourceMappingURL=child-mcp-config-KTR6MPNZ.js.map
63
+ //# sourceMappingURL=child-mcp-config-Y3GST6L4.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getErrorMessage,
5
5
  getTimeProvider,
6
6
  ok
7
- } from "./chunk-AZPM542H.js";
7
+ } from "./chunk-VKBFV6OD.js";
8
8
 
9
9
  // src/context/session-memory.ts
10
10
  import * as fs from "node:fs";
@@ -370,4 +370,4 @@ export {
370
370
  SessionMemory,
371
371
  createSessionMemory
372
372
  };
373
- //# sourceMappingURL=chunk-7XT6WVSB.js.map
373
+ //# sourceMappingURL=chunk-2CB4RKGK.js.map
@@ -1,6 +1,6 @@
1
1
  // src/version.ts
2
2
  import semver from "semver";
3
- var VERSION = true ? "8.48.0" : "dev";
3
+ var VERSION = true ? "8.48.2" : "dev";
4
4
  var NODE_ENGINE_RANGE = ">=22.5.0";
5
5
  function isNodeVersionSupported(version) {
6
6
  return semver.satisfies(version, NODE_ENGINE_RANGE);
@@ -11,4 +11,4 @@ export {
11
11
  NODE_ENGINE_RANGE,
12
12
  isNodeVersionSupported
13
13
  };
14
- //# sourceMappingURL=chunk-LO36HW55.js.map
14
+ //# sourceMappingURL=chunk-2EH4T5I6.js.map
@@ -2,7 +2,7 @@ import {
2
2
  CACHE_TIMEOUTS,
3
3
  createLogger,
4
4
  getTimeProvider
5
- } from "./chunk-AZPM542H.js";
5
+ } from "./chunk-VKBFV6OD.js";
6
6
 
7
7
  // src/security/trust-types.ts
8
8
  import { z } from "zod";
@@ -610,4 +610,4 @@ export {
610
610
  resolveReputationGatingMode,
611
611
  gateWithReputation
612
612
  };
613
- //# sourceMappingURL=chunk-7I3LY4HJ.js.map
613
+ //# sourceMappingURL=chunk-4Y5TFSYP.js.map
@@ -2,7 +2,7 @@ import {
2
2
  createLogger,
3
3
  err,
4
4
  ok
5
- } from "./chunk-AZPM542H.js";
5
+ } from "./chunk-VKBFV6OD.js";
6
6
 
7
7
  // src/scm/token-resolver.ts
8
8
  import { execFile } from "node:child_process";
@@ -87,4 +87,4 @@ export {
87
87
  hasToken,
88
88
  getTokenEnvVars
89
89
  };
90
- //# sourceMappingURL=chunk-DVBGHGU3.js.map
90
+ //# sourceMappingURL=chunk-53EL53NC.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-LO36HW55.js";
3
+ } from "./chunk-2EH4T5I6.js";
4
4
  import {
5
5
  emitClawGuardViolation
6
- } from "./chunk-JOVBHYWW.js";
6
+ } from "./chunk-MOVW4ZFU.js";
7
7
  import {
8
8
  CACHE_TIMEOUTS,
9
9
  MCP_TIMEOUTS,
@@ -19,7 +19,7 @@ import {
19
19
  getTimeProvider,
20
20
  ok,
21
21
  resolveToolClassGuardMs
22
- } from "./chunk-AZPM542H.js";
22
+ } from "./chunk-VKBFV6OD.js";
23
23
  import {
24
24
  getNexusDataDir
25
25
  } from "./chunk-BTYRPZON.js";
@@ -2360,4 +2360,4 @@ export {
2360
2360
  VOTING_THRESHOLDS,
2361
2361
  ConsensusMetricsSchema
2362
2362
  };
2363
- //# sourceMappingURL=chunk-2SINF73A.js.map
2363
+ //# sourceMappingURL=chunk-5IB64MNO.js.map
@@ -10,13 +10,13 @@ import {
10
10
  import {
11
11
  assessReputation,
12
12
  sanitizeInput
13
- } from "./chunk-7I3LY4HJ.js";
13
+ } from "./chunk-4Y5TFSYP.js";
14
14
  import {
15
15
  createLogger,
16
16
  err,
17
17
  getTimeProvider,
18
18
  ok
19
- } from "./chunk-AZPM542H.js";
19
+ } from "./chunk-VKBFV6OD.js";
20
20
 
21
21
  // src/dogfooding/pr-reviewer-helpers.ts
22
22
  import { randomUUID } from "node:crypto";
@@ -416,4 +416,4 @@ export {
416
416
  createFailedReview,
417
417
  reviewPostingBlock
418
418
  };
419
- //# sourceMappingURL=chunk-CJ5FEUI2.js.map
419
+ //# sourceMappingURL=chunk-6AX4544S.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createAutoAdapter
3
- } from "./chunk-SBCEQWUN.js";
3
+ } from "./chunk-GFW5IMOF.js";
4
4
  import {
5
5
  getDefaultCliCircuitBreakerRegistry,
6
6
  mapModelErrorToCategory
7
- } from "./chunk-DF6M73XJ.js";
7
+ } from "./chunk-N56KU4KM.js";
8
8
  import {
9
9
  CLI_NAMES,
10
10
  CircularBuffer,
@@ -24,7 +24,7 @@ import {
24
24
  recordRateLimitEvent,
25
25
  resolveModelIdentitySync,
26
26
  toRateLimitError
27
- } from "./chunk-AZPM542H.js";
27
+ } from "./chunk-VKBFV6OD.js";
28
28
 
29
29
  // src/config/model-equivalence.ts
30
30
  function canonicalModelKey(modelId) {
@@ -909,4 +909,4 @@ export {
909
909
  getGlobalRegistry,
910
910
  resetGlobalRegistry
911
911
  };
912
- //# sourceMappingURL=chunk-QOKB6MWY.js.map
912
+ //# sourceMappingURL=chunk-6GKP2RLC.js.map
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  computeCostDetail,
3
3
  recordUsageEvent
4
- } from "./chunk-TE6UUPOA.js";
4
+ } from "./chunk-PJKJF6FQ.js";
5
5
  import {
6
6
  BaseAdapter,
7
7
  createStream,
8
8
  planOptionalParams,
9
9
  requireApiKey,
10
10
  validateApiKeyPresence
11
- } from "./chunk-R247RR7W.js";
11
+ } from "./chunk-YLTUPAKL.js";
12
12
  import {
13
13
  assertCustomApiHostResolvesPublic
14
- } from "./chunk-YPU4OHBU.js";
14
+ } from "./chunk-VDBBLFZR.js";
15
15
  import {
16
16
  ConfigError,
17
17
  ModelCapability,
@@ -22,7 +22,7 @@ import {
22
22
  getTimeProvider,
23
23
  getTokenEstimator,
24
24
  ok
25
- } from "./chunk-AZPM542H.js";
25
+ } from "./chunk-VKBFV6OD.js";
26
26
 
27
27
  // src/adapters/openai-types.ts
28
28
  var OPENAI_MODELS = {
@@ -842,4 +842,4 @@ export {
842
842
  discoverModels,
843
843
  buildOpenAICompatAdapters
844
844
  };
845
- //# sourceMappingURL=chunk-7YHOHQJR.js.map
845
+ //# sourceMappingURL=chunk-A4WAADEC.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-5ONSIV4D.js";
4
+ } from "./chunk-RCTVIHUT.js";
5
5
  import {
6
6
  resolveToken
7
- } from "./chunk-DVBGHGU3.js";
7
+ } from "./chunk-53EL53NC.js";
8
8
  import {
9
9
  err,
10
10
  ok
11
- } from "./chunk-AZPM542H.js";
11
+ } from "./chunk-VKBFV6OD.js";
12
12
 
13
13
  // src/scm/factory.ts
14
14
  async function createScmProvider(config) {
@@ -41,4 +41,4 @@ export {
41
41
  createScmProvider,
42
42
  createGitHubProvider
43
43
  };
44
- //# sourceMappingURL=chunk-X7EXIH67.js.map
44
+ //# sourceMappingURL=chunk-CE6OZA5X.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  computeCostDetail,
3
3
  priceBasisOf
4
- } from "./chunk-TE6UUPOA.js";
4
+ } from "./chunk-PJKJF6FQ.js";
5
5
  import {
6
6
  allOf
7
7
  } from "./chunk-OQB3XC5O.js";
@@ -23,26 +23,26 @@ import {
23
23
  toolSuccessStructured,
24
24
  withProgressHeartbeat,
25
25
  wrapToolWithTimeout
26
- } from "./chunk-2SINF73A.js";
26
+ } from "./chunk-5IB64MNO.js";
27
27
  import {
28
28
  VERSION
29
- } from "./chunk-LO36HW55.js";
29
+ } from "./chunk-2EH4T5I6.js";
30
30
  import {
31
31
  assessPanelIndependence,
32
32
  countDistinctModels,
33
33
  createEvent,
34
34
  getGlobalRegistry
35
- } from "./chunk-QOKB6MWY.js";
35
+ } from "./chunk-6GKP2RLC.js";
36
36
  import {
37
37
  getToolMemory
38
- } from "./chunk-RBNJYWQ6.js";
38
+ } from "./chunk-F6LB2JEI.js";
39
39
  import {
40
40
  authRemediation,
41
41
  delay,
42
42
  getAvailableClis,
43
43
  sleep,
44
44
  withTimeout
45
- } from "./chunk-SBCEQWUN.js";
45
+ } from "./chunk-GFW5IMOF.js";
46
46
  import {
47
47
  AgentError,
48
48
  CLI_NAMES,
@@ -58,6 +58,7 @@ import {
58
58
  err,
59
59
  formatPercentage,
60
60
  formatZodError,
61
+ formatZodIssueWithRoot,
61
62
  getErrorMessage,
62
63
  getMcpSafeDeadlineMs,
63
64
  getOutcomeStore,
@@ -70,7 +71,7 @@ import {
70
71
  registerPersistentOutcomeStoreFactory,
71
72
  resolveClassGuardMs,
72
73
  resolveVoteTimeout
73
- } from "./chunk-AZPM542H.js";
74
+ } from "./chunk-VKBFV6OD.js";
74
75
  import {
75
76
  ensureLearningDir,
76
77
  getOutcomesFile
@@ -5155,6 +5156,25 @@ function applyErrorPolicy(votes, policy) {
5155
5156
  import { appendFileSync as appendFileSync2, existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2 } from "node:fs";
5156
5157
  import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
5157
5158
 
5159
+ // src/audit/ledger-append.ts
5160
+ var UNREADABLE_RECORD_PREFIX = "refusing to persist an unreadable";
5161
+ function serializeValidatedRecord(schema, record, ledgerName) {
5162
+ const parsed = schema.safeParse(record);
5163
+ if (!parsed.success) {
5164
+ const paths = parsed.error.issues.map(formatZodIssueWithRoot).join("; ");
5165
+ throw new Error(`${UNREADABLE_RECORD_PREFIX} ${ledgerName} record: ${paths}`);
5166
+ }
5167
+ const line = JSON.stringify(record);
5168
+ const roundTrip = schema.safeParse(JSON.parse(line));
5169
+ if (!roundTrip.success) {
5170
+ const paths = roundTrip.error.issues.map(formatZodIssueWithRoot).join("; ");
5171
+ throw new Error(
5172
+ `${UNREADABLE_RECORD_PREFIX} ${ledgerName} record: JSON round-trip changed it \u2014 ${paths}`
5173
+ );
5174
+ }
5175
+ return line + "\n";
5176
+ }
5177
+
5158
5178
  // src/audit/vote-record.ts
5159
5179
  import * as crypto from "node:crypto";
5160
5180
  import { z as z7 } from "zod";
@@ -5226,6 +5246,21 @@ var VoterSummarySchema = z7.object({
5226
5246
  */
5227
5247
  retried: z7.literal(true).optional()
5228
5248
  }).strict();
5249
+ var VOTER_SUMMARY_KEYS = [
5250
+ "role",
5251
+ "decision",
5252
+ "confidence",
5253
+ "reasoning",
5254
+ "reasoningTruncated",
5255
+ "retried"
5256
+ ];
5257
+ function projectVoterSummary(v) {
5258
+ const out = {};
5259
+ for (const key of VOTER_SUMMARY_KEYS) {
5260
+ if (v[key] !== void 0) out[key] = v[key];
5261
+ }
5262
+ return out;
5263
+ }
5229
5264
  var VoteRecordCountsSchema = z7.object({
5230
5265
  approve: z7.number().int().nonnegative(),
5231
5266
  reject: z7.number().int().nonnegative(),
@@ -5394,18 +5429,7 @@ function computeVoteRecordHash(payload) {
5394
5429
  // fields: a pre-1.6 voter entry re-hashes byte-identical, so every
5395
5430
  // historical record still verifies, while editing or removing a stored
5396
5431
  // reasoning flips the hash.
5397
- voters: payload.voters.map((v) => ({
5398
- role: v.role,
5399
- decision: v.decision,
5400
- confidence: v.confidence,
5401
- ...v.reasoning !== void 0 ? { reasoning: v.reasoning } : {},
5402
- ...v.reasoningTruncated === true ? { reasoningTruncated: true } : {},
5403
- // #6050: hash-covered on the same append-when-present rule. Omitting it
5404
- // here would let a retried seat be edited to a clean one without moving
5405
- // the hash -- attesting to a claim about panel quality the chain does not
5406
- // actually cover.
5407
- ...v.retried === true ? { retried: true } : {}
5408
- })),
5432
+ voters: payload.voters.map(projectVoterSummary),
5409
5433
  correlationId: payload.correlationId ?? null
5410
5434
  };
5411
5435
  const canonical = JSON.stringify(foldOptionalFields(base, payload));
@@ -5421,7 +5445,13 @@ var VOTE_RECORDS_FILENAME = "vote-records.jsonl";
5421
5445
  var VOTE_RECORDS_PATH_ENV = "NEXUS_VOTE_RECORDS_PATH";
5422
5446
  var MAX_PROPOSAL_RECORD_CHARS = 500;
5423
5447
  function voteRecordWriteFailedMessage(path2) {
5424
- return `Authentic vote record NOT persisted: the resolved data directory is not writable (${path2}). Check filesystem permissions on the .nexus-agents data dir, or set ${VOTE_RECORDS_PATH_ENV} to a writable absolute file path. See server logs for the underlying filesystem error.`;
5448
+ return (
5449
+ // #6054: `undefined` from the store now has TWO causes — an unwritable path,
5450
+ // or a record the read schema would reject (refused before it became
5451
+ // durable). This text reaches the MCP caller, so it must not assert the
5452
+ // filesystem cause it cannot distinguish; the server log names which.
5453
+ `Authentic vote record NOT persisted (${path2}). Either the resolved data directory is not writable, or the record was refused because the read schema would reject it. The server log line "Failed to persist authentic vote record" carries the cause \u2014 a filesystem error, or the offending field. For the path case, check permissions on the .nexus-agents data dir or set ${VOTE_RECORDS_PATH_ENV} to a writable absolute file path.`
5454
+ );
5425
5455
  }
5426
5456
  function outcomeToDecision(result, votes, errorVoided) {
5427
5457
  const errorCount = votes.filter((v) => v.source === "error").length;
@@ -5592,7 +5622,7 @@ function persistVoteRecord(opts) {
5592
5622
  sequence: maxSequence + 1,
5593
5623
  previousHash: lastHash
5594
5624
  });
5595
- appendFileSync2(filePath, JSON.stringify(record) + "\n", "utf-8");
5625
+ appendFileSync2(filePath, serializeValidatedRecord(VoteRecordSchema, record, "vote"), "utf-8");
5596
5626
  logger11.info("Persisted authentic vote record", {
5597
5627
  id: record.id,
5598
5628
  decision: record.decision,
@@ -7310,7 +7340,7 @@ function logPartialProposal(bounded, log) {
7310
7340
  }
7311
7341
  async function runContrarianCheck(proposal, log) {
7312
7342
  try {
7313
- const { executeExpert } = await import("./expert-bridge-VKTP3RAL.js");
7343
+ const { executeExpert } = await import("./expert-bridge-GK7M6JDD.js");
7314
7344
  const bounded = boundArtifactForReview(proposal, CONTRARIAN_PROPOSAL_BUDGET, "proposal");
7315
7345
  logPartialProposal(bounded, log);
7316
7346
  const result = await executeExpert("architecture", buildContrarianPrompt(bounded));
@@ -7893,6 +7923,7 @@ export {
7893
7923
  ConsensusVoteInputSchema,
7894
7924
  toRecordDecision,
7895
7925
  mapOutcomeToDecision,
7926
+ serializeValidatedRecord,
7896
7927
  recordAuthenticVote,
7897
7928
  recordDecisionCost,
7898
7929
  checkSimulationAllowed,
@@ -7908,4 +7939,4 @@ export {
7908
7939
  CONSENSUS_VOTE_TOOL_SCHEMA,
7909
7940
  registerConsensusVoteTool
7910
7941
  };
7911
- //# sourceMappingURL=chunk-TRV4NNEE.js.map
7942
+ //# sourceMappingURL=chunk-DTUJCA6M.js.map