Skip to main content

respond

Function respond 

Source
pub async fn respond(
    lease: &TurnLease,
    talk: &mut Talk,
    store: &Talks,
    cfg: &Config,
    text: &str,
) -> Result<()>
Expand description

The agent’s half of a turn: invoke, append, flush. Pairs with record.

Requires the talk’s TurnLease (from Talks::claim_turn), so no starter can run a turn without holding the cross-process slot. The lease is renewed while the turn runs; a lease lost mid-turn stops it with an error.