feat: add observability api foundation

This commit is contained in:
a.tolmachev
2026-03-30 00:00:13 +03:00
parent 0a1680f24e
commit be9ee95cbe
21 changed files with 1535 additions and 94 deletions
+16 -1
View File
@@ -35,11 +35,26 @@ impl RuntimeExecutor {
operation: &RuntimeOperation,
input: &Value,
) -> Result<Value, RuntimeError> {
let prepared_request = self.prepare_request(operation, input)?;
self.execute_prepared(operation, prepared_request).await
}
pub fn prepare_request(
&self,
operation: &RuntimeOperation,
input: &Value,
) -> Result<PreparedRequest, RuntimeError> {
operation.input_schema.validate_shape(input)?;
let mapped_input = operation.input_mapping.apply(&json!({ "mcp": input }))?;
let prepared_request = PreparedRequest::from_mapping_output(&mapped_input)?;
PreparedRequest::from_mapping_output(&mapped_input)
}
async fn execute_prepared(
&self,
operation: &RuntimeOperation,
prepared_request: PreparedRequest,
) -> Result<Value, RuntimeError> {
let adapter_response = match &operation.target {
Target::Grpc(target) => {
let request = GrpcRequest {