mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 05:37:19 +01:00
* feat(sessions): a token reads its sessions and what was said in them An agent that starts Claude Code in a Loki session (tab-inject) could read the screen (#1641) but not the conversation: the parsed transcript was only readable over the cookie-only transcript stream, and since #1644 over OrangeCat's signed rail. - lib/session-reads: the list, one run, or one project with the last things said in its conversation, moved out of the signed route unchanged, so two doors share one copy - GET /api/control/sessions: the same reads with a session or ck_ token (?project=, ?runId=, ?items=), no-store - every row names its session and carries openUrl, the same session in Loki's Terminal on that run (lib/dispatch-card sessionOpenUrl) - the list says it is cut at 25 and carries total, so a cut list is never read as the whole one - LOOP-WALK's Session walk names the read; tests pin both doors to the one lib Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtCjm3CvrFm3kYaTgy * fix(sessions): the conversation read is current, on the session's builder, and never ends a person's view Traced end to end before merge (2026-11-12): - a cached conversation was served forever: after the first read sent peek_stop the runner stopped streaming, so a later read returned the same copy without the agent's answer. The cache now counts only while someone is watching; otherwise the read waits for a frame posted after it asked. - peek_start and peek_stop carried no channel, so the owner's laptop runner could take a read meant for the cloud session (transcript null). They now name the project's builder (projectPreferredChannel). - the read counted its viewer under a key of its own, so its peek_stop could end a person's live view of the same session on a phone. It now shares the Terminal's viewer count (same user, tab and channel). - a cloud link carried no source, so a phone that last chose 'Your computer' opened the laptop's session of the same name. sessionOpenUrl names the cloud builder, and each row's link uses the session's builder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtCjm3CvrFm3kYaTgy --------- Co-authored-by: Claude <noreply@anthropic.com>