Skip to main content

robonix_executor/dispatch/
grpc.rs

1// SPDX-License-Identifier: MulanPSL-2.0
2// dispatch/grpc.rs — gRPC dispatch (placeholder).
3//
4// Currently unused: the LLM-callable contract path is MCP-only. This module
5// exists for future Robonix-internal contracts that consumers may invoke via
6// gRPC after `ConnectCapability` returns endpoint + GrpcParams.
7
8use crate::pb::pilot::{CapabilityCall, CapabilityCallResult};
9
10#[allow(dead_code)]
11pub async fn execute(call: &CapabilityCall, endpoint: &str) -> CapabilityCallResult {
12    log::warn!(
13        "[grpc] provider='{}' contract='{}' (endpoint='{}') — gRPC dispatch not yet implemented",
14        call.provider_id,
15        call.contract_id,
16        endpoint
17    );
18    CapabilityCallResult {
19        call_id: call.call_id.clone(),
20        provider_id: call.provider_id.clone(),
21        contract_id: call.contract_id.clone(),
22        success: false,
23        output: String::new(),
24        error: format!(
25            "gRPC dispatch not yet implemented for '{}'",
26            call.contract_id
27        ),
28    }
29}