/** * Core JSON-RPC for E2E: WebView execute on tauri-driver (Linux), Node fetch on Appium Mac2. */ import { callOpenhumanRpcNode } from './core-rpc-node'; import type { RpcCallResult } from './core-rpc-webview'; import { callOpenhumanRpcWebView } from './core-rpc-webview'; import { supportsExecuteScript } from './platform'; export type { RpcCallResult }; export async function callOpenhumanRpc( method: string, params: Record = {} ): Promise> { if (supportsExecuteScript()) { return callOpenhumanRpcWebView(method, params); } return callOpenhumanRpcNode(method, params); }