Skip to main content

TurnHandoffAvailableMessage

Struct TurnHandoffAvailableMessage 

Source
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: u64

Contract version of the handoff registration (currently 1).

§tools: Vec<String>

The tools whose calls this worker would accept.

§worker_epoch: u64

The 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+).

§shared_message_id: Option<bool>

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>

Trait Implementations§

Source§

impl Clone for TurnHandoffAvailableMessage

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TurnHandoffAvailableMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TurnHandoffAvailableMessage

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for TurnHandoffAvailableMessage

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.