feat: add provider auth plugins

This commit is contained in:
Peter Steinberger
2026-01-16 00:39:22 +00:00
parent bca5c0d569
commit 6084421ec6
9 changed files with 362 additions and 8 deletions

23
src/plugins/providers.ts Normal file
View File

@@ -0,0 +1,23 @@
import { createSubsystemLogger } from "../logging.js";
import { loadClawdbotPlugins } from "./loader.js";
import type { ProviderPlugin } from "./types.js";
const log = createSubsystemLogger("plugins");
export function resolvePluginProviders(params: {
config?: Parameters<typeof loadClawdbotPlugins>[0]["config"];
workspaceDir?: string;
}): ProviderPlugin[] {
const registry = loadClawdbotPlugins({
config: params.config,
workspaceDir: params.workspaceDir,
logger: {
info: (msg) => log.info(msg),
warn: (msg) => log.warn(msg),
error: (msg) => log.error(msg),
debug: (msg) => log.debug(msg),
},
});
return registry.providers.map((entry) => entry.provider);
}