Skip to main content

require_own_transcript

Function require_own_transcript 

Source
pub(crate) fn require_own_transcript(
    ctx: &RpcContext,
    store: &Store,
    target: &str,
    what: &str,
) -> Result<(), String>
Expand description

A WebSocket write to one agent’s transcript or session state. A connection that registered as an agent (with its token) may write only its own agent’s; any other connection must be the AgentMux window, proven by the host. Holding the instance auth key proves nothing, because every agent holds it. target is the agent’s definition id or its slug; what completes “FORBIDDEN: …” when a connection that isn’t the window is refused.