feat: add plugin worker protocol, bootstrap and plugin_storage table

Worker-side ctx proxy plus the message envelope it talks over, and the
per-plugin key/value table behind ctx.storage with migrations for all
three dialects. Rows cascade with the plugin so uninstalling leaves
nothing behind.
This commit is contained in:
LukeGus committed 2026-09-21 07:19:01 -05:00
1 parent a1805cb7ae
commit 248698f62d
19 files changed
+30035

No files matched your search

+10
View File
@@ -728,6 +728,16 @@ async function initializeCompleteDatabase(): Promise<void> {
UNIQUE (plugin_id, registry_id)
);
CREATE TABLE IF NOT EXISTS plugin_storage (
id INTEGER PRIMARY KEY AUTOINCREMENT,
plugin_id TEXT NOT NULL,
key TEXT NOT NULL,
value TEXT NOT NULL,
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
UNIQUE (plugin_id, key),
FOREIGN KEY (plugin_id) REFERENCES plugins (id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS api_keys (
id TEXT PRIMARY KEY,
user_id TEXT NOT NULL,