neurocore.persistence.checkpoint_adapter ======================================== .. py:module:: neurocore.persistence.checkpoint_adapter .. autoapi-nested-parse:: Adapt a NeuroCore RunStore to flowengine's CheckpointStore. flowengine's sync ``FlowEngine.execute()`` auto-saves a ``Checkpoint`` when a component suspends, and ``FlowEngine.resume()`` reloads it. We back that with the same SQLite file the RunStore uses (the ``checkpoints`` table) so a single ``runs.db`` holds both durable history and transient checkpoints. For the in-memory backend (tests), we fall back to flowengine's own ``InMemoryCheckpointStore``. Classes ------- .. toctree:: :hidden: /autoapi/neurocore/persistence/checkpoint_adapter/SQLiteCheckpointStore .. autoapisummary:: neurocore.persistence.checkpoint_adapter.SQLiteCheckpointStore Functions --------- .. autoapisummary:: neurocore.persistence.checkpoint_adapter.checkpoint_store_for Module Contents --------------- .. py:function:: checkpoint_store_for(run_store: neurocore.persistence.base.RunStore | None) -> flowengine.CheckpointStore | None Return a flowengine CheckpointStore backed by ``run_store``. Returns None when persistence is disabled, a SQLite-backed store for the sqlite backend, and a per-run_store in-memory store for the memory backend. The in-memory store is memoized on the run_store so checkpoints survive across the suspend/resume boundary (which makes two separate calls).