nexus-agents 8.30.0 → 8.31.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-ILBCNOV6.js → chunk-3ZVZXXRY.js} +54 -10
- package/dist/{chunk-ILBCNOV6.js.map → chunk-3ZVZXXRY.js.map} +1 -1
- package/dist/{chunk-GG6OKZY4.js → chunk-42LDWYPF.js} +2 -2
- package/dist/{chunk-ZON73IQM.js → chunk-PF452UB3.js} +2 -2
- package/dist/{chunk-4YUD3EJO.js → chunk-RRI3M73Y.js} +7 -7
- package/dist/{chunk-3CB3LVMG.js → chunk-YEURRBMU.js} +2 -2
- package/dist/{chunk-GHXHT4XL.js → chunk-ZYLE33GL.js} +3 -3
- package/dist/cli.js +7 -7
- package/dist/{consensus-vote-VQ6ZOJBP.js → consensus-vote-AJ6SWE4U.js} +4 -4
- package/dist/{improvement-review-OZ6O3ACP.js → improvement-review-MY2U3VKI.js} +4 -4
- package/dist/index.js +6 -6
- package/dist/{setup-data-dir-ZADPA4FW.js → setup-data-dir-T2ZTIRXS.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-GG6OKZY4.js.map → chunk-42LDWYPF.js.map} +0 -0
- /package/dist/{chunk-ZON73IQM.js.map → chunk-PF452UB3.js.map} +0 -0
- /package/dist/{chunk-4YUD3EJO.js.map → chunk-RRI3M73Y.js.map} +0 -0
- /package/dist/{chunk-3CB3LVMG.js.map → chunk-YEURRBMU.js.map} +0 -0
- /package/dist/{chunk-GHXHT4XL.js.map → chunk-ZYLE33GL.js.map} +0 -0
- /package/dist/{consensus-vote-VQ6ZOJBP.js.map → consensus-vote-AJ6SWE4U.js.map} +0 -0
- /package/dist/{improvement-review-OZ6O3ACP.js.map → improvement-review-MY2U3VKI.js.map} +0 -0
- /package/dist/{setup-data-dir-ZADPA4FW.js.map → setup-data-dir-T2ZTIRXS.js.map} +0 -0
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
toolSuccessStructured,
|
|
24
24
|
withProgressHeartbeat,
|
|
25
25
|
wrapToolWithTimeout
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-42LDWYPF.js";
|
|
27
27
|
import {
|
|
28
28
|
VERSION
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-PF452UB3.js";
|
|
30
30
|
import {
|
|
31
31
|
assessPanelIndependence,
|
|
32
32
|
countDistinctModels,
|
|
@@ -5129,10 +5129,33 @@ var VoteRecordPanelCoverageSchema = z7.object({
|
|
|
5129
5129
|
/** The roles behind `errored`, in panel order. */
|
|
5130
5130
|
erroredRoles: z7.array(z7.string().min(1).max(100))
|
|
5131
5131
|
}).strict();
|
|
5132
|
+
var MAX_VOTER_REASONING_CHARS = 2e4;
|
|
5132
5133
|
var VoterSummarySchema = z7.object({
|
|
5133
5134
|
role: z7.string().min(1).max(100),
|
|
5134
5135
|
decision: z7.enum(["approve", "reject", "abstain"]),
|
|
5135
|
-
confidence: z7.number().min(0).max(1)
|
|
5136
|
+
confidence: z7.number().min(0).max(1),
|
|
5137
|
+
/**
|
|
5138
|
+
* The voter's stated grounds (#5373, schema 1.6).
|
|
5139
|
+
*
|
|
5140
|
+
* `generateVoteHash` already hashed `{role, decision, reasoning}` and then
|
|
5141
|
+
* discarded the text, so the chain attested to a value it did not store and
|
|
5142
|
+
* nobody could re-verify the hash without re-obtaining the reasoning. On
|
|
5143
|
+
* #5228 a contrarian rejection was clipped mid-sentence in the terminal, the
|
|
5144
|
+
* grounds were unrecoverable, and the same defect resurfaced a round later —
|
|
5145
|
+
* one round of a 7-voter panel is 7-13 minutes of model time, and the
|
|
5146
|
+
* objection was right both times.
|
|
5147
|
+
*
|
|
5148
|
+
* Stored whole rather than sampled. Warn-mode near-misses are emitted per
|
|
5149
|
+
* TOOL CALL, thousands a day; votes are emitted per PANEL, dozens a day at
|
|
5150
|
+
* most, so ~17 KB per vote is not the same growth problem.
|
|
5151
|
+
*
|
|
5152
|
+
* Absence is not an empty argument: an errored voter has no entry in
|
|
5153
|
+
* `voters` at all (see `panelCoverage`), so `reasoning: ''` means a live
|
|
5154
|
+
* voter returned nothing, which is itself a signal.
|
|
5155
|
+
*/
|
|
5156
|
+
reasoning: z7.string().max(MAX_VOTER_REASONING_CHARS).optional(),
|
|
5157
|
+
/** True when `reasoning` was clipped to {@link MAX_VOTER_REASONING_CHARS}. */
|
|
5158
|
+
reasoningTruncated: z7.literal(true).optional()
|
|
5136
5159
|
}).strict();
|
|
5137
5160
|
var VoteRecordCountsSchema = z7.object({
|
|
5138
5161
|
approve: z7.number().int().nonnegative(),
|
|
@@ -5154,7 +5177,7 @@ var VoteRecordSchema = z7.object({
|
|
|
5154
5177
|
* `ratifies` is folded into the self-hash ONLY when present (see
|
|
5155
5178
|
* {@link computeVoteRecordHash}).
|
|
5156
5179
|
*/
|
|
5157
|
-
version: z7.enum(["1.1", "1.2", "1.3", "1.4", "1.5"]),
|
|
5180
|
+
version: z7.enum(["1.1", "1.2", "1.3", "1.4", "1.5", "1.6"]),
|
|
5158
5181
|
/** Unique record id (also usable as a `ratificationVoteRef`). */
|
|
5159
5182
|
id: z7.string().min(1),
|
|
5160
5183
|
/**
|
|
@@ -5286,10 +5309,17 @@ function computeVoteRecordHash(payload) {
|
|
|
5286
5309
|
abstain: payload.voteCounts.abstain,
|
|
5287
5310
|
total: payload.voteCounts.total
|
|
5288
5311
|
},
|
|
5312
|
+
// `reasoning` / `reasoningTruncated` (#5373, schema 1.6) are appended per
|
|
5313
|
+
// entry ONLY when present, on the same rule as the record-level optional
|
|
5314
|
+
// fields: a pre-1.6 voter entry re-hashes byte-identical, so every
|
|
5315
|
+
// historical record still verifies, while editing or removing a stored
|
|
5316
|
+
// reasoning flips the hash.
|
|
5289
5317
|
voters: payload.voters.map((v) => ({
|
|
5290
5318
|
role: v.role,
|
|
5291
5319
|
decision: v.decision,
|
|
5292
|
-
confidence: v.confidence
|
|
5320
|
+
confidence: v.confidence,
|
|
5321
|
+
...v.reasoning !== void 0 ? { reasoning: v.reasoning } : {},
|
|
5322
|
+
...v.reasoningTruncated === true ? { reasoningTruncated: true } : {}
|
|
5293
5323
|
})),
|
|
5294
5324
|
correlationId: payload.correlationId ?? null
|
|
5295
5325
|
};
|
|
@@ -5321,10 +5351,22 @@ function toVoterSummaries(votes) {
|
|
|
5321
5351
|
for (const v of votes) {
|
|
5322
5352
|
if (v.source === "error") continue;
|
|
5323
5353
|
const vote = v.vote;
|
|
5324
|
-
summaries.push({
|
|
5354
|
+
summaries.push({
|
|
5355
|
+
role: v.role,
|
|
5356
|
+
decision: vote.decision,
|
|
5357
|
+
confidence: vote.confidence,
|
|
5358
|
+
...reasoningFields(vote.reasoning)
|
|
5359
|
+
});
|
|
5325
5360
|
}
|
|
5326
5361
|
return summaries;
|
|
5327
5362
|
}
|
|
5363
|
+
function reasoningFields(reasoning) {
|
|
5364
|
+
if (reasoning.length <= MAX_VOTER_REASONING_CHARS) return { reasoning };
|
|
5365
|
+
return {
|
|
5366
|
+
reasoning: reasoning.slice(0, MAX_VOTER_REASONING_CHARS),
|
|
5367
|
+
reasoningTruncated: true
|
|
5368
|
+
};
|
|
5369
|
+
}
|
|
5328
5370
|
function recordDecisionFor(input) {
|
|
5329
5371
|
return input.resolvedDecision ?? outcomeToDecision(input.result, input.votes, input.errorVoided ?? false);
|
|
5330
5372
|
}
|
|
@@ -5335,7 +5377,8 @@ function deriveOptionFields(votes) {
|
|
|
5335
5377
|
optionCoverage: optionTally === void 0 ? void 0 : coverageOf(votes)
|
|
5336
5378
|
};
|
|
5337
5379
|
}
|
|
5338
|
-
function recordVersion(optionTally, optionCoverage, panelCoverage) {
|
|
5380
|
+
function recordVersion(optionTally, optionCoverage, panelCoverage, voters) {
|
|
5381
|
+
if (voters.some((v) => v.reasoning !== void 0)) return "1.6";
|
|
5339
5382
|
if (panelCoverage !== void 0) return "1.5";
|
|
5340
5383
|
if (optionCoverage !== void 0) return "1.4";
|
|
5341
5384
|
return optionTally !== void 0 ? "1.3" : "1.2";
|
|
@@ -5373,8 +5416,9 @@ function buildVoteRecord(input) {
|
|
|
5373
5416
|
const proposalTruncated = input.proposal.length > MAX_PROPOSAL_RECORD_CHARS ? input.proposal.slice(0, MAX_PROPOSAL_RECORD_CHARS) + "..." : input.proposal;
|
|
5374
5417
|
const { optionTally, optionCoverage } = deriveOptionFields(input.votes);
|
|
5375
5418
|
const panelCoverage = panelCoverageOf(input.votes);
|
|
5419
|
+
const voters = toVoterSummaries(input.votes);
|
|
5376
5420
|
const payload = {
|
|
5377
|
-
version: recordVersion(optionTally, optionCoverage, panelCoverage),
|
|
5421
|
+
version: recordVersion(optionTally, optionCoverage, panelCoverage, voters),
|
|
5378
5422
|
id: input.id,
|
|
5379
5423
|
sequence: input.sequence ?? 0,
|
|
5380
5424
|
recordedAt: input.recordedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -5389,7 +5433,7 @@ function buildVoteRecord(input) {
|
|
|
5389
5433
|
abstain: input.result.voteCounts.abstain,
|
|
5390
5434
|
total: input.result.voteCounts.total
|
|
5391
5435
|
},
|
|
5392
|
-
voters
|
|
5436
|
+
voters,
|
|
5393
5437
|
...input.correlationId !== void 0 ? { correlationId: input.correlationId } : {},
|
|
5394
5438
|
...input.ratifies !== void 0 ? { ratifies: input.ratifies } : {},
|
|
5395
5439
|
...optionTally !== void 0 ? { optionTally } : {},
|
|
@@ -7762,4 +7806,4 @@ export {
|
|
|
7762
7806
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
7763
7807
|
registerConsensusVoteTool
|
|
7764
7808
|
};
|
|
7765
|
-
//# sourceMappingURL=chunk-
|
|
7809
|
+
//# sourceMappingURL=chunk-3ZVZXXRY.js.map
|