Dashboard › opencode › Distillation
709c4599-c0b5-49cb-b6a7-389ef741b7d8["lore_tm_v1_IvSvH6hMD6HyFS9dNadiv6q6vXKVC8MQY517ha-tEkc","lore_tm_v1_cwEvUYFYy3wONFYdlYwnw6dvKxDBiuPNhMWqEmNRCGI","lore_tm_v1_9XogSJDEDAqgo3kxYj4ljjAqK_fSYw3Eb5v32udAMMY","lore_tm_v1_obKPmC-d4RWTDfCwX2NvxEs9ufJ1SHMncOAIMuh-yJc"]
Date: Sep 17, 2026
packages/core/src/session/projector.ts:141-196 constructs SessionMessageUpdater.Adapter with getCurrentAssistant(), getAssistant(messageID), getCurrentShell(callID), updateAssistant, updateShell, and appendMessage.getCurrentAssistant() in packages/core/src/session/projector.ts:142-159 queries assistant rows for event.data.sessionID, orders by desc(SessionMessageTable.seq), limits to 1, decodes the row, and returns it only when it is an assistant without message.time.completed; thus only the newest assistant projection can be resumed.getAssistant(messageID) in packages/core/src/session/projector.ts:160-178 scopes lookup by SessionMessageTable.id, event.data.sessionID, and type "assistant", then returns the decoded row only if its decoded type is "assistant".getCurrentShell(callID) in packages/core/src/session/projector.ts:179-192 loads shell rows for the current session ordered by descending sequence, decodes them, and returns the first SessionMessage.Shell whose callID matches.updateMessage() in packages/core/src/session/projector.ts:124-139 requires event.durable, encodes the message, and updates type, time_created, and data while scoping by message ID and event.data.sessionID; a missing durable aggregate sequence causes Effect.die("Durable Session event is missing aggregate sequence").insertMessage() in packages/core/src/session/projector.ts:201-216 also requires event.durable; it inserts encoded message fields into SessionMessageTable with session_id: event.data.sessionID, seq: event.durable.seq, and time_created: DateTime.toEpochMillis(message.time.created).yield* SessionMessageUpdater.update(adapter, event) at packages/core/src/session/projector.ts:197.packages/core/src/session/projector.ts:223-240 projects SessionV1.Event.Created by inserting sessionRow(event.data.info) with .onConflictDoNothing(); absence of a returned row dies with new SessionAlreadyProjected(), while a present workspaceID updates WorkspaceTable.time_used to Date.now().packages/core/test/session-projector.test.ts found exactly 16 matches for recovery-related "unknown"/newer/boundary terms at lines 95, 115, 146, 215, 328, 365, 375, 410, 524, 578, 599, 1473, 1616, 1731, 1795, and 2766; named IDs include msg_recovery_newer, msg_recovery_newer_${phase}, and msg_recovery_current_boundary.