import { r as PluginDiagnostic } from "./manifest-types-C_IWdo1j.js";
import { E as OpenClawPluginHookOptions, O as OpenClawPluginToolFactory, U as WebSearchProviderPlugin } from "./types-core-CpJ5SR5i.js";
import { r as AnyAgentTool } from "./common-BDN0bXby.js";
import { r as EmbeddingProviderAdapter } from "./embedding-providers-C_ZNx6VL.js";
import { $ as OpenClawPluginService, C as OpenClawPluginApi, D as OpenClawPluginCliRegistrar, Gn as RealtimeVoiceProviderPlugin, H as OpenClawPluginNodeHostCommand, Kn as SpeechProviderPlugin, M as OpenClawPluginGatewayRuntimeScopeSurface, N as OpenClawPluginHostedMediaResolver, O as OpenClawPluginCommandDefinition, T as OpenClawPluginCliCommandDescriptor, Wn as RealtimeTranscriptionProviderPlugin, Xn as VideoGenerationProviderPlugin, Y as OpenClawPluginReloadRegistration, Yn as UnifiedModelCatalogProviderPlugin, Z as OpenClawPluginSecurityAuditCollector, a as ImageGenerationProviderPlugin, cn as ProviderPlugin, h as MigrationProviderPlugin, li as AgentHarness, o as MediaUnderstandingProviderPlugin, qn as TranscriptSourceProvider, v as MusicGenerationProviderPlugin, vr as CliBackendPlugin, vt as PluginRegistrationMode, w as OpenClawPluginChannelRegistration } from "./types-drLpqQsP.js";
import { et as PluginHookName, q as PluginHookHandlerMap } from "./hook-types-BlIEaUPz.js";
import { $o as OperatorScope, Bo as PluginSessionActionRegistration, Fo as PluginControlUiDescriptor, Go as PluginSessionExtensionRegistration, Po as PluginAgentEventSubscriptionRegistration, Qo as PluginTrustedToolPolicyRegistration, Ro as PluginRuntimeLifecycleRegistration, Zo as PluginToolMetadataRegistration, qo as PluginSessionSchedulerJobRegistration } from "./index-B92HJ_sT.js";
import { n as ChannelPlugin } from "./types.public-DAfqVsWd.js";
import { n as GatewayRequestHandler } from "./types-BB_qrXHi.js";
import { a as PluginRegistryParams, i as PluginRegistry, n as PluginHttpRouteRegistration$1, o as PluginTextTransformsRegistration, r as PluginRecord } from "./registry-types-CQHD9LYn.js";
import { E as registerInternalHook } from "./internal-hooks-Fj9MjL1g.js";

//#region src/plugins/registry-empty.d.ts
declare function createEmptyPluginRegistry(): PluginRegistry;
//#endregion
//#region src/plugins/registry.d.ts
type PluginHttpRouteRegistration = PluginHttpRouteRegistration$1 & {
  gatewayRuntimeScopeSurface?: OpenClawPluginGatewayRuntimeScopeSurface;
};
type PluginTypedHookPolicy = {
  allowPromptInjection?: boolean;
  allowConversationAccess?: boolean;
  timeoutMs?: number;
  timeouts?: Record<string, number>;
};
declare function createPluginRegistry(registryParams: PluginRegistryParams): {
  registry: PluginRegistry;
  createApi: (record: PluginRecord, params: {
    config: OpenClawPluginApi["config"];
    pluginConfig?: Record<string, unknown>;
    hookPolicy?: PluginTypedHookPolicy;
    registrationMode?: PluginRegistrationMode;
  }) => OpenClawPluginApi;
  rollbackPluginGlobalSideEffects: (pluginId: string) => void;
  pushDiagnostic: (diag: PluginDiagnostic) => void;
  registerTool: (record: PluginRecord, tool: AnyAgentTool | OpenClawPluginToolFactory, opts?: {
    name?: string;
    names?: string[];
    optional?: boolean;
  }) => void;
  registerChannel: (record: PluginRecord, registration: OpenClawPluginChannelRegistration | ChannelPlugin, mode?: PluginRegistrationMode) => void;
  registerHostedMediaResolver: (record: PluginRecord, resolver: OpenClawPluginHostedMediaResolver) => void;
  registerProvider: (record: PluginRecord, provider: ProviderPlugin) => void;
  registerModelCatalogProvider: (record: PluginRecord, provider: UnifiedModelCatalogProviderPlugin) => void;
  registerAgentHarness: (record: PluginRecord, harness: AgentHarness) => void;
  registerCliBackend: (record: PluginRecord, backend: CliBackendPlugin) => void;
  registerTextTransforms: (record: PluginRecord, transforms: PluginTextTransformsRegistration["transforms"]) => void;
  registerEmbeddingProvider: (record: PluginRecord, adapter: EmbeddingProviderAdapter) => void;
  registerSpeechProvider: (record: PluginRecord, provider: SpeechProviderPlugin) => void;
  registerRealtimeTranscriptionProvider: (record: PluginRecord, provider: RealtimeTranscriptionProviderPlugin) => void;
  registerRealtimeVoiceProvider: (record: PluginRecord, provider: RealtimeVoiceProviderPlugin) => void;
  registerMediaUnderstandingProvider: (record: PluginRecord, provider: MediaUnderstandingProviderPlugin) => void;
  registerTranscriptSourceProvider: (record: PluginRecord, provider: TranscriptSourceProvider) => void;
  registerImageGenerationProvider: (record: PluginRecord, provider: ImageGenerationProviderPlugin) => void;
  registerVideoGenerationProvider: (record: PluginRecord, provider: VideoGenerationProviderPlugin) => void;
  registerMusicGenerationProvider: (record: PluginRecord, provider: MusicGenerationProviderPlugin) => void;
  registerWebSearchProvider: (record: PluginRecord, provider: WebSearchProviderPlugin) => void;
  registerMigrationProvider: (record: PluginRecord, provider: MigrationProviderPlugin) => void;
  registerGatewayMethod: (record: PluginRecord, method: string, handler: GatewayRequestHandler, opts?: {
    scope?: OperatorScope;
  }) => void;
  registerCli: (record: PluginRecord, registrar: OpenClawPluginCliRegistrar, opts?: {
    parentPath?: string[];
    commands?: string[];
    descriptors?: OpenClawPluginCliCommandDescriptor[];
  }) => void;
  registerReload: (record: PluginRecord, registration: OpenClawPluginReloadRegistration) => void;
  registerNodeHostCommand: (record: PluginRecord, nodeCommand: OpenClawPluginNodeHostCommand) => void;
  registerSecurityAuditCollector: (record: PluginRecord, collector: OpenClawPluginSecurityAuditCollector) => void;
  registerService: (record: PluginRecord, service: OpenClawPluginService) => void;
  registerCommand: (record: PluginRecord, command: OpenClawPluginCommandDefinition) => void;
  registerSessionExtension: (record: PluginRecord, extension: PluginSessionExtensionRegistration) => void;
  registerTrustedToolPolicy: (record: PluginRecord, policy: PluginTrustedToolPolicyRegistration) => void;
  registerToolMetadata: (record: PluginRecord, metadata: PluginToolMetadataRegistration) => void;
  registerControlUiDescriptor: (record: PluginRecord, descriptor: PluginControlUiDescriptor) => void;
  registerRuntimeLifecycle: (record: PluginRecord, lifecycle: PluginRuntimeLifecycleRegistration) => void;
  registerAgentEventSubscription: (record: PluginRecord, subscription: PluginAgentEventSubscriptionRegistration) => void;
  registerSessionSchedulerJob: (record: PluginRecord, job: PluginSessionSchedulerJobRegistration) => {
    id: string;
    pluginId: string;
    sessionKey: string;
    kind: string;
  } | undefined;
  registerSessionAction: (record: PluginRecord, action: PluginSessionActionRegistration) => void;
  registerHook: (record: PluginRecord, events: string | string[], handler: Parameters<typeof registerInternalHook>[1], opts: OpenClawPluginHookOptions | undefined, config: OpenClawPluginApi["config"], pluginConfig: unknown) => void;
  registerTypedHook: <K extends PluginHookName>(record: PluginRecord, hookName: K, handler: PluginHookHandlerMap[K], opts?: {
    priority?: number;
    timeoutMs?: number;
  }, policy?: PluginTypedHookPolicy) => void;
};
//#endregion
export { createPluginRegistry as n, createEmptyPluginRegistry as r, PluginHttpRouteRegistration as t };