nexus-agents 8.55.6 → 8.55.7

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.
@@ -11,7 +11,7 @@ import {
11
11
  NODE_ENGINE_RANGE,
12
12
  VERSION,
13
13
  isNodeVersionSupported
14
- } from "./chunk-WCTONUCK.js";
14
+ } from "./chunk-YJPKZHKU.js";
15
15
  import {
16
16
  claimGlobalRegistry
17
17
  } from "./chunk-BXP5K5TU.js";
@@ -1314,7 +1314,7 @@ async function runDoctorFix(result) {
1314
1314
  writeLine2("\u2500".repeat(40));
1315
1315
  let fixCount = 0;
1316
1316
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1317
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-QLTGCM3W.js");
1317
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-Q4AC6LWI.js");
1318
1318
  const outcome = describeDataDirFix2(initDataDirectories2());
1319
1319
  writeLine2(outcome.line);
1320
1320
  if (outcome.counted) fixCount++;
@@ -1416,4 +1416,4 @@ export {
1416
1416
  startStdioServer,
1417
1417
  closeServer
1418
1418
  };
1419
- //# sourceMappingURL=chunk-ZUZWHGTB.js.map
1419
+ //# sourceMappingURL=chunk-2CD7UKWG.js.map
@@ -25,10 +25,10 @@ import {
25
25
  toolSuccessStructured,
26
26
  withProgressHeartbeat,
27
27
  wrapToolWithTimeout
28
- } from "./chunk-ADYNKL6V.js";
28
+ } from "./chunk-WJRD5RYE.js";
29
29
  import {
30
30
  VERSION
31
- } from "./chunk-WCTONUCK.js";
31
+ } from "./chunk-YJPKZHKU.js";
32
32
  import {
33
33
  UNRESOLVED_MODEL_ID,
34
34
  assessPanelIndependence,
@@ -8630,4 +8630,4 @@ export {
8630
8630
  CONSENSUS_VOTE_TOOL_SCHEMA,
8631
8631
  registerConsensusVoteTool
8632
8632
  };
8633
- //# sourceMappingURL=chunk-JAFFZUMA.js.map
8633
+ //# sourceMappingURL=chunk-7KVII2DY.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-ADYNKL6V.js";
10
+ } from "./chunk-WJRD5RYE.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -2278,4 +2278,4 @@ export {
2278
2278
  runImprovementReview,
2279
2279
  registerImprovementReviewTool
2280
2280
  };
2281
- //# sourceMappingURL=chunk-RLJ6SDFZ.js.map
2281
+ //# sourceMappingURL=chunk-FNL43KEP.js.map
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-ZUZWHGTB.js";
24
+ } from "./chunk-2CD7UKWG.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-QMGMD6JB.js";
@@ -62,7 +62,7 @@ import {
62
62
  toJobSummary,
63
63
  updateStage,
64
64
  writeJobCancelled
65
- } from "./chunk-JAFFZUMA.js";
65
+ } from "./chunk-7KVII2DY.js";
66
66
  import {
67
67
  allOf,
68
68
  anyOf
@@ -82,7 +82,7 @@ import {
82
82
  } from "./chunk-RNWUIQTZ.js";
83
83
  import {
84
84
  withPrerequisite
85
- } from "./chunk-RLJ6SDFZ.js";
85
+ } from "./chunk-FNL43KEP.js";
86
86
  import {
87
87
  NOOP_NOTIFIER,
88
88
  RateLimiter,
@@ -107,7 +107,7 @@ import {
107
107
  withAuditTrail,
108
108
  withProgressHeartbeat,
109
109
  wrapToolWithTimeout
110
- } from "./chunk-ADYNKL6V.js";
110
+ } from "./chunk-WJRD5RYE.js";
111
111
  import {
112
112
  createAuditTrail,
113
113
  createGraphAuditBridge,
@@ -46182,7 +46182,7 @@ function buildVotingInput(plan, config) {
46182
46182
  }
46183
46183
  async function executeSingleVote(plan, config, log) {
46184
46184
  try {
46185
- const { executeVoting } = await import("./consensus-vote-FGGOXR3Y.js");
46185
+ const { executeVoting } = await import("./consensus-vote-X5C5PLII.js");
46186
46186
  const input = buildVotingInput(plan, config);
46187
46187
  const result = await executeVoting(input, log);
46188
46188
  return parseVotingResult(result);
@@ -47980,7 +47980,7 @@ ${contextBlock}`;
47980
47980
  const strategy = config.votingStrategy ?? "higher_order";
47981
47981
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47982
47982
  try {
47983
- const { executeVoting } = await import("./consensus-vote-FGGOXR3Y.js");
47983
+ const { executeVoting } = await import("./consensus-vote-X5C5PLII.js");
47984
47984
  const votingResult = await executeVoting(
47985
47985
  {
47986
47986
  proposal: buildVoteProposal(plan, research),
@@ -48759,8 +48759,9 @@ var PrReviewSanitizationSchema = z103.object({
48759
48759
  * #4140 an over-budget diff is packed to a security-prioritized SUBSET
48760
48760
  * before the panel prompt is built, so on that path the voters read less
48761
48761
  * than this hash covers. That reduction is a DIFFERENT one, disclosed
48762
- * separately in the hash-covered `summary` (`[partial coverage: n/m files
48763
- * reviewed, dropped: …]`) and enforced by `applyPartialCoverageGate`.
48762
+ * separately in the hash-covered `coverage` record field (#6190; and,
48763
+ * human-readably, the `[partial coverage: …]` summary stamp) and enforced
48764
+ * by `applyPartialCoverageGate`.
48764
48765
  *
48765
48766
  * Keeping them apart is the point: one hash covering both reductions could
48766
48767
  * not tell an auditor WHICH one moved it. This field isolates the
@@ -48801,6 +48802,35 @@ var PrReviewSanitizationSchema = z103.object({
48801
48802
  */
48802
48803
  tagsRemoved: z103.number().int().nonnegative()
48803
48804
  }).strict();
48805
+ var PrReviewBudgetSourceSchema = z103.enum(["registry", "binding-cap-fallback"]);
48806
+ var PrReviewPanelCoverageSchema = z103.object({
48807
+ /** `'full'` — the panel was sent the whole diff; `'partial'` — a packed subset. */
48808
+ panelRead: z103.enum(["full", "partial"]),
48809
+ /** Files whose full diff the panel actually reviewed. */
48810
+ reviewedFiles: z103.number().int().nonnegative(),
48811
+ /** Files in the original diff. */
48812
+ totalFiles: z103.number().int().nonnegative(),
48813
+ /**
48814
+ * EVERY path the panel did not fully review — the complete list, never a
48815
+ * prefix of it. The summary stamp lists at most a few of these and says
48816
+ * `N dropped (k listed)`; this field is where the rest live.
48817
+ */
48818
+ droppedFiles: z103.array(z103.string()),
48819
+ /** UTF-8 bytes of the diff text the panel actually read. */
48820
+ reviewedBytes: z103.number().int().nonnegative(),
48821
+ /** UTF-8 bytes of the input diff. */
48822
+ totalBytes: z103.number().int().nonnegative(),
48823
+ /** Where the panel-read budget came from. */
48824
+ budgetSource: PrReviewBudgetSourceSchema,
48825
+ /** The budget derivation (registry) or the fallback reason, verbatim. */
48826
+ budgetDetail: z103.string()
48827
+ }).strict();
48828
+ var PrReviewBindingBoundsSchema = z103.object({
48829
+ /** `'full'` — the hash covers every byte; `'prefix'` — only the first `boundBytes`. */
48830
+ kind: z103.enum(["full", "prefix"]),
48831
+ /** UTF-8 bytes the hash binds: `min(totalBytes, MAX_REVIEWED_DIFF_BYTES)`. */
48832
+ boundBytes: z103.number().int().nonnegative()
48833
+ }).strict();
48804
48834
  var PrReviewRecordSchema = z103.object({
48805
48835
  /**
48806
48836
  * Schema version. '1.1' was the Option-C binding (#3831): the record binds to
@@ -48819,8 +48849,17 @@ var PrReviewRecordSchema = z103.object({
48819
48849
  * at this bump), so no record exists whose hash a version literal would
48820
48850
  * invalidate. Reading a '1.2' record as if it were '1.3' would be the unsafe
48821
48851
  * move — its hash may bind SANITIZED bytes the gate can never reproduce.
48822
- */
48823
- version: z103.literal("1.3"),
48852
+ * '1.4' (#6190) marks the boundary at which records began carrying
48853
+ * {@link coverage} and {@link bindingBounds} as structured fields. NOT a clean
48854
+ * break this time: a '1.3' record is still accepted and — because both new
48855
+ * fields are folded into the hash ONLY when present, like `diffProvenance`
48856
+ * and `sanitization` — re-hashes byte-identically (the pinned 1.3 golden in
48857
+ * pr-review-record.test.ts is the guard). This is the vote-record tier
48858
+ * model (`vote-record.ts`, #6179): a 1.3 record differs from a 1.4 one only
48859
+ * in which fields it CAN carry, and reading it as 1.4 is safe because its
48860
+ * hash binds the same raw bytes. Tiers are labels; nothing orders them.
48861
+ */
48862
+ version: z103.enum(["1.3", "1.4"]),
48824
48863
  /**
48825
48864
  * Monotonic sequence number (integer ≥ 0). Assigned as (max existing
48826
48865
  * sequence)+1 at write time. Sorted, the set of sequences must cover
@@ -48876,6 +48915,20 @@ var PrReviewRecordSchema = z103.object({
48876
48915
  * consumer must NOT read that as "nothing was removed".
48877
48916
  */
48878
48917
  sanitization: PrReviewSanitizationSchema.optional(),
48918
+ /**
48919
+ * What the panel READ (#6190). OPTIONAL for the same reason the two above
48920
+ * are: the schema is `.strict()`, a '1.3' record has no such field, and a
48921
+ * producer that does not measure coverage (the local-ledger script) must be
48922
+ * able to decline to say. Absent ⇒ nothing stated; NOT "read everything".
48923
+ */
48924
+ coverage: PrReviewPanelCoverageSchema.optional(),
48925
+ /**
48926
+ * How far the hash BINDS (#6190). Same optionality rule. Written together
48927
+ * with {@link coverage} by the pr_review producer; absent ⇒ nothing stated,
48928
+ * and a consumer that needs the answer recomputes it from the diff length
48929
+ * against `MAX_REVIEWED_DIFF_BYTES` (which the governor gate does).
48930
+ */
48931
+ bindingBounds: PrReviewBindingBoundsSchema.optional(),
48879
48932
  /**
48880
48933
  * ADVISORY hash of the tip record at write time (absent for the first).
48881
48934
  * Retained for audit texture but NOT covered by `hash` and NOT verified —
@@ -48885,6 +48938,21 @@ var PrReviewRecordSchema = z103.object({
48885
48938
  /** SHA-256 over every field above EXCEPT `previousHash` (and except `hash`). */
48886
48939
  hash: z103.string().length(64)
48887
48940
  }).strict();
48941
+ function projectPanelCoverage(c) {
48942
+ return {
48943
+ panelRead: c.panelRead,
48944
+ reviewedFiles: c.reviewedFiles,
48945
+ totalFiles: c.totalFiles,
48946
+ droppedFiles: [...c.droppedFiles],
48947
+ reviewedBytes: c.reviewedBytes,
48948
+ totalBytes: c.totalBytes,
48949
+ budgetSource: c.budgetSource,
48950
+ budgetDetail: c.budgetDetail
48951
+ };
48952
+ }
48953
+ function projectBindingBounds(b) {
48954
+ return { kind: b.kind, boundBytes: b.boundBytes };
48955
+ }
48888
48956
  function computePrReviewRecordHash(payload) {
48889
48957
  const canonical = JSON.stringify({
48890
48958
  version: payload.version,
@@ -48937,7 +49005,12 @@ function computePrReviewRecordHash(payload) {
48937
49005
  fieldsModified: payload.sanitization.fieldsModified,
48938
49006
  tagsRemoved: payload.sanitization.tagsRemoved
48939
49007
  }
48940
- } : {}
49008
+ } : {},
49009
+ // #6190 panel coverage and binding bounds, INSIDE the hash. Present-only on the
49010
+ // same rule as the two blocks above, so a 1.3 record projects
49011
+ // byte-identically (the pinned golden is the guard).
49012
+ ...payload.coverage !== void 0 ? { coverage: projectPanelCoverage(payload.coverage) } : {},
49013
+ ...payload.bindingBounds !== void 0 ? { bindingBounds: projectBindingBounds(payload.bindingBounds) } : {}
48941
49014
  });
48942
49015
  return crypto3.createHash("sha256").update(canonical).digest("hex");
48943
49016
  }
@@ -48949,7 +49022,7 @@ var MAX_SUMMARY_RECORD_CHARS = 500;
48949
49022
  function buildPrReviewRecord(input) {
48950
49023
  const summaryTruncated = input.summary.length > MAX_SUMMARY_RECORD_CHARS ? input.summary.slice(0, MAX_SUMMARY_RECORD_CHARS) + "..." : input.summary;
48951
49024
  const payload = {
48952
- version: "1.3",
49025
+ version: "1.4",
48953
49026
  sequence: input.sequence ?? 0,
48954
49027
  prNumber: input.prNumber,
48955
49028
  baseSha: input.baseSha,
@@ -48967,6 +49040,8 @@ function buildPrReviewRecord(input) {
48967
49040
  summary: summaryTruncated,
48968
49041
  ...input.diffProvenance !== void 0 ? { diffProvenance: input.diffProvenance } : {},
48969
49042
  ...input.sanitization !== void 0 ? { sanitization: input.sanitization } : {},
49043
+ ...input.coverage !== void 0 ? { coverage: input.coverage } : {},
49044
+ ...input.bindingBounds !== void 0 ? { bindingBounds: input.bindingBounds } : {},
48970
49045
  ...input.correlationId !== void 0 ? { correlationId: input.correlationId } : {},
48971
49046
  ...input.previousHash !== void 0 ? { previousHash: input.previousHash } : {}
48972
49047
  };
@@ -49239,11 +49314,33 @@ function bindingStamp(coverage) {
49239
49314
  const binding = coverage.binding === "prefix" ? `binding covers first ${bytes(coverage.boundBytes)} bytes` : `binding covers all ${bytes(coverage.boundBytes)} bytes`;
49240
49315
  return `[panel read ${bytes(coverage.reviewedBytes)}/${bytes(coverage.totalBytes)} bytes; ${binding}; budget: ${coverage.budgetSource} (${coverage.budgetDetail})]`;
49241
49316
  }
49317
+ var SUMMARY_DROPPED_FILES_LISTED = 3;
49318
+ function droppedFilesClause(dropped) {
49319
+ const listed = dropped.slice(0, SUMMARY_DROPPED_FILES_LISTED);
49320
+ const qualifier = listed.length < dropped.length ? ` (${String(listed.length)} listed)` : "";
49321
+ return `${String(dropped.length)} dropped${qualifier}: ${listed.join(", ")}`;
49322
+ }
49242
49323
  function coverageStamps(coverage) {
49243
49324
  if (coverage === void 0) return "";
49244
- const files = coverage.partial ? `[partial coverage: ${String(coverage.reviewedFiles)}/${String(coverage.totalFiles)} files reviewed, dropped: ${coverage.droppedFiles.join(", ")}] ` : "";
49325
+ const files = coverage.partial ? `[partial coverage: ${String(coverage.reviewedFiles)}/${String(coverage.totalFiles)} files reviewed, ${droppedFilesClause(coverage.droppedFiles)}] ` : "";
49245
49326
  return ` ${files}${bindingStamp(coverage)}`;
49246
49327
  }
49328
+ function coverageFieldsOf(coverage) {
49329
+ if (coverage === void 0) return void 0;
49330
+ return {
49331
+ coverage: {
49332
+ panelRead: coverage.panelRead,
49333
+ reviewedFiles: coverage.reviewedFiles,
49334
+ totalFiles: coverage.totalFiles,
49335
+ droppedFiles: [...coverage.droppedFiles],
49336
+ reviewedBytes: coverage.reviewedBytes,
49337
+ totalBytes: coverage.totalBytes,
49338
+ budgetSource: coverage.budgetSource,
49339
+ budgetDetail: coverage.budgetDetail
49340
+ },
49341
+ bindingBounds: { kind: coverage.binding, boundBytes: coverage.boundBytes }
49342
+ };
49343
+ }
49247
49344
  function warnIfDiffTruncated(diff, prNumber, logger57) {
49248
49345
  if (!reviewedDiffWasTruncated(diff)) return;
49249
49346
  logger57.warn(
@@ -49274,6 +49371,7 @@ function buildAndPersist(prNumber, baseSha, args) {
49274
49371
  const { input, aggregate, counts, reviewCount, logger: logger57, coverage, diffSource, sanitization } = args;
49275
49372
  const reviewedDiffHash = sanitization?.rawDiffHash ?? computeReviewedDiffHash(input.prDiff);
49276
49373
  const stamps = coverageStamps(coverage);
49374
+ const coverageFields = coverageFieldsOf(coverage);
49277
49375
  const disclosure = sanitizationDisclosureOf(sanitization, input.prDiff);
49278
49376
  warnIfDiffTruncated(input.prDiff, prNumber, logger57);
49279
49377
  const record = persistPrReviewRecord({
@@ -49282,6 +49380,7 @@ function buildAndPersist(prNumber, baseSha, args) {
49282
49380
  reviewedDiffHash,
49283
49381
  diffProvenance: diffProvenanceOf(diffSource, input.prDiff),
49284
49382
  ...disclosure !== void 0 ? { sanitization: disclosure } : {},
49383
+ ...coverageFields ?? {},
49285
49384
  verdict: aggregate.decision,
49286
49385
  verified: aggregate.verified,
49287
49386
  voteCounts: {
@@ -57042,4 +57141,4 @@ export {
57042
57141
  startPipelineEventBridge,
57043
57142
  shutdownPipelineEventBridge
57044
57143
  };
57045
- //# sourceMappingURL=chunk-NIAQBK7X.js.map
57144
+ //# sourceMappingURL=chunk-LAUGODMA.js.map