difftreelog
feat basic plugin loading
in: trunk
11 files changed
Cargo.lockdiffbeforeafterboth1079 "miniz_oxide 0.8.9",1079 "miniz_oxide 0.8.9",1080]1080]10811082[[package]]1083name = "fleet-nix-daemon"1084version = "0.1.0"1085dependencies = [1086 "anyhow",1087 "bifrostlink",1088 "bifrostlink-macros",1089 "camino",1090 "remowt-client",1091 "serde",1092 "thiserror 2.0.18",1093 "tokio",1094 "tracing",1095 "uuid",1096]109710811098[[package]]1082[[package]]1099name = "foldhash"1083name = "foldhash"2270 "polkit-shared",2254 "polkit-shared",2271 "rand 0.8.5",2255 "rand 0.8.5",2272 "remowt-link-shared",2256 "remowt-link-shared",2257 "remowt-plugin",2273 "remowt-pty",2258 "remowt-pty",2274 "serde",2259 "serde",2275 "tempfile",2260 "tempfile",2332 "ui-prompt",2317 "ui-prompt",2333]2318]23192320[[package]]2321name = "remowt-nix-daemon"2322version = "0.1.0"2323dependencies = [2324 "anyhow",2325 "bifrostlink",2326 "bifrostlink-macros",2327 "camino",2328 "remowt-client",2329 "serde",2330 "thiserror 2.0.18",2331 "tokio",2332 "tracing",2333 "uuid",2334]23352336[[package]]2337name = "remowt-plugin"2338version = "0.1.0"2339dependencies = [2340 "anyhow",2341 "bifrostlink",2342 "bifrostlink-ports",2343 "bytes",2344 "remowt-link-shared",2345 "tokio",2346 "tracing",2347 "tracing-subscriber",2348]233423492335[[package]]2350[[package]]2336name = "remowt-pty"2351name = "remowt-pty"Cargo.tomldiffbeforeafterboth10remowt-client = { path = "crates/remowt-client" }10remowt-client = { path = "crates/remowt-client" }11polkit-shared = { version = "0.1.0", path = "crates/polkit-shared" }11polkit-shared = { version = "0.1.0", path = "crates/polkit-shared" }12remowt-link-shared = { version = "0.1.0", path = "crates/remowt-link-shared" }12remowt-link-shared = { version = "0.1.0", path = "crates/remowt-link-shared" }13remowt-plugin = { version = "0.1.0", path = "crates/remowt-plugin" }13ui-prompt = { version = "0.1.0", path = "crates/ui-prompt" }14ui-prompt = { version = "0.1.0", path = "crates/ui-prompt" }141515bifrostlink = "0.2.0"16bifrostlink = "0.2.0"cmds/remowt-agent/Cargo.tomldiffbeforeafterboth14polkit-shared.workspace = true14polkit-shared.workspace = true15rand.workspace = true15rand.workspace = true16remowt-link-shared.workspace = true16remowt-link-shared.workspace = true17remowt-plugin.workspace = true17remowt-pty.workspace = true18remowt-pty.workspace = true18serde = { workspace = true, features = ["derive"] }19serde = { workspace = true, features = ["derive"] }19tempfile.workspace = true20tempfile.workspace = truecmds/remowt-agent/src/main.rsdiffbeforeafterboth253 Systemd.register_endpoints(&mut rpc);253 Systemd.register_endpoints(&mut rpc);254 Pty::new().register_endpoints(&mut rpc);254 Pty::new().register_endpoints(&mut rpc);255256 remowt_plugin::host::serve(&mut rpc);255257256 let user_prompter = PromptEndpointsClient::wrap(rpc.remote(Address::User));258 let user_prompter = PromptEndpointsClient::wrap(rpc.remote(Address::User));257 let editor_client = EditorEndpointsClient::wrap(rpc.remote(Address::User));259 let editor_client = EditorEndpointsClient::wrap(rpc.remote(Address::User));crates/remowt-client/src/lib.rsdiffbeforeafterboth9use bifrostlink_ports::unix_socket::from_socket;9use bifrostlink_ports::unix_socket::from_socket;10use bytes::{Bytes, BytesMut};10use bytes::{Bytes, BytesMut};11use camino::{Utf8Path, Utf8PathBuf};11use camino::{Utf8Path, Utf8PathBuf};12use remowt_link_shared::plugin::PluginEndpointsClient;12use remowt_link_shared::{13use remowt_link_shared::{13 Address, BifConfig, ElevateEndpoints, ElevateError, Elevator, Fs, Pty, PtyClient, ShellId,14 Address, BifConfig, ElevateEndpoints, ElevateError, Elevator, Fs, Pty, PtyClient, ShellId,14 Systemd,15 Systemd,509 R::wrap(self.rpc.remote(Address::Agent))510 R::wrap(self.rpc.remote(Address::Agent))510 }511 }512513 pub async fn load_plugin(&self, id: u16, name: &str) -> Result<()> {514 let client: PluginEndpointsClient<BifConfig> = self.endpoints();515 client516 .load_plugin(id, name.to_owned())517 .await?518 .map_err(|e| anyhow!("agent failed to load plugin: {e}"))519 }520 pub async fn run0_load_plugin_path(&self, id: u16, path: &str) -> Result<()> {521 self.ensure_elevated().await?;522 let client: PluginEndpointsClient<BifConfig> =523 PluginEndpointsClient::wrap(self.rpc.remote(Address::AgentPrivileged));524 client525 .load_plugin_path(id, path.to_owned())526 .await?527 .map_err(|e| anyhow!("privileged agent failed to load plugin: {e}"))528 }529 pub fn plugin_endpoints<R: RemoteEndpoints<BifConfig>>(&self, id: u16) -> R {530 R::wrap(self.rpc.remote(Address::Plugin(id)))531 }511 pub async fn run0_endpoints<R: RemoteEndpoints<BifConfig>>(&self) -> Result<R> {532 pub async fn run0_endpoints<R: RemoteEndpoints<BifConfig>>(&self) -> Result<R> {512 self.ensure_elevated().await?;533 self.ensure_elevated().await?;513 Ok(R::wrap(self.rpc.remote(Address::AgentPrivileged)))534 Ok(R::wrap(self.rpc.remote(Address::AgentPrivileged)))crates/remowt-link-shared/src/lib.rsdiffbeforeafterboth13 User,13 User,14 Agent,14 Agent,15 AgentPrivileged,15 AgentPrivileged,16 Plugin(u16),16}17}17impl AddressT for Address {}18impl AddressT for Address {}1920pub mod plugin;182119pub use remowt_fs::{Error as FsError, Fs, FsClient};22pub use remowt_fs::{Error as FsError, Fs, FsClient};20pub use remowt_pty::{Error as PtyError, Pty, PtyClient, ShellId};23pub use remowt_pty::{Error as PtyError, Pty, PtyClient, ShellId};crates/remowt-link-shared/src/plugin.rsdiffbeforeafterbothno changes
crates/remowt-nix-daemon/Cargo.tomldiffbeforeafterboth1[package]1[package]2name = "fleet-nix-daemon"2name = "remowt-nix-daemon"3description = "Nix daemon proxy endpoint + connection logic for fleet"3description = "Nix daemon proxy"4version.workspace = true4version.workspace = true5edition = "2021"5edition = "2021"66crates/remowt-plugin/Cargo.tomldiffbeforeafterbothno changes
crates/remowt-plugin/src/host.rsdiffbeforeafterbothno changes
crates/remowt-plugin/src/lib.rsdiffbeforeafterbothno changes