Track Worldtree #204: Emotion pane (affect_update + persona_state) #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Status
Blocked on Worldtree #204 — emotion appraisal SSE events + persona-state baseline endpoint. Worldtree-dev filed the upstream tracker entry 2026-05-24 after a request from this side (althing thread
01KSE1NZ3Z29GAV2RMWZDR3KGC). Their team marked low / quality-of-life; no near-term ship commitment from them.This issue is the ratatoskr-side tracker — captures the consumer work we committed to in the althing exchange so the design space stays visible and a future implementer doesn't have to reconstruct it.
What lands when Worldtree #204 lands
Wire shape (selected by worldtree-dev: Option B — new event type, not worker_phase extension):
Bootstrap endpoint:
GET /agents/{agent_id}/persona_statereturns current PAD +emotions_active+ baseline +last_updated. 404 +PERSONA_NOT_CONFIGUREDfor agents without a persona block (domari, muninn, etc.). Auth scope likelypersona.read.Ratatoskr-side consumer work
ratatoskr.sse_client: newAffectUpdatefrozen dataclass mirroringWorkerPhaseshape (sse_id, turn_id, pre, post, trigger). Add to theEventUnion. Parser handlestype=="affect_update".ratatoskr.sessions: newget_persona_state(client, agent_id) -> PersonaState | Nonefunction. Returns None on 404PERSONA_NOT_CONFIGURED; raisesSessionApiFailedon other non-200s.ratatoskr.tui(in-place amendment to issue #4 + issue #13):TabPane("Emotion", id="emotion-tab")containingRichLog#emotion-log— 4th tab after Tools / Debug / Thinking.Binding("ctrl+4", "focus_emotion", "Emotion tab")._resolve_then_runcallsget_persona_stateon session-open (when agent_id is known); on success writes baseline line toemotion_log; on 404 writes(persona not configured)placeholder; on other failures writes the[session_api_failed]label.TuiPresenterState.rendersignature widens withemotion_log: RichLog.AffectUpdateevents route there with· affect: pre={…} → post={…} via {trigger}formatting (demoted style consistent with other telemetry).AffectUpdatefalls back toemotion_log.Rule(title=f"turn N")extends toemotion_log(INV-023).Out of scope (this issue)
persona_statebetween turns — baseline-on-open + SSE event-driven updates only.Acceptance
Dependencies
ratatoskr.tui) — landed; in-place amendment.Closed — shipped. Emotion pane (Worldtree #204) integrated across the v0.11.0→v0.13.0 arc. AffectUpdate dataclass + parse (sse_client), get_persona_state + PersonaState typed errors (sessions), sticky #persona-header + Ctrl+4 Persona TabPane with live AffectUpdate updates + on-mount hydration (tui). Also surfaced in cli --send and the web companion.