nexus-agents 2.125.35 → 2.125.36

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.
@@ -40,7 +40,7 @@ import {
40
40
  } from "./chunk-ZGLIHPGJ.js";
41
41
 
42
42
  // src/version.ts
43
- var VERSION = true ? "2.125.35" : "dev";
43
+ var VERSION = true ? "2.125.36" : "dev";
44
44
 
45
45
  // src/config/schemas-core.ts
46
46
  import { z } from "zod";
@@ -2121,7 +2121,7 @@ async function runDoctorFix(result) {
2121
2121
  writeLine2("\u2500".repeat(40));
2122
2122
  let fixCount = 0;
2123
2123
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
2124
- const { runSetup } = await import("./setup-command-337RIW6B.js");
2124
+ const { runSetup } = await import("./setup-command-7DLSQVUI.js");
2125
2125
  const setupResult = runSetup({
2126
2126
  skipMcp: true,
2127
2127
  skipRules: true,
@@ -2233,4 +2233,4 @@ export {
2233
2233
  startStdioServer,
2234
2234
  closeServer
2235
2235
  };
2236
- //# sourceMappingURL=chunk-2D5YBBFL.js.map
2236
+ //# sourceMappingURL=chunk-4LYMLGHZ.js.map
@@ -8,7 +8,7 @@ import {
8
8
  checkSqlite,
9
9
  defaultConfig,
10
10
  initDataDirectories
11
- } from "./chunk-2D5YBBFL.js";
11
+ } from "./chunk-4LYMLGHZ.js";
12
12
  import {
13
13
  BUILT_IN_EXPERTS
14
14
  } from "./chunk-ZM4O442V.js";
@@ -2000,4 +2000,4 @@ export {
2000
2000
  setupCommand,
2001
2001
  setupCommandAsync
2002
2002
  };
2003
- //# sourceMappingURL=chunk-MQD4O3VU.js.map
2003
+ //# sourceMappingURL=chunk-MUPSBFGD.js.map
@@ -30,7 +30,7 @@ import {
30
30
  runConsensusForGoal,
31
31
  warnIfSimulatedOutsideTests,
32
32
  writeJobCancelled
33
- } from "./chunk-6UTAO7UT.js";
33
+ } from "./chunk-Y5SDY462.js";
34
34
  import {
35
35
  normalizeTopicToCanonical,
36
36
  synthesizeResearch
@@ -122,7 +122,7 @@ import {
122
122
  DEFAULT_TASK_TTL_MS,
123
123
  DEFAULT_TOOL_RATE_LIMITS,
124
124
  clampTaskTtl
125
- } from "./chunk-2D5YBBFL.js";
125
+ } from "./chunk-4LYMLGHZ.js";
126
126
  import {
127
127
  resolveInsideRoot
128
128
  } from "./chunk-NUBSJGQZ.js";
@@ -39545,7 +39545,9 @@ var TOOL_NAME_BY_PREFIX = {
39545
39545
  // #3726: run_dev_pipeline async jobs mint `dp-<uuid>` ids (or reuse the
39546
39546
  // caller's sessionId — which has no fixed prefix, so the dual-read reader
39547
39547
  // resolves those from the sidecar via toolName recorded at writeJobPending).
39548
- dp: "run_dev_pipeline"
39548
+ dp: "run_dev_pipeline",
39549
+ // #3730: run_pipeline async jobs mint `rp-<uuid>` ids (no sessionId surface).
39550
+ rp: "run_pipeline"
39549
39551
  };
39550
39552
  function toolNameFromJobId(jobId) {
39551
39553
  const dash = jobId.indexOf("-");
@@ -43056,7 +43058,7 @@ ${contextBlock}`;
43056
43058
  const strategy = config.votingStrategy ?? "higher_order";
43057
43059
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
43058
43060
  try {
43059
- const { executeVoting } = await import("./consensus-vote-ZZ44NQEP.js");
43061
+ const { executeVoting } = await import("./consensus-vote-4ZB7C5QG.js");
43060
43062
  const votingResult = await executeVoting(
43061
43063
  {
43062
43064
  proposal: buildVoteProposal(plan, research),
@@ -45932,6 +45934,8 @@ function registerDevPipelineTool(server, deps) {
45932
45934
  import { z as z102 } from "zod";
45933
45935
  import * as fs12 from "fs";
45934
45936
  import * as path11 from "path";
45937
+ import { randomUUID as randomUUID13 } from "crypto";
45938
+ 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.";
45935
45939
  var PipelineInputSchema = z102.object({
45936
45940
  /** The task to execute. */
45937
45941
  task: z102.string().min(5).max(1e4).describe("Task description \u2014 pipeline template auto-selected based on content"),
@@ -45956,6 +45960,17 @@ var PipelineInputSchema = z102.object({
45956
45960
  timeoutMs: z102.number().int().min(3e4).max(6e5).optional().describe("Max time per stage in ms (30000-600000). Default: varies by stage complexity"),
45957
45961
  /** Stop after planning/voting (no implementation). */
45958
45962
  dryRun: z102.boolean().default(false).describe("Stop after vote stage (no implementation)"),
45963
+ /**
45964
+ * Dispatch mode (#3730). `sync` (default) runs the pipeline inline and
45965
+ * returns the result — but a real multi-stage adaptive run can exceed the
45966
+ * 900s MCP request timeout. `async` returns a `{ status: 'pending', jobId }`
45967
+ * envelope immediately and runs the pipeline in the background; poll
45968
+ * `get_job_result({ jobId })` for the result. Ignored when `dryRun` is true
45969
+ * (plan+vote completes fast, so dry runs always stay sync).
45970
+ */
45971
+ dispatch: z102.enum(["sync", "async"]).default("sync").describe(
45972
+ "Dispatch mode (#3730). 'sync' (default): run inline. 'async': return a jobId immediately + run in background (poll get_job_result). Ignored for dryRun."
45973
+ ),
45959
45974
  /** TESTS ONLY — random output, must not be used for real decisions. (#2319) */
45960
45975
  simulateVotes: z102.boolean().default(false).describe("TESTS ONLY \u2014 random output, must not be used for real decisions (#2319)")
45961
45976
  });
@@ -46035,6 +46050,14 @@ async function runPipelineForGoal(goal, logger57 = createLogger({ tool: "run_pip
46035
46050
  const stages = selectStageRegistry(void 0, goal, agentStages);
46036
46051
  return runAdaptiveOrchestrator(goal, { stages });
46037
46052
  }
46053
+ async function executePipelineBody(task, stages, templateId, dryRun) {
46054
+ const result = await runAdaptiveOrchestrator(task, {
46055
+ stages,
46056
+ templateId,
46057
+ dryRun
46058
+ });
46059
+ return toolSuccessStructured(buildOutput2(result));
46060
+ }
46038
46061
  async function runPipelineHandler(args, logger57) {
46039
46062
  const parsed = PipelineInputSchema.safeParse(args);
46040
46063
  if (!parsed.success) {
@@ -46056,16 +46079,20 @@ async function runPipelineHandler(args, logger57) {
46056
46079
  budget: resolveRunBudget(task, input.template, logger57)
46057
46080
  });
46058
46081
  const stages = selectStageRegistry(input.template, task, agentStages);
46059
- const result = await runAdaptiveOrchestrator(task, {
46060
- stages,
46061
- templateId: input.template,
46062
- dryRun: input.dryRun
46063
- });
46064
- return toolSuccessStructured(buildOutput2(result));
46082
+ if (input.dispatch === "async" && !input.dryRun) {
46083
+ return runAsJob({
46084
+ toolName: "run_pipeline",
46085
+ input,
46086
+ freshJobId: () => `rp-${randomUUID13()}`,
46087
+ run: () => executePipelineBody(task, stages, input.template, input.dryRun),
46088
+ logger: logger57
46089
+ });
46090
+ }
46091
+ return await executePipelineBody(task, stages, input.template, input.dryRun);
46065
46092
  } catch (error) {
46066
46093
  return toolStructuredError({
46067
46094
  errorCategory: "internal",
46068
- message: `Pipeline error: ${getErrorMessage(error)}`
46095
+ message: `${PIPELINE_ASYNC_HINT} Pipeline error: ${getErrorMessage(error)}`
46069
46096
  });
46070
46097
  }
46071
46098
  }
@@ -48152,7 +48179,7 @@ var FeedbackCollectorConfigSchema = z112.object({
48152
48179
  });
48153
48180
 
48154
48181
  // src/learning/outcome-feedback-helpers.ts
48155
- import { randomUUID as randomUUID13 } from "crypto";
48182
+ import { randomUUID as randomUUID14 } from "crypto";
48156
48183
  function countOutcomesByClass(outcomes) {
48157
48184
  const counts = {
48158
48185
  success: 0,
@@ -48205,7 +48232,7 @@ function generateRewardExplanation(outcome, reward) {
48205
48232
  }
48206
48233
  function createRoutingDecision(params) {
48207
48234
  return {
48208
- id: randomUUID13(),
48235
+ id: randomUUID14(),
48209
48236
  timestamp: getTimeProvider().nowIso(),
48210
48237
  ...params
48211
48238
  };
@@ -48461,7 +48488,7 @@ var DEFAULT_FEEDBACK_INTEGRATION_CONFIG = {
48461
48488
  };
48462
48489
 
48463
48490
  // src/learning/feedback-integration.ts
48464
- import { randomUUID as randomUUID14 } from "crypto";
48491
+ import { randomUUID as randomUUID15 } from "crypto";
48465
48492
  var STEP_QUALITY_SCORING = {
48466
48493
  /** Base score for successful steps. */
48467
48494
  successBase: 0.8,
@@ -48537,8 +48564,8 @@ var FeedbackIntegration = class {
48537
48564
  });
48538
48565
  }
48539
48566
  recordRoutingDecision(decision, traceId) {
48540
- const id = randomUUID14();
48541
- const trace = traceId ?? randomUUID14();
48567
+ const id = randomUUID15();
48568
+ const trace = traceId ?? randomUUID15();
48542
48569
  const now = getTimeProvider().now();
48543
48570
  this.evictStaleEntriesThrottled(now);
48544
48571
  if (this.decisionMap.size >= MAX_DECISION_MAP_SIZE) {
@@ -48612,7 +48639,7 @@ var FeedbackIntegration = class {
48612
48639
  } = params;
48613
48640
  const outcomeClass = this.determineOutcomeClass(success, qualityScore);
48614
48641
  const completionRatio = success ? 1 : qualityScore / this.config.successQualityThreshold;
48615
- const trace = traceId ?? randomUUID14();
48642
+ const trace = traceId ?? randomUUID15();
48616
48643
  const outcome = {
48617
48644
  routingDecisionId,
48618
48645
  timestamp: getTimeProvider().nowIso(),
@@ -50295,4 +50322,4 @@ export {
50295
50322
  shutdownFeedbackSubscriber,
50296
50323
  createEventBusBridge
50297
50324
  };
50298
- //# sourceMappingURL=chunk-VDYEZRDV.js.map
50325
+ //# sourceMappingURL=chunk-SOGHVI6W.js.map