/**
 * Minimal interfaces for kernel services consumed by @camstack/core.
 *
 * These abstractions break the direct core -> kernel import dependency,
 * allowing core to depend only on @camstack/types while kernel provides
 * the concrete implementations.
 */
import type { AddonDeclaration } from './addon.js';
import type { FrameInput } from '../types/io.js';
import type { CropInput } from '../types/detection.js';
import type { InferenceOutput } from './pipeline-runner.js';
/**
 * Capability registry interface exposing what core/addon consumers need.
 * The full CapabilityRegistry in @camstack/kernel implements this and more.
 */
export interface ICapabilityRegistry {
    /** Get all active collection providers for a capability. */
    getCollection<T = unknown>(capability: string): readonly T[];
    /** Wait for a provider of `capabilityName` registered by `addonId`. */
    waitForProvider(capabilityName: string, addonId: string, timeoutMs: number): Promise<unknown | null>;
    /** Get the singleton provider for a system capability. */
    getSingleton<T = unknown>(capabilityName: string): T | null;
    /** Get the native provider for a (cap, device) pair. */
    getNativeProvider<T = unknown>(capName: string, deviceId: number): T | null;
    /** Get the addonId that registered a native provider for (cap, device). */
    getNativeAddonId(capName: string, deviceId: number): string | null;
    /** List all capability names with a native registration for a device. */
    getNativeCapsForDevice(deviceId: number): readonly string[];
    /** List addon ids that declared a wrapper provider for a capability. */
    getWrappersForCap(capName: string): readonly string[];
    /** Return the wrapper addon flagged `defaultActive: true` for a capability, or null. */
    getDefaultWrapperForCap(capName: string): string | null;
    /** List capability names that have at least one wrapper flagged `defaultActive: true`. */
    getCapsWithDefaultWrapper(): readonly string[];
    /** Remove all native-provider registrations for a device (used on device removal). */
    unregisterAllNativeForDevice(deviceId: number): void;
    /** Get the capability definition for a declared capability. */
    getDefinition(capability: string): import('../capabilities/capability-definition.js').CapabilityDefinition | undefined;
    /** Get a specific provider by addon id. */
    getProviderByAddon<T = unknown>(capabilityName: string, addonId: string): T | null;
    /** List all declared capabilities with their provider info. */
    listCapabilities(): ReadonlyArray<{
        name: string;
        mode: string;
        providers: readonly string[];
        activeProvider: string | null;
    }>;
    /** List device-scoped capability names that apply to a device type. */
    listDeviceScopedCapsForType(deviceType: string): readonly string[];
}
/** An engine instance returned by IEngineManager — typed interface instead of raw ICamstackAddon */
export interface IEngineInstance {
    /** Run inference on a frame or crop */
    process(input: FrameInput | CropInput): Promise<InferenceOutput>;
    /** Classify audio (optional — only audio addons) */
    classifyAudio?(input: unknown): Promise<unknown>;
}
/**
 * Minimal engine manager interface for creating/reusing addon engine instances.
 */
export interface IEngineManager {
    /**
     * Get or create an addon engine for the given effective config.
     * Cameras with the same addonId + effective config share the same engine.
     */
    getOrCreateEngine(addonId: string, globalConfig: Record<string, unknown>, cameraOverride?: Record<string, unknown>): Promise<IEngineInstance>;
    /** Shutdown all managed engine instances */
    shutdownAll(): Promise<void>;
}
/** Subset of RegisteredAddon exposed through the interface. */
export interface IRegisteredAddon {
    readonly declaration: AddonDeclaration;
}
/**
 * Minimal addon loader interface for querying registered addons.
 */
export interface IAddonLoader {
    /** Check if an addon is registered */
    hasAddon(addonId: string): boolean;
    /** Get a registered addon by ID */
    getAddon(addonId: string): IRegisteredAddon | undefined;
}
//# sourceMappingURL=kernel-abstractions.d.ts.map