feat(plugins): add media understanding provider registration

This commit is contained in:
Peter Steinberger
2026-03-16 20:42:00 -07:00
parent 14907d3de0
commit 3e010e280a
26 changed files with 222 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
import type {
AnyAgentTool,
MediaUnderstandingProviderPlugin,
OpenClawPluginApi,
ProviderPlugin,
SpeechProviderPlugin,
@@ -10,6 +11,7 @@ export type CapturedPluginRegistration = {
api: OpenClawPluginApi;
providers: ProviderPlugin[];
speechProviders: SpeechProviderPlugin[];
mediaUnderstandingProviders: MediaUnderstandingProviderPlugin[];
webSearchProviders: WebSearchProviderPlugin[];
tools: AnyAgentTool[];
};
@@ -17,12 +19,14 @@ export type CapturedPluginRegistration = {
export function createCapturedPluginRegistration(): CapturedPluginRegistration {
const providers: ProviderPlugin[] = [];
const speechProviders: SpeechProviderPlugin[] = [];
const mediaUnderstandingProviders: MediaUnderstandingProviderPlugin[] = [];
const webSearchProviders: WebSearchProviderPlugin[] = [];
const tools: AnyAgentTool[] = [];
return {
providers,
speechProviders,
mediaUnderstandingProviders,
webSearchProviders,
tools,
api: {
@@ -32,6 +36,9 @@ export function createCapturedPluginRegistration(): CapturedPluginRegistration {
registerSpeechProvider(provider: SpeechProviderPlugin) {
speechProviders.push(provider);
},
registerMediaUnderstandingProvider(provider: MediaUnderstandingProviderPlugin) {
mediaUnderstandingProviders.push(provider);
},
registerWebSearchProvider(provider: WebSearchProviderPlugin) {
webSearchProviders.push(provider);
},