godcrm/electron/ipc/loaderStubs.ts
GOD CRM Release f89e074dd1
Some checks failed
CI / Lint / Typecheck / Test / Build (push) Has been cancelled
CI / PostgreSQL Integration Tests (push) Has been cancelled
GOD CRM — public scrubbed snapshot
Governed substrate for autonomous agents: scoped identity (passports),
audited actions, MCP workspace. Infra IPs and secrets redacted for public release.
2026-08-10 04:01:45 +03:00

20 lines
858 B
TypeScript

import { ipcMain, BrowserWindow } from 'electron';
// Remote-loader stubs — see ADR-0023 Decision §4 + Out of scope.
// In v1 the renderer ALWAYS loads from local file:// bundle. These IPC channels exist
// only so the existing UI components (DesktopSettingsModal, LoadModeIndicator) don't crash.
// Real remote-loader = future ADR.
export function registerLoaderStubs(): void {
ipcMain.handle('loader:getAppUrl', () => '');
ipcMain.handle('loader:setAppUrl', () => false);
ipcMain.handle('loader:getLoadMode', () => 'local' as const);
ipcMain.handle('loader:setLoadMode', () => false);
ipcMain.handle('loader:checkServerHealth', () => false);
ipcMain.handle('loader:reload', () => {
const win = BrowserWindow.getFocusedWindow() ?? BrowserWindow.getAllWindows()[0];
if (!win) return false;
win.reload();
return true;
});
}