pub struct DirectoryCustomization {
pub id: String,
pub uri: Uri,
pub name: String,
pub icons: Option<Vec<Icon>>,
pub range: Option<TextRange>,
pub meta: Option<JsonObject>,
pub enabled: bool,
pub client_id: Option<String>,
pub load: Option<CustomizationLoadState>,
pub children: Option<Vec<ChildCustomization>>,
pub contents: CustomizationType,
pub writable: bool,
}Expand description
A directory the host watches for this session.
Presence in the customization list signals that the host may discover
customizations from this directory. When writable is true, clients
MAY persist new customizations into the directory using
resourceWrite; the host will
then surface the resulting child via the customization actions.
The directory may not yet exist on disk.
Fields§
§id: StringSession-unique opaque identifier. Used by every action that targets a specific customization. Minted by whoever publishes the customization (typically the agent host).
uri: UriSource URI for this customization. A plugin URL, a file URI, or a directory URI.
For declarations that live inside a larger file — e.g. an MCP
server declared inline in a plugins.json manifest — uri points
to the containing file and {@link CustomizationBase.range | range}
narrows it to the declaration’s span.
name: StringHuman-readable name.
icons: Option<Vec<Icon>>Icons for UI display.
range: Option<TextRange>Optional span within {@link CustomizationBase.uri | uri} when this
customization is a subset of a larger file (for example, one entry
in an inline mcpServers block of a plugins.json manifest).
Absent when the customization covers the whole resource.
meta: Option<JsonObject>Additional provider-specific metadata for this customization.
Mirrors the MCP _meta convention. Optional and opaque to the
protocol; producers and consumers agree on its contents
out-of-band.
enabled: boolWhether this container is currently enabled.
client_id: Option<String>clientId of the client that contributed this container. Absent for
server-originated entries.
load: Option<CustomizationLoadState>Host-reported load state. Absent means the host has not yet reported a load state for this container.
children: Option<Vec<ChildCustomization>>Children discovered inside this container.
Absent means the host has not parsed this container yet. An empty array means the host parsed the container and it contributes nothing.
contents: CustomizationTypeWhich child customization type this directory holds.
writable: boolWhether clients may write into this directory.
Trait Implementations§
Source§impl Clone for DirectoryCustomization
impl Clone for DirectoryCustomization
Source§fn clone(&self) -> DirectoryCustomization
fn clone(&self) -> DirectoryCustomization
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DirectoryCustomization
impl Debug for DirectoryCustomization
Source§impl<'de> Deserialize<'de> for DirectoryCustomization
impl<'de> Deserialize<'de> for DirectoryCustomization
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>,
Source§impl PartialEq for DirectoryCustomization
impl PartialEq for DirectoryCustomization
Source§fn eq(&self, other: &DirectoryCustomization) -> bool
fn eq(&self, other: &DirectoryCustomization) -> bool
self and other values to be equal, and is used by ==.