Z User
phase7: MCP stdio smoke test (handshake + tools/list + get_roots 6:74) — 4/4 tests PASS
54a6341 Download node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js from bravesigma/quran-md-plugin: direct link, hf CLI and curl.
- Browser
- Download file 530 Bytes
-
https://huggingface.co/datasets/bravesigma/quran-md-plugin/resolve/main/node_modules/%40modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js
- Command line
-
hf download hf://datasets/bravesigma/quran-md-plugin/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js
-
curl -L -o sseKeepAlive.js https://huggingface.co/datasets/bravesigma/quran-md-plugin/resolve/main/node_modules/%40modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js
530 Bytes
| /** Default interval between SSE keep-alive comment frames. */ | |
| export const DEFAULT_SSE_KEEP_ALIVE_MS = 15000; | |
| const MAX_TIMER_DELAY_MS = 2 ** 31 - 1; | |
| /** Arms an unref'd timer, or disables keep-alive for invalid delays. */ | |
| export function armSseKeepAlive(intervalMs, onTick) { | |
| if (!Number.isFinite(intervalMs) || intervalMs < 1) { | |
| return undefined; | |
| } | |
| const timer = setInterval(onTick, Math.min(intervalMs, MAX_TIMER_DELAY_MS)); | |
| timer.unref?.(); | |
| return timer; | |
| } | |
| //# sourceMappingURL=sseKeepAlive.js.map |