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

Function getSessionHealth

packages/worker-utils/src/cloud-agent-next-client.ts:341–374  ·  view source on GitHub ↗
(headers, input)

Source from the content-addressed store, hash-verified

339 trpc('prepareSession'),
340 headers,
341 input,
342 'prepareSession'
343 );
344 if (typeof data.cloudAgentSessionId !== 'string' || typeof data.kiloSessionId !== 'string') {
345 throw new Error(
346 `Unexpected prepareSession response shape: ${JSON.stringify(data).slice(0, 500)}`
347 );
348 }
349 return data as unknown as CloudAgentPrepareSessionOutput;
350 },
351
352 async initiateFromPreparedSession(headers, input) {
353 const data = await trpcPost<Record<string, unknown>>(
354 trpc('initiateFromKilocodeSessionV2'),
355 headers,
356 input,
357 'initiateFromKilocodeSessionV2'
358 );
359 if (typeof data.executionId !== 'string') {
360 throw new Error(
361 `Unexpected initiateFromKilocodeSessionV2 response shape: ${JSON.stringify(data).slice(0, 500)}`
362 );
363 }
364 return data as unknown as CloudAgentInitiateOutput;
365 },
366
367 async updateSession(headers, input) {
368 await trpcPost<unknown>(trpc('updateSession'), headers, input, 'updateSession');
369 },
370
371 async sendMessageV2(headers, input) {
372 const data = await trpcPost<Record<string, unknown>>(
373 trpc('sendMessageV2'),
374 headers,
375 input,
376 'sendMessageV2'
377 );

Callers

nothing calls this directly

Calls 4

trpcFunction · 0.85

Tested by

no test coverage detected