MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / spawn

Function spawn

packages/server/test/ws-auth.e2e.test.ts:97–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95};
96
97async function spawn(): Promise<RunningServer> {
98 const r = await startServer({
99 host: '127.0.0.1',
100 port: 0,
101 lockPath,
102 logger: pino({ level: 'silent' }),
103 coreProcessOptions: { homeDir: bridgeHome },
104 wsGatewayOptions: {
105 pingIntervalMs: 60,
106 pongTimeoutMs: 200,
107 },
108 // Inject the fixed token via the DI seam (M5.1 reads it through the WS
109 // gateway's `setAuthTokenService`, no longer via `wsGatewayOptions`).
110 serviceOverrides: [[IAuthTokenService, fixedTokenAuth]],
111 });
112 running.push(r);
113 return r;
114}
115
116function wsUrl(http: string): string {
117 return http.replace(/^http:\/\//, 'ws://') + '/api/v1/ws';

Callers 1

Calls 2

startServerFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected