49 lines
989 B
TypeScript
49 lines
989 B
TypeScript
export type DeviceStatus = "idle" | "busy" | "offline" | "error";
|
|
|
|
export interface Device {
|
|
id: string;
|
|
name: string | null;
|
|
status: DeviceStatus;
|
|
driver_type: string;
|
|
connection_info: Record<string, unknown>;
|
|
}
|
|
|
|
export type TaskStatus =
|
|
| "created"
|
|
| "running"
|
|
| "completed"
|
|
| "failed"
|
|
| "cancelled";
|
|
|
|
export interface TaskRecord {
|
|
id: string;
|
|
goal: string;
|
|
device_id: string;
|
|
status: TaskStatus;
|
|
created_at: string;
|
|
updated_at: string;
|
|
completed_at: string | null;
|
|
failure_reason: string | null;
|
|
}
|
|
|
|
export interface TimelineRecord {
|
|
index: number;
|
|
scene: Record<string, unknown>;
|
|
prompt: string;
|
|
tool_call: Record<string, unknown>;
|
|
result: Record<string, unknown>;
|
|
timestamp: string;
|
|
screenshot_path?: string | null;
|
|
image_base64?: string;
|
|
}
|
|
|
|
export interface RuntimeConfig {
|
|
max_steps: number;
|
|
}
|
|
|
|
export interface RegisterDevicePayload {
|
|
driver_type: string;
|
|
name?: string | null;
|
|
connection_info: Record<string, unknown>;
|
|
}
|