nexus-agents 2.151.1 → 2.152.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/{chunk-UIL37D2V.js → chunk-447YUGJD.js} +11 -2
- package/dist/chunk-447YUGJD.js.map +1 -0
- package/dist/{chunk-IR7FP4SS.js → chunk-4RJB246Z.js} +28 -16
- package/dist/{chunk-IR7FP4SS.js.map → chunk-4RJB246Z.js.map} +1 -1
- package/dist/{chunk-QL4Q3HUO.js → chunk-FOC2KDKV.js} +2 -2
- package/dist/{chunk-SJFARLAQ.js → chunk-GKZ3GPB3.js} +3 -3
- package/dist/cli.d.ts +3 -1
- package/dist/cli.js +59 -19
- package/dist/cli.js.map +1 -1
- package/dist/{consensus-vote-72AX6HNF.js → consensus-vote-VPHFIIMN.js} +2 -2
- package/dist/consensus-vote-types-B06ynHGk.d.ts +841 -0
- package/dist/index.d.ts +34 -481
- package/dist/index.js +51 -15
- package/dist/index.js.map +1 -1
- package/dist/{setup-command-IQ7WFZIM.js → setup-command-EQ6XG2QV.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-UIL37D2V.js.map +0 -1
- package/dist/consensus-vote-types-DOCnPzfx.d.ts +0 -357
- /package/dist/{chunk-QL4Q3HUO.js.map → chunk-FOC2KDKV.js.map} +0 -0
- /package/dist/{chunk-SJFARLAQ.js.map → chunk-GKZ3GPB3.js.map} +0 -0
- /package/dist/{consensus-vote-72AX6HNF.js.map → consensus-vote-VPHFIIMN.js.map} +0 -0
- /package/dist/{setup-command-IQ7WFZIM.js.map → setup-command-EQ6XG2QV.js.map} +0 -0
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
DEFAULT_TASK_TTL_MS,
|
|
19
19
|
DEFAULT_TOOL_RATE_LIMITS,
|
|
20
20
|
clampTaskTtl
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GKZ3GPB3.js";
|
|
22
22
|
import {
|
|
23
23
|
executeExpert
|
|
24
24
|
} from "./chunk-JYHSZDKL.js";
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
toJobSummary,
|
|
42
42
|
warnIfSimulatedOutsideTests,
|
|
43
43
|
writeJobCancelled
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-447YUGJD.js";
|
|
45
45
|
import {
|
|
46
46
|
normalizeTopicToCanonical,
|
|
47
47
|
synthesizeResearch
|
|
@@ -43148,6 +43148,26 @@ function buildVoteProposal(plan, research) {
|
|
|
43148
43148
|
const researchPart = trimmed.slice(0, VOTE_RESEARCH_BUDGET);
|
|
43149
43149
|
return `${planPart}${RESEARCH_HEADER}${researchPart}`.slice(0, VOTE_PROPOSAL_MAX);
|
|
43150
43150
|
}
|
|
43151
|
+
function classifyVoteStageResult(votingResult) {
|
|
43152
|
+
const { approve, reject } = votingResult.result.voteCounts;
|
|
43153
|
+
const pct = approve / Math.max(1, approve + reject) * 100;
|
|
43154
|
+
const decision = votingResult.decision ?? (votingResult.result.outcome === "approved" ? "approved" : "rejected");
|
|
43155
|
+
if (decision === "no_quorum") {
|
|
43156
|
+
return {
|
|
43157
|
+
vote: {
|
|
43158
|
+
kind: "no_quorum",
|
|
43159
|
+
reason: "consensus vote could not reach quorum (a voice was missing)",
|
|
43160
|
+
approvalPercentage: pct
|
|
43161
|
+
},
|
|
43162
|
+
label: "No quorum \u2014 re-run needed"
|
|
43163
|
+
};
|
|
43164
|
+
}
|
|
43165
|
+
if (decision !== "approved") {
|
|
43166
|
+
const feedback = votingResult.votes.filter((v) => v.vote.decision !== "approve").map((v) => v.vote.reasoning).join("\n");
|
|
43167
|
+
return { vote: { kind: "rejected", feedback, approvalPercentage: pct }, label: "Rejected" };
|
|
43168
|
+
}
|
|
43169
|
+
return { vote: { kind: "approved", approvalPercentage: pct }, label: "Approved" };
|
|
43170
|
+
}
|
|
43151
43171
|
function emitStageEvent2(stage, status, details) {
|
|
43152
43172
|
emitPipelineStageEvent("dev-pipeline", stage, status, details);
|
|
43153
43173
|
}
|
|
@@ -43446,7 +43466,7 @@ ${contextBlock}`;
|
|
|
43446
43466
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
43447
43467
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
43448
43468
|
try {
|
|
43449
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
43469
|
+
const { executeVoting } = await import("./consensus-vote-VPHFIIMN.js");
|
|
43450
43470
|
const votingResult = await executeVoting(
|
|
43451
43471
|
{
|
|
43452
43472
|
proposal: buildVoteProposal(plan, research),
|
|
@@ -43456,30 +43476,22 @@ ${contextBlock}`;
|
|
|
43456
43476
|
},
|
|
43457
43477
|
logger45
|
|
43458
43478
|
);
|
|
43459
|
-
const
|
|
43460
|
-
const pct = votingResult.result.voteCounts.approve / Math.max(
|
|
43461
|
-
1,
|
|
43462
|
-
votingResult.result.voteCounts.approve + votingResult.result.voteCounts.reject
|
|
43463
|
-
) * 100;
|
|
43464
|
-
const feedback = votingResult.votes.filter((v) => v.vote.decision !== "approve").map((v) => v.vote.reasoning).join("\n");
|
|
43479
|
+
const { vote, label } = classifyVoteStageResult(votingResult);
|
|
43465
43480
|
const ms = getTimeProvider().now() - start;
|
|
43466
43481
|
emitStageEvent2("vote", "completed", { durationMs: ms });
|
|
43467
43482
|
recordOutcome({
|
|
43468
43483
|
taskId: "vote",
|
|
43469
43484
|
category: "planning",
|
|
43470
43485
|
cli: void 0,
|
|
43471
|
-
success: approved,
|
|
43486
|
+
success: vote.kind === "approved",
|
|
43472
43487
|
durationMs: ms
|
|
43473
43488
|
});
|
|
43474
43489
|
await postProgress(
|
|
43475
43490
|
config,
|
|
43476
43491
|
"Vote",
|
|
43477
|
-
`${
|
|
43492
|
+
`${label} (${Math.round(vote.approvalPercentage)}%, ${ms}ms)`
|
|
43478
43493
|
);
|
|
43479
|
-
|
|
43480
|
-
return { kind: "rejected", feedback, approvalPercentage: pct };
|
|
43481
|
-
}
|
|
43482
|
-
return { kind: "approved", approvalPercentage: pct };
|
|
43494
|
+
return vote;
|
|
43483
43495
|
} catch (error) {
|
|
43484
43496
|
const msg = error instanceof Error ? error.message : String(error);
|
|
43485
43497
|
emitStageEvent2("vote", "failed", { error: msg });
|
|
@@ -51276,4 +51288,4 @@ export {
|
|
|
51276
51288
|
shutdownFeedbackSubscriber,
|
|
51277
51289
|
createEventBusBridge
|
|
51278
51290
|
};
|
|
51279
|
-
//# sourceMappingURL=chunk-
|
|
51291
|
+
//# sourceMappingURL=chunk-4RJB246Z.js.map
|