(payload: Record<string, unknown>, field: string)
| 346 | } |
| 347 | |
| 348 | function stringifyJsonObject(payload: Record<string, unknown>, field: string): string { |
| 349 | try { |
| 350 | const serialized = JSON.stringify(payload); |
| 351 | if (typeof serialized !== 'string') { |
| 352 | throw new AppError('INVALID_ARGS', `${field} must be JSON-serializable`); |
| 353 | } |
| 354 | return serialized; |
| 355 | } catch { |
| 356 | throw new AppError('INVALID_ARGS', `${field} must be JSON-serializable`); |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | function toAppBackendContext( |
| 361 | runtime: Pick<AgentDeviceRuntime, 'signal'>, |
no outgoing calls
no test coverage detected
searching dependent graphs…