pub enum ExtensionConfig {
Stdio {
name: String,
description: String,
cmd: String,
args: Vec<String>,
envs: Envs,
env_keys: Vec<String>,
timeout: Option<u64>,
cwd: Option<String>,
bundled: Option<bool>,
available_tools: Vec<String>,
},
StreamableHttp {Show 13 fields
name: String,
description: String,
uri: String,
envs: Envs,
env_keys: Vec<String>,
headers: HashMap<String, String>,
timeout: Option<u64>,
socket: Option<String>,
client_id: Option<String>,
client_secret_key: Option<String>,
scopes: Vec<String>,
bundled: Option<bool>,
available_tools: Vec<String>,
},
}Variants§
Stdio
Fields
StreamableHttp
Fields
§
socket: Option<String>Optional Unix domain socket path for HTTP-over-UDS transport.
When set, the HTTP connection is routed through this socket while
uri is used for the Host header and path.
Use @name for Linux abstract sockets.
§
client_id: Option<String>OAuth client ID pre-registered with the server’s authorization
server. When set, it is used directly for the authorization flow
instead of Client ID Metadata Documents or Dynamic Client
Registration — required for authorization servers that support
neither. Supports $VAR/${VAR} substitution.
§
client_secret_key: Option<String>Name of the env/secret key holding the OAuth client secret paired
with client_id. The value is resolved from envs/env_keys or
the config secret store — never stored inline. Optional: public
clients using PKCE have no secret.
Implementations§
Source§impl ExtensionConfig
impl ExtensionConfig
pub fn streamable_http<S: Into<String>, T: Into<u64>>( name: S, uri: S, description: S, timeout: T, ) -> Self
pub fn stdio<S: Into<String>, T: Into<u64>>( name: S, cmd: S, description: S, timeout: T, ) -> Self
pub fn with_args<I, S>(self, args: I) -> Self
pub fn key(&self) -> String
pub fn name(&self) -> String
pub fn is_tool_available(&self, tool_name: &str) -> bool
pub async fn resolve( self, config: &impl ExtensionConfigResolver, ) -> ExtensionResult<Self>
Trait Implementations§
Source§impl Clone for ExtensionConfig
impl Clone for ExtensionConfig
Source§impl Debug for ExtensionConfig
impl Debug for ExtensionConfig
Source§impl<'de> Deserialize<'de> for ExtensionConfig
impl<'de> Deserialize<'de> for ExtensionConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ExtensionConfig
impl Display for ExtensionConfig
Source§impl ExtensionSpec for ExtensionConfig
impl ExtensionSpec for ExtensionConfig
Source§impl PartialEq for ExtensionConfig
impl PartialEq for ExtensionConfig
Source§impl Serialize for ExtensionConfig
impl Serialize for ExtensionConfig
impl StructuralPartialEq for ExtensionConfig
Auto Trait Implementations§
impl Forget for ExtensionConfig
impl Freeze for ExtensionConfig
impl Move for ExtensionConfig
impl RefUnwindSafe for ExtensionConfig
impl Send for ExtensionConfig
impl Sync for ExtensionConfig
impl Unpin for ExtensionConfig
impl UnsafeUnpin for ExtensionConfig
impl UnwindSafe for ExtensionConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> 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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.