@farmslot/agent-runtime 0.32.0 → 0.34.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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@
4
4
 
5
5
  - Active-development baseline; add user-facing changes here before release or package publication.
6
6
 
7
+ ## 0.34.0 - 2026-10-19
8
+
9
+ - `./mark N` on a complete or no-change signal reruns a declared deterministic step and refreshes its receipt for the current tree without touching the box or the signal. Before, it rewrote the signal to `running`; clearing a stale `ci.local_check` receipt after a late commit no longer reopens the run. `deterministicChecks.execute` returns whether the step declared a check.
10
+ - Align with `@farmslot/protocol` 0.58.0 and `@farmslot/adapter-sdk` 0.23.0.
11
+
12
+ ## 0.33.0 - 2026-10-19
13
+
14
+ - Align with `@farmslot/adapter-sdk` 0.22.0.
15
+
7
16
  ## 0.32.0 - 2026-10-19
8
17
 
9
18
  - Completion refuses a criterion with proof mode `review` when the terminal contract has no `publicationReview`, and the task document tells the worker to give criteria about the change itself proof mode `review` (ADR-062 Amendment 18).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farmslot/agent-runtime",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -60,8 +60,8 @@
60
60
  "test:branch-maintenance-live": "node --import tsx --test test/branch-maintenance-live.mts"
61
61
  },
62
62
  "dependencies": {
63
- "@farmslot/adapter-sdk": "0.21.0",
64
- "@farmslot/protocol": "0.57.0"
63
+ "@farmslot/adapter-sdk": "0.23.0",
64
+ "@farmslot/protocol": "0.58.0"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@types/node": "^22.0.0",
@@ -546,6 +546,22 @@ if (
546
546
  ) {
547
547
  assertChecklistComplete(taskPath, { allowOneUnchecked: true });
548
548
  }
549
+ // A successful verdict (no-change writes `complete` too) stays put: `./mark N` on
550
+ // a declared deterministic step reruns its check so the receipt matches the
551
+ // current tree, and leaves the box and the signal as they are.
552
+ if (stepNumber != null && readJson(signalPath).status === 'complete') {
553
+ try {
554
+ if (deterministicChecks.execute(taskDir, path.basename(taskPath), stepNumber)) {
555
+ console.log(
556
+ `signal already terminal: status=complete; refreshed the receipt of deterministic step ${stepNumber} for the current tree`,
557
+ );
558
+ process.exit(0);
559
+ }
560
+ } catch (error) {
561
+ console.error(`signal already terminal: status=complete; ${error.message}`);
562
+ process.exit(1);
563
+ }
564
+ }
549
565
  const target =
550
566
  isStartCommand || isOperatorCommand
551
567
  ? { stepNumber: null, label: 'started' }
@@ -621,11 +621,12 @@ function logHash(file) {
621
621
  return createHash('sha256').update(fs.readFileSync(file)).digest('hex');
622
622
  }
623
623
 
624
+ // False when the step declares no deterministic check; throws when the check fails.
624
625
  function executeDeterministicStep(taskDir, checklist, stepNumber) {
625
626
  const step = recordedDeterministicSteps(taskDir, checklist).find(
626
627
  (item) => item.stepNumber === stepNumber,
627
628
  );
628
- if (!step) return;
629
+ if (!step) return false;
629
630
  if (!step.command)
630
631
  throw new Error(
631
632
  `Deterministic step ${stepNumber}: ${step.reference} has no frozen command; initialize the task again`,
@@ -675,6 +676,7 @@ function executeDeterministicStep(taskDir, checklist, stepNumber) {
675
676
  `Deterministic step ${stepNumber} failed${inputHash !== afterHash ? ': command changed publishable inputs' : ` with exit ${result.status ?? result.signal ?? 'unknown'}`}. See ${logPath}`,
676
677
  );
677
678
  console.log(`Deterministic step ${stepNumber} passed, exit 0. Log: ${logPath}`);
679
+ return true;
678
680
  }
679
681
 
680
682
  function readDeterministicChecks(taskDir, checklist, options = {}) {