core: Replace legacy INI config system with Pydantic-based TOML configuration.

This is a huge configuration refactoring.

The configuration system now uses Pydantic settings, with better validation, better
support for environment variables and other goodies.

The main config files now use TOML instead of INI, this allow for better handling of
complex types, notably dict.

Plugins, components and frontends can declare their config settings in a class which will
be imported dynamically.
This commit is contained in:
Goffi 2025-11-30 12:27:35 +01:00
commit 6a7b7bc36a

View file

@ -23,6 +23,7 @@ from twisted.internet import defer
from twisted.words.protocols.jabber import jid
from twisted.words.xish import domish
from wokkel import data_form
from libervia.backend import G
from libervia.backend.core import exceptions
from libervia.backend.core.constants import Const as C
from libervia.backend.core.core_types import SatXMPPEntity
@ -269,13 +270,9 @@ class XEP_0433:
host.trigger.add(
"JID_SEARCH_perform_search", self.jid_search_perform_search_trigger
)
self.allow_external = C.bool(
host.memory.config_get(None, "allow_external_search", C.BOOL_FALSE)
)
self.allow_external = G.config.common.allow_external_search
self.group_chat_search_default_jid = jid.JID(
host.memory.config_get(
None, "group_chat_search_default_jid", "api@search.jabber.network"
)
G.config.common.group_chat_search_default_jid
)
host.bridge.add_method(