fn read_component_dir(
dir: &Path,
gated: bool,
) -> Result<Option<DirComponents>, Error>Expand description
Read the component parts of one plugin dir. Err is an io error
that stopped the dir being read - its own read_dir, or for a
gated dir the stat of its .claude-plugin/plugin.json; Ok(None)
when a gated dir carries no such manifest. Registered installs read
ungated because the registry’s installPath is authoritative; clone
sources read ungated because a marketplace source dir is a plugin by
declaration.