Fix: Standardize Electron bridge and implement robust caching

- Refactored all IPC methods and parameters to snake_case for consistency with SvelteKit.
- Implemented exhaustive background caching engine with download locking.
- Reverted to legacy-proven flat hash storage pattern (hash.file).
- Added axios for reliable stream-based binary downloads.
- Updated preload and main handlers to support recursive room data fetching.
This commit is contained in:
Scott Idem
2026-01-23 16:30:23 -05:00
parent 30db989b2c
commit 280de213c1
21 changed files with 665 additions and 24 deletions

View File

@@ -11,6 +11,14 @@ export interface AetherNativeBridge {
getDeviceConfig: () => Promise<any>;
getJWT: () => Promise<string | null>;
log: (message: string) => void;
// Shell Handlers
openFolder: (path: string) => Promise<{success: boolean, error?: string}>;
runCommand: (cmd: string) => Promise<{success: boolean, stdout: string, stderr: string, error?: string}>;
launchFile: (path: string) => Promise<{success: boolean, error?: string}>;
// File/Cache Handlers
checkCache: (args: {cacheRoot: string, hash: string}) => Promise<boolean>;
downloadToCache: (args: {url: string, cacheRoot: string, hash: string, apiKey: string}) => Promise<{success: boolean, path?: string, error?: string}>;
launchFromCache: (args: {cacheRoot: string, hash: string, tempRoot: string, filename: string}) => Promise<{success: boolean, error?: string}>;
}
declare global {