Skip to main content

Module registration

Module registration 

Source
Expand description

What a session tells mur-roost about itself at launch, and what it is handed back.

The daemon referees; it stages nothing, so what a session holds is not something it can know by having launched it. A session that declares capabilities.spawn.allow registers: it names which artifact is running under which session id, and the daemon resolves that artifact from its own registry and lowers the manifest into a crate::SpawnEnvelope itself. The registrant never states its grants — a registrant that could would be a registrant that could declare its own ceiling.

What comes back is the session’s SpawnCredential, which is the only thing that makes a later POST /spawn answerable. It is held in runtime memory for the life of the session and reaches no workdir file, no environment variable and no trace record.

Registration is required for a delegating session and fatal when it fails (RuntimeError::SpawnRegistrationFailed): a capsule that can delegate but that the daemon has never heard of is a capsule spawning outside the only thing that bounds it. Deregistration is the mirror image and is best effort — a session that has already finished has nothing left to refuse.

Enums§

SessionOutcome
How a session ended, as POST /deregister reports it.

Functions§

check_roost_health
Whether a daemon answers GET /health at roost_url, asked over the client register_session registers with — so the answer is the one a launch would get rather than a second client’s opinion.
deregister_session
Tell the daemon this session has ended, so its credential stops verifying against anything.
register_session
Announce a running session to the daemon and take the credential it mints.