Skip to main content

BashCompletionSink

Trait BashCompletionSink 

Source
pub trait BashCompletionSink: Send + Sync {
    // Required method
    fn on_bash_completed(&self, info: BashCompletionInfo);
}
Expand description

Re-exported so peers that already use crate::runtime::config::{BashResumeHook, …} (the runtime/spawn threading) can name the completion sink the same way, rather than reaching into bamboo_agent_core separately. Loop-facing sink invoked exactly once when a background Bash shell completes.

Implementations MUST be cheap and non-blocking on the calling task: the producer invokes this from the shell’s completion-poll task, so the implementation should hand the delivery to a detached task (mirroring the sibling BashResumeHook) rather than doing I/O inline.

Delivery MUST stay idempotent with the durable end-of-turn suspend/poll backstop: the same completion can also be observed by that poll, so an implementation must not double-deliver (e.g. guard on the persisted bash wait) and must treat the push purely as a latency optimization over the poll.

Required Methods§

Source

fn on_bash_completed(&self, info: BashCompletionInfo)

Called once, off the agent loop, when the shell described by info exits.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§