AI Notice: Most documentation right now was auto-generated by an LLM. Handwritten documentation will be implemented over time on the road to 1.0
PhialsPlugin
A plugin is a container that can provide one or more providers. Each provider type has its own interface and registration mechanism.
Signature
interface PhialsPlugin {
id: string;
name: string;
version: string;
icons?: string[];
settings?: PluginSettingsSchema;
database?: PluginDatabaseSchema;
onActivate?: (api: PluginAPI) => void | Promise<void>;
onDeactivate?: () => void | Promise<void>;
onBeforeReload?: () => unknown | Promise<unknown>;
onAfterReload?: (state: unknown) => void | Promise<void>;
providers: PluginProvider[];
}Members
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Unique plugin identifier (e.g., ‘phials.terminal’, ‘vendor.preview-pdf’) |
name | string | yes | Human-readable name |
version | string | yes | Plugin version (semver) |
icons | string[] | no | Icons used by this plugin (for preloading) |
settings | PluginSettingsSchema | no | Settings schema contributed by this plugin |
database | PluginDatabaseSchema | no | Database schema for plugin-owned SQL tables |
onActivate | (api: PluginAPI) => void | Promise<void> | no | Called when the plugin is activated |
onDeactivate | () => void | Promise<void> | no | Called when the plugin is deactivated |
onBeforeReload | () => unknown | Promise<unknown> | no | Called before the plugin is reloaded. Return any state that should be preserved across the reload. |
onAfterReload | (state: unknown) => void | Promise<void> | no | Called after the plugin is reloaded. Receives the state that was returned from onBeforeReload. |
providers | PluginProvider[] | yes | Providers contributed by this plugin |