feat(devicemanager): Introduce a UniversalDevice architecture with composable Feature system; add extensive new device/protocol support and discovery/refactors

This commit is contained in:
2026-01-09 09:03:42 +00:00
parent 05e1f94c79
commit 206b4b5ae0
33 changed files with 8254 additions and 87 deletions

View File

@@ -15,7 +15,7 @@ export type TConnectionState = 'disconnected' | 'connecting' | 'connected' | 'er
// ============================================================================
export type TScannerProtocol = 'sane' | 'escl';
export type TScanFormat = 'png' | 'jpeg' | 'pdf';
export type TScanFormat = 'png' | 'jpeg' | 'pdf' | 'tiff';
export type TColorMode = 'color' | 'grayscale' | 'blackwhite';
export type TScanSource = 'flatbed' | 'adf' | 'adf-duplex';
@@ -179,7 +179,7 @@ export interface IDiscoveredDevice {
id: string;
name: string;
type: TDeviceType;
protocol: TScannerProtocol | 'ipp';
protocol: string; // 'escl' | 'sane' | 'ipp' | 'airplay' | 'sonos' | 'chromecast' | etc.
address: string;
port: number;
txtRecords: Record<string, string>;
@@ -321,7 +321,7 @@ export interface INetworkScanOptions {
concurrency?: number;
/** Timeout per probe in milliseconds (default: 2000) */
timeout?: number;
/** Ports to probe (default: [80, 443, 631, 6566, 9100]) */
/** Ports to probe (default: [80, 443, 631, 6566, 9100, 7000, 1400, 8009]) */
ports?: number[];
/** Check for eSCL scanners (default: true) */
probeEscl?: boolean;
@@ -329,11 +329,17 @@ export interface INetworkScanOptions {
probeIpp?: boolean;
/** Check for SANE scanners (default: true) */
probeSane?: boolean;
/** Check for AirPlay speakers (default: true) */
probeAirplay?: boolean;
/** Check for Sonos speakers (default: true) */
probeSonos?: boolean;
/** Check for Chromecast devices (default: true) */
probeChromecast?: boolean;
}
export interface INetworkScanDevice {
type: 'scanner' | 'printer';
protocol: 'escl' | 'sane' | 'ipp' | 'jetdirect';
type: 'scanner' | 'printer' | 'speaker';
protocol: 'escl' | 'sane' | 'ipp' | 'jetdirect' | 'airplay' | 'sonos' | 'chromecast';
port: number;
name?: string;
model?: string;
@@ -364,3 +370,9 @@ export type TNetworkScannerEvents = {
'error': (error: Error) => void;
'cancelled': () => void;
};
// ============================================================================
// Feature Types (Universal Device Architecture)
// ============================================================================
export * from './feature.interfaces.js';