nexus-agents 8.24.0 → 8.24.2

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.
@@ -23,10 +23,10 @@ import {
23
23
  toolSuccessStructured,
24
24
  withProgressHeartbeat,
25
25
  wrapToolWithTimeout
26
- } from "./chunk-JZAXNFMO.js";
26
+ } from "./chunk-YA3ULAKB.js";
27
27
  import {
28
28
  VERSION
29
- } from "./chunk-BMIFPA5E.js";
29
+ } from "./chunk-WGWKS6KS.js";
30
30
  import {
31
31
  assessPanelIndependence,
32
32
  countDistinctModels,
@@ -7682,4 +7682,4 @@ export {
7682
7682
  CONSENSUS_VOTE_TOOL_SCHEMA,
7683
7683
  registerConsensusVoteTool
7684
7684
  };
7685
- //# sourceMappingURL=chunk-ZDHM2JUU.js.map
7685
+ //# sourceMappingURL=chunk-4DDARPJT.js.map
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-SVYDHGAN.js";
24
+ } from "./chunk-I4LNM23C.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-CN3VAMQD.js";
@@ -55,7 +55,7 @@ import {
55
55
  toJobSummary,
56
56
  updateStage,
57
57
  writeJobCancelled
58
- } from "./chunk-ZDHM2JUU.js";
58
+ } from "./chunk-4DDARPJT.js";
59
59
  import {
60
60
  allOf
61
61
  } from "./chunk-OQB3XC5O.js";
@@ -74,7 +74,7 @@ import {
74
74
  } from "./chunk-OYTRYITB.js";
75
75
  import {
76
76
  withPrerequisite
77
- } from "./chunk-MKE44UET.js";
77
+ } from "./chunk-O2EJO2N5.js";
78
78
  import {
79
79
  NOOP_NOTIFIER,
80
80
  RateLimiter,
@@ -99,7 +99,7 @@ import {
99
99
  withAuditTrail,
100
100
  withProgressHeartbeat,
101
101
  wrapToolWithTimeout
102
- } from "./chunk-JZAXNFMO.js";
102
+ } from "./chunk-YA3ULAKB.js";
103
103
  import {
104
104
  createAuditTrail,
105
105
  createGraphAuditBridge,
@@ -34714,7 +34714,6 @@ async function synthesizeViaLlm(input, excludedWorkerCount) {
34714
34714
  }
34715
34715
  async function synthesizeTier2(input, inputLength, patternKey, excludedWorkerCount) {
34716
34716
  const { results, conflicts, taskDescription, modelAdapter } = input;
34717
- const successResults = results.filter((r) => r.status === "success" && r.output !== "");
34718
34717
  const tracker = getSynthesisHistoryTracker();
34719
34718
  const prompt = buildSynthesisPrompt({ results, conflicts, taskDescription });
34720
34719
  const tier2Text = await callLlm(modelAdapter, prompt);
@@ -34723,12 +34722,7 @@ async function synthesizeTier2(input, inputLength, patternKey, excludedWorkerCou
34723
34722
  logger29.warn("Synthesis LLM call failed, using fallback");
34724
34723
  return mkFallback(results, conflicts, excludedWorkerCount);
34725
34724
  }
34726
- if (tier2Text === "") {
34727
- tracker.record(patternKey, 2, true);
34728
- const raw = successResults.map((r) => r.output).join("\n");
34729
- return { ok: true, value: raw, synthesisSource: "llm", excludedWorkerCount };
34730
- }
34731
- if (!isSynthesisLowQuality(tier2Text, inputLength)) {
34725
+ if (tier2Text !== "" && !isSynthesisLowQuality(tier2Text, inputLength)) {
34732
34726
  tracker.record(patternKey, 2, true);
34733
34727
  return { ok: true, value: tier2Text, synthesisSource: "llm", excludedWorkerCount };
34734
34728
  }
@@ -45671,7 +45665,7 @@ function buildVotingInput(plan, config) {
45671
45665
  }
45672
45666
  async function executeSingleVote(plan, config, log) {
45673
45667
  try {
45674
- const { executeVoting } = await import("./consensus-vote-FSXAI445.js");
45668
+ const { executeVoting } = await import("./consensus-vote-UYC4OKHJ.js");
45675
45669
  const input = buildVotingInput(plan, config);
45676
45670
  const result = await executeVoting(input, log);
45677
45671
  return parseVotingResult(result);
@@ -47443,7 +47437,7 @@ ${contextBlock}`;
47443
47437
  const strategy = config.votingStrategy ?? "higher_order";
47444
47438
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47445
47439
  try {
47446
- const { executeVoting } = await import("./consensus-vote-FSXAI445.js");
47440
+ const { executeVoting } = await import("./consensus-vote-UYC4OKHJ.js");
47447
47441
  const votingResult = await executeVoting(
47448
47442
  {
47449
47443
  proposal: buildVoteProposal(plan, research),
@@ -50231,6 +50225,24 @@ function createAuditLogOutcomeSink(logger56) {
50231
50225
  function errorMessage(err2) {
50232
50226
  return err2 instanceof Error ? err2.message : String(err2);
50233
50227
  }
50228
+ function classifyEngineResult(result) {
50229
+ if (typeof result !== "object" || result === null) {
50230
+ return { success: true };
50231
+ }
50232
+ const record = result;
50233
+ if (record["success"] === false) {
50234
+ const reason = typeof record["error"] === "string" ? record["error"] : "no error message";
50235
+ return { success: false, failureReason: reason };
50236
+ }
50237
+ if (record["completed"] === false) {
50238
+ if (record["dryRun"] === true && record["planStatus"] === void 0) {
50239
+ return { success: true };
50240
+ }
50241
+ const reason = typeof record["error"] === "string" ? record["error"] : "pipeline did not complete";
50242
+ return { success: false, failureReason: reason };
50243
+ }
50244
+ return { success: true };
50245
+ }
50234
50246
  function recordOutcome2(deps, decision, start, success, failureReason) {
50235
50247
  const record = {
50236
50248
  decisionId: decision.decisionId,
@@ -50268,7 +50280,8 @@ async function dispatchDecision(decision, input, deps) {
50268
50280
  }
50269
50281
  try {
50270
50282
  const result = await executor(decision, input);
50271
- recordOutcome2(deps, decision, start, true);
50283
+ const classification = deps.classifyResult(result);
50284
+ recordOutcome2(deps, decision, start, classification.success, classification.failureReason);
50272
50285
  return {
50273
50286
  decisionId,
50274
50287
  strategy,
@@ -50297,7 +50310,8 @@ function createMetaDispatcher(options) {
50297
50310
  executors: options.executors,
50298
50311
  outcomeSink,
50299
50312
  logger: logger56,
50300
- onOutcome: options.onOutcome
50313
+ onOutcome: options.onOutcome,
50314
+ classifyResult: options.classifyResult ?? classifyEngineResult
50301
50315
  };
50302
50316
  return {
50303
50317
  dispatch(decision, input) {
@@ -51893,7 +51907,8 @@ async function executeGoal(input, opts = {}) {
51893
51907
  executors: opts.executors ?? buildDefaultExecutors(opts.trustTier, opts.gatewayAdapters, input.dryRun),
51894
51908
  ...opts.logger !== void 0 ? { logger: opts.logger } : {},
51895
51909
  ...opts.outcomeSink !== void 0 ? { outcomeSink: opts.outcomeSink } : {},
51896
- ...onOutcome !== void 0 ? { onOutcome } : {}
51910
+ ...onOutcome !== void 0 ? { onOutcome } : {},
51911
+ ...opts.classifyResult !== void 0 ? { classifyResult: opts.classifyResult } : {}
51897
51912
  });
51898
51913
  const dispatch = await dispatcher.dispatch(decision, toMetaInput(input, "execute"));
51899
51914
  return {
@@ -51906,17 +51921,14 @@ async function executeGoal(input, opts = {}) {
51906
51921
  };
51907
51922
  }
51908
51923
  function detectEngineFailure(result) {
51909
- if (typeof result !== "object" || result === null) return null;
51910
- const record = result;
51911
- if (record["success"] === false) {
51912
- const detail = typeof record["error"] === "string" ? record["error"] : "no error message";
51913
- return { message: `Engine reported failure: ${detail}` };
51914
- }
51915
- if (record["completed"] === false) {
51916
- if (record["dryRun"] === true && record["planStatus"] === void 0) return null;
51924
+ const classification = classifyEngineResult(result);
51925
+ if (classification.success) return null;
51926
+ const record = typeof result === "object" && result !== null ? result : void 0;
51927
+ if (record?.["completed"] === false) {
51917
51928
  return { message: describeIncompletePipeline(record), detail: record };
51918
51929
  }
51919
- return null;
51930
+ const detail = classification.failureReason ?? "no error message";
51931
+ return { message: `Engine reported failure: ${detail}` };
51920
51932
  }
51921
51933
  async function executeRunBody(input, logger56, trustTier, gatewayAdapters) {
51922
51934
  try {
@@ -56128,4 +56140,4 @@ export {
56128
56140
  shutdownFeedbackSubscriber,
56129
56141
  createEventBusBridge
56130
56142
  };
56131
- //# sourceMappingURL=chunk-6QTD3PCO.js.map
56143
+ //# sourceMappingURL=chunk-CKTGOSEL.js.map