pub struct HostBridge { /* private fields */ }Expand description
Host-callback bridge handed to an executor (via EventSink) so a nested
sub-agent can proxy a gated-tool approval to the host — over the same
per-child WebSocket, no broker needed. Absent for tests/EchoExecutor.
Implementations§
Source§impl HostBridge
impl HostBridge
Sourcepub fn channel() -> (Self, UnboundedReceiver<HostRequest>)
pub fn channel() -> (Self, UnboundedReceiver<HostRequest>)
Create a bridge + the receiver the transport pumps to the wire.
Sourcepub async fn approval_call(&self, body: Value) -> Result<Value, String>
pub async fn approval_call(&self, body: Value) -> Result<Value, String>
Proxy one gated-tool approval to the host and await the decision JSON
({"approved": bool}). The worker’s permission flow blocks on this so the
human decides on the parent (Phase 2).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HostBridge
impl RefUnwindSafe for HostBridge
impl Send for HostBridge
impl Sync for HostBridge
impl Unpin for HostBridge
impl UnsafeUnpin for HostBridge
impl UnwindSafe for HostBridge
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more