feat(ecoos-daemon): integrate a bundled daemon web UI with components, interfaces, styles, bundling config, and server support

This commit is contained in:
2026-01-12 01:51:22 +00:00
parent b9b7f2b4a3
commit 140ce716f2
21 changed files with 6123 additions and 668 deletions

View File

@@ -0,0 +1,24 @@
/**
* Display interfaces - API contracts for display management
*/
export interface IDisplayInfo {
name: string; // e.g., "DP-1", "HDMI-A-1", "HEADLESS-1"
make: string; // Manufacturer
model: string; // Model name
serial: string; // Serial number
active: boolean; // Currently enabled
width: number; // Resolution width
height: number; // Resolution height
refreshRate: number; // Hz
isPrimary: boolean; // Has the focused window (kiosk)
}
export interface IDisplaysResponse {
displays: IDisplayInfo[];
}
export interface IDisplayActionResult {
success: boolean;
message: string;
}

View File

@@ -0,0 +1,7 @@
/**
* Re-export all interfaces
*/
export * from './status.ts';
export * from './display.ts';
export * from './updates.ts';

View File

@@ -0,0 +1,81 @@
/**
* Status interfaces - API contracts for system status data
*/
export type TServiceState = 'stopped' | 'starting' | 'running' | 'failed';
export interface IServiceStatus {
state: TServiceState;
error?: string;
lastAttempt?: string;
}
export interface ICpuInfo {
model: string;
cores: number;
usage: number;
}
export interface IMemoryInfo {
total: number;
used: number;
free: number;
usagePercent: number;
}
export interface IDiskInfo {
device: string;
mountpoint: string;
total: number;
used: number;
free: number;
usagePercent: number;
}
export interface INetworkInterface {
name: string;
ip: string;
mac: string;
state: 'up' | 'down';
}
export interface IGpuInfo {
name: string;
driver: string;
}
export interface IInputDevice {
name: string;
type: 'keyboard' | 'mouse' | 'touchpad' | 'other';
path: string;
}
export interface IAudioDevice {
name: string;
description: string;
isDefault: boolean;
}
export interface ISystemInfo {
hostname: string;
cpu: ICpuInfo;
memory: IMemoryInfo;
disks: IDiskInfo[];
network: INetworkInterface[];
gpu: IGpuInfo[];
uptime: number;
inputDevices: IInputDevice[];
speakers: IAudioDevice[];
microphones: IAudioDevice[];
}
export interface IStatus {
version: string;
sway: boolean;
swayStatus: IServiceStatus;
chromium: boolean;
chromiumStatus: IServiceStatus;
systemInfo: ISystemInfo;
logs: string[];
systemLogs: string[];
}

View File

@@ -0,0 +1,32 @@
/**
* Update interfaces - API contracts for update/upgrade system
*/
export interface IRelease {
version: string;
tagName: string;
publishedAt: Date;
downloadUrl: string;
isCurrent: boolean;
isNewer: boolean;
ageHours: number;
}
export interface IAutoUpgradeStatus {
enabled: boolean;
targetVersion: string | null;
scheduledIn: string | null;
waitingForStability: boolean;
}
export interface IUpdateInfo {
currentVersion: string;
releases: IRelease[];
autoUpgrade: IAutoUpgradeStatus;
lastCheck: string | null;
}
export interface IUpgradeResult {
success: boolean;
message: string;
}