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

Method initializeSocket

projects/runtime-client/src/client.ts:207–218  ·  view source on GitHub ↗
(socket: WebSocket)

Source from the content-addressed store, hash-verified

205 }
206
207 private async initializeSocket(socket: WebSocket): Promise<void> {
208 await this.sendRequest(socket, "initialize", {
209 clientName: this.options.clientName ?? "Runtime Client",
210 clientPlatform: this.options.clientPlatform ?? "unknown",
211 ...(this.options.clientVersion ? { clientVersion: this.options.clientVersion } : {}),
212 protocolVersion: this.options.protocolVersion ?? 1,
213 })
214 if (this.lastCursor) {
215 await this.sendRequest(socket, "subscription/update", { methods: ["*"], cursor: this.lastCursor })
216 }
217 this.emitStatus("connected")
218 }
219
220 private emitStatus(status: RuntimeClientStatus): void {
221 if (this.lastStatus === status) return

Callers 1

openOnceMethod · 0.95

Calls 2

sendRequestMethod · 0.95
emitStatusMethod · 0.95

Tested by

no test coverage detected