Skip to content

Function: mapRowToSession()

Makaio Framework


Makaio Framework / services-core / mapRowToSession

mapRowToSession(row, sessionAgents, previewBySession, countBySession): IMakaioSession & object

Defined in: ../../../packages/services/core/src/session/storage/fts-search-utils.ts:182

Maps a raw search row to session API format with preview metadata.

Scope fields are intentionally absent from the returned IMakaioSession. Host handlers composing a scoped search must augment the result with scope data read from the junction table after calling this utility.

SearchSessionRow

Raw session row from SQL search query

object[]

Agents attached to the session

Map<string, string | null>

First-user-message map

Map<string, number>

Message count map

IMakaioSession & object

Session payload with preview block