nexus-agents 6.1.0 → 6.1.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.
- package/dist/{chunk-W4RTV2QJ.js → chunk-3B7TLK37.js} +39 -14
- package/dist/chunk-3B7TLK37.js.map +1 -0
- package/dist/{chunk-WKDHVZY6.js → chunk-FFF4SE4W.js} +3 -3
- package/dist/{chunk-MKMVUV3M.js → chunk-GKDWG45N.js} +2 -2
- package/dist/chunk-IW4N2KAE.js +7 -0
- package/dist/{chunk-K4MCF6AT.js → chunk-NYCG2G4R.js} +6 -6
- package/dist/{chunk-HJOHXFBN.js → chunk-YYTXUZ3T.js} +2 -2
- package/dist/cli.js +7 -7
- package/dist/{consensus-vote-HBGUIOFE.js → consensus-vote-RMPKEALS.js} +4 -4
- package/dist/{improvement-review-R5CTPTM5.js → improvement-review-LRPJATTZ.js} +4 -4
- package/dist/index.js +7 -7
- package/dist/{setup-data-dir-3WU7GG76.js → setup-data-dir-CSLDLR4T.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-ISBY4JCY.js +0 -7
- package/dist/chunk-W4RTV2QJ.js.map +0 -1
- /package/dist/{chunk-WKDHVZY6.js.map → chunk-FFF4SE4W.js.map} +0 -0
- /package/dist/{chunk-MKMVUV3M.js.map → chunk-GKDWG45N.js.map} +0 -0
- /package/dist/{chunk-ISBY4JCY.js.map → chunk-IW4N2KAE.js.map} +0 -0
- /package/dist/{chunk-K4MCF6AT.js.map → chunk-NYCG2G4R.js.map} +0 -0
- /package/dist/{chunk-HJOHXFBN.js.map → chunk-YYTXUZ3T.js.map} +0 -0
- /package/dist/{consensus-vote-HBGUIOFE.js.map → consensus-vote-RMPKEALS.js.map} +0 -0
- /package/dist/{improvement-review-R5CTPTM5.js.map → improvement-review-LRPJATTZ.js.map} +0 -0
- /package/dist/{setup-data-dir-3WU7GG76.js.map → setup-data-dir-CSLDLR4T.js.map} +0 -0
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
toolSuccessStructured,
|
|
24
24
|
withProgressHeartbeat,
|
|
25
25
|
wrapToolWithTimeout
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GKDWG45N.js";
|
|
27
27
|
import {
|
|
28
28
|
assessPanelIndependence,
|
|
29
29
|
countDistinctModels,
|
|
@@ -80,6 +80,18 @@ import {
|
|
|
80
80
|
// src/mcp/tools/consensus-vote.ts
|
|
81
81
|
import { z as z10 } from "zod";
|
|
82
82
|
|
|
83
|
+
// src/utils/bounded-artifact.ts
|
|
84
|
+
function boundArtifactForReview(text, budget, label) {
|
|
85
|
+
if (text.length <= budget) {
|
|
86
|
+
return { text, note: "", bound: void 0 };
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
text: text.slice(0, budget),
|
|
90
|
+
note: `> NOTE: partial view \u2014 you are seeing the first ${String(budget)} of ${String(text.length)} characters of the ${label}. Judge only what is shown, and treat insufficient visibility as itself a reason to raise a concern.`,
|
|
91
|
+
bound: { reviewedChars: budget, totalChars: text.length, partial: true }
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
83
95
|
// src/cli/voter-model-overrides.ts
|
|
84
96
|
function voterModelOverrideEnvKey(role) {
|
|
85
97
|
return `NEXUS_VOTER_MODEL_${role.toUpperCase()}`;
|
|
@@ -6259,21 +6271,34 @@ async function processVotesWithCascade(engineVotes, opts) {
|
|
|
6259
6271
|
return { engineResult, voteMap, higherOrderResult, outcome, cascaded: cascadeInfo.decided };
|
|
6260
6272
|
}
|
|
6261
6273
|
var CONTRARIAN_ESCALATION_THRESHOLD = 0.8;
|
|
6274
|
+
var CONTRARIAN_PROPOSAL_BUDGET = 2e3;
|
|
6275
|
+
function buildContrarianPrompt(bounded) {
|
|
6276
|
+
return [
|
|
6277
|
+
"You are a contrarian analyst. Your job is to find reasons this proposal should be REJECTED.",
|
|
6278
|
+
"Look for: YAGNI (not needed), MISALIGNED (wrong tech/architecture), SECURITY_RISK, SCOPE_CREEP.",
|
|
6279
|
+
"",
|
|
6280
|
+
...bounded.note === "" ? [] : [bounded.note, ""],
|
|
6281
|
+
`Proposal: ${bounded.text}`,
|
|
6282
|
+
"",
|
|
6283
|
+
"If you find a strong reason to reject, respond with JSON:",
|
|
6284
|
+
'{"decision":"reject","confidence":0.0-1.0,"reasoning":"your concern"}',
|
|
6285
|
+
"If the proposal is sound, respond with:",
|
|
6286
|
+
'{"decision":"approve","confidence":0.0-1.0,"reasoning":"why it is acceptable"}'
|
|
6287
|
+
].join("\n");
|
|
6288
|
+
}
|
|
6289
|
+
function logPartialProposal(bounded, log) {
|
|
6290
|
+
if (bounded.bound === void 0) return;
|
|
6291
|
+
log.info("Contrarian sees a partial proposal", {
|
|
6292
|
+
reviewedChars: bounded.bound.reviewedChars,
|
|
6293
|
+
totalChars: bounded.bound.totalChars
|
|
6294
|
+
});
|
|
6295
|
+
}
|
|
6262
6296
|
async function runContrarianCheck(proposal, log) {
|
|
6263
6297
|
try {
|
|
6264
6298
|
const { executeExpert } = await import("./expert-bridge-3EHBG44P.js");
|
|
6265
|
-
const
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
"",
|
|
6269
|
-
`Proposal: ${proposal.slice(0, 2e3)}`,
|
|
6270
|
-
"",
|
|
6271
|
-
"If you find a strong reason to reject, respond with JSON:",
|
|
6272
|
-
'{"decision":"reject","confidence":0.0-1.0,"reasoning":"your concern"}',
|
|
6273
|
-
"If the proposal is sound, respond with:",
|
|
6274
|
-
'{"decision":"approve","confidence":0.0-1.0,"reasoning":"why it is acceptable"}'
|
|
6275
|
-
].join("\n");
|
|
6276
|
-
const result = await executeExpert("architecture", prompt);
|
|
6299
|
+
const bounded = boundArtifactForReview(proposal, CONTRARIAN_PROPOSAL_BUDGET, "proposal");
|
|
6300
|
+
logPartialProposal(bounded, log);
|
|
6301
|
+
const result = await executeExpert("architecture", buildContrarianPrompt(bounded));
|
|
6277
6302
|
if (!result.success) return { shouldEscalate: false, reason: "", confidence: 0, errored: true };
|
|
6278
6303
|
const jsonMatch = result.text.match(/\{[\s\S]*\}/);
|
|
6279
6304
|
if (jsonMatch === null)
|
|
@@ -6848,4 +6873,4 @@ export {
|
|
|
6848
6873
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
6849
6874
|
registerConsensusVoteTool
|
|
6850
6875
|
};
|
|
6851
|
-
//# sourceMappingURL=chunk-
|
|
6876
|
+
//# sourceMappingURL=chunk-3B7TLK37.js.map
|