MLOX can discover third-party service and server configs from Python entry points.
Entry-point groups:
mlox.service_pluginsmlox.server_plugins
Each entry point must return a mlox.config.ServiceConfig instance. The config should include the same core fields as built-in YAML configs, especially id, name, version, maintainer, description_short, description, links, and build.class_name.
[project]
name = "my-mlox-plugin"
version = "0.1.0"
dependencies = ["busysloths-mlox"]
[project.entry-points."mlox.service_plugins"]
my-service = "my_mlox_plugin.plugin:service_plugin"
[project.entry-points."mlox.server_plugins"]
my-server = "my_mlox_plugin.plugin:server_plugin"from mlox.config import BuildConfig, ServiceConfig
def service_plugin() -> ServiceConfig:
config = ServiceConfig(
id="my-plugin-service",
name="My Plugin Service",
version="1.0.0",
maintainer="Plugin Maintainer",
description_short="Example external service config.",
description="Example external service config for MLOX.",
links={"project": "https://example.com"},
build=BuildConfig(class_name="my_mlox_plugin.service.MyService"),
)
config.path = "external/mlox.my-plugin-service.yaml"
return config
def server_plugin() -> ServiceConfig:
config = ServiceConfig(
id="my-plugin-server",
name="My Plugin Server",
version="1.0.0",
maintainer="Plugin Maintainer",
description_short="Example external server config.",
description="Example external server config for MLOX.",
links={"project": "https://example.com"},
build=BuildConfig(class_name="my_mlox_plugin.server.MyServer"),
)
config.path = "external/mlox-server.my-plugin-server.yaml"
return configInstall the plugin package into the same environment as MLOX:
pip install my-mlox-pluginAfter installation, the config is included by normal loading paths such as:
load_all_service_configs()load_all_server_configs()
Plugin entry points currently cover config discovery only. Frontend UI setup handlers (TUI, plus the deprecated Streamlit UI until its extraction) are not declared in YAML and are not yet part of the documented external plugin API.
The built-in pattern is:
- YAML or plugin config declares the deployable service/server.
- Frontend modules implement custom setup/settings handlers.
mlox/ui/registry.pyregisters handlers byconfig_id, frontend, and function name.