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

Function readHighWaterMark

src/utils/tasks.ts:115–124  ·  view source on GitHub ↗
(taskListId: string)

Source from the content-addressed store, hash-verified

113}
114
115async function readHighWaterMark(taskListId: string): Promise<number> {
116 const path = getHighWaterMarkPath(taskListId)
117 try {
118 const content = (await readFile(path, 'utf-8')).trim()
119 const value = parseInt(content, 10)
120 return isNaN(value) ? 0 : value
121 } catch {
122 return 0
123 }
124}
125
126async function writeHighWaterMark(
127 taskListId: string,

Callers 3

resetTaskListFunction · 0.85
findHighestTaskIdFunction · 0.85
deleteTaskFunction · 0.85

Calls 2

getHighWaterMarkPathFunction · 0.85
readFileFunction · 0.85

Tested by

no test coverage detected