Storage API
The storage API owns canonical memory records, serialization, versions, and evidence metadata. It writes only inside resolved workspace data paths.
.. py:module:: memoryledger.storage
.. py:function:: default_config_text(project_name, memoryledger_dir)
- module:
memoryledger.storage
Render legacy-compatible configuration text for initialization or migration.
- type project_name:
- sphinx_autodoc_typehints_type:
\:py\:class\:\str``
- param project_name:
- type memoryledger_dir:
:sphinx_autodoc_typehints_type:
\:py\:class\:\str``- param memoryledger_dir:
- rtype:
- sphinx_autodoc_typehints_type:
\:py\:class\:\str``
.. py:function:: find_config(start=None)
- module:
memoryledger.storage
Find a supported project configuration walking upward from a path.
- type start:
- sphinx_autodoc_typehints_type:
\:py\:class\:\~pathlib.Path` | :py:obj:`None``
- param start:
- rtype:
- sphinx_autodoc_typehints_type:
\:py\:class\:\~pathlib.Path` | :py:obj:`None``
.. py:class:: Store(config)
- module:
memoryledger.storage
Bases: :py:class:
objectRead and mutate durable memory records in a resolved workspace.
- type config:
- sphinx_autodoc_typehints_type:
\:py\:class\:\~memoryledger.models.Config``
- param config:
.. py:method:: Store.ensure_initialized() :module: memoryledger.storage
Create legacy durable state explicitly before a mutation. :rtype: :sphinx_autodoc_typehints_type:`\:py\:obj\:\`None\``
.. py:module:: memoryledger.guardrails
from memoryledger.storage import Store
Storage methods can mutate durable records and require a validated workspace. Guardrail exceptions should be surfaced to callers rather than bypassed.