MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / sendRequest

Method sendRequest

src/lib/FileSystemStorage.ts:46–53  ·  view source on GitHub ↗
(channel: string, payload: Record<string, unknown>)

Source from the content-addressed store, hash-verified

44 }
45
46 private sendRequest(channel: string, payload: Record<string, unknown>): Promise<unknown> {
47 const requestId = nextRequestId();
48
49 return new Promise((resolve, reject) => {
50 this._pendingRequests.set(requestId, { resolve, reject });
51 this.bridge.send(channel, { ...payload, requestId });
52 });
53 }
54
55 private applyGetTransformations(key: string, value: unknown): unknown {
56 let result = value;

Callers 8

getMethod · 0.95
setMethod · 0.95
updateMethod · 0.95
removeMethod · 0.95
getAllMethod · 0.95
clearMethod · 0.95
keysMethod · 0.95
containsMethod · 0.95

Calls 3

nextRequestIdFunction · 0.85
sendMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected