fix(startup): recover from core port 7788 conflict automatically (#2626)

This commit is contained in:
Mega Mind
2026-05-25 20:09:08 +05:30
committed by GitHub
parent d997394116
commit cdee8f73fb
27 changed files with 1209 additions and 45 deletions
+13 -1
View File
@@ -20,4 +20,16 @@ async function invokeCmd<T>(cmd: string, args?: Record<string, unknown>): Promis
return invoke<T>(cmd, args);
}
export const bootCheckTransport: BootCheckTransport = { callRpc, invokeCmd };
/**
* Invoke the `recover_port_conflict` Tauri command to reap stale OpenHuman
* processes and restart the embedded core on any available port.
*/
export async function recoverPortConflict(): Promise<{
success: boolean;
message: string;
new_port?: number;
}> {
return invokeCmd('recover_port_conflict');
}
export const bootCheckTransport: BootCheckTransport = { callRpc, invokeCmd, recoverPortConflict };