pub fn write_log_entry(log: &AgentLoopLog)
Append a log entry to the agent’s JSONL log file and persist to SQLite.