How shirokaproject/shirobot works
ShiroBot is a .NET bot framework for running platform adapters and plugins, with a local dashboard for host management. The principal workflow is: an operator starts the host, adapters connect to messaging platforms and publish platform-neutral events, the host dispatches events to plugins, and adapters provide platform-specific messaging services. The repository also includes configuration, component lifecycle and package updates, logging, and dashboard capabilities. Relationships below are limited to those supported by the README or the supplied source index and excerpts; several dashboard and update details are documented only at subsystem level.
Main entry points: AdapterManager.cs Adapter lifecycle · PluginManager.cs Plugin lifecycle · Http HTTP dashboard · HostCommandHandler.cs Host commands
Components 23
Host runtime
- Host startup
Core/Program.cs - HTTP dashboard
Core/Hosting/Http - Host commands
Core/Hosting/Commands/HostCommandHandler.cs - Configuration
Core/Configuration/ConfigManager.cs - Runtime status
Core/Hosting/Runtime/HostRuntimeState.cs - Logging
Core/Hosting/Logging/HostLogHub.cs - Console UI
Core/Terminal/ConsoleOutput.cs
Components
- Adapter lifecycle
Core/Adapters/AdapterManager.cs - Adapter packages
Core/Adapters/AdapterPackageManager.cs - Plugin lifecycle
Core/Plugins/PluginManager.cs - Loaded plugin
Core/Plugins/LoadedPluginHandle.cs - Assembly loading
Core/Plugins/Loading/SharedAssemblyResolver.cs - Staged updates
Core/Components/Updates/StagedComponentUpdates.cs - Update services
Core/Update/Updater.cs
Messaging
- Adapter SDK
SDK/Adapter/IMessageService.cs - Adapter event bridge
Core/Adapters/AdapterEventBridge.cs - Event dispatcher
Core/Hosting/Events/HostEventDispatcher.cs - Message model
SDK/Models/Message.cs - Plugin SDK
SDK/Plugin/PluginBase.cs
Management
- Component marketplace
Core/Plugins/Marketplace/PluginMarketplaceCache.cs - Avalonia integration
Core/Integrations/Avalonia/AxamlRenderer.cs
Other components
- Operator
- Messaging platform
Connections 30
- Operator → Host startup: starts
- Host startup → Plugin lifecycle: initializes
Core/Program.cs - Host startup → Adapter lifecycle: initializes
Core/Program.cs - Host startup → Configuration: initializes
Core/Program.cs - Operator → HTTP dashboard: opens dashboard
- HTTP dashboard → Plugin lifecycle: manages
- HTTP dashboard → Adapter lifecycle: manages
- Host commands → Plugin lifecycle: manages
Core/Hosting/Commands/HostCommandHandler.cs - Host commands → Adapter lifecycle: manages
Core/Hosting/Commands/HostCommandHandler.cs - Host commands → Update services: invokes
Core/Hosting/Commands/HostCommandHandler.cs - Host commands → Console UI: writes output
Core/Hosting/Commands/HostCommandHandler.cs - Adapter lifecycle → Adapter event bridge: publishes events
Core/Adapters/AdapterManager.cs - Adapter event bridge → Event dispatcher: dispatches events
- Event dispatcher → Loaded plugin: invokes handlers
Core/Hosting/Events/HostEventDispatcher.cs - Event dispatcher → Message model: dispatches
Core/Hosting/Events/HostEventDispatcher.cs - Loaded plugin → Plugin SDK: implements
Core/Plugins/LoadedPluginHandle.cs - Adapter lifecycle → Adapter SDK: loads adapters
Core/Adapters/AdapterManager.cs - Adapter SDK → Messaging platform: sends messages
- Messaging platform → Adapter lifecycle: provides events
- Plugin lifecycle → Assembly loading: resolves assemblies
Core/Plugins/PluginManager.cs - Plugin lifecycle → Loaded plugin: loads and unloads
Core/Plugins/PluginManager.cs - Plugin lifecycle → Staged updates: stages replacements
Core/Plugins/PluginManager.cs - Adapter lifecycle → Staged updates: stages replacements
Core/Adapters/AdapterManager.cs - Update services → Staged updates: stages updates
Core/Update/PluginUpdateService.cs - Configuration → Adapter lifecycle: configures
- Configuration → Plugin lifecycle: configures
- Runtime status → HTTP dashboard: reports status
- Logging → HTTP dashboard: streams logs
- Operator → Component marketplace: finds components
- Avalonia integration → Plugin SDK: renders UI