nexus-agents 14.0.3 → 14.0.5

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.
@@ -62,7 +62,7 @@ import {
62
62
  updateStage,
63
63
  withFileLock,
64
64
  writeJobCancelled
65
- } from "./chunk-KVLHGDAF.js";
65
+ } from "./chunk-SC4SASR6.js";
66
66
  import {
67
67
  allOf,
68
68
  anyOf
@@ -85,7 +85,7 @@ import {
85
85
  } from "./chunk-RYDTFPVI.js";
86
86
  import {
87
87
  withPrerequisite
88
- } from "./chunk-PNAYEZVT.js";
88
+ } from "./chunk-L47BXEBG.js";
89
89
  import {
90
90
  NOOP_NOTIFIER,
91
91
  RateLimiter,
@@ -118,7 +118,7 @@ import {
118
118
  toolSuccess,
119
119
  withProgressHeartbeat,
120
120
  wrapToolWithTimeout
121
- } from "./chunk-7TYSIQYE.js";
121
+ } from "./chunk-7N4X6FI7.js";
122
122
  import {
123
123
  generateSecurityPlan
124
124
  } from "./chunk-KMGKOF5P.js";
@@ -28403,10 +28403,10 @@ function calculateDifferenceCI(p1, p2, total1, total2, confidence) {
28403
28403
  const difference = p1 - p2;
28404
28404
  const measured = total1 > 0 && total2 > 0;
28405
28405
  const seDiff = Math.sqrt(p1 * (1 - p1) / (total1 || 1) + p2 * (1 - p2) / (total2 || 1));
28406
- const z134 = getZScore(confidence);
28406
+ const z135 = getZScore(confidence);
28407
28407
  return {
28408
- lower: difference - z134 * seDiff,
28409
- upper: difference + z134 * seDiff,
28408
+ lower: difference - z135 * seDiff,
28409
+ upper: difference + z135 * seDiff,
28410
28410
  estimate: difference,
28411
28411
  confidence,
28412
28412
  n: total1 + total2,
@@ -28434,11 +28434,11 @@ function proportionConfidenceInterval(successes, total, options = {}) {
28434
28434
  measured: false
28435
28435
  };
28436
28436
  }
28437
- const z134 = getZScore(opts.confidence);
28438
- const z210 = z134 * z134;
28437
+ const z135 = getZScore(opts.confidence);
28438
+ const z210 = z135 * z135;
28439
28439
  const denominator = 1 + z210 / n;
28440
28440
  const center = (p + z210 / (2 * n)) / denominator;
28441
- const margin = z134 / denominator * Math.sqrt(p * (1 - p) / n + z210 / (4 * n * n));
28441
+ const margin = z135 / denominator * Math.sqrt(p * (1 - p) / n + z210 / (4 * n * n));
28442
28442
  const lower = Math.max(0, center - margin);
28443
28443
  const upper = Math.min(1, center + margin);
28444
28444
  const standardError = Math.sqrt(p * (1 - p) / n);
@@ -28476,8 +28476,8 @@ function meanConfidenceInterval(values, options = {}) {
28476
28476
  const variance = values.reduce((sum, v) => sum + (v - mean) ** 2, 0) / (n - 1 || 1);
28477
28477
  const stdDev = Math.sqrt(variance);
28478
28478
  const standardError = stdDev / Math.sqrt(n);
28479
- const z134 = getZScore(opts.confidence);
28480
- const margin = z134 * standardError;
28479
+ const z135 = getZScore(opts.confidence);
28480
+ const margin = z135 * standardError;
28481
28481
  return {
28482
28482
  lower: mean - margin,
28483
28483
  upper: mean + margin,
@@ -50459,7 +50459,7 @@ function buildVotingInput(plan, config) {
50459
50459
  }
50460
50460
  async function executeSingleVote(plan, config, log) {
50461
50461
  try {
50462
- const { executeVoting } = await import("./consensus-vote-M3V3WSW4.js");
50462
+ const { executeVoting } = await import("./consensus-vote-AYC2GYSB.js");
50463
50463
  const input = buildVotingInput(plan, config);
50464
50464
  const result = await executeVoting(input, log);
50465
50465
  return parseVotingResult(result);
@@ -52234,7 +52234,7 @@ function sanitizationNote(sanitizeResult, removedBefore) {
52234
52234
  }
52235
52235
  return parts.join("");
52236
52236
  }
52237
- function buildPrReviewProposal(input, removedBefore = {
52237
+ function buildPrReviewProposalResult(input, removedBefore = {
52238
52238
  comments: 0,
52239
52239
  fields: 0,
52240
52240
  tags: 0
@@ -52293,7 +52293,26 @@ ${safe.prDiff}
52293
52293
  parts.push(`
52294
52294
  ${FINDINGS_FORMAT_INSTRUCTIONS}
52295
52295
  `);
52296
- return parts.join("");
52296
+ return {
52297
+ proposal: parts.join(""),
52298
+ builderSanitization: copyBuilderFacts(sanitizeResult)
52299
+ };
52300
+ }
52301
+ function copyBuilderFacts(facts) {
52302
+ return Object.freeze({
52303
+ commentsRemoved: facts.commentsRemoved,
52304
+ tagsRemoved: facts.tagsRemoved,
52305
+ modifiedCount: facts.modifiedCount,
52306
+ wasModified: facts.wasModified,
52307
+ sanitizationIncomplete: facts.sanitizationIncomplete
52308
+ });
52309
+ }
52310
+ function buildPrReviewProposal(input, removedBefore = {
52311
+ comments: 0,
52312
+ fields: 0,
52313
+ tags: 0
52314
+ }) {
52315
+ return buildPrReviewProposalResult(input, removedBefore).proposal;
52297
52316
  }
52298
52317
 
52299
52318
  // src/pipeline/agent-executor-memory.ts
@@ -52935,7 +52954,7 @@ async function prepareCompletePlanVote(plan, research, config, signal) {
52935
52954
  return { proposal, roleAdapters: panel.seats };
52936
52955
  }
52937
52956
  async function executePlanVote(plan, research, config, strategy, signal) {
52938
- const { executeVoting } = await import("./consensus-vote-M3V3WSW4.js");
52957
+ const { executeVoting } = await import("./consensus-vote-AYC2GYSB.js");
52939
52958
  const { proposal, roleAdapters } = await prepareCompletePlanVote(plan, research, config, signal);
52940
52959
  const votingResult = await executeVoting(
52941
52960
  {
@@ -55694,10 +55713,42 @@ function createAuditStageRegistry() {
55694
55713
  }
55695
55714
 
55696
55715
  // src/mcp/tools/pr-review-tool.ts
55697
- import { z as z113 } from "zod";
55716
+ import { z as z114 } from "zod";
55698
55717
  import { randomUUID as randomUUID15 } from "node:crypto";
55699
55718
 
55700
55719
  // src/mcp/tools/pr-review-record-producer.ts
55720
+ import { z as z113 } from "zod";
55721
+ var LocalDiffReductionSchema = z113.object({
55722
+ prefixCodeUnits: z113.number().int().positive().max(Number.MAX_SAFE_INTEGER),
55723
+ totalCodeUnits: z113.number().int().positive().max(Number.MAX_SAFE_INTEGER),
55724
+ prefixUtf8Bytes: z113.number().int().positive().max(Number.MAX_SAFE_INTEGER),
55725
+ totalUtf8Bytes: z113.number().int().positive().max(Number.MAX_SAFE_INTEGER),
55726
+ marker: z113.string().min(1).max(64)
55727
+ }).strict();
55728
+ function localReductionStamp(args) {
55729
+ if (args.localDiffReduction === void 0) return "";
55730
+ const r = LocalDiffReductionSchema.parse(args.localDiffReduction);
55731
+ const diff = args.input.prDiff;
55732
+ if (args.diffSource !== "canonical-git" || args.sanitization !== void 0 || args.coverage !== void 0 || r.prefixCodeUnits >= r.totalCodeUnits || r.totalCodeUnits !== diff.length || r.totalUtf8Bytes !== Buffer.byteLength(diff) || r.prefixUtf8Bytes !== Buffer.byteLength(diff.slice(0, r.prefixCodeUnits))) {
55733
+ throw new Error("Invalid local pre-builder diff reduction measurements");
55734
+ }
55735
+ return ` [local pre-builder diff prefix ${String(r.prefixCodeUnits)}/${String(r.totalCodeUnits)} JS code units; UTF-8 ${String(r.prefixUtf8Bytes)}/${String(r.totalUtf8Bytes)} bytes; marker +${String(r.marker.length)} JS code units/+${String(Buffer.byteLength(r.marker))} bytes; additional inspection UNMEASURED]`;
55736
+ }
55737
+ var BuilderSanitizationFactsSchema = z113.object({
55738
+ commentsRemoved: z113.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
55739
+ tagsRemoved: z113.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
55740
+ modifiedCount: z113.number().int().min(0).max(4),
55741
+ wasModified: z113.boolean(),
55742
+ sanitizationIncomplete: z113.boolean()
55743
+ }).strict();
55744
+ function builderSanitizationStamp(args) {
55745
+ if (args.builderSanitization === void 0) return "";
55746
+ const f = BuilderSanitizationFactsSchema.parse(args.builderSanitization);
55747
+ if (args.diffSource !== "canonical-git" || args.sanitization !== void 0 || args.coverage !== void 0 || f.wasModified !== f.modifiedCount > 0 || (f.commentsRemoved > 0 || f.tagsRemoved > 0) && !f.wasModified) {
55748
+ throw new Error("Invalid builder-own sanitization facts");
55749
+ }
55750
+ return ` [builder sanitization: ${String(f.commentsRemoved)} comments, ${String(f.tagsRemoved)} tags, ${String(f.modifiedCount)} changed fields; modified=${String(f.wasModified)}; incomplete=${String(f.sanitizationIncomplete)}; scope=title/description/diff/context; additional inspection UNMEASURED]`;
55751
+ }
55701
55752
  function bytes(n) {
55702
55753
  return n.toLocaleString("en-US");
55703
55754
  }
@@ -55772,7 +55823,7 @@ function writeFailedOutcome() {
55772
55823
  function buildAndPersist(prNumber, baseSha, args) {
55773
55824
  const { input, aggregate, counts, reviewCount, logger: logger62, coverage, diffSource, sanitization } = args;
55774
55825
  const reviewedDiffHash = sanitization?.rawDiffHash ?? computeReviewedDiffHash(input.prDiff);
55775
- const stamps = coverageStamps(coverage);
55826
+ const stamps = localReductionStamp(args) + builderSanitizationStamp(args) + coverageStamps(coverage);
55776
55827
  const coverageFields = coverageFieldsOf(coverage);
55777
55828
  const disclosure = sanitizationDisclosureOf(sanitization, input.prDiff);
55778
55829
  warnIfDiffTruncated(resolveBindingMeasurement(input.prDiff, sanitization), prNumber, logger62);
@@ -55884,19 +55935,19 @@ var MAX_REPO_CONTEXT_LENGTH = 2e3;
55884
55935
  var MAX_TITLE_LENGTH = 500;
55885
55936
  var MAX_DESCRIPTION_LENGTH = 1e4;
55886
55937
  var PR_REVIEW_ASYNC_HINT = "A pr_review run fans out to 5 live LLM voters and can exceed the synchronous MCP request timeout. Retry with `dispatch: 'async'` to get a jobId immediately, then poll get_job_result({ jobId }) for the result.";
55887
- var PrReviewInputSchema = z113.object({
55888
- prTitle: z113.string().min(1).max(MAX_TITLE_LENGTH).describe("PR title"),
55889
- prDescription: z113.string().max(MAX_DESCRIPTION_LENGTH).optional().describe("PR body / description"),
55890
- prDiff: z113.string().min(1).max(MAX_DIFF_INPUT_LENGTH).refine(looksLikeUnifiedDiff, {
55938
+ var PrReviewInputSchema = z114.object({
55939
+ prTitle: z114.string().min(1).max(MAX_TITLE_LENGTH).describe("PR title"),
55940
+ prDescription: z114.string().max(MAX_DESCRIPTION_LENGTH).optional().describe("PR body / description"),
55941
+ prDiff: z114.string().min(1).max(MAX_DIFF_INPUT_LENGTH).refine(looksLikeUnifiedDiff, {
55891
55942
  message: "prDiff must be a unified diff (expected a `diff --git`, `---`/`+++`, or `@@ \u2026 @@` line). Prose descriptions of a change are rejected: a review of a summary is not a review of the code, and would be recorded as though it were (#4451)."
55892
55943
  }).describe(
55893
55944
  `Unified diff text (max ${String(MAX_DIFF_INPUT_LENGTH)} chars). REQUIRED SHAPE (#4451): must contain a \`diff --git\` header, an \`@@ \u2026 @@\` hunk header backed by +/- lines, or a \`---\`/\`+++\` header pair \u2014 a prose summary of the change is REJECTED, because reviewing a summary is not reviewing the code and would be recorded as though it were. (Stated here because Zod refinements do not survive JSON-schema generation, so this constraint is otherwise invisible to clients.) No need to truncate before calling: the panel reads the whole diff whenever it fits the voters' context windows (#6003); a diff larger than that is security-prioritized and PARTIALLY reviewed (lowest-priority whole files dropped; a partial panel read can block but never verified-approve). Separately, the audit record's hash binds only the first ${String(MAX_DIFF_LENGTH)} UTF-8 bytes; the response \`coverage\` and the record summary state both what the panel read and what the hash binds.`
55894
55945
  ),
55895
- repoContext: z113.string().max(MAX_REPO_CONTEXT_LENGTH).optional().describe(
55946
+ repoContext: z114.string().max(MAX_REPO_CONTEXT_LENGTH).optional().describe(
55896
55947
  `Optional one-paragraph repo context (architecture, conventions; max ${String(MAX_REPO_CONTEXT_LENGTH)} chars; trim before calling)`
55897
55948
  ),
55898
- baseRef: z113.string().max(200).optional().describe("Base branch ref (e.g. main)"),
55899
- headRef: z113.string().max(200).optional().describe("Head branch ref"),
55949
+ baseRef: z114.string().max(200).optional().describe("Base branch ref (e.g. main)"),
55950
+ headRef: z114.string().max(200).optional().describe("Head branch ref"),
55900
55951
  /**
55901
55952
  * Option-C audit binding (#4031). When BOTH `prNumber` and `baseSha` are
55902
55953
  * supplied AND the review is live (not simulated), pr_review persists an
@@ -55912,14 +55963,14 @@ var PrReviewInputSchema = z113.object({
55912
55963
  * the PR opened and drifts as main advances), so pass the merge-base as
55913
55964
  * `baseSha` or the record will not match on an aged branch (#5692).
55914
55965
  */
55915
- prNumber: z113.number().int().positive().max(1e6).optional().describe("PR number \u2014 with baseSha, enables Option-C audit-record persistence (#4031)"),
55916
- baseSha: z113.string().regex(/^[0-9a-f]{40}$/, "baseSha must be a 40-char lowercase hex commit sha").optional().describe(
55966
+ prNumber: z114.number().int().positive().max(1e6).optional().describe("PR number \u2014 with baseSha, enables Option-C audit-record persistence (#4031)"),
55967
+ baseSha: z114.string().regex(/^[0-9a-f]{40}$/, "baseSha must be a 40-char lowercase hex commit sha").optional().describe(
55917
55968
  "40-hex base commit sha the reviewed diff was computed from \u2014 pass `git merge-base origin/<base> <head>`, the base the gate recomputes (Option-C binding, #4031, #5692)"
55918
55969
  ),
55919
- repoPath: z113.string().max(1024).optional().describe(
55970
+ repoPath: z114.string().max(1024).optional().describe(
55920
55971
  "Repo root path for persisting the governance pr-review record (overrides cwd auto-detection). Must contain a .git ancestor \u2014 relative paths are resolved against cwd; ignored (falls back to cwd auto-detection) if it is not a real repo root. Env NEXUS_PR_REVIEW_RECORDS_PATH still takes precedence and is unrestricted."
55921
55972
  ),
55922
- simulate: z113.boolean().default(false).describe("Use simulated voters (testing only; never ship live with this true)"),
55973
+ simulate: z114.boolean().default(false).describe("Use simulated voters (testing only; never ship live with this true)"),
55923
55974
  /**
55924
55975
  * Error policy (#4132). `standard` (default) excludes absent voters but
55925
55976
  * requires a majority of the requested panel to approve. `absolute_quorum` gates
@@ -55931,7 +55982,7 @@ var PrReviewInputSchema = z113.object({
55931
55982
  * verified approve. A genuine `request_changes` blocker still wins (Tiers 1-2
55932
55983
  * run first).
55933
55984
  */
55934
- errorPolicy: z113.enum(["standard", "absolute_quorum"]).default("standard").describe(
55985
+ errorPolicy: z114.enum(["standard", "absolute_quorum"]).default("standard").describe(
55935
55986
  "Error policy (#4132). 'standard' (default): absent voters excluded; approval requires a majority of the requested panel. 'absolute_quorum': any errored voter \u2014 esp. the contrarian \u2014 degrades a would-be approve to a recoverable abstain (verified:false); never manufactures a verified approve from an induced error."
55936
55987
  ),
55937
55988
  // #6123: same field as consensus_vote — the panel judges the caller's project.
@@ -56287,27 +56338,27 @@ function absoluteQuorumApprove(reviews, valid) {
56287
56338
  }
56288
56339
 
56289
56340
  // src/mcp/tools/survey-oss-landscape.ts
56290
- import { z as z114 } from "zod";
56291
- var SurveyOssLandscapeInputSchema = z114.object({
56292
- query: z114.string().min(1).max(200).describe('Free-text search query, e.g. "cargo nextest replacement" or "OSS SBOM tools"'),
56293
- maxResults: z114.number().int().min(1).max(50).optional().default(10).describe("Maximum candidates to return (1-50; default 10)"),
56294
- minStars: z114.number().int().min(0).max(1e6).optional().default(0).describe("Minimum star count to include (default 0; useful for filtering noise)"),
56295
- language: z114.string().max(50).optional().describe('GitHub language filter, e.g. "rust" or "typescript"')
56296
- });
56297
- var GitHubRepoSchema = z114.object({
56298
- full_name: z114.string().optional(),
56299
- html_url: z114.string().optional(),
56300
- description: z114.string().nullable().optional(),
56301
- stargazers_count: z114.number().optional(),
56302
- pushed_at: z114.string().nullable().optional(),
56303
- language: z114.string().nullable().optional(),
56304
- license: z114.object({
56305
- spdx_id: z114.string().nullable().optional()
56341
+ import { z as z115 } from "zod";
56342
+ var SurveyOssLandscapeInputSchema = z115.object({
56343
+ query: z115.string().min(1).max(200).describe('Free-text search query, e.g. "cargo nextest replacement" or "OSS SBOM tools"'),
56344
+ maxResults: z115.number().int().min(1).max(50).optional().default(10).describe("Maximum candidates to return (1-50; default 10)"),
56345
+ minStars: z115.number().int().min(0).max(1e6).optional().default(0).describe("Minimum star count to include (default 0; useful for filtering noise)"),
56346
+ language: z115.string().max(50).optional().describe('GitHub language filter, e.g. "rust" or "typescript"')
56347
+ });
56348
+ var GitHubRepoSchema = z115.object({
56349
+ full_name: z115.string().optional(),
56350
+ html_url: z115.string().optional(),
56351
+ description: z115.string().nullable().optional(),
56352
+ stargazers_count: z115.number().optional(),
56353
+ pushed_at: z115.string().nullable().optional(),
56354
+ language: z115.string().nullable().optional(),
56355
+ license: z115.object({
56356
+ spdx_id: z115.string().nullable().optional()
56306
56357
  }).nullable().optional()
56307
56358
  });
56308
- var GitHubSearchResponseSchema = z114.object({
56309
- total_count: z114.number().optional(),
56310
- items: z114.array(GitHubRepoSchema).optional()
56359
+ var GitHubSearchResponseSchema = z115.object({
56360
+ total_count: z115.number().optional(),
56361
+ items: z115.array(GitHubRepoSchema).optional()
56311
56362
  });
56312
56363
  var GITHUB_SEARCH_BASE = "https://api.github.com/search/repositories";
56313
56364
  function buildGithubQuery(input) {
@@ -56429,16 +56480,16 @@ function createSurveyHandler(deps) {
56429
56480
  });
56430
56481
  return withToolError("Survey failed", logger62, async () => {
56431
56482
  const result = await executeSurvey(validation.data, logger62);
56432
- return structuredToolSuccess(z114.object(SURVEY_OUTPUT_SCHEMA), result);
56483
+ return structuredToolSuccess(z115.object(SURVEY_OUTPUT_SCHEMA), result);
56433
56484
  });
56434
56485
  };
56435
56486
  }
56436
56487
  var SURVEY_OUTPUT_SCHEMA = {
56437
- query: z114.string(),
56438
- totalFound: z114.number(),
56439
- candidates: z114.array(z114.unknown()),
56440
- sourcesQueried: z114.array(z114.string()),
56441
- sourcesFailed: z114.array(z114.string())
56488
+ query: z115.string(),
56489
+ totalFound: z115.number(),
56490
+ candidates: z115.array(z115.unknown()),
56491
+ sourcesQueried: z115.array(z115.string()),
56492
+ sourcesFailed: z115.array(z115.string())
56442
56493
  };
56443
56494
  var SURVEY_DESCRIPTION = 'Transient OSS project search. Returns a ranked list of GitHub repositories with license, last-commit, star-count, and one-line description. Does NOT persist to the research registry \u2014 use `research_add_source` for that. Best for one-off engineering decisions like "what tools exist in this space?".';
56444
56495
  function registerSurveyOssLandscapeTool(server, deps) {
@@ -56469,7 +56520,7 @@ function registerSurveyOssLandscapeTool(server, deps) {
56469
56520
  }
56470
56521
 
56471
56522
  // src/mcp/tools/vendor-publishing-audit.ts
56472
- import { z as z115 } from "zod";
56523
+ import { z as z116 } from "zod";
56473
56524
 
56474
56525
  // src/mcp/tools/vendor-publishing-seed.ts
56475
56526
  var VENDOR_PUBLISHING_SEED = {
@@ -56542,8 +56593,8 @@ function listKnownVendors() {
56542
56593
  }
56543
56594
 
56544
56595
  // src/mcp/tools/vendor-publishing-audit.ts
56545
- var VendorPublishingAuditInputSchema = z115.object({
56546
- vendor: z115.string().min(1).max(50).toLowerCase().describe('Vendor identifier, lowercase. e.g. "ubuntu", "debian", "fedora"')
56596
+ var VendorPublishingAuditInputSchema = z116.object({
56597
+ vendor: z116.string().min(1).max(50).toLowerCase().describe('Vendor identifier, lowercase. e.g. "ubuntu", "debian", "fedora"')
56547
56598
  });
56548
56599
  function lookupVendor(vendor) {
56549
56600
  if (isKnownVendor(vendor)) {
@@ -56571,26 +56622,26 @@ function createVendorPublishingAuditHandler(deps) {
56571
56622
  return withToolError("Vendor publishing audit failed", logger62, () => {
56572
56623
  const result = lookupVendor(validation.data.vendor);
56573
56624
  return Promise.resolve(
56574
- structuredToolSuccess(z115.object(VENDOR_PUBLISHING_OUTPUT_SCHEMA), result)
56625
+ structuredToolSuccess(z116.object(VENDOR_PUBLISHING_OUTPUT_SCHEMA), result)
56575
56626
  );
56576
56627
  });
56577
56628
  };
56578
56629
  }
56579
56630
  var VENDOR_PUBLISHING_OUTPUT_SCHEMA = {
56580
- vendor: z115.string(),
56581
- known: z115.boolean(),
56631
+ vendor: z116.string(),
56632
+ known: z116.boolean(),
56582
56633
  // Fields below populate when known=true; permissive optional for known=false.
56583
- sha256SumsUrlPattern: z115.string().optional(),
56584
- sha256SumsSignatureUrlPattern: z115.string().optional(),
56585
- signaturePattern: z115.string().optional(),
56586
- gpgKeys: z115.array(z115.unknown()).optional(),
56587
- releaseCadence: z115.string().optional(),
56588
- keyRotationNotes: z115.string().optional(),
56589
- vendorDocUrl: z115.string().optional(),
56590
- citedAt: z115.string().optional(),
56634
+ sha256SumsUrlPattern: z116.string().optional(),
56635
+ sha256SumsSignatureUrlPattern: z116.string().optional(),
56636
+ signaturePattern: z116.string().optional(),
56637
+ gpgKeys: z116.array(z116.unknown()).optional(),
56638
+ releaseCadence: z116.string().optional(),
56639
+ keyRotationNotes: z116.string().optional(),
56640
+ vendorDocUrl: z116.string().optional(),
56641
+ citedAt: z116.string().optional(),
56591
56642
  // Fields below populate when known=false.
56592
- message: z115.string().optional(),
56593
- knownVendors: z115.array(z115.string()).optional()
56643
+ message: z116.string().optional(),
56644
+ knownVendors: z116.array(z116.string()).optional()
56594
56645
  };
56595
56646
  var VENDOR_PUBLISHING_DESCRIPTION = "Look up a vendor's published-artifact signing infrastructure: GPG key fingerprints, SHA256SUMS URL pattern, signature shape (clearsigned / detached / detached-on-iso), release cadence, key rotation notes, and the vendor doc citation. Static lookup against a curated seed dataset; the vendor doc URL is the authoritative source. Returns `{known: false, knownVendors: [...]}` for vendors without a seed entry. v1 covers ubuntu, debian, fedora.";
56596
56647
  function registerVendorPublishingAuditTool(server, deps) {
@@ -56620,17 +56671,17 @@ function registerVendorPublishingAuditTool(server, deps) {
56620
56671
  }
56621
56672
 
56622
56673
  // src/mcp/tools/compare-data-feeds.ts
56623
- import { z as z116 } from "zod";
56674
+ import { z as z117 } from "zod";
56624
56675
  import * as path6 from "node:path";
56625
56676
  import * as fs7 from "node:fs";
56626
56677
  import * as yaml4 from "yaml";
56627
- var CompareDataFeedsInputSchema = z116.object({
56628
- feedAPath: z116.string().min(1).max(1e3).describe("Filesystem path to feed A (YAML or JSON, auto-detected by extension)"),
56629
- feedBPath: z116.string().min(1).max(1e3).describe("Filesystem path to feed B"),
56630
- keyPath: z116.string().min(1).max(200).describe(
56678
+ var CompareDataFeedsInputSchema = z117.object({
56679
+ feedAPath: z117.string().min(1).max(1e3).describe("Filesystem path to feed A (YAML or JSON, auto-detected by extension)"),
56680
+ feedBPath: z117.string().min(1).max(1e3).describe("Filesystem path to feed B"),
56681
+ keyPath: z117.string().min(1).max(200).describe(
56631
56682
  'Dotted path to the entry key, e.g. "id" or "name". Each entry must have this field.'
56632
56683
  ),
56633
- compareFields: z116.array(z116.string().min(1).max(200)).max(20).optional().describe(
56684
+ compareFields: z117.array(z117.string().min(1).max(200)).max(20).optional().describe(
56634
56685
  'Optional dotted field paths to compare across matched entries (e.g. ["license", "sha256"])'
56635
56686
  )
56636
56687
  });
@@ -56808,29 +56859,29 @@ function createCompareDataFeedsHandler(deps) {
56808
56859
  });
56809
56860
  return withToolError("Compare data feeds failed", logger62, () => {
56810
56861
  const result = executeCompare(validation.data);
56811
- return Promise.resolve(structuredToolSuccess(z116.object(COMPARE_OUTPUT_SCHEMA), result));
56862
+ return Promise.resolve(structuredToolSuccess(z117.object(COMPARE_OUTPUT_SCHEMA), result));
56812
56863
  });
56813
56864
  };
56814
56865
  }
56815
56866
  var COMPARE_OUTPUT_SCHEMA = {
56816
- feedAPath: z116.string(),
56817
- feedBPath: z116.string(),
56818
- keyPath: z116.string(),
56819
- counts: z116.object({
56820
- entriesInA: z116.number(),
56821
- entriesInB: z116.number(),
56822
- onlyInA: z116.number(),
56823
- onlyInB: z116.number(),
56824
- inBoth: z116.number(),
56825
- fieldDifferences: z116.number()
56867
+ feedAPath: z117.string(),
56868
+ feedBPath: z117.string(),
56869
+ keyPath: z117.string(),
56870
+ counts: z117.object({
56871
+ entriesInA: z117.number(),
56872
+ entriesInB: z117.number(),
56873
+ onlyInA: z117.number(),
56874
+ onlyInB: z117.number(),
56875
+ inBoth: z117.number(),
56876
+ fieldDifferences: z117.number()
56826
56877
  }),
56827
- coverage: z116.object({
56828
- onlyInA: z116.array(z116.string()),
56829
- onlyInB: z116.array(z116.string()),
56830
- inBoth: z116.array(z116.string())
56878
+ coverage: z117.object({
56879
+ onlyInA: z117.array(z117.string()),
56880
+ onlyInB: z117.array(z117.string()),
56881
+ inBoth: z117.array(z117.string())
56831
56882
  }),
56832
- fieldDifferences: z116.array(z116.unknown()),
56833
- summary: z116.string()
56883
+ fieldDifferences: z117.array(z117.unknown()),
56884
+ summary: z117.string()
56834
56885
  };
56835
56886
  var COMPARE_DESCRIPTION = "Diff two upstream data feeds (YAML or JSON files) along coverage and per-field axes. Returns which entries exist in A, B, both, plus optional field-level diffs across matched entries. v1 takes file paths only (no URL fetch \u2014 that needs an SSRF design pass). Both feeds must be a top-level array OR a top-level object with exactly one array field.";
56836
56887
  function registerCompareDataFeedsTool(server, deps) {
@@ -56861,9 +56912,9 @@ function registerCompareDataFeedsTool(server, deps) {
56861
56912
  }
56862
56913
 
56863
56914
  // src/mcp/tools/query-task-state-tool.ts
56864
- import { z as z117 } from "zod";
56865
- var QueryTaskStateInputSchema = z117.object({
56866
- taskId: z117.string().min(1).max(128).describe("Task ID whose structured state log should be read")
56915
+ import { z as z118 } from "zod";
56916
+ var QueryTaskStateInputSchema = z118.object({
56917
+ taskId: z118.string().min(1).max(128).describe("Task ID whose structured state log should be read")
56867
56918
  });
56868
56919
  function queryTaskStateHandler(args, ctx) {
56869
56920
  const parsed = QueryTaskStateInputSchema.safeParse(args);
@@ -56898,7 +56949,7 @@ function queryTaskStateHandler(args, ctx) {
56898
56949
  function registerQueryTaskStateTool(server, deps) {
56899
56950
  const logger62 = deps.logger ?? createLogger({ tool: "query_task_state" });
56900
56951
  const toolSchema = {
56901
- taskId: z117.string().min(1).max(128).describe("Task ID whose structured state log should be read")
56952
+ taskId: z118.string().min(1).max(128).describe("Task ID whose structured state log should be read")
56902
56953
  };
56903
56954
  const description = "Read the structured state log for a task ID and return the current snapshot. Includes Magentic-One Task Ledger (facts/guesses/openQuestions) and Progress Ledger (per-step reflections with suggestedAction) when orchestrators have written them. Structured state is only written when NEXUS_TASK_STATE_ENABLED=1 was set during the orchestrate invocation.";
56904
56955
  const secureHandler = createSecureHandler(queryTaskStateHandler, {
@@ -56920,28 +56971,28 @@ function registerQueryTaskStateTool(server, deps) {
56920
56971
  }
56921
56972
 
56922
56973
  // src/mcp/tools/ci-health-check-tool.ts
56923
- import { z as z120 } from "zod";
56974
+ import { z as z121 } from "zod";
56924
56975
 
56925
56976
  // src/mcp/tools/ci-health-log.ts
56926
56977
  import { appendFileSync as appendFileSync5, existsSync as existsSync17, readFileSync as readFileSync14, statSync as statSync5, writeFileSync as writeFileSync3 } from "node:fs";
56927
- import { z as z119 } from "zod";
56978
+ import { z as z120 } from "zod";
56928
56979
 
56929
56980
  // src/mcp/tools/ci-health-types.ts
56930
- import { z as z118 } from "zod";
56931
- var CiHealthStatusSchema = z118.enum(["healthy", "degraded", "outage", "unknown"]);
56981
+ import { z as z119 } from "zod";
56982
+ var CiHealthStatusSchema = z119.enum(["healthy", "degraded", "outage", "unknown"]);
56932
56983
 
56933
56984
  // src/mcp/tools/ci-health-log.ts
56934
56985
  var logger56 = createLogger({ component: "ci-health-log" });
56935
- var CiHealthEventSchema = z119.object({
56936
- v: z119.literal(1),
56937
- ts: z119.iso.datetime(),
56986
+ var CiHealthEventSchema = z120.object({
56987
+ v: z120.literal(1),
56988
+ ts: z120.iso.datetime(),
56938
56989
  status: CiHealthStatusSchema,
56939
- repo: z119.string().optional(),
56940
- signals: z119.array(
56941
- z119.object({
56942
- source: z119.enum(["github-status", "repo-activity-window"]),
56990
+ repo: z120.string().optional(),
56991
+ signals: z120.array(
56992
+ z120.object({
56993
+ source: z120.enum(["github-status", "repo-activity-window"]),
56943
56994
  status: CiHealthStatusSchema,
56944
- evidence: z119.string()
56995
+ evidence: z120.string()
56945
56996
  })
56946
56997
  )
56947
56998
  });
@@ -57021,17 +57072,17 @@ function eventFromCheck(params) {
57021
57072
  }
57022
57073
 
57023
57074
  // src/mcp/tools/ci-health-check-tool.ts
57024
- var CiHealthCheckInputSchema = z120.object({
57075
+ var CiHealthCheckInputSchema = z121.object({
57025
57076
  /**
57026
57077
  * Repo to check for the recent-runs activity signal (in `owner/repo` form).
57027
57078
  * Optional — when omitted, only the status-page signal is consulted.
57028
57079
  */
57029
- repo: z120.string().regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/, "Must be owner/repo form").optional().describe("GitHub repo (owner/repo) to check for recent CI activity. Optional."),
57080
+ repo: z121.string().regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/, "Must be owner/repo form").optional().describe("GitHub repo (owner/repo) to check for recent CI activity. Optional."),
57030
57081
  /**
57031
57082
  * How far back to look for recent-runs activity (minutes). Default 30 —
57032
57083
  * matches the typical wedge-detection window from the #3070 / #3076 outages.
57033
57084
  */
57034
- activityWindowMinutes: z120.number().int().min(5).max(180).default(30).describe("Recent-runs lookback window in minutes (5-180; default 30).")
57085
+ activityWindowMinutes: z121.number().int().min(5).max(180).default(30).describe("Recent-runs lookback window in minutes (5-180; default 30).")
57035
57086
  });
57036
57087
  var STATUS_PAGE_URL = "https://www.githubstatus.com/api/v2/components.json";
57037
57088
  function mapStatusPageStatus(raw) {
@@ -57190,8 +57241,8 @@ var DESCRIPTION = "Check CI infrastructure health before triggering / polling ru
57190
57241
  function registerCiHealthCheckTool(server, deps) {
57191
57242
  const logger62 = deps.logger ?? createLogger({ tool: "ci_health_check" });
57192
57243
  const toolSchema = {
57193
- repo: z120.string().regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/, "Must be owner/repo form").optional().describe("GitHub repo (owner/repo) to check for recent CI activity. Optional."),
57194
- activityWindowMinutes: z120.number().int().min(5).max(180).optional().describe("Recent-runs lookback window in minutes (5-180; default 30).")
57244
+ repo: z121.string().regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/, "Must be owner/repo form").optional().describe("GitHub repo (owner/repo) to check for recent CI activity. Optional."),
57245
+ activityWindowMinutes: z121.number().int().min(5).max(180).optional().describe("Recent-runs lookback window in minutes (5-180; default 30).")
57195
57246
  };
57196
57247
  const secureHandler = createSecureHandler((args) => ciHealthCheckHandler(args, logger62), {
57197
57248
  toolName: "ci_health_check",
@@ -57218,18 +57269,18 @@ function registerCiHealthCheckTool(server, deps) {
57218
57269
 
57219
57270
  // src/mcp/tools/quality-gate-tool.ts
57220
57271
  import { statSync as statSync6 } from "node:fs";
57221
- import { z as z121 } from "zod";
57222
- var QualityCheckSchema = z121.enum(["typecheck", "lint", "tests", "build", "security"]);
57272
+ import { z as z122 } from "zod";
57273
+ var QualityCheckSchema = z122.enum(["typecheck", "lint", "tests", "build", "security"]);
57223
57274
  var DEFAULT_CHECKS = ["typecheck", "lint", "tests"];
57224
- var RunQualityGateInputSchema = z121.object({
57275
+ var RunQualityGateInputSchema = z122.object({
57225
57276
  /** Project directory to run checks against. Must resolve inside the repo/cwd root. */
57226
- projectDir: z121.string().max(500).optional().describe(
57277
+ projectDir: z122.string().max(500).optional().describe(
57227
57278
  "Project directory to run checks against (default: cwd). Must stay inside the repo root."
57228
57279
  ),
57229
57280
  /** Which allowlisted checks to run. */
57230
- checks: z121.array(QualityCheckSchema).nonempty().default([...DEFAULT_CHECKS]).describe("Allowlisted checks to run (default: ['typecheck','lint','tests'])."),
57281
+ checks: z122.array(QualityCheckSchema).nonempty().default([...DEFAULT_CHECKS]).describe("Allowlisted checks to run (default: ['typecheck','lint','tests'])."),
57231
57282
  /** 1-based iteration counter, forwarded to the engine for feedback context. */
57232
- iteration: z121.number().int().min(1).max(100).default(1).describe("1-based iteration number (default 1).")
57283
+ iteration: z122.number().int().min(1).max(100).default(1).describe("1-based iteration number (default 1).")
57233
57284
  });
57234
57285
  function validateProjectDir(raw) {
57235
57286
  const candidate = raw ?? process.cwd();
@@ -57304,11 +57355,11 @@ var DESCRIPTION2 = "Run the QA quality gate (#1684 engine) against a project dir
57304
57355
  function registerRunQualityGateTool(server, deps) {
57305
57356
  const logger62 = deps.logger ?? createLogger({ tool: "run_quality_gate" });
57306
57357
  const toolSchema = {
57307
- projectDir: z121.string().max(500).optional().describe(
57358
+ projectDir: z122.string().max(500).optional().describe(
57308
57359
  "Project directory to run checks against (default: cwd). Must stay inside the repo root."
57309
57360
  ),
57310
- checks: z121.array(QualityCheckSchema).nonempty().optional().describe("Allowlisted checks to run (default: ['typecheck','lint','tests'])."),
57311
- iteration: z121.number().int().min(1).max(100).optional().describe("1-based iteration number (default 1).")
57361
+ checks: z122.array(QualityCheckSchema).nonempty().optional().describe("Allowlisted checks to run (default: ['typecheck','lint','tests'])."),
57362
+ iteration: z122.number().int().min(1).max(100).optional().describe("1-based iteration number (default 1).")
57312
57363
  };
57313
57364
  const secureHandler = createSecureHandler(
57314
57365
  (args) => runQualityGateHandler(args, logger62),
@@ -57338,7 +57389,7 @@ function registerRunQualityGateTool(server, deps) {
57338
57389
  // src/mcp/tools/verify-audit-chain-tool.ts
57339
57390
  import * as fs8 from "node:fs/promises";
57340
57391
  import * as path7 from "node:path";
57341
- import { z as z122 } from "zod";
57392
+ import { z as z123 } from "zod";
57342
57393
 
57343
57394
  // src/cli-server-auth.ts
57344
57395
  function resolveAuthEnabled(config) {
@@ -57512,11 +57563,11 @@ function logSecurityConfig(logger62, config) {
57512
57563
  }
57513
57564
 
57514
57565
  // src/mcp/tools/verify-audit-chain-tool.ts
57515
- var VerifyAuditChainInputSchema = z122.object({
57516
- logDir: z122.string().min(1).max(512).describe(
57566
+ var VerifyAuditChainInputSchema = z123.object({
57567
+ logDir: z123.string().min(1).max(512).describe(
57517
57568
  "Filesystem path to the FileAuditStorage log directory. Must lie inside the nexus data dir, a repo-local `.nexus-agents/`, or the configured `security.audit.logDir`. Tool reads all `audit-*.jsonl` files in lexicographic order and verifies the combined chain."
57518
57569
  ),
57519
- filePrefix: z122.string().min(1).max(64).optional().default(DEFAULT_AUDIT_FILE_PREFIX).describe(
57570
+ filePrefix: z123.string().min(1).max(64).optional().default(DEFAULT_AUDIT_FILE_PREFIX).describe(
57520
57571
  'Filename prefix for audit log files (defaults to "audit"). Files matching `${filePrefix}-*.jsonl` will be verified.'
57521
57572
  )
57522
57573
  });
@@ -57645,10 +57696,10 @@ async function handler2(args, ctx, security) {
57645
57696
  function registerVerifyAuditChainTool(server, deps) {
57646
57697
  const logger62 = deps.logger ?? createLogger({ tool: "verify_audit_chain" });
57647
57698
  const toolSchema = {
57648
- logDir: z122.string().min(1).max(512).describe(
57699
+ logDir: z123.string().min(1).max(512).describe(
57649
57700
  "Filesystem path to the FileAuditStorage log directory. Must lie inside the nexus data dir, a repo-local `.nexus-agents/`, or the configured `security.audit.logDir`. Tool reads all `audit-*.jsonl` files and verifies the combined hash chain."
57650
57701
  ),
57651
- filePrefix: z122.string().min(1).max(64).optional().describe(
57702
+ filePrefix: z123.string().min(1).max(64).optional().describe(
57652
57703
  'Filename prefix for audit log files (defaults to "audit"). Files matching `${filePrefix}-*.jsonl` will be verified.'
57653
57704
  )
57654
57705
  };
@@ -57672,7 +57723,7 @@ function registerVerifyAuditChainTool(server, deps) {
57672
57723
  }
57673
57724
 
57674
57725
  // src/mcp/tools/suggest-research-tasks-tool.ts
57675
- import { z as z123 } from "zod";
57726
+ import { z as z124 } from "zod";
57676
57727
  var SUGGEST_RESEARCH_TASKS_NOTE = "Suggestions derived from external research (untrusted); review before acting \u2014 nothing was executed or filed.";
57677
57728
  var RESEARCH_BUDGET_MS = 2e4;
57678
57729
  var RESEARCH_TIMED_OUT = /* @__PURE__ */ Symbol("research-budget-exceeded");
@@ -57689,11 +57740,11 @@ async function withResearchBudget(p, ms) {
57689
57740
  if (timer !== void 0) clearTimeout(timer);
57690
57741
  }
57691
57742
  }
57692
- var SuggestResearchTasksInputSchema = z123.object({
57693
- topic: z123.string().optional().describe("Topic filter passed to research_discover. Optional."),
57694
- qualityThreshold: z123.number().min(0).max(10).optional().describe("Minimum quality score (0-10) a discovery must meet to be suggested. Optional."),
57695
- maxTriggers: z123.number().int().min(1).max(50).optional().describe("Max number of candidate tasks to return (>=1). Optional."),
57696
- existingTaskIds: z123.array(z123.string()).optional().describe("Known task IDs to skip (dedup). Optional.")
57743
+ var SuggestResearchTasksInputSchema = z124.object({
57744
+ topic: z124.string().optional().describe("Topic filter passed to research_discover. Optional."),
57745
+ qualityThreshold: z124.number().min(0).max(10).optional().describe("Minimum quality score (0-10) a discovery must meet to be suggested. Optional."),
57746
+ maxTriggers: z124.number().int().min(1).max(50).optional().describe("Max number of candidate tasks to return (>=1). Optional."),
57747
+ existingTaskIds: z124.array(z124.string()).optional().describe("Known task IDs to skip (dedup). Optional.")
57697
57748
  });
57698
57749
  function toTriggerConfig(input) {
57699
57750
  return {
@@ -57750,10 +57801,10 @@ var DESCRIPTION3 = "SUGGEST-ONLY: surface candidate pipeline tasks for human/orc
57750
57801
  function registerSuggestResearchTasksTool(server, deps) {
57751
57802
  const logger62 = deps.logger ?? createLogger({ tool: "suggest_research_tasks" });
57752
57803
  const toolSchema = {
57753
- topic: z123.string().optional().describe("Topic filter passed to research_discover. Optional."),
57754
- qualityThreshold: z123.number().min(0).max(10).optional().describe("Minimum quality score (0-10) a discovery must meet to be suggested. Optional."),
57755
- maxTriggers: z123.number().int().min(1).max(50).optional().describe("Max number of candidate tasks to return (>=1). Optional."),
57756
- existingTaskIds: z123.array(z123.string()).optional().describe("Known task IDs to skip (dedup). Optional.")
57804
+ topic: z124.string().optional().describe("Topic filter passed to research_discover. Optional."),
57805
+ qualityThreshold: z124.number().min(0).max(10).optional().describe("Minimum quality score (0-10) a discovery must meet to be suggested. Optional."),
57806
+ maxTriggers: z124.number().int().min(1).max(50).optional().describe("Max number of candidate tasks to return (>=1). Optional."),
57807
+ existingTaskIds: z124.array(z124.string()).optional().describe("Known task IDs to skip (dedup). Optional.")
57757
57808
  };
57758
57809
  const secureHandler = createSecureHandler(
57759
57810
  (args) => suggestResearchTasksHandler(args, logger62),
@@ -57781,7 +57832,7 @@ function registerSuggestResearchTasksTool(server, deps) {
57781
57832
  }
57782
57833
 
57783
57834
  // src/mcp/tools/run-tool.ts
57784
- import { z as z127 } from "zod";
57835
+ import { z as z128 } from "zod";
57785
57836
  import { randomUUID as randomUUID20 } from "node:crypto";
57786
57837
 
57787
57838
  // src/orchestration/consensus-enforcement-mode.ts
@@ -58403,7 +58454,7 @@ function createMetaOrchestrator(options) {
58403
58454
 
58404
58455
  // src/orchestration/meta-shadow-selector.ts
58405
58456
  import { appendFileSync as appendFileSync6, existsSync as existsSync18, readFileSync as readFileSync15 } from "node:fs";
58406
- import { z as z124 } from "zod";
58457
+ import { z as z125 } from "zod";
58407
58458
  var SHADOW_STRATEGY_ARMS = [
58408
58459
  "single-shot",
58409
58460
  "dev-pipeline",
@@ -58492,19 +58543,19 @@ function createHydratableSelector() {
58492
58543
  var META_OUTCOME_SCHEMA_VERSION = 1;
58493
58544
  var HYDRATE_LOOKBACK_DAYS = 30;
58494
58545
  var HYDRATE_LOOKBACK_MS = HYDRATE_LOOKBACK_DAYS * 24 * 60 * 60 * 1e3;
58495
- var PersistedContextSchema = z124.object({
58496
- taskComplexity: z124.number(),
58497
- contextLengthNormalized: z124.number(),
58498
- isCodeTask: z124.number(),
58499
- isReasoningTask: z124.number(),
58500
- budgetUtilization: z124.number(),
58501
- timePressure: z124.number()
58502
- });
58503
- var PersistedMetaOutcomeSchema = z124.object({
58504
- schema: z124.literal(META_OUTCOME_SCHEMA_VERSION),
58505
- timestamp: z124.string(),
58506
- strategy: z124.enum(SHADOW_STRATEGY_ARMS),
58507
- success: z124.boolean(),
58546
+ var PersistedContextSchema = z125.object({
58547
+ taskComplexity: z125.number(),
58548
+ contextLengthNormalized: z125.number(),
58549
+ isCodeTask: z125.number(),
58550
+ isReasoningTask: z125.number(),
58551
+ budgetUtilization: z125.number(),
58552
+ timePressure: z125.number()
58553
+ });
58554
+ var PersistedMetaOutcomeSchema = z125.object({
58555
+ schema: z125.literal(META_OUTCOME_SCHEMA_VERSION),
58556
+ timestamp: z125.string(),
58557
+ strategy: z125.enum(SHADOW_STRATEGY_ARMS),
58558
+ success: z125.boolean(),
58508
58559
  context: PersistedContextSchema
58509
58560
  });
58510
58561
  var persistLogger = createLogger({ component: "MetaShadowSelector" });
@@ -58897,7 +58948,7 @@ function evaluateMetaStrategyReadiness(result, config = DEFAULT_META_STRATEGY_RE
58897
58948
  }
58898
58949
 
58899
58950
  // src/mcp/tools/dev-pipeline-tool.ts
58900
- import { z as z125 } from "zod";
58951
+ import { z as z126 } from "zod";
58901
58952
  import * as fs10 from "node:fs";
58902
58953
  import { randomUUID as randomUUID18 } from "node:crypto";
58903
58954
 
@@ -59163,42 +59214,42 @@ var DEV_PIPELINE_DRY_RUN_NOTE = "This was a dry run (plan+vote), which always ru
59163
59214
  function dispatchNoteFor(dryRun) {
59164
59215
  return dryRun ? DEV_PIPELINE_DRY_RUN_NOTE : DEV_PIPELINE_ASYNC_HINT;
59165
59216
  }
59166
- var DevPipelineInputSchema = z125.object({
59217
+ var DevPipelineInputSchema = z126.object({
59167
59218
  /** Direct task instructions. */
59168
- task: z125.string().max(1e4).optional().describe("Direct task instructions (what to build)"),
59219
+ task: z126.string().max(1e4).optional().describe("Direct task instructions (what to build)"),
59169
59220
  /** Declared provenance of the task text (#6795); omitted means '3'. */
59170
59221
  sourceTrustTier: TaskSourceTrustTierSchema,
59171
59222
  /** Path to a plan file (.md, .yaml, .txt) to use as input. */
59172
- planFile: z125.string().max(500).optional().describe("Path to a plan/spec file to use as input"),
59223
+ planFile: z126.string().max(500).optional().describe("Path to a plan/spec file to use as input"),
59173
59224
  /** Whether to run in dry-run mode (plan+vote only, no implementation). */
59174
- dryRun: z125.boolean().default(false).describe("If true, stop after plan+vote (no implementation)"),
59225
+ dryRun: z126.boolean().default(false).describe("If true, stop after plan+vote (no implementation)"),
59175
59226
  /** Maximum vote iterations before proceeding (default: 3). */
59176
- maxVoteIterations: z125.number().int().min(1).max(5).default(3).describe("Max plan\u2192vote iterations"),
59227
+ maxVoteIterations: z126.number().int().min(1).max(5).default(3).describe("Max plan\u2192vote iterations"),
59177
59228
  /** Maximum QA iterations per task (default: 3). */
59178
- maxQaIterations: z125.number().int().min(1).max(5).default(3).describe("Max QA review iterations per task"),
59229
+ maxQaIterations: z126.number().int().min(1).max(5).default(3).describe("Max QA review iterations per task"),
59179
59230
  /** Working directory for the pipeline (default: cwd). Used for security scan and context. */
59180
- workingDir: z125.string().max(500).optional().describe("Working directory (default: cwd)"),
59231
+ workingDir: z126.string().max(500).optional().describe("Working directory (default: cwd)"),
59181
59232
  /** GitHub issue number to track progress on. Updates posted as comments. */
59182
- issueNumber: z125.number().int().positive().optional().describe("GitHub issue to post progress to"),
59233
+ issueNumber: z126.number().int().positive().optional().describe("GitHub issue to post progress to"),
59183
59234
  /** GitHub repo (owner/name) for issue tracking. */
59184
- repo: z125.string().max(200).optional().describe("GitHub repo for issue tracking (e.g., owner/repo)"),
59235
+ repo: z126.string().max(200).optional().describe("GitHub repo for issue tracking (e.g., owner/repo)"),
59185
59236
  /** Task tracking backend: github, gitlab, or json (default: json). */
59186
- trackerBackend: z125.enum(["github", "gitlab", "json"]).default("json").describe("Task tracking backend for issue creation"),
59237
+ trackerBackend: z126.enum(["github", "gitlab", "json"]).default("json").describe("Task tracking backend for issue creation"),
59187
59238
  /** Labels to apply to created issues. */
59188
- labels: z125.array(z125.string()).optional().describe("Labels for created issues"),
59239
+ labels: z126.array(z126.string()).optional().describe("Labels for created issues"),
59189
59240
  /** Session ID for checkpoint/resume. Enables crash recovery. */
59190
- sessionId: z125.string().max(128).regex(/^[a-zA-Z0-9_-]+$/).optional().describe("Session ID for checkpoint/resume (crash recovery)"),
59241
+ sessionId: z126.string().max(128).regex(/^[a-zA-Z0-9_-]+$/).optional().describe("Session ID for checkpoint/resume (crash recovery)"),
59191
59242
  /**
59192
59243
  * TESTS ONLY — when true, voters return random decisions. Must not be used as
59193
59244
  * a fallback when adapters are unavailable; configure an adapter instead. (#2319)
59194
59245
  */
59195
- simulateVotes: z125.boolean().default(false).describe("TESTS ONLY \u2014 random output, must not be used for real decisions (#2319)"),
59246
+ simulateVotes: z126.boolean().default(false).describe("TESTS ONLY \u2014 random output, must not be used for real decisions (#2319)"),
59196
59247
  /** Voting strategy for consensus stages. */
59197
59248
  votingStrategy: VotingStrategySchema.optional().describe(
59198
59249
  "Voting strategy for plan approval (default: higher_order)"
59199
59250
  ),
59200
59251
  /** Start with the canonical quick panel; approvals may trigger a full-panel re-vote. */
59201
- quickMode: z125.boolean().default(false).describe(
59252
+ quickMode: z126.boolean().default(false).describe(
59202
59253
  "Start with 3 voters (architect, security, scope_steward) instead of 7. An approved quick vote may escalate to the full 7-role panel when the Bayesian posterior is borderline or a separate contrarian check rejects with high confidence, matching CLI --quick"
59203
59254
  ),
59204
59255
  /**
@@ -59206,7 +59257,7 @@ var DevPipelineInputSchema = z125.object({
59206
59257
  * budget for the whole run (#6736). Replaces every stage's default, the
59207
59258
  * vote's included; clamped to the `pipeline` class guard.
59208
59259
  */
59209
- timeoutMs: z125.number().int().min(3e4).max(6e5).optional().describe(
59260
+ timeoutMs: z126.number().int().min(3e4).max(6e5).optional().describe(
59210
59261
  "Max time for EACH stage call in ms (30000-600000), not for the whole run; applies to every stage, the vote included, and to each plan/vote and implement/QA iteration. A stage past it fails with a timeout and its model calls are aborted. Default: the vote stage gets the multi-LLM panel guard (900000 unless overridden), other stages the pipeline guard (1800000 unless overridden)"
59211
59262
  ),
59212
59263
  /**
@@ -59214,7 +59265,7 @@ var DevPipelineInputSchema = z125.object({
59214
59265
  * dispatch. A caller who learned `mode: 'async'` elsewhere gets an error
59215
59266
  * naming `dispatch` rather than the bare enum message (#4968).
59216
59267
  */
59217
- mode: z125.enum(["autonomous", "harness"], { error: modeEnumErrorNamingDispatch }).default("autonomous").describe(
59268
+ mode: z126.enum(["autonomous", "harness"], { error: modeEnumErrorNamingDispatch }).default("autonomous").describe(
59218
59269
  "'autonomous': full pipeline. 'harness': stops after decompose, returns tasks for caller to implement. (Not the async switch \u2014 that is `dispatch`.)"
59219
59270
  ),
59220
59271
  /**
@@ -59228,11 +59279,11 @@ var DevPipelineInputSchema = z125.object({
59228
59279
  */
59229
59280
  dispatch: dispatchFieldDefaultSync("Ignored for dryRun."),
59230
59281
  /** Local pre-ship quality gate (typecheck/lint/tests) mode (#3356). */
59231
- qualityGate: z125.enum(["off", "advisory", "blocking"]).default("off").describe(
59282
+ qualityGate: z126.enum(["off", "advisory", "blocking"]).default("off").describe(
59232
59283
  "Pre-ship local quality gate. 'off' (default): skip. 'advisory': run + record feedback, never fail. 'blocking': a red gate fails the pipeline."
59233
59284
  ),
59234
59285
  /** Opt-in per-run token budget — a safety cap for unattended runs (#3395). */
59235
- maxBudgetTokens: z125.number().int().positive().optional().describe(
59286
+ maxBudgetTokens: z126.number().int().positive().optional().describe(
59236
59287
  "Per-run token ceiling (#3395). When set, expert calls stop (returning failures) once cumulative usage crosses it \u2014 a hard-stop safety cap for unattended/multi-day runs. Omit to disable (default)."
59237
59288
  )
59238
59289
  });
@@ -59321,7 +59372,7 @@ async function executeDevPipelineBody(taskText, stages, pipelineOptions, simulat
59321
59372
  });
59322
59373
  return { ...error, content: [{ type: "text", text: describeFailureText(result) }] };
59323
59374
  }
59324
- return structuredToolSuccess(z125.record(z125.string(), z125.unknown()), output2);
59375
+ return structuredToolSuccess(z126.record(z126.string(), z126.unknown()), output2);
59325
59376
  }
59326
59377
  function describeIncompleteRun(result) {
59327
59378
  if (result.planStatus !== void 0) {
@@ -59487,33 +59538,33 @@ function registerDevPipelineTool(server, deps) {
59487
59538
  }
59488
59539
 
59489
59540
  // src/mcp/tools/pipeline-tool.ts
59490
- import { z as z126 } from "zod";
59541
+ import { z as z127 } from "zod";
59491
59542
  import * as fs11 from "node:fs";
59492
59543
  import { randomUUID as randomUUID19 } from "node:crypto";
59493
59544
  var PIPELINE_ASYNC_HINT = "A full run_pipeline run can exceed the synchronous MCP request timeout. Retry with `dispatch: 'async'` to get a jobId immediately, then poll get_job_result({ jobId }) for the result.";
59494
- var PipelineInputSchema = z126.object({
59545
+ var PipelineInputSchema = z127.object({
59495
59546
  /** The task to execute. */
59496
- task: z126.string().min(5).max(1e4).describe("Task description \u2014 pipeline template auto-selected based on content"),
59547
+ task: z127.string().min(5).max(1e4).describe("Task description \u2014 pipeline template auto-selected based on content"),
59497
59548
  /** Path to a spec file (.md, .yaml) to use as task input. */
59498
- specFile: z126.string().max(500).optional().describe("Path to a spec file \u2014 content prepended to task for greenfield projects"),
59549
+ specFile: z127.string().max(500).optional().describe("Path to a spec file \u2014 content prepended to task for greenfield projects"),
59499
59550
  /** Override template — see `listTemplateIds()` for the canonical list (#2728). Auto-detected if omitted. */
59500
- template: z126.string().max(50).optional().describe(`Pipeline template override. Available: ${listTemplateIds().join(", ")}`),
59551
+ template: z127.string().max(50).optional().describe(`Pipeline template override. Available: ${listTemplateIds().join(", ")}`),
59501
59552
  /** Voting strategy for consensus stages. */
59502
59553
  votingStrategy: VotingStrategySchema.optional().describe(
59503
59554
  "Voting strategy for plan approval. simple_majority (default), supermajority (67%), unanimous, higher_order (Bayesian), opinion_wise"
59504
59555
  ),
59505
59556
  /** Use 3 agents instead of 7 for faster voting. */
59506
- quickMode: z126.boolean().default(false).describe("Use 3 agents instead of 7 for faster consensus voting"),
59557
+ quickMode: z127.boolean().default(false).describe("Use 3 agents instead of 7 for faster consensus voting"),
59507
59558
  /**
59508
59559
  * Deadline for EACH stage in milliseconds (min 30s, max 600s), not a budget
59509
59560
  * for the whole run (#6730). Replaces every stage's default, the vote's
59510
59561
  * included; clamped to the `pipeline` class guard.
59511
59562
  */
59512
- timeoutMs: z126.number().int().min(3e4).max(6e5).optional().describe(
59563
+ timeoutMs: z127.number().int().min(3e4).max(6e5).optional().describe(
59513
59564
  "Max time for EACH stage in ms (30000-600000), not for the whole run; applies to every stage, the vote included. Default: the vote stage gets the multi-LLM panel guard (900000 unless overridden), other stages 120000"
59514
59565
  ),
59515
59566
  /** Stop after planning/voting (no implementation). */
59516
- dryRun: z126.boolean().default(false).describe("Stop after vote stage (no implementation)"),
59567
+ dryRun: z127.boolean().default(false).describe("Stop after vote stage (no implementation)"),
59517
59568
  /**
59518
59569
  * Dispatch mode (#3730). `sync` (default) runs the pipeline inline and
59519
59570
  * returns the result — but a real multi-stage adaptive run can exceed the
@@ -59524,7 +59575,7 @@ var PipelineInputSchema = z126.object({
59524
59575
  */
59525
59576
  ...asyncDispatchInputDefaultSync("Ignored for dryRun."),
59526
59577
  /** TESTS ONLY — random output, must not be used for real decisions. (#2319) */
59527
- simulateVotes: z126.boolean().default(false).describe("TESTS ONLY \u2014 random output, must not be used for real decisions (#2319)")
59578
+ simulateVotes: z127.boolean().default(false).describe("TESTS ONLY \u2014 random output, must not be used for real decisions (#2319)")
59528
59579
  });
59529
59580
  function buildOutput3(result, simulated) {
59530
59581
  return {
@@ -59550,14 +59601,14 @@ function buildOutput3(result, simulated) {
59550
59601
  rateLimitHint: result.error?.toLowerCase().includes("rate limit") === true ? "Consider using quickMode or increasing delay between pipeline runs" : void 0
59551
59602
  };
59552
59603
  }
59553
- var VoteEvidenceSchema = z126.object({
59554
- approvalPercentage: z126.number(),
59555
- voteRecordId: z126.string().optional()
59604
+ var VoteEvidenceSchema = z127.object({
59605
+ approvalPercentage: z127.number(),
59606
+ voteRecordId: z127.string().optional()
59556
59607
  });
59557
- var VoteResultSchema = z126.discriminatedUnion("kind", [
59558
- VoteEvidenceSchema.extend({ kind: z126.literal("approved") }),
59559
- VoteEvidenceSchema.extend({ kind: z126.literal("rejected"), feedback: z126.string() }),
59560
- VoteEvidenceSchema.extend({ kind: z126.literal("no_quorum"), reason: z126.string() })
59608
+ var VoteResultSchema = z127.discriminatedUnion("kind", [
59609
+ VoteEvidenceSchema.extend({ kind: z127.literal("approved") }),
59610
+ VoteEvidenceSchema.extend({ kind: z127.literal("rejected"), feedback: z127.string() }),
59611
+ VoteEvidenceSchema.extend({ kind: z127.literal("no_quorum"), reason: z127.string() })
59561
59612
  ]);
59562
59613
  function isVoteResult(value) {
59563
59614
  return VoteResultSchema.safeParse(value).success;
@@ -59659,7 +59710,7 @@ async function executePipelineBody(task, stages, run) {
59659
59710
  detail: output2
59660
59711
  });
59661
59712
  }
59662
- return structuredToolSuccess(z126.record(z126.string(), z126.unknown()), output2);
59713
+ return structuredToolSuccess(z127.record(z127.string(), z127.unknown()), output2);
59663
59714
  }
59664
59715
  function createPipelineAgentStages(input, config) {
59665
59716
  return createAgentStages({
@@ -59809,9 +59860,9 @@ function cancellableExecutor(strategy, executor, signal) {
59809
59860
  }
59810
59861
 
59811
59862
  // src/mcp/tools/run-tool.ts
59812
- var RunInputSchema = z127.object({
59813
- goal: z127.string().min(1).describe("Natural-language goal. nexus-agents selects how to execute it."),
59814
- forceStrategy: z127.enum([
59863
+ var RunInputSchema = z128.object({
59864
+ goal: z128.string().min(1).describe("Natural-language goal. nexus-agents selects how to execute it."),
59865
+ forceStrategy: z128.enum([
59815
59866
  "single-shot",
59816
59867
  "dev-pipeline",
59817
59868
  "pipeline",
@@ -59823,10 +59874,10 @@ var RunInputSchema = z127.object({
59823
59874
  ]).optional().describe(
59824
59875
  "Power-user override: force a specific strategy instead of letting the router choose."
59825
59876
  ),
59826
- requiresConsensus: z127.boolean().optional().describe("Hint: the task needs a multi-perspective consensus decision."),
59827
- dependencyStructure: z127.enum(["linear", "dag", "independent", "unknown"]).optional().describe("Hint: the dependency structure of the work."),
59828
- isNovel: z127.boolean().optional().describe("Hint: this kind of task has not been seen before."),
59829
- execute: z127.boolean().optional().describe(
59877
+ requiresConsensus: z128.boolean().optional().describe("Hint: the task needs a multi-perspective consensus decision."),
59878
+ dependencyStructure: z128.enum(["linear", "dag", "independent", "unknown"]).optional().describe("Hint: the dependency structure of the work."),
59879
+ isNovel: z128.boolean().optional().describe("Hint: this kind of task has not been seen before."),
59880
+ execute: z128.boolean().optional().describe(
59830
59881
  "When true, actually run the selected strategy (if an executor is wired) and return its result; otherwise return the routing decision only (default false, read-only)."
59831
59882
  ),
59832
59883
  /**
@@ -59841,7 +59892,7 @@ var RunInputSchema = z127.object({
59841
59892
  * other, the call is REFUSED rather than executed: silently ignoring a
59842
59893
  * do-not-act flag is the one outcome a governance substrate cannot allow.
59843
59894
  */
59844
- dryRun: z127.boolean().optional().describe(
59895
+ dryRun: z128.boolean().optional().describe(
59845
59896
  "Plan and vote only, no implementation (#4806). Requires the dev-pipeline strategy \u2014 refused (never silently executed) when the router selects another."
59846
59897
  ),
59847
59898
  /**
@@ -60077,12 +60128,12 @@ function registerRunTool(server, deps) {
60077
60128
  }
60078
60129
 
60079
60130
  // src/mcp/tools/list-available-models-tool.ts
60080
- import { z as z128 } from "zod";
60131
+ import { z as z129 } from "zod";
60081
60132
  var DESCRIPTION5 = "Probe every model-discovery transport (OpenRouter API, the configured gateway, and the opencode/claude/codex/gemini CLIs) and report a per-transport health summary: probe ok/failed, model count, and a sample of usable ids. Models with open route breakers are excluded; each CLI reports whether its default-route breaker is open. Use it to validate the CLIs and APIs are wired and reachable. Read-only; does not change routing.";
60082
60133
  var PROBE_TIMEOUT_MS = 12e3;
60083
- var ListAvailableModelsInputSchema = z128.object({
60084
- includeModelIds: z128.boolean().optional().describe("Include the full model-id list per transport (default false \u2192 sample of 5 only)."),
60085
- includeOpenRouter: z128.boolean().optional().describe("Probe the OpenRouter live catalog (default true).")
60134
+ var ListAvailableModelsInputSchema = z129.object({
60135
+ includeModelIds: z129.boolean().optional().describe("Include the full model-id list per transport (default false \u2192 sample of 5 only)."),
60136
+ includeOpenRouter: z129.boolean().optional().describe("Probe the OpenRouter live catalog (default true).")
60086
60137
  });
60087
60138
  async function probeSource(source, includeModelIds) {
60088
60139
  let timer;
@@ -60191,8 +60242,8 @@ async function listAvailableModelsHandler(args, deps, logger62) {
60191
60242
  function registerListAvailableModelsTool(server, deps) {
60192
60243
  const logger62 = deps.logger ?? createLogger({ tool: "list_available_models" });
60193
60244
  const toolSchema = {
60194
- includeModelIds: z128.boolean().optional().describe("Include the full model-id list per transport (default false \u2192 sample of 5 only)."),
60195
- includeOpenRouter: z128.boolean().optional().describe("Probe the OpenRouter live catalog (default true).")
60245
+ includeModelIds: z129.boolean().optional().describe("Include the full model-id list per transport (default false \u2192 sample of 5 only)."),
60246
+ includeOpenRouter: z129.boolean().optional().describe("Probe the OpenRouter live catalog (default true).")
60196
60247
  };
60197
60248
  const secureHandler = createSecureHandler(
60198
60249
  (args) => listAvailableModelsHandler(args, deps, logger62),
@@ -60216,9 +60267,9 @@ function registerListAvailableModelsTool(server, deps) {
60216
60267
  }
60217
60268
 
60218
60269
  // src/mcp/tools/pr-review-eval-types.ts
60219
- import { z as z129 } from "zod";
60270
+ import { z as z130 } from "zod";
60220
60271
  var MAX_EVAL_FINDINGS = 100;
60221
- var VoterEvalFindingSchema = z129.object({
60272
+ var VoterEvalFindingSchema = z130.object({
60222
60273
  summary: RawFindingSchema.shape.summary,
60223
60274
  location: RawFindingSchema.shape.location,
60224
60275
  severity: RawFindingSchema.shape.severity.unwrap(),
@@ -60226,14 +60277,14 @@ var VoterEvalFindingSchema = z129.object({
60226
60277
  gate: RawFindingSchema.shape.gate.extend({
60227
60278
  named_assertion: RawFindingSchema.shape.claim.min(0)
60228
60279
  }).optional(),
60229
- verified: z129.boolean().optional(),
60230
- classification: z129.enum(["TP", "FP", "FN", "excluded"]),
60231
- source: z129.enum(["voter", "ground_truth"]),
60280
+ verified: z130.boolean().optional(),
60281
+ classification: z130.enum(["TP", "FP", "FN", "excluded"]),
60282
+ source: z130.enum(["voter", "ground_truth"]),
60232
60283
  /** Original index in the voter's raw findings; repeated TP evidence shares it. */
60233
- findingIndex: z129.number().int().nonnegative().optional(),
60234
- knownBugIndex: z129.number().int().nonnegative().optional(),
60284
+ findingIndex: z130.number().int().nonnegative().optional(),
60285
+ knownBugIndex: z130.number().int().nonnegative().optional(),
60235
60286
  /** String fields shortened by the producer, never silently truncated. */
60236
- truncatedFields: z129.array(z129.enum(["summary", "location", "rationale", "gate.named_assertion"])).max(4).optional()
60287
+ truncatedFields: z130.array(z130.enum(["summary", "location", "rationale", "gate.named_assertion"])).max(4).optional()
60237
60288
  });
60238
60289
  var PR_REVIEW_EVAL_ROLES = [
60239
60290
  "architect",
@@ -60242,47 +60293,47 @@ var PR_REVIEW_EVAL_ROLES = [
60242
60293
  "catfish",
60243
60294
  "scope_steward"
60244
60295
  ];
60245
- var PrReviewEvalRoleSchema = z129.enum(PR_REVIEW_EVAL_ROLES);
60246
- var PrReviewCaseClassSchema = z129.enum(["buggy", "clean", "borderline"]);
60247
- var VoterEvalVerdictSchema = z129.object({
60296
+ var PrReviewEvalRoleSchema = z130.enum(PR_REVIEW_EVAL_ROLES);
60297
+ var PrReviewCaseClassSchema = z130.enum(["buggy", "clean", "borderline"]);
60298
+ var VoterEvalVerdictSchema = z130.object({
60248
60299
  /** Stable record id (e.g. `${runId}:${caseNumber}:${role}`). */
60249
- id: z129.string().min(1).max(160),
60300
+ id: z130.string().min(1).max(160),
60250
60301
  /** The pr_review run / batch this verdict belongs to. */
60251
- runId: z129.string().min(1).max(64),
60302
+ runId: z130.string().min(1).max(64),
60252
60303
  /** Dataset case identifier (the dataset's `number` field). */
60253
- caseNumber: z129.string().min(1).max(80),
60304
+ caseNumber: z130.string().min(1).max(80),
60254
60305
  /** Rubric class of the case (ground-truth label). */
60255
60306
  caseClass: PrReviewCaseClassSchema,
60256
60307
  /** The voter role being scored. */
60257
60308
  role: PrReviewEvalRoleSchema,
60258
60309
  /** Verified findings that matched a known bug. */
60259
- truePositives: z129.number().int().nonnegative(),
60310
+ truePositives: z130.number().int().nonnegative(),
60260
60311
  /** Verified findings on clean code that matched no known bug. */
60261
- falsePositives: z129.number().int().nonnegative(),
60312
+ falsePositives: z130.number().int().nonnegative(),
60262
60313
  /** Known bugs this voter failed to flag. */
60263
- falseNegatives: z129.number().int().nonnegative(),
60314
+ falseNegatives: z130.number().int().nonnegative(),
60264
60315
  /** Optional for legacy records/count-only callers; [] means measured, no evidence. */
60265
- findings: z129.array(VoterEvalFindingSchema).max(MAX_EVAL_FINDINGS).optional(),
60316
+ findings: z130.array(VoterEvalFindingSchema).max(MAX_EVAL_FINDINGS).optional(),
60266
60317
  /** Number of evidence entries omitted at the cap; full tallies are unchanged. */
60267
- findingsTruncated: z129.number().int().nonnegative().optional(),
60318
+ findingsTruncated: z130.number().int().nonnegative().optional(),
60268
60319
  /** Rubric version the ground truth was adjudicated under. */
60269
- rubricVersion: z129.string().min(1).max(32),
60320
+ rubricVersion: z130.string().min(1).max(32),
60270
60321
  /** ISO-8601 timestamp the verdict was recorded. */
60271
- timestamp: z129.string().min(1).max(40)
60322
+ timestamp: z130.string().min(1).max(40)
60272
60323
  });
60273
- var VoterEvalVerdictQuerySchema = z129.object({
60324
+ var VoterEvalVerdictQuerySchema = z130.object({
60274
60325
  role: PrReviewEvalRoleSchema.optional(),
60275
- runId: z129.string().min(1).max(64).optional(),
60326
+ runId: z130.string().min(1).max(64).optional(),
60276
60327
  caseClass: PrReviewCaseClassSchema.optional(),
60277
- rubricVersion: z129.string().min(1).max(32).optional(),
60328
+ rubricVersion: z130.string().min(1).max(32).optional(),
60278
60329
  /** ISO-8601 lower bound (inclusive) on `timestamp`. */
60279
- since: z129.string().optional(),
60330
+ since: z130.string().optional(),
60280
60331
  /** Most-recent-N cap. */
60281
- limit: z129.number().int().positive().optional()
60332
+ limit: z130.number().int().positive().optional()
60282
60333
  });
60283
60334
 
60284
60335
  // src/mcp/tools/supply-chain-tradeoff-panel.ts
60285
- import { z as z130 } from "zod";
60336
+ import { z as z131 } from "zod";
60286
60337
  import { randomUUID as randomUUID21 } from "node:crypto";
60287
60338
  var DEFAULT_AXES = [
60288
60339
  "build_time_determinism",
@@ -60304,16 +60355,16 @@ var FULL_PANEL = [
60304
60355
  "scope_steward"
60305
60356
  ];
60306
60357
  var QUICK_PANEL = ["architect", "security", "scope_steward"];
60307
- var SupplyChainTradeoffPanelInputSchema = z130.object({
60308
- proposal: z130.string().min(1).max(MAX_PROPOSAL_LENGTH2).describe('The proposal under tradeoff review (e.g. "Should aegis-boot adopt cargo-nextest?")'),
60309
- axes: z130.array(z130.string().min(1).max(MAX_AXIS_NAME_LENGTH)).min(1).max(MAX_AXES).optional().describe(
60358
+ var SupplyChainTradeoffPanelInputSchema = z131.object({
60359
+ proposal: z131.string().min(1).max(MAX_PROPOSAL_LENGTH2).describe('The proposal under tradeoff review (e.g. "Should aegis-boot adopt cargo-nextest?")'),
60360
+ axes: z131.array(z131.string().min(1).max(MAX_AXIS_NAME_LENGTH)).min(1).max(MAX_AXES).optional().describe(
60310
60361
  `Tradeoff axes to evaluate. Default: ${DEFAULT_AXES.join(", ")}. Custom axes accepted; max ${String(MAX_AXES)}.`
60311
60362
  ),
60312
- context: z130.string().max(MAX_CONTEXT_LENGTH).optional().describe(
60363
+ context: z131.string().max(MAX_CONTEXT_LENGTH).optional().describe(
60313
60364
  "Optional context: relevant repo state, dependency tree, vendor publishing patterns, etc."
60314
60365
  ),
60315
- quickMode: z130.boolean().optional().default(false).describe("Use 3 voters (architect, security, scope_steward) instead of 7"),
60316
- simulate: z130.boolean().optional().default(false).describe("Use simulated voters (testing only)"),
60366
+ quickMode: z131.boolean().optional().default(false).describe("Use 3 voters (architect, security, scope_steward) instead of 7"),
60367
+ simulate: z131.boolean().optional().default(false).describe("Use simulated voters (testing only)"),
60317
60368
  // #6123: same field as consensus_vote — the panel judges the caller's project.
60318
60369
  project: VoterProjectInputSchema,
60319
60370
  /**
@@ -60811,40 +60862,40 @@ var RiskLevel = /* @__PURE__ */ ((RiskLevel2) => {
60811
60862
  })(RiskLevel || {});
60812
60863
 
60813
60864
  // src/mcp/safety/stpa-schemas.ts
60814
- import { z as z131 } from "zod";
60815
- var HazardCategorySchema = z131.enum(HazardCategory);
60816
- var HazardSeveritySchema = z131.enum(HazardSeverity);
60817
- var ConstraintPrioritySchema = z131.enum(ConstraintPriority);
60818
- var RiskLevelSchema = z131.enum(RiskLevel);
60819
- var TriggerPatternSchema = z131.object({
60820
- parameter: z131.string().min(1),
60821
- matchType: z131.enum(["contains", "regex", "equals", "startsWith", "endsWith"]),
60822
- pattern: z131.string(),
60823
- reason: z131.string()
60824
- });
60825
- var HazardSchema = z131.object({
60826
- id: z131.string().min(1),
60827
- description: z131.string(),
60865
+ import { z as z132 } from "zod";
60866
+ var HazardCategorySchema = z132.enum(HazardCategory);
60867
+ var HazardSeveritySchema = z132.enum(HazardSeverity);
60868
+ var ConstraintPrioritySchema = z132.enum(ConstraintPriority);
60869
+ var RiskLevelSchema = z132.enum(RiskLevel);
60870
+ var TriggerPatternSchema = z132.object({
60871
+ parameter: z132.string().min(1),
60872
+ matchType: z132.enum(["contains", "regex", "equals", "startsWith", "endsWith"]),
60873
+ pattern: z132.string(),
60874
+ reason: z132.string()
60875
+ });
60876
+ var HazardSchema = z132.object({
60877
+ id: z132.string().min(1),
60878
+ description: z132.string(),
60828
60879
  category: HazardCategorySchema,
60829
60880
  severity: HazardSeveritySchema,
60830
- likelihood: z131.enum(["almost_certain", "likely", "possible", "unlikely", "rare"]),
60831
- triggerConditions: z131.array(z131.string()),
60832
- consequences: z131.array(z131.string())
60833
- });
60834
- var UnsafeControlActionSchema = z131.object({
60835
- id: z131.string().min(1),
60836
- toolName: z131.string().min(1),
60837
- type: z131.enum(["not_provided", "provided_causes_hazard", "wrong_timing", "wrong_duration"]),
60838
- description: z131.string(),
60839
- unsafeContext: z131.string(),
60840
- relatedHazards: z131.array(z131.string()),
60841
- triggerPatterns: z131.array(TriggerPatternSchema).optional()
60842
- });
60843
- var SafetyConstraintSchema = z131.object({
60844
- id: z131.string().min(1),
60845
- description: z131.string(),
60846
- mitigates: z131.array(z131.string()),
60847
- enforcement: z131.enum([
60881
+ likelihood: z132.enum(["almost_certain", "likely", "possible", "unlikely", "rare"]),
60882
+ triggerConditions: z132.array(z132.string()),
60883
+ consequences: z132.array(z132.string())
60884
+ });
60885
+ var UnsafeControlActionSchema = z132.object({
60886
+ id: z132.string().min(1),
60887
+ toolName: z132.string().min(1),
60888
+ type: z132.enum(["not_provided", "provided_causes_hazard", "wrong_timing", "wrong_duration"]),
60889
+ description: z132.string(),
60890
+ unsafeContext: z132.string(),
60891
+ relatedHazards: z132.array(z132.string()),
60892
+ triggerPatterns: z132.array(TriggerPatternSchema).optional()
60893
+ });
60894
+ var SafetyConstraintSchema = z132.object({
60895
+ id: z132.string().min(1),
60896
+ description: z132.string(),
60897
+ mitigates: z132.array(z132.string()),
60898
+ enforcement: z132.enum([
60848
60899
  "prevent",
60849
60900
  "require_confirmation",
60850
60901
  "alert",
@@ -60852,52 +60903,52 @@ var SafetyConstraintSchema = z131.object({
60852
60903
  "rate_limit",
60853
60904
  "require_privilege"
60854
60905
  ]),
60855
- validationFunction: z131.string().optional(),
60906
+ validationFunction: z132.string().optional(),
60856
60907
  priority: ConstraintPrioritySchema
60857
60908
  });
60858
- var PropertySchemaSchema = z131.object({
60859
- type: z131.string(),
60860
- description: z131.string().optional(),
60861
- enum: z131.array(z131.unknown()).optional(),
60862
- pattern: z131.string().optional(),
60863
- minimum: z131.number().optional(),
60864
- maximum: z131.number().optional()
60865
- });
60866
- var ToolInputSchemaSchema = z131.object({
60867
- type: z131.string(),
60868
- properties: z131.record(z131.string(), PropertySchemaSchema).optional(),
60869
- required: z131.array(z131.string()).optional(),
60870
- additionalProperties: z131.boolean().optional()
60871
- });
60872
- var ToolDefinitionSchema = z131.object({
60873
- name: z131.string().min(1),
60874
- description: z131.string(),
60909
+ var PropertySchemaSchema = z132.object({
60910
+ type: z132.string(),
60911
+ description: z132.string().optional(),
60912
+ enum: z132.array(z132.unknown()).optional(),
60913
+ pattern: z132.string().optional(),
60914
+ minimum: z132.number().optional(),
60915
+ maximum: z132.number().optional()
60916
+ });
60917
+ var ToolInputSchemaSchema = z132.object({
60918
+ type: z132.string(),
60919
+ properties: z132.record(z132.string(), PropertySchemaSchema).optional(),
60920
+ required: z132.array(z132.string()).optional(),
60921
+ additionalProperties: z132.boolean().optional()
60922
+ });
60923
+ var ToolDefinitionSchema = z132.object({
60924
+ name: z132.string().min(1),
60925
+ description: z132.string(),
60875
60926
  inputSchema: ToolInputSchemaSchema
60876
60927
  });
60877
- var AnalysisConfigurationSchema = z131.object({
60878
- includeLowSeverity: z131.boolean().default(true),
60879
- generateAllConstraints: z131.boolean().default(true),
60880
- checkInteractions: z131.boolean().default(true),
60881
- maxHazardsPerTool: z131.number().int().min(1).max(100).default(50),
60882
- categories: z131.array(HazardCategorySchema).default([])
60928
+ var AnalysisConfigurationSchema = z132.object({
60929
+ includeLowSeverity: z132.boolean().default(true),
60930
+ generateAllConstraints: z132.boolean().default(true),
60931
+ checkInteractions: z132.boolean().default(true),
60932
+ maxHazardsPerTool: z132.number().int().min(1).max(100).default(50),
60933
+ categories: z132.array(HazardCategorySchema).default([])
60883
60934
  });
60884
- var ConstraintViolationSchema = z131.object({
60885
- constraintId: z131.string().min(1),
60886
- constraintDescription: z131.string(),
60935
+ var ConstraintViolationSchema = z132.object({
60936
+ constraintId: z132.string().min(1),
60937
+ constraintDescription: z132.string(),
60887
60938
  severity: HazardSeveritySchema,
60888
- details: z131.string(),
60889
- remediation: z131.string()
60890
- });
60891
- var ValidationWarningSchema = z131.object({
60892
- code: z131.string().min(1),
60893
- message: z131.string(),
60894
- affected: z131.string()
60895
- });
60896
- var ValidationResultSchema = z131.object({
60897
- valid: z131.boolean(),
60898
- toolName: z131.string().min(1),
60899
- violations: z131.array(ConstraintViolationSchema),
60900
- passed: z131.array(z131.string()),
60939
+ details: z132.string(),
60940
+ remediation: z132.string()
60941
+ });
60942
+ var ValidationWarningSchema = z132.object({
60943
+ code: z132.string().min(1),
60944
+ message: z132.string(),
60945
+ affected: z132.string()
60946
+ });
60947
+ var ValidationResultSchema = z132.object({
60948
+ valid: z132.boolean(),
60949
+ toolName: z132.string().min(1),
60950
+ violations: z132.array(ConstraintViolationSchema),
60951
+ passed: z132.array(z132.string()),
60901
60952
  // Optional rather than required, deliberately. `ValidationResult` declares
60902
60953
  // both fields required because every result this package produces has them;
60903
60954
  // the schema is the lenient inbound edge for a result that arrived from
@@ -60908,10 +60959,10 @@ var ValidationResultSchema = z131.object({
60908
60959
  // "nothing was evaluated". The strict/lenient split is safe because nothing
60909
60960
  // bridges the two with `z.infer`: a parsed result will not typecheck as a
60910
60961
  // `ValidationResult` without handling the absent fields.
60911
- evaluated: z131.array(z131.string()).optional(),
60912
- notApplicable: z131.array(z131.string()).optional(),
60913
- warnings: z131.array(ValidationWarningSchema),
60914
- validatedAt: z131.date()
60962
+ evaluated: z132.array(z132.string()).optional(),
60963
+ notApplicable: z132.array(z132.string()).optional(),
60964
+ warnings: z132.array(ValidationWarningSchema),
60965
+ validatedAt: z132.date()
60915
60966
  });
60916
60967
 
60917
60968
  // src/mcp/safety/stpa-types.ts
@@ -62011,18 +62062,18 @@ var GeminiResponseParser = class {
62011
62062
  };
62012
62063
 
62013
62064
  // src/cli-adapters/router-types.ts
62014
- import { z as z132 } from "zod";
62015
- var RouterConfigSchema = z132.object({
62016
- preferCostEfficient: z132.boolean().default(false)
62065
+ import { z as z133 } from "zod";
62066
+ var RouterConfigSchema = z133.object({
62067
+ preferCostEfficient: z133.boolean().default(false)
62017
62068
  });
62018
62069
 
62019
62070
  // src/cli-adapters/task-classifier.ts
62020
- import { z as z133 } from "zod";
62021
- var ClassificationPatternsSchema = z133.object({
62022
- code: z133.array(z133.string()).readonly(),
62023
- research: z133.array(z133.string()).readonly(),
62024
- documentation: z133.array(z133.string()).readonly(),
62025
- analysis: z133.array(z133.string()).readonly()
62071
+ import { z as z134 } from "zod";
62072
+ var ClassificationPatternsSchema = z134.object({
62073
+ code: z134.array(z134.string()).readonly(),
62074
+ research: z134.array(z134.string()).readonly(),
62075
+ documentation: z134.array(z134.string()).readonly(),
62076
+ analysis: z134.array(z134.string()).readonly()
62026
62077
  });
62027
62078
 
62028
62079
  // src/security/sandbox/sandbox-types.ts
@@ -63424,4 +63475,4 @@ export {
63424
63475
  initializeSandbox,
63425
63476
  getSandboxMode
63426
63477
  };
63427
- //# sourceMappingURL=chunk-KX33QPIJ.js.map
63478
+ //# sourceMappingURL=chunk-3WBJBX3O.js.map