MCPcopy Index your code
hub / github.com/inkeep/open-knowledge / dispatch

Function dispatch

packages/server/src/embed-probe.test.ts:338–348  ·  view source on GitHub ↗
(
    ext: ReturnType<typeof createApiExtension>,
    req: IncomingMessage,
    res: ServerResponse,
  )

Source from the content-addressed store, hash-verified

336 }
337
338 async function dispatch(
339 ext: ReturnType<typeof createApiExtension>,
340 req: IncomingMessage,
341 res: ServerResponse,
342 ): Promise<void> {
343 await (
344 ext as unknown as {
345 onRequest: (ctx: { request: IncomingMessage; response: ServerResponse }) => Promise<void>;
346 }
347 ).onRequest({ request: req, response: res });
348 }
349
350 test('captures the request UA into the ring buffer and returns it via /api/__embed-detect', async () => {
351 const { ext, cleanup } = setup();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected