Struct AcpServer
pub struct AcpServer { /* private fields */ }Implementations§
Source§impl AcpServer
impl AcpServer
pub fn new(config: Config, acp_config: AcpServerConfig) -> AcpServer
pub fn new_with_writer( config: Config, acp_config: AcpServerConfig, writer_tx: Sender<String>, ) -> AcpServer
pub fn new_with_store( config: Config, acp_config: AcpServerConfig, store: Arc<AcpSessionStore>, ) -> AcpServer
pub fn new_with_writer_and_store( config: Config, acp_config: AcpServerConfig, writer_tx: Sender<String>, store: Arc<AcpSessionStore>, ) -> AcpServer
Sourcepub fn new_with_live_config_and_writer(
live_config: Arc<RwLock<RawRwLock, Config>>,
acp_config: AcpServerConfig,
writer_tx: Sender<String>,
) -> AcpServer
pub fn new_with_live_config_and_writer( live_config: Arc<RwLock<RawRwLock, Config>>, acp_config: AcpServerConfig, writer_tx: Sender<String>, ) -> AcpServer
Create a gateway-backed ACP server without durable session storage.
The server retains no parallel Config clone and resolves an on-demand
view whenever it handles a request.
Sourcepub fn new_with_live_config_and_writer_and_store(
live_config: Arc<RwLock<RawRwLock, Config>>,
acp_config: AcpServerConfig,
writer_tx: Sender<String>,
store: Arc<AcpSessionStore>,
) -> AcpServer
pub fn new_with_live_config_and_writer_and_store( live_config: Arc<RwLock<RawRwLock, Config>>, acp_config: AcpServerConfig, writer_tx: Sender<String>, store: Arc<AcpSessionStore>, ) -> AcpServer
Create a gateway-backed ACP server with durable session storage.
The server retains no parallel Config clone and resolves an on-demand
view whenever it handles a request.
Sourcepub fn with_connection_default_agent(self, alias: Option<String>) -> AcpServer
pub fn with_connection_default_agent(self, alias: Option<String>) -> AcpServer
Set the connection-scoped default agent alias (?agent= query param
on the gateway ACP endpoint). Blank values are treated as absent. The
alias is validated at session/new with the same dispatchable-agent
checks as an explicit agentAlias. Restore paths ignore this value.
Sourcepub fn with_canvas_store(self, canvas_store: CanvasStore) -> AcpServer
pub fn with_canvas_store(self, canvas_store: CanvasStore) -> AcpServer
Attach the shared gateway CanvasStore so that agents created by
this server write canvas frames to the same store that the
/ws/canvas/:id WebSocket endpoint serves.
Sourcepub fn with_sop_engine(
self,
sop_engine: Option<Arc<Mutex<SopEngine>>>,
sop_audit: Option<Arc<SopAuditLogger>>,
) -> AcpServer
pub fn with_sop_engine( self, sop_engine: Option<Arc<Mutex<SopEngine>>>, sop_audit: Option<Arc<SopAuditLogger>>, ) -> AcpServer
Attach the shared SOP engine from the daemon so that agents created by this server share a single SOP engine with the rest of the daemon.
Sourcepub async fn run(self: Arc<AcpServer>) -> Result<(), Error>
pub async fn run(self: Arc<AcpServer>) -> Result<(), Error>
Run the ACP server, reading JSON-RPC requests from stdin and writing responses/notifications to stdout.
pub async fn run_messages( self: Arc<AcpServer>, input_rx: Receiver<String>, ) -> Result<(), Error>
Auto Trait Implementations§
impl !Freeze for AcpServer
impl !RefUnwindSafe for AcpServer
impl Send for AcpServer
impl Sync for AcpServer
impl Unpin for AcpServer
impl UnsafeUnpin for AcpServer
impl !UnwindSafe for AcpServer
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more