pub struct AcpServerConfig {Show 19 fields
pub agent_name: String,
pub agent_version: String,
pub max_sessions: usize,
pub session_idle_timeout_secs: u64,
pub permission_file: Option<PathBuf>,
pub provider_factory: Option<ProviderFactory>,
pub available_models: SharedAvailableModels,
pub mcp_manager: Option<Arc<McpManager>>,
pub auth_bearer_token: Option<String>,
pub discovery_enabled: bool,
pub terminal_timeout_secs: u64,
pub project_rules: Vec<PathBuf>,
pub title_max_chars: usize,
pub max_history: usize,
pub sqlite_path: Option<String>,
pub ready_notification: Option<ReadyNotification>,
pub additional_directories: Vec<AdditionalDir>,
pub auth_methods: Vec<AcpAuthMethod>,
pub message_ids_enabled: bool,
}Expand description
Configuration for the ACP server, threaded through to the agent on every connection.
Construct with AcpServerConfig::default() and override the fields you need.
§Examples
use zeph_acp::AcpServerConfig;
let config = AcpServerConfig {
agent_name: "zeph".to_owned(),
agent_version: "1.0.0".to_owned(),
max_sessions: 4,
..AcpServerConfig::default()
};
assert_eq!(config.agent_name, "zeph");
assert_eq!(config.max_sessions, 4);Fields§
§agent_name: StringDisplay name of the agent reported to IDEs during handshake.
agent_version: StringSemver version of the agent reported to IDEs during handshake.
max_sessions: usizeMaximum number of concurrent ACP sessions (default: 4).
session_idle_timeout_secs: u64Seconds of inactivity before an idle session is reaped (default: 1800).
permission_file: Option<PathBuf>Path to the TOML permission file for tool-call approval decisions.
Defaults to $XDG_CONFIG_HOME/zeph/acp-permissions.toml when None.
provider_factory: Option<ProviderFactory>Optional factory for runtime model switching via set_session_config_option.
available_models: SharedAvailableModelsAvailable model identifiers to advertise in new_session config_options.
mcp_manager: Option<Arc<McpManager>>Optional shared MCP manager for ext_method add/remove/list.
auth_bearer_token: Option<String>Bearer token for HTTP and WebSocket transport authentication.
When Some, all /acp and /acp/ws requests must include the token in
an Authorization: Bearer <token> header. When None, the endpoints are
publicly accessible and a warning is logged at startup.
discovery_enabled: boolWhether to serve the /.well-known/acp.json discovery manifest.
terminal_timeout_secs: u64Timeout in seconds for terminal command execution before the process is killed.
project_rules: Vec<PathBuf>Project rule file paths to advertise in new_session _meta.
title_max_chars: usizeMaximum characters for auto-generated session titles (0 = no limit).
max_history: usizeMaximum number of sessions returned by list endpoints (0 = unlimited).
sqlite_path: Option<String>Path to the SQLite database for ACP session persistence.
When set, the agent persists session events and loads conversation history
from this database. When None, sessions are in-memory only.
ready_notification: Option<ReadyNotification>Optional startup notification emitted as the first stdio JSON-RPC frame.
additional_directories: Vec<AdditionalDir>Canonicalized allowlist of directories ACP clients may reference in session requests.
auth_methods: Vec<AcpAuthMethod>Auth methods to advertise in the initialize response.
message_ids_enabled: boolWhen true, echo PromptRequest.message_id through responses and chunks.
Trait Implementations§
Source§impl Clone for AcpServerConfig
impl Clone for AcpServerConfig
Auto Trait Implementations§
impl Freeze for AcpServerConfig
impl !RefUnwindSafe for AcpServerConfig
impl Send for AcpServerConfig
impl Sync for AcpServerConfig
impl Unpin for AcpServerConfig
impl UnsafeUnpin for AcpServerConfig
impl !UnwindSafe for AcpServerConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
fn into_option(self) -> Option<T>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request