(headers, input)
| 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 | ); |
nothing calls this directly
no test coverage detected