runtime_capabilities

Nonserializable integration capabilities, separate from the data API.

async bedrock_server_manager.plugins.runtime_capabilities.run_task(target_function: Callable, *args: Any, app_context: AppContext, username: str | None = None, plugin_name: str | None = None, **kwargs: Any) → str

Submit owned background work and return its task ID.

Pass positional and keyword arguments through to the target function.

async bedrock_server_manager.plugins.runtime_capabilities.register_data_provider(topic: str, handler: Callable[..., Any], app_context: AppContext, plugin_name: str | None = None) → None

Register an owner-scoped WebSocket topic provider (deprecated; prefer @data_provider).

async bedrock_server_manager.plugins.runtime_capabilities.register_diagnostic_provider(name: str, handler: Callable[..., Any], *, app_context: AppContext, plugin_name: str | None = None) → None

Register asynchronous numeric metadata for this plugin’s diagnostic section (deprecated; prefer @diagnostic_provider).

async bedrock_server_manager.plugins.runtime_capabilities.report_task_progress(percent: float, *, app_context: AppContext, plugin_name: str | None = None) → None

Report progress for the plugin’s current managed task without exposing a context.

async bedrock_server_manager.plugins.runtime_capabilities.report_task_stage(message: str, *, app_context: AppContext, plugin_name: str | None = None) → None

Publish a safe, short description for the plugin’s current managed task.

async bedrock_server_manager.plugins.runtime_capabilities.read_plugin_file(filename: str, *, scope: str = 'private', format: str = 'json', app_context: AppContext, plugin_name: str)

Read a file from this plugin’s private directory or the shared public plugin directory.

async bedrock_server_manager.plugins.runtime_capabilities.write_plugin_file(filename: str, value: Any, *, scope: str = 'private', format: str = 'json', app_context: AppContext, plugin_name: str) → None

Atomically write a file inside this plugin’s private directory or the shared public plugin directory.

async bedrock_server_manager.plugins.runtime_capabilities.get_plugin_data_path(filename: str = '', *, scope: str = 'private', app_context: AppContext, plugin_name: str)

Return a validated path inside this plugin’s private directory or the shared public plugin directory.

bedrock_server_manager.plugins.runtime_capabilities.register_scheduled_task(name: str, handler: Callable[..., Any], *, app_context: AppContext, plugin_name: str, options_model=None, timeout_seconds=300, requires_server_lock=True, with_context=False, description: str = '')

Register an async plugin_name:task handler accepting server_name and options.

Deprecated for plugin methods; prefer the @scheduled_task decorator or api.runtime.register_api_task.

bedrock_server_manager.plugins.runtime_capabilities.register_api_task(name: str, api_method: Callable[..., Any] | str, *, app_context: AppContext, plugin_name: str, options_model=None, default_options: dict[str, Any] | None = None, slot_field: str | None = None, timeout_seconds: float = 300, requires_server_lock: bool = True, description: str = '')

Register an API method or callable to run as a scheduled plugin task.

bedrock_server_manager.plugins.runtime_capabilities.register_http_permission(permission: str, description: str, roles: list[str], *, app_context: AppContext, plugin_name: str) → None

Register a namespaced HTTP capability with explicit role grants (deprecated; prefer http_permissions attribute).