pub struct TurnHandoffAvailableMessage {
pub v: u64,
pub tools: Vec<String>,
pub worker_epoch: u64,
pub relay_marker: Option<bool>,
pub staged_files: Option<bool>,
pub no_query_first: Option<bool>,
pub home_files: Option<bool>,
pub file_names: Option<bool>,
pub carried_writes: Option<bool>,
pub uuid: String,
pub session_id: String,
pub extra: Map<String, Value>,
}Expand description
system/turn_handoff_available — emitted once by a cloud worker that
accepts the turn_handoff control request, right after it registers,
carrying what its registration wrote to external_metadata.turn_handoff.
Lets a session client learn the capability from the event stream instead
of reading worker state. Durable in the stream: a reader keeps the entry
with the newest worker_epoch it has seen and ignores older ones; a
worker life that does not accept turn_handoff emits nothing
(CLI 2.1.273+).
Fields§
§v: u64Contract version of the handoff registration (currently 1).
tools: Vec<String>The tools whose calls this worker would accept.
worker_epoch: u64The worker life announcing it.
relay_marker: Option<bool>Present, and true, only when this worker uses the relay_marker
member of a turn_handoff request; a client sends that member to no
other worker.
staged_files: Option<bool>Present, and true, when this worker starts a handed-off turn’s calls
only after every stage_file control request it received earlier has
finished or failed, or a wait limit has passed; a worker that omits
it may start them while files are still downloading (CLI 2.1.278+).
Exception: a request with filestore_path set (a synced file) is not
waited for, so a call that names that file may start before it is
synced (CLI 2.1.287+).
no_query_first: Option<bool>True when user messages with shouldQuery false that reach this
worker before a turn_handoff request are appended, and
acknowledged, before the handed-off turn produces any output.
Exception: a request that continues a turn whose leading lines an
earlier request appended; that turn goes first. A worker that omits
it may run the turn first (CLI 2.1.278+).
home_files: Option<bool>Present, and true, only on a worker that takes a stage_file control
request whose mount_path is /uploads/.home/<path> as a file for
/home/claude/<path>: it writes the file there, answers ok with a
noop (already_present, path_occupied, refused_name,
home_files_off) and writes nothing, or answers an error. Any other
worker treats that path as an ordinary upload (CLI 2.1.287+).
file_names: Option<bool>Present, and true, only when this worker uses the file_names member
of a turn_handoff request; a client sends that member to no other
worker (CLI 2.1.287+).
carried_writes: Option<bool>Present, and true, only on a worker that writes the files of the
Write calls a turn_handoff request brings already answered, where
their paths are under /home/claude. Before it appends a turn that
has calls to run, it writes each such call’s content to its path,
replacing nothing. If it cannot write them all, it appends and runs
nothing: the request is refused with an error that starts
invalid_handoff: carried_writes_, or it is accepted and the turn
ends in a result with num_turns 0. Any other worker writes no file
for these calls (CLI 2.1.288+).
uuid: String§session_id: String§extra: Map<String, Value>