nexus-agents 8.68.0 → 8.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ import {
11
11
  NODE_ENGINE_RANGE,
12
12
  VERSION,
13
13
  isNodeVersionSupported
14
- } from "./chunk-QTJUYQPG.js";
14
+ } from "./chunk-YDBWWICY.js";
15
15
  import {
16
16
  claimGlobalRegistry
17
17
  } from "./chunk-WQWC52E7.js";
@@ -1314,7 +1314,7 @@ async function runDoctorFix(result) {
1314
1314
  writeLine2("\u2500".repeat(40));
1315
1315
  let fixCount = 0;
1316
1316
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1317
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-OOREJAO5.js");
1317
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-E372AVMR.js");
1318
1318
  const outcome = describeDataDirFix2(initDataDirectories2());
1319
1319
  writeLine2(outcome.line);
1320
1320
  if (outcome.counted) fixCount++;
@@ -1416,4 +1416,4 @@ export {
1416
1416
  startStdioServer,
1417
1417
  closeServer
1418
1418
  };
1419
- //# sourceMappingURL=chunk-WYSPB7DU.js.map
1419
+ //# sourceMappingURL=chunk-AMZEALD7.js.map
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-WYSPB7DU.js";
24
+ } from "./chunk-AMZEALD7.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-QO6S3VMQ.js";
@@ -71,7 +71,7 @@ import {
71
71
  updateStage,
72
72
  withWarnings,
73
73
  writeJobCancelled
74
- } from "./chunk-TTNKS2BK.js";
74
+ } from "./chunk-OQYN33KF.js";
75
75
  import {
76
76
  allOf,
77
77
  anyOf
@@ -93,7 +93,7 @@ import {
93
93
  } from "./chunk-CNOQ7NRP.js";
94
94
  import {
95
95
  withPrerequisite
96
- } from "./chunk-IDWPNADR.js";
96
+ } from "./chunk-J3KPS6LF.js";
97
97
  import {
98
98
  NOOP_NOTIFIER,
99
99
  RateLimiter,
@@ -116,7 +116,7 @@ import {
116
116
  toolSuccessStructured,
117
117
  withProgressHeartbeat,
118
118
  wrapToolWithTimeout
119
- } from "./chunk-JP7E5JI3.js";
119
+ } from "./chunk-HLOBTLXA.js";
120
120
  import {
121
121
  EventTopics,
122
122
  UNRESOLVED_MODEL_ID,
@@ -45845,7 +45845,7 @@ function buildVotingInput(plan, config) {
45845
45845
  }
45846
45846
  async function executeSingleVote(plan, config, log) {
45847
45847
  try {
45848
- const { executeVoting } = await import("./consensus-vote-HYHDOCKP.js");
45848
+ const { executeVoting } = await import("./consensus-vote-IZRLUOXF.js");
45849
45849
  const input = buildVotingInput(plan, config);
45850
45850
  const result = await executeVoting(input, log);
45851
45851
  return parseVotingResult(result);
@@ -47556,9 +47556,15 @@ function getTrendContext() {
47556
47556
  }
47557
47557
  function createAgentStages(config = {}) {
47558
47558
  const guard = createBudgetGuard(config.budget);
47559
- const trustTier = config.trustTier ?? UNMEASURED_TRUST_TIER;
47559
+ const callerTrustTier = config.callerTrustTier ?? config.trustTier ?? UNMEASURED_TRUST_TIER;
47560
+ const inputSanitization = config.inputSanitization ?? "unmeasured";
47560
47561
  const startStage = (stage) => {
47561
- emitStageEvent2(stage, "started", { trustTier });
47562
+ emitStageEvent2(stage, "started", {
47563
+ callerTrustTier,
47564
+ trustTier: callerTrustTier,
47565
+ inputSanitization,
47566
+ ...inputSanitization === "modified" && config.inputSanitizationCounts !== void 0 ? { inputSanitizationCounts: config.inputSanitizationCounts } : {}
47567
+ });
47562
47568
  };
47563
47569
  return {
47564
47570
  research: async (task) => {
@@ -47643,7 +47649,7 @@ ${contextBlock}`;
47643
47649
  const strategy = config.votingStrategy ?? "higher_order";
47644
47650
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47645
47651
  try {
47646
- const { executeVoting } = await import("./consensus-vote-HYHDOCKP.js");
47652
+ const { executeVoting } = await import("./consensus-vote-IZRLUOXF.js");
47647
47653
  const votingResult = await executeVoting(
47648
47654
  {
47649
47655
  proposal: buildVoteProposal(plan, research),
@@ -51963,6 +51969,20 @@ function createTaskTracker(config) {
51963
51969
  }
51964
51970
  }
51965
51971
 
51972
+ // src/mcp/tools/pipeline-input-sanitization.ts
51973
+ function measureInputSanitization(ctx) {
51974
+ const observation = ctx?.sanitization;
51975
+ if (observation === void 0) return { inputSanitization: "unmeasured" };
51976
+ const { wasModified, tagsRemoved, commentsRemoved, fieldsModified } = observation;
51977
+ if (!wasModified && tagsRemoved === 0 && commentsRemoved === 0) {
51978
+ return { inputSanitization: "unmodified" };
51979
+ }
51980
+ return {
51981
+ inputSanitization: "modified",
51982
+ inputSanitizationCounts: { tagsRemoved, commentsRemoved, fieldsModified }
51983
+ };
51984
+ }
51985
+
51966
51986
  // src/mcp/tools/dev-pipeline-tool.ts
51967
51987
  var DEV_PIPELINE_ASYNC_HINT = "A full run_dev_pipeline run can exceed the 900s synchronous MCP timeout. Retry with `dispatch: 'async'` to get a jobId immediately, then poll get_job_result({ jobId }) for the result.";
51968
51988
  var DEV_PIPELINE_DRY_RUN_NOTE = "This was a dry run (plan+vote), which always runs synchronously; async dispatch is ignored for dry runs, so retrying with it changes nothing.";
@@ -52058,12 +52078,13 @@ async function resolveTaskInput(input) {
52058
52078
  }
52059
52079
  throw new Error("Either task or planFile must be provided");
52060
52080
  }
52061
- async function createStages(input, trustTier) {
52081
+ async function createStages(input, trustTier, inputSanitization) {
52062
52082
  const backendChoice = input.trackerBackend;
52063
52083
  const backend = backendChoice === "json" && input.repo !== void 0 ? await detectBackend() : backendChoice;
52064
52084
  const tracker = input.repo !== void 0 ? createTaskTracker({ backend, repo: input.repo, labels: input.labels }) : void 0;
52065
52085
  return createAgentStages({
52066
- ...trustTier !== void 0 ? { trustTier } : {},
52086
+ ...trustTier !== void 0 ? { callerTrustTier: trustTier, trustTier } : {},
52087
+ ...inputSanitization,
52067
52088
  scanTarget: input.workingDir,
52068
52089
  simulateVotes: input.simulateVotes,
52069
52090
  votingStrategy: input.votingStrategy,
@@ -52082,7 +52103,7 @@ async function runDevPipelineForGoal(goal, trustTier, dryRun) {
52082
52103
  task: goal,
52083
52104
  ...dryRun !== void 0 ? { dryRun } : {}
52084
52105
  });
52085
- const stages = await createStages(input, trustTier);
52106
+ const stages = await createStages(input, trustTier, { inputSanitization: "unmeasured" });
52086
52107
  return runDevPipeline(goal, stages, {
52087
52108
  ...trustTier !== void 0 ? { trustTier } : {},
52088
52109
  // #4806 said `dryRun` is the one pipeline option `run` forwards. It parsed
@@ -52171,7 +52192,9 @@ function describeIncompleteRun(result) {
52171
52192
  }
52172
52193
  return "Pipeline did not complete";
52173
52194
  }
52174
- async function runDevPipelineHandler(args, logger57, trustTier, auditLogger) {
52195
+ async function runDevPipelineHandler(args, logger57, trustTier, auditLogger, inputSanitization = {
52196
+ inputSanitization: "unmeasured"
52197
+ }) {
52175
52198
  const parsed = DevPipelineInputSchema.safeParse(args);
52176
52199
  if (!parsed.success) {
52177
52200
  return toolStructuredError({
@@ -52188,7 +52211,7 @@ async function runDevPipelineHandler(args, logger57, trustTier, auditLogger) {
52188
52211
  }
52189
52212
  try {
52190
52213
  const taskText = await resolveTaskInput(input);
52191
- const stages = await createStages(input, trustTier);
52214
+ const stages = await createStages(input, trustTier, inputSanitization);
52192
52215
  const pipelineOptions = buildPipelineOptions(input, trustTier, auditLogger);
52193
52216
  const hasOptions = Object.keys(pipelineOptions).length > 0;
52194
52217
  const resolvedOptions = hasOptions ? pipelineOptions : void 0;
@@ -52243,7 +52266,13 @@ function dispatchAsyncDevPipeline(input, run, logger57) {
52243
52266
  function registerDevPipelineTool(server, deps) {
52244
52267
  const logger57 = deps.logger ?? createLogger({ tool: "run_dev_pipeline" });
52245
52268
  const secureHandler = createSecureHandler(
52246
- (args, ctx) => runDevPipelineHandler(args, logger57, measuredTrustTier(ctx.requestContext), deps.auditLogger),
52269
+ (args, ctx) => runDevPipelineHandler(
52270
+ args,
52271
+ logger57,
52272
+ ctx && measuredTrustTier(ctx.requestContext),
52273
+ deps.auditLogger,
52274
+ measureInputSanitization(ctx)
52275
+ ),
52247
52276
  { toolName: "run_dev_pipeline", rateLimiter: deps.rateLimiter, logger: logger57 }
52248
52277
  );
52249
52278
  const timeoutMs = getToolTimeout("run_dev_pipeline", deps.security);
@@ -52383,7 +52412,11 @@ function selectStageRegistry(template, task, agentStages) {
52383
52412
  var RUN_PIPELINE_DESCRIPTION = `Single unified entry point for all pipeline templates (${listTemplateIds().join("/")}). Auto-detects template from task content or accepts an explicit override. Supports dispatch: 'async' (non-dryRun runs) \u2014 returns a jobId immediately; poll get_job_result.`;
52384
52413
  async function runPipelineForGoal(goal, logger57 = createLogger({ tool: "run_pipeline" })) {
52385
52414
  const budget = resolveRunBudget(goal, void 0, logger57);
52386
- const agentStages = createAgentStages(budget !== void 0 ? { budget } : {});
52415
+ const agentStages = createAgentStages({
52416
+ budget,
52417
+ // Plain-goal pipeline/research strategies have no HandlerContext.
52418
+ inputSanitization: "unmeasured"
52419
+ });
52387
52420
  const stages = selectStageRegistry(void 0, goal, agentStages);
52388
52421
  return runAdaptiveOrchestrator(goal, { stages });
52389
52422
  }
@@ -52403,7 +52436,7 @@ async function executePipelineBody(task, stages, templateId, dryRun, simulated)
52403
52436
  }
52404
52437
  return toolSuccessStructured(output2);
52405
52438
  }
52406
- async function runPipelineHandler(args, logger57, trustTier) {
52439
+ async function runPipelineHandler(args, logger57, callerTrustTier, sanitization) {
52407
52440
  const parsed = PipelineInputSchema.safeParse(args);
52408
52441
  if (!parsed.success) {
52409
52442
  return toolStructuredError({
@@ -52424,9 +52457,9 @@ async function runPipelineHandler(args, logger57, trustTier) {
52424
52457
  simulateVotes: input.simulateVotes,
52425
52458
  votingStrategy: input.votingStrategy,
52426
52459
  quickMode: input.quickMode,
52427
- // #4694: record-only. Absent stays absent — createAgentStages stamps
52428
- // UNMEASURED_TRUST_TIER rather than inventing a trusted default.
52429
- ...trustTier !== void 0 ? { trustTier } : {},
52460
+ callerTrustTier,
52461
+ trustTier: callerTrustTier,
52462
+ ...sanitization,
52430
52463
  budget: resolveRunBudget(task, input.template, logger57)
52431
52464
  });
52432
52465
  const stages = selectStageRegistry(input.template, task, agentStages);
@@ -52456,7 +52489,12 @@ function registerPipelineTool(server, deps) {
52456
52489
  // Optional chaining is deliberate, not defensive noise: a handler invoked
52457
52490
  // without a context has genuinely NOT measured a tier, and that flows to
52458
52491
  // UNMEASURED_TRUST_TIER rather than to a default. Absence stays absence.
52459
- (args, ctx) => runPipelineHandler(args, logger57, ctx && measuredTrustTier(ctx.requestContext)),
52492
+ (args, ctx) => runPipelineHandler(
52493
+ args,
52494
+ logger57,
52495
+ ctx && measuredTrustTier(ctx.requestContext),
52496
+ measureInputSanitization(ctx)
52497
+ ),
52460
52498
  { toolName: "run_pipeline", rateLimiter: deps.rateLimiter, logger: logger57 }
52461
52499
  );
52462
52500
  const timeoutMs = getToolTimeout("run_pipeline", deps.security);
@@ -56856,4 +56894,4 @@ export {
56856
56894
  startPipelineEventBridge,
56857
56895
  shutdownPipelineEventBridge
56858
56896
  };
56859
- //# sourceMappingURL=chunk-GU6HQ7P3.js.map
56897
+ //# sourceMappingURL=chunk-BO6BL2H7.js.map