nexus-agents 8.90.0 → 8.91.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.
@@ -1,6 +1,6 @@
1
1
  // src/version.ts
2
2
  import semver from "semver";
3
- var VERSION = true ? "8.90.0" : "dev";
3
+ var VERSION = true ? "8.91.0" : "dev";
4
4
  var NODE_ENGINE_RANGE = ">=22.5.0";
5
5
  function isNodeVersionSupported(version) {
6
6
  return semver.satisfies(version, NODE_ENGINE_RANGE);
@@ -11,4 +11,4 @@ export {
11
11
  NODE_ENGINE_RANGE,
12
12
  isNodeVersionSupported
13
13
  };
14
- //# sourceMappingURL=chunk-4PMYNW3G.js.map
14
+ //# sourceMappingURL=chunk-C3HMZJ3R.js.map
@@ -25,10 +25,10 @@ import {
25
25
  toolSuccessStructured,
26
26
  withProgressHeartbeat,
27
27
  wrapToolWithTimeout
28
- } from "./chunk-OX4L42RL.js";
28
+ } from "./chunk-NMJDOOYZ.js";
29
29
  import {
30
30
  VERSION
31
- } from "./chunk-4PMYNW3G.js";
31
+ } from "./chunk-C3HMZJ3R.js";
32
32
  import {
33
33
  UNRESOLVED_MODEL_ID,
34
34
  assessPanelIndependence,
@@ -9717,4 +9717,4 @@ export {
9717
9717
  CONSENSUS_VOTE_TOOL_SCHEMA,
9718
9718
  registerConsensusVoteTool
9719
9719
  };
9720
- //# sourceMappingURL=chunk-I3SCYF5R.js.map
9720
+ //# sourceMappingURL=chunk-ERTDJU7Y.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-4PMYNW3G.js";
3
+ } from "./chunk-C3HMZJ3R.js";
4
4
  import {
5
5
  sanitizeErrorDetails
6
6
  } from "./chunk-2NDA4DHW.js";
@@ -2342,4 +2342,4 @@ export {
2342
2342
  DEFAULT_CONSENSUS_CONFIG,
2343
2343
  ConsensusMetricsSchema
2344
2344
  };
2345
- //# sourceMappingURL=chunk-OX4L42RL.js.map
2345
+ //# sourceMappingURL=chunk-NMJDOOYZ.js.map
@@ -12,7 +12,7 @@ import {
12
12
  NODE_ENGINE_RANGE,
13
13
  VERSION,
14
14
  isNodeVersionSupported
15
- } from "./chunk-4PMYNW3G.js";
15
+ } from "./chunk-C3HMZJ3R.js";
16
16
  import {
17
17
  claimGlobalRegistry
18
18
  } from "./chunk-C6Q2NUIH.js";
@@ -1401,7 +1401,7 @@ async function runDoctorFix(result) {
1401
1401
  writeLine2("\u2500".repeat(40));
1402
1402
  let fixCount = 0;
1403
1403
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1404
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-AMMF6TWR.js");
1404
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-BGG6ETH6.js");
1405
1405
  const outcome = describeDataDirFix2(initDataDirectories2());
1406
1406
  writeLine2(outcome.line);
1407
1407
  if (outcome.counted) fixCount++;
@@ -1503,4 +1503,4 @@ export {
1503
1503
  startStdioServer,
1504
1504
  closeServer
1505
1505
  };
1506
- //# sourceMappingURL=chunk-J3HT4YDM.js.map
1506
+ //# sourceMappingURL=chunk-SJH5U5XT.js.map
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-J3HT4YDM.js";
24
+ } from "./chunk-SJH5U5XT.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-FPX55ON5.js";
@@ -72,7 +72,7 @@ import {
72
72
  updateStage,
73
73
  withWarnings,
74
74
  writeJobCancelled
75
- } from "./chunk-I3SCYF5R.js";
75
+ } from "./chunk-ERTDJU7Y.js";
76
76
  import {
77
77
  allOf,
78
78
  anyOf
@@ -95,7 +95,7 @@ import {
95
95
  } from "./chunk-QCWY3GTZ.js";
96
96
  import {
97
97
  withPrerequisite
98
- } from "./chunk-JG4DC2TZ.js";
98
+ } from "./chunk-XT7VZSS3.js";
99
99
  import {
100
100
  NOOP_NOTIFIER,
101
101
  RateLimiter,
@@ -120,7 +120,7 @@ import {
120
120
  toolSuccessStructured,
121
121
  withProgressHeartbeat,
122
122
  wrapToolWithTimeout
123
- } from "./chunk-OX4L42RL.js";
123
+ } from "./chunk-NMJDOOYZ.js";
124
124
  import {
125
125
  EventTopics,
126
126
  UNRESOLVED_MODEL_ID,
@@ -45480,7 +45480,8 @@ async function executeAndReport(args) {
45480
45480
  graph,
45481
45481
  { [PIPELINE_STATE_KEYS.TASK]: task },
45482
45482
  {
45483
- maxSteps: options?.maxSteps ?? DEFAULT_MAX_STEPS2
45483
+ maxSteps: options?.maxSteps ?? DEFAULT_MAX_STEPS2,
45484
+ ...options?.signal !== void 0 ? { signal: options.signal } : {}
45484
45485
  }
45485
45486
  );
45486
45487
  const durationMs = getTimeProvider().now() - startTime;
@@ -46155,7 +46156,7 @@ function buildVotingInput(plan, config) {
46155
46156
  }
46156
46157
  async function executeSingleVote(plan, config, log) {
46157
46158
  try {
46158
- const { executeVoting } = await import("./consensus-vote-23XXJUDP.js");
46159
+ const { executeVoting } = await import("./consensus-vote-BO7S3XSQ.js");
46159
46160
  const input = buildVotingInput(plan, config);
46160
46161
  const result = await executeVoting(input, log);
46161
46162
  return parseVotingResult(result);
@@ -46362,12 +46363,40 @@ function resolveIterationLimits(options) {
46362
46363
  qa: options?.maxQaIterations ?? MAX_QA_ITERATIONS
46363
46364
  };
46364
46365
  }
46366
+ var DevPipelineCancelledError = class extends Error {
46367
+ constructor(stage) {
46368
+ super(`Dev pipeline cancelled before the ${stage} stage`);
46369
+ this.name = "DevPipelineCancelledError";
46370
+ }
46371
+ };
46372
+ function throwIfCancelled(signal, stage) {
46373
+ if (signal.aborted) throw new DevPipelineCancelledError(stage);
46374
+ }
46375
+ function gateStagesOnSignal(stages, signal) {
46376
+ if (signal === void 0) return stages;
46377
+ const gate = (stage, fn) => async (...args) => {
46378
+ throwIfCancelled(signal, stage);
46379
+ return fn(...args);
46380
+ };
46381
+ const qualityGate = stages.qualityGate?.bind(stages);
46382
+ return {
46383
+ research: gate("research", stages.research.bind(stages)),
46384
+ plan: gate("plan", stages.plan.bind(stages)),
46385
+ vote: gate("vote", stages.vote.bind(stages)),
46386
+ decompose: gate("decompose", stages.decompose.bind(stages)),
46387
+ implement: gate("implement", stages.implement.bind(stages)),
46388
+ qaReview: gate("qaReview", stages.qaReview.bind(stages)),
46389
+ ...qualityGate !== void 0 ? { qualityGate: gate("qualityGate", qualityGate) } : {},
46390
+ securityScan: gate("securityScan", stages.securityScan.bind(stages))
46391
+ };
46392
+ }
46365
46393
  async function runDevPipeline(task, stages, options) {
46366
46394
  const sid = options?.sessionId;
46367
46395
  const prior = sid !== void 0 ? loadCheckpointState(sid) : null;
46368
46396
  const traceWriter = createTraceWriter(sid);
46369
46397
  try {
46370
- return await runDevPipelineInner(task, stages, options, sid, prior);
46398
+ const gated = gateStagesOnSignal(stages, options?.signal);
46399
+ return await runDevPipelineInner(task, gated, options, sid, prior);
46371
46400
  } finally {
46372
46401
  await flushTraceWriter(traceWriter);
46373
46402
  }
@@ -46818,6 +46847,7 @@ async function implementSingleTaskSafe(task, stages, limits) {
46818
46847
  try {
46819
46848
  return await implementSingleTask(task, stages, limits);
46820
46849
  } catch (error) {
46850
+ if (error instanceof DevPipelineCancelledError) throw error;
46821
46851
  const reason = error instanceof Error ? error : new Error(String(error));
46822
46852
  logger42.error("Task implementation failed", reason, {});
46823
46853
  return null;
@@ -47092,7 +47122,7 @@ function createVoteStage({ config, startStage }) {
47092
47122
  const strategy = config.votingStrategy ?? "higher_order";
47093
47123
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47094
47124
  try {
47095
- const { executeVoting } = await import("./consensus-vote-23XXJUDP.js");
47125
+ const { executeVoting } = await import("./consensus-vote-BO7S3XSQ.js");
47096
47126
  const votingResult = await executeVoting(
47097
47127
  {
47098
47128
  proposal: buildVoteProposal(plan, research),
@@ -52619,7 +52649,12 @@ async function runDevPipelineHandler(args, logger60, trustTier, auditLogger, inp
52619
52649
  const pipelineOptions = buildPipelineOptions(input, trustTier, auditLogger);
52620
52650
  const hasOptions = Object.keys(pipelineOptions).length > 0;
52621
52651
  const resolvedOptions = hasOptions ? pipelineOptions : void 0;
52622
- const run = () => executeDevPipelineBody(taskText, stages, resolvedOptions, simulated);
52652
+ const run = (signal) => executeDevPipelineBody(
52653
+ taskText,
52654
+ stages,
52655
+ signal !== void 0 ? { ...resolvedOptions, signal } : resolvedOptions,
52656
+ simulated
52657
+ );
52623
52658
  if (input.dispatch === "async" && !input.dryRun) {
52624
52659
  return dispatchAsyncDevPipeline(input, run, logger60);
52625
52660
  }
@@ -52637,10 +52672,8 @@ function dispatchAsyncDevPipeline(input, run, logger60) {
52637
52672
  toolName: "run_dev_pipeline",
52638
52673
  input,
52639
52674
  freshJobId: () => `dp-${randomUUID15()}`,
52640
- // #5393: deliberately arity-0 — `runDevPipeline` has no AbortSignal
52641
- // option, so taking the signal would flip `signalAccepted` to true with
52642
- // nothing reading it. Stage-boundary gate first: #6305.
52643
- run,
52675
+ // #5393 / #6305: arity 3 — `runDevPipeline` checks the signal before every stage.
52676
+ run: (_jobId, _input, signal) => run(signal),
52644
52677
  logger: logger60
52645
52678
  });
52646
52679
  }
@@ -52662,8 +52695,8 @@ function dispatchAsyncDevPipeline(input, run, logger60) {
52662
52695
  toolName: "run_dev_pipeline",
52663
52696
  input,
52664
52697
  freshJobId: () => sessionId,
52665
- // #5393: deliberately arity-0 — same body as the keyless dispatch above; see #6305.
52666
- run,
52698
+ // #5393 / #6305: arity 3 — same body as the keyless dispatch above.
52699
+ run: (_jobId, _input, signal) => run(signal),
52667
52700
  logger: logger60
52668
52701
  });
52669
52702
  }
@@ -52811,11 +52844,13 @@ async function runPipelineForGoal(goal, logger60 = createLogger({ tool: "run_pip
52811
52844
  const stages = selectStageRegistry(void 0, goal, agentStages);
52812
52845
  return runAdaptiveOrchestrator(goal, { stages });
52813
52846
  }
52814
- async function executePipelineBody(task, stages, templateId, dryRun, simulated) {
52847
+ async function executePipelineBody(task, stages, run) {
52848
+ const { templateId, dryRun, simulated, signal } = run;
52815
52849
  const result = await runAdaptiveOrchestrator(task, {
52816
52850
  stages,
52817
52851
  templateId,
52818
- dryRun
52852
+ dryRun,
52853
+ ...signal !== void 0 ? { signal } : {}
52819
52854
  });
52820
52855
  const output2 = buildOutput3(result, simulated);
52821
52856
  if (!result.success) {
@@ -52854,19 +52889,19 @@ async function runPipelineHandler(args, logger60, callerTrustTier, sanitization)
52854
52889
  budget: resolveRunBudget(task, input.template, logger60)
52855
52890
  });
52856
52891
  const stages = selectStageRegistry(input.template, task, agentStages);
52892
+ const body = { templateId: input.template, dryRun: input.dryRun, simulated };
52857
52893
  if (input.dispatch === "async" && !input.dryRun) {
52858
52894
  return runAsJob({
52859
52895
  toolName: "run_pipeline",
52860
52896
  input,
52861
52897
  freshJobId: () => `rp-${randomUUID16()}`,
52862
- // #5393: deliberately arity-0 — `runAdaptiveOrchestrator` has no
52863
- // AbortSignal option, so taking the signal would flip `signalAccepted`
52864
- // to true with nothing reading it. Stage-boundary gate first: #6305.
52865
- run: () => executePipelineBody(task, stages, input.template, input.dryRun, simulated),
52898
+ // #5393 / #6305: arity 3 — the graph executor checks the signal before every
52899
+ // super-step, so a cancel stops the run at the next stage boundary.
52900
+ run: (_jobId, _input, signal) => executePipelineBody(task, stages, { ...body, signal }),
52866
52901
  logger: logger60
52867
52902
  });
52868
52903
  }
52869
- return await executePipelineBody(task, stages, input.template, input.dryRun, simulated);
52904
+ return await executePipelineBody(task, stages, body);
52870
52905
  } catch (error) {
52871
52906
  return toolStructuredError({
52872
52907
  errorCategory: "internal",
@@ -56542,4 +56577,4 @@ export {
56542
56577
  startPipelineEventBridge,
56543
56578
  shutdownPipelineEventBridge
56544
56579
  };
56545
- //# sourceMappingURL=chunk-XEYZRY4C.js.map
56580
+ //# sourceMappingURL=chunk-UWYNIMDF.js.map