feat(k1): stabilize LAB bridge and isolate onboard device integration

This commit is contained in:
DCCONSTRUCTIONS
2026-09-07 10:31:33 +03:00
parent 020a878915
commit 63ea2bed67
115 changed files with 13700 additions and 988 deletions
+29
View File
@@ -0,0 +1,29 @@
import type {ComponentType} from 'react';
import type {IconName} from '@nodedc/ui-react';
import type {Sensor, SensorTransport} from './contracts';
import type {EnrollmentTransport} from './enrollment';
import type {RerunHostFactory} from './rerunHost';
export interface SensorDetailProps {
device:Sensor; transport:SensorTransport; enabled:boolean;
back:()=>void; refresh:()=>Promise<void>; failure:(error:unknown)=>void;
createRerunHost?:RerunHostFactory;
}
export interface SensorEnrollmentProps {
transport:EnrollmentTransport; onClose:()=>void; onChange:()=>void;
}
export interface SensorUiContribution {
kind:string;
Detail:ComponentType<SensorDetailProps>;
icon:IconName;
retainOffline:boolean;
supportsPreparation:boolean;
}
export function sensorContribution(
contributions:readonly SensorUiContribution[], device:Sensor,
):SensorUiContribution|undefined {
const matches=contributions.filter(value=>value.kind===device.kind);
// An ambiguous renderer must not acquire authority over a device.
return matches.length===1?matches[0]:undefined;
}