Expand description
Local-clip backlog: enqueue offline-captured clips, flush them on (re)connect in chronological order. See docs/superpowers/specs/2026-05-20-clipboard-backlog-flush-design.md.
Structs§
- Flush
Gate - Reentrancy gate for
flush_once. Process-local — calltry_enterbefore dispatching a flush; if it returns None, another flush is in progress and the caller should skip silently. - Flush
Guard - Flush
Report
Enums§
Constants§
- MAX_
UNSYNCED - Cap on number of
synced=falserows allowed in the local store. Older rows are dropped when this limit is exceeded.
Functions§
- enqueue_
local - Persist a clip to the local store with a
local-<ULID>id andsynced=false, then enforce the offline cap. Returns the temporary id — also used as the relayidempotency_keyon flush so the relay can dedup retries. - flush_
once - Push every
synced=falseclip increated_at ASCorder. Stops on the first transient (5xx / Network) error; drops rows on permanent (4xx / Decode) errors; drops rows whose plaintext content is missing (media-only). - format_
rfc3339_ millis - Convert a Unix millis timestamp to the RFC3339 string the relay’s parser
expects for
client_created_at.