@adhdev/daemon-core 0.9.82-rc.521 → 0.9.82-rc.522

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.
@@ -278,6 +278,25 @@ export interface RepoMeshAutoFastForwardPolicy {
278
278
  maxBehind?: number;
279
279
  /** Defaults to true. Require submodule status to be clean before automatic fast-forward. */
280
280
  requireCleanSubmodules?: boolean;
281
+ /**
282
+ * Opt-in: extend auto fast-forward to REMOTE owning-daemon nodes (not just the
283
+ * coordinator's local workspace). Defaults to **false** so the historical
284
+ * self-only behavior is preserved byte-for-byte. When true, the coordinator
285
+ * delegates the ff to the node's owning daemon via dispatchMeshCommand
286
+ * (fast_forward_mesh_node), which runs the same git safety gates on the machine
287
+ * that actually holds the workspace.
288
+ */
289
+ remoteNodes?: boolean;
290
+ /**
291
+ * When to run remote auto fast-forward detection. Defaults to **"idle"** — the
292
+ * historical behavior where the ff is only attempted on a node's idle edge
293
+ * (agent:ready / genuine generating_completed). "continuous" adds a periodic
294
+ * scan inside the reconcile tick so an online/clean/behind remote node is caught
295
+ * up even when it emits no fresh idle edge (e.g. a base node that has been idle
296
+ * for a while while upstream advanced). Only governs remote-node detection;
297
+ * local idle-edge ff is unchanged either way.
298
+ */
299
+ mode?: 'idle' | 'continuous';
281
300
  }
282
301
 
283
302
  export interface RepoMeshPolicy {
@@ -625,10 +644,16 @@ export function normalizeAutoFastForwardPolicy(value: unknown): NonNullable<Repo
625
644
  ? value as Record<string, unknown>
626
645
  : {};
627
646
  const maxBehind = Number(record.maxBehind);
647
+ // Persistence economy: remoteNodes is emitted only when explicitly true and mode
648
+ // only when explicitly 'continuous', so an untouched autoFastForward stays
649
+ // byte-for-byte { enabled, requireCleanSubmodules, [maxBehind] } — the historical
650
+ // self-only / idle-edge default shape.
628
651
  return {
629
652
  enabled: record.enabled !== false,
630
653
  ...(Number.isFinite(maxBehind) && maxBehind >= 0 ? { maxBehind: Math.floor(maxBehind) } : {}),
631
654
  requireCleanSubmodules: record.requireCleanSubmodules !== false,
655
+ ...(record.remoteNodes === true ? { remoteNodes: true } : {}),
656
+ ...(record.mode === 'continuous' ? { mode: 'continuous' as const } : {}),
632
657
  };
633
658
  }
634
659