nexus-agents 8.29.0 → 8.30.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-V337TBA6.js → chunk-3CB3LVMG.js} +2 -2
- package/dist/{chunk-JIHN5BEO.js → chunk-4YUD3EJO.js} +7 -7
- package/dist/{chunk-MEN32VJC.js → chunk-GG6OKZY4.js} +2 -2
- package/dist/{chunk-EZ3OCW6Q.js → chunk-GHXHT4XL.js} +3 -3
- package/dist/{chunk-6RNUX5RK.js → chunk-ILBCNOV6.js} +75 -35
- package/dist/chunk-ILBCNOV6.js.map +1 -0
- package/dist/{chunk-JW5IATB3.js → chunk-ZON73IQM.js} +2 -2
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +7 -7
- package/dist/{consensus-vote-TX62EZF7.js → consensus-vote-VQ6ZOJBP.js} +4 -4
- package/dist/{consensus-vote-types-BlEp-vlK.d.ts → consensus-vote-types-BKoR41Kx.d.ts} +12 -0
- package/dist/{improvement-review-2X4COULE.js → improvement-review-OZ6O3ACP.js} +4 -4
- package/dist/index.d.ts +25 -8
- package/dist/index.js +6 -6
- package/dist/{setup-data-dir-QOOINIMJ.js → setup-data-dir-ZADPA4FW.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-6RNUX5RK.js.map +0 -1
- /package/dist/{chunk-V337TBA6.js.map → chunk-3CB3LVMG.js.map} +0 -0
- /package/dist/{chunk-JIHN5BEO.js.map → chunk-4YUD3EJO.js.map} +0 -0
- /package/dist/{chunk-MEN32VJC.js.map → chunk-GG6OKZY4.js.map} +0 -0
- /package/dist/{chunk-EZ3OCW6Q.js.map → chunk-GHXHT4XL.js.map} +0 -0
- /package/dist/{chunk-JW5IATB3.js.map → chunk-ZON73IQM.js.map} +0 -0
- /package/dist/{consensus-vote-TX62EZF7.js.map → consensus-vote-VQ6ZOJBP.js.map} +0 -0
- /package/dist/{improvement-review-2X4COULE.js.map → improvement-review-OZ6O3ACP.js.map} +0 -0
- /package/dist/{setup-data-dir-QOOINIMJ.js.map → setup-data-dir-ZADPA4FW.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
toolStructuredError,
|
|
8
8
|
toolSuccessStructured,
|
|
9
9
|
wrapToolWithTimeout
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GG6OKZY4.js";
|
|
11
11
|
import {
|
|
12
12
|
JsonlStore,
|
|
13
13
|
SECURITY_KEYWORDS,
|
|
@@ -2173,4 +2173,4 @@ export {
|
|
|
2173
2173
|
runImprovementReview,
|
|
2174
2174
|
registerImprovementReviewTool
|
|
2175
2175
|
};
|
|
2176
|
-
//# sourceMappingURL=chunk-
|
|
2176
|
+
//# sourceMappingURL=chunk-3CB3LVMG.js.map
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_TASK_TTL_MS,
|
|
23
23
|
clampTaskTtl
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-GHXHT4XL.js";
|
|
25
25
|
import {
|
|
26
26
|
executeExpert
|
|
27
27
|
} from "./chunk-LE5GD6MT.js";
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
toJobSummary,
|
|
56
56
|
updateStage,
|
|
57
57
|
writeJobCancelled
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-ILBCNOV6.js";
|
|
59
59
|
import {
|
|
60
60
|
allOf,
|
|
61
61
|
anyOf
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
} from "./chunk-J5DOKTMY.js";
|
|
76
76
|
import {
|
|
77
77
|
withPrerequisite
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-3CB3LVMG.js";
|
|
79
79
|
import {
|
|
80
80
|
NOOP_NOTIFIER,
|
|
81
81
|
RateLimiter,
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
withAuditTrail,
|
|
101
101
|
withProgressHeartbeat,
|
|
102
102
|
wrapToolWithTimeout
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-GG6OKZY4.js";
|
|
104
104
|
import {
|
|
105
105
|
createAuditTrail,
|
|
106
106
|
createGraphAuditBridge,
|
|
@@ -45754,7 +45754,7 @@ function buildVotingInput(plan, config) {
|
|
|
45754
45754
|
}
|
|
45755
45755
|
async function executeSingleVote(plan, config, log) {
|
|
45756
45756
|
try {
|
|
45757
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
45757
|
+
const { executeVoting } = await import("./consensus-vote-VQ6ZOJBP.js");
|
|
45758
45758
|
const input = buildVotingInput(plan, config);
|
|
45759
45759
|
const result = await executeVoting(input, log);
|
|
45760
45760
|
return parseVotingResult(result);
|
|
@@ -47546,7 +47546,7 @@ ${contextBlock}`;
|
|
|
47546
47546
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
47547
47547
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
47548
47548
|
try {
|
|
47549
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
47549
|
+
const { executeVoting } = await import("./consensus-vote-VQ6ZOJBP.js");
|
|
47550
47550
|
const votingResult = await executeVoting(
|
|
47551
47551
|
{
|
|
47552
47552
|
proposal: buildVoteProposal(plan, research),
|
|
@@ -56266,4 +56266,4 @@ export {
|
|
|
56266
56266
|
shutdownFeedbackSubscriber,
|
|
56267
56267
|
createEventBusBridge
|
|
56268
56268
|
};
|
|
56269
|
-
//# sourceMappingURL=chunk-
|
|
56269
|
+
//# sourceMappingURL=chunk-4YUD3EJO.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZON73IQM.js";
|
|
4
4
|
import {
|
|
5
5
|
emitClawGuardViolation
|
|
6
6
|
} from "./chunk-JANMYVKT.js";
|
|
@@ -2261,4 +2261,4 @@ export {
|
|
|
2261
2261
|
VOTING_THRESHOLDS,
|
|
2262
2262
|
ConsensusMetricsSchema
|
|
2263
2263
|
};
|
|
2264
|
-
//# sourceMappingURL=chunk-
|
|
2264
|
+
//# sourceMappingURL=chunk-GG6OKZY4.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
NODE_ENGINE_RANGE,
|
|
9
9
|
VERSION,
|
|
10
10
|
isNodeVersionSupported
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZON73IQM.js";
|
|
12
12
|
import {
|
|
13
13
|
capitalize
|
|
14
14
|
} from "./chunk-7LP6VJRP.js";
|
|
@@ -1228,7 +1228,7 @@ async function runDoctorFix(result) {
|
|
|
1228
1228
|
writeLine2("\u2500".repeat(40));
|
|
1229
1229
|
let fixCount = 0;
|
|
1230
1230
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
1231
|
-
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-
|
|
1231
|
+
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-ZADPA4FW.js");
|
|
1232
1232
|
const outcome = describeDataDirFix2(initDataDirectories2());
|
|
1233
1233
|
writeLine2(outcome.line);
|
|
1234
1234
|
if (outcome.counted) fixCount++;
|
|
@@ -1330,4 +1330,4 @@ export {
|
|
|
1330
1330
|
startStdioServer,
|
|
1331
1331
|
closeServer
|
|
1332
1332
|
};
|
|
1333
|
-
//# sourceMappingURL=chunk-
|
|
1333
|
+
//# sourceMappingURL=chunk-GHXHT4XL.js.map
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
toolSuccessStructured,
|
|
24
24
|
withProgressHeartbeat,
|
|
25
25
|
wrapToolWithTimeout
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GG6OKZY4.js";
|
|
27
27
|
import {
|
|
28
28
|
VERSION
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ZON73IQM.js";
|
|
30
30
|
import {
|
|
31
31
|
assessPanelIndependence,
|
|
32
32
|
countDistinctModels,
|
|
@@ -40,6 +40,7 @@ import {
|
|
|
40
40
|
authRemediation,
|
|
41
41
|
delay,
|
|
42
42
|
getAvailableClis,
|
|
43
|
+
sleep,
|
|
43
44
|
withTimeout
|
|
44
45
|
} from "./chunk-K6PI22W5.js";
|
|
45
46
|
import {
|
|
@@ -196,6 +197,66 @@ function reportPanelModelIndependence(modelIds, roleCount, phase, logger11) {
|
|
|
196
197
|
);
|
|
197
198
|
}
|
|
198
199
|
|
|
200
|
+
// src/cli/voter-retry.ts
|
|
201
|
+
var DEFAULT_ERRORED_ROLE_BACKOFF_MS = 3e3;
|
|
202
|
+
async function retryErroredRoles(first, relaunch, logger11, backoffMs) {
|
|
203
|
+
const erroredRoles = first.filter((v) => v.source === "error").map((v) => v.role);
|
|
204
|
+
if (erroredRoles.length === 0) return first;
|
|
205
|
+
logger11.warn("Retrying errored voter roles before aggregating (#5578)", {
|
|
206
|
+
erroredRoles,
|
|
207
|
+
of: first.length
|
|
208
|
+
});
|
|
209
|
+
if (backoffMs > 0) await sleep(backoffMs);
|
|
210
|
+
const retriedResults = await relaunch(erroredRoles);
|
|
211
|
+
const recovered = /* @__PURE__ */ new Map();
|
|
212
|
+
for (const r of retriedResults) {
|
|
213
|
+
if (r.source === "error") continue;
|
|
214
|
+
recovered.set(r.role, { ...r, retried: true });
|
|
215
|
+
}
|
|
216
|
+
if (recovered.size === 0) {
|
|
217
|
+
logger11.warn("Per-role retry recovered no voter \u2014 the panel stays degraded", { erroredRoles });
|
|
218
|
+
return first;
|
|
219
|
+
}
|
|
220
|
+
logger11.info("Per-role retry recovered voters", {
|
|
221
|
+
recoveredRoles: [...recovered.keys()],
|
|
222
|
+
stillErrored: erroredRoles.filter((r) => !recovered.has(r))
|
|
223
|
+
});
|
|
224
|
+
return first.map((v) => recovered.get(v.role) ?? v);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// src/cli/voter-adapter-resolve.ts
|
|
228
|
+
var NoAdapterError = class extends Error {
|
|
229
|
+
constructor(message) {
|
|
230
|
+
super(message);
|
|
231
|
+
this.name = "NoAdapterError";
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
function resolveAdapter(options, logger11) {
|
|
235
|
+
try {
|
|
236
|
+
if (options.adapter !== void 0) return { adapter: options.adapter };
|
|
237
|
+
const gateway = options.gatewayAdapters;
|
|
238
|
+
if (gateway !== void 0 && gateway.length > 0 && gateway[0] !== void 0) {
|
|
239
|
+
return { adapter: gateway[0] };
|
|
240
|
+
}
|
|
241
|
+
const registry = getGlobalRegistry({ logger: logger11 });
|
|
242
|
+
return { adapter: registry.getDefault() };
|
|
243
|
+
} catch (error) {
|
|
244
|
+
return { error: getErrorMessage(error) };
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
function resolveAdapterOrFail(options, logger11, allowSimulation) {
|
|
248
|
+
const resolved = resolveAdapter(options, logger11);
|
|
249
|
+
if (!("error" in resolved)) return resolved;
|
|
250
|
+
logger11.error("No adapter available for voting", void 0, { error: resolved.error });
|
|
251
|
+
if (allowSimulation) {
|
|
252
|
+
logger11.warn("Falling back to simulation (allowSimulation=true)");
|
|
253
|
+
return { simulated: true };
|
|
254
|
+
}
|
|
255
|
+
throw new NoAdapterError(
|
|
256
|
+
`No adapter available for voting: ${resolved.error}. Install a CLI (claude/gemini/codex) or set ANTHROPIC_API_KEY.`
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
199
260
|
// src/cli/voter-prompts.ts
|
|
200
261
|
var DEFAULT_PROJECT = "nexus-agents";
|
|
201
262
|
function prReviewModeAddendum() {
|
|
@@ -1193,25 +1254,6 @@ async function executeAgentVote(role, proposal, adapter, logger11, options) {
|
|
|
1193
1254
|
${remediation}`;
|
|
1194
1255
|
return createErrorVoteResult(role, errorText, processingTimeMs, adapter.providerId);
|
|
1195
1256
|
}
|
|
1196
|
-
var NoAdapterError = class extends Error {
|
|
1197
|
-
constructor(message) {
|
|
1198
|
-
super(message);
|
|
1199
|
-
this.name = "NoAdapterError";
|
|
1200
|
-
}
|
|
1201
|
-
};
|
|
1202
|
-
function resolveAdapter(options, logger11) {
|
|
1203
|
-
try {
|
|
1204
|
-
if (options.adapter !== void 0) return { adapter: options.adapter };
|
|
1205
|
-
const gateway = options.gatewayAdapters;
|
|
1206
|
-
if (gateway !== void 0 && gateway.length > 0 && gateway[0] !== void 0) {
|
|
1207
|
-
return { adapter: gateway[0] };
|
|
1208
|
-
}
|
|
1209
|
-
const registry = getGlobalRegistry({ logger: logger11 });
|
|
1210
|
-
return { adapter: registry.getDefault() };
|
|
1211
|
-
} catch (error) {
|
|
1212
|
-
return { error: getErrorMessage(error) };
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
1257
|
function warnIfCodexConcurrencyExceeded(roleAdapters, logger11) {
|
|
1216
1258
|
const codexBound = [...roleAdapters.values()].filter(
|
|
1217
1259
|
(a) => a.name === "codex"
|
|
@@ -1343,17 +1385,8 @@ async function collectRealVotes(options) {
|
|
|
1343
1385
|
logger11.info("Using simulation mode (explicitly requested)");
|
|
1344
1386
|
return createSimulatedVotes(roles, proposal);
|
|
1345
1387
|
}
|
|
1346
|
-
const adapterResult =
|
|
1347
|
-
if ("
|
|
1348
|
-
logger11.error("No adapter available for voting", void 0, { error: adapterResult.error });
|
|
1349
|
-
if (allowSimulation === true) {
|
|
1350
|
-
logger11.warn("Falling back to simulation (allowSimulation=true)");
|
|
1351
|
-
return createSimulatedVotes(roles, proposal, "No adapter available");
|
|
1352
|
-
}
|
|
1353
|
-
throw new NoAdapterError(
|
|
1354
|
-
`No adapter available for voting: ${adapterResult.error}. Install a CLI (claude/gemini/codex) or set ANTHROPIC_API_KEY.`
|
|
1355
|
-
);
|
|
1356
|
-
}
|
|
1388
|
+
const adapterResult = resolveAdapterOrFail(options, logger11, allowSimulation === true);
|
|
1389
|
+
if ("simulated" in adapterResult) return createSimulatedVotes(roles, proposal, "No adapter available");
|
|
1357
1390
|
const roleAdapters = options.adapter !== void 0 ? assignUniformAdapter(roles, adapterResult.adapter) : await resolveDiverseAdapters(roles, logger11, adapterResult.adapter, options.gatewayAdapters);
|
|
1358
1391
|
warnIfCodexConcurrencyExceeded(roleAdapters, logger11);
|
|
1359
1392
|
const voteOptions = {
|
|
@@ -1365,7 +1398,7 @@ async function collectRealVotes(options) {
|
|
|
1365
1398
|
declaredOptions: options.declaredOptions
|
|
1366
1399
|
};
|
|
1367
1400
|
const interDelay = options.interAgentDelayMs ?? DEFAULT_INTER_AGENT_DELAY_MS;
|
|
1368
|
-
const
|
|
1401
|
+
const launchInput = {
|
|
1369
1402
|
roles,
|
|
1370
1403
|
proposal,
|
|
1371
1404
|
roleAdapters,
|
|
@@ -1374,7 +1407,14 @@ async function collectRealVotes(options) {
|
|
|
1374
1407
|
voteOptions,
|
|
1375
1408
|
interDelay,
|
|
1376
1409
|
signal: options.signal
|
|
1377
|
-
}
|
|
1410
|
+
};
|
|
1411
|
+
const firstPass = await launchStaggeredVotes(launchInput);
|
|
1412
|
+
const results = await retryErroredRoles(
|
|
1413
|
+
firstPass,
|
|
1414
|
+
(retryRoles) => launchStaggeredVotes({ ...launchInput, roles: retryRoles }),
|
|
1415
|
+
logger11,
|
|
1416
|
+
options.erroredRoleBackoffMs ?? DEFAULT_ERRORED_ROLE_BACKOFF_MS
|
|
1417
|
+
);
|
|
1378
1418
|
reportVoteIndependence(results, logger11);
|
|
1379
1419
|
return results;
|
|
1380
1420
|
}
|
|
@@ -7722,4 +7762,4 @@ export {
|
|
|
7722
7762
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
7723
7763
|
registerConsensusVoteTool
|
|
7724
7764
|
};
|
|
7725
|
-
//# sourceMappingURL=chunk-
|
|
7765
|
+
//# sourceMappingURL=chunk-ILBCNOV6.js.map
|