refactor(core): simplify system context into a belief model (#34917)

This commit is contained in:
Kit Langton 2026-07-02 09:32:35 -04:00 committed by GitHub
commit 4045041554
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 914 additions and 805 deletions

View file

@ -165,12 +165,12 @@ export const SessionInputTable = sqliteTable(
],
)
export const SessionContextEpochTable = sqliteTable("session_context_epoch", {
export const SessionContextCheckpointTable = sqliteTable("session_context_epoch", {
session_id: text()
.$type<SessionSchema.ID>()
.primaryKey()
.references(() => SessionTable.id, { onDelete: "cascade" }),
baseline: text().notNull(),
snapshot: text({ mode: "json" }).notNull().$type<SystemContext.Snapshot>(),
snapshot: text({ mode: "json" }).notNull().$type<SystemContext.Applied>(),
baseline_seq: integer().notNull(),
})