Expand description
The machine-wide map of capsules that are currently running: one record per session, at
~/.murmur/running/<session_id>.json. An agent session writes its record once its A2A door is
bound and names the door in url; a script capsule binds no door, writes its record when its
session starts, and holds "url": null.
A record is a hint, never a truth. Nothing can guarantee it is removed — a SIGKILLed
capsule writes no farewell — so a reader never trusts one. verify puts three layers between
a record and the claim that a session is live, and each is insufficient alone:
- The pid is alive. Necessary, nowhere near sufficient.
- The process’s start time matches the recorded one. Pids are reused, so without this a record can name an unrelated process that happens to hold the number now.
- The door answers and identifies itself. A live pid proves neither that the process is
the capsule nor that it can still respond, so the agent card is fetched and the
sessionIdof its capsule extension compared. A record with no door has no third layer: layers 1 and 2 decide it alone.
Reading prunes a record only on evidence: layer 1 finding no process, or layer 2 reading a start
time that differs from the recorded one, which means the pid was reused. That is the only reaper
there is, and it is enough because the record is a hint. A reading that could not be taken is
not evidence. A live pid whose start time cannot be read is ProcessState::Unverified: kept,
reported as unreachable, and never signalled. A record that passes 1 and 2 and fails 3 is kept
too: it names a process that is alive, perhaps suspended, and unlinking it would throw away the
only handle to a running capsule because it was slow to answer.
The record names the process and stores nothing from the environment. A session declaring
network.authentication also records every door token it minted: the operator token, which is
how the host tools call its door, and one per declared credential, which mur token hands out.
Layer 3 reads the session id off the extended card with the operator token. The record is the
only place a token is written: mur run prints none. The directory is 0700 and each record
0600, because the set of records is a map of reachable capsules, and of the tokens that drive
them, to anything on the machine that can read it.
A session whose manifest declares control: also holds <session_id>.control beside its
record: the control token, at the same mode, written before the record and removed with it.
It is the only place the token exists outside the process, and it is useless once the process
is gone, because the key that verifies it was never written anywhere.
Structs§
- Control
Token Guard - One session’s control token file, written for exactly as long as the session runs.
- Process
Identity - A process named so that a recycled pid is never mistaken for it: its pid, and its start time as
process_start_tokenreads it. - Record
Listing - What
list_reportingread, and what it removed on the way past. - Record
Scan - What one pass over a running directory found.
- Running
Guard - One session’s record, written for exactly as long as the session runs.
- Running
Record - Which process holds one running session, and where its door is when it has one.
Enums§
- Liveness
- What all three layers say about a record.
- Process
State - What layers 1 and 2 say about the process a record names.
- Signal
Outcome - What sending one signal to a record’s process did.
Functions§
- control_
token_ path ~/.murmur/running/<session_id>.control: where a session declaringcontrol:keeps its control token for as long as it runs.- has_
controlling_ terminal - Whether the calling process has a controlling terminal, which is what decides
outlives_launcher: a capsule attached to a terminal dies with that window. - identity_
state - Layers 1 and 2 for any process named by pid and start time, record or not.
- list
- Every record that parses, most recent session first.
- list_
reporting list, also naming the unreadable files it removed and the older-murrecords it left, for a reader that reports its pruning.- process_
start_ token - Layer 2’s reading: an opaque, platform-local token for when
pid’s process started. - process_
state - Layers 1 and 2: the pid is alive, and the process holding it is the one that wrote the record.
- prune
- Unlink one record, and its control token file if it has one. For a
Liveness::Gonereading only. - record_
location ~/.murmur/running/<session_id>.json, the record a running session is listed by, resolved asrunning_dir_locationresolves the directory: nothing is created.- running_
dir ~/.murmur/running, created if missing and held at0700, inside a~/.murmurheld at0700.- running_
dir_ location ~/.murmur/running, resolved fromHOMEwithout creating or re-moding anything.- scan
- Every
.jsonentry ofdir, read and parsed, with nothing created, re-moded or removed. - signal_
kill SIGKILLthe process a record names, if it is still that process.- signal_
kill_ process SIGKILLthe processidentitynames, and that process alone, never its group, if it is still that process.- signal_
term SIGTERMthe process a record names, if it is still that process.- signal_
term_ process SIGTERMthe processidentitynames, if it is still that process.- verify
- All three layers, door probe included.