Skip to main content

Module runtime_mail

Module runtime_mail 

Source
Expand description

The default delivery tier of the mailbox: sessions supercode controls.

A session supercode hosts as a runtime (any harness: Codex over app-server, Claude Code over stream-json, pi, the ACP harnesses, OpenCode) registers a live-runtime receipt (crate::live_runtime). Mail to such a session goes through the runtime’s own doors, the same ones every frontend uses: steer while a turn runs, send_input to start one. No hook, relay or per-harness code is involved; those are the degraded tier, for sessions supercode does not control.

The text delivered is the rendered envelope: who sent it, that it is not the user, and how to answer.

Enums§

RuntimeDelivery
How a message entered a controlled session.

Functions§

answer_to
The runtime’s answer to the message message_id: the text of its last assistant message after the user message that carried that id, read from the session’s own transcript (a hosted runtime’s attach history can be empty; its harness’s transcript never is). None until it has answered.
controlled_runtime
The live runtime supercode hosts for harness’s session session_id, if it controls that session.
controlled_runtimes
Every session supercode controls on this machine.
deliver_to_runtime
Deliver text into a controlled session: steer a running turn, or start one when wake (a --queue send leaves an idle session alone).
runtime_turn_state
The runtime’s turn state right now.