api_bridge
- bedrock_server_manager.plugins.api_bridge.api_method(name: str, expose_to_plugins: bool = True) Callable[[F], F]
Decorator to register a function with the AppAPI bridge.
Validates that the registering function originates from one of the allowed API modules.
- bedrock_server_manager.plugins.api_bridge.create_app_api(plugin_name: str, app_context: AppContext | None, is_core: bool = False, *, events: EventBus | None = None) AppAPI
Factory function to create an AppAPI instance.
- class bedrock_server_manager.plugins.api_bridge.CapabilityNamespace(api: AppAPI, domain: str)
Scoped capability interface for domain operations (e.g., api.server, api.backup_restore).
- class bedrock_server_manager.plugins.api_bridge.AppAPI(plugin_name: str, api_dispatcher: Callable[[str], Callable[[...], Any]], event_listener: Callable[[...], Any], event_sender: Callable[[...], Awaitable[Any]], is_core: bool = False, runtime_dispatcher: Callable[[str], Callable[[...], Any]] | None = None, event_dispatcher: Callable[[...], Any] | None = None)
Safe, dynamic, and decoupled interface for plugins to access core APIs.
- property operations: PluginOperationAPI
Read operation ancestry and results within the current sequence.
- property events: PluginEventAPI
Typed, owner-scoped event declaration, delivery, and diagnostics.
- property scheduler: SchedulerAPI
Read application schedules; task registration uses
@scheduled_task,scheduled_apis, orruntime.register_api_task.
- property diagnostics: DiagnosticsAPI
Read typed diagnostics through the plugin data API.
- list_available_apis(include_internal: bool | None = None) List[Dict[str, Any]]
Return details of all registered APIs from allowed modules.
- listen_for_event(event_name: str, callback: Callable[[...], None])
Deprecated unscoped event listener helper; prefer
@app_eventorself.api.events.listen().
- async send_event(event_name: str, *args: Any, **kwargs: Any)
Deprecated unscoped event emitter helper; prefer
self.api.events.emit().