nexus-agents 14.0.3 → 14.0.4

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-KSF67NHM.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-JDFDGY5A.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-63L435QC.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-XRRZGJGJ.js");
50463
50463
  const input = buildVotingInput(plan, config);
50464
50464
  const result = await executeVoting(input, log);
50465
50465
  return parseVotingResult(result);
@@ -52935,7 +52935,7 @@ async function prepareCompletePlanVote(plan, research, config, signal) {
52935
52935
  return { proposal, roleAdapters: panel.seats };
52936
52936
  }
52937
52937
  async function executePlanVote(plan, research, config, strategy, signal) {
52938
- const { executeVoting } = await import("./consensus-vote-M3V3WSW4.js");
52938
+ const { executeVoting } = await import("./consensus-vote-XRRZGJGJ.js");
52939
52939
  const { proposal, roleAdapters } = await prepareCompletePlanVote(plan, research, config, signal);
52940
52940
  const votingResult = await executeVoting(
52941
52941
  {
@@ -55694,10 +55694,27 @@ function createAuditStageRegistry() {
55694
55694
  }
55695
55695
 
55696
55696
  // src/mcp/tools/pr-review-tool.ts
55697
- import { z as z113 } from "zod";
55697
+ import { z as z114 } from "zod";
55698
55698
  import { randomUUID as randomUUID15 } from "node:crypto";
55699
55699
 
55700
55700
  // src/mcp/tools/pr-review-record-producer.ts
55701
+ import { z as z113 } from "zod";
55702
+ var LocalDiffReductionSchema = z113.object({
55703
+ prefixCodeUnits: z113.number().int().positive().max(Number.MAX_SAFE_INTEGER),
55704
+ totalCodeUnits: z113.number().int().positive().max(Number.MAX_SAFE_INTEGER),
55705
+ prefixUtf8Bytes: z113.number().int().positive().max(Number.MAX_SAFE_INTEGER),
55706
+ totalUtf8Bytes: z113.number().int().positive().max(Number.MAX_SAFE_INTEGER),
55707
+ marker: z113.string().min(1).max(64)
55708
+ }).strict();
55709
+ function localReductionStamp(args) {
55710
+ if (args.localDiffReduction === void 0) return "";
55711
+ const r = LocalDiffReductionSchema.parse(args.localDiffReduction);
55712
+ const diff = args.input.prDiff;
55713
+ 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))) {
55714
+ throw new Error("Invalid local pre-builder diff reduction measurements");
55715
+ }
55716
+ 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]`;
55717
+ }
55701
55718
  function bytes(n) {
55702
55719
  return n.toLocaleString("en-US");
55703
55720
  }
@@ -55772,7 +55789,7 @@ function writeFailedOutcome() {
55772
55789
  function buildAndPersist(prNumber, baseSha, args) {
55773
55790
  const { input, aggregate, counts, reviewCount, logger: logger62, coverage, diffSource, sanitization } = args;
55774
55791
  const reviewedDiffHash = sanitization?.rawDiffHash ?? computeReviewedDiffHash(input.prDiff);
55775
- const stamps = coverageStamps(coverage);
55792
+ const stamps = localReductionStamp(args) + coverageStamps(coverage);
55776
55793
  const coverageFields = coverageFieldsOf(coverage);
55777
55794
  const disclosure = sanitizationDisclosureOf(sanitization, input.prDiff);
55778
55795
  warnIfDiffTruncated(resolveBindingMeasurement(input.prDiff, sanitization), prNumber, logger62);
@@ -55884,19 +55901,19 @@ var MAX_REPO_CONTEXT_LENGTH = 2e3;
55884
55901
  var MAX_TITLE_LENGTH = 500;
55885
55902
  var MAX_DESCRIPTION_LENGTH = 1e4;
55886
55903
  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, {
55904
+ var PrReviewInputSchema = z114.object({
55905
+ prTitle: z114.string().min(1).max(MAX_TITLE_LENGTH).describe("PR title"),
55906
+ prDescription: z114.string().max(MAX_DESCRIPTION_LENGTH).optional().describe("PR body / description"),
55907
+ prDiff: z114.string().min(1).max(MAX_DIFF_INPUT_LENGTH).refine(looksLikeUnifiedDiff, {
55891
55908
  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
55909
  }).describe(
55893
55910
  `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
55911
  ),
55895
- repoContext: z113.string().max(MAX_REPO_CONTEXT_LENGTH).optional().describe(
55912
+ repoContext: z114.string().max(MAX_REPO_CONTEXT_LENGTH).optional().describe(
55896
55913
  `Optional one-paragraph repo context (architecture, conventions; max ${String(MAX_REPO_CONTEXT_LENGTH)} chars; trim before calling)`
55897
55914
  ),
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"),
55915
+ baseRef: z114.string().max(200).optional().describe("Base branch ref (e.g. main)"),
55916
+ headRef: z114.string().max(200).optional().describe("Head branch ref"),
55900
55917
  /**
55901
55918
  * Option-C audit binding (#4031). When BOTH `prNumber` and `baseSha` are
55902
55919
  * supplied AND the review is live (not simulated), pr_review persists an
@@ -55912,14 +55929,14 @@ var PrReviewInputSchema = z113.object({
55912
55929
  * the PR opened and drifts as main advances), so pass the merge-base as
55913
55930
  * `baseSha` or the record will not match on an aged branch (#5692).
55914
55931
  */
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(
55932
+ prNumber: z114.number().int().positive().max(1e6).optional().describe("PR number \u2014 with baseSha, enables Option-C audit-record persistence (#4031)"),
55933
+ baseSha: z114.string().regex(/^[0-9a-f]{40}$/, "baseSha must be a 40-char lowercase hex commit sha").optional().describe(
55917
55934
  "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
55935
  ),
55919
- repoPath: z113.string().max(1024).optional().describe(
55936
+ repoPath: z114.string().max(1024).optional().describe(
55920
55937
  "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
55938
  ),
55922
- simulate: z113.boolean().default(false).describe("Use simulated voters (testing only; never ship live with this true)"),
55939
+ simulate: z114.boolean().default(false).describe("Use simulated voters (testing only; never ship live with this true)"),
55923
55940
  /**
55924
55941
  * Error policy (#4132). `standard` (default) excludes absent voters but
55925
55942
  * requires a majority of the requested panel to approve. `absolute_quorum` gates
@@ -55931,7 +55948,7 @@ var PrReviewInputSchema = z113.object({
55931
55948
  * verified approve. A genuine `request_changes` blocker still wins (Tiers 1-2
55932
55949
  * run first).
55933
55950
  */
55934
- errorPolicy: z113.enum(["standard", "absolute_quorum"]).default("standard").describe(
55951
+ errorPolicy: z114.enum(["standard", "absolute_quorum"]).default("standard").describe(
55935
55952
  "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
55953
  ),
55937
55954
  // #6123: same field as consensus_vote — the panel judges the caller's project.
@@ -56287,27 +56304,27 @@ function absoluteQuorumApprove(reviews, valid) {
56287
56304
  }
56288
56305
 
56289
56306
  // 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()
56307
+ import { z as z115 } from "zod";
56308
+ var SurveyOssLandscapeInputSchema = z115.object({
56309
+ query: z115.string().min(1).max(200).describe('Free-text search query, e.g. "cargo nextest replacement" or "OSS SBOM tools"'),
56310
+ maxResults: z115.number().int().min(1).max(50).optional().default(10).describe("Maximum candidates to return (1-50; default 10)"),
56311
+ minStars: z115.number().int().min(0).max(1e6).optional().default(0).describe("Minimum star count to include (default 0; useful for filtering noise)"),
56312
+ language: z115.string().max(50).optional().describe('GitHub language filter, e.g. "rust" or "typescript"')
56313
+ });
56314
+ var GitHubRepoSchema = z115.object({
56315
+ full_name: z115.string().optional(),
56316
+ html_url: z115.string().optional(),
56317
+ description: z115.string().nullable().optional(),
56318
+ stargazers_count: z115.number().optional(),
56319
+ pushed_at: z115.string().nullable().optional(),
56320
+ language: z115.string().nullable().optional(),
56321
+ license: z115.object({
56322
+ spdx_id: z115.string().nullable().optional()
56306
56323
  }).nullable().optional()
56307
56324
  });
56308
- var GitHubSearchResponseSchema = z114.object({
56309
- total_count: z114.number().optional(),
56310
- items: z114.array(GitHubRepoSchema).optional()
56325
+ var GitHubSearchResponseSchema = z115.object({
56326
+ total_count: z115.number().optional(),
56327
+ items: z115.array(GitHubRepoSchema).optional()
56311
56328
  });
56312
56329
  var GITHUB_SEARCH_BASE = "https://api.github.com/search/repositories";
56313
56330
  function buildGithubQuery(input) {
@@ -56429,16 +56446,16 @@ function createSurveyHandler(deps) {
56429
56446
  });
56430
56447
  return withToolError("Survey failed", logger62, async () => {
56431
56448
  const result = await executeSurvey(validation.data, logger62);
56432
- return structuredToolSuccess(z114.object(SURVEY_OUTPUT_SCHEMA), result);
56449
+ return structuredToolSuccess(z115.object(SURVEY_OUTPUT_SCHEMA), result);
56433
56450
  });
56434
56451
  };
56435
56452
  }
56436
56453
  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())
56454
+ query: z115.string(),
56455
+ totalFound: z115.number(),
56456
+ candidates: z115.array(z115.unknown()),
56457
+ sourcesQueried: z115.array(z115.string()),
56458
+ sourcesFailed: z115.array(z115.string())
56442
56459
  };
56443
56460
  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
56461
  function registerSurveyOssLandscapeTool(server, deps) {
@@ -56469,7 +56486,7 @@ function registerSurveyOssLandscapeTool(server, deps) {
56469
56486
  }
56470
56487
 
56471
56488
  // src/mcp/tools/vendor-publishing-audit.ts
56472
- import { z as z115 } from "zod";
56489
+ import { z as z116 } from "zod";
56473
56490
 
56474
56491
  // src/mcp/tools/vendor-publishing-seed.ts
56475
56492
  var VENDOR_PUBLISHING_SEED = {
@@ -56542,8 +56559,8 @@ function listKnownVendors() {
56542
56559
  }
56543
56560
 
56544
56561
  // 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"')
56562
+ var VendorPublishingAuditInputSchema = z116.object({
56563
+ vendor: z116.string().min(1).max(50).toLowerCase().describe('Vendor identifier, lowercase. e.g. "ubuntu", "debian", "fedora"')
56547
56564
  });
56548
56565
  function lookupVendor(vendor) {
56549
56566
  if (isKnownVendor(vendor)) {
@@ -56571,26 +56588,26 @@ function createVendorPublishingAuditHandler(deps) {
56571
56588
  return withToolError("Vendor publishing audit failed", logger62, () => {
56572
56589
  const result = lookupVendor(validation.data.vendor);
56573
56590
  return Promise.resolve(
56574
- structuredToolSuccess(z115.object(VENDOR_PUBLISHING_OUTPUT_SCHEMA), result)
56591
+ structuredToolSuccess(z116.object(VENDOR_PUBLISHING_OUTPUT_SCHEMA), result)
56575
56592
  );
56576
56593
  });
56577
56594
  };
56578
56595
  }
56579
56596
  var VENDOR_PUBLISHING_OUTPUT_SCHEMA = {
56580
- vendor: z115.string(),
56581
- known: z115.boolean(),
56597
+ vendor: z116.string(),
56598
+ known: z116.boolean(),
56582
56599
  // 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(),
56600
+ sha256SumsUrlPattern: z116.string().optional(),
56601
+ sha256SumsSignatureUrlPattern: z116.string().optional(),
56602
+ signaturePattern: z116.string().optional(),
56603
+ gpgKeys: z116.array(z116.unknown()).optional(),
56604
+ releaseCadence: z116.string().optional(),
56605
+ keyRotationNotes: z116.string().optional(),
56606
+ vendorDocUrl: z116.string().optional(),
56607
+ citedAt: z116.string().optional(),
56591
56608
  // Fields below populate when known=false.
56592
- message: z115.string().optional(),
56593
- knownVendors: z115.array(z115.string()).optional()
56609
+ message: z116.string().optional(),
56610
+ knownVendors: z116.array(z116.string()).optional()
56594
56611
  };
56595
56612
  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
56613
  function registerVendorPublishingAuditTool(server, deps) {
@@ -56620,17 +56637,17 @@ function registerVendorPublishingAuditTool(server, deps) {
56620
56637
  }
56621
56638
 
56622
56639
  // src/mcp/tools/compare-data-feeds.ts
56623
- import { z as z116 } from "zod";
56640
+ import { z as z117 } from "zod";
56624
56641
  import * as path6 from "node:path";
56625
56642
  import * as fs7 from "node:fs";
56626
56643
  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(
56644
+ var CompareDataFeedsInputSchema = z117.object({
56645
+ feedAPath: z117.string().min(1).max(1e3).describe("Filesystem path to feed A (YAML or JSON, auto-detected by extension)"),
56646
+ feedBPath: z117.string().min(1).max(1e3).describe("Filesystem path to feed B"),
56647
+ keyPath: z117.string().min(1).max(200).describe(
56631
56648
  'Dotted path to the entry key, e.g. "id" or "name". Each entry must have this field.'
56632
56649
  ),
56633
- compareFields: z116.array(z116.string().min(1).max(200)).max(20).optional().describe(
56650
+ compareFields: z117.array(z117.string().min(1).max(200)).max(20).optional().describe(
56634
56651
  'Optional dotted field paths to compare across matched entries (e.g. ["license", "sha256"])'
56635
56652
  )
56636
56653
  });
@@ -56808,29 +56825,29 @@ function createCompareDataFeedsHandler(deps) {
56808
56825
  });
56809
56826
  return withToolError("Compare data feeds failed", logger62, () => {
56810
56827
  const result = executeCompare(validation.data);
56811
- return Promise.resolve(structuredToolSuccess(z116.object(COMPARE_OUTPUT_SCHEMA), result));
56828
+ return Promise.resolve(structuredToolSuccess(z117.object(COMPARE_OUTPUT_SCHEMA), result));
56812
56829
  });
56813
56830
  };
56814
56831
  }
56815
56832
  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()
56833
+ feedAPath: z117.string(),
56834
+ feedBPath: z117.string(),
56835
+ keyPath: z117.string(),
56836
+ counts: z117.object({
56837
+ entriesInA: z117.number(),
56838
+ entriesInB: z117.number(),
56839
+ onlyInA: z117.number(),
56840
+ onlyInB: z117.number(),
56841
+ inBoth: z117.number(),
56842
+ fieldDifferences: z117.number()
56826
56843
  }),
56827
- coverage: z116.object({
56828
- onlyInA: z116.array(z116.string()),
56829
- onlyInB: z116.array(z116.string()),
56830
- inBoth: z116.array(z116.string())
56844
+ coverage: z117.object({
56845
+ onlyInA: z117.array(z117.string()),
56846
+ onlyInB: z117.array(z117.string()),
56847
+ inBoth: z117.array(z117.string())
56831
56848
  }),
56832
- fieldDifferences: z116.array(z116.unknown()),
56833
- summary: z116.string()
56849
+ fieldDifferences: z117.array(z117.unknown()),
56850
+ summary: z117.string()
56834
56851
  };
56835
56852
  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
56853
  function registerCompareDataFeedsTool(server, deps) {
@@ -56861,9 +56878,9 @@ function registerCompareDataFeedsTool(server, deps) {
56861
56878
  }
56862
56879
 
56863
56880
  // 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")
56881
+ import { z as z118 } from "zod";
56882
+ var QueryTaskStateInputSchema = z118.object({
56883
+ taskId: z118.string().min(1).max(128).describe("Task ID whose structured state log should be read")
56867
56884
  });
56868
56885
  function queryTaskStateHandler(args, ctx) {
56869
56886
  const parsed = QueryTaskStateInputSchema.safeParse(args);
@@ -56898,7 +56915,7 @@ function queryTaskStateHandler(args, ctx) {
56898
56915
  function registerQueryTaskStateTool(server, deps) {
56899
56916
  const logger62 = deps.logger ?? createLogger({ tool: "query_task_state" });
56900
56917
  const toolSchema = {
56901
- taskId: z117.string().min(1).max(128).describe("Task ID whose structured state log should be read")
56918
+ taskId: z118.string().min(1).max(128).describe("Task ID whose structured state log should be read")
56902
56919
  };
56903
56920
  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
56921
  const secureHandler = createSecureHandler(queryTaskStateHandler, {
@@ -56920,28 +56937,28 @@ function registerQueryTaskStateTool(server, deps) {
56920
56937
  }
56921
56938
 
56922
56939
  // src/mcp/tools/ci-health-check-tool.ts
56923
- import { z as z120 } from "zod";
56940
+ import { z as z121 } from "zod";
56924
56941
 
56925
56942
  // src/mcp/tools/ci-health-log.ts
56926
56943
  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";
56944
+ import { z as z120 } from "zod";
56928
56945
 
56929
56946
  // src/mcp/tools/ci-health-types.ts
56930
- import { z as z118 } from "zod";
56931
- var CiHealthStatusSchema = z118.enum(["healthy", "degraded", "outage", "unknown"]);
56947
+ import { z as z119 } from "zod";
56948
+ var CiHealthStatusSchema = z119.enum(["healthy", "degraded", "outage", "unknown"]);
56932
56949
 
56933
56950
  // src/mcp/tools/ci-health-log.ts
56934
56951
  var logger56 = createLogger({ component: "ci-health-log" });
56935
- var CiHealthEventSchema = z119.object({
56936
- v: z119.literal(1),
56937
- ts: z119.iso.datetime(),
56952
+ var CiHealthEventSchema = z120.object({
56953
+ v: z120.literal(1),
56954
+ ts: z120.iso.datetime(),
56938
56955
  status: CiHealthStatusSchema,
56939
- repo: z119.string().optional(),
56940
- signals: z119.array(
56941
- z119.object({
56942
- source: z119.enum(["github-status", "repo-activity-window"]),
56956
+ repo: z120.string().optional(),
56957
+ signals: z120.array(
56958
+ z120.object({
56959
+ source: z120.enum(["github-status", "repo-activity-window"]),
56943
56960
  status: CiHealthStatusSchema,
56944
- evidence: z119.string()
56961
+ evidence: z120.string()
56945
56962
  })
56946
56963
  )
56947
56964
  });
@@ -57021,17 +57038,17 @@ function eventFromCheck(params) {
57021
57038
  }
57022
57039
 
57023
57040
  // src/mcp/tools/ci-health-check-tool.ts
57024
- var CiHealthCheckInputSchema = z120.object({
57041
+ var CiHealthCheckInputSchema = z121.object({
57025
57042
  /**
57026
57043
  * Repo to check for the recent-runs activity signal (in `owner/repo` form).
57027
57044
  * Optional — when omitted, only the status-page signal is consulted.
57028
57045
  */
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."),
57046
+ 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
57047
  /**
57031
57048
  * How far back to look for recent-runs activity (minutes). Default 30 —
57032
57049
  * matches the typical wedge-detection window from the #3070 / #3076 outages.
57033
57050
  */
57034
- activityWindowMinutes: z120.number().int().min(5).max(180).default(30).describe("Recent-runs lookback window in minutes (5-180; default 30).")
57051
+ activityWindowMinutes: z121.number().int().min(5).max(180).default(30).describe("Recent-runs lookback window in minutes (5-180; default 30).")
57035
57052
  });
57036
57053
  var STATUS_PAGE_URL = "https://www.githubstatus.com/api/v2/components.json";
57037
57054
  function mapStatusPageStatus(raw) {
@@ -57190,8 +57207,8 @@ var DESCRIPTION = "Check CI infrastructure health before triggering / polling ru
57190
57207
  function registerCiHealthCheckTool(server, deps) {
57191
57208
  const logger62 = deps.logger ?? createLogger({ tool: "ci_health_check" });
57192
57209
  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).")
57210
+ 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."),
57211
+ activityWindowMinutes: z121.number().int().min(5).max(180).optional().describe("Recent-runs lookback window in minutes (5-180; default 30).")
57195
57212
  };
57196
57213
  const secureHandler = createSecureHandler((args) => ciHealthCheckHandler(args, logger62), {
57197
57214
  toolName: "ci_health_check",
@@ -57218,18 +57235,18 @@ function registerCiHealthCheckTool(server, deps) {
57218
57235
 
57219
57236
  // src/mcp/tools/quality-gate-tool.ts
57220
57237
  import { statSync as statSync6 } from "node:fs";
57221
- import { z as z121 } from "zod";
57222
- var QualityCheckSchema = z121.enum(["typecheck", "lint", "tests", "build", "security"]);
57238
+ import { z as z122 } from "zod";
57239
+ var QualityCheckSchema = z122.enum(["typecheck", "lint", "tests", "build", "security"]);
57223
57240
  var DEFAULT_CHECKS = ["typecheck", "lint", "tests"];
57224
- var RunQualityGateInputSchema = z121.object({
57241
+ var RunQualityGateInputSchema = z122.object({
57225
57242
  /** Project directory to run checks against. Must resolve inside the repo/cwd root. */
57226
- projectDir: z121.string().max(500).optional().describe(
57243
+ projectDir: z122.string().max(500).optional().describe(
57227
57244
  "Project directory to run checks against (default: cwd). Must stay inside the repo root."
57228
57245
  ),
57229
57246
  /** Which allowlisted checks to run. */
57230
- checks: z121.array(QualityCheckSchema).nonempty().default([...DEFAULT_CHECKS]).describe("Allowlisted checks to run (default: ['typecheck','lint','tests'])."),
57247
+ checks: z122.array(QualityCheckSchema).nonempty().default([...DEFAULT_CHECKS]).describe("Allowlisted checks to run (default: ['typecheck','lint','tests'])."),
57231
57248
  /** 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).")
57249
+ iteration: z122.number().int().min(1).max(100).default(1).describe("1-based iteration number (default 1).")
57233
57250
  });
57234
57251
  function validateProjectDir(raw) {
57235
57252
  const candidate = raw ?? process.cwd();
@@ -57304,11 +57321,11 @@ var DESCRIPTION2 = "Run the QA quality gate (#1684 engine) against a project dir
57304
57321
  function registerRunQualityGateTool(server, deps) {
57305
57322
  const logger62 = deps.logger ?? createLogger({ tool: "run_quality_gate" });
57306
57323
  const toolSchema = {
57307
- projectDir: z121.string().max(500).optional().describe(
57324
+ projectDir: z122.string().max(500).optional().describe(
57308
57325
  "Project directory to run checks against (default: cwd). Must stay inside the repo root."
57309
57326
  ),
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).")
57327
+ checks: z122.array(QualityCheckSchema).nonempty().optional().describe("Allowlisted checks to run (default: ['typecheck','lint','tests'])."),
57328
+ iteration: z122.number().int().min(1).max(100).optional().describe("1-based iteration number (default 1).")
57312
57329
  };
57313
57330
  const secureHandler = createSecureHandler(
57314
57331
  (args) => runQualityGateHandler(args, logger62),
@@ -57338,7 +57355,7 @@ function registerRunQualityGateTool(server, deps) {
57338
57355
  // src/mcp/tools/verify-audit-chain-tool.ts
57339
57356
  import * as fs8 from "node:fs/promises";
57340
57357
  import * as path7 from "node:path";
57341
- import { z as z122 } from "zod";
57358
+ import { z as z123 } from "zod";
57342
57359
 
57343
57360
  // src/cli-server-auth.ts
57344
57361
  function resolveAuthEnabled(config) {
@@ -57512,11 +57529,11 @@ function logSecurityConfig(logger62, config) {
57512
57529
  }
57513
57530
 
57514
57531
  // src/mcp/tools/verify-audit-chain-tool.ts
57515
- var VerifyAuditChainInputSchema = z122.object({
57516
- logDir: z122.string().min(1).max(512).describe(
57532
+ var VerifyAuditChainInputSchema = z123.object({
57533
+ logDir: z123.string().min(1).max(512).describe(
57517
57534
  "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
57535
  ),
57519
- filePrefix: z122.string().min(1).max(64).optional().default(DEFAULT_AUDIT_FILE_PREFIX).describe(
57536
+ filePrefix: z123.string().min(1).max(64).optional().default(DEFAULT_AUDIT_FILE_PREFIX).describe(
57520
57537
  'Filename prefix for audit log files (defaults to "audit"). Files matching `${filePrefix}-*.jsonl` will be verified.'
57521
57538
  )
57522
57539
  });
@@ -57645,10 +57662,10 @@ async function handler2(args, ctx, security) {
57645
57662
  function registerVerifyAuditChainTool(server, deps) {
57646
57663
  const logger62 = deps.logger ?? createLogger({ tool: "verify_audit_chain" });
57647
57664
  const toolSchema = {
57648
- logDir: z122.string().min(1).max(512).describe(
57665
+ logDir: z123.string().min(1).max(512).describe(
57649
57666
  "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
57667
  ),
57651
- filePrefix: z122.string().min(1).max(64).optional().describe(
57668
+ filePrefix: z123.string().min(1).max(64).optional().describe(
57652
57669
  'Filename prefix for audit log files (defaults to "audit"). Files matching `${filePrefix}-*.jsonl` will be verified.'
57653
57670
  )
57654
57671
  };
@@ -57672,7 +57689,7 @@ function registerVerifyAuditChainTool(server, deps) {
57672
57689
  }
57673
57690
 
57674
57691
  // src/mcp/tools/suggest-research-tasks-tool.ts
57675
- import { z as z123 } from "zod";
57692
+ import { z as z124 } from "zod";
57676
57693
  var SUGGEST_RESEARCH_TASKS_NOTE = "Suggestions derived from external research (untrusted); review before acting \u2014 nothing was executed or filed.";
57677
57694
  var RESEARCH_BUDGET_MS = 2e4;
57678
57695
  var RESEARCH_TIMED_OUT = /* @__PURE__ */ Symbol("research-budget-exceeded");
@@ -57689,11 +57706,11 @@ async function withResearchBudget(p, ms) {
57689
57706
  if (timer !== void 0) clearTimeout(timer);
57690
57707
  }
57691
57708
  }
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.")
57709
+ var SuggestResearchTasksInputSchema = z124.object({
57710
+ topic: z124.string().optional().describe("Topic filter passed to research_discover. Optional."),
57711
+ qualityThreshold: z124.number().min(0).max(10).optional().describe("Minimum quality score (0-10) a discovery must meet to be suggested. Optional."),
57712
+ maxTriggers: z124.number().int().min(1).max(50).optional().describe("Max number of candidate tasks to return (>=1). Optional."),
57713
+ existingTaskIds: z124.array(z124.string()).optional().describe("Known task IDs to skip (dedup). Optional.")
57697
57714
  });
57698
57715
  function toTriggerConfig(input) {
57699
57716
  return {
@@ -57750,10 +57767,10 @@ var DESCRIPTION3 = "SUGGEST-ONLY: surface candidate pipeline tasks for human/orc
57750
57767
  function registerSuggestResearchTasksTool(server, deps) {
57751
57768
  const logger62 = deps.logger ?? createLogger({ tool: "suggest_research_tasks" });
57752
57769
  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.")
57770
+ topic: z124.string().optional().describe("Topic filter passed to research_discover. Optional."),
57771
+ qualityThreshold: z124.number().min(0).max(10).optional().describe("Minimum quality score (0-10) a discovery must meet to be suggested. Optional."),
57772
+ maxTriggers: z124.number().int().min(1).max(50).optional().describe("Max number of candidate tasks to return (>=1). Optional."),
57773
+ existingTaskIds: z124.array(z124.string()).optional().describe("Known task IDs to skip (dedup). Optional.")
57757
57774
  };
57758
57775
  const secureHandler = createSecureHandler(
57759
57776
  (args) => suggestResearchTasksHandler(args, logger62),
@@ -57781,7 +57798,7 @@ function registerSuggestResearchTasksTool(server, deps) {
57781
57798
  }
57782
57799
 
57783
57800
  // src/mcp/tools/run-tool.ts
57784
- import { z as z127 } from "zod";
57801
+ import { z as z128 } from "zod";
57785
57802
  import { randomUUID as randomUUID20 } from "node:crypto";
57786
57803
 
57787
57804
  // src/orchestration/consensus-enforcement-mode.ts
@@ -58403,7 +58420,7 @@ function createMetaOrchestrator(options) {
58403
58420
 
58404
58421
  // src/orchestration/meta-shadow-selector.ts
58405
58422
  import { appendFileSync as appendFileSync6, existsSync as existsSync18, readFileSync as readFileSync15 } from "node:fs";
58406
- import { z as z124 } from "zod";
58423
+ import { z as z125 } from "zod";
58407
58424
  var SHADOW_STRATEGY_ARMS = [
58408
58425
  "single-shot",
58409
58426
  "dev-pipeline",
@@ -58492,19 +58509,19 @@ function createHydratableSelector() {
58492
58509
  var META_OUTCOME_SCHEMA_VERSION = 1;
58493
58510
  var HYDRATE_LOOKBACK_DAYS = 30;
58494
58511
  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(),
58512
+ var PersistedContextSchema = z125.object({
58513
+ taskComplexity: z125.number(),
58514
+ contextLengthNormalized: z125.number(),
58515
+ isCodeTask: z125.number(),
58516
+ isReasoningTask: z125.number(),
58517
+ budgetUtilization: z125.number(),
58518
+ timePressure: z125.number()
58519
+ });
58520
+ var PersistedMetaOutcomeSchema = z125.object({
58521
+ schema: z125.literal(META_OUTCOME_SCHEMA_VERSION),
58522
+ timestamp: z125.string(),
58523
+ strategy: z125.enum(SHADOW_STRATEGY_ARMS),
58524
+ success: z125.boolean(),
58508
58525
  context: PersistedContextSchema
58509
58526
  });
58510
58527
  var persistLogger = createLogger({ component: "MetaShadowSelector" });
@@ -58897,7 +58914,7 @@ function evaluateMetaStrategyReadiness(result, config = DEFAULT_META_STRATEGY_RE
58897
58914
  }
58898
58915
 
58899
58916
  // src/mcp/tools/dev-pipeline-tool.ts
58900
- import { z as z125 } from "zod";
58917
+ import { z as z126 } from "zod";
58901
58918
  import * as fs10 from "node:fs";
58902
58919
  import { randomUUID as randomUUID18 } from "node:crypto";
58903
58920
 
@@ -59163,42 +59180,42 @@ var DEV_PIPELINE_DRY_RUN_NOTE = "This was a dry run (plan+vote), which always ru
59163
59180
  function dispatchNoteFor(dryRun) {
59164
59181
  return dryRun ? DEV_PIPELINE_DRY_RUN_NOTE : DEV_PIPELINE_ASYNC_HINT;
59165
59182
  }
59166
- var DevPipelineInputSchema = z125.object({
59183
+ var DevPipelineInputSchema = z126.object({
59167
59184
  /** Direct task instructions. */
59168
- task: z125.string().max(1e4).optional().describe("Direct task instructions (what to build)"),
59185
+ task: z126.string().max(1e4).optional().describe("Direct task instructions (what to build)"),
59169
59186
  /** Declared provenance of the task text (#6795); omitted means '3'. */
59170
59187
  sourceTrustTier: TaskSourceTrustTierSchema,
59171
59188
  /** 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"),
59189
+ planFile: z126.string().max(500).optional().describe("Path to a plan/spec file to use as input"),
59173
59190
  /** 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)"),
59191
+ dryRun: z126.boolean().default(false).describe("If true, stop after plan+vote (no implementation)"),
59175
59192
  /** Maximum vote iterations before proceeding (default: 3). */
59176
- maxVoteIterations: z125.number().int().min(1).max(5).default(3).describe("Max plan\u2192vote iterations"),
59193
+ maxVoteIterations: z126.number().int().min(1).max(5).default(3).describe("Max plan\u2192vote iterations"),
59177
59194
  /** 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"),
59195
+ maxQaIterations: z126.number().int().min(1).max(5).default(3).describe("Max QA review iterations per task"),
59179
59196
  /** 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)"),
59197
+ workingDir: z126.string().max(500).optional().describe("Working directory (default: cwd)"),
59181
59198
  /** 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"),
59199
+ issueNumber: z126.number().int().positive().optional().describe("GitHub issue to post progress to"),
59183
59200
  /** GitHub repo (owner/name) for issue tracking. */
59184
- repo: z125.string().max(200).optional().describe("GitHub repo for issue tracking (e.g., owner/repo)"),
59201
+ repo: z126.string().max(200).optional().describe("GitHub repo for issue tracking (e.g., owner/repo)"),
59185
59202
  /** 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"),
59203
+ trackerBackend: z126.enum(["github", "gitlab", "json"]).default("json").describe("Task tracking backend for issue creation"),
59187
59204
  /** Labels to apply to created issues. */
59188
- labels: z125.array(z125.string()).optional().describe("Labels for created issues"),
59205
+ labels: z126.array(z126.string()).optional().describe("Labels for created issues"),
59189
59206
  /** 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)"),
59207
+ sessionId: z126.string().max(128).regex(/^[a-zA-Z0-9_-]+$/).optional().describe("Session ID for checkpoint/resume (crash recovery)"),
59191
59208
  /**
59192
59209
  * TESTS ONLY — when true, voters return random decisions. Must not be used as
59193
59210
  * a fallback when adapters are unavailable; configure an adapter instead. (#2319)
59194
59211
  */
59195
- simulateVotes: z125.boolean().default(false).describe("TESTS ONLY \u2014 random output, must not be used for real decisions (#2319)"),
59212
+ simulateVotes: z126.boolean().default(false).describe("TESTS ONLY \u2014 random output, must not be used for real decisions (#2319)"),
59196
59213
  /** Voting strategy for consensus stages. */
59197
59214
  votingStrategy: VotingStrategySchema.optional().describe(
59198
59215
  "Voting strategy for plan approval (default: higher_order)"
59199
59216
  ),
59200
59217
  /** Start with the canonical quick panel; approvals may trigger a full-panel re-vote. */
59201
- quickMode: z125.boolean().default(false).describe(
59218
+ quickMode: z126.boolean().default(false).describe(
59202
59219
  "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
59220
  ),
59204
59221
  /**
@@ -59206,7 +59223,7 @@ var DevPipelineInputSchema = z125.object({
59206
59223
  * budget for the whole run (#6736). Replaces every stage's default, the
59207
59224
  * vote's included; clamped to the `pipeline` class guard.
59208
59225
  */
59209
- timeoutMs: z125.number().int().min(3e4).max(6e5).optional().describe(
59226
+ timeoutMs: z126.number().int().min(3e4).max(6e5).optional().describe(
59210
59227
  "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
59228
  ),
59212
59229
  /**
@@ -59214,7 +59231,7 @@ var DevPipelineInputSchema = z125.object({
59214
59231
  * dispatch. A caller who learned `mode: 'async'` elsewhere gets an error
59215
59232
  * naming `dispatch` rather than the bare enum message (#4968).
59216
59233
  */
59217
- mode: z125.enum(["autonomous", "harness"], { error: modeEnumErrorNamingDispatch }).default("autonomous").describe(
59234
+ mode: z126.enum(["autonomous", "harness"], { error: modeEnumErrorNamingDispatch }).default("autonomous").describe(
59218
59235
  "'autonomous': full pipeline. 'harness': stops after decompose, returns tasks for caller to implement. (Not the async switch \u2014 that is `dispatch`.)"
59219
59236
  ),
59220
59237
  /**
@@ -59228,11 +59245,11 @@ var DevPipelineInputSchema = z125.object({
59228
59245
  */
59229
59246
  dispatch: dispatchFieldDefaultSync("Ignored for dryRun."),
59230
59247
  /** Local pre-ship quality gate (typecheck/lint/tests) mode (#3356). */
59231
- qualityGate: z125.enum(["off", "advisory", "blocking"]).default("off").describe(
59248
+ qualityGate: z126.enum(["off", "advisory", "blocking"]).default("off").describe(
59232
59249
  "Pre-ship local quality gate. 'off' (default): skip. 'advisory': run + record feedback, never fail. 'blocking': a red gate fails the pipeline."
59233
59250
  ),
59234
59251
  /** Opt-in per-run token budget — a safety cap for unattended runs (#3395). */
59235
- maxBudgetTokens: z125.number().int().positive().optional().describe(
59252
+ maxBudgetTokens: z126.number().int().positive().optional().describe(
59236
59253
  "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
59254
  )
59238
59255
  });
@@ -59321,7 +59338,7 @@ async function executeDevPipelineBody(taskText, stages, pipelineOptions, simulat
59321
59338
  });
59322
59339
  return { ...error, content: [{ type: "text", text: describeFailureText(result) }] };
59323
59340
  }
59324
- return structuredToolSuccess(z125.record(z125.string(), z125.unknown()), output2);
59341
+ return structuredToolSuccess(z126.record(z126.string(), z126.unknown()), output2);
59325
59342
  }
59326
59343
  function describeIncompleteRun(result) {
59327
59344
  if (result.planStatus !== void 0) {
@@ -59487,33 +59504,33 @@ function registerDevPipelineTool(server, deps) {
59487
59504
  }
59488
59505
 
59489
59506
  // src/mcp/tools/pipeline-tool.ts
59490
- import { z as z126 } from "zod";
59507
+ import { z as z127 } from "zod";
59491
59508
  import * as fs11 from "node:fs";
59492
59509
  import { randomUUID as randomUUID19 } from "node:crypto";
59493
59510
  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({
59511
+ var PipelineInputSchema = z127.object({
59495
59512
  /** The task to execute. */
59496
- task: z126.string().min(5).max(1e4).describe("Task description \u2014 pipeline template auto-selected based on content"),
59513
+ task: z127.string().min(5).max(1e4).describe("Task description \u2014 pipeline template auto-selected based on content"),
59497
59514
  /** 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"),
59515
+ specFile: z127.string().max(500).optional().describe("Path to a spec file \u2014 content prepended to task for greenfield projects"),
59499
59516
  /** 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(", ")}`),
59517
+ template: z127.string().max(50).optional().describe(`Pipeline template override. Available: ${listTemplateIds().join(", ")}`),
59501
59518
  /** Voting strategy for consensus stages. */
59502
59519
  votingStrategy: VotingStrategySchema.optional().describe(
59503
59520
  "Voting strategy for plan approval. simple_majority (default), supermajority (67%), unanimous, higher_order (Bayesian), opinion_wise"
59504
59521
  ),
59505
59522
  /** 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"),
59523
+ quickMode: z127.boolean().default(false).describe("Use 3 agents instead of 7 for faster consensus voting"),
59507
59524
  /**
59508
59525
  * Deadline for EACH stage in milliseconds (min 30s, max 600s), not a budget
59509
59526
  * for the whole run (#6730). Replaces every stage's default, the vote's
59510
59527
  * included; clamped to the `pipeline` class guard.
59511
59528
  */
59512
- timeoutMs: z126.number().int().min(3e4).max(6e5).optional().describe(
59529
+ timeoutMs: z127.number().int().min(3e4).max(6e5).optional().describe(
59513
59530
  "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
59531
  ),
59515
59532
  /** Stop after planning/voting (no implementation). */
59516
- dryRun: z126.boolean().default(false).describe("Stop after vote stage (no implementation)"),
59533
+ dryRun: z127.boolean().default(false).describe("Stop after vote stage (no implementation)"),
59517
59534
  /**
59518
59535
  * Dispatch mode (#3730). `sync` (default) runs the pipeline inline and
59519
59536
  * returns the result — but a real multi-stage adaptive run can exceed the
@@ -59524,7 +59541,7 @@ var PipelineInputSchema = z126.object({
59524
59541
  */
59525
59542
  ...asyncDispatchInputDefaultSync("Ignored for dryRun."),
59526
59543
  /** 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)")
59544
+ simulateVotes: z127.boolean().default(false).describe("TESTS ONLY \u2014 random output, must not be used for real decisions (#2319)")
59528
59545
  });
59529
59546
  function buildOutput3(result, simulated) {
59530
59547
  return {
@@ -59550,14 +59567,14 @@ function buildOutput3(result, simulated) {
59550
59567
  rateLimitHint: result.error?.toLowerCase().includes("rate limit") === true ? "Consider using quickMode or increasing delay between pipeline runs" : void 0
59551
59568
  };
59552
59569
  }
59553
- var VoteEvidenceSchema = z126.object({
59554
- approvalPercentage: z126.number(),
59555
- voteRecordId: z126.string().optional()
59570
+ var VoteEvidenceSchema = z127.object({
59571
+ approvalPercentage: z127.number(),
59572
+ voteRecordId: z127.string().optional()
59556
59573
  });
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() })
59574
+ var VoteResultSchema = z127.discriminatedUnion("kind", [
59575
+ VoteEvidenceSchema.extend({ kind: z127.literal("approved") }),
59576
+ VoteEvidenceSchema.extend({ kind: z127.literal("rejected"), feedback: z127.string() }),
59577
+ VoteEvidenceSchema.extend({ kind: z127.literal("no_quorum"), reason: z127.string() })
59561
59578
  ]);
59562
59579
  function isVoteResult(value) {
59563
59580
  return VoteResultSchema.safeParse(value).success;
@@ -59659,7 +59676,7 @@ async function executePipelineBody(task, stages, run) {
59659
59676
  detail: output2
59660
59677
  });
59661
59678
  }
59662
- return structuredToolSuccess(z126.record(z126.string(), z126.unknown()), output2);
59679
+ return structuredToolSuccess(z127.record(z127.string(), z127.unknown()), output2);
59663
59680
  }
59664
59681
  function createPipelineAgentStages(input, config) {
59665
59682
  return createAgentStages({
@@ -59809,9 +59826,9 @@ function cancellableExecutor(strategy, executor, signal) {
59809
59826
  }
59810
59827
 
59811
59828
  // 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([
59829
+ var RunInputSchema = z128.object({
59830
+ goal: z128.string().min(1).describe("Natural-language goal. nexus-agents selects how to execute it."),
59831
+ forceStrategy: z128.enum([
59815
59832
  "single-shot",
59816
59833
  "dev-pipeline",
59817
59834
  "pipeline",
@@ -59823,10 +59840,10 @@ var RunInputSchema = z127.object({
59823
59840
  ]).optional().describe(
59824
59841
  "Power-user override: force a specific strategy instead of letting the router choose."
59825
59842
  ),
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(
59843
+ requiresConsensus: z128.boolean().optional().describe("Hint: the task needs a multi-perspective consensus decision."),
59844
+ dependencyStructure: z128.enum(["linear", "dag", "independent", "unknown"]).optional().describe("Hint: the dependency structure of the work."),
59845
+ isNovel: z128.boolean().optional().describe("Hint: this kind of task has not been seen before."),
59846
+ execute: z128.boolean().optional().describe(
59830
59847
  "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
59848
  ),
59832
59849
  /**
@@ -59841,7 +59858,7 @@ var RunInputSchema = z127.object({
59841
59858
  * other, the call is REFUSED rather than executed: silently ignoring a
59842
59859
  * do-not-act flag is the one outcome a governance substrate cannot allow.
59843
59860
  */
59844
- dryRun: z127.boolean().optional().describe(
59861
+ dryRun: z128.boolean().optional().describe(
59845
59862
  "Plan and vote only, no implementation (#4806). Requires the dev-pipeline strategy \u2014 refused (never silently executed) when the router selects another."
59846
59863
  ),
59847
59864
  /**
@@ -60077,12 +60094,12 @@ function registerRunTool(server, deps) {
60077
60094
  }
60078
60095
 
60079
60096
  // src/mcp/tools/list-available-models-tool.ts
60080
- import { z as z128 } from "zod";
60097
+ import { z as z129 } from "zod";
60081
60098
  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
60099
  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).")
60100
+ var ListAvailableModelsInputSchema = z129.object({
60101
+ includeModelIds: z129.boolean().optional().describe("Include the full model-id list per transport (default false \u2192 sample of 5 only)."),
60102
+ includeOpenRouter: z129.boolean().optional().describe("Probe the OpenRouter live catalog (default true).")
60086
60103
  });
60087
60104
  async function probeSource(source, includeModelIds) {
60088
60105
  let timer;
@@ -60191,8 +60208,8 @@ async function listAvailableModelsHandler(args, deps, logger62) {
60191
60208
  function registerListAvailableModelsTool(server, deps) {
60192
60209
  const logger62 = deps.logger ?? createLogger({ tool: "list_available_models" });
60193
60210
  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).")
60211
+ includeModelIds: z129.boolean().optional().describe("Include the full model-id list per transport (default false \u2192 sample of 5 only)."),
60212
+ includeOpenRouter: z129.boolean().optional().describe("Probe the OpenRouter live catalog (default true).")
60196
60213
  };
60197
60214
  const secureHandler = createSecureHandler(
60198
60215
  (args) => listAvailableModelsHandler(args, deps, logger62),
@@ -60216,9 +60233,9 @@ function registerListAvailableModelsTool(server, deps) {
60216
60233
  }
60217
60234
 
60218
60235
  // src/mcp/tools/pr-review-eval-types.ts
60219
- import { z as z129 } from "zod";
60236
+ import { z as z130 } from "zod";
60220
60237
  var MAX_EVAL_FINDINGS = 100;
60221
- var VoterEvalFindingSchema = z129.object({
60238
+ var VoterEvalFindingSchema = z130.object({
60222
60239
  summary: RawFindingSchema.shape.summary,
60223
60240
  location: RawFindingSchema.shape.location,
60224
60241
  severity: RawFindingSchema.shape.severity.unwrap(),
@@ -60226,14 +60243,14 @@ var VoterEvalFindingSchema = z129.object({
60226
60243
  gate: RawFindingSchema.shape.gate.extend({
60227
60244
  named_assertion: RawFindingSchema.shape.claim.min(0)
60228
60245
  }).optional(),
60229
- verified: z129.boolean().optional(),
60230
- classification: z129.enum(["TP", "FP", "FN", "excluded"]),
60231
- source: z129.enum(["voter", "ground_truth"]),
60246
+ verified: z130.boolean().optional(),
60247
+ classification: z130.enum(["TP", "FP", "FN", "excluded"]),
60248
+ source: z130.enum(["voter", "ground_truth"]),
60232
60249
  /** 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(),
60250
+ findingIndex: z130.number().int().nonnegative().optional(),
60251
+ knownBugIndex: z130.number().int().nonnegative().optional(),
60235
60252
  /** String fields shortened by the producer, never silently truncated. */
60236
- truncatedFields: z129.array(z129.enum(["summary", "location", "rationale", "gate.named_assertion"])).max(4).optional()
60253
+ truncatedFields: z130.array(z130.enum(["summary", "location", "rationale", "gate.named_assertion"])).max(4).optional()
60237
60254
  });
60238
60255
  var PR_REVIEW_EVAL_ROLES = [
60239
60256
  "architect",
@@ -60242,47 +60259,47 @@ var PR_REVIEW_EVAL_ROLES = [
60242
60259
  "catfish",
60243
60260
  "scope_steward"
60244
60261
  ];
60245
- var PrReviewEvalRoleSchema = z129.enum(PR_REVIEW_EVAL_ROLES);
60246
- var PrReviewCaseClassSchema = z129.enum(["buggy", "clean", "borderline"]);
60247
- var VoterEvalVerdictSchema = z129.object({
60262
+ var PrReviewEvalRoleSchema = z130.enum(PR_REVIEW_EVAL_ROLES);
60263
+ var PrReviewCaseClassSchema = z130.enum(["buggy", "clean", "borderline"]);
60264
+ var VoterEvalVerdictSchema = z130.object({
60248
60265
  /** Stable record id (e.g. `${runId}:${caseNumber}:${role}`). */
60249
- id: z129.string().min(1).max(160),
60266
+ id: z130.string().min(1).max(160),
60250
60267
  /** The pr_review run / batch this verdict belongs to. */
60251
- runId: z129.string().min(1).max(64),
60268
+ runId: z130.string().min(1).max(64),
60252
60269
  /** Dataset case identifier (the dataset's `number` field). */
60253
- caseNumber: z129.string().min(1).max(80),
60270
+ caseNumber: z130.string().min(1).max(80),
60254
60271
  /** Rubric class of the case (ground-truth label). */
60255
60272
  caseClass: PrReviewCaseClassSchema,
60256
60273
  /** The voter role being scored. */
60257
60274
  role: PrReviewEvalRoleSchema,
60258
60275
  /** Verified findings that matched a known bug. */
60259
- truePositives: z129.number().int().nonnegative(),
60276
+ truePositives: z130.number().int().nonnegative(),
60260
60277
  /** Verified findings on clean code that matched no known bug. */
60261
- falsePositives: z129.number().int().nonnegative(),
60278
+ falsePositives: z130.number().int().nonnegative(),
60262
60279
  /** Known bugs this voter failed to flag. */
60263
- falseNegatives: z129.number().int().nonnegative(),
60280
+ falseNegatives: z130.number().int().nonnegative(),
60264
60281
  /** Optional for legacy records/count-only callers; [] means measured, no evidence. */
60265
- findings: z129.array(VoterEvalFindingSchema).max(MAX_EVAL_FINDINGS).optional(),
60282
+ findings: z130.array(VoterEvalFindingSchema).max(MAX_EVAL_FINDINGS).optional(),
60266
60283
  /** Number of evidence entries omitted at the cap; full tallies are unchanged. */
60267
- findingsTruncated: z129.number().int().nonnegative().optional(),
60284
+ findingsTruncated: z130.number().int().nonnegative().optional(),
60268
60285
  /** Rubric version the ground truth was adjudicated under. */
60269
- rubricVersion: z129.string().min(1).max(32),
60286
+ rubricVersion: z130.string().min(1).max(32),
60270
60287
  /** ISO-8601 timestamp the verdict was recorded. */
60271
- timestamp: z129.string().min(1).max(40)
60288
+ timestamp: z130.string().min(1).max(40)
60272
60289
  });
60273
- var VoterEvalVerdictQuerySchema = z129.object({
60290
+ var VoterEvalVerdictQuerySchema = z130.object({
60274
60291
  role: PrReviewEvalRoleSchema.optional(),
60275
- runId: z129.string().min(1).max(64).optional(),
60292
+ runId: z130.string().min(1).max(64).optional(),
60276
60293
  caseClass: PrReviewCaseClassSchema.optional(),
60277
- rubricVersion: z129.string().min(1).max(32).optional(),
60294
+ rubricVersion: z130.string().min(1).max(32).optional(),
60278
60295
  /** ISO-8601 lower bound (inclusive) on `timestamp`. */
60279
- since: z129.string().optional(),
60296
+ since: z130.string().optional(),
60280
60297
  /** Most-recent-N cap. */
60281
- limit: z129.number().int().positive().optional()
60298
+ limit: z130.number().int().positive().optional()
60282
60299
  });
60283
60300
 
60284
60301
  // src/mcp/tools/supply-chain-tradeoff-panel.ts
60285
- import { z as z130 } from "zod";
60302
+ import { z as z131 } from "zod";
60286
60303
  import { randomUUID as randomUUID21 } from "node:crypto";
60287
60304
  var DEFAULT_AXES = [
60288
60305
  "build_time_determinism",
@@ -60304,16 +60321,16 @@ var FULL_PANEL = [
60304
60321
  "scope_steward"
60305
60322
  ];
60306
60323
  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(
60324
+ var SupplyChainTradeoffPanelInputSchema = z131.object({
60325
+ proposal: z131.string().min(1).max(MAX_PROPOSAL_LENGTH2).describe('The proposal under tradeoff review (e.g. "Should aegis-boot adopt cargo-nextest?")'),
60326
+ axes: z131.array(z131.string().min(1).max(MAX_AXIS_NAME_LENGTH)).min(1).max(MAX_AXES).optional().describe(
60310
60327
  `Tradeoff axes to evaluate. Default: ${DEFAULT_AXES.join(", ")}. Custom axes accepted; max ${String(MAX_AXES)}.`
60311
60328
  ),
60312
- context: z130.string().max(MAX_CONTEXT_LENGTH).optional().describe(
60329
+ context: z131.string().max(MAX_CONTEXT_LENGTH).optional().describe(
60313
60330
  "Optional context: relevant repo state, dependency tree, vendor publishing patterns, etc."
60314
60331
  ),
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)"),
60332
+ quickMode: z131.boolean().optional().default(false).describe("Use 3 voters (architect, security, scope_steward) instead of 7"),
60333
+ simulate: z131.boolean().optional().default(false).describe("Use simulated voters (testing only)"),
60317
60334
  // #6123: same field as consensus_vote — the panel judges the caller's project.
60318
60335
  project: VoterProjectInputSchema,
60319
60336
  /**
@@ -60811,40 +60828,40 @@ var RiskLevel = /* @__PURE__ */ ((RiskLevel2) => {
60811
60828
  })(RiskLevel || {});
60812
60829
 
60813
60830
  // 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(),
60831
+ import { z as z132 } from "zod";
60832
+ var HazardCategorySchema = z132.enum(HazardCategory);
60833
+ var HazardSeveritySchema = z132.enum(HazardSeverity);
60834
+ var ConstraintPrioritySchema = z132.enum(ConstraintPriority);
60835
+ var RiskLevelSchema = z132.enum(RiskLevel);
60836
+ var TriggerPatternSchema = z132.object({
60837
+ parameter: z132.string().min(1),
60838
+ matchType: z132.enum(["contains", "regex", "equals", "startsWith", "endsWith"]),
60839
+ pattern: z132.string(),
60840
+ reason: z132.string()
60841
+ });
60842
+ var HazardSchema = z132.object({
60843
+ id: z132.string().min(1),
60844
+ description: z132.string(),
60828
60845
  category: HazardCategorySchema,
60829
60846
  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([
60847
+ likelihood: z132.enum(["almost_certain", "likely", "possible", "unlikely", "rare"]),
60848
+ triggerConditions: z132.array(z132.string()),
60849
+ consequences: z132.array(z132.string())
60850
+ });
60851
+ var UnsafeControlActionSchema = z132.object({
60852
+ id: z132.string().min(1),
60853
+ toolName: z132.string().min(1),
60854
+ type: z132.enum(["not_provided", "provided_causes_hazard", "wrong_timing", "wrong_duration"]),
60855
+ description: z132.string(),
60856
+ unsafeContext: z132.string(),
60857
+ relatedHazards: z132.array(z132.string()),
60858
+ triggerPatterns: z132.array(TriggerPatternSchema).optional()
60859
+ });
60860
+ var SafetyConstraintSchema = z132.object({
60861
+ id: z132.string().min(1),
60862
+ description: z132.string(),
60863
+ mitigates: z132.array(z132.string()),
60864
+ enforcement: z132.enum([
60848
60865
  "prevent",
60849
60866
  "require_confirmation",
60850
60867
  "alert",
@@ -60852,52 +60869,52 @@ var SafetyConstraintSchema = z131.object({
60852
60869
  "rate_limit",
60853
60870
  "require_privilege"
60854
60871
  ]),
60855
- validationFunction: z131.string().optional(),
60872
+ validationFunction: z132.string().optional(),
60856
60873
  priority: ConstraintPrioritySchema
60857
60874
  });
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(),
60875
+ var PropertySchemaSchema = z132.object({
60876
+ type: z132.string(),
60877
+ description: z132.string().optional(),
60878
+ enum: z132.array(z132.unknown()).optional(),
60879
+ pattern: z132.string().optional(),
60880
+ minimum: z132.number().optional(),
60881
+ maximum: z132.number().optional()
60882
+ });
60883
+ var ToolInputSchemaSchema = z132.object({
60884
+ type: z132.string(),
60885
+ properties: z132.record(z132.string(), PropertySchemaSchema).optional(),
60886
+ required: z132.array(z132.string()).optional(),
60887
+ additionalProperties: z132.boolean().optional()
60888
+ });
60889
+ var ToolDefinitionSchema = z132.object({
60890
+ name: z132.string().min(1),
60891
+ description: z132.string(),
60875
60892
  inputSchema: ToolInputSchemaSchema
60876
60893
  });
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([])
60894
+ var AnalysisConfigurationSchema = z132.object({
60895
+ includeLowSeverity: z132.boolean().default(true),
60896
+ generateAllConstraints: z132.boolean().default(true),
60897
+ checkInteractions: z132.boolean().default(true),
60898
+ maxHazardsPerTool: z132.number().int().min(1).max(100).default(50),
60899
+ categories: z132.array(HazardCategorySchema).default([])
60883
60900
  });
60884
- var ConstraintViolationSchema = z131.object({
60885
- constraintId: z131.string().min(1),
60886
- constraintDescription: z131.string(),
60901
+ var ConstraintViolationSchema = z132.object({
60902
+ constraintId: z132.string().min(1),
60903
+ constraintDescription: z132.string(),
60887
60904
  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()),
60905
+ details: z132.string(),
60906
+ remediation: z132.string()
60907
+ });
60908
+ var ValidationWarningSchema = z132.object({
60909
+ code: z132.string().min(1),
60910
+ message: z132.string(),
60911
+ affected: z132.string()
60912
+ });
60913
+ var ValidationResultSchema = z132.object({
60914
+ valid: z132.boolean(),
60915
+ toolName: z132.string().min(1),
60916
+ violations: z132.array(ConstraintViolationSchema),
60917
+ passed: z132.array(z132.string()),
60901
60918
  // Optional rather than required, deliberately. `ValidationResult` declares
60902
60919
  // both fields required because every result this package produces has them;
60903
60920
  // the schema is the lenient inbound edge for a result that arrived from
@@ -60908,10 +60925,10 @@ var ValidationResultSchema = z131.object({
60908
60925
  // "nothing was evaluated". The strict/lenient split is safe because nothing
60909
60926
  // bridges the two with `z.infer`: a parsed result will not typecheck as a
60910
60927
  // `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()
60928
+ evaluated: z132.array(z132.string()).optional(),
60929
+ notApplicable: z132.array(z132.string()).optional(),
60930
+ warnings: z132.array(ValidationWarningSchema),
60931
+ validatedAt: z132.date()
60915
60932
  });
60916
60933
 
60917
60934
  // src/mcp/safety/stpa-types.ts
@@ -62011,18 +62028,18 @@ var GeminiResponseParser = class {
62011
62028
  };
62012
62029
 
62013
62030
  // src/cli-adapters/router-types.ts
62014
- import { z as z132 } from "zod";
62015
- var RouterConfigSchema = z132.object({
62016
- preferCostEfficient: z132.boolean().default(false)
62031
+ import { z as z133 } from "zod";
62032
+ var RouterConfigSchema = z133.object({
62033
+ preferCostEfficient: z133.boolean().default(false)
62017
62034
  });
62018
62035
 
62019
62036
  // 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()
62037
+ import { z as z134 } from "zod";
62038
+ var ClassificationPatternsSchema = z134.object({
62039
+ code: z134.array(z134.string()).readonly(),
62040
+ research: z134.array(z134.string()).readonly(),
62041
+ documentation: z134.array(z134.string()).readonly(),
62042
+ analysis: z134.array(z134.string()).readonly()
62026
62043
  });
62027
62044
 
62028
62045
  // src/security/sandbox/sandbox-types.ts
@@ -63424,4 +63441,4 @@ export {
63424
63441
  initializeSandbox,
63425
63442
  getSandboxMode
63426
63443
  };
63427
- //# sourceMappingURL=chunk-KX33QPIJ.js.map
63444
+ //# sourceMappingURL=chunk-TK723ERO.js.map