chore: rebrand project to crank
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
[package]
|
||||
name = "mcpaas-adapter-graphql"
|
||||
name = "crank-adapter-graphql"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
rust-version.workspace = true
|
||||
version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
mcpaas-core = { path = "../mcpaas-core" }
|
||||
mcpaas-mapping = { path = "../mcpaas-mapping" }
|
||||
crank-core = { path = "../crank-core" }
|
||||
crank-mapping = { path = "../crank-mapping" }
|
||||
reqwest.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
use std::{collections::BTreeMap, time::Duration};
|
||||
|
||||
use mcpaas_core::GraphqlTarget;
|
||||
use mcpaas_mapping::JsonPath;
|
||||
use crank_core::GraphqlTarget;
|
||||
use crank_mapping::JsonPath;
|
||||
use reqwest::{
|
||||
Client,
|
||||
header::{CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue},
|
||||
@@ -161,7 +161,7 @@ mod tests {
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use axum::{Json, Router, routing::post};
|
||||
use mcpaas_core::{GraphqlOperationType, GraphqlTarget};
|
||||
use crank_core::{GraphqlOperationType, GraphqlTarget};
|
||||
use serde_json::{Value, json};
|
||||
use tokio::net::TcpListener;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "mcpaas-adapter-grpc"
|
||||
name = "crank-adapter-grpc"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
rust-version.workspace = true
|
||||
@@ -10,8 +10,8 @@ test-support = []
|
||||
|
||||
[dependencies]
|
||||
base64.workspace = true
|
||||
mcpaas-core = { path = "../mcpaas-core" }
|
||||
mcpaas-proto = { path = "../mcpaas-proto" }
|
||||
crank-core = { path = "../crank-core" }
|
||||
crank-proto = { path = "../crank-proto" }
|
||||
prost.workspace = true
|
||||
prost-reflect.workspace = true
|
||||
serde.workspace = true
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::{collections::BTreeMap, str::FromStr, time::Duration};
|
||||
|
||||
use base64::{Engine as _, engine::general_purpose::STANDARD};
|
||||
use mcpaas_core::GrpcTarget;
|
||||
use crank_core::GrpcTarget;
|
||||
use prost::Message;
|
||||
use prost_reflect::{DescriptorPool, MethodDescriptor, prost_types::FileDescriptorSet};
|
||||
use tonic::{
|
||||
@@ -138,7 +138,7 @@ fn normalize_headers(metadata: &tonic::metadata::MetadataMap) -> BTreeMap<String
|
||||
mod tests {
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use mcpaas_core::{DescriptorId, GrpcTarget};
|
||||
use crank_core::{DescriptorId, GrpcTarget};
|
||||
use serde_json::json;
|
||||
|
||||
use crate::{GrpcAdapter, GrpcRequest, test_support};
|
||||
@@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "mcpaas-adapter-rest"
|
||||
name = "crank-adapter-rest"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
rust-version.workspace = true
|
||||
version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
mcpaas-core = { path = "../mcpaas-core" }
|
||||
crank-core = { path = "../crank-core" }
|
||||
reqwest.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::{collections::BTreeMap, time::Duration};
|
||||
|
||||
use mcpaas_core::{HttpMethod, RestTarget};
|
||||
use crank_core::{HttpMethod, RestTarget};
|
||||
use reqwest::{
|
||||
Client,
|
||||
header::{HeaderMap, HeaderName, HeaderValue},
|
||||
@@ -174,7 +174,7 @@ mod tests {
|
||||
http::HeaderMap,
|
||||
routing::{get, post},
|
||||
};
|
||||
use mcpaas_core::{HttpMethod, RestTarget};
|
||||
use crank_core::{HttpMethod, RestTarget};
|
||||
use serde_json::{Value, json};
|
||||
use tokio::net::TcpListener;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "mcpaas-core"
|
||||
name = "crank-core"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
rust-version.workspace = true
|
||||
@@ -321,7 +321,7 @@ mod tests {
|
||||
base_url: "https://api.example.com".to_owned(),
|
||||
method: HttpMethod::Post,
|
||||
path_template: "/v1/leads".to_owned(),
|
||||
static_headers: BTreeMap::from([("X-App-Source".to_owned(), "mcpaas".to_owned())]),
|
||||
static_headers: BTreeMap::from([("X-App-Source".to_owned(), "crank".to_owned())]),
|
||||
}),
|
||||
input_schema: json!({"type":"object","fields":{"email":{"type":"string","required":true}}}),
|
||||
output_schema: json!({"type":"object","fields":{"id":{"type":"string","required":true}}}),
|
||||
@@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "mcpaas-schema"
|
||||
name = "crank-mapping"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
rust-version.workspace = true
|
||||
version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
mcpaas-core = { path = "../mcpaas-core" }
|
||||
crank-core = { path = "../crank-core" }
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
thiserror.workspace = true
|
||||
@@ -1,13 +1,13 @@
|
||||
[package]
|
||||
name = "mcpaas-proto"
|
||||
name = "crank-proto"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
rust-version.workspace = true
|
||||
version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
mcpaas-core = { path = "../mcpaas-core" }
|
||||
mcpaas-schema = { path = "../mcpaas-schema" }
|
||||
crank-core = { path = "../crank-core" }
|
||||
crank-schema = { path = "../crank-schema" }
|
||||
prost.workspace = true
|
||||
prost-reflect.workspace = true
|
||||
prost-types.workspace = true
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use mcpaas_schema::{Schema, SchemaKind};
|
||||
use crank_schema::{Schema, SchemaKind};
|
||||
|
||||
use crate::{
|
||||
errors::ProtoError,
|
||||
@@ -161,7 +161,7 @@ fn scalar_schema(kind: &ProtoScalarKind) -> Schema {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use mcpaas_schema::SchemaKind;
|
||||
use crank_schema::SchemaKind;
|
||||
|
||||
use crate::{
|
||||
ProtoEnum, ProtoField, ProtoFieldCardinality, ProtoFieldType, ProtoMapField, ProtoMessage,
|
||||
@@ -1,14 +1,14 @@
|
||||
[package]
|
||||
name = "mcpaas-registry"
|
||||
name = "crank-registry"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
rust-version.workspace = true
|
||||
version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
mcpaas-core = { path = "../mcpaas-core" }
|
||||
mcpaas-mapping = { path = "../mcpaas-mapping" }
|
||||
mcpaas-schema = { path = "../mcpaas-schema" }
|
||||
crank-core = { path = "../crank-core" }
|
||||
crank-mapping = { path = "../crank-mapping" }
|
||||
crank-schema = { path = "../crank-schema" }
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
sqlx.workspace = true
|
||||
@@ -1,9 +1,9 @@
|
||||
use mcpaas_core::{
|
||||
use crank_core::{
|
||||
AuthProfile, DescriptorId, ExportMode, Operation, OperationId, OperationStatus, Protocol,
|
||||
SampleId,
|
||||
};
|
||||
use mcpaas_mapping::MappingSet;
|
||||
use mcpaas_schema::Schema;
|
||||
use crank_mapping::MappingSet;
|
||||
use crank_schema::Schema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use mcpaas_core::{AuthProfile, OperationId, OperationStatus};
|
||||
use crank_core::{AuthProfile, OperationId, OperationStatus};
|
||||
use serde::{Serialize, de::DeserializeOwned};
|
||||
use serde_json::Value;
|
||||
use sqlx::{
|
||||
@@ -481,7 +481,7 @@ impl PostgresRegistry {
|
||||
|
||||
pub async fn get_auth_profile(
|
||||
&self,
|
||||
auth_profile_id: &mcpaas_core::AuthProfileId,
|
||||
auth_profile_id: &crank_core::AuthProfileId,
|
||||
) -> Result<Option<AuthProfile>, RegistryError> {
|
||||
let row = sqlx::query(
|
||||
"select
|
||||
@@ -917,7 +917,7 @@ fn map_operation_version_record(row: &PgRow) -> Result<OperationVersionRecord, R
|
||||
|
||||
fn map_auth_profile(row: &PgRow) -> Result<AuthProfile, RegistryError> {
|
||||
Ok(AuthProfile {
|
||||
id: mcpaas_core::AuthProfileId::new(row.try_get::<String, _>("id")?),
|
||||
id: crank_core::AuthProfileId::new(row.try_get::<String, _>("id")?),
|
||||
name: row.try_get("name")?,
|
||||
kind: deserialize_enum_text(&row.try_get::<String, _>("kind")?, "kind")?,
|
||||
config: deserialize_json_value(row.try_get::<Json<Value>, _>("config_json")?.0)?,
|
||||
@@ -928,7 +928,7 @@ fn map_auth_profile(row: &PgRow) -> Result<AuthProfile, RegistryError> {
|
||||
|
||||
fn map_sample_metadata(row: &PgRow) -> Result<OperationSampleMetadata, RegistryError> {
|
||||
Ok(OperationSampleMetadata {
|
||||
id: mcpaas_core::SampleId::new(row.try_get::<String, _>("id")?),
|
||||
id: crank_core::SampleId::new(row.try_get::<String, _>("id")?),
|
||||
operation_id: OperationId::new(row.try_get::<String, _>("operation_id")?),
|
||||
version: from_db_version(row.try_get("version")?, "version")?,
|
||||
sample_kind: deserialize_enum_text(
|
||||
@@ -944,7 +944,7 @@ fn map_sample_metadata(row: &PgRow) -> Result<OperationSampleMetadata, RegistryE
|
||||
|
||||
fn map_descriptor_metadata(row: &PgRow) -> Result<DescriptorMetadata, RegistryError> {
|
||||
Ok(DescriptorMetadata {
|
||||
id: mcpaas_core::DescriptorId::new(row.try_get::<String, _>("id")?),
|
||||
id: crank_core::DescriptorId::new(row.try_get::<String, _>("id")?),
|
||||
operation_id: row
|
||||
.try_get::<Option<String>, _>("operation_id")?
|
||||
.map(OperationId::new),
|
||||
@@ -970,7 +970,7 @@ fn map_yaml_import_job(row: &PgRow) -> Result<YamlImportJob, RegistryError> {
|
||||
id: YamlImportJobId::new(row.try_get::<String, _>("id")?),
|
||||
source_sample_id: row
|
||||
.try_get::<Option<String>, _>("source_sample_id")?
|
||||
.map(mcpaas_core::SampleId::new),
|
||||
.map(crank_core::SampleId::new),
|
||||
status: deserialize_enum_text(&row.try_get::<String, _>("status")?, "status")?,
|
||||
format_version: row.try_get("format_version")?,
|
||||
mode: deserialize_enum_text(&row.try_get::<String, _>("mode")?, "mode")?,
|
||||
@@ -1038,14 +1038,14 @@ mod tests {
|
||||
time::{SystemTime, UNIX_EPOCH},
|
||||
};
|
||||
|
||||
use mcpaas_core::{
|
||||
use crank_core::{
|
||||
ApiKeyHeaderAuthConfig, AuthConfig, AuthKind, AuthProfile, ConfigExport, ExecutionConfig,
|
||||
ExportMode, GeneratedDraft, GeneratedDraftStatus, HttpMethod, OperationId, OperationStatus,
|
||||
Protocol, RestTarget, RetryPolicy, Samples, SecretRef, Target, ToolDescription,
|
||||
ToolExample,
|
||||
};
|
||||
use mcpaas_mapping::{MappingRule, MappingSet};
|
||||
use mcpaas_schema::{Schema, SchemaKind};
|
||||
use crank_mapping::{MappingRule, MappingSet};
|
||||
use crank_schema::{Schema, SchemaKind};
|
||||
use serde_json::json;
|
||||
use sqlx::{Executor, PgPool, postgres::PgPoolOptions};
|
||||
|
||||
@@ -1159,12 +1159,12 @@ mod tests {
|
||||
registry.create_operation(&operation, None).await.unwrap();
|
||||
|
||||
let auth_profile = AuthProfile {
|
||||
id: "auth_rmcp".into(),
|
||||
name: "RMCP API key".to_owned(),
|
||||
id: "auth_crank".into(),
|
||||
name: "Crank API key".to_owned(),
|
||||
kind: AuthKind::ApiKeyHeader,
|
||||
config: AuthConfig::ApiKeyHeader(ApiKeyHeaderAuthConfig {
|
||||
header_name: "X-Api-Key".to_owned(),
|
||||
secret_ref: SecretRef::new("vault://rmcp/api-key"),
|
||||
secret_ref: SecretRef::new("vault://crank/api-key"),
|
||||
}),
|
||||
created_at: "2026-03-25T12:00:00Z".to_owned(),
|
||||
updated_at: "2026-03-25T12:00:00Z".to_owned(),
|
||||
@@ -1415,7 +1415,7 @@ mod tests {
|
||||
execution_config: ExecutionConfig {
|
||||
timeout_ms: 10_000,
|
||||
retry_policy: Some(RetryPolicy { max_attempts: 3 }),
|
||||
auth_profile_ref: Some("auth_rmcp".into()),
|
||||
auth_profile_ref: Some("auth_crank".into()),
|
||||
headers: BTreeMap::from([("X-Request-Id".to_owned(), "static".to_owned())]),
|
||||
protocol_options: None,
|
||||
},
|
||||
@@ -0,0 +1,22 @@
|
||||
[package]
|
||||
name = "crank-runtime"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
rust-version.workspace = true
|
||||
version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
crank-adapter-graphql = { path = "../crank-adapter-graphql" }
|
||||
crank-adapter-grpc = { path = "../crank-adapter-grpc" }
|
||||
crank-adapter-rest = { path = "../crank-adapter-rest" }
|
||||
crank-core = { path = "../crank-core" }
|
||||
crank-mapping = { path = "../crank-mapping" }
|
||||
crank-schema = { path = "../crank-schema" }
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
thiserror.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
axum.workspace = true
|
||||
crank-adapter-grpc = { path = "../crank-adapter-grpc", features = ["test-support"] }
|
||||
tokio.workspace = true
|
||||
@@ -1,9 +1,9 @@
|
||||
use mcpaas_adapter_graphql::GraphqlAdapterError;
|
||||
use mcpaas_adapter_grpc::GrpcAdapterError;
|
||||
use mcpaas_adapter_rest::RestAdapterError;
|
||||
use mcpaas_core::Protocol;
|
||||
use mcpaas_mapping::MappingError;
|
||||
use mcpaas_schema::SchemaError;
|
||||
use crank_adapter_graphql::GraphqlAdapterError;
|
||||
use crank_adapter_grpc::GrpcAdapterError;
|
||||
use crank_adapter_rest::RestAdapterError;
|
||||
use crank_core::Protocol;
|
||||
use crank_mapping::MappingError;
|
||||
use crank_schema::SchemaError;
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
@@ -1,9 +1,9 @@
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use mcpaas_adapter_graphql::{GraphqlAdapter, GraphqlRequest};
|
||||
use mcpaas_adapter_grpc::{GrpcAdapter, GrpcRequest};
|
||||
use mcpaas_adapter_rest::{RestAdapter, RestRequest};
|
||||
use mcpaas_core::Target;
|
||||
use crank_adapter_graphql::{GraphqlAdapter, GraphqlRequest};
|
||||
use crank_adapter_grpc::{GrpcAdapter, GrpcRequest};
|
||||
use crank_adapter_rest::{RestAdapter, RestRequest};
|
||||
use crank_core::Target;
|
||||
use serde_json::{Map, Value, json};
|
||||
|
||||
use crate::{AdapterResponse, PreparedRequest, RuntimeError, RuntimeOperation};
|
||||
@@ -217,14 +217,14 @@ mod tests {
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use axum::{Json, Router, 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, GeneratedDraft, GeneratedDraftStatus, GraphqlOperationType,
|
||||
GraphqlTarget, GrpcTarget, HttpMethod, Operation, OperationId, OperationStatus, Protocol,
|
||||
RestTarget, Samples, Target, ToolDescription, ToolExample,
|
||||
};
|
||||
use mcpaas_mapping::{MappingRule, MappingSet};
|
||||
use mcpaas_schema::{Schema, SchemaKind};
|
||||
use crank_mapping::{MappingRule, MappingSet};
|
||||
use crank_schema::{Schema, SchemaKind};
|
||||
use serde_json::{Value, json};
|
||||
use tokio::net::TcpListener;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use mcpaas_core::{ExecutionConfig, Operation, OperationId, Protocol, Target, ToolDescription};
|
||||
use mcpaas_mapping::MappingSet;
|
||||
use mcpaas_schema::Schema;
|
||||
use crank_core::{ExecutionConfig, Operation, OperationId, Protocol, Target, ToolDescription};
|
||||
use crank_mapping::MappingSet;
|
||||
use crank_schema::Schema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "mcpaas-mapping"
|
||||
name = "crank-schema"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
rust-version.workspace = true
|
||||
version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
mcpaas-core = { path = "../mcpaas-core" }
|
||||
crank-core = { path = "../crank-core" }
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
thiserror.workspace = true
|
||||
@@ -1,22 +0,0 @@
|
||||
[package]
|
||||
name = "mcpaas-runtime"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
rust-version.workspace = true
|
||||
version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
mcpaas-adapter-graphql = { path = "../mcpaas-adapter-graphql" }
|
||||
mcpaas-adapter-grpc = { path = "../mcpaas-adapter-grpc" }
|
||||
mcpaas-adapter-rest = { path = "../mcpaas-adapter-rest" }
|
||||
mcpaas-core = { path = "../mcpaas-core" }
|
||||
mcpaas-mapping = { path = "../mcpaas-mapping" }
|
||||
mcpaas-schema = { path = "../mcpaas-schema" }
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
thiserror.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
axum.workspace = true
|
||||
mcpaas-adapter-grpc = { path = "../mcpaas-adapter-grpc", features = ["test-support"] }
|
||||
tokio.workspace = true
|
||||
Reference in New Issue
Block a user