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 strClient 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
impl AdapterSpec
Sourcepub fn mcp_targets(
&self,
env: &Env,
fs: &dyn Fs,
scope: Scope,
project: Option<&Path>,
prefs: &ClientPrefs,
) -> Result<Vec<Target>, CoreError>
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.
Sourcepub fn suppression_target(
&self,
env: &Env,
fs: &dyn Fs,
project: &Path,
prefs: &ClientPrefs,
) -> Result<Option<Target>, CoreError>
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:
ProjectDisable::ListMember: the project-local file (the project file for a client without one, Geminimcp.excluded), with the list as its container (Claude Codeprojects["<P>"].disabledMcpServers), forDocument::set_list_member.ProjectDisable::EnabledFalse: the project file and its server container, for an upsert ofMcpSpec::suppression_entry.
None when the client cannot suppress a user server in a project.
Sourcepub fn name_collisions(&self, name: &str, keys: &[String]) -> Vec<CoreError>
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.