nexus-agents 11.2.1 → 11.3.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.
@@ -4,7 +4,7 @@ import {
4
4
 
5
5
  // src/version.ts
6
6
  import semver from "semver";
7
- var VERSION = true ? "11.2.1" : "dev";
7
+ var VERSION = true ? "11.3.0" : "dev";
8
8
  var NODE_ENGINE_RANGE = ">=24";
9
9
  function isNodeVersionSupported(version) {
10
10
  return semver.satisfies(version, NODE_ENGINE_RANGE);
@@ -106,4 +106,4 @@ export {
106
106
  contextForLogging,
107
107
  measuredTrustTier
108
108
  };
109
- //# sourceMappingURL=chunk-7INKG2ZO.js.map
109
+ //# sourceMappingURL=chunk-3OQBXYFS.js.map
@@ -58,7 +58,7 @@ import {
58
58
  updateStage,
59
59
  withFileLock,
60
60
  writeJobCancelled
61
- } from "./chunk-6RYQMJYI.js";
61
+ } from "./chunk-PIBIAVWQ.js";
62
62
  import {
63
63
  normalizeTopicToCanonical,
64
64
  synthesizeResearch
@@ -77,7 +77,7 @@ import {
77
77
  } from "./chunk-HQ2SMW4Y.js";
78
78
  import {
79
79
  withPrerequisite
80
- } from "./chunk-SZBLSAEU.js";
80
+ } from "./chunk-KS7CAJAC.js";
81
81
  import {
82
82
  NOOP_NOTIFIER,
83
83
  RateLimiter,
@@ -105,7 +105,7 @@ import {
105
105
  toolSuccess,
106
106
  withProgressHeartbeat,
107
107
  wrapToolWithTimeout
108
- } from "./chunk-GTAQ744F.js";
108
+ } from "./chunk-BREDDYX4.js";
109
109
  import {
110
110
  generateSecurityPlan
111
111
  } from "./chunk-6ZTMMN2N.js";
@@ -187,7 +187,7 @@ import {
187
187
  import {
188
188
  DEFAULT_TASK_TTL_MS,
189
189
  clampTaskTtl
190
- } from "./chunk-FLD6KM6Q.js";
190
+ } from "./chunk-ZZ2BEXLC.js";
191
191
  import {
192
192
  allOf,
193
193
  anyOf
@@ -196,7 +196,7 @@ import {
196
196
  VERSION,
197
197
  createRequestContext,
198
198
  measuredTrustTier
199
- } from "./chunk-7INKG2ZO.js";
199
+ } from "./chunk-3OQBXYFS.js";
200
200
  import {
201
201
  BWRAP_READ_ONLY_ARGS,
202
202
  CliDetectionCache,
@@ -32723,6 +32723,7 @@ var OrchestrateInputSchema = z51.object({
32723
32723
  });
32724
32724
  var OrchestrateOutputSchema = z51.object({
32725
32725
  taskId: z51.string().describe("Unique execution ID"),
32726
+ executed: z51.boolean().optional().describe("False when the simple-task shortcut returned analysis only; no execution occurred"),
32726
32727
  analysis: z51.object({
32727
32728
  taskId: z51.string(),
32728
32729
  complexity: z51.number().min(1).max(10),
@@ -36308,6 +36309,7 @@ function startHeartbeatTracking(label, logger58) {
36308
36309
  function buildSimpleTaskResult(taskId, decision, durationMs) {
36309
36310
  return {
36310
36311
  taskId,
36312
+ executed: false,
36311
36313
  analysis: {
36312
36314
  taskId,
36313
36315
  complexity: Math.round(decision.analysis.complexityScore * 10) || 1,
@@ -36332,8 +36334,6 @@ function trySimpleTaskFastPath(ctx) {
36332
36334
  taskType: ctx.decision.analysis.taskType,
36333
36335
  durationMs
36334
36336
  });
36335
- recordOrchestrationSuccess(ctx.taskId, ctx.task, 0, durationMs);
36336
- recordRouterOutcome(ctx.workflowRouter, ctx.decision, true, durationMs);
36337
36337
  return ok(buildSimpleTaskResult(ctx.taskId, ctx.decision, durationMs));
36338
36338
  }
36339
36339
  function handleOrchestratorFailure(ctx) {
@@ -36383,9 +36383,7 @@ async function executeOrchestration(input, deps, opts = {}) {
36383
36383
  if (snapshot !== void 0) setRouting(snapshot, buildRoutingInfo(decision));
36384
36384
  const fastResult = trySimpleTaskFastPath({
36385
36385
  taskId,
36386
- task: input.task,
36387
36386
  decision,
36388
- workflowRouter,
36389
36387
  startTime,
36390
36388
  logger: logger58
36391
36389
  });
@@ -38752,21 +38750,20 @@ function resolveContextWarnThreshold(env = process.env) {
38752
38750
  return DEFAULT_CONTEXT_WARN_THRESHOLD;
38753
38751
  }
38754
38752
  function computeExpertContextUtilization(observation, threshold = DEFAULT_CONTEXT_WARN_THRESHOLD) {
38755
- const UNKNOWN_MODEL_CTX_DEFAULT = 8192;
38756
- const contextWindow = observation.modelId !== void 0 ? getModelContextWindow(observation.modelId) : UNKNOWN_MODEL_CTX_DEFAULT;
38757
- const utilization = contextWindow > 0 ? observation.tokensUsed / contextWindow : 0;
38753
+ const contextWindow = observation.modelId !== void 0 ? getModelContextWindow(observation.modelId) : void 0;
38754
+ const utilization = contextWindow !== void 0 && contextWindow > 0 && observation.tokensMeasured !== false ? observation.tokensUsed / contextWindow : void 0;
38758
38755
  return {
38759
38756
  tokensUsed: observation.tokensUsed,
38760
38757
  contextWindow,
38761
38758
  utilization,
38762
- warned: utilization >= threshold,
38759
+ warned: utilization !== void 0 && utilization >= threshold,
38763
38760
  threshold
38764
38761
  };
38765
38762
  }
38766
38763
  function observeExpertContext(observation, logger58, threshold = resolveContextWarnThreshold()) {
38767
38764
  try {
38768
38765
  const util = computeExpertContextUtilization(observation, threshold);
38769
- if (util.warned) {
38766
+ if (util.warned && util.utilization !== void 0) {
38770
38767
  logger58?.warn("context_warning", {
38771
38768
  event: "context_warning",
38772
38769
  expertId: observation.expertId,
@@ -38785,15 +38782,15 @@ function observeExpertContext(observation, logger58, threshold = resolveContextW
38785
38782
  expertId: observation.expertId,
38786
38783
  role: observation.role,
38787
38784
  modelId: observation.modelId,
38788
- utilizationPercent: Math.round(util.utilization * 100)
38785
+ utilizationPercent: util.utilization !== void 0 ? Math.round(util.utilization * 100) : void 0
38789
38786
  });
38790
38787
  }
38791
38788
  return util;
38792
38789
  } catch {
38793
38790
  return {
38794
38791
  tokensUsed: observation.tokensUsed,
38795
- contextWindow: 0,
38796
- utilization: 0,
38792
+ contextWindow: void 0,
38793
+ utilization: void 0,
38797
38794
  warned: false,
38798
38795
  threshold
38799
38796
  };
@@ -39011,7 +39008,7 @@ function buildSuccessResponse(params) {
39011
39008
  }
39012
39009
  function observeExpertContextIfOk(result, expert, task, durationMs, logger58) {
39013
39010
  if (!result.ok) return;
39014
- const expertModelId = expert.expertConfig.modelPreference?.modelId;
39011
+ const expertModelId = resolveExecutedModelId(result, expert);
39015
39012
  const observation = {
39016
39013
  expertId: expert.id,
39017
39014
  role: expert.role,
@@ -46685,7 +46682,7 @@ function buildVotingInput(plan, config) {
46685
46682
  }
46686
46683
  async function executeSingleVote(plan, config, log) {
46687
46684
  try {
46688
- const { executeVoting } = await import("./consensus-vote-LZUXE3VP.js");
46685
+ const { executeVoting } = await import("./consensus-vote-BD5NWZU5.js");
46689
46686
  const input = buildVotingInput(plan, config);
46690
46687
  const result = await executeVoting(input, log);
46691
46688
  return parseVotingResult(result);
@@ -48518,7 +48515,7 @@ function createVoteStage({ config, startStage }) {
48518
48515
  const strategy = config.votingStrategy ?? "higher_order";
48519
48516
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
48520
48517
  try {
48521
- const { executeVoting } = await import("./consensus-vote-LZUXE3VP.js");
48518
+ const { executeVoting } = await import("./consensus-vote-BD5NWZU5.js");
48522
48519
  const proposal = buildVoteProposal(plan, research);
48523
48520
  const votingResult = await executeVoting(
48524
48521
  {
@@ -58535,4 +58532,4 @@ export {
58535
58532
  initializeSandbox,
58536
58533
  getSandboxMode
58537
58534
  };
58538
- //# sourceMappingURL=chunk-OO762OTH.js.map
58535
+ //# sourceMappingURL=chunk-A7XDON63.js.map