MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / emitWatchEvent

Function emitWatchEvent

projects/runtime-node/src/fsWatch.ts:39–48  ·  view source on GitHub ↗
(server: RuntimeServer, watchId: string, dir: string, eventType: string, filename?: string)

Source from the content-addressed store, hash-verified

37}
38
39function emitWatchEvent(server: RuntimeServer, watchId: string, dir: string, eventType: string, filename?: string): void {
40 server.supervisor.touchByOwner("fs-watch", watchId)
41 server.notify("fs/watch/event", {
42 watchId,
43 dir,
44 eventType,
45 filename,
46 at: new Date().toISOString(),
47 })
48}
49
50function stopWatch(server: RuntimeServer, fsWatches: Map<string, FsWatchState>, watchId: string): { ok: true; dir: string } | { ok: false; error: string } {
51 const watch = fsWatches.get(watchId)

Callers 1

Calls 2

touchByOwnerMethod · 0.80
notifyMethod · 0.80

Tested by

no test coverage detected