nexus-agents 2.92.5 → 2.93.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.
- package/dist/{child-mcp-config-PIDVHWJ7.js → child-mcp-config-WNISXFYD.js} +2 -2
- package/dist/{chunk-SIICMKBA.js → chunk-2IBJC2EP.js} +2 -2
- package/dist/chunk-2IBJC2EP.js.map +1 -0
- package/dist/{chunk-WXEMTPML.js → chunk-2T4NV6QT.js} +2 -2
- package/dist/{chunk-PIDABDFE.js → chunk-4A4WPM75.js} +10 -126
- package/dist/chunk-4A4WPM75.js.map +1 -0
- package/dist/{chunk-U4RLBLNO.js → chunk-57OH2O2U.js} +2 -2
- package/dist/{chunk-3XC5LFWH.js → chunk-5BTRDVWC.js} +5 -5
- package/dist/{chunk-QQMYKFG7.js → chunk-AZP66FIA.js} +3 -3
- package/dist/{chunk-DNSBKQ7I.js → chunk-BHA6V7GK.js} +4 -4
- package/dist/{chunk-TOQJ3UN5.js → chunk-BNHBZRU7.js} +3 -3
- package/dist/{chunk-YQAS2EGR.js → chunk-CPH6LKXO.js} +2 -2
- package/dist/{chunk-VBIAMMZZ.js → chunk-DTFMYM3V.js} +2 -2
- package/dist/{chunk-QADQ4LN4.js → chunk-E3QWWP67.js} +2 -2
- package/dist/{chunk-FL3AXIUL.js → chunk-FTCU55O6.js} +4 -4
- package/dist/{chunk-BG4WK4UP.js → chunk-G5IDRWWI.js} +15 -6
- package/dist/chunk-G5IDRWWI.js.map +1 -0
- package/dist/{chunk-L5BXCSMP.js → chunk-HKISF2E7.js} +183 -10
- package/dist/chunk-HKISF2E7.js.map +1 -0
- package/dist/{chunk-KTJUMU2A.js → chunk-IJ2AZZVH.js} +66 -48
- package/dist/chunk-IJ2AZZVH.js.map +1 -0
- package/dist/{chunk-OXLXVSN3.js → chunk-JCETWDU7.js} +2 -2
- package/dist/{chunk-DSERRMPX.js → chunk-JEBWSHSU.js} +2 -2
- package/dist/{chunk-VU54VB6K.js → chunk-K7VGX37L.js} +3 -3
- package/dist/{chunk-NYWZI46K.js → chunk-LJMO5P6O.js} +38 -128
- package/dist/chunk-LJMO5P6O.js.map +1 -0
- package/dist/chunk-NESW2TTD.js +134 -0
- package/dist/chunk-NESW2TTD.js.map +1 -0
- package/dist/{chunk-MBK6P4VV.js → chunk-RTUZSR4R.js} +2 -2
- package/dist/{chunk-QXGLZETS.js → chunk-SHSKW5ML.js} +7 -7
- package/dist/{chunk-YJUHVQSG.js → chunk-SMGH2B3A.js} +2 -2
- package/dist/{chunk-ZYYU26YH.js → chunk-SORBJPRA.js} +2 -2
- package/dist/{chunk-EI2E43HI.js → chunk-T73G67GT.js} +3 -3
- package/dist/{chunk-2QJJYCPD.js → chunk-ULBKFMVO.js} +2 -2
- package/dist/{chunk-3TU3RJNK.js → chunk-VSG6RSE6.js} +3 -3
- package/dist/{chunk-DQEREDUW.js → chunk-WU3SUA35.js} +2 -2
- package/dist/{chunk-G55LVPNH.js → chunk-XVY3I7JT.js} +7 -7
- package/dist/{chunk-P646QQYW.js → chunk-ZOAU7RE4.js} +6 -4
- package/dist/chunk-ZOAU7RE4.js.map +1 -0
- package/dist/{chunk-GKFFRRS4.js → chunk-ZYHHDPFW.js} +4 -4
- package/dist/{cli-circuit-breaker-HFSOBCPK.js → cli-circuit-breaker-6E4E2IU7.js} +4 -4
- package/dist/cli.js +109 -38
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-T2XYCQOU.js → composite-router-MQOPXLVV.js} +2 -2
- package/dist/{consensus-vote-IDHQVKX2.js → consensus-vote-ZRADOLXH.js} +13 -12
- package/dist/{context-retriever-5BJYPAX7.js → context-retriever-TZGIETJO.js} +6 -6
- package/dist/{doctor-deep-OVGRBG3Z.js → doctor-deep-OU2WC55V.js} +3 -3
- package/dist/{expert-bridge-JPTHFWPW.js → expert-bridge-WP5ZWXFY.js} +4 -4
- package/dist/{factory-NE7SNW7V.js → factory-2TN2VZTR.js} +5 -5
- package/dist/{factory-734UWF4C.js → factory-RJTRVII5.js} +5 -5
- package/dist/index.d.ts +52 -9
- package/dist/index.js +199 -55
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-2ZBDJILW.js → init-opencode-AYMNMWU7.js} +5 -5
- package/dist/{issue-triage-AGGTH767.js → issue-triage-QIVZN3PJ.js} +5 -5
- package/dist/{pr-reviewer-helpers-WGPLUXPU.js → pr-reviewer-helpers-P24OBKVM.js} +4 -4
- package/dist/{registry-command-CZZM5SF2.js → registry-command-KWWOKJ5C.js} +2 -2
- package/dist/{repo-security-plan-X42KXHT2.js → repo-security-plan-KZNEXDCI.js} +3 -3
- package/dist/{research-helpers-synthesize-C7YGRQI6.js → research-helpers-synthesize-DH5PPX7A.js} +4 -3
- package/dist/{routing-memory-2FYZDQUC.js → routing-memory-AGHJQTRH.js} +2 -2
- package/dist/{session-memory-53NZRZB6.js → session-memory-O24IVZAW.js} +3 -3
- package/dist/{setup-command-ZV6VZLP4.js → setup-command-NBXZ4NGV.js} +12 -11
- package/dist/{setup-config-CYRK4UFF.js → setup-config-Y4JA5QWO.js} +3 -3
- package/dist/{setup-custom-api-GXHPYLDR.js → setup-custom-api-UNX4OJEX.js} +5 -4
- package/dist/{setup-custom-api-GXHPYLDR.js.map → setup-custom-api-UNX4OJEX.js.map} +1 -1
- package/dist/{tool-memory-AX5G67J6.js → tool-memory-UEQNXIGC.js} +5 -5
- package/dist/{weather-report-AUMNGHYZ.js → weather-report-S5YXRY7G.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-BG4WK4UP.js.map +0 -1
- package/dist/chunk-KTJUMU2A.js.map +0 -1
- package/dist/chunk-L5BXCSMP.js.map +0 -1
- package/dist/chunk-NYWZI46K.js.map +0 -1
- package/dist/chunk-P646QQYW.js.map +0 -1
- package/dist/chunk-PIDABDFE.js.map +0 -1
- package/dist/chunk-SIICMKBA.js.map +0 -1
- /package/dist/{child-mcp-config-PIDVHWJ7.js.map → child-mcp-config-WNISXFYD.js.map} +0 -0
- /package/dist/{chunk-WXEMTPML.js.map → chunk-2T4NV6QT.js.map} +0 -0
- /package/dist/{chunk-U4RLBLNO.js.map → chunk-57OH2O2U.js.map} +0 -0
- /package/dist/{chunk-3XC5LFWH.js.map → chunk-5BTRDVWC.js.map} +0 -0
- /package/dist/{chunk-QQMYKFG7.js.map → chunk-AZP66FIA.js.map} +0 -0
- /package/dist/{chunk-DNSBKQ7I.js.map → chunk-BHA6V7GK.js.map} +0 -0
- /package/dist/{chunk-TOQJ3UN5.js.map → chunk-BNHBZRU7.js.map} +0 -0
- /package/dist/{chunk-YQAS2EGR.js.map → chunk-CPH6LKXO.js.map} +0 -0
- /package/dist/{chunk-VBIAMMZZ.js.map → chunk-DTFMYM3V.js.map} +0 -0
- /package/dist/{chunk-QADQ4LN4.js.map → chunk-E3QWWP67.js.map} +0 -0
- /package/dist/{chunk-FL3AXIUL.js.map → chunk-FTCU55O6.js.map} +0 -0
- /package/dist/{chunk-OXLXVSN3.js.map → chunk-JCETWDU7.js.map} +0 -0
- /package/dist/{chunk-DSERRMPX.js.map → chunk-JEBWSHSU.js.map} +0 -0
- /package/dist/{chunk-VU54VB6K.js.map → chunk-K7VGX37L.js.map} +0 -0
- /package/dist/{chunk-MBK6P4VV.js.map → chunk-RTUZSR4R.js.map} +0 -0
- /package/dist/{chunk-QXGLZETS.js.map → chunk-SHSKW5ML.js.map} +0 -0
- /package/dist/{chunk-YJUHVQSG.js.map → chunk-SMGH2B3A.js.map} +0 -0
- /package/dist/{chunk-ZYYU26YH.js.map → chunk-SORBJPRA.js.map} +0 -0
- /package/dist/{chunk-EI2E43HI.js.map → chunk-T73G67GT.js.map} +0 -0
- /package/dist/{chunk-2QJJYCPD.js.map → chunk-ULBKFMVO.js.map} +0 -0
- /package/dist/{chunk-3TU3RJNK.js.map → chunk-VSG6RSE6.js.map} +0 -0
- /package/dist/{chunk-DQEREDUW.js.map → chunk-WU3SUA35.js.map} +0 -0
- /package/dist/{chunk-G55LVPNH.js.map → chunk-XVY3I7JT.js.map} +0 -0
- /package/dist/{chunk-GKFFRRS4.js.map → chunk-ZYHHDPFW.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-HFSOBCPK.js.map → cli-circuit-breaker-6E4E2IU7.js.map} +0 -0
- /package/dist/{composite-router-T2XYCQOU.js.map → composite-router-MQOPXLVV.js.map} +0 -0
- /package/dist/{consensus-vote-IDHQVKX2.js.map → consensus-vote-ZRADOLXH.js.map} +0 -0
- /package/dist/{context-retriever-5BJYPAX7.js.map → context-retriever-TZGIETJO.js.map} +0 -0
- /package/dist/{doctor-deep-OVGRBG3Z.js.map → doctor-deep-OU2WC55V.js.map} +0 -0
- /package/dist/{expert-bridge-JPTHFWPW.js.map → expert-bridge-WP5ZWXFY.js.map} +0 -0
- /package/dist/{factory-734UWF4C.js.map → factory-2TN2VZTR.js.map} +0 -0
- /package/dist/{factory-NE7SNW7V.js.map → factory-RJTRVII5.js.map} +0 -0
- /package/dist/{init-opencode-2ZBDJILW.js.map → init-opencode-AYMNMWU7.js.map} +0 -0
- /package/dist/{issue-triage-AGGTH767.js.map → issue-triage-QIVZN3PJ.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-WGPLUXPU.js.map → pr-reviewer-helpers-P24OBKVM.js.map} +0 -0
- /package/dist/{registry-command-CZZM5SF2.js.map → registry-command-KWWOKJ5C.js.map} +0 -0
- /package/dist/{repo-security-plan-X42KXHT2.js.map → repo-security-plan-KZNEXDCI.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-C7YGRQI6.js.map → research-helpers-synthesize-DH5PPX7A.js.map} +0 -0
- /package/dist/{routing-memory-2FYZDQUC.js.map → routing-memory-AGHJQTRH.js.map} +0 -0
- /package/dist/{session-memory-53NZRZB6.js.map → session-memory-O24IVZAW.js.map} +0 -0
- /package/dist/{setup-command-ZV6VZLP4.js.map → setup-command-NBXZ4NGV.js.map} +0 -0
- /package/dist/{setup-config-CYRK4UFF.js.map → setup-config-Y4JA5QWO.js.map} +0 -0
- /package/dist/{tool-memory-AX5G67J6.js.map → tool-memory-UEQNXIGC.js.map} +0 -0
- /package/dist/{weather-report-AUMNGHYZ.js.map → weather-report-S5YXRY7G.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getErrorMessage,
|
|
5
5
|
getTimeProvider,
|
|
6
6
|
ok
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HKISF2E7.js";
|
|
8
8
|
|
|
9
9
|
// src/context/session-memory.ts
|
|
10
10
|
import * as fs from "fs";
|
|
@@ -351,4 +351,4 @@ export {
|
|
|
351
351
|
SessionMemory,
|
|
352
352
|
createSessionMemory
|
|
353
353
|
};
|
|
354
|
-
//# sourceMappingURL=chunk-
|
|
354
|
+
//# sourceMappingURL=chunk-JCETWDU7.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getTokenEstimator,
|
|
11
11
|
isRateLimitLikeError,
|
|
12
12
|
ok
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HKISF2E7.js";
|
|
14
14
|
|
|
15
15
|
// src/adapters/base-adapter.ts
|
|
16
16
|
var AdapterModelError = class extends ModelError {
|
|
@@ -707,4 +707,4 @@ export {
|
|
|
707
707
|
DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
|
|
708
708
|
collectStream
|
|
709
709
|
};
|
|
710
|
-
//# sourceMappingURL=chunk-
|
|
710
|
+
//# sourceMappingURL=chunk-JEBWSHSU.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getToolMemory
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FTCU55O6.js";
|
|
4
4
|
import {
|
|
5
5
|
CLI_NAMES,
|
|
6
6
|
StrategyDistiller,
|
|
7
7
|
createLogger,
|
|
8
8
|
getOutcomeStore,
|
|
9
9
|
registerPersistentDistillerFactory
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HKISF2E7.js";
|
|
11
11
|
import {
|
|
12
12
|
ensureLearningDir,
|
|
13
13
|
getRulesFile
|
|
@@ -273,4 +273,4 @@ export {
|
|
|
273
273
|
inferTaskCategory,
|
|
274
274
|
summarizeContextForPrompt
|
|
275
275
|
};
|
|
276
|
-
//# sourceMappingURL=chunk-
|
|
276
|
+
//# sourceMappingURL=chunk-K7VGX37L.js.map
|
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
createStream,
|
|
5
5
|
requireApiKey,
|
|
6
6
|
validateApiKeyPresence
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JEBWSHSU.js";
|
|
8
8
|
import {
|
|
9
9
|
CUSTOM_API_BASE_URL_ENV,
|
|
10
10
|
PROVIDER_ENV_KEYS,
|
|
11
11
|
validateCustomApiBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2IBJC2EP.js";
|
|
13
13
|
import {
|
|
14
14
|
getToolMemory
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FTCU55O6.js";
|
|
16
16
|
import {
|
|
17
17
|
getDefaultAvailableModelsCache
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-57OH2O2U.js";
|
|
19
19
|
import {
|
|
20
20
|
CUSTOM_API_DEFAULT_MODEL
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-4A4WPM75.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-
|
|
30
|
+
} from "./chunk-BHA6V7GK.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-
|
|
75
|
+
} from "./chunk-HKISF2E7.js";
|
|
74
76
|
import {
|
|
75
77
|
ensureLearningDir,
|
|
76
78
|
getNexusDataDir,
|
|
@@ -2896,125 +2898,6 @@ function countMatchingSubscribers(topic, subscriptions) {
|
|
|
2896
2898
|
return count;
|
|
2897
2899
|
}
|
|
2898
2900
|
|
|
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
2901
|
// src/agents/collaboration/event-bus.ts
|
|
3019
2902
|
var EventBus = class {
|
|
3020
2903
|
subscriptions = /* @__PURE__ */ new Map();
|
|
@@ -8257,6 +8140,32 @@ function recordVoteOutcomes(votes) {
|
|
|
8257
8140
|
}
|
|
8258
8141
|
}
|
|
8259
8142
|
|
|
8143
|
+
// src/mcp/tools/consensus-vote-signals.ts
|
|
8144
|
+
function rejectionRulesFrom(result) {
|
|
8145
|
+
const rules = /* @__PURE__ */ new Set();
|
|
8146
|
+
for (const vote of result.votes.values()) {
|
|
8147
|
+
if (vote.decision === "reject" && vote.rejectionCategories !== void 0) {
|
|
8148
|
+
for (const category of vote.rejectionCategories) rules.add(category);
|
|
8149
|
+
}
|
|
8150
|
+
}
|
|
8151
|
+
return rules.size > 0 ? [...rules] : void 0;
|
|
8152
|
+
}
|
|
8153
|
+
function emitVoteRejectedSignal(result, bus, logger11) {
|
|
8154
|
+
if (result.outcome !== "rejected") return;
|
|
8155
|
+
try {
|
|
8156
|
+
const rejectionRules = rejectionRulesFrom(result);
|
|
8157
|
+
bus.emit({
|
|
8158
|
+
type: "signal.vote_rejected",
|
|
8159
|
+
timestamp: getTimeProvider().now(),
|
|
8160
|
+
proposalId: result.proposalId,
|
|
8161
|
+
approvalPercentage: result.approvalPercentage,
|
|
8162
|
+
...rejectionRules !== void 0 ? { rejectionRules } : {}
|
|
8163
|
+
});
|
|
8164
|
+
} catch (error) {
|
|
8165
|
+
logger11.warn("Failed to emit signal.vote_rejected", { error: getErrorMessage(error) });
|
|
8166
|
+
}
|
|
8167
|
+
}
|
|
8168
|
+
|
|
8260
8169
|
// src/mcp/tools/simulation-guard.ts
|
|
8261
8170
|
var WARNED = /* @__PURE__ */ new Set();
|
|
8262
8171
|
function isTestRunner() {
|
|
@@ -9124,7 +9033,7 @@ async function processVotesWithCascade(engineVotes, opts) {
|
|
|
9124
9033
|
var CONTRARIAN_ESCALATION_THRESHOLD = 0.8;
|
|
9125
9034
|
async function runContrarianCheck(proposal, log) {
|
|
9126
9035
|
try {
|
|
9127
|
-
const { executeExpert } = await import("./expert-bridge-
|
|
9036
|
+
const { executeExpert } = await import("./expert-bridge-WP5ZWXFY.js");
|
|
9128
9037
|
const prompt = [
|
|
9129
9038
|
"You are a contrarian analyst. Your job is to find reasons this proposal should be REJECTED.",
|
|
9130
9039
|
"Look for: YAGNI (not needed), MISALIGNED (wrong tech/architecture), SECURITY_RISK, SCOPE_CREEP.",
|
|
@@ -9287,6 +9196,7 @@ async function handleConsensusVote(deps, args) {
|
|
|
9287
9196
|
result.totalTimeMs,
|
|
9288
9197
|
result.votes
|
|
9289
9198
|
);
|
|
9199
|
+
emitVoteRejectedSignal(result.result, getPipelineEventBus(), logger11);
|
|
9290
9200
|
return { ok: true, value: buildResponse(args, result) };
|
|
9291
9201
|
} catch (error) {
|
|
9292
9202
|
const message = getErrorMessage(error);
|
|
@@ -9646,4 +9556,4 @@ export {
|
|
|
9646
9556
|
CONSENSUS_VOTE_OUTPUT_SCHEMA,
|
|
9647
9557
|
registerConsensusVoteTool
|
|
9648
9558
|
};
|
|
9649
|
-
//# sourceMappingURL=chunk-
|
|
9559
|
+
//# sourceMappingURL=chunk-LJMO5P6O.js.map
|