Plugins & Themes
Only capabilities implemented by the current runtime are documented here.
Plugin SDK
import { definePlugin } from "@vyline/plugin-sdk";
export default definePlugin({
id: "my-plugin",
name: "My Plugin",
version: "0.1.0",
permissions: ["messages:read"],
activate(ctx) {
ctx.messages.on("message", (message) => {
ctx.logger.info(`received: ${message.id}`);
});
},
deactivate() {},
});
Place manifest.json plus index.ts or index.js under data/plugins/<pluginId>/, then enable the plugin per account from Settings or the API. Bun loads TypeScript directly, so a separate plugin build step is not required.
Permissions currently available at runtime
| Permission | Exposed capability |
|---|---|
messages:read | ctx.messages.on("message", ...) |
settings:read | ctx.settings.get(...) |
settings:write | ctx.settings.set(...) |
The SDK types also contain permission names reserved for future use. A permission string existing in the type definitions does not mean the runtime implements that capability. Do not treat sending, notifications, media, storage, or UI extension points as currently exposed runtime APIs.
Plugin exceptions are caught around activation and handlers. Enabled state and settings are stored per account. Plugins still execute as local code on the same host, so do not install untrusted plugins.
Themes
A theme is more than an accent color. Representative tokens include:
id, name, accent, accentContrast,
bg, surface, surface2, sidebar,
text, textDim, border,
msgIn, msgOut, msgInText, msgOutText,
radius, chatBg, pattern
Add presets to THEME_PRESETS in Vyline/packages/themes/src/index.ts. The main app imports @vyline/themes, so adding only a preset does not require changes to Frontend state management or Backend.