Plugin Manager Application
The Plugin Manager application allows installing, managing, and removing third-party plugins. It supports manual upload, validation, and detailed display of installed plugins.
Overview
Section titled “Overview”The Plugin Manager consists of four main parts:
- Plugin Store — Plugin marketplace (under development)
- Installed plugins — List and management of installed plugins
- Manual installation — Upload
.elyospkgfiles - Dev plugins — Load developer plugins (dev mode only)
Main features
Section titled “Main features”- Plugin upload via drag & drop or file browser
- Plugin validation before installation
- List installed plugins with filters
- View plugin details (version, author, permissions, dependencies)
- Plugin removal
- Permission-based access
- Dev mode plugin loading
File structure
Section titled “File structure”apps/plugin-manager/├── index.svelte # Main layout (AppLayout + menu)├── menu.json # Menu definition├── plugins.remote.ts # Server actions (list, details, removal)├── components/│ ├── PluginStore.svelte # Plugin store (placeholder)│ ├── PluginList.svelte # Installed plugins table│ ├── pluginListColumns.ts # Table column definitions│ ├── PluginDetail.svelte # Plugin details│ ├── PluginUpload.svelte # Plugin upload│ ├── PluginPreview.svelte # Plugin preview before installation│ ├── DevPlugins.svelte # Dev plugins list│ └── DevPluginLoader.svelte # Dev plugin loader└── types/ └── ... # Plugin typesMenu structure
Section titled “Menu structure”[ { "labelKey": "menu.store", "href": "#store", "icon": "Store", "component": "PluginStore" }, { "labelKey": "menu.installed", "href": "#installed", "icon": "Package", "component": "PluginList" }, { "labelKey": "menu.manualInstall", "href": "#upload", "icon": "Upload", "component": "PluginUpload", "requiredPermission": "plugin.manual.install" }, { "labelKey": "menu.devPlugins", "href": "#dev-plugins", "icon": "Code", "component": "DevPlugins", "requiredPermission": "plugin.manual.install", "hideWhen": "notDevMode" }]Permissions: plugin.manual.install — Plugin upload and removal (admin only)
Conditional display: Dev Plugins menu item is only visible in dev mode (hideWhen: "notDevMode")
Server Actions
Section titled “Server Actions”plugins.remote.ts
Section titled “plugins.remote.ts”1. fetchPlugins (command)
Section titled “1. fetchPlugins (command)”Fetch installed plugins with filtering and pagination.
const result = await fetchPlugins({ page: 1, pageSize: 20, sortBy: 'name', sortOrder: 'asc', search: 'my-plugin', status: 'active'});Return value:
{ success: true, data: PluginListItem[], pagination: { page, pageSize, totalCount, totalPages }}2. fetchPluginDetail (command)
Section titled “2. fetchPluginDetail (command)”Fetch detailed plugin information.
const result = await fetchPluginDetail({ pluginId: 'my-plugin' });3. uninstallPlugin (command)
Section titled “3. uninstallPlugin (command)”Remove a plugin from the system.
const result = await uninstallPlugin({ pluginId: 'my-plugin' });Permission check: Verifies the user has plugin.manual.install permission.
Operation:
- Checks if the plugin exists
- Deletes plugin files from the filesystem
- Deletes the plugin entry from the database
- Returns success or failure result
Components
Section titled “Components”PluginUpload.svelte
Section titled “PluginUpload.svelte”Plugin upload via drag & drop or file browser.
Configuration:
const PLUGIN_EXTENSION = '.elyospkg';const MAX_SIZE_MB = 10;Validations:
- File extension — Only
.elyospkgfiles - File size — Maximum 10 MB
Upload process:
- Select file (drag & drop or browser)
- Validation (extension, size)
- Upload to
/api/plugins/validateendpoint - Server-side validation
- Navigate to
PluginPreviewcomponent
PluginDetail.svelte
Section titled “PluginDetail.svelte”Display detailed plugin information.
Displayed information:
- Basic info (status, App ID, version, category)
- Details (author, description)
- Permissions (list of requested permissions with badges)
- Dependencies (name and version in badge format)
- System info (min WebOS version, install date, update date)
Uninstall confirmation:
<ConfirmDialog bind:open={uninstallDialogOpen} title={t('plugin-manager.detail.uninstallTitle')} description={t('plugin-manager.detail.uninstallDescription', { name })} confirmText={t('plugin-manager.detail.uninstallConfirm')} confirmVariant="destructive" onConfirm={confirmUninstall} onCancel={cancelUninstall}/>Plugin system
Section titled “Plugin system”Plugin structure
Section titled “Plugin structure”A plugin is an .elyospkg file, which is a ZIP archive with the following structure:
my-plugin.elyospkg├── manifest.json # Plugin metadata├── index.html # Plugin entry point (Web Component)├── icon.svg # Plugin icon├── assets/ # Static files│ ├── styles.css│ └── script.js└── locales/ # Translations (optional) ├── hu.json └── en.jsonManifest.json
Section titled “Manifest.json”{ "id": "my-plugin", "name": { "hu": "Saját Plugin", "en": "My Plugin" }, "description": { "hu": "Plugin leírás", "en": "Plugin description" }, "version": "1.0.0", "author": "Developer Name", "category": "productivity", "icon": "icon.svg", "entryPoint": "index.html", "permissions": ["storage.read", "storage.write", "notifications.send"], "dependencies": { "another-plugin": "^2.0.0" }, "minWebosVersion": "1.0.0"}Plugin validation
Section titled “Plugin validation”The /api/plugins/validate endpoint validates the uploaded plugin:
- File format — ZIP archive
- Manifest exists —
manifest.jsonfile present - Manifest schema — Required fields check
- Duplication — Plugin ID uniqueness
- Dependencies — Dependency availability
- Version compatibility — Minimum WebOS version check
- Permissions — Valid permissions
Database schema
Section titled “Database schema”apps table (plugin fields)
Section titled “apps table (plugin fields)”{ id: serial('id').primaryKey(), appId: varchar('app_id', { length: 100 }).notNull().unique(), appType: varchar('app_type', { length: 20 }).notNull(), // 'plugin' name: jsonb('name').notNull(), description: jsonb('description'), version: varchar('version', { length: 20 }).notNull(), pluginPermissions: jsonb('plugin_permissions'), pluginDependencies: jsonb('plugin_dependencies'), pluginStatus: varchar('plugin_status', { length: 20 }), pluginInstalledAt: timestamp('plugin_installed_at'), isActive: boolean('is_active').default(true), createdAt: timestamp('created_at').defaultNow()}Best practices
Section titled “Best practices”- Validation — Always validate the plugin before installation
- Permissions — Only request necessary permissions
- Dependencies — Document plugin dependencies
- Versioning — Use semantic versioning (semver)
- Sandbox — Use sandbox for plugin isolation
- Error handling — Handle plugin loading errors
- Performance — Optimize plugin size
- Documentation — Provide detailed description and usage guide
Troubleshooting
Section titled “Troubleshooting”Plugin not appearing in the list
Section titled “Plugin not appearing in the list”Problem: Uploaded plugin not visible among installed plugins.
Solution:
- Check the
appstable —appType = 'plugin' - Check the
pluginStatusfield — may be ‘inactive’ - Check permissions
- Refresh the app registry
Plugin upload fails
Section titled “Plugin upload fails”Problem: Plugin upload returns an error.
Solution:
- Check the file extension (
.elyospkg) - Check the file size (max 10 MB)
- Check
manifest.json— is it valid JSON? - Check required fields (id, name, version, etc.)
- Check server logs