nexus-agents 2.85.0 → 2.86.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.
@@ -8505,6 +8505,17 @@ var TOOL_ANNOTATIONS = {
8505
8505
  idempotentHint: true,
8506
8506
  openWorldHint: false
8507
8507
  },
8508
+ /** Cancels an in-flight async-mode job (#3042 Stage 1b / #2631). */
8509
+ cancel_job: {
8510
+ // Mutates the sidecar record — NOT read-only.
8511
+ readOnlyHint: false,
8512
+ // Reversibility: cancel writes a new state, but doesn't delete data —
8513
+ // not destructive in the OWASP sense (no irreversible data loss).
8514
+ destructiveHint: false,
8515
+ // Idempotent: repeat cancels are no-ops with explicit outcome envelope.
8516
+ idempotentHint: true,
8517
+ openWorldHint: false
8518
+ },
8508
8519
  /** Verifies hash chain of audit log files. */
8509
8520
  verify_audit_chain: {
8510
8521
  readOnlyHint: true,
@@ -8650,6 +8661,19 @@ function writeJobFailed(jobId, toolName, error) {
8650
8661
  writeFileSync3(jobResultPath(jobId), JSON.stringify(record, null, 2));
8651
8662
  logger8.debug("Wrote failed job record", { jobId, toolName, error });
8652
8663
  }
8664
+ function writeJobCancelled(jobId, toolName, reason) {
8665
+ const record = {
8666
+ v: 1,
8667
+ jobId,
8668
+ toolName,
8669
+ status: "cancelled",
8670
+ createdAt: readJobResult(jobId)?.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
8671
+ completedAt: (/* @__PURE__ */ new Date()).toISOString(),
8672
+ ...reason !== void 0 ? { error: reason } : {}
8673
+ };
8674
+ writeFileSync3(jobResultPath(jobId), JSON.stringify(record, null, 2));
8675
+ logger8.debug("Wrote cancelled job record", { jobId, toolName, reason });
8676
+ }
8653
8677
  function readJobResult(jobId) {
8654
8678
  const path = nexusDataPath("jobs", `result-${jobId}.json`);
8655
8679
  if (!existsSync4(path)) return null;
@@ -9493,6 +9517,7 @@ export {
9493
9517
  writeJobPending,
9494
9518
  writeJobComplete,
9495
9519
  writeJobFailed,
9520
+ writeJobCancelled,
9496
9521
  readJobResult,
9497
9522
  listJobs,
9498
9523
  registerIdempotentJob,
@@ -9569,4 +9594,4 @@ export {
9569
9594
  CONSENSUS_VOTE_OUTPUT_SCHEMA,
9570
9595
  registerConsensusVoteTool
9571
9596
  };
9572
- //# sourceMappingURL=chunk-IF6TXCSE.js.map
9597
+ //# sourceMappingURL=chunk-EHBSXLX6.js.map