Files
lucidia-core/reflex/log_reflex.py
Alexa Louise 6afdb4b148 Initial extraction from blackroad-prism-console
Lucidia Core - AI reasoning engines for specialized domains:
- Physicist (867 lines) - energy modeling, force calculations
- Mathematician (760 lines) - symbolic computation, proofs
- Geologist (654 lines) - terrain modeling, stratigraphy
- Engineer (599 lines) - structural analysis, optimization
- Painter (583 lines) - visual generation, graphics
- Chemist (569 lines) - molecular analysis, reactions
- Analyst (505 lines) - pattern recognition, insights
- Plus: architect, researcher, mediator, speaker, poet, navigator

Features:
- FastAPI wrapper with REST endpoints for each agent
- CLI with `lucidia list`, `lucidia run`, `lucidia api`
- Codex YAML configurations for agent personalities
- Quantum engine extensions

12,512 lines of Python across 91 files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 08:00:53 -06:00

39 lines
852 B
Python

"""Job log reflex example."""
from __future__ import annotations
import re
import time
from typing import Any
from lucidia.reflex.core import BUS, start
ERROR_RE = re.compile(r"\bERROR\b")
@BUS.on("joblog:line")
def on_line(evt: Any) -> None:
line = evt.get("line", "")
if ERROR_RE.search(line):
print("[reflex] tagged ERROR:", line.strip())
def tail(path: str = "/srv/blackroad/logs/agent.log", poll_interval: float = 0.1) -> None:
if not BUS.enabled:
return
with open(path, "r", encoding="utf-8") as f:
f.seek(0, 2)
while True:
line = f.readline()
if not line:
time.sleep(poll_interval)
continue
BUS.emit("joblog:line", {"line": line})
if __name__ == "__main__": # pragma: no cover - manual wiring
start()
tail()