MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / writeReadState

Function writeReadState

src/core/inbox-store.ts:193–198  ·  view source on GitHub ↗
(state: InboxReadStateFile)

Source from the content-addressed store, hash-verified

191 }
192
193 async function writeReadState(state: InboxReadStateFile): Promise<void> {
194 await mkdir(dirname(readStatePath), { recursive: true })
195 const tmp = `${readStatePath}.tmp`
196 await writeFile(tmp, JSON.stringify(state, null, 2) + '\n', 'utf-8')
197 await rename(tmp, readStatePath)
198 }
199
200 async function entryExists(id: string): Promise<boolean> {
201 let raw: string

Callers 3

markReadFunction · 0.85
markUnreadFunction · 0.85
deleteEntryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected