feat: Add comprehensive plugin API documentation and example plugin

- Introduced PLUGIN_API.md for detailed plugin development guidelines.
- Implemented PLUGIN_SYSTEM_IMPLEMENTATION.md summarizing all requested features.
- Created example-plugin showcasing all API features including commands, message interceptors, settings, and notifications.
- Added plugin-metadata.json for the example plugin with relevant metadata.
This commit is contained in:
2026-04-18 02:55:38 +10:00
parent fc4229cea7
commit a4429fe9c2
9 changed files with 1917 additions and 2 deletions

View File

@@ -167,6 +167,15 @@ contextBridge.exposeInMainWorld('electron', {
ipcRenderer.on('notification:navigate', handler);
return () => ipcRenderer.removeListener('notification:navigate', handler);
}
},
// Plugin management
plugins: {
getPath: () => ipcRenderer.invoke('plugin:get-path'),
download: (pluginId, downloadUrl, name) => ipcRenderer.invoke('plugin:download', { pluginId, downloadUrl, name }),
list: () => ipcRenderer.invoke('plugin:list'),
uninstall: (pluginId) => ipcRenderer.invoke('plugin:uninstall', pluginId),
readPluginCode: (pluginId) => ipcRenderer.invoke('plugin:read-code', pluginId)
}
});