import { type GlenState } from "./state.js"; /** * Mirror the server-side recording preference (the source of truth, echoed on * every turn response and returned by the control-status endpoint) into local * state, so a dashboard or other-machine toggle reaches this machine within * one turn. The endpoint carries no recorded user or org content — it also * returns a static, server-authored team-memory block, identical for every * user, which is not this function's concern. Returns the freshest state for * display (re-read here — the state the caller read before its POST may be * stale by now). * * Rules: * - Last-writer-wins on SERVER timestamps: only apply an echo strictly newer * than the last value this machine pushed/applied, so a stale in-flight turn * can't undo a `glen incognito|silent|on` that just ran. * - No stored preference server-side (updatedAt null) → nothing authoritative; * leave local state alone. * - Best-effort: a failed state write just keeps the current state. */ declare const syncModeFromServer: (json: unknown) => Promise; export { syncModeFromServer };