rsclaw-runtime 2026.6.26

rsclaw composition root: AppState/RPC handlers (a2a, cmd, cron, gateway, hooks, server, ws) + process entry point
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::ws::dispatch::{MethodCtx, MethodResult};

pub async fn tools_catalog(ctx: MethodCtx) -> MethodResult {
    let global_dir = rsclaw_skill::default_global_skills_dir().unwrap_or_default();
    let registry =
        rsclaw_skill::load_skills(&global_dir, None, ctx.state.config.ext.skills.as_ref())
            .unwrap_or_default();
    let tools: Vec<serde_json::Value> = registry.all().flat_map(|s| {
        s.tools.iter().map(|t| serde_json::json!({"name": t.name, "description": t.description, "skill": s.name}))
    }).collect();
    Ok(serde_json::json!({"tools": tools}))
}
pub async fn tools_effective(_ctx: MethodCtx) -> MethodResult {
    Ok(serde_json::json!({"tools": []}))
}