/**
 * Device Manager capability — hub-side singleton that unifies device persistence,
 * live registry access, and all management operations into a single tRPC surface.
 *
 * Replaces:
 *   - `device-persistence` capability (persistence methods absorbed here)
 *   - `device-management.router.ts` (deleted in Phase 2)
 *   - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
 *
 * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
 * fork into separate processes but never run on remote cluster agents. Therefore:
 *   - No nodeId routing needed — this is a pure hub singleton.
 *   - The hub's DeviceRegistry is the single source of truth for all live devices.
 *   - No shadow registry or cross-node aggregation required.
 *
 * Forked workers register devices back to the hub via `ctx.devices`
 * (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
 */
import { z } from 'zod';
import { DeviceType } from '../device/device-type.js';
import { StreamSourceEntrySchema } from './schemas/streaming-shared.js';
/**
 * Serializable projection of a live IDevice.
 * Returned by listAll, getDevice, getChildren.
 * Live methods (getStreamSources, getConfigSchema) are separate calls.
 */
export declare const DeviceInfoSchema: z.ZodObject<{
    id: z.ZodNumber;
    stableId: z.ZodString;
    addonId: z.ZodString;
    type: z.ZodEnum<typeof DeviceType>;
    name: z.ZodString;
    location: z.ZodNullable<z.ZodString>;
    disabled: z.ZodBoolean;
    parentDeviceId: z.ZodNullable<z.ZodNumber>;
    role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    online: z.ZodBoolean;
    features: z.ZodArray<z.ZodString>;
    isCamera: z.ZodBoolean;
    config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
}, z.core.$strip>;
export declare const ConfigEntrySchema: z.ZodObject<{
    key: z.ZodString;
    value: z.ZodUnknown;
    description: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export { StreamSourceEntrySchema };
export declare const SavedDeviceRowSchema: z.ZodObject<{
    id: z.ZodNumber;
    stableId: z.ZodString;
    type: z.ZodString;
    name: z.ZodString;
    location: z.ZodNullable<z.ZodString>;
    disabled: z.ZodBoolean;
    parentDeviceId: z.ZodNullable<z.ZodNumber>;
    role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
/** Operator-organisational meta surface — populated by the kernel
 *  on `DeviceContext.deviceMeta` so `BaseDevice` can resolve
 *  `name` / `location` / `disabled` without subclass schema duplication.
 *  Mirrors `DeviceMeta` in `device-management.ts` for the cap wire shape. */
export declare const DeviceMetaSchema: z.ZodObject<{
    id: z.ZodNumber;
    stableId: z.ZodString;
    addonId: z.ZodString;
    type: z.ZodString;
    name: z.ZodString;
    location: z.ZodNullable<z.ZodString>;
    disabled: z.ZodBoolean;
    parentDeviceId: z.ZodNullable<z.ZodNumber>;
    metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
}, z.core.$strip>;
export declare const DeviceRegisterPayloadSchema: z.ZodObject<{
    addonId: z.ZodString;
    stableId: z.ZodString;
    id: z.ZodNumber;
    type: z.ZodString;
    name: z.ZodString;
    location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    disabled: z.ZodOptional<z.ZodBoolean>;
    parentDeviceId: z.ZodNullable<z.ZodNumber>;
    role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    features: z.ZodOptional<z.ZodArray<z.ZodString>>;
    config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.core.$strip>;
export declare const DeviceRemovePayloadSchema: z.ZodObject<{
    deviceId: z.ZodNumber;
}, z.core.$strip>;
export declare const DevicePersistConfigPayloadSchema: z.ZodObject<{
    deviceId: z.ZodNumber;
    data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.core.$strip>;
export declare const deviceManagerCapability: {
    readonly name: "device-manager";
    readonly scope: "system";
    readonly mode: "singleton";
    readonly methods: {
        /** Reserve (or re-resolve) a progressive numeric id for `(addonId, stableId)`.
         *  Idempotent: returns the existing id if one is already persisted for the
         *  pair. Callers invoke this before `registerDevice` so the live IDevice
         *  can bind `id` at construction time through `DeviceContext.id`. */
        readonly allocateDeviceId: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
            stableId: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            id: z.ZodNumber;
        }, z.core.$strip>, "mutation">;
        /** Register a device in the DB + in-memory registry. Called by DeviceManagerApi.register(). */
        readonly registerDevice: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
            stableId: z.ZodString;
            id: z.ZodNumber;
            type: z.ZodString;
            name: z.ZodString;
            location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            disabled: z.ZodOptional<z.ZodBoolean>;
            parentDeviceId: z.ZodNullable<z.ZodNumber>;
            role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            features: z.ZodOptional<z.ZodArray<z.ZodString>>;
            config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** Remove a device from the DB + in-memory registry. Called by DeviceManagerApi.remove(). */
        readonly removeDevice: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** Persist device config blob. Called by DeviceConfig.set/setAll(). */
        readonly persistConfig: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** Load persisted config for a device. Called at restore time. */
        readonly loadConfig: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Load persisted runtime state. Called at device adopt time. */
        readonly loadRuntimeState: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Load operator-organisational meta surface for a device. Called by
         *  the kernel proxy to populate `DeviceContext.deviceMeta` before
         *  the device class constructor runs. Returns `null` when the id
         *  doesn't resolve to a persisted row. */
        readonly loadMeta: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodNullable<z.ZodObject<{
            id: z.ZodNumber;
            stableId: z.ZodString;
            addonId: z.ZodString;
            type: z.ZodString;
            name: z.ZodString;
            location: z.ZodNullable<z.ZodString>;
            disabled: z.ZodBoolean;
            parentDeviceId: z.ZodNullable<z.ZodNumber>;
            metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
        }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Update the operator-edited display name. Persists to the meta
         *  row + emits `EventCategory.DeviceMetaChanged`. */
        readonly setName: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            name: z.ZodString;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** Update the operator-organisational location label. `null`
         *  clears it. */
        readonly setLocation: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            location: z.ZodNullable<z.ZodString>;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** Patch the device's hardware-identity metadata blob. Merges
         *  `patch` over the current blob (shallow). Value `null` for a
         *  given key removes that key. Drivers populate factual fields
         *  on first probe (model / firmware / mac / sn / uid); operators
         *  can override or augment via the Device Info tab. */
        readonly setMetadata: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            patch: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** Operator-curated location registry. Returns the union of:
         *  (1) labels persisted in the registry via `addLocation`, and
         *  (2) labels currently in use on at least one device's
         *      `meta.location` field.
         *  Sorted case-insensitively + deduped + trimmed of empty strings.
         *  Drives the autocomplete in the Device Info location editor. */
        readonly listLocations: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodArray<z.ZodString>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Add a label to the curated location registry. No-op when the
         *  label (case-insensitive, trimmed) is already present. Empty
         *  / whitespace-only inputs throw. */
        readonly addLocation: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            name: z.ZodString;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** Remove a label from the curated registry. Devices that still
         *  reference this label keep their `meta.location` value — the
         *  registry is purely a suggestion list. To purge from devices,
         *  iterate them and call `setLocation(deviceId, null)`
         *  separately (or pass `cascade: true` to do it in one shot). */
        readonly removeLocation: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            name: z.ZodString;
            cascade: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** Soft-disable / re-enable the device. Drivers consult
         *  `BaseDevice.disabled` to gate lifecycle hooks. */
        readonly setDisabled: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            disabled: z.ZodBoolean;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** List persisted devices for an addon (DB, for restore). */
        readonly listPersistedByAddon: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
        }, z.core.$strip>, z.ZodArray<z.ZodObject<{
            id: z.ZodNumber;
            stableId: z.ZodString;
            type: z.ZodString;
            name: z.ZodString;
            location: z.ZodNullable<z.ZodString>;
            disabled: z.ZodBoolean;
            parentDeviceId: z.ZodNullable<z.ZodNumber>;
            role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
        /** List all devices (live registry), optionally filtered by addonId. */
        readonly listAll: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodArray<z.ZodObject<{
            id: z.ZodNumber;
            stableId: z.ZodString;
            addonId: z.ZodString;
            type: z.ZodEnum<typeof DeviceType>;
            name: z.ZodString;
            location: z.ZodNullable<z.ZodString>;
            disabled: z.ZodBoolean;
            parentDeviceId: z.ZodNullable<z.ZodNumber>;
            role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            online: z.ZodBoolean;
            features: z.ZodArray<z.ZodString>;
            isCamera: z.ZodBoolean;
            config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
        }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Get a single device by numeric deviceId. */
        readonly getDevice: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodNullable<z.ZodObject<{
            id: z.ZodNumber;
            stableId: z.ZodString;
            addonId: z.ZodString;
            type: z.ZodEnum<typeof DeviceType>;
            name: z.ZodString;
            location: z.ZodNullable<z.ZodString>;
            disabled: z.ZodBoolean;
            parentDeviceId: z.ZodNullable<z.ZodNumber>;
            role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            online: z.ZodBoolean;
            features: z.ZodArray<z.ZodString>;
            isCamera: z.ZodBoolean;
            config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
        }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
        /** List children of a parent device (by parent numeric id). */
        readonly getChildren: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            parentDeviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodArray<z.ZodObject<{
            id: z.ZodNumber;
            stableId: z.ZodString;
            addonId: z.ZodString;
            type: z.ZodEnum<typeof DeviceType>;
            name: z.ZodString;
            location: z.ZodNullable<z.ZodString>;
            disabled: z.ZodBoolean;
            parentDeviceId: z.ZodNullable<z.ZodNumber>;
            role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            online: z.ZodBoolean;
            features: z.ZodArray<z.ZodString>;
            isCamera: z.ZodBoolean;
            config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
        }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Get stream sources for a camera device. */
        readonly getStreamSources: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            label: z.ZodString;
            protocol: z.ZodEnum<{
                custom: "custom";
                rtsp: "rtsp";
                rtmp: "rtmp";
                webrtc: "webrtc";
                annexb: "annexb";
                "http-mjpeg": "http-mjpeg";
            }>;
            url: z.ZodOptional<z.ZodString>;
            resolution: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
                width: z.ZodNumber;
                height: z.ZodNumber;
            }, z.core.$strip>>>;
            fps: z.ZodOptional<z.ZodNumber>;
            bitrate: z.ZodOptional<z.ZodNumber>;
            codec: z.ZodOptional<z.ZodString>;
            profileHint: z.ZodOptional<z.ZodEnum<{
                high: "high";
                mid: "mid";
                low: "low";
            }>>;
        }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Get config entries (key + value + description) for a device. */
        readonly getConfigSchema: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodArray<z.ZodObject<{
            key: z.ZodString;
            value: z.ZodUnknown;
            description: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Get the ConfigUISchema for a device's settings (for admin UI rendering). */
        readonly getSettingsSchema: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodNullable<z.ZodUnknown>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Update device config values (partial merge). */
        readonly updateConfig: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        }, z.core.$strip>, z.ZodObject<{
            success: z.ZodLiteral<true>;
        }, z.core.$strip>, "mutation">;
        /** Enable a device (writes enabled=true to device config). */
        readonly enable: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            success: z.ZodLiteral<true>;
        }, z.core.$strip>, "mutation">;
        /** Disable a device (writes enabled=false to device config). */
        readonly disable: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            success: z.ZodLiteral<true>;
        }, z.core.$strip>, "mutation">;
        /** Remove a device and all children: calls device.removeDevice() then removes from registry + DB. */
        readonly remove: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            success: z.ZodLiteral<true>;
        }, z.core.$strip>, "mutation">;
        /** Get quality→streamId mapping for a camera. Derived from profileHint if not explicitly set. */
        readonly getStreamProfileMap: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Persist quality→streamId mapping in device config under reserved key _profileMap. */
        readonly setStreamProfileMap: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            profileMap: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
        }, z.core.$strip>, z.ZodObject<{
            success: z.ZodLiteral<true>;
        }, z.core.$strip>, "mutation">;
        /** Run ffprobe on each stream source URL and return metadata. No-op if stream probe unavailable. */
        readonly probeStreams: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodArray<z.ZodObject<{
            streamId: z.ZodString;
            width: z.ZodOptional<z.ZodNumber>;
            height: z.ZodOptional<z.ZodNumber>;
            codec: z.ZodOptional<z.ZodString>;
            fps: z.ZodOptional<z.ZodNumber>;
            bitrateKbps: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>, "mutation">;
        /**
         * Return the per-capability binding map for a device. Each entry lists the
         * currently-active provider (native or wrapper) + the underlying native
         * addon id, so consumers can decide routing without re-running discovery.
         */
        readonly getBindings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            deviceId: z.ZodNumber;
            entries: z.ZodArray<z.ZodObject<{
                capName: z.ZodString;
                kind: z.ZodEnum<{
                    native: "native";
                    wrapped: "wrapped";
                }>;
                providerAddonId: z.ZodString;
                providerNodeId: z.ZodString;
                nativeAddonId: z.ZodString;
            }, z.core.$strip>>;
        }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
        /**
         * Return the binding map for every device known to the hub. Used by
         * `SystemManager` warm-boot: a single round-trip resolves the
         * routing for the entire fleet so subsequent `sm.getDeviceById(id)`
         * calls are sync. Bindings change rarely (only on wrapper toggle or
         * device add/remove) — clients invalidate via the
         * `capability.binding-changed` event.
         */
        readonly getAllBindings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodArray<z.ZodObject<{
            deviceId: z.ZodNumber;
            entries: z.ZodArray<z.ZodObject<{
                capName: z.ZodString;
                kind: z.ZodEnum<{
                    native: "native";
                    wrapped: "wrapped";
                }>;
                providerAddonId: z.ZodString;
                providerNodeId: z.ZodString;
                nativeAddonId: z.ZodString;
            }, z.core.$strip>>;
        }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
        /**
         * Activate (or deactivate) a wrapper addon for a (device, cap) pair.
         * Persists the binding via ctx.settings. active=false clears the wrapper
         * (falls back to native if registered).
         */
        readonly setWrapperActive: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            capName: z.ZodString;
            wrapperAddonId: z.ZodString;
            active: z.ZodBoolean;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /**
         * Return the addon ids that declared a wrapper provider for `capName`.
         * Backs the device-bindings UI's wrapper-picker dropdown. Entries are
         * sourced from `CapabilityRegistry.wrapperProviders`, populated at
         * `ProviderRegistration.kind === 'wrapper'` time.
         */
        readonly listWrappersForCap: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            capName: z.ZodString;
        }, z.core.$strip>, z.ZodArray<z.ZodString>, import("./capability-definition.js").CapabilityMethodKind>;
        /**
         * Return every device-scoped capability name that applies to a
         * deviceType (scope:'device' + deviceTypes includes the given type),
         * paired with the wrappers that can provide it. Backs the device
         * bindings UI so it can show rows for bindable caps even when no
         * native is registered yet — the user can still activate a wrapper
         * to light the cap up (e.g. snapshot via ffmpeg fallback for a camera
         * without `snapshotUrl`).
         */
        readonly listBindableCapsForDeviceType: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceType: z.ZodString;
        }, z.core.$strip>, z.ZodArray<z.ZodObject<{
            capName: z.ZodString;
            wrappers: z.ZodArray<z.ZodString>;
        }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly getDeviceSettingsAggregate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodNullable<z.ZodObject<{
            tabs: z.ZodOptional<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                label: z.ZodString;
                icon: z.ZodString;
                order: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>>;
            sections: z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                title: z.ZodString;
                description: z.ZodOptional<z.ZodString>;
                style: z.ZodOptional<z.ZodEnum<{
                    card: "card";
                    accordion: "accordion";
                }>>;
                defaultCollapsed: z.ZodOptional<z.ZodBoolean>;
                columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
                tab: z.ZodOptional<z.ZodString>;
                location: z.ZodOptional<z.ZodEnum<{
                    settings: "settings";
                    "top-tab": "top-tab";
                }>>;
                order: z.ZodOptional<z.ZodNumber>;
                fields: z.ZodArray<z.ZodAny>;
            }, z.core.$strip>>;
        }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly getDeviceLiveInfoAggregate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodNullable<z.ZodObject<{
            tabs: z.ZodOptional<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                label: z.ZodString;
                icon: z.ZodString;
                order: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>>;
            sections: z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                title: z.ZodString;
                description: z.ZodOptional<z.ZodString>;
                style: z.ZodOptional<z.ZodEnum<{
                    card: "card";
                    accordion: "accordion";
                }>>;
                defaultCollapsed: z.ZodOptional<z.ZodBoolean>;
                columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
                tab: z.ZodOptional<z.ZodString>;
                location: z.ZodOptional<z.ZodEnum<{
                    settings: "settings";
                    "top-tab": "top-tab";
                }>>;
                order: z.ZodOptional<z.ZodNumber>;
                fields: z.ZodArray<z.ZodAny>;
            }, z.core.$strip>>;
        }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
        /**
         * Unified entry point — returns both settings + live in a single call
         * so the admin UI pulls the whole device-details panel with one round-
         * trip instead of firing two parallel queries. The `live` field is the
         * polled portion; the UI re-fetches the whole aggregate at the live
         * cadence and uses the `settings` slice verbatim until the user
         * writes through `updateDeviceFieldsBatch`.
         */
        readonly getDeviceAggregate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            settings: z.ZodNullable<z.ZodObject<{
                tabs: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    id: z.ZodString;
                    label: z.ZodString;
                    icon: z.ZodString;
                    order: z.ZodOptional<z.ZodNumber>;
                }, z.core.$strip>>>;
                sections: z.ZodArray<z.ZodObject<{
                    id: z.ZodString;
                    title: z.ZodString;
                    description: z.ZodOptional<z.ZodString>;
                    style: z.ZodOptional<z.ZodEnum<{
                        card: "card";
                        accordion: "accordion";
                    }>>;
                    defaultCollapsed: z.ZodOptional<z.ZodBoolean>;
                    columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
                    tab: z.ZodOptional<z.ZodString>;
                    location: z.ZodOptional<z.ZodEnum<{
                        settings: "settings";
                        "top-tab": "top-tab";
                    }>>;
                    order: z.ZodOptional<z.ZodNumber>;
                    fields: z.ZodArray<z.ZodAny>;
                }, z.core.$strip>>;
            }, z.core.$strip>>;
            live: z.ZodNullable<z.ZodObject<{
                tabs: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    id: z.ZodString;
                    label: z.ZodString;
                    icon: z.ZodString;
                    order: z.ZodOptional<z.ZodNumber>;
                }, z.core.$strip>>>;
                sections: z.ZodArray<z.ZodObject<{
                    id: z.ZodString;
                    title: z.ZodString;
                    description: z.ZodOptional<z.ZodString>;
                    style: z.ZodOptional<z.ZodEnum<{
                        card: "card";
                        accordion: "accordion";
                    }>>;
                    defaultCollapsed: z.ZodOptional<z.ZodBoolean>;
                    columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
                    tab: z.ZodOptional<z.ZodString>;
                    location: z.ZodOptional<z.ZodEnum<{
                        settings: "settings";
                        "top-tab": "top-tab";
                    }>>;
                    order: z.ZodOptional<z.ZodNumber>;
                    fields: z.ZodArray<z.ZodAny>;
                }, z.core.$strip>>;
            }, z.core.$strip>>;
        }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly updateDeviceField: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            writerCapName: z.ZodString;
            writerAddonId: z.ZodString;
            key: z.ZodString;
            value: z.ZodUnknown;
        }, z.core.$strip>, z.ZodObject<{
            success: z.ZodLiteral<true>;
        }, z.core.$strip>, "mutation">;
        /**
         * Batched counterpart of `updateDeviceField` — the admin UI groups
         * per-provider changes so a single round-trip triggers at most one
         * `applyDeviceSettingsPatch` per `(capName, addonId)` tuple. Per-patch
         * failures are reported in `failures[]` without aborting the others;
         * consumers inspect the list and surface targeted errors.
         */
        readonly updateDeviceFieldsBatch: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            changes: z.ZodArray<z.ZodObject<{
                writerCapName: z.ZodString;
                writerAddonId: z.ZodString;
                key: z.ZodString;
                value: z.ZodUnknown;
            }, z.core.$strip>>;
        }, z.core.$strip>, z.ZodObject<{
            success: z.ZodLiteral<true>;
            failures: z.ZodArray<z.ZodObject<{
                writerCapName: z.ZodString;
                writerAddonId: z.ZodString;
                error: z.ZodString;
            }, z.core.$strip>>;
        }, z.core.$strip>, "mutation">;
        /** Trigger device discovery on a device-provider addon. */
        readonly discoverDevices: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
        }, z.core.$strip>, z.ZodArray<z.ZodObject<{
            stableId: z.ZodString;
            type: z.ZodEnum<typeof DeviceType>;
            suggestedName: z.ZodString;
            prefilledConfig: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        }, z.core.$strip>>, "mutation">;
        /** Adopt a discovered device via the device-provider capability. */
        readonly adoptDevice: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
            candidate: z.ZodObject<{
                stableId: z.ZodString;
                type: z.ZodEnum<typeof DeviceType>;
                suggestedName: z.ZodString;
                prefilledConfig: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            }, z.core.$strip>;
        }, z.core.$strip>, z.ZodObject<{
            id: z.ZodNumber;
            stableId: z.ZodString;
            addonId: z.ZodString;
            type: z.ZodString;
            name: z.ZodString;
            parentDeviceId: z.ZodNullable<z.ZodNumber>;
            online: z.ZodBoolean;
            features: z.ZodArray<z.ZodString>;
            config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        }, z.core.$strip>, "mutation">;
        /**
         * Get the creation form schema (ConfigUISchema) for a device type from a provider.
         * Returns null when the provider does not support manual creation.
         */
        readonly getCreationSchema: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
            type: z.ZodEnum<typeof DeviceType>;
        }, z.core.$strip>, z.ZodNullable<z.ZodUnknown>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Create a new device via the device-provider capability. */
        readonly createDevice: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
            type: z.ZodEnum<typeof DeviceType>;
            config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        }, z.core.$strip>, z.ZodObject<{
            id: z.ZodNumber;
            stableId: z.ZodString;
            addonId: z.ZodString;
            type: z.ZodString;
            name: z.ZodString;
            parentDeviceId: z.ZodNullable<z.ZodNumber>;
            online: z.ZodBoolean;
            features: z.ZodArray<z.ZodString>;
            config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        }, z.core.$strip>, "mutation">;
        /**
         * Test a single form field value during device creation (no device
         * exists yet). `formValues` carries the live snapshot of every
         * field in the form so probes that depend on multiple fields (e.g.
         * Reolink autodetect needs host + credentials + UID together) can
         * run without a separate round-trip per field. Optional for
         * backwards compatibility.
         */
        readonly testCreationField: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            addonId: z.ZodString;
            type: z.ZodEnum<typeof DeviceType>;
            key: z.ZodString;
            value: z.ZodUnknown;
            formValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, z.core.$strip>, z.ZodObject<{
            status: z.ZodEnum<{
                error: "error";
                ok: "ok";
            }>;
            labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
            error: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, "mutation">;
        /**
         * Test a field value on an existing device (e.g. probe an RTSP URL).
         * Routes through the device-provider for the owning addon.
         */
        readonly testField: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            key: z.ZodString;
            value: z.ZodUnknown;
        }, z.core.$strip>, z.ZodObject<{
            status: z.ZodEnum<{
                error: "error";
                ok: "ok";
            }>;
            labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
            error: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, "mutation">;
        /**
         * Aggregate status snapshot across every cap registered for a
         * device. Returns a flat map `{ capName: status | null }` where
         * `status` is whatever `capDef.status.schema` validates to — or
         * `null` when no provider for that cap is registered on the
         * device, or the provider returned null, or the returned value
         * failed validation.
         *
         * `caps` is a positional tuple of cap names. The runtime only
         * returns entries for caps that are KNOWN to the system (validated
         * against `CAP_NAMES_WITH_STATUS` at call time); unknown names are
         * silently skipped. The client-side hook narrows the return type
         * using `CapStatusTypeMap` so the TS-inferred shape matches the
         * runtime shape.
         *
         * When `caps` is omitted, the server returns status for EVERY
         * registered cap on the device. Use this only for debug / overview
         * pages — it's O(N caps) per call.
         */
        readonly getDeviceStatusAggregate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            caps: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
        }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>, import("./capability-definition.js").CapabilityMethodKind>;
    };
};
export type IDeviceManagerProvider = import('./capability-definition.js').InferProvider<typeof deviceManagerCapability>;
export type DeviceInfo = z.infer<typeof DeviceInfoSchema>;
//# sourceMappingURL=device-manager.cap.d.ts.map