diff --git a/channels/telegram/Cargo.toml b/channels/telegram/Cargo.toml index 97c60f0..a6d3a61 100644 --- a/channels/telegram/Cargo.toml +++ b/channels/telegram/Cargo.toml @@ -8,6 +8,7 @@ capnp = "0.25" capnp-rpc = "0.25" dirs = "6" futures = "0.3" +json5 = "1.3" consciousness = { path = "../.." } serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/channels/telegram/src/main.rs b/channels/telegram/src/main.rs index af36cab..d3753f7 100644 --- a/channels/telegram/src/main.rs +++ b/channels/telegram/src/main.rs @@ -40,7 +40,7 @@ fn load_config() -> Config { let config_path = dir.join("telegram.json5"); let text = std::fs::read_to_string(&config_path) .unwrap_or_else(|_| panic!("failed to read {}", config_path.display())); - let mut config: Config = serde_json::from_str(&text) + let mut config: Config = json5::from_str(&text) .unwrap_or_else(|e| panic!("failed to parse {}: {}", config_path.display(), e)); // Read token from secrets file diff --git a/channels/tmux/Cargo.toml b/channels/tmux/Cargo.toml index 6e4c0aa..571b383 100644 --- a/channels/tmux/Cargo.toml +++ b/channels/tmux/Cargo.toml @@ -8,11 +8,11 @@ capnp = "0.25" capnp-rpc = "0.25" dirs = "6" libc = "0.2" -scopeguard = "1" futures = "0.3" json5 = "1.3" consciousness = { path = "../.." } serde = { version = "1", features = ["derive"] } +serde_json = "1" tokio = { version = "1", features = ["full"] } tokio-util = { version = "0.7", features = ["compat"] } log = "0.4" diff --git a/channels/tmux/src/main.rs b/channels/tmux/src/main.rs index 4255671..f49bdc1 100644 --- a/channels/tmux/src/main.rs +++ b/channels/tmux/src/main.rs @@ -24,26 +24,30 @@ use consciousness::thalamus::channel_log::ChannelLog; // ── Config ───────────────────────────────────────────────────── -#[derive(Clone, serde::Deserialize)] +#[derive(Clone, serde::Serialize, serde::Deserialize)] struct PaneConfig { - /// Tmux pane ID, e.g. "0:1.0" - pane_id: String, /// Human-readable label, becomes the channel name "tmux.