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

Function isReplayableHistoricalSessionEvent

src/cli/remoteIO.ts:63–79  ·  view source on GitHub ↗
(
  event: unknown,
)

Source from the content-addressed store, hash-verified

61}
62
63function isReplayableHistoricalSessionEvent(
64 event: unknown,
65): event is ReplayableHistoricalSessionEvent {
66 if (!event || typeof event !== 'object') {
67 return false
68 }
69 const candidate = event as {
70 type?: unknown
71 session_id?: unknown
72 }
73 return (
74 typeof candidate.session_id === 'string' &&
75 (candidate.type === 'assistant' ||
76 candidate.type === 'system' ||
77 candidate.type === 'user')
78 )
79}
80
81export async function fetchHistoricalSessionEvents(
82 eventsUrl: string,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected