MCPcopy Index your code
hub / github.com/garrytan/gstack / handleCommand

Function handleCommand

browse/src/server.ts:1338–1341  ·  view source on GitHub ↗

HTTP wrapper — converts CommandResult to Response. Used by the /command * route dispatcher (line ~2158). The wrapper layer exists so * `buildCommandResponse` is independently unit-testable (v1.38.1.0).

(body: any, tokenInfo?: TokenInfo | null)

Source from the content-addressed store, hash-verified

1336 * `buildCommandResponse` is independently unit-testable (v1.38.1.0).
1337 */
1338async function handleCommand(body: any, tokenInfo?: TokenInfo | null): Promise<Response> {
1339 const cr = await handleCommandInternal(body, tokenInfo);
1340 return buildCommandResponse(cr);
1341}
1342
1343// Module-level shutdown function deleted in v1.39.0.0; it now lives inside
1344// the buildFetchHandler closure so it closes the cfg-provided browserManager.

Callers 1

makeFetchHandlerFunction · 0.85

Calls 2

handleCommandInternalFunction · 0.85
buildCommandResponseFunction · 0.85

Tested by

no test coverage detected