A terminal’s current composer and the shared value it originally inherited.
The inherited value is retired on detach, never replaced by client-local text.
One relay page being applied inside a single write transaction. The relay
retains everything past the last acknowledgement, so a page that fails
part-way rolls back to the previous durable frontier and is simply
redelivered. Only a committed page may be acknowledged.
Point a session at a native session its worker opened on its own. Only that
column moves: the session’s lifecycle state belongs to whatever operation is
running.
Apply one relay page in a single transaction. fill feeds the page’s
events through ProjectionPage::apply; the projection changes and the
event frontier commit together only when fill succeeds, so callers may
acknowledge the page’s last ordinal to the relay after this returns.
Fill a missing snapshot without overwriting a concurrent writer. A deleted
or retargeted session returns None; its stale controller copy can be dropped
by reload instead of preventing every subsequent reload.
Verify that this client can read the daemon’s store without creating or
migrating it. Startup must pass this gate before handing out a connection,
even when an older daemon happens to speak the same wire protocol.
Forget the stopped sub-agents whose note the parent’s relay has taken.
Only the named children go, so a child listed after the note was built
waits for the next one.
Load only the durable prompt queues without deserializing transcript rows.
Dashboard startup uses this path so work is proportional to queued prompts,
not to the complete retained conversation history.
Load only the projection fields needed by dashboard session summaries.
Transcript bodies for tools, plans, thoughts, and old messages stay in
SQLite, which keeps dashboard startup independent of transcript size.
Where a session stands turn by turn: what is running now, and how the last
finished prompt ended. Returns None when the session has no projection
row. The API’s wait loop reads this for sessions whose actor is gone.
The remembered mount sources and project directories by host key, newest
first, as load_state reads them. A dashboard reads this again when a
wizard opens, since sessions created after it started add to the history.
Everything recorded about one child’s report. A child with nothing
recorded yet reads as the empty report.
One session’s stored lifecycle state, or None when the store holds no
such session.
The managed checkout of a sub-agent’s parent, or None when
child_session_id is not a sub-agent or its parent owns no checkout. A
child works in its parent’s checkout without owning it.
Record that the managed target of an otherwise live session is definitively
gone. A verified checkpoint keeps the session recoverable as an error on the
dashboard; without one, the session is lost. The state predicate keeps a
late poll result from overwriting a concurrent lifecycle transition.
Read only the projection’s event frontier. Deciding whether a stored
projection already matches an archive costs one row this way, instead of
deserializing every transcript item to compare two integers.
Record, on the parent’s session, the sub-agents its suspend is about to
stop. A child already listed keeps its place and takes the newer details,
so a suspend that runs again after a restart lists each child once.
Record a child’s report for the turn it names, unless a report for that
turn is already recorded. Returns whether this one was recorded: a child
delivers one report per turn, and the check and the write are one
transaction so two racing calls cannot both be accepted.
Explicitly restore a detached draft into its session composer. This is the
only operation that merges client-local draft state back into the legacy
session field, and the transaction marks the source draft recovered at the
same durable boundary.
Recover lifecycle rows stranded by a process exit during checkpoint
creation. This must be called once by the top-level controller process
while it owns the controller-store guard, not by per-operation reloads.
Rewrite a configured profile id in every persisted session in one SQLite
transaction. Configuration is stored separately, so the controller owns
coordinating this update with the matching config-map rename.
Replace a session’s durable prompt queue without touching its transcript or
event frontier. Resume uses this when it keeps the stored projection but
still has to drop the queue the archive carried.
Update only the fields a lifecycle transition owns on a session that
already exists. Everything else — display titles, checkpoints, container
settings, and attached directories — stays with its own writer.
Persist one operational session without rewriting unrelated controller
state. Dashboard lifecycle jobs use this path so independent jobs can
commit concurrently without restoring stale copies of other sessions.
Change only whether the resume dialog hides this session. Archiving is a
display choice, so it has its own writer and never rewrites lifecycle,
checkpoint, or title columns another task owns.
Change only the per-session container provisioning inputs: the size
overrides and the attached directories. Everything else the session row
owns is left to its own writer.
Overwrite the unsent chat input carried across a detach. Unlike the read
receipt this is not monotonic: a draft can shrink, and an empty string
clears it.