Plugin Architecture

Overview

BOSA Core is a flexible plugin-based architecture that allows you to build modular and extensible applications. It provides a robust framework for managing plugins, handling dependencies, and injecting services. It consists of two main modules and supports two programming languages: TypeScript and Python.

Core Components

Plugin Manager

The central orchestrator for plugins. It manages:

  • Registration, instantiation, and retrieval of plugins.

  • Ensures that each plugin is paired with its handler and that all dependencies are injected before use.

  • Handles service registration

Service Registry

A container for all services

  • Handles registration and retrieval of service instances

  • Handles dependency injection

  • Maps service types to their implementations

Note: You don't need to create your own Service Registry - it's integrated into the Manager!

Plugin Handler

Interface for providing services to plugins

  • Creates service injections through create_injections

  • Initializes plugin-specific resources

  • Can be extended for different types of plugins (e.g., HTTP handlers)

Plugin

All plugins must inherit from the Plugin base class.

  • Has basic metadata (name, description, version)

  • Receives injected services automatically

  • Can be extended with specific functionality

Last updated