feat: collapse plugin runtime to one tier behind a plugin SDK

This commit is contained in:
LukeGus committed 2026-09-22 14:11:50 -05:00
1 parent 6e058f6e9e
commit 4758016f41
96 files changed
+34631 -8551

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
/**
* The frontend contract: what a plugin's frontend entry receives.
*
* Stubs only. A7 builds the real loader and fills these in, at which point a
* plugin registers every surface it contributes through this object and the
* shell stops carrying plugin ids of its own.
*/
import type { PluginManifest } from "./manifest.js";
export interface TermixAppInfo {
readonly pluginId: string;
readonly manifest: PluginManifest;
}
/**
* Registration surface for a plugin frontend.
*
* A7 adds: rail items, panels, tabs, host editor sections, host actions and
* badges, context menu items, palette entries, dashboard cards, homepage
* widgets, settings components, action slots, login/2FA UI and SSH auth
* editors. Everything registered here is removed when the plugin is disabled.
*/
export interface TermixApp extends TermixAppInfo {
/** Registered cleanup, run when the plugin is disabled. */
onDispose: (dispose: () => void) => void;
}
export type FrontendActivate = (app: TermixApp) => void | Promise<void>;
export interface FrontendModule {
activate: FrontendActivate;
deactivate?: () => void | Promise<void>;
}
export function definePluginFrontend(plugin: FrontendModule): FrontendModule {
return plugin;
}
export type { PluginManifest } from "./manifest.js";