sqry-daemon 11.0.1

sqry daemon (sqryd) — persistent code-graph service
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Daemon IPC wrapper for the `subgraph` MCP tool method.

use serde_json::Value;

use sqry_mcp::daemon_adapter::execute_subgraph_for_daemon;
use sqry_mcp::daemon_params::params_to_subgraph_args;

use crate::ipc::methods::tool_dispatch::{classify_and_build, rpc_error_to_method_error};
use crate::ipc::methods::{HandlerContext, MethodError};

pub(crate) async fn handle(ctx: &HandlerContext, params: Value) -> Result<Value, MethodError> {
    let args = params_to_subgraph_args(params).map_err(rpc_error_to_method_error)?;
    let path = args.path.clone();
    classify_and_build(ctx, &path, move |wctx| {
        execute_subgraph_for_daemon(wctx, &args)
    })
    .await
}