# Aether Native Launcher (Electron) The Aether Native Launcher is a specialized Electron-based shell for the Aether Platform. It provides a secure bridge between the SvelteKit web UI and the local operating system, enabling features restricted by browser sandboxing. ## 🚀 Overview This application serves as the "Native Mode" runtime for Aether podiums and devices. It handles: - **Local File Orchestration:** Managed cache for presentation files (PPTx, Keynote, PDF). - **Automation:** Specialized AppleScript handlers for PowerPoint and Keynote. - **Hardware Telemetry:** Direct access to CPU, RAM, and Network interface data. - **Remote Control:** Slide navigation and application control via WebSocket intents. ## ⚙️ Configuration The application requires a `seed_config.json` file to identify the device and connect to the Aether API. ### 1. Seed Configuration Create/edit `resources/seed_config.json`: ```json { "event_device_id": "YOUR_DEVICE_ID", "aether_api_key": "YOUR_API_KEY", "primary_api_base_url": "https://api.yourdomain.com", "backup_api_base_url": null } ``` ### 2. Environment Setup ```bash npm install npm run build npm start ``` ## 🌉 The Native Bridge (`aetherNative`) The bridge is exposed to the renderer via `contextBridge`. It can be accessed in the web UI via `window.aetherNative`. ### Core Methods | Method | Description | | --- | --- | | `list_tools()` | Returns a JSON manifest of all available native functions. | | `launch_presentation({path, app})` | Launches a presentation with auto-focus and slideshow start. | | `control_presentation({app, action})` | Sends `next`, `prev`, `start`, or `stop` to active decks. | | `open_folder(path)` | Opens a local directory in the OS file explorer. | | `get_device_info()` | Returns hardware metadata (RAM, IPs, Hostname). | ### Example Usage (UI Relay) ```typescript import * as native from '$lib/electron/electron_relay'; // Launch a file from local cache await native.launch_presentation({ path: '[tmp]/my_deck.pptx', app: 'powerpoint' }); // Navigate slides await native.control_presentation({ app: 'powerpoint', action: 'next' }); ``` ## 🛠️ Development - **Preload:** Logic defined in `src/preload/index.ts`. - **Handlers:** OS-level logic in `src/main/shell_handlers.ts` and `src/main/file_handlers.ts`. - **Types:** Shared TypeScript interfaces in `src/shared/types.ts`.