Server runtime API¶
locallore.server.runtime
¶
logger = logging.getLogger(__name__)
module-attribute
¶
Snapshot = tuple[tuple[str, str, int, int], ...]
module-attribute
¶
RefreshStats(files_added=0, files_removed=0, messages_added=0, messages_removed=0, messages_embedded=0)
dataclass
¶
LocalLoreRuntime(settings)
¶
Own daemon state, one lazy model, and one background refresh worker.
Source code in src/locallore/server/runtime.py
settings = settings
instance-attribute
¶
inference_lock = threading.Lock()
instance-attribute
¶
refresh_state = 'starting'
instance-attribute
¶
last_refresh_started_at = None
instance-attribute
¶
last_refresh_completed_at = None
instance-attribute
¶
last_successful_refresh_at = None
instance-attribute
¶
last_refresh_duration_seconds = None
instance-attribute
¶
last_background_error = None
instance-attribute
¶
last_stats = RefreshStats()
instance-attribute
¶
model_id
property
¶
search_embedder
property
¶
start()
async
¶
Source code in src/locallore/server/runtime.py
stop()
async
¶
request_refresh()
¶
wait_until_ready(timeout=300.0)
async
¶
Source code in src/locallore/server/runtime.py
status()
¶
Source code in src/locallore/server/runtime.py
source_snapshot(root)
¶
Return a stable, content-free snapshot of all JSONL sources.