Skip to main content
Plugin context factory — maps Mellea domain objects to ContextForge GlobalContext.

Functions

FUNC build_global_context

build_global_context(**extra_fields: Any) -> Any
Build a ContextForge GlobalContext from Mellea domain objects. The global context carries lightweight, cross-cutting ambient metadata (e.g. backend_name) that is useful to every hook regardless of type. Hook-specific data (context, session, action, etc.) belongs on the typed payload, not here. Returns None if ContextForge is not installed.