Project: SharpClaw.Code.Plugins
Registration: PluginsServiceCollectionExtensions.AddSharpClawPlugins (via AddSharpClawTools → Runtime)
Under the workspace (see PluginLocalStore):
{workspace}/.sharpclaw/plugins/{pluginId}/
manifest.json
state.json # LoadedPlugin snapshot
package.txt # optional, from install request
PluginManager validates manifests, writes state, emits telemetry/events when IRuntimeEventPublisher is present, and uses IPluginLoader (default out-of-process path) for tool execution.
Only plugins in PluginLifecycleState.Enabled surface tool descriptors to IPluginManager.ListToolDescriptorsAsync (ToolRegistry consumes this).
Manifest trust flows into Protocol models and PermissionEvaluationContext (ToolOriginatingPluginId, PluginTrustRule, etc.).
plugins command (PluginsCommandHandler):
list— installed pluginsinstall/update—--manifestpath to JSON →PluginManifestenable/disable/uninstall—--id
JSON output uses ProtocolJsonContext for LoadedPlugin, List<LoadedPlugin>, and simple maps where applicable.
Manifest parsing in LoadInstallRequestAsync uses JsonSerializer.Deserialize with JsonSerializerDefaults.Web (see ARCHITECTURE-NOTES.md for tightening).
- Prepare a
PluginManifestcompatible withPluginManifestValidator. - Run
plugins install --manifest path/to/manifest.jsonwith--cwdset to the workspace.
Tool descriptors come from the manifest and loader; execution goes through PluginToolProxyTool and IPluginManager.ExecuteToolAsync. Ensure the plugin process/tool contract matches PluginToolDescriptor and ToolExecutionRequest.
For tests only, see ParityFixturePluginTool in the parity harness (extra ISharpClawTool registration).