feat: plugins v1.7

This commit is contained in:
2026-04-29 15:24:56 +02:00
parent eabbc08896
commit d261bac0ed
45 changed files with 5621 additions and 867 deletions

View File

@@ -119,6 +119,26 @@ export interface LocalPluginManifestDescriptor {
readmePath?: string;
}
export interface LocalApiSettings {
enabled: boolean;
port: number;
exposeOnLan: boolean;
scalarEnabled: boolean;
allowedSignalingServers: string[];
}
export type LocalApiStatus = 'stopped' | 'starting' | 'running' | 'error';
export interface LocalApiSnapshot {
status: LocalApiStatus;
host: string | null;
port: number | null;
baseUrl: string | null;
error: string | null;
exposeOnLan: boolean;
scalarEnabled: boolean;
}
export interface LocalPluginDiscoveryError {
manifestPath?: string;
message: string;
@@ -215,10 +235,12 @@ export interface ElectronAPI {
autoStart: boolean;
closeToTray: boolean;
hardwareAcceleration: boolean;
localApi: LocalApiSettings;
manifestUrls: string[];
preferredVersion: string | null;
runtimeHardwareAcceleration: boolean;
restartRequired: boolean;
vaapiVideoEncode: boolean;
}>;
showDesktopNotification: (payload: DesktopNotificationPayload) => Promise<boolean>;
requestWindowAttention: () => Promise<boolean>;
@@ -235,6 +257,7 @@ export interface ElectronAPI {
autoStart?: boolean;
closeToTray?: boolean;
hardwareAcceleration?: boolean;
localApi?: Partial<LocalApiSettings>;
manifestUrls?: string[];
preferredVersion?: string | null;
vaapiVideoEncode?: boolean;
@@ -243,11 +266,15 @@ export interface ElectronAPI {
autoStart: boolean;
closeToTray: boolean;
hardwareAcceleration: boolean;
localApi: LocalApiSettings;
manifestUrls: string[];
preferredVersion: string | null;
runtimeHardwareAcceleration: boolean;
restartRequired: boolean;
vaapiVideoEncode: boolean;
}>;
getLocalApiStatus: () => Promise<LocalApiSnapshot>;
openLocalApiDocs: () => Promise<{ opened: boolean; reason?: string }>;
relaunchApp: () => Promise<boolean>;
onDeepLinkReceived: (listener: (url: string) => void) => () => void;
readClipboardFiles: () => Promise<ClipboardFilePayload[]>;
@@ -357,6 +384,8 @@ const electronAPI: ElectronAPI = {
};
},
setDesktopSettings: (patch) => ipcRenderer.invoke('set-desktop-settings', patch),
getLocalApiStatus: () => ipcRenderer.invoke('get-local-api-status'),
openLocalApiDocs: () => ipcRenderer.invoke('open-local-api-docs'),
relaunchApp: () => ipcRenderer.invoke('relaunch-app'),
onDeepLinkReceived: (listener) => {
const wrappedListener = (_event: Electron.IpcRendererEvent, url: string) => {