feat: run dream cycle as a systemd user service + journald-visible logs
- deploy/lyra-dream.service: --loop 1800 user service on lyra-cortex, so Lyra's consolidation + reflection keeps ticking unattended between conversations - deploy/README.md: install / linger / operate runbook - logbus: mirror events to stderr so out-of-band runs (the dream service under journald) are observable, not just via the in-process web SSE feed Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ ephemeral — it's an activity feed, not durable logging.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
import threading
|
||||
import time
|
||||
from collections import deque
|
||||
@@ -23,6 +24,10 @@ def log(level: str, msg: str, **fields) -> None:
|
||||
_EVENTS.append(
|
||||
{"seq": _SEQ, "ts": time.time(), "level": level, "msg": msg, "fields": fields}
|
||||
)
|
||||
# Mirror to stderr so out-of-band runs (e.g. the dream service under
|
||||
# systemd/journald) are observable, not just via the in-process SSE feed.
|
||||
extra = " ".join(f"{k}={v}" for k, v in fields.items())
|
||||
print(f"[{level}] {msg}{(' ' + extra) if extra else ''}", file=sys.stderr, flush=True)
|
||||
|
||||
|
||||
def since(seq: int) -> list[dict]:
|
||||
|
||||
Reference in New Issue
Block a user