CLI: convert node commands to typed async API

- node.rs: use memory::* typed helpers instead of memory_rpc()
- main.rs: make Run trait async, await all command dispatch
- defs.rs: bridge get_group_content async via block_in_place

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-13 13:20:04 -04:00
parent 933221f482
commit fa50f1c826
3 changed files with 84 additions and 102 deletions

View file

@ -303,7 +303,12 @@ fn resolve(
let mut keys = Vec::new();
for group in &cfg.context_groups {
if !group.agent { continue; }
let entries = crate::cli::node::get_group_content(group, &cfg);
// Bridge sync→async using block_in_place (same as resolve_tool)
let entries = tokio::task::block_in_place(|| {
tokio::runtime::Handle::current().block_on(
crate::cli::node::get_group_content(group, &cfg)
)
});
for (key, content) in entries {
use std::fmt::Write;
writeln!(text, "--- {} ({}) ---", key, group.label).ok();