nexus-agents 8.55.4 → 8.55.6
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-ITQAJLIS.js → chunk-ADYNKL6V.js} +2 -2
- package/dist/{chunk-Q5WEGTPU.js → chunk-JAFFZUMA.js} +70 -18
- package/dist/chunk-JAFFZUMA.js.map +1 -0
- package/dist/{chunk-WX5Y5DVX.js → chunk-NIAQBK7X.js} +7 -7
- package/dist/{chunk-Q4VJJVD3.js → chunk-RLJ6SDFZ.js} +2 -2
- package/dist/{chunk-2GRXQWHL.js → chunk-WCTONUCK.js} +2 -2
- package/dist/{chunk-TR2BAA5U.js → chunk-ZUZWHGTB.js} +3 -3
- package/dist/cli.js +15 -9
- package/dist/cli.js.map +1 -1
- package/dist/{consensus-vote-YIDFFYL6.js → consensus-vote-FGGOXR3Y.js} +4 -4
- package/dist/{improvement-review-Y3EJTGCG.js → improvement-review-F43XUKSC.js} +4 -4
- package/dist/index.js +6 -6
- package/dist/{setup-data-dir-MYWGSVHL.js → setup-data-dir-QLTGCM3W.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-Q5WEGTPU.js.map +0 -1
- /package/dist/{chunk-ITQAJLIS.js.map → chunk-ADYNKL6V.js.map} +0 -0
- /package/dist/{chunk-WX5Y5DVX.js.map → chunk-NIAQBK7X.js.map} +0 -0
- /package/dist/{chunk-Q4VJJVD3.js.map → chunk-RLJ6SDFZ.js.map} +0 -0
- /package/dist/{chunk-2GRXQWHL.js.map → chunk-WCTONUCK.js.map} +0 -0
- /package/dist/{chunk-TR2BAA5U.js.map → chunk-ZUZWHGTB.js.map} +0 -0
- /package/dist/{consensus-vote-YIDFFYL6.js.map → consensus-vote-FGGOXR3Y.js.map} +0 -0
- /package/dist/{improvement-review-Y3EJTGCG.js.map → improvement-review-F43XUKSC.js.map} +0 -0
- /package/dist/{setup-data-dir-MYWGSVHL.js.map → setup-data-dir-QLTGCM3W.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WCTONUCK.js";
|
|
4
4
|
import {
|
|
5
5
|
emitClawGuardViolation
|
|
6
6
|
} from "./chunk-VZSMNIRN.js";
|
|
@@ -2374,4 +2374,4 @@ export {
|
|
|
2374
2374
|
DEFAULT_CONSENSUS_CONFIG,
|
|
2375
2375
|
ConsensusMetricsSchema
|
|
2376
2376
|
};
|
|
2377
|
-
//# sourceMappingURL=chunk-
|
|
2377
|
+
//# sourceMappingURL=chunk-ADYNKL6V.js.map
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
toolSuccessStructured,
|
|
26
26
|
withProgressHeartbeat,
|
|
27
27
|
wrapToolWithTimeout
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ADYNKL6V.js";
|
|
29
29
|
import {
|
|
30
30
|
VERSION
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-WCTONUCK.js";
|
|
32
32
|
import {
|
|
33
33
|
UNRESOLVED_MODEL_ID,
|
|
34
34
|
assessPanelIndependence,
|
|
@@ -5427,17 +5427,36 @@ var VoteRecordPrBindingSchema = z7.object({
|
|
|
5427
5427
|
function projectPrBinding(b) {
|
|
5428
5428
|
return { pr: b.pr, headSha: b.headSha };
|
|
5429
5429
|
}
|
|
5430
|
+
var VoteRecordErrorPolicySchema = z7.enum([
|
|
5431
|
+
"reduce_denominator",
|
|
5432
|
+
"count_as_abstain",
|
|
5433
|
+
"fail_closed",
|
|
5434
|
+
"absolute_quorum"
|
|
5435
|
+
]);
|
|
5430
5436
|
var VoteRecordSchema = z7.object({
|
|
5431
5437
|
/**
|
|
5432
5438
|
* Schema version. '1.1' marked the chain→record-set+sequence model (#3927);
|
|
5433
5439
|
* '1.2' adds the optional `ratifies` subject-binding field (#3927 item 1);
|
|
5434
|
-
* '1.10' adds the optional `ratifiesPr` PR-binding (#5130).
|
|
5435
|
-
* accepted — a 1.1 record
|
|
5436
|
-
*
|
|
5437
|
-
* {@link computeVoteRecordHash}).
|
|
5438
|
-
* '1.10' follows '1.9' by
|
|
5440
|
+
* '1.10' adds the optional `ratifiesPr` PR-binding (#5130); '1.11' the
|
|
5441
|
+
* optional `errorPolicy` (#6211). Every tier is accepted — a 1.1 record
|
|
5442
|
+
* (no `ratifies`) verifies unchanged because each optional is folded into
|
|
5443
|
+
* the self-hash ONLY when present (see {@link computeVoteRecordHash}).
|
|
5444
|
+
* Tiers are labels, not ordered numbers: '1.10' follows '1.9' by
|
|
5445
|
+
* convention only and nothing compares them.
|
|
5439
5446
|
*/
|
|
5440
|
-
version: z7.enum([
|
|
5447
|
+
version: z7.enum([
|
|
5448
|
+
"1.1",
|
|
5449
|
+
"1.2",
|
|
5450
|
+
"1.3",
|
|
5451
|
+
"1.4",
|
|
5452
|
+
"1.5",
|
|
5453
|
+
"1.6",
|
|
5454
|
+
"1.7",
|
|
5455
|
+
"1.8",
|
|
5456
|
+
"1.9",
|
|
5457
|
+
"1.10",
|
|
5458
|
+
"1.11"
|
|
5459
|
+
]),
|
|
5441
5460
|
/** Unique record id (also usable as a `ratificationVoteRef`). */
|
|
5442
5461
|
id: z7.string().min(1),
|
|
5443
5462
|
/**
|
|
@@ -5545,6 +5564,24 @@ var VoteRecordSchema = z7.object({
|
|
|
5545
5564
|
* with two equality rules. The two may coexist on one record.
|
|
5546
5565
|
*/
|
|
5547
5566
|
ratifiesPr: VoteRecordPrBindingSchema.optional(),
|
|
5567
|
+
/**
|
|
5568
|
+
* The error policy the panel actually ran under (#6211, schema 1.11): the
|
|
5569
|
+
* EFFECTIVE policy after `consensus_vote` applied the per-strategy default
|
|
5570
|
+
* (`input.errorPolicy ?? getDefaultErrorPolicy(strategy)`), not the raw
|
|
5571
|
+
* input the caller may have omitted. Hash-covered, present-only.
|
|
5572
|
+
*
|
|
5573
|
+
* Before this tier the policy reached the RESPONSE only, so the governor
|
|
5574
|
+
* ledger gate (`scripts/governor-ledger-evidence.ts`) could not say which
|
|
5575
|
+
* policy a whole-panel ratification was configured with: under
|
|
5576
|
+
* `absolute_quorum` an errored seat voids the vote, so the one
|
|
5577
|
+
* ledger-observable trace of a different policy was an approved record
|
|
5578
|
+
* with `panelCoverage.errored > 0` — and a whole panel under
|
|
5579
|
+
* `reduce_denominator` looked exactly like one under `absolute_quorum`.
|
|
5580
|
+
* The gate's `wrong-error-policy` verdict reads this field; a record
|
|
5581
|
+
* without it (every pre-1.11 record) keeps the panel-coverage inference
|
|
5582
|
+
* and is reported as `errorPolicy: unrecorded`.
|
|
5583
|
+
*/
|
|
5584
|
+
errorPolicy: VoteRecordErrorPolicySchema.optional(),
|
|
5548
5585
|
/**
|
|
5549
5586
|
* ADVISORY hash of the tip record at write time (absent for the first).
|
|
5550
5587
|
* Retained for audit texture but NOT covered by `hash` and NOT verified —
|
|
@@ -5577,7 +5614,8 @@ function foldOptionalFields(base, payload) {
|
|
|
5577
5614
|
}
|
|
5578
5615
|
} : withCoverage;
|
|
5579
5616
|
const withRatifies = payload.ratifies !== void 0 ? { ...withPanel, ratifies: payload.ratifies } : withPanel;
|
|
5580
|
-
|
|
5617
|
+
const withPrBinding = payload.ratifiesPr !== void 0 ? { ...withRatifies, ratifiesPr: projectPrBinding(payload.ratifiesPr) } : withRatifies;
|
|
5618
|
+
return payload.errorPolicy !== void 0 ? { ...withPrBinding, errorPolicy: payload.errorPolicy } : withPrBinding;
|
|
5581
5619
|
}
|
|
5582
5620
|
function computeVoteRecordHash(payload) {
|
|
5583
5621
|
const base = {
|
|
@@ -6155,8 +6193,9 @@ function deriveOptionFields(votes, declaredOptions) {
|
|
|
6155
6193
|
}
|
|
6156
6194
|
return { optionTally: tallied ?? [], optionCoverage: coverageOf(votes) };
|
|
6157
6195
|
}
|
|
6158
|
-
function recordVersion(optionTally, optionCoverage, panelCoverage, voters,
|
|
6159
|
-
if (
|
|
6196
|
+
function recordVersion(optionTally, optionCoverage, panelCoverage, voters, recordLevel) {
|
|
6197
|
+
if (recordLevel.errorPolicy !== void 0) return "1.11";
|
|
6198
|
+
if (recordLevel.ratifiesPr !== void 0) return "1.10";
|
|
6160
6199
|
if (voters.some((v) => v.assignedCli !== void 0 || v.fallback !== void 0)) return "1.9";
|
|
6161
6200
|
if (voters.some((v) => v.model !== void 0 || v.unverifiable === true)) return "1.8";
|
|
6162
6201
|
if (voters.some((v) => v.retried === true)) return "1.7";
|
|
@@ -6165,9 +6204,9 @@ function recordVersion(optionTally, optionCoverage, panelCoverage, voters, ratif
|
|
|
6165
6204
|
if (optionCoverage !== void 0) return "1.4";
|
|
6166
6205
|
return optionTally !== void 0 ? "1.3" : "1.2";
|
|
6167
6206
|
}
|
|
6168
|
-
function panelCoverageOf(votes) {
|
|
6207
|
+
function panelCoverageOf(votes, always) {
|
|
6169
6208
|
const erroredRoles = votes.filter((v) => v.source === "error").map((v) => v.role);
|
|
6170
|
-
if (erroredRoles.length === 0) return void 0;
|
|
6209
|
+
if (erroredRoles.length === 0 && !always) return void 0;
|
|
6171
6210
|
return {
|
|
6172
6211
|
requested: votes.length,
|
|
6173
6212
|
responded: votes.length - erroredRoles.length,
|
|
@@ -6203,10 +6242,10 @@ function ratificationBindings(input) {
|
|
|
6203
6242
|
function buildVoteRecord(input) {
|
|
6204
6243
|
const proposalTruncated = input.proposal.length > MAX_PROPOSAL_RECORD_CHARS ? input.proposal.slice(0, MAX_PROPOSAL_RECORD_CHARS) + "..." : input.proposal;
|
|
6205
6244
|
const { optionTally, optionCoverage } = deriveOptionFields(input.votes, input.declaredOptions);
|
|
6206
|
-
const panelCoverage = panelCoverageOf(input.votes);
|
|
6245
|
+
const panelCoverage = panelCoverageOf(input.votes, input.ratifiesPr !== void 0);
|
|
6207
6246
|
const voters = toVoterSummaries(input.votes);
|
|
6208
6247
|
const payload = {
|
|
6209
|
-
version: recordVersion(optionTally, optionCoverage, panelCoverage, voters, input
|
|
6248
|
+
version: recordVersion(optionTally, optionCoverage, panelCoverage, voters, input),
|
|
6210
6249
|
id: input.id,
|
|
6211
6250
|
sequence: input.sequence ?? 0,
|
|
6212
6251
|
recordedAt: input.recordedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -6227,6 +6266,8 @@ function buildVoteRecord(input) {
|
|
|
6227
6266
|
...optionTally !== void 0 ? { optionTally } : {},
|
|
6228
6267
|
...optionCoverage !== void 0 ? { optionCoverage } : {},
|
|
6229
6268
|
...panelCoverage !== void 0 ? { panelCoverage } : {},
|
|
6269
|
+
// #6211: the effective error policy, present-only, on the `ratifiesPr` rule.
|
|
6270
|
+
...input.errorPolicy !== void 0 ? { errorPolicy: input.errorPolicy } : {},
|
|
6230
6271
|
...input.previousHash !== void 0 ? { previousHash: input.previousHash } : {}
|
|
6231
6272
|
};
|
|
6232
6273
|
return { ...payload, hash: computeVoteRecordHash(payload) };
|
|
@@ -6527,6 +6568,7 @@ function recordAuthenticVote(args) {
|
|
|
6527
6568
|
...args.correlationId !== void 0 ? { correlationId: args.correlationId } : {},
|
|
6528
6569
|
...args.ratifies !== void 0 ? { ratifies: args.ratifies } : {},
|
|
6529
6570
|
...args.ratifiesPr !== void 0 ? { ratifiesPr: args.ratifiesPr } : {},
|
|
6571
|
+
...args.errorPolicy !== void 0 ? { errorPolicy: args.errorPolicy } : {},
|
|
6530
6572
|
logger: logger6
|
|
6531
6573
|
});
|
|
6532
6574
|
if (record === void 0) {
|
|
@@ -7992,7 +8034,9 @@ function buildPolicyShortCircuitResult(args) {
|
|
|
7992
8034
|
contrarianCheck: "skipped",
|
|
7993
8035
|
// #3124: surface WHY a high-approval result is still 'rejected' so callers
|
|
7994
8036
|
// don't mistake a fail-closed policy short-circuit for a genuine rejection.
|
|
7995
|
-
policyReason: args.reason
|
|
8037
|
+
policyReason: args.reason,
|
|
8038
|
+
// #6211: the policy that short-circuited is the policy the record states.
|
|
8039
|
+
errorPolicy: args.errorPolicy
|
|
7996
8040
|
};
|
|
7997
8041
|
}
|
|
7998
8042
|
async function executeVoting(input, logger11, opts) {
|
|
@@ -8091,6 +8135,7 @@ async function executeVotingInner(input, logger11, opts) {
|
|
|
8091
8135
|
votes,
|
|
8092
8136
|
outcome,
|
|
8093
8137
|
cascaded,
|
|
8138
|
+
errorPolicy,
|
|
8094
8139
|
startTime,
|
|
8095
8140
|
logger: logger11
|
|
8096
8141
|
});
|
|
@@ -8126,7 +8171,10 @@ function finalizeVotingResult(args) {
|
|
|
8126
8171
|
strategy: args.strategy,
|
|
8127
8172
|
// #4132: PANEL_SIZE + contrarian-presence for the absolute_quorum predicate.
|
|
8128
8173
|
panelSize: args.roles.length,
|
|
8129
|
-
contrarianRequested: args.roles.includes("catfish")
|
|
8174
|
+
contrarianRequested: args.roles.includes("catfish"),
|
|
8175
|
+
// #6211: carried to the persisted record; the response never needed it
|
|
8176
|
+
// because `buildResponse` still holds the input, but the record does not.
|
|
8177
|
+
errorPolicy: args.errorPolicy
|
|
8130
8178
|
};
|
|
8131
8179
|
if (args.higherOrderResult !== void 0) result.higherOrderResult = args.higherOrderResult;
|
|
8132
8180
|
return result;
|
|
@@ -8148,6 +8196,10 @@ function recordVoteSideEffects(proposal, strategy, result, logger11, declared) {
|
|
|
8148
8196
|
// and never on the result — so the record used to say `approved` for a vote
|
|
8149
8197
|
// this tool reports as `no_quorum`.
|
|
8150
8198
|
resolvedDecision: toRecordDecision(result.decision),
|
|
8199
|
+
// #6211: the EFFECTIVE policy `executeVoting` stamped, so a caller that
|
|
8200
|
+
// took the per-strategy default still gets `reduce_denominator` on the
|
|
8201
|
+
// ledger line rather than nothing.
|
|
8202
|
+
errorPolicy: result.errorPolicy,
|
|
8151
8203
|
correlationId: decisionId,
|
|
8152
8204
|
...declared.ratifies !== void 0 ? { ratifies: declared.ratifies } : {},
|
|
8153
8205
|
// #5130: the PR binding takes the same hop as `ratifies`; the seam test
|
|
@@ -8578,4 +8630,4 @@ export {
|
|
|
8578
8630
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
8579
8631
|
registerConsensusVoteTool
|
|
8580
8632
|
};
|
|
8581
|
-
//# sourceMappingURL=chunk-
|
|
8633
|
+
//# sourceMappingURL=chunk-JAFFZUMA.js.map
|