Skip to main content

AdapterSpec

Struct AdapterSpec 

Source
pub struct AdapterSpec {
    pub id: &'static str,
    pub display_name: &'static str,
    pub tier: Tier,
    pub detect: &'static [Probe],
    pub mcp: Option<McpSpec>,
}
Expand description

One client: identity, detection probes and MCP targets.

Fields§

§id: &'static str

Client id (claude-code), as used in store files.

§display_name: &'static str§tier: Tier§detect: &'static [Probe]

Detection probes; any hit detects the client (SPEC 7.7).

§mcp: Option<McpSpec>

Implementations§

Source§

impl AdapterSpec

Source

pub fn mcp_targets( &self, env: &Env, fs: &dyn Fs, scope: Scope, project: Option<&Path>, prefs: &ClientPrefs, ) -> Result<Vec<Target>, CoreError>

The files this client’s MCP servers go to in scope. Only checks which files exist; never reads or writes them. prefs is the client’s table in clients.toml; it selects the profiles of a client with McpSpec::profiles (an empty list selects none) and the files of one with McpSpec::user_files, and is ignored by the others.

Errors: not_supported_on_os when the client has no MCP target on this OS, scope_not_supported when it has none in scope, invalid_path for a project scope without an absolute project, invalid_value for a profile name the client rejects.

Source

pub fn suppression_target( &self, env: &Env, fs: &dyn Fs, project: &Path, prefs: &ClientPrefs, ) -> Result<Option<Target>, CoreError>

Where a project hides a same-named user server, as a target:

None when the client cannot suppress a user server in a project.

Source

pub fn name_collisions(&self, name: &str, keys: &[String]) -> Vec<CoreError>

collision for each key in keys that the client treats as the same server as name without being equal to it (Pi my-tool and my_tool). keys are the names already in the container, or other names desired for the same target.

Auto Trait Implementations§

§

impl !RefUnwindSafe for AdapterSpec

§

impl !UnwindSafe for AdapterSpec

§

impl Forget for AdapterSpec

§

impl Freeze for AdapterSpec
where &'static str: Freeze, &'static [Probe]: Freeze, &'static [Os]: Freeze, &'static [Location]: Freeze, &'static Location: Freeze, &'static [&'static str]: Freeze, &'static [ContainerPath]: Freeze, &'static [McpExtension]: Freeze, &'static dyn EntryMapper: Freeze, &'static [Source]: Freeze, &'static [CompatSource]: Freeze, &'static [TimeoutField]: Freeze,

§

impl Move for AdapterSpec

§

impl Send for AdapterSpec
where &'static str: Send, &'static [Probe]: Send, &'static [Os]: Send, &'static [Location]: Send, &'static Location: Send, &'static [&'static str]: Send, &'static [ContainerPath]: Send, &'static [McpExtension]: Send, &'static dyn EntryMapper: Send, &'static [Source]: Send, &'static [CompatSource]: Send, &'static [TimeoutField]: Send,

§

impl Sync for AdapterSpec

§

impl Unpin for AdapterSpec
where &'static str: Unpin, &'static [Probe]: Unpin, &'static [Os]: Unpin, &'static [Location]: Unpin, &'static Location: Unpin, &'static [&'static str]: Unpin, &'static [ContainerPath]: Unpin, &'static [McpExtension]: Unpin, &'static dyn EntryMapper: Unpin, &'static [Source]: Unpin, &'static [CompatSource]: Unpin, &'static [TimeoutField]: Unpin,

§

impl UnsafeUnpin for AdapterSpec
where &'static str: UnsafeUnpin, &'static [Probe]: UnsafeUnpin, &'static [Os]: UnsafeUnpin, &'static [Location]: UnsafeUnpin, &'static Location: UnsafeUnpin, &'static [&'static str]: UnsafeUnpin, &'static [ContainerPath]: UnsafeUnpin, &'static [McpExtension]: UnsafeUnpin, &'static dyn EntryMapper: UnsafeUnpin, &'static [Source]: UnsafeUnpin, &'static [CompatSource]: UnsafeUnpin, &'static [TimeoutField]: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more