nexus-agents 8.133.4 → 8.133.5

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.
@@ -7,7 +7,7 @@ import {
7
7
  VERSION,
8
8
  isNodeVersionSupported,
9
9
  recordServerTransport
10
- } from "./chunk-63STP55Z.js";
10
+ } from "./chunk-DKO2UVFI.js";
11
11
  import {
12
12
  checkGatewayHealth,
13
13
  cliFailsVerdict,
@@ -1575,7 +1575,7 @@ async function runDoctorFix(result) {
1575
1575
  writeLine2("\u2500".repeat(40));
1576
1576
  let fixCount = 0;
1577
1577
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1578
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-IE2LWVWY.js");
1578
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-Z4ZQTRTH.js");
1579
1579
  const outcome = describeDataDirFix2(initDataDirectories2());
1580
1580
  writeLine2(outcome.line);
1581
1581
  if (outcome.counted) fixCount++;
@@ -1680,4 +1680,4 @@ export {
1680
1680
  startStdioServer,
1681
1681
  closeServer
1682
1682
  };
1683
- //# sourceMappingURL=chunk-I6ZPYPSG.js.map
1683
+ //# sourceMappingURL=chunk-BPEUNLUO.js.map
@@ -5,7 +5,7 @@ import {
5
5
  getCurrentRequestContext,
6
6
  runWithRequestContext,
7
7
  serverCallerInfo
8
- } from "./chunk-63STP55Z.js";
8
+ } from "./chunk-DKO2UVFI.js";
9
9
  import {
10
10
  DEFAULT_EXECUTION_MODE
11
11
  } from "./chunk-ECJ52NSK.js";
@@ -2355,4 +2355,4 @@ export {
2355
2355
  DEFAULT_CONSENSUS_CONFIG,
2356
2356
  ConsensusMetricsSchema
2357
2357
  };
2358
- //# sourceMappingURL=chunk-5Z6JTSDZ.js.map
2358
+ //# sourceMappingURL=chunk-CPG2YZ44.js.map
@@ -4,7 +4,7 @@ import {
4
4
 
5
5
  // src/version.ts
6
6
  import semver from "semver";
7
- var VERSION = true ? "8.133.4" : "dev";
7
+ var VERSION = true ? "8.133.5" : "dev";
8
8
  var NODE_ENGINE_RANGE = ">=22.5.0";
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-63STP55Z.js.map
109
+ //# sourceMappingURL=chunk-DKO2UVFI.js.map
@@ -21,7 +21,7 @@ import {
21
21
  toolSuccessStructured,
22
22
  withProgressHeartbeat,
23
23
  wrapToolWithTimeout
24
- } from "./chunk-5Z6JTSDZ.js";
24
+ } from "./chunk-CPG2YZ44.js";
25
25
  import {
26
26
  getToolMemory
27
27
  } from "./chunk-KJI4SNSK.js";
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-EZNIYU5T.js";
31
31
  import {
32
32
  VERSION
33
- } from "./chunk-63STP55Z.js";
33
+ } from "./chunk-DKO2UVFI.js";
34
34
  import {
35
35
  isGatewayModelAdapter
36
36
  } from "./chunk-BGHKG77F.js";
@@ -9581,6 +9581,9 @@ export {
9581
9581
  appendResult,
9582
9582
  appendCancellation,
9583
9583
  readTaskState,
9584
+ tryAcquire,
9585
+ release,
9586
+ suggestRetryAfterMs,
9584
9587
  defaultPendingEnvelope,
9585
9588
  defaultBusyEnvelope,
9586
9589
  defaultReplayEnvelope,
@@ -9666,4 +9669,4 @@ export {
9666
9669
  CONSENSUS_VOTE_TOOL_SCHEMA,
9667
9670
  registerConsensusVoteTool
9668
9671
  };
9669
- //# sourceMappingURL=chunk-CUQSLMS7.js.map
9672
+ //# sourceMappingURL=chunk-J466LJ35.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toSdkCallback,
8
8
  toolStructuredError,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-5Z6JTSDZ.js";
10
+ } from "./chunk-CPG2YZ44.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -2431,4 +2431,4 @@ export {
2431
2431
  runImprovementReview,
2432
2432
  registerImprovementReviewTool
2433
2433
  };
2434
- //# sourceMappingURL=chunk-UOXEQUBI.js.map
2434
+ //# sourceMappingURL=chunk-SQ76KQRG.js.map
@@ -43,6 +43,7 @@ import {
43
43
  recordDecisionCost,
44
44
  refineDispatchModeAgreement,
45
45
  registerIdempotentJob,
46
+ release,
46
47
  resolveAdapter,
47
48
  resolveAndLogVoterProject,
48
49
  resolveDispatch,
@@ -51,13 +52,15 @@ import {
51
52
  runConsensusForGoal,
52
53
  servedOutcomeFields,
53
54
  simulationDeniedResult,
55
+ suggestRetryAfterMs,
54
56
  throwIfVoteCancelled,
55
57
  toJobSummary,
58
+ tryAcquire,
56
59
  updateStage,
57
60
  withFileLock,
58
61
  withWarnings,
59
62
  writeJobCancelled
60
- } from "./chunk-CUQSLMS7.js";
63
+ } from "./chunk-J466LJ35.js";
61
64
  import {
62
65
  normalizeTopicToCanonical,
63
66
  synthesizeResearch
@@ -76,7 +79,7 @@ import {
76
79
  } from "./chunk-JA6Q3OO2.js";
77
80
  import {
78
81
  withPrerequisite
79
- } from "./chunk-UOXEQUBI.js";
82
+ } from "./chunk-SQ76KQRG.js";
80
83
  import {
81
84
  NOOP_NOTIFIER,
82
85
  RateLimiter,
@@ -103,7 +106,7 @@ import {
103
106
  toolSuccess,
104
107
  withProgressHeartbeat,
105
108
  wrapToolWithTimeout
106
- } from "./chunk-5Z6JTSDZ.js";
109
+ } from "./chunk-CPG2YZ44.js";
107
110
  import {
108
111
  generateSecurityPlan
109
112
  } from "./chunk-A6CTHKSJ.js";
@@ -185,7 +188,7 @@ import {
185
188
  import {
186
189
  DEFAULT_TASK_TTL_MS,
187
190
  clampTaskTtl
188
- } from "./chunk-I6ZPYPSG.js";
191
+ } from "./chunk-BPEUNLUO.js";
189
192
  import {
190
193
  allOf,
191
194
  anyOf
@@ -194,7 +197,7 @@ import {
194
197
  VERSION,
195
198
  createRequestContext,
196
199
  measuredTrustTier
197
- } from "./chunk-63STP55Z.js";
200
+ } from "./chunk-DKO2UVFI.js";
198
201
  import {
199
202
  isGatewayModelAdapter
200
203
  } from "./chunk-BGHKG77F.js";
@@ -39526,15 +39529,18 @@ var EXECUTE_EXPERT_TOOL_SCHEMA = {
39526
39529
  function createTaskHandler(deps, logger59, executor) {
39527
39530
  const notifier = deps.notifier ?? NOOP_NOTIFIER;
39528
39531
  return {
39529
- createTask: (args, extra) => {
39532
+ createTask: async (args, extra) => {
39530
39533
  const parsed = executor.inputSchema.safeParse(args);
39531
- if (!parsed.success) {
39532
- return Promise.reject(new Error(`Validation error: ${formatZodError(parsed.error)}`));
39533
- }
39534
+ if (!parsed.success) throw new Error(`Validation error: ${formatZodError(parsed.error)}`);
39534
39535
  const validatedArgs = parsed.data;
39535
39536
  const { taskStore } = extra;
39537
+ if (!tryAcquire("execute_expert")) {
39538
+ const busy = defaultBusyEnvelope(suggestRetryAfterMs("execute_expert"), "execute_expert");
39539
+ throw new Error(busy.content.map((content) => content.text).join("\n"));
39540
+ }
39536
39541
  const ttl = clampTaskTtl(DEFAULT_TASK_TTL_MS);
39537
- return taskStore.createTask({ ttl, pollInterval: 5e3 }).then((task) => {
39542
+ try {
39543
+ const task = await taskStore.createTask({ ttl, pollInterval: 5e3 });
39538
39544
  logger59.info("Task created for execute_expert", {
39539
39545
  taskId: task.taskId,
39540
39546
  expertId: validatedArgs.expertId
@@ -39548,11 +39554,12 @@ function createTaskHandler(deps, logger59, executor) {
39548
39554
  execute: executor.execute
39549
39555
  });
39550
39556
  return { task };
39551
- });
39552
- },
39553
- getTask: (_args, extra) => {
39554
- return extra.taskStore.getTask(extra.taskId);
39557
+ } catch (error) {
39558
+ release("execute_expert");
39559
+ throw error;
39560
+ }
39555
39561
  },
39562
+ getTask: (_args, extra) => extra.taskStore.getTask(extra.taskId),
39556
39563
  getTaskResult: (_args, extra) => {
39557
39564
  return extra.taskStore.getTaskResult(extra.taskId);
39558
39565
  }
@@ -39611,6 +39618,8 @@ async function runBackgroundExpertTask(opts) {
39611
39618
  error: getErrorMessage(storeError)
39612
39619
  });
39613
39620
  }
39621
+ } finally {
39622
+ release("execute_expert");
39614
39623
  }
39615
39624
  }
39616
39625
 
@@ -47345,7 +47354,7 @@ function buildVotingInput(plan, config) {
47345
47354
  }
47346
47355
  async function executeSingleVote(plan, config, log) {
47347
47356
  try {
47348
- const { executeVoting } = await import("./consensus-vote-Z5BGUSZB.js");
47357
+ const { executeVoting } = await import("./consensus-vote-NVDH66XO.js");
47349
47358
  const input = buildVotingInput(plan, config);
47350
47359
  const result = await executeVoting(input, log);
47351
47360
  return parseVotingResult(result);
@@ -49174,7 +49183,7 @@ function createVoteStage({ config, startStage }) {
49174
49183
  const strategy = config.votingStrategy ?? "higher_order";
49175
49184
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
49176
49185
  try {
49177
- const { executeVoting } = await import("./consensus-vote-Z5BGUSZB.js");
49186
+ const { executeVoting } = await import("./consensus-vote-NVDH66XO.js");
49178
49187
  const proposal = buildVoteProposal(plan, research);
49179
49188
  const votingResult = await executeVoting(
49180
49189
  {
@@ -59031,4 +59040,4 @@ export {
59031
59040
  initializeSandbox,
59032
59041
  getSandboxMode
59033
59042
  };
59034
- //# sourceMappingURL=chunk-6Q7BWRPL.js.map
59043
+ //# sourceMappingURL=chunk-WWHTLQWO.js.map