Dashboard › opencode › Distillation
b4237bfb-27a0-4762-a6ae-0ddb5660794e["lore_tm_v1_N7bRvL-94Jag79FV2i5Nx0SJItKC29odOUAiZUHaEMY"]
Date: Sep 14, 2026
packages/core/src/session/sql.ts; visible imports include sqliteTable, text, integer, index, primaryKey, real, and uniqueIndex from drizzle-orm/sqlite-core, plus DatabasePath, ProjectTable, SessionMessage, Prompt, SessionInput, Snapshot, PermissionV1, ProjectV2, SessionSchema, MessageID, PartID, SessionV1, WorkspaceV2, Timestamps, SystemContext, AgentV2, and Revert.packages/core/src/session/sql.ts type aliases are SessionMessageData = Omit<(typeof SessionMessage.Message)["Encoded"], "type" | "id">, V1MessageData = Omit<SessionV1.Info, "id" | "sessionID">, and V1PartData = Omit<SessionV1.Part, "id" | "sessionID" | "messageID">.tokens_cache_write: integer().notNull().default(0), a JSON text data field typed with $type<V1MessageData>(), and use of $type<SessionSchema.ID>(); most surrounding table definitions and indexes were elided.export * as SessionRecovery from "./recovery" and recovery-related code referencing SessionMessageTable, claim.id, Prompt, assistantMessageID ?? SessionMessage.ID.create(), Effect.gen, and eq(SessionRecoveryTable.session_id, claim.session_id).{ and, eq } from drizzle-orm and exposes coordinator operations including drain: Effect.fnUntraced(function* (sessionID: SessionSchema.ID, force) { and resume: coordinator.run; surrounding implementation and file boundaries were elided, so the supplied output alone does not establish full behavior.