MCPcopy Index your code
hub / github.com/simstudioai/sim / getMemoryStream

Function getMemoryStream

apps/sim/lib/execution/event-buffer.ts:362–375  ·  view source on GitHub ↗
(executionId: string)

Source from the content-addressed store, hash-verified

360}
361
362function getMemoryStream(executionId: string): MemoryExecutionStream {
363 pruneExpiredMemoryStreams()
364 let stream = memoryExecutionStreams.get(executionId)
365 if (!stream) {
366 stream = {
367 events: [],
368 meta: null,
369 nextEventId: 1,
370 expiresAt: Date.now() + TTL_SECONDS * 1000,
371 }
372 memoryExecutionStreams.set(executionId, stream)
373 }
374 return stream
375}
376
377function touchMemoryStream(stream: MemoryExecutionStream): void {
378 stream.expiresAt = Date.now() + TTL_SECONDS * 1000

Callers 4

writeMemoryEventFunction · 0.70
setExecutionMetaFunction · 0.70

Calls 3

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected