MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / isSessionsMessage

Function isSessionsMessage

source code/remote/SessionsWebSocket.ts:48–57  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

46 | SDKControlCancelRequest
47
48function isSessionsMessage(value: unknown): value is SessionsMessage {
49 if (typeof value !== 'object' || value === null || !('type' in value)) {
50 return false
51 }
52 // Accept any message with a string `type` field. Downstream handlers
53 // (sdkMessageAdapter, RemoteSessionManager) decide what to do with
54 // unknown types. A hardcoded allowlist here would silently drop new
55 // message types the backend starts sending before the client is updated.
56 return typeof value.type === 'string'
57}
58
59export type SessionsWebSocketCallbacks = {
60 onMessage: (message: SessionsMessage) => void

Callers 1

handleMessageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected