refactor: harden internal daemon entrypoint and cleanup observations

Remove the internal daemon subcommand from the public CLI surface,
start the daemon via an internal env trigger, and ensure generated
completions/help never expose internal entrypoints.

Also finish the pending observation cleanups and docs updates,
including config/key deduplication, registry matching cleanup, and
remaining roadmap/project map staleness fixes.
This commit is contained in:
44r0n7
2026-04-18 11:55:18 -04:00
parent 274844b558
commit 795aa2f713
13 changed files with 131 additions and 129 deletions
+2 -11
View File
@@ -97,10 +97,8 @@ impl DeviceRegistry {
/// Remove a device by UUID or case-insensitive name.
pub fn remove(&mut self, target: &str) -> Option<Device> {
let index = self
.devices
.iter()
.position(|device| matches_target(device, target))?;
let id = self.find(target)?.id;
let index = self.devices.iter().position(|device| device.id == id)?;
let removed = self.devices.remove(index);
self.ensure_default();
Some(removed)
@@ -319,13 +317,6 @@ impl AdapterRegistry {
}
}
fn matches_target(device: &Device, target: &str) -> bool {
let target_uuid = Uuid::parse_str(target).ok();
let normalized = target.to_ascii_lowercase();
target_uuid.map(|uuid| device.id == uuid).unwrap_or(false)
|| device.name.to_ascii_lowercase() == normalized
}
#[cfg(test)]
mod tests {
use super::*;