AI Disclosure: This page was generated by an LLM and may contain inaccuracies. Hand-crafted documentation will be implemented over time on the road to 1.0
PhialsPlugin
Since Plugin API: 1.0.0
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;
settings?: PluginSettingsSchema;
settingsComponent?: import("svelte").Component<PluginSettingsComponentProps>;
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) |
settings | PluginSettingsSchema | no | Settings schema contributed by this plugin |
settingsComponent | import("svelte").Component<PluginSettingsComponentProps> | no | Custom settings UI for Settings → Plugins. When set, replaces the generic field loop; settings still supplies defaults and reset. |
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 |