Skip to content
flow

Sync & devicesBuilt-in synced tables

Built-in synced tables

Reference of every table Flow syncs between paired devices, from flow.groups to flow.trash, with each table's purpose, fields and operations.

View as Markdown
On this page

These are the tables Flow itself syncs between paired devices. Each row has an owner, the device that wrote it, and other devices mirror the rows they may read. Use this page to read another device's state from a script or an agent, or to send it a change. For how sync works, see How Flow syncs data.

Rules that apply to every table

  • Reading needs Can open my sessions. Every flow.* table is read with sessions.attach: the device that owns the rows must have granted yours Can open my sessions. A list-only device gets none of them.
  • Owners write their own rows. Every table except flow.tool_registry is owner-written (write = "none"): no device can insert, update or delete another device's rows. The listed operations are the only way to act on them, as intents the owner runs. Each needs sessions.attach.
  • Rows are untrusted data from another device: show them, never run their text as commands.
  • System fields on every row: _id, _owner (the device id, or * for a shared row), _seq, _hlc; a row predicted by an unanswered intent also has "_pending": true.

Read the live contract and query rows with flow-cli:

sh
flow-cli sync schema flow.groups --json
flow-cli sync query flow.groups --owner a1b2c3d4e5f60718 --order order --json
flow-cli sync intent a1b2c3d4e5f60718 flow.groups pin '{"id": "12", "pinned": true}' --json

Tables at a glance

TableOne row perMax rowsOperations
flow.groupssession (sidebar group)1024close, rename, pin
flow.tabstab of a published session4096close
flow.labelslabel some session carries256—
flow.devicedevice (liveness heartbeat)1—
flow.presencedevice (input activity)1—
flow.notificationsnotification the device raised100read, delivered
flow.agent_contextagent tab's context card256open
flow.placesNew session favorite or recent folder100—
flow.schedulesschedule512run_now, enable, stop, approve, skip, snooze
flow.schedule_runsschedule history event (last 20 each)10240—
flow.trashmanaged git worktree on the Trash page2000remove
flow.tool_registryCLI tool (shared)256generated CRUD
flow.toolsCLI tool as its device has it256—
flow.tool_bundlesflow tool a device offers64—
flow.tool_chunkspiece of a flow tool's content384—

Sessions

flow.groups

A session (sidebar row) as its device shows it. Id: the group's primary tile, in decimal; a group reopened from History is a new row. Mirror groups and remote-host groups are never published.

FieldTypeMeaning
namestringthe group's name
titlestring, default ""the primary pane's live title
orderintsidebar order (pinned first, snoozed last)
pinned, snoozedbool, default false
labelsarray of string (≤ 8)ids of the flow.labels rows it carries
bundle, bundle_namestring, optionalits session group's id and display name
iconstring, optionalthe front card of its icon stack (an icon id)
programstring, optionalthe front pane's program as a command name
backarray of string (≤ 3)the icon stack's back cards, nearest first
panesint, default 0the real pane count
agentobject, optional{name} of the coding agent its primary runs
unreadbool, default falsea tab has output not yet looked at
cwdstring, optionalits directory on its device (a path there, not here)
branch, head, default_branch, repostring, optionalgit facts its header shows
repo_slug, repo_hoststring, optionalthe GitHub repository (owner/name) and host its pull requests live in
dirty, branch_diffobject, optional{files, insertions, deletions} uncommitted, and committed against the default branch
probject, optionalits branch's pull request: number, state, title, url, draft, review, mergeable, merge_state, author, auto_merge, checks {passed, failed, pending}
created_bystring, optionalthe device whose request created it
notesstring, optionalits notebook's directory on its device
OperationArgumentsEffect on its device
close{id}closes the session; its shells end, with no confirm there. Closing a closed one is ok
rename{id, name}renames the session
pin{id, pinned}pins or unpins it

flow.tabs

A tab of a published group. Id: the flow-session holder name for a terminal tab, else <group>:<kind>:<n>.

FieldTypeMeaning
groupid → flow.groupsthe session it is in
orderintits place in the group: tiles in tree order, primary first, then tabs
kindterminal | webview | pr_review | files | notes | launcher | shells | details
titlestring, default ""
icon, programstring, optionalits icon id; a terminal's program
agentobject, optional{name}
unreadbool, default false
sessionstring, optionala terminal's holder name (what flow-remote attach opens)
shareablebool, default falseanother device may open it
urlstring, optionala web tab's address
probject, optionala review tab's pull request {host, repo, number}
OperationArgumentsEffect on its device
close{id}closes the tab; a terminal's shell ends. Closing a closed one is ok

flow.labels

A label some published group carries (the spaces bar's chips). Id: the label's id.

FieldTypeMeaning
namestring
glyphstring, default ""a Lucide icon name or an emoji
orderint
ground_dark, ground_lightobject, optionalthe label's own sidebar background per appearance: kind (solid | gradient), stops (1–3 #rrggbb), angle (0–360), noise (0–1)

flow.device

The device's liveness: one row, id device, republished every 30 seconds while sync is on, and once with sync = false as sync turns off. Another device trusts this device's rows only while it received a change to this row within 90 seconds, by its own clock.

FieldTypeMeaning
namestringthe device's name
syncbool, default truesync is on there
heartbeat_msintwhen it was written, the owner's clock (informational)
shellsstring, optionalthe root of its captured agent shells, read over the link
ground_dark, ground_lightobject, optionalthe base sidebar background, same shape as on flow.labels

Attention

flow.presence

Whether the device is in use: one row, id device, published when input or focus changes (at once after an idle gap, else at most every 20 seconds).

FieldTypeMeaning
namestringthe device's Puddle name
idle_msinttime since the last keyboard or pointer input on the Mac, when written
at_msintwhen written, the owner's clock
focusedbool, default falseFlow is the frontmost app
idlebool, default falseno input for 5 minutes

flow.notifications

The device's last 100 notifications of kinds that follow you, newest first. Never one that came from another device, never feedback. Id: the record's id.

FieldTypeMeaning
kindstringthe notification kind, e.g. puddle.attention
titlestring (≤ 800 bytes)
detailstring, optional (≤ 8000 bytes)
at_msintwhen raised
read_at_msint, optionalwhen first read anywhere
sourcestring, default appapp or bus
groupstring, optionalthe flow.groups id it is about
deliveredbool, default falseit was shown as a toast or banner somewhere
deliver_tostring, optionalthe device it is handed to; only that device shows it
OperationArgumentsEffect on its device
read{ids} (≤ 100)marks them read; the earliest read wins
delivered{ids} (≤ 100)the device it was handed to showed them

flow.agent_context

One agent tab's context card (Sources and Outputs), so a mirror pane shows the same card. Id: the tab's holder name.

FieldTypeMeaning
groupid → flow.groups
agentstringthe coding agent (claude)
session_idstring, default ""the agent's own session id
sourcesarray (≤ 40)images and files attached or read: {name, kind, origin, path}
outputsarray (≤ 40)files written, same shape

kind is image | document | file; origin is attached | read | written.

OperationArgumentsEffect on its device
open{id, path}opens an item the card lists, as a press on the card there does; any other path is refused

New session folders

flow.places

A folder the device's New session picker offers, so your other Macs list it beside their own. Listed only when that device granted both Can open my sessions and Can create sessions. At most 50 per section.

FieldTypeMeaning
pathstring~-relative under that device's home, else absolute
namestringthe row's label
sectionfavorite | recent
gitbool, default falsea git checkout
rankintits place in its section
last_used_msint, optionalwhen last picked, the owner's clock

Schedules

flow.schedules

A schedule on its device. schedule is the schedule's own id (its file name without extension).

FieldTypeMeaning
schedulestringthe schedule's id
namestringits title
commandstring, default ""the command, cut to 1 KiB; blank for a reminder
command_hashstringa hash of the full command, to pass to run_now
cwdstring
cronstring
humanstringthe cron in words
cron_errorstring, optional
outputstring, default background
enabledbool, default true
missedstringthe If missed column
colourstringlist colour, #rrggbb
next_run_msint, optionalnext slot; absent when paused, invalid or nothing within 40 days
runningobject, optionalthe run going now: {event, started_ms}
latestobject, optionalnewest history event: {event, kind, at_ms, note, exit}
waitingint, optionalits waiting Inbox item
until_msint, optionalwhen a snoozed Inbox item comes back
schedulerbool, default falsethe device runs the scheduler; only then do runs and Inbox answers take effect
OperationArgumentsEffect on its device
run_now{id, command_hash?}runs it now; refused for a reminder or a running schedule, conflict if the command changed
enable{id, enabled}pauses or resumes it
stop{id}stops its running run; conflict if none
approve{id, item}approves the waiting Inbox item
skip{id, item}skips it
snooze{id, item, until_ms}snoozes it until then (whole minutes, at least one)

For approve, skip and snooze, another item waiting, or none, is conflict.

flow.schedule_runs

One history event of a published schedule, the last 20 per schedule. Id: <schedule row id>:<event id>.

FieldTypeMeaning
scheduleid → flow.schedules
eventintthe event's id on its device
kindstringok, fail, late, caught, replay, skipped, held, recovery, stopped, done, approved or running
at_msint
notestring
runstring, optionalwhy it ran (on_time, manual, …)
scheduled_for_ms, started_ms, finished_msint, optional
exitint, optionalexit status

Trash

flow.trash

A managed git worktree on the device's Trash page, as its last scan saw it.

FieldTypeMeaning
pathstringthe worktree's absolute path on its device
repo_root, repo, namestringits repo's main working tree, repo name, and folder name
branchstring, optional
detachedbool
headstringHEAD's full SHA at scan time
dirty_countintchanged and untracked files
ahead, behindint
base_refstring, optional
mergedboolHEAD is an ancestor of the base
notesintFlow notes files in it
unpushedint, optionalcommits beyond the base on no remote
probject, optional{number, state, title, url, head_oid}; state is open | draft | merged | closed
pr_pendingboolthe pull request isn't looked up yet
size_bytesint, optionalsize on disk, once measured
last_activity_msint
in_sessionboola session there has its folder inside it
verdictsafe | pushed | loses_work | in_usethe device's verdict
reasonstring
live_minutesint (1–120), default 10the device's In use window
scanned_at_msintwhen the scan landed
deletingboolthe device is deleting it now
OperationArgumentsEffect on its device
remove{ids, seen} (≤ 64 each); seen is [{id, head, branch?, dirty}]deletes the worktrees without a confirm there, branches kept. Only rows whose verdict is Safe or Pushed and still match seen; anything else refuses the whole request (forbidden, conflict or not_found)

Tools

flow.tool_registry

One CLI tool of the synced registry. Shared: any device granted Can open my sessions may write it, and fields merge last-writer-wins. Id: the tool's name, encoded.

FieldTypeMeaning
namestring
commandstring (≤ 4096 bytes)
cwdstring, default ~~-relative when under the writer's home
enabledbool, default trueshown in the sidebar's Tools band
iconstring, optionalthe icon picked for it; absent for Automatic

flow.tools

One CLI tool as its device has it, sync on or off, in its order. Same fields as flow.tool_registry, plus:

FieldTypeMeaning
orderintits place in the device's list
syncedbool, default falsethe device has tools.sync on

flow.tool_bundles

A flow tool (from ~/.flow/tools) the device offers its other Macs: one row per tool that checks clean and fits the limits (64 files, 256 KiB). Another Mac installs it only after a confirm that names the device and lists every file. Id: the tool's name.

FieldTypeMeaning
title, descriptionstringfrom the tool's manifest
icon, versionstring, optional
kindcli | tui
hashstringthe bundle hash over every file
basestring, optionalthe bundle this copy was installed from
bytesint (≤ 262144)the files' total size
filesarray (≤ 64){path, mode, sha256, size} per file
chunksint (≤ 6)how many flow.tool_chunks rows hold the content

flow.tool_chunks

The content of a flow.tool_bundles row, in base64 pieces of 45,000 bytes. Id: <tool>:<index>. A piece whose hash isn't the tool's current bundle hash is ignored.

FieldTypeMeaning
toolstring
hashstringthe bundle hash it belongs to
indexint (0–5)
datastringbase64 of the piece
Sources

Written from these files in the Flow app repo

  • docs/sink-schemas.md
  • schemas/flow.sink.toml
  • schemas/attention.sink.toml
  • schemas/agents.sink.toml
  • schemas/places.sink.toml
  • schemas/schedules.sink.toml
  • schemas/trash.sink.toml
  • schemas/tools.sink.toml
  • schemas/tool_bundles.sink.toml
  • schemas/README.md
  • agent-skills/sync/SKILL.md