nexus-agents 8.15.1 → 8.15.3
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-MTJ7LRGT.js → chunk-I32D4FOY.js} +2 -2
- package/dist/{chunk-UM7R2FOU.js → chunk-U2MECKMJ.js} +3 -3
- package/dist/{chunk-3RZE42WN.js → chunk-UJHNK2D6.js} +57 -29
- package/dist/chunk-UJHNK2D6.js.map +1 -0
- package/dist/{chunk-NCQRTPC7.js → chunk-XDDOPQEP.js} +2 -2
- package/dist/{chunk-GJDFL7LP.js → chunk-XS6C3WYY.js} +6 -6
- package/dist/chunk-ZLL3NWCL.js +7 -0
- package/dist/cli.js +7 -7
- package/dist/{consensus-vote-JQNE5WGG.js → consensus-vote-5FG7KZGD.js} +4 -4
- package/dist/{improvement-review-ZSY5YHCV.js → improvement-review-55245GZ7.js} +4 -4
- package/dist/index.js +7 -7
- package/dist/{setup-data-dir-HV3W2TCE.js → setup-data-dir-QPSFVKUL.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-3RZE42WN.js.map +0 -1
- package/dist/chunk-PQ3W4EXO.js +0 -7
- /package/dist/{chunk-MTJ7LRGT.js.map → chunk-I32D4FOY.js.map} +0 -0
- /package/dist/{chunk-UM7R2FOU.js.map → chunk-U2MECKMJ.js.map} +0 -0
- /package/dist/{chunk-NCQRTPC7.js.map → chunk-XDDOPQEP.js.map} +0 -0
- /package/dist/{chunk-GJDFL7LP.js.map → chunk-XS6C3WYY.js.map} +0 -0
- /package/dist/{chunk-PQ3W4EXO.js.map → chunk-ZLL3NWCL.js.map} +0 -0
- /package/dist/{consensus-vote-JQNE5WGG.js.map → consensus-vote-5FG7KZGD.js.map} +0 -0
- /package/dist/{improvement-review-ZSY5YHCV.js.map → improvement-review-55245GZ7.js.map} +0 -0
- /package/dist/{setup-data-dir-HV3W2TCE.js.map → setup-data-dir-QPSFVKUL.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZLL3NWCL.js";
|
|
4
4
|
import {
|
|
5
5
|
emitClawGuardViolation
|
|
6
6
|
} from "./chunk-5X67Q3D2.js";
|
|
@@ -2246,4 +2246,4 @@ export {
|
|
|
2246
2246
|
VOTING_THRESHOLDS,
|
|
2247
2247
|
ConsensusMetricsSchema
|
|
2248
2248
|
};
|
|
2249
|
-
//# sourceMappingURL=chunk-
|
|
2249
|
+
//# sourceMappingURL=chunk-I32D4FOY.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-OQB3XC5O.js";
|
|
7
7
|
import {
|
|
8
8
|
VERSION
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZLL3NWCL.js";
|
|
10
10
|
import {
|
|
11
11
|
capitalize
|
|
12
12
|
} from "./chunk-6T3EPABN.js";
|
|
@@ -1220,7 +1220,7 @@ async function runDoctorFix(result) {
|
|
|
1220
1220
|
writeLine2("\u2500".repeat(40));
|
|
1221
1221
|
let fixCount = 0;
|
|
1222
1222
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
1223
|
-
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-
|
|
1223
|
+
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-QPSFVKUL.js");
|
|
1224
1224
|
const outcome = describeDataDirFix2(initDataDirectories2());
|
|
1225
1225
|
writeLine2(outcome.line);
|
|
1226
1226
|
if (outcome.counted) fixCount++;
|
|
@@ -1322,4 +1322,4 @@ export {
|
|
|
1322
1322
|
startStdioServer,
|
|
1323
1323
|
closeServer
|
|
1324
1324
|
};
|
|
1325
|
-
//# sourceMappingURL=chunk-
|
|
1325
|
+
//# sourceMappingURL=chunk-U2MECKMJ.js.map
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
toolSuccessStructured,
|
|
24
24
|
withProgressHeartbeat,
|
|
25
25
|
wrapToolWithTimeout
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-I32D4FOY.js";
|
|
27
27
|
import {
|
|
28
28
|
VERSION
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ZLL3NWCL.js";
|
|
30
30
|
import {
|
|
31
31
|
assessPanelIndependence,
|
|
32
32
|
countDistinctModels,
|
|
@@ -147,8 +147,25 @@ function checkCodexConcurrency(codexBoundConcurrency) {
|
|
|
147
147
|
|
|
148
148
|
// src/cli/panel-independence.ts
|
|
149
149
|
function reportPanelIndependence(adapters, roleCount, phase, logger10) {
|
|
150
|
+
reportPanelModelIndependence(
|
|
151
|
+
adapters.map((adapter) => adapter.modelId),
|
|
152
|
+
roleCount,
|
|
153
|
+
phase,
|
|
154
|
+
logger10
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
function reportVoteIndependence(results, logger10) {
|
|
158
|
+
const successful = results.filter((result) => result.source === "llm");
|
|
159
|
+
reportPanelModelIndependence(
|
|
160
|
+
successful.map((result) => result.model),
|
|
161
|
+
successful.length,
|
|
162
|
+
"post-vote",
|
|
163
|
+
logger10
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
function reportPanelModelIndependence(modelIds, roleCount, phase, logger10) {
|
|
150
167
|
if (roleCount <= 1) return;
|
|
151
|
-
const verdict = assessPanelIndependence(
|
|
168
|
+
const verdict = assessPanelIndependence(modelIds);
|
|
152
169
|
if (verdict.kind === "collapsed") {
|
|
153
170
|
logger10.warn("Consensus panel ran on ONE model \u2014 votes may correlate", {
|
|
154
171
|
model: verdict.model,
|
|
@@ -1359,7 +1376,7 @@ async function collectRealVotes(options) {
|
|
|
1359
1376
|
interDelay,
|
|
1360
1377
|
signal: options.signal
|
|
1361
1378
|
});
|
|
1362
|
-
|
|
1379
|
+
reportVoteIndependence(results, logger10);
|
|
1363
1380
|
return results;
|
|
1364
1381
|
}
|
|
1365
1382
|
|
|
@@ -5331,8 +5348,8 @@ registerPersistentOutcomeStoreFactory(() => new PersistentOutcomeStore());
|
|
|
5331
5348
|
|
|
5332
5349
|
// src/mcp/tools/consensus-vote-recording.ts
|
|
5333
5350
|
var logger6 = createLogger({ tool: "consensus-vote" });
|
|
5334
|
-
function recordVoteSuccess(
|
|
5335
|
-
const allSimulated = votes !== void 0 && votes.length > 0 && votes.every((v) => v.source === "simulation");
|
|
5351
|
+
function recordVoteSuccess(args) {
|
|
5352
|
+
const allSimulated = args.votes !== void 0 && args.votes.length > 0 && args.votes.every((v) => v.source === "simulation");
|
|
5336
5353
|
if (allSimulated) {
|
|
5337
5354
|
logger6.debug("Skipping memory + outcome recording \u2014 all votes simulated");
|
|
5338
5355
|
return;
|
|
@@ -5340,26 +5357,34 @@ function recordVoteSuccess(proposal, strategy, outcome, duration, votes) {
|
|
|
5340
5357
|
try {
|
|
5341
5358
|
const memory = getToolMemory();
|
|
5342
5359
|
memory.recordTask({
|
|
5343
|
-
approach: `Consensus vote: ${strategy} on "${proposal.slice(0, 50)}"`,
|
|
5360
|
+
approach: `Consensus vote: ${args.strategy} on "${args.proposal.slice(0, 50)}"`,
|
|
5344
5361
|
challenges: [],
|
|
5345
|
-
durationMs:
|
|
5346
|
-
});
|
|
5347
|
-
memory.recordLearning({
|
|
5348
|
-
pattern: `${strategy} vote \u2192 ${outcome}`,
|
|
5349
|
-
context: `proposal="${proposal.slice(0, 40)}" duration=${String(duration)}ms`,
|
|
5350
|
-
confidence: 0.8,
|
|
5351
|
-
source: "consensus-vote"
|
|
5352
|
-
});
|
|
5353
|
-
void memory.runPromotionPipeline().catch((error) => {
|
|
5354
|
-
logger6.warn("Promotion pipeline failed", { error });
|
|
5362
|
+
durationMs: args.durationMs
|
|
5355
5363
|
});
|
|
5364
|
+
if (args.decision !== "no_quorum") {
|
|
5365
|
+
memory.recordLearning({
|
|
5366
|
+
pattern: `${args.strategy} vote \u2192 ${args.decision}`,
|
|
5367
|
+
context: `proposal="${args.proposal.slice(0, 40)}" duration=${String(args.durationMs)}ms`,
|
|
5368
|
+
confidence: learningConfidence(args.decision, args.approvalPercentage),
|
|
5369
|
+
source: "consensus-vote"
|
|
5370
|
+
});
|
|
5371
|
+
void memory.runPromotionPipeline().catch((error) => {
|
|
5372
|
+
logger6.warn("Promotion pipeline failed", { error });
|
|
5373
|
+
});
|
|
5374
|
+
}
|
|
5356
5375
|
} catch (error) {
|
|
5357
5376
|
logger6.warn("Failed to record vote success to memory", { error: getErrorMessage(error) });
|
|
5358
5377
|
}
|
|
5359
|
-
if (
|
|
5360
|
-
|
|
5378
|
+
if (args.decision === "no_quorum") return;
|
|
5379
|
+
if (args.votes !== void 0) {
|
|
5380
|
+
recordVoteOutcomes(args.votes);
|
|
5361
5381
|
}
|
|
5362
5382
|
}
|
|
5383
|
+
function learningConfidence(decision, approvalPercentage) {
|
|
5384
|
+
if (approvalPercentage === void 0) return 0.8;
|
|
5385
|
+
const approvalConfidence = approvalPercentage / 100;
|
|
5386
|
+
return decision === "approved" ? approvalConfidence : 1 - approvalConfidence;
|
|
5387
|
+
}
|
|
5363
5388
|
var VOTE_RECORD_STRATEGIES = /* @__PURE__ */ new Set([
|
|
5364
5389
|
"simple_majority",
|
|
5365
5390
|
"supermajority",
|
|
@@ -6626,7 +6651,6 @@ async function handleConsensusVote(deps, args, signal) {
|
|
|
6626
6651
|
...deps.gatewayAdapters !== void 0 && { gatewayAdapters: deps.gatewayAdapters },
|
|
6627
6652
|
signal
|
|
6628
6653
|
});
|
|
6629
|
-
const strategy = args.strategy ?? "simple_majority";
|
|
6630
6654
|
const errorVotes = result.votes.filter((v) => v.source === "error");
|
|
6631
6655
|
if (errorVotes.length === result.votes.length && result.votes.length > 0) {
|
|
6632
6656
|
const failures = errorVotes.map((v) => `${v.role}: ${v.error ?? "unknown error"}`).join("; ");
|
|
@@ -6637,16 +6661,20 @@ async function handleConsensusVote(deps, args, signal) {
|
|
|
6637
6661
|
error: `All ${String(errorVotes.length)} voters failed. Failures: ${failures}`
|
|
6638
6662
|
};
|
|
6639
6663
|
}
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
result.
|
|
6646
|
-
|
|
6664
|
+
if (result.decision === void 0) {
|
|
6665
|
+
throw new Error("Consensus vote completed without a resolved decision");
|
|
6666
|
+
}
|
|
6667
|
+
recordVoteSuccess({
|
|
6668
|
+
proposal: args.proposal,
|
|
6669
|
+
strategy: result.strategy,
|
|
6670
|
+
decision: toRecordDecision(result.decision) ?? "no_quorum",
|
|
6671
|
+
durationMs: result.totalTimeMs,
|
|
6672
|
+
approvalPercentage: result.result.approvalPercentage,
|
|
6673
|
+
votes: result.votes
|
|
6674
|
+
});
|
|
6647
6675
|
const { costSummary, voteRecord } = recordVoteSideEffects(
|
|
6648
6676
|
args.proposal,
|
|
6649
|
-
strategy,
|
|
6677
|
+
result.strategy,
|
|
6650
6678
|
result,
|
|
6651
6679
|
logger10,
|
|
6652
6680
|
args.ratifies
|
|
@@ -6977,4 +7005,4 @@ export {
|
|
|
6977
7005
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
6978
7006
|
registerConsensusVoteTool
|
|
6979
7007
|
};
|
|
6980
|
-
//# sourceMappingURL=chunk-
|
|
7008
|
+
//# sourceMappingURL=chunk-UJHNK2D6.js.map
|