refactor: add plugin sdk runtime scaffolding

This commit is contained in:
Peter Steinberger
2026-01-18 02:14:07 +00:00
parent 5f22b68268
commit 5b4651d9ed
8 changed files with 475 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import { createSubsystemLogger } from "../logging.js";
import { resolveUserPath } from "../utils.js";
import { discoverClawdbotPlugins } from "./discovery.js";
import { createPluginRegistry, type PluginRecord, type PluginRegistry } from "./registry.js";
import { createPluginRuntime } from "./runtime/index.js";
import { setActivePluginRegistry } from "./runtime.js";
import type {
ClawdbotPluginConfigSchema,
@@ -275,8 +276,10 @@ export function loadClawdbotPlugins(options: PluginLoadOptions = {}): PluginRegi
}
}
const runtime = createPluginRuntime();
const { registry, createApi } = createPluginRegistry({
logger,
runtime,
coreGatewayHandlers: options.coreGatewayHandlers as Record<string, GatewayRequestHandler>,
});