nexus-agents 2.128.4 → 2.128.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.
@@ -4606,6 +4606,16 @@ function readJobResult(jobId) {
4606
4606
  return null;
4607
4607
  }
4608
4608
  }
4609
+ function toJobSummary(record) {
4610
+ return {
4611
+ jobId: record.jobId,
4612
+ toolName: record.toolName,
4613
+ status: record.status,
4614
+ createdAt: record.createdAt,
4615
+ hasError: record.error !== void 0,
4616
+ ...record.completedAt !== void 0 ? { completedAt: record.completedAt } : {}
4617
+ };
4618
+ }
4609
4619
  function listJobs() {
4610
4620
  const dir = nexusDataPath("jobs");
4611
4621
  if (!existsSync3(dir)) return [];
@@ -4627,15 +4637,7 @@ function listJobs() {
4627
4637
  if (jobId === void 0) continue;
4628
4638
  const record = readJobResult(jobId);
4629
4639
  if (record === null) continue;
4630
- const summary = {
4631
- jobId: record.jobId,
4632
- toolName: record.toolName,
4633
- status: record.status,
4634
- createdAt: record.createdAt,
4635
- hasError: record.error !== void 0,
4636
- ...record.completedAt !== void 0 ? { completedAt: record.completedAt } : {}
4637
- };
4638
- summaries.push(summary);
4640
+ summaries.push(toJobSummary(record));
4639
4641
  }
4640
4642
  return summaries.sort((a, b) => b.createdAt.localeCompare(a.createdAt));
4641
4643
  }
@@ -5498,6 +5500,7 @@ export {
5498
5500
  JobStatusSchema,
5499
5501
  writeJobCancelled,
5500
5502
  readJobResult,
5503
+ toJobSummary,
5501
5504
  listJobs,
5502
5505
  resolveIdempotency,
5503
5506
  registerIdempotentJob,
@@ -5566,4 +5569,4 @@ export {
5566
5569
  CONSENSUS_VOTE_OUTPUT_SCHEMA,
5567
5570
  registerConsensusVoteTool
5568
5571
  };
5569
- //# sourceMappingURL=chunk-SH6JG7GE.js.map
5572
+ //# sourceMappingURL=chunk-6CDAMT2O.js.map