chore: rebrand project to crank

This commit is contained in:
a.tolmachev
2026-03-28 00:58:56 +03:00
parent 6821d0c64a
commit 26335e8d9b
101 changed files with 550 additions and 538 deletions
+13 -13
View File
@@ -10,8 +10,8 @@ use axum::{
response::{IntoResponse, Response},
routing::get,
};
use mcpaas_registry::{PostgresRegistry, RegistryOperation};
use mcpaas_runtime::{RuntimeError, RuntimeExecutor, RuntimeOperation};
use crank_registry::{PostgresRegistry, RegistryOperation};
use crank_runtime::{RuntimeError, RuntimeExecutor, RuntimeOperation};
use serde::{Deserialize, Serialize};
use serde_json::{Value, json};
@@ -312,7 +312,7 @@ async fn handle_initialize(state: Arc<AppState>, message: &Value) -> Response {
}
},
"serverInfo": {
"name": "rmcp-mcp-server",
"name": "crank-mcp-server",
"version": env!("CARGO_PKG_VERSION")
}
}),
@@ -480,9 +480,9 @@ fn tool_definition(operation: &RegistryOperation) -> Value {
})
}
fn schema_to_json_schema(schema: &mcpaas_schema::Schema) -> Value {
fn schema_to_json_schema(schema: &crank_schema::Schema) -> Value {
match schema.kind {
mcpaas_schema::SchemaKind::Object => {
crank_schema::SchemaKind::Object => {
let mut properties = serde_json::Map::new();
let mut required = Vec::new();
@@ -500,7 +500,7 @@ fn schema_to_json_schema(schema: &mcpaas_schema::Schema) -> Value {
"required": required
})
}
mcpaas_schema::SchemaKind::Array => json!({
crank_schema::SchemaKind::Array => json!({
"type": "array",
"items": schema
.items
@@ -508,16 +508,16 @@ fn schema_to_json_schema(schema: &mcpaas_schema::Schema) -> Value {
.map(schema_to_json_schema)
.unwrap_or_else(|| json!({}))
}),
mcpaas_schema::SchemaKind::String => json!({ "type": "string" }),
mcpaas_schema::SchemaKind::Integer => json!({ "type": "integer" }),
mcpaas_schema::SchemaKind::Number => json!({ "type": "number" }),
mcpaas_schema::SchemaKind::Boolean => json!({ "type": "boolean" }),
mcpaas_schema::SchemaKind::Enum => json!({
crank_schema::SchemaKind::String => json!({ "type": "string" }),
crank_schema::SchemaKind::Integer => json!({ "type": "integer" }),
crank_schema::SchemaKind::Number => json!({ "type": "number" }),
crank_schema::SchemaKind::Boolean => json!({ "type": "boolean" }),
crank_schema::SchemaKind::Enum => json!({
"type": "string",
"enum": schema.enum_values
}),
mcpaas_schema::SchemaKind::Null => json!({ "type": "null" }),
mcpaas_schema::SchemaKind::Oneof => json!({
crank_schema::SchemaKind::Null => json!({ "type": "null" }),
crank_schema::SchemaKind::Oneof => json!({
"anyOf": schema.variants.iter().map(schema_to_json_schema).collect::<Vec<_>>()
}),
}
+1 -1
View File
@@ -4,7 +4,7 @@ use std::{
time::{Duration, Instant},
};
use mcpaas_registry::{PostgresRegistry, RegistryError, RegistryOperation};
use crank_registry::{PostgresRegistry, RegistryError, RegistryOperation};
use tokio::sync::RwLock;
use tracing::info;
+17 -17
View File
@@ -5,7 +5,7 @@ mod session;
use std::{env, net::SocketAddr, time::Duration};
use mcpaas_registry::PostgresRegistry;
use crank_registry::PostgresRegistry;
use tokio::net::TcpListener;
use tracing::info;
@@ -15,15 +15,15 @@ use crate::app::build_app;
async fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing_subscriber::fmt()
.with_env_filter(
env::var("MCPAAS_LOG_LEVEL")
env::var("CRANK_LOG_LEVEL")
.unwrap_or_else(|_| "mcp_server=info,tower_http=info".into()),
)
.init();
let database_url = env::var("MCPAAS_DATABASE_URL")?;
let bind_addr = env::var("MCPAAS_MCP_BIND").unwrap_or_else(|_| "0.0.0.0:3002".into());
let public_base_url = env::var("MCPAAS_PUBLIC_BASE_URL").ok();
let refresh_interval = env::var("MCPAAS_MCP_REFRESH_MS")
let database_url = env::var("CRANK_DATABASE_URL")?;
let bind_addr = env::var("CRANK_MCP_BIND").unwrap_or_else(|_| "0.0.0.0:3002".into());
let public_base_url = env::var("CRANK_PUBLIC_BASE_URL").ok();
let refresh_interval = env::var("CRANK_MCP_REFRESH_MS")
.ok()
.and_then(|value| value.parse::<u64>().ok())
.map(Duration::from_millis)
@@ -49,14 +49,14 @@ mod tests {
};
use axum::{Json, Router, http::header, routing::post};
use mcpaas_adapter_grpc::test_support as grpc_test_support;
use mcpaas_core::{
use crank_adapter_grpc::test_support as grpc_test_support;
use crank_core::{
DescriptorId, ExecutionConfig, GraphqlOperationType, GraphqlTarget, GrpcTarget, HttpMethod,
Operation, OperationId, OperationStatus, Protocol, RestTarget, Target, ToolDescription,
};
use mcpaas_mapping::{MappingRule, MappingSet};
use mcpaas_registry::{PostgresRegistry, PublishRequest};
use mcpaas_schema::{Schema, SchemaKind};
use crank_mapping::{MappingRule, MappingSet};
use crank_registry::{PostgresRegistry, PublishRequest};
use crank_schema::{Schema, SchemaKind};
use serde_json::{Value, json};
use sqlx::{Executor, postgres::PgPoolOptions};
use tokio::net::TcpListener;
@@ -86,7 +86,7 @@ mod tests {
let base_url = spawn_mcp_server(build_app(
registry,
Duration::from_millis(0),
Some("https://rmcp.example.com".to_owned()),
Some("https://crank.example.com".to_owned()),
))
.await;
let client = reqwest::Client::new();
@@ -153,7 +153,7 @@ mod tests {
let base_url = spawn_mcp_server(build_app(
registry,
Duration::from_millis(0),
Some("https://rmcp.example.com".to_owned()),
Some("https://crank.example.com".to_owned()),
))
.await;
let client = reqwest::Client::new();
@@ -207,7 +207,7 @@ mod tests {
let base_url = spawn_mcp_server(build_app(
registry,
Duration::from_millis(0),
Some("https://rmcp.example.com".to_owned()),
Some("https://crank.example.com".to_owned()),
))
.await;
let client = reqwest::Client::new();
@@ -244,7 +244,7 @@ mod tests {
let base_url = spawn_mcp_server(build_app(
registry,
Duration::from_millis(0),
Some("https://rmcp.example.com".to_owned()),
Some("https://crank.example.com".to_owned()),
))
.await;
let client = reqwest::Client::new();
@@ -297,7 +297,7 @@ mod tests {
let base_url = spawn_mcp_server(build_app(
registry.clone(),
Duration::from_millis(0),
Some("https://rmcp.example.com".to_owned()),
Some("https://crank.example.com".to_owned()),
))
.await;
let client = reqwest::Client::new();
@@ -479,7 +479,7 @@ mod tests {
async fn test_registry() -> PostgresRegistry {
let database_url = env::var("TEST_DATABASE_URL")
.unwrap_or_else(|_| "postgres://rmcp:rmcp@127.0.0.1:5432/rmcp".to_owned());
.unwrap_or_else(|_| "postgres://crank:crank@127.0.0.1:5432/crank".to_owned());
let admin_pool = PgPoolOptions::new()
.max_connections(1)
.connect(&database_url)