nexus-agents 2.92.5 → 2.94.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.
Files changed (119) hide show
  1. package/dist/{child-mcp-config-PIDVHWJ7.js → child-mcp-config-PPFHJZSO.js} +2 -2
  2. package/dist/{chunk-MBK6P4VV.js → chunk-24WC4XO2.js} +2 -2
  3. package/dist/{chunk-G55LVPNH.js → chunk-2YMRRZRM.js} +9 -12
  4. package/dist/chunk-2YMRRZRM.js.map +1 -0
  5. package/dist/{chunk-PIDABDFE.js → chunk-43UDRX3N.js} +9 -127
  6. package/dist/chunk-43UDRX3N.js.map +1 -0
  7. package/dist/{chunk-DNSBKQ7I.js → chunk-4QESFYGV.js} +4 -4
  8. package/dist/{chunk-QQMYKFG7.js → chunk-5B4VLSMP.js} +3 -3
  9. package/dist/{chunk-3TU3RJNK.js → chunk-5ZB3MTA7.js} +3 -3
  10. package/dist/{chunk-FL3AXIUL.js → chunk-63OGXDHS.js} +4 -4
  11. package/dist/{chunk-BG4WK4UP.js → chunk-76535ZNP.js} +15 -6
  12. package/dist/chunk-76535ZNP.js.map +1 -0
  13. package/dist/{chunk-QXGLZETS.js → chunk-77JUKFTG.js} +7 -7
  14. package/dist/{chunk-GKFFRRS4.js → chunk-ADRTAUJA.js} +4 -4
  15. package/dist/{chunk-VBIAMMZZ.js → chunk-EB43BGAR.js} +2 -2
  16. package/dist/{chunk-EI2E43HI.js → chunk-EDPDH5YT.js} +3 -3
  17. package/dist/{chunk-YQAS2EGR.js → chunk-EJR6U67L.js} +2 -2
  18. package/dist/{chunk-2QJJYCPD.js → chunk-FUGPKYEJ.js} +2 -2
  19. package/dist/{chunk-P646QQYW.js → chunk-G5EBHQ2L.js} +5 -5
  20. package/dist/chunk-G5EBHQ2L.js.map +1 -0
  21. package/dist/{chunk-YJUHVQSG.js → chunk-GMZDRTVJ.js} +20 -3
  22. package/dist/chunk-GMZDRTVJ.js.map +1 -0
  23. package/dist/{chunk-U4RLBLNO.js → chunk-KSJPDQSG.js} +2 -2
  24. package/dist/{chunk-DSERRMPX.js → chunk-L7I55FAN.js} +2 -2
  25. package/dist/{chunk-OXLXVSN3.js → chunk-LCLVSNST.js} +2 -2
  26. package/dist/{chunk-VU54VB6K.js → chunk-OKGHHCS5.js} +3 -3
  27. package/dist/{chunk-DQEREDUW.js → chunk-OSSGG7KW.js} +2 -2
  28. package/dist/{chunk-L5BXCSMP.js → chunk-OT6V5ROA.js} +406 -16
  29. package/dist/chunk-OT6V5ROA.js.map +1 -0
  30. package/dist/{chunk-TOQJ3UN5.js → chunk-Q3NUA7CW.js} +3 -3
  31. package/dist/{chunk-QADQ4LN4.js → chunk-R2NKJPUX.js} +2 -2
  32. package/dist/{chunk-WXEMTPML.js → chunk-ROAANOOB.js} +2 -2
  33. package/dist/{chunk-NYWZI46K.js → chunk-TNBWHOPY.js} +52 -132
  34. package/dist/chunk-TNBWHOPY.js.map +1 -0
  35. package/dist/{chunk-KTJUMU2A.js → chunk-UC3PVIN4.js} +179 -48
  36. package/dist/chunk-UC3PVIN4.js.map +1 -0
  37. package/dist/{chunk-ZYYU26YH.js → chunk-XBPFVWA2.js} +2 -2
  38. package/dist/{chunk-SIICMKBA.js → chunk-YDXGYKZJ.js} +2 -2
  39. package/dist/chunk-YDXGYKZJ.js.map +1 -0
  40. package/dist/{chunk-3XC5LFWH.js → chunk-ZY2EMD72.js} +5 -5
  41. package/dist/{cli-circuit-breaker-HFSOBCPK.js → cli-circuit-breaker-BAERQZ3H.js} +4 -4
  42. package/dist/cli.js +135 -38
  43. package/dist/cli.js.map +1 -1
  44. package/dist/{composite-router-T2XYCQOU.js → composite-router-EONKFRDD.js} +2 -2
  45. package/dist/{consensus-vote-IDHQVKX2.js → consensus-vote-TO5575P3.js} +12 -12
  46. package/dist/{context-retriever-5BJYPAX7.js → context-retriever-JM564MOV.js} +6 -6
  47. package/dist/{doctor-deep-OVGRBG3Z.js → doctor-deep-VFBQ7TY4.js} +3 -3
  48. package/dist/{expert-bridge-JPTHFWPW.js → expert-bridge-OXME7FES.js} +4 -4
  49. package/dist/{factory-734UWF4C.js → factory-FVZLVIYH.js} +5 -5
  50. package/dist/{factory-NE7SNW7V.js → factory-MDT5CFA5.js} +5 -5
  51. package/dist/index.d.ts +240 -189
  52. package/dist/index.js +198 -55
  53. package/dist/index.js.map +1 -1
  54. package/dist/{init-opencode-2ZBDJILW.js → init-opencode-Y6XKR6WS.js} +5 -5
  55. package/dist/{issue-triage-AGGTH767.js → issue-triage-2XVD4JQ7.js} +5 -5
  56. package/dist/{pr-reviewer-helpers-WGPLUXPU.js → pr-reviewer-helpers-JLWEQIN6.js} +4 -4
  57. package/dist/{registry-command-CZZM5SF2.js → registry-command-FYVOMCBG.js} +2 -2
  58. package/dist/{repo-security-plan-X42KXHT2.js → repo-security-plan-JRDHWI2R.js} +3 -3
  59. package/dist/{research-helpers-synthesize-C7YGRQI6.js → research-helpers-synthesize-F7L7M7FJ.js} +3 -3
  60. package/dist/{routing-memory-2FYZDQUC.js → routing-memory-JAV2ICXR.js} +2 -2
  61. package/dist/{session-memory-53NZRZB6.js → session-memory-2XAGY3PX.js} +3 -3
  62. package/dist/{setup-command-ZV6VZLP4.js → setup-command-6WVEOE4Q.js} +11 -11
  63. package/dist/{setup-config-CYRK4UFF.js → setup-config-KUZU2GFI.js} +3 -3
  64. package/dist/{setup-custom-api-GXHPYLDR.js → setup-custom-api-3M7CU3TF.js} +4 -4
  65. package/dist/{tool-memory-AX5G67J6.js → tool-memory-YWX4FTIQ.js} +5 -5
  66. package/dist/{weather-report-AUMNGHYZ.js → weather-report-ZZM5EU7N.js} +2 -2
  67. package/package.json +1 -1
  68. package/dist/chunk-BG4WK4UP.js.map +0 -1
  69. package/dist/chunk-G55LVPNH.js.map +0 -1
  70. package/dist/chunk-KTJUMU2A.js.map +0 -1
  71. package/dist/chunk-L5BXCSMP.js.map +0 -1
  72. package/dist/chunk-NYWZI46K.js.map +0 -1
  73. package/dist/chunk-P646QQYW.js.map +0 -1
  74. package/dist/chunk-PIDABDFE.js.map +0 -1
  75. package/dist/chunk-SIICMKBA.js.map +0 -1
  76. package/dist/chunk-YJUHVQSG.js.map +0 -1
  77. /package/dist/{child-mcp-config-PIDVHWJ7.js.map → child-mcp-config-PPFHJZSO.js.map} +0 -0
  78. /package/dist/{chunk-MBK6P4VV.js.map → chunk-24WC4XO2.js.map} +0 -0
  79. /package/dist/{chunk-DNSBKQ7I.js.map → chunk-4QESFYGV.js.map} +0 -0
  80. /package/dist/{chunk-QQMYKFG7.js.map → chunk-5B4VLSMP.js.map} +0 -0
  81. /package/dist/{chunk-3TU3RJNK.js.map → chunk-5ZB3MTA7.js.map} +0 -0
  82. /package/dist/{chunk-FL3AXIUL.js.map → chunk-63OGXDHS.js.map} +0 -0
  83. /package/dist/{chunk-QXGLZETS.js.map → chunk-77JUKFTG.js.map} +0 -0
  84. /package/dist/{chunk-GKFFRRS4.js.map → chunk-ADRTAUJA.js.map} +0 -0
  85. /package/dist/{chunk-VBIAMMZZ.js.map → chunk-EB43BGAR.js.map} +0 -0
  86. /package/dist/{chunk-EI2E43HI.js.map → chunk-EDPDH5YT.js.map} +0 -0
  87. /package/dist/{chunk-YQAS2EGR.js.map → chunk-EJR6U67L.js.map} +0 -0
  88. /package/dist/{chunk-2QJJYCPD.js.map → chunk-FUGPKYEJ.js.map} +0 -0
  89. /package/dist/{chunk-U4RLBLNO.js.map → chunk-KSJPDQSG.js.map} +0 -0
  90. /package/dist/{chunk-DSERRMPX.js.map → chunk-L7I55FAN.js.map} +0 -0
  91. /package/dist/{chunk-OXLXVSN3.js.map → chunk-LCLVSNST.js.map} +0 -0
  92. /package/dist/{chunk-VU54VB6K.js.map → chunk-OKGHHCS5.js.map} +0 -0
  93. /package/dist/{chunk-DQEREDUW.js.map → chunk-OSSGG7KW.js.map} +0 -0
  94. /package/dist/{chunk-TOQJ3UN5.js.map → chunk-Q3NUA7CW.js.map} +0 -0
  95. /package/dist/{chunk-QADQ4LN4.js.map → chunk-R2NKJPUX.js.map} +0 -0
  96. /package/dist/{chunk-WXEMTPML.js.map → chunk-ROAANOOB.js.map} +0 -0
  97. /package/dist/{chunk-ZYYU26YH.js.map → chunk-XBPFVWA2.js.map} +0 -0
  98. /package/dist/{chunk-3XC5LFWH.js.map → chunk-ZY2EMD72.js.map} +0 -0
  99. /package/dist/{cli-circuit-breaker-HFSOBCPK.js.map → cli-circuit-breaker-BAERQZ3H.js.map} +0 -0
  100. /package/dist/{composite-router-T2XYCQOU.js.map → composite-router-EONKFRDD.js.map} +0 -0
  101. /package/dist/{consensus-vote-IDHQVKX2.js.map → consensus-vote-TO5575P3.js.map} +0 -0
  102. /package/dist/{context-retriever-5BJYPAX7.js.map → context-retriever-JM564MOV.js.map} +0 -0
  103. /package/dist/{doctor-deep-OVGRBG3Z.js.map → doctor-deep-VFBQ7TY4.js.map} +0 -0
  104. /package/dist/{expert-bridge-JPTHFWPW.js.map → expert-bridge-OXME7FES.js.map} +0 -0
  105. /package/dist/{factory-734UWF4C.js.map → factory-FVZLVIYH.js.map} +0 -0
  106. /package/dist/{factory-NE7SNW7V.js.map → factory-MDT5CFA5.js.map} +0 -0
  107. /package/dist/{init-opencode-2ZBDJILW.js.map → init-opencode-Y6XKR6WS.js.map} +0 -0
  108. /package/dist/{issue-triage-AGGTH767.js.map → issue-triage-2XVD4JQ7.js.map} +0 -0
  109. /package/dist/{pr-reviewer-helpers-WGPLUXPU.js.map → pr-reviewer-helpers-JLWEQIN6.js.map} +0 -0
  110. /package/dist/{registry-command-CZZM5SF2.js.map → registry-command-FYVOMCBG.js.map} +0 -0
  111. /package/dist/{repo-security-plan-X42KXHT2.js.map → repo-security-plan-JRDHWI2R.js.map} +0 -0
  112. /package/dist/{research-helpers-synthesize-C7YGRQI6.js.map → research-helpers-synthesize-F7L7M7FJ.js.map} +0 -0
  113. /package/dist/{routing-memory-2FYZDQUC.js.map → routing-memory-JAV2ICXR.js.map} +0 -0
  114. /package/dist/{session-memory-53NZRZB6.js.map → session-memory-2XAGY3PX.js.map} +0 -0
  115. /package/dist/{setup-command-ZV6VZLP4.js.map → setup-command-6WVEOE4Q.js.map} +0 -0
  116. /package/dist/{setup-config-CYRK4UFF.js.map → setup-config-KUZU2GFI.js.map} +0 -0
  117. /package/dist/{setup-custom-api-GXHPYLDR.js.map → setup-custom-api-3M7CU3TF.js.map} +0 -0
  118. /package/dist/{tool-memory-AX5G67J6.js.map → tool-memory-YWX4FTIQ.js.map} +0 -0
  119. /package/dist/{weather-report-AUMNGHYZ.js.map → weather-report-ZZM5EU7N.js.map} +0 -0
@@ -3,14 +3,14 @@ import {
3
3
  createStream,
4
4
  requireApiKey,
5
5
  validateApiKeyPresence
6
- } from "./chunk-DSERRMPX.js";
6
+ } from "./chunk-L7I55FAN.js";
7
7
  import {
8
8
  ModelCapability,
9
9
  err,
10
10
  getCliModelName,
11
11
  getTokenEstimator,
12
12
  ok
13
- } from "./chunk-L5BXCSMP.js";
13
+ } from "./chunk-OT6V5ROA.js";
14
14
 
15
15
  // src/adapters/openai-types.ts
16
16
  var OPENAI_MODELS = {
@@ -553,4 +553,4 @@ export {
553
553
  OpenAIAdapter,
554
554
  createOpenAIAdapter
555
555
  };
556
- //# sourceMappingURL=chunk-TOQJ3UN5.js.map
556
+ //# sourceMappingURL=chunk-Q3NUA7CW.js.map
@@ -2,7 +2,7 @@ import {
2
2
  TASK_CATEGORIES,
3
3
  getAdaptiveBonus,
4
4
  getOutcomeStore
5
- } from "./chunk-L5BXCSMP.js";
5
+ } from "./chunk-OT6V5ROA.js";
6
6
 
7
7
  // src/cli/doctor-deep.ts
8
8
  var CLI_NAMES = ["claude", "gemini", "codex", "opencode"];
@@ -106,4 +106,4 @@ export {
106
106
  runDeepDiagnostics,
107
107
  formatDeepDiagnostics
108
108
  };
109
- //# sourceMappingURL=chunk-QADQ4LN4.js.map
109
+ //# sourceMappingURL=chunk-R2NKJPUX.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getErrorMessage
3
- } from "./chunk-L5BXCSMP.js";
3
+ } from "./chunk-OT6V5ROA.js";
4
4
 
5
5
  // src/cli/setup-config.ts
6
6
  import { copyFileSync, existsSync, mkdirSync, writeFileSync } from "fs";
@@ -77,4 +77,4 @@ function ensureBackup(outputPath) {
77
77
  export {
78
78
  runConfigInitSync
79
79
  };
80
- //# sourceMappingURL=chunk-WXEMTPML.js.map
80
+ //# sourceMappingURL=chunk-ROAANOOB.js.map
@@ -4,21 +4,21 @@ import {
4
4
  createStream,
5
5
  requireApiKey,
6
6
  validateApiKeyPresence
7
- } from "./chunk-DSERRMPX.js";
7
+ } from "./chunk-L7I55FAN.js";
8
8
  import {
9
9
  CUSTOM_API_BASE_URL_ENV,
10
10
  PROVIDER_ENV_KEYS,
11
11
  validateCustomApiBaseUrl
12
- } from "./chunk-SIICMKBA.js";
12
+ } from "./chunk-YDXGYKZJ.js";
13
13
  import {
14
14
  getToolMemory
15
- } from "./chunk-FL3AXIUL.js";
15
+ } from "./chunk-63OGXDHS.js";
16
16
  import {
17
17
  getDefaultAvailableModelsCache
18
- } from "./chunk-U4RLBLNO.js";
18
+ } from "./chunk-KSJPDQSG.js";
19
19
  import {
20
20
  CUSTOM_API_DEFAULT_MODEL
21
- } from "./chunk-PIDABDFE.js";
21
+ } from "./chunk-43UDRX3N.js";
22
22
  import {
23
23
  createCliAdapter,
24
24
  createCliDetectionCache,
@@ -27,11 +27,12 @@ import {
27
27
  isCliAvailable,
28
28
  sanitizeOutput,
29
29
  withTimeout
30
- } from "./chunk-DNSBKQ7I.js";
30
+ } from "./chunk-4QESFYGV.js";
31
31
  import {
32
32
  AgentError,
33
33
  CACHE_TIMEOUTS,
34
34
  CLI_NAMES,
35
+ CircularBuffer,
35
36
  DEFAULT_CLI,
36
37
  ErrorCode,
37
38
  MCP_TIMEOUTS,
@@ -60,6 +61,7 @@ import {
60
61
  getInTreeCapabilitiesMatrix,
61
62
  getMcpSafeDeadlineMs,
62
63
  getOutcomeStore,
64
+ getPipelineEventBus,
63
65
  getRandomProvider,
64
66
  getTimeProvider,
65
67
  getTokenEstimator,
@@ -70,7 +72,7 @@ import {
70
72
  resolveCliAlias,
71
73
  resolveVoteTimeout,
72
74
  toRateLimitError
73
- } from "./chunk-L5BXCSMP.js";
75
+ } from "./chunk-OT6V5ROA.js";
74
76
  import {
75
77
  ensureLearningDir,
76
78
  getNexusDataDir,
@@ -1902,7 +1904,8 @@ var CliToModelAdapter = class {
1902
1904
  */
1903
1905
  async complete(request) {
1904
1906
  const task = this.toCliTask(request);
1905
- const opts = this.defaultTimeoutMs !== void 0 ? { timeoutMs: this.defaultTimeoutMs } : void 0;
1907
+ const effectiveTimeoutMs = request.timeoutMs ?? this.defaultTimeoutMs;
1908
+ const opts = effectiveTimeoutMs !== void 0 ? { timeoutMs: effectiveTimeoutMs } : void 0;
1906
1909
  const result = await this.cliAdapter.execute(task, opts);
1907
1910
  if (!result.ok) {
1908
1911
  return err(this.toModelError(result.error));
@@ -2896,125 +2899,6 @@ function countMatchingSubscribers(topic, subscriptions) {
2896
2899
  return count;
2897
2900
  }
2898
2901
 
2899
- // src/agents/collaboration/circular-buffer.ts
2900
- var CircularBuffer = class {
2901
- /**
2902
- * Creates a new circular buffer with the specified capacity.
2903
- *
2904
- * @param capacity - Maximum number of items to store
2905
- * @throws Error if capacity is less than 1
2906
- */
2907
- constructor(capacity) {
2908
- this.capacity = capacity;
2909
- if (capacity < 1) {
2910
- throw new Error("CircularBuffer capacity must be at least 1");
2911
- }
2912
- this.buffer = new Array(capacity);
2913
- }
2914
- buffer;
2915
- head = 0;
2916
- // Points to oldest item (or next write position when empty)
2917
- tail = 0;
2918
- // Points to next write position
2919
- _size = 0;
2920
- /**
2921
- * Returns the number of items currently in the buffer.
2922
- */
2923
- get size() {
2924
- return this._size;
2925
- }
2926
- /**
2927
- * Returns true if the buffer is empty.
2928
- */
2929
- get isEmpty() {
2930
- return this._size === 0;
2931
- }
2932
- /**
2933
- * Returns true if the buffer is at capacity.
2934
- */
2935
- get isFull() {
2936
- return this._size === this.capacity;
2937
- }
2938
- /**
2939
- * Adds an item to the buffer.
2940
- *
2941
- * If the buffer is full, the oldest item is overwritten.
2942
- * This operation is O(1).
2943
- *
2944
- * @param item - Item to add
2945
- */
2946
- push(item) {
2947
- this.buffer[this.tail] = item;
2948
- this.tail = (this.tail + 1) % this.capacity;
2949
- if (this._size < this.capacity) {
2950
- this._size++;
2951
- } else {
2952
- this.head = (this.head + 1) % this.capacity;
2953
- }
2954
- }
2955
- /**
2956
- * Removes all items from the buffer.
2957
- * This operation is O(n) to allow garbage collection of items.
2958
- */
2959
- clear() {
2960
- for (let i = 0; i < this.capacity; i++) {
2961
- this.buffer[i] = void 0;
2962
- }
2963
- this.head = 0;
2964
- this.tail = 0;
2965
- this._size = 0;
2966
- }
2967
- /**
2968
- * Returns all items in insertion order (oldest to newest).
2969
- * This operation is O(n) where n is the number of items.
2970
- *
2971
- * @returns Array of items in insertion order
2972
- */
2973
- toArray() {
2974
- if (this._size === 0) {
2975
- return [];
2976
- }
2977
- const result = [];
2978
- let readIndex = this.head;
2979
- for (let i = 0; i < this._size; i++) {
2980
- result.push(this.buffer[readIndex]);
2981
- readIndex = (readIndex + 1) % this.capacity;
2982
- }
2983
- return result;
2984
- }
2985
- /**
2986
- * Iterates over items in insertion order (oldest to newest).
2987
- */
2988
- *[Symbol.iterator]() {
2989
- let readIndex = this.head;
2990
- for (let i = 0; i < this._size; i++) {
2991
- yield this.buffer[readIndex];
2992
- readIndex = (readIndex + 1) % this.capacity;
2993
- }
2994
- }
2995
- /**
2996
- * Returns the most recently added item, or undefined if empty.
2997
- * This operation is O(1).
2998
- */
2999
- peekNewest() {
3000
- if (this._size === 0) {
3001
- return void 0;
3002
- }
3003
- const newestIndex = (this.tail - 1 + this.capacity) % this.capacity;
3004
- return this.buffer[newestIndex];
3005
- }
3006
- /**
3007
- * Returns the oldest item in the buffer, or undefined if empty.
3008
- * This operation is O(1).
3009
- */
3010
- peekOldest() {
3011
- if (this._size === 0) {
3012
- return void 0;
3013
- }
3014
- return this.buffer[this.head];
3015
- }
3016
- };
3017
-
3018
2902
  // src/agents/collaboration/event-bus.ts
3019
2903
  var EventBus = class {
3020
2904
  subscriptions = /* @__PURE__ */ new Map();
@@ -4394,8 +4278,17 @@ async function executeSingleVoteAttempt(role, proposal, adapter, timeoutMs) {
4394
4278
  // findings block routinely exceed 500 tokens. Bumped to 2000 (#2245);
4395
4279
  // refine per use case if needed.
4396
4280
  maxTokens: 2e3,
4397
- temperature: 0.3
4281
+ temperature: 0.3,
4398
4282
  // Low temperature for consistent evaluations
4283
+ // Thread the vote's budget into the adapter so its shorter standard CLI
4284
+ // timeout doesn't fire first and surface as an MCP -32001 on slow voters
4285
+ // (e.g. the Security role on complex proposals) (#3304).
4286
+ timeoutMs,
4287
+ // CLI adapters honor `timeoutMs`; API adapters honor `signal` (#3036). Pass
4288
+ // both so the slow voter is cancelled cleanly at the vote budget regardless
4289
+ // of backing (CLI subprocess SIGTERM'd via #3026, API SDK call aborted) —
4290
+ // CLI-vs-API parity for the vote timeout (#3304).
4291
+ signal: AbortSignal.timeout(timeoutMs)
4399
4292
  };
4400
4293
  const timeoutResult = await withTimeout(
4401
4294
  adapter.complete(request),
@@ -7908,7 +7801,7 @@ var ErrorPolicySchema = z9.enum(["reduce_denominator", "count_as_abstain", "fail
7908
7801
  var VoteThresholdSchema = z9.enum(["majority", "supermajority", "unanimous"]);
7909
7802
  var ERROR_FLOOR_FRACTION = 0.5;
7910
7803
  function getDefaultErrorPolicy(strategy) {
7911
- if (strategy === "unanimous" || strategy === "higher_order" || strategy === "opinion_wise") {
7804
+ if (strategy === "unanimous") {
7912
7805
  return "fail_closed";
7913
7806
  }
7914
7807
  return "reduce_denominator";
@@ -7922,7 +7815,7 @@ var ConsensusVoteInputSchema = z9.object({
7922
7815
  "Voting strategy: simple_majority (default), supermajority, unanimous, proof_of_learning, or higher_order (Bayesian-optimal)"
7923
7816
  ),
7924
7817
  errorPolicy: ErrorPolicySchema.optional().describe(
7925
- "How to treat voters that errored or timed out (#2630). Default: fail_closed for unanimous/higher_order/opinion_wise, reduce_denominator otherwise. Regardless of policy, errors > 50% always fails."
7818
+ "How to treat voters that errored or timed out (#2630). Default: fail_closed for unanimous only; reduce_denominator for all other strategies incl. higher_order/opinion_wise (#3138 \u2014 a single infra timeout should not void an otherwise-unanimous vote). Regardless of policy, errors > 50% always fails."
7926
7819
  ),
7927
7820
  quickMode: z9.boolean().optional().default(false).describe("Use 3 agents instead of 5 for faster execution"),
7928
7821
  simulateVotes: z9.boolean().optional().default(false).describe(
@@ -8257,6 +8150,32 @@ function recordVoteOutcomes(votes) {
8257
8150
  }
8258
8151
  }
8259
8152
 
8153
+ // src/mcp/tools/consensus-vote-signals.ts
8154
+ function rejectionRulesFrom(result) {
8155
+ const rules = /* @__PURE__ */ new Set();
8156
+ for (const vote of result.votes.values()) {
8157
+ if (vote.decision === "reject" && vote.rejectionCategories !== void 0) {
8158
+ for (const category of vote.rejectionCategories) rules.add(category);
8159
+ }
8160
+ }
8161
+ return rules.size > 0 ? [...rules] : void 0;
8162
+ }
8163
+ function emitVoteRejectedSignal(result, bus, logger11) {
8164
+ if (result.outcome !== "rejected") return;
8165
+ try {
8166
+ const rejectionRules = rejectionRulesFrom(result);
8167
+ bus.emit({
8168
+ type: "signal.vote_rejected",
8169
+ timestamp: getTimeProvider().now(),
8170
+ proposalId: result.proposalId,
8171
+ approvalPercentage: result.approvalPercentage,
8172
+ ...rejectionRules !== void 0 ? { rejectionRules } : {}
8173
+ });
8174
+ } catch (error) {
8175
+ logger11.warn("Failed to emit signal.vote_rejected", { error: getErrorMessage(error) });
8176
+ }
8177
+ }
8178
+
8260
8179
  // src/mcp/tools/simulation-guard.ts
8261
8180
  var WARNED = /* @__PURE__ */ new Set();
8262
8181
  function isTestRunner() {
@@ -9124,7 +9043,7 @@ async function processVotesWithCascade(engineVotes, opts) {
9124
9043
  var CONTRARIAN_ESCALATION_THRESHOLD = 0.8;
9125
9044
  async function runContrarianCheck(proposal, log) {
9126
9045
  try {
9127
- const { executeExpert } = await import("./expert-bridge-JPTHFWPW.js");
9046
+ const { executeExpert } = await import("./expert-bridge-OXME7FES.js");
9128
9047
  const prompt = [
9129
9048
  "You are a contrarian analyst. Your job is to find reasons this proposal should be REJECTED.",
9130
9049
  "Look for: YAGNI (not needed), MISALIGNED (wrong tech/architecture), SECURITY_RISK, SCOPE_CREEP.",
@@ -9287,6 +9206,7 @@ async function handleConsensusVote(deps, args) {
9287
9206
  result.totalTimeMs,
9288
9207
  result.votes
9289
9208
  );
9209
+ emitVoteRejectedSignal(result.result, getPipelineEventBus(), logger11);
9290
9210
  return { ok: true, value: buildResponse(args, result) };
9291
9211
  } catch (error) {
9292
9212
  const message = getErrorMessage(error);
@@ -9646,4 +9566,4 @@ export {
9646
9566
  CONSENSUS_VOTE_OUTPUT_SCHEMA,
9647
9567
  registerConsensusVoteTool
9648
9568
  };
9649
- //# sourceMappingURL=chunk-NYWZI46K.js.map
9569
+ //# sourceMappingURL=chunk-TNBWHOPY.js.map