nexus-agents 8.47.8 → 8.47.9

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-KUEOEFAT.js";
26
+ } from "./chunk-SNCZAGQZ.js";
27
27
  import {
28
28
  VERSION
29
- } from "./chunk-4U4KH5AD.js";
29
+ } from "./chunk-KQBS4UW5.js";
30
30
  import {
31
31
  assessPanelIndependence,
32
32
  countDistinctModels,
@@ -6160,9 +6160,11 @@ function toJobSummary(record) {
6160
6160
  ...record.completedAt !== void 0 ? { completedAt: record.completedAt } : {}
6161
6161
  };
6162
6162
  }
6163
- function listJobs() {
6163
+ function listJobsWithDiagnostics() {
6164
6164
  const dir = nexusDataPath("jobs");
6165
- if (!existsSync4(dir)) return [];
6165
+ if (!existsSync4(dir)) {
6166
+ return { jobs: [], diagnostics: { dirUnreadable: false, unparseableRecords: 0 } };
6167
+ }
6166
6168
  let entries;
6167
6169
  try {
6168
6170
  entries = readdirSync(dir);
@@ -6171,19 +6173,26 @@ function listJobs() {
6171
6173
  dir,
6172
6174
  error: err2 instanceof Error ? err2.message : String(err2)
6173
6175
  });
6174
- return [];
6176
+ return { jobs: [], diagnostics: { dirUnreadable: true, unparseableRecords: 0 } };
6175
6177
  }
6176
6178
  const summaries = [];
6179
+ let unparseableRecords = 0;
6177
6180
  for (const entry of entries) {
6178
6181
  const match = /^result-(.+)\.json$/.exec(entry);
6179
6182
  if (match === null) continue;
6180
6183
  const jobId = match[1];
6181
6184
  if (jobId === void 0) continue;
6182
6185
  const record = readJobResult(jobId);
6183
- if (record === null) continue;
6186
+ if (record === null) {
6187
+ unparseableRecords += 1;
6188
+ continue;
6189
+ }
6184
6190
  summaries.push(toJobSummary(record));
6185
6191
  }
6186
- return summaries.sort((a, b) => b.createdAt.localeCompare(a.createdAt));
6192
+ return {
6193
+ jobs: summaries.sort((a, b) => b.createdAt.localeCompare(a.createdAt)),
6194
+ diagnostics: { dirUnreadable: false, unparseableRecords }
6195
+ };
6187
6196
  }
6188
6197
 
6189
6198
  // src/mcp/jobs/job-abort-registry.ts
@@ -7767,7 +7776,7 @@ export {
7767
7776
  writeJobCancelled,
7768
7777
  readJobResult,
7769
7778
  toJobSummary,
7770
- listJobs,
7779
+ listJobsWithDiagnostics,
7771
7780
  abortJob,
7772
7781
  resolveIdempotency,
7773
7782
  registerIdempotentJob,
@@ -7851,4 +7860,4 @@ export {
7851
7860
  CONSENSUS_VOTE_TOOL_SCHEMA,
7852
7861
  registerConsensusVoteTool
7853
7862
  };
7854
- //# sourceMappingURL=chunk-OV6GG2BF.js.map
7863
+ //# sourceMappingURL=chunk-7WZHA4DG.js.map