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:
@@ -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)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user