MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / createHealthHandler

Function createHealthHandler

services/cloud-agent-next/wrapper/src/server.ts:378–392  ·  view source on GitHub ↗
(config: ServerConfig, state: WrapperState)

Source from the content-addressed store, hash-verified

376 }
377
378 const sessionContext: SessionContext = {
379 kiloSessionId,
380 ingestUrl: binding.ingestUrl,
381 ingestToken: binding.ingestToken,
382 workerAuthToken: binding.workerAuthToken,
383 platform: config.platform,
384 wrapperRunId: binding.wrapperRunId,
385 wrapperGeneration: binding.wrapperGeneration,
386 wrapperConnectionId: binding.wrapperConnectionId,
387 agentSessionId: config.agentSessionId,
388 };
389 const result = state.bindSession(sessionContext);
390 if (feedPolicy === 'close-until-runtime-ready') {
391 await notifySessionBound(deps, feedPolicy);
392 }
393 if (result.changed) {
394 logToFile(
395 `session binding refreshed: generation=${binding.wrapperGeneration ?? 'none'} connectionId=${binding.wrapperConnectionId ?? 'none'}`

Callers 1

createFetchHandlerFunction · 0.85

Calls 1

jsonResponseFunction · 0.70

Tested by

no test coverage detected