Skip to content

Function: mapToSession()

Makaio Framework


Makaio Framework / services-core / mapToSession

mapToSession(sessionRow, agentRows): IMakaioSession

Defined in: ../../../packages/services/core/src/session/storage/drizzle-utils.ts:91

Map a Drizzle session row to the IMakaioSession API type.

Scope fields (projectId, worktreeId, workstreamId) are intentionally absent from the returned object. They are managed by the host-owned junction table after the sealed-sessions refactor. Host handlers composing a scoped query must augment the result with scope data read from the junction table.

The session table row

string | null

string | null

string | null

"always-ask" | "reject" | "full-access" | null

"fork" | "branch" | "aside" | "subagent" | "compress" | "rewrite" | "coordinator" | null

string | null

string | null

number

string | null

string | null

string | null

boolean | null

boolean | null

number

string | null

string | null

string | null

string | null

string

string | null

"active" | "closed" | "archived" | "discovered"

string | null

number | null

string | null

string | null

object[]

The associated agent rows

IMakaioSession

The mapped session object