feat: thought loop — Lyra's threaded, surfaceable train of thought #4

Merged
serversdown merged 22 commits from feat/thought-loop into dev 2026-06-24 23:47:40 -04:00
Showing only changes of commit cf4238911e - Show all commits
+4 -3
View File
@@ -289,12 +289,13 @@ def decay() -> int:
def record_response(thread_id: int, text: str) -> bool:
"""Brian's reply to a surfaced thread. Stored as pending feedback; next `think`
pass she'll react to it (the loop's feedback step)."""
"""Brian's reply to a thread. Stored as pending feedback; next `think` pass she'll
react to it (the loop's feedback step). Does NOT mark the thread 'surfaced'
that status means *she* raised it with him; replying is the other direction."""
text = (text or "").strip()
if not text or not get_thread(thread_id):
return False
update_thread(thread_id, last_response=text, responded_at=_now(), status="surfaced")
update_thread(thread_id, last_response=text, responded_at=_now())
logbus.log("info", "thought response", thread=thread_id, chars=len(text))
return True