Desktop Plugins
Biosimulant Desktop supports a plugin system that lets developers extend the desktop app with new capabilities. Plugins are standalone packages distributed through the Biosimulant plugin registry (or installed locally) and have zero compile-time coupling with the desktop app.
Plugins can:
- Add sidebar items and full-page views to the desktop app
- Contribute panels to the lab detail sidebar
- Provide agent or tool capabilities via a JSON-RPC sidecar process
- Declare permissions and request user approval at runtime
Plugins are runtime-installable packages. The desktop app discovers and renders plugin UI contributions dynamically based on the plugin’s kind. It never imports plugin-specific code at build time.
Architecture
┌─────────────────────────────────────────────────┐
│ Biosimulant Desktop (Tauri) │
│ │
│ ┌───────────┐ JSON-RPC ┌─────────────┐ │
│ │ Plugin │◄───(stdio)────►│ Plugin │ │
│ │ Host │ │ Process │ │
│ │ (Rust) │ │ (your code) │ │
│ └───────────┘ └─────────────┘ │
│ │ │
│ ▼ │
│ ┌───────────┐ │
│ │ React UI │ Renders generic views based │
│ │ (dynamic) │ on plugin kind + contributions │
│ └───────────┘ │
└─────────────────────────────────────────────────┘The desktop app manages plugin lifecycles: installation, permissions, process spawning, and UI rendering. Your plugin is a standalone process that communicates with the host over stdin/stdout using JSON-RPC 2.0.
Plugin Kinds
| Kind | Description | UI Support |
|---|---|---|
agent_provider | AI agent that can run sessions, send turns, and handle approvals | Full-page view, lab sidepanel, sidebar icon |
tool_provider | Utility tool that provides capabilities via JSON-RPC methods | Settings section, sidebar icon (if contributed) |
Quick Links
Workflow Summary
- Create a
plugin.jsonmanifest and your entrypoint script - Implement the JSON-RPC protocol (at minimum
plugin/healthandplugin/shutdown) - Package into a
.bsipluginarchive using the build script - Install locally in the desktop app for testing, or upload to the registry for distribution
- Users discover your plugin in the marketplace and install it