nexus-agents 8.8.1 → 8.8.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.
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-FUMZUCP2.js";
24
+ } from "./chunk-QY3HOLGD.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-7J7UYJXC.js";
@@ -36,6 +36,7 @@ import {
36
36
  defaultPendingEnvelope,
37
37
  defaultReplayEnvelope,
38
38
  isAbandonedJob,
39
+ isMeasuredBuildVersion,
39
40
  isRateLimitError,
40
41
  listJobs,
41
42
  readJobResult,
@@ -47,7 +48,7 @@ import {
47
48
  simulationDeniedResult,
48
49
  toJobSummary,
49
50
  writeJobCancelled
50
- } from "./chunk-OCAMHBJ6.js";
51
+ } from "./chunk-SQCFKQUR.js";
51
52
  import {
52
53
  allOf
53
54
  } from "./chunk-OQB3XC5O.js";
@@ -64,7 +65,7 @@ import {
64
65
  } from "./chunk-N347WXTT.js";
65
66
  import {
66
67
  withPrerequisite
67
- } from "./chunk-NEJF4F6R.js";
68
+ } from "./chunk-W6SM3MU5.js";
68
69
  import {
69
70
  NOOP_NOTIFIER,
70
71
  RateLimiter,
@@ -89,7 +90,7 @@ import {
89
90
  withAuditTrail,
90
91
  withProgressHeartbeat,
91
92
  wrapToolWithTimeout
92
- } from "./chunk-VBC4JBRH.js";
93
+ } from "./chunk-YQUM3UWK.js";
93
94
  import {
94
95
  createAuditTrail,
95
96
  createGraphAuditBridge,
@@ -43881,15 +43882,16 @@ function readJobResultFromTaskState(jobId, customDir) {
43881
43882
  function isTaskStateJobSource() {
43882
43883
  return process.env["NEXUS_JOB_RESULT_SOURCE"]?.toLowerCase() === "task_state";
43883
43884
  }
43884
- function resolveJobResult(jobId, customDir) {
43885
+ function resolveJobResultWithSource(jobId, customDir) {
43885
43886
  if (isTaskStateJobSource()) {
43886
43887
  const fromState = readJobResultFromTaskState(jobId, customDir);
43887
43888
  if (fromState !== null) {
43888
43889
  logger35.debug("Resolved job result from task-state", { jobId, status: fromState.status });
43889
- return fromState;
43890
+ return { record: fromState, source: "task_state" };
43890
43891
  }
43891
43892
  }
43892
- return readJobResult(jobId);
43893
+ const fromSidecar = readJobResult(jobId);
43894
+ return fromSidecar === null ? null : { record: fromSidecar, source: "sidecar" };
43893
43895
  }
43894
43896
  function listJobsFromTaskState(customDir) {
43895
43897
  const summaries = [];
@@ -43922,8 +43924,8 @@ function getJobResultHandler(args) {
43922
43924
  })
43923
43925
  );
43924
43926
  }
43925
- const record = resolveJobResult(parsed.data.jobId);
43926
- if (record === null) {
43927
+ const resolved = resolveJobResultWithSource(parsed.data.jobId);
43928
+ if (resolved === null) {
43927
43929
  const response2 = {
43928
43930
  jobId: parsed.data.jobId,
43929
43931
  found: false,
@@ -43931,11 +43933,14 @@ function getJobResultHandler(args) {
43931
43933
  };
43932
43934
  return Promise.resolve(toolSuccess(JSON.stringify(response2, null, 2)));
43933
43935
  }
43936
+ const { record, source } = resolved;
43934
43937
  const abandoned = isAbandonedJob(record, getTimeProvider().now());
43935
43938
  const response = {
43936
43939
  jobId: parsed.data.jobId,
43937
43940
  found: true,
43938
43941
  record,
43942
+ producerVersionMeasured: isMeasuredBuildVersion(record.producerVersion),
43943
+ producerVersionSource: source,
43939
43944
  ...abandoned ? {
43940
43945
  abandoned: true,
43941
43946
  errorMessage: "This job has been `pending` longer than the maximum a job body can run, so the process that owned it is gone. Nothing will settle it \u2014 dispatch again."
@@ -43948,7 +43953,7 @@ function registerGetJobResultTool(server, deps) {
43948
43953
  const toolSchema = {
43949
43954
  jobId: z94.string().min(1).max(128).describe('Job ID returned by orchestrate({ mode: "async" })')
43950
43955
  };
43951
- const description = 'Read the result of an async-mode tool invocation by jobId. Returns the structured record (status, result | error, timestamps). Poll until status !== "pending". Stage-1 of epic #2631 \u2014 Stage 2 will fold this into query_task_state once StructuredTaskState gains the result field.';
43956
+ const description = `Read the result of an async-mode tool invocation by jobId. Returns the structured record (status, result | error, timestamps, producerVersion) plus producerVersionMeasured \u2014 false when the producer was a dev build or the record predates the field, so its version must not be compared to this server's _meta build stamp \u2014 and producerVersionSource (sidecar | task_state; a task_state record never carries a version). Poll until status !== "pending". Stage-1 of epic #2631 \u2014 Stage 2 will fold this into query_task_state once StructuredTaskState gains the result field.`;
43952
43957
  const secureHandler = createSecureHandler(getJobResultHandler, {
43953
43958
  toolName: "get_job_result",
43954
43959
  rateLimiter: deps.rateLimiter,
@@ -47555,7 +47560,7 @@ ${contextBlock}`;
47555
47560
  const strategy = config.votingStrategy ?? "higher_order";
47556
47561
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47557
47562
  try {
47558
- const { executeVoting } = await import("./consensus-vote-YYAWXULO.js");
47563
+ const { executeVoting } = await import("./consensus-vote-L4CN33XE.js");
47559
47564
  const votingResult = await executeVoting(
47560
47565
  {
47561
47566
  proposal: buildVoteProposal(plan, research),
@@ -56212,4 +56217,4 @@ export {
56212
56217
  shutdownFeedbackSubscriber,
56213
56218
  createEventBusBridge
56214
56219
  };
56215
- //# sourceMappingURL=chunk-Z55IEIBU.js.map
56220
+ //# sourceMappingURL=chunk-CQCVEC7P.js.map