Configuration API

Configuration loading is supported for integrations that need effective settings. It validates version 2 fields, merges global defaults, and rejects unknown fields without writing files. See the configuration reference for the TOML contract.

.. py:module:: memoryledger.config

Strict Memoryledger tool configuration and legacy conversion helpers.

.. py:function:: load_tool_config(path, *, global_defaults=True)

module:

memoryledger.config

Load and validate a schema-3 project tool config without resolving paths.

type path:
sphinx_autodoc_typehints_type:

\:py\:class\:\~pathlib.Path``

param path:
type global_defaults:

:sphinx_autodoc_typehints_type:\:py\:class\:\bool``

param global_defaults:
rtype:
sphinx_autodoc_typehints_type:

\:py\:class\:\~memoryledger.models.ToolConfig``

.. py:function:: tool_config_from_legacy(data)

module:

memoryledger.config

Translate legacy settings while dropping identity and storage paths.

type data:
sphinx_autodoc_typehints_type:

\:py\:class\:\dict`\ \[:py:class:`str`, :py:data:`~typing.Any`]`

param data:
rtype:
sphinx_autodoc_typehints_type:

\:py\:class\:\~memoryledger.models.ToolConfig``

from memoryledger.config import load_tool_config

Writing requires an explicit caller action through write_tool_config; loading alone is read-only.