nexus-agents 2.54.0 → 2.54.1

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.
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk-CLYZ7FWP.js";
25
25
 
26
26
  // src/version.ts
27
- var VERSION = true ? "2.54.0" : "dev";
27
+ var VERSION = true ? "2.54.1" : "dev";
28
28
 
29
29
  // src/cli/setup-data-dir.ts
30
30
  import { mkdirSync, existsSync as existsSync2 } from "fs";
@@ -758,7 +758,7 @@ async function runDoctorFix(result) {
758
758
  writeLine2("\u2500".repeat(40));
759
759
  let fixCount = 0;
760
760
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
761
- const { runSetup } = await import("./setup-command-SGUJYE3S.js");
761
+ const { runSetup } = await import("./setup-command-T2EABH66.js");
762
762
  const setupResult = runSetup({
763
763
  skipMcp: true,
764
764
  skipRules: true,
@@ -836,4 +836,4 @@ export {
836
836
  startStdioServer,
837
837
  closeServer
838
838
  };
839
- //# sourceMappingURL=chunk-WUD4X37M.js.map
839
+ //# sourceMappingURL=chunk-CTQ4F636.js.map
@@ -67,7 +67,7 @@ import {
67
67
  import {
68
68
  DEFAULT_TASK_TTL_MS,
69
69
  clampTaskTtl
70
- } from "./chunk-WUD4X37M.js";
70
+ } from "./chunk-CTQ4F636.js";
71
71
  import {
72
72
  createSessionMemory
73
73
  } from "./chunk-NYNBDP7M.js";
@@ -30763,6 +30763,23 @@ async function raceAgainstDeadline(promise, deadlineMs, onTimeout) {
30763
30763
  }
30764
30764
  }
30765
30765
 
30766
+ // src/mcp/tools/orchestration-state-snapshot.ts
30767
+ function createOrchestrationStateSnapshot(nowMs) {
30768
+ return {
30769
+ stage: "init",
30770
+ stepsCompleted: 0,
30771
+ createdAt: nowMs
30772
+ };
30773
+ }
30774
+ function setRouting(snapshot, routing) {
30775
+ snapshot.routing = routing;
30776
+ snapshot.stage = "routing_decided";
30777
+ }
30778
+ function setAnalysis(snapshot, analysis) {
30779
+ snapshot.analysis = analysis;
30780
+ snapshot.stage = "analysis_done";
30781
+ }
30782
+
30766
30783
  // src/cli-server-sica.ts
30767
30784
  var globalSicaConfig;
30768
30785
  var sicaEnabled = false;
@@ -34557,10 +34574,11 @@ function handleOrchestratorSuccess(ctx) {
34557
34574
  });
34558
34575
  return ok(output2);
34559
34576
  }
34560
- async function executeOrchestration(input, deps, router) {
34577
+ async function executeOrchestration(input, deps, router, snapshot) {
34561
34578
  const { workflowRouter, decision, orchestrator, logger: logger56 } = routeAndPrepare(input, deps, router);
34562
34579
  const taskId = generateTaskId();
34563
34580
  const startTime = getTimeProvider().now();
34581
+ if (snapshot !== void 0) setRouting(snapshot, buildRoutingInfo(decision));
34564
34582
  const fastResult = trySimpleTaskFastPath({
34565
34583
  taskId,
34566
34584
  task: input.task,
@@ -34569,7 +34587,10 @@ async function executeOrchestration(input, deps, router) {
34569
34587
  startTime,
34570
34588
  logger: logger56
34571
34589
  });
34572
- if (fastResult !== void 0) return fastResult;
34590
+ if (fastResult !== void 0) {
34591
+ if (snapshot !== void 0 && fastResult.ok) setAnalysis(snapshot, fastResult.value.analysis);
34592
+ return fastResult;
34593
+ }
34573
34594
  logger56.info("Starting orchestration", { taskId, taskLength: input.task.length });
34574
34595
  recordTaskStateInit(taskId, input.task, logger56);
34575
34596
  const task = await createTaskFromInput(input, taskId);
@@ -34755,28 +34776,33 @@ function recordAndReflect(dispatchResult, task, deps) {
34755
34776
  void generateReflection(task, dispatchResult.results, deps.modelAdapter);
34756
34777
  }
34757
34778
  }
34758
- function buildTimeoutOrchestrationResult(taskId, elapsedMs, reason) {
34759
- return ok({
34779
+ function buildTimeoutOrchestrationResult(taskId, elapsedMs, reason, snapshot) {
34780
+ const analysis = snapshot?.analysis ?? {
34760
34781
  taskId,
34761
- analysis: {
34762
- taskId,
34763
- complexity: 1,
34764
- taskType: "unknown",
34765
- requirements: [],
34766
- risks: [],
34767
- needsDecomposition: false,
34768
- approach: `Orchestration aborted: ${reason}`,
34769
- estimatedEffort: 0
34770
- },
34782
+ complexity: 1,
34783
+ taskType: "unknown",
34784
+ requirements: [],
34785
+ risks: [],
34786
+ needsDecomposition: false,
34787
+ approach: `Orchestration aborted: ${reason}`,
34788
+ estimatedEffort: 0
34789
+ };
34790
+ const output2 = {
34791
+ taskId,
34792
+ analysis,
34771
34793
  result: void 0,
34772
- stepsCompleted: 0,
34794
+ stepsCompleted: snapshot?.stepsCompleted ?? 0,
34773
34795
  metadata: {
34774
34796
  durationMs: elapsedMs,
34775
34797
  tokensUsed: 0,
34776
34798
  expertsUsed: [],
34777
34799
  timeoutReason: reason
34778
34800
  }
34779
- });
34801
+ };
34802
+ if (snapshot?.routing !== void 0) {
34803
+ output2.routing = snapshot.routing;
34804
+ }
34805
+ return ok(output2);
34780
34806
  }
34781
34807
  async function executeOrchestrationWithDeadline(params) {
34782
34808
  const { input, deps, notifier, logger: logger56 } = params;
@@ -34785,18 +34811,25 @@ async function executeOrchestrationWithDeadline(params) {
34785
34811
  "orchestrate"
34786
34812
  );
34787
34813
  const timeoutTaskId = generateTaskId();
34814
+ const snapshot = createOrchestrationStateSnapshot(getTimeProvider().now());
34788
34815
  return raceAgainstDeadline(
34789
- withProgressHeartbeat("orchestrate", notifier, () => executeOrchestration(input, deps)),
34816
+ withProgressHeartbeat(
34817
+ "orchestrate",
34818
+ notifier,
34819
+ () => executeOrchestration(input, deps, void 0, snapshot)
34820
+ ),
34790
34821
  overallDeadlineMs,
34791
34822
  (elapsedMs) => {
34792
34823
  logger56.warn("Orchestration overall deadline reached; returning partial result", {
34793
34824
  overallDeadlineMs,
34794
- elapsedMs
34825
+ elapsedMs,
34826
+ stage: snapshot.stage
34795
34827
  });
34796
34828
  return buildTimeoutOrchestrationResult(
34797
34829
  timeoutTaskId,
34798
34830
  elapsedMs,
34799
- "orchestration overall deadline exceeded"
34831
+ "orchestration overall deadline exceeded",
34832
+ snapshot
34800
34833
  );
34801
34834
  }
34802
34835
  );
@@ -54738,4 +54771,4 @@ export {
54738
54771
  detectBackend,
54739
54772
  createTaskTracker
54740
54773
  };
54741
- //# sourceMappingURL=chunk-7GEE3C7F.js.map
54774
+ //# sourceMappingURL=chunk-ODCEUZI7.js.map