chore: scaffold tvctl foundation

Set up the Rust crate, baseline module layout, and project docs so the
repository matches the design bundle and builds cleanly as a starting point.
This commit is contained in:
44r0n7
2026-04-14 09:02:32 -04:00
commit 584da2d825
21 changed files with 3266 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
use crate::adapters::AppInfo;
/// A platform-level cache of app metadata discovered from live devices.
#[derive(Debug, Clone, Default)]
pub struct AppCache {
/// The normalized platform identifier for the cache file.
pub platform: String,
/// The apps currently known for that platform.
pub apps: Vec<AppInfo>,
}
+3
View File
@@ -0,0 +1,3 @@
/// Background discovery orchestration for supported TV platforms.
#[derive(Debug, Clone, Default)]
pub struct DiscoveryService;
+8
View File
@@ -0,0 +1,8 @@
pub mod cache;
pub mod discovery;
pub mod registry;
pub mod state;
/// The long-lived tvctld process.
#[derive(Debug, Default)]
pub struct Daemon;
+8
View File
@@ -0,0 +1,8 @@
use crate::adapters::Device;
/// The persisted collection of known devices.
#[derive(Debug, Clone, Default)]
pub struct DeviceRegistry {
/// All devices currently remembered by the daemon.
pub devices: Vec<Device>,
}
+12
View File
@@ -0,0 +1,12 @@
use std::collections::HashMap;
use uuid::Uuid;
use crate::adapters::DeviceState;
/// An in-memory cache of the last observed state for each device.
#[derive(Debug, Clone, Default)]
pub struct StateCache {
/// State entries keyed by device UUID.
pub entries: HashMap<Uuid, DeviceState>,
}