Function: mapRowToSession()
Makaio Framework / services-core / mapRowToSession
Function: mapRowToSession()
Section titled “Function: 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.
Parameters
Section titled “Parameters”Raw session row from SQL search query
sessionAgents
Section titled “sessionAgents”object[]
Agents attached to the session
previewBySession
Section titled “previewBySession”Map<string, string | null>
First-user-message map
countBySession
Section titled “countBySession”Map<string, number>
Message count map
Returns
Section titled “Returns”IMakaioSession & object
Session payload with preview block