feat(core): add module scaffolding and provider registries

This commit is contained in:
kyasuda
2026-02-10 13:16:01 -08:00
committed by sudacode
parent 4a6735927f
commit 79b580e033
19 changed files with 822 additions and 0 deletions

19
src/ipc/main-api.ts Normal file
View File

@@ -0,0 +1,19 @@
import { ipcMain, IpcMainEvent } from "electron";
import {
RendererToMainInvokeChannel,
RendererToMainSendChannel,
} from "./contract";
export function onRendererSend(
channel: RendererToMainSendChannel,
listener: (event: IpcMainEvent, ...args: any[]) => void,
): void {
ipcMain.on(channel, listener);
}
export function handleRendererInvoke(
channel: RendererToMainInvokeChannel,
handler: (event: Electron.IpcMainInvokeEvent, ...args: any[]) => unknown,
): void {
ipcMain.handle(channel, handler);
}