import { C as createEmptyPluginRegistry, _ as resetPluginRuntimeStateForTest, f as releasePinnedPluginChannelRegistry, r as getActivePluginRegistry, y as setActivePluginRegistry } from "../runtime-DvDGh8U9.js";
import { n as loadPluginManifestRegistry } from "../manifest-registry-C9qOP1PN.js";
import { t as buildPluginApi } from "../api-builder-Dfrw0m2U.js";
import { t as createPluginRegistry } from "../registry-DBOuapU8.js";
import { a as resetGlobalHookRunner, i as initializeGlobalHookRunner } from "../hook-runner-global-DZpmq_L_.js";
import { r as listImportedBundledPluginFacadeIds } from "../facade-loader-DnyIP17h.js";
import { r as resetFacadeRuntimeStateForTest } from "../facade-runtime-DwxUHh4P.js";
import { i as runProviderCatalog } from "../provider-discovery-C6vWENiB.js";
import { n as createCapturedPluginRegistration, t as capturePluginRegistration } from "../captured-registration-EkvPYxGH.js";
import { a as providerContractLoadError, c as resolveWebFetchProviderContractEntriesForPluginId, l as resolveWebSearchProviderContractEntriesForPluginId, s as resolveProviderContractProvidersForPluginIds } from "../registry-DMvaVAzc.js";
import { t as createRuntimeTaskFlow } from "../runtime-taskflow-CkU2UuVK.js";
import { n as createOutboundTestPlugin, r as createTestRegistry, t as setDefaultChannelPluginRegistryForTests } from "../channel-test-registry-DwsIIoes.js";
import { i as resolveProviderWizardOptions, n as resolveProviderModelPickerEntries, t as buildProviderPluginMethodChoice } from "../provider-wizard-GPrV7lib.js";
import { n as resolveProviderPluginChoice } from "../provider-auth-choice.runtime-Cy08b4wB.js";
import { i as createPluginRecord, n as registerSingleProviderPlugin, r as requireRegisteredProvider, t as registerProviderPlugins } from "../plugin-registration-B1l-RleS.js";
import { t as registerProviderPlugin } from "../provider-registration--trCn8jN.js";
//#region src/plugins/hooks.test-helpers.ts
function createMockPluginRegistry(hooks) {
	return {
		plugins: (hooks.length > 0 ? [...new Set(hooks.map((hook) => hook.pluginId ?? "test-plugin"))] : ["test-plugin"]).map((pluginId) => createPluginRecord({
			id: pluginId,
			name: "Test Plugin",
			source: "test",
			hookCount: hooks.filter((hook) => (hook.pluginId ?? "test-plugin") === pluginId).length
		})),
		hooks,
		typedHooks: hooks.map((h) => ({
			pluginId: h.pluginId ?? "test-plugin",
			hookName: h.hookName,
			handler: h.handler,
			priority: 0,
			source: "test"
		})),
		tools: [],
		channels: [],
		channelSetups: [],
		providers: [],
		speechProviders: [],
		mediaUnderstandingProviders: [],
		imageGenerationProviders: [],
		videoGenerationProviders: [],
		musicGenerationProviders: [],
		webSearchProviders: [],
		httpRoutes: [],
		gatewayHandlers: {},
		cliRegistrars: [],
		services: [],
		commands: [],
		diagnostics: []
	};
}
function addTestHook(params) {
	params.registry.typedHooks.push({
		pluginId: params.pluginId,
		hookName: params.hookName,
		handler: params.handler,
		priority: params.priority ?? 0,
		source: "test"
	});
}
//#endregion
export { addTestHook, buildPluginApi, buildProviderPluginMethodChoice, capturePluginRegistration, createCapturedPluginRegistration, createEmptyPluginRegistry, createMockPluginRegistry, createOutboundTestPlugin, createPluginRecord, createPluginRegistry, createRuntimeTaskFlow, createTestRegistry, getActivePluginRegistry, initializeGlobalHookRunner, listImportedBundledPluginFacadeIds, loadPluginManifestRegistry, providerContractLoadError, registerProviderPlugin, registerProviderPlugins, registerSingleProviderPlugin, releasePinnedPluginChannelRegistry, requireRegisteredProvider, resetFacadeRuntimeStateForTest, resetGlobalHookRunner, resetPluginRuntimeStateForTest, resolveProviderContractProvidersForPluginIds, resolveProviderModelPickerEntries, resolveProviderPluginChoice, resolveProviderWizardOptions, resolveWebFetchProviderContractEntriesForPluginId, resolveWebSearchProviderContractEntriesForPluginId, runProviderCatalog, setActivePluginRegistry, setDefaultChannelPluginRegistryForTests };
