pub struct TurnHandoffAvailableMessage {Show 15 fields
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 hydrates_carried_lines: Option<bool>,
pub shared_message_id: Option<bool>,
pub requires_rewind_request_id: 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, unchecked_announcement, resent_announcement)
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+).
hydrates_carried_lines: Option<bool>Present, and true, only on a worker that rebuilt the conversation
from the session’s stored transcript before it read any request, and
would not have started without it. A client may send such a worker
again a turn_handoff request an earlier worker accepted, if the
request names no calls (empty tool_use_ids), is not stopped, and its
messages hold no tool call: the worker appends only the turn’s
messages its conversation lacks and, once the store confirms them,
echoes the turn’s last message back as an assistant event. The
request can still be accepted or refused (invalid_handoff:) with no
echo, e.g. after a rewind, a compaction or a Stop; an echo proves
nothing if the same worker had the request before. The key promises
nothing for a turn that holds a tool call. A worker without it may
have started with none of the turn’s messages (CLI 2.1.296+).
Present, and true, when this worker accepts a turn_handoff request
in which an assistant message repeats the message id of the assistant
message before it. A worker that omits it refuses such a request
(invalid_handoff), so a client gives each message an id of its own
there (CLI 2.1.300+).
requires_rewind_request_id: Option<bool>Present, and true, only on a worker that reads the
requires_rewind_request_id member of a turn_handoff request; a
worker without this key ignores the member and appends the turn
whether or not the rewind was made (CLI 2.1.311+).
uuid: String§session_id: String§extra: Map<String, Value>