nexus-agents 2.157.0 → 2.157.1
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/{chunk-553QYRXJ.js → chunk-ENPYELJM.js} +2 -2
- package/dist/{chunk-TT4ZITRU.js → chunk-JWCD3JCB.js} +5 -35
- package/dist/chunk-JWCD3JCB.js.map +1 -0
- package/dist/{chunk-OXYGRB4C.js → chunk-RHUKGSH7.js} +3 -3
- package/dist/{chunk-3SE57WOV.js → chunk-VEINXCXS.js} +4 -4
- package/dist/{chunk-3SE57WOV.js.map → chunk-VEINXCXS.js.map} +1 -1
- package/dist/cli.js +4 -4
- package/dist/{consensus-vote-7EBYYBCQ.js → consensus-vote-ZYZMDGT5.js} +2 -2
- package/dist/index.js +4 -4
- package/dist/{setup-command-FJ2II5YH.js → setup-command-AX3B46CE.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-TT4ZITRU.js.map +0 -1
- /package/dist/{chunk-553QYRXJ.js.map → chunk-ENPYELJM.js.map} +0 -0
- /package/dist/{chunk-OXYGRB4C.js.map → chunk-RHUKGSH7.js.map} +0 -0
- /package/dist/{consensus-vote-7EBYYBCQ.js.map → consensus-vote-ZYZMDGT5.js.map} +0 -0
- /package/dist/{setup-command-FJ2II5YH.js.map → setup-command-AX3B46CE.js.map} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
checkSqlite,
|
|
9
9
|
defaultConfig,
|
|
10
10
|
initDataDirectories
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RHUKGSH7.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-
|
|
2003
|
+
//# sourceMappingURL=chunk-ENPYELJM.js.map
|
|
@@ -354,9 +354,7 @@ var SIMULATED_VOTE_REASONING = {
|
|
|
354
354
|
import { z } from "zod";
|
|
355
355
|
var SyntheticVoteError = class extends Error {
|
|
356
356
|
constructor(reason, rawOutput) {
|
|
357
|
-
super(
|
|
358
|
-
`Vote response parsing failed: ${reason}. To use synthetic fallback votes (NOT RECOMMENDED), set allowSyntheticVote: true`
|
|
359
|
-
);
|
|
357
|
+
super(`Vote response parsing failed: ${reason}`);
|
|
360
358
|
this.rawOutput = rawOutput;
|
|
361
359
|
this.name = "SyntheticVoteError";
|
|
362
360
|
}
|
|
@@ -608,26 +606,6 @@ function extractJsonFromResponse(text) {
|
|
|
608
606
|
}
|
|
609
607
|
return extractFirstJsonObject(text) ?? text.trim();
|
|
610
608
|
}
|
|
611
|
-
function createFallbackVote(output, _role, reason) {
|
|
612
|
-
const lower = output.toLowerCase();
|
|
613
|
-
let decision = "abstain";
|
|
614
|
-
if (lower.includes("reject") || lower.includes("decline") || lower.includes("disagree")) {
|
|
615
|
-
decision = "reject";
|
|
616
|
-
} else if (lower.includes("approve") || lower.includes("accept") || lower.includes("agree")) {
|
|
617
|
-
decision = "approve";
|
|
618
|
-
}
|
|
619
|
-
createLogger({ component: "voter-response" }).warn(
|
|
620
|
-
"Creating synthetic vote (NOT parsed from LLM output)",
|
|
621
|
-
{ decision, reason }
|
|
622
|
-
);
|
|
623
|
-
return {
|
|
624
|
-
decision,
|
|
625
|
-
reasoning: `[SYNTHETIC: ${reason}] ${output.slice(0, 200)}`,
|
|
626
|
-
confidence: 0.5,
|
|
627
|
-
source: "fallback"
|
|
628
|
-
// Mark as synthetic
|
|
629
|
-
};
|
|
630
|
-
}
|
|
631
609
|
var REASONING_MAX_CHARS = 4e3;
|
|
632
610
|
var CLAIM_MAX_CHARS = 2e3;
|
|
633
611
|
var TRUNCATION_MARKER = " \u2026[truncated]";
|
|
@@ -663,8 +641,7 @@ function buildParsedVote(data) {
|
|
|
663
641
|
source: "parsed"
|
|
664
642
|
};
|
|
665
643
|
}
|
|
666
|
-
function parseVoteResponse(output,
|
|
667
|
-
const allowSyntheticVote = options?.allowSyntheticVote ?? false;
|
|
644
|
+
function parseVoteResponse(output, _role) {
|
|
668
645
|
try {
|
|
669
646
|
const jsonStr = extractJsonFromResponse(output);
|
|
670
647
|
const parsed = JSON.parse(jsonStr);
|
|
@@ -673,19 +650,12 @@ function parseVoteResponse(output, role, options) {
|
|
|
673
650
|
return buildParsedVote(validated.data);
|
|
674
651
|
}
|
|
675
652
|
const reason = `Validation failed: ${validated.error.issues.map((e) => e.message).join(", ")}`;
|
|
676
|
-
|
|
677
|
-
throw new SyntheticVoteError(reason, output);
|
|
678
|
-
}
|
|
679
|
-
return createFallbackVote(output, role, reason);
|
|
653
|
+
throw new SyntheticVoteError(reason, output);
|
|
680
654
|
} catch (error) {
|
|
681
655
|
if (error instanceof SyntheticVoteError) {
|
|
682
656
|
throw error;
|
|
683
657
|
}
|
|
684
|
-
|
|
685
|
-
if (!allowSyntheticVote) {
|
|
686
|
-
throw new SyntheticVoteError(reason, output);
|
|
687
|
-
}
|
|
688
|
-
return createFallbackVote(output, role, reason);
|
|
658
|
+
throw new SyntheticVoteError(getErrorMessage(error, "Unknown parse error"), output);
|
|
689
659
|
}
|
|
690
660
|
}
|
|
691
661
|
|
|
@@ -6411,4 +6381,4 @@ export {
|
|
|
6411
6381
|
CONSENSUS_VOTE_OUTPUT_SCHEMA,
|
|
6412
6382
|
registerConsensusVoteTool
|
|
6413
6383
|
};
|
|
6414
|
-
//# sourceMappingURL=chunk-
|
|
6384
|
+
//# sourceMappingURL=chunk-JWCD3JCB.js.map
|