MCPcopy Create free account
hub / github.com/Noumena-Network/code / loadCachedSessionMeta

Function loadCachedSessionMeta

src/commands/insights.ts:982–992  ·  view source on GitHub ↗
(
  sessionId: string,
)

Source from the content-addressed store, hash-verified

980}
981
982async function loadCachedSessionMeta(
983 sessionId: string,
984): Promise<SessionMeta | null> {
985 const metaPath = join(getSessionMetaDir(), `${sessionId}.json`)
986 try {
987 const content = await readFile(metaPath, { encoding: 'utf-8' })
988 return jsonParse(content)
989 } catch {
990 return null
991 }
992}
993
994async function saveSessionMeta(meta: SessionMeta): Promise<void> {
995 try {

Callers 1

generateUsageReportFunction · 0.85

Calls 3

getSessionMetaDirFunction · 0.85
readFileFunction · 0.85
jsonParseFunction · 0.85

Tested by

no test coverage detected