fix: rename story-kit references to storkit in server code and settings
Updates -p flag in rebuild_and_restart, MCP server name, enabledMcpjsonServers, and test values to match the new binary/crate name. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -64,9 +64,9 @@ pub(super) async fn tool_rebuild_and_restart(ctx: &AppContext) -> Result<String,
|
||||
// 3. Build the server binary, matching the current build profile so the
|
||||
// re-exec via current_exe() picks up the new binary.
|
||||
let build_args: Vec<&str> = if cfg!(debug_assertions) {
|
||||
vec!["build", "-p", "story-kit"]
|
||||
vec!["build", "-p", "storkit"]
|
||||
} else {
|
||||
vec!["build", "--release", "-p", "story-kit"]
|
||||
vec!["build", "--release", "-p", "storkit"]
|
||||
};
|
||||
slog!("[rebuild] cargo {}", build_args.join(" "));
|
||||
let output = tokio::task::spawn_blocking({
|
||||
@@ -619,7 +619,7 @@ mod tests {
|
||||
fs::create_dir_all(&claude_dir).unwrap();
|
||||
fs::write(
|
||||
claude_dir.join("settings.json"),
|
||||
r#"{"permissions":{"allow":["Edit"]},"enabledMcpjsonServers":["story-kit"]}"#,
|
||||
r#"{"permissions":{"allow":["Edit"]},"enabledMcpjsonServers":["storkit"]}"#,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -629,7 +629,7 @@ mod tests {
|
||||
let settings: Value = serde_json::from_str(&content).unwrap();
|
||||
let servers = settings["enabledMcpjsonServers"].as_array().unwrap();
|
||||
assert_eq!(servers.len(), 1);
|
||||
assert_eq!(servers[0], "story-kit");
|
||||
assert_eq!(servers[0], "storkit");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -669,9 +669,9 @@ mod tests {
|
||||
// binary, otherwise cargo build outputs to a different target dir and
|
||||
// current_exe() still points at the old binary.
|
||||
let build_args: Vec<&str> = if cfg!(debug_assertions) {
|
||||
vec!["build", "-p", "story-kit"]
|
||||
vec!["build", "-p", "storkit"]
|
||||
} else {
|
||||
vec!["build", "--release", "-p", "story-kit"]
|
||||
vec!["build", "--release", "-p", "storkit"]
|
||||
};
|
||||
|
||||
// Tests always run in debug mode, so --release must NOT be present.
|
||||
|
||||
@@ -301,7 +301,7 @@ fn handle_initialize(id: Option<Value>, params: &Value) -> JsonRpcResponse {
|
||||
"tools": {}
|
||||
},
|
||||
"serverInfo": {
|
||||
"name": "story-kit",
|
||||
"name": "storkit",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
}),
|
||||
@@ -1136,7 +1136,7 @@ mod tests {
|
||||
let result = resp.result.unwrap();
|
||||
assert_eq!(result["protocolVersion"], "2025-03-26");
|
||||
assert!(result["capabilities"]["tools"].is_object());
|
||||
assert_eq!(result["serverInfo"]["name"], "story-kit");
|
||||
assert_eq!(result["serverInfo"]["name"], "storkit");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -1402,7 +1402,7 @@ mod tests {
|
||||
)
|
||||
.await;
|
||||
assert_eq!(body["result"]["protocolVersion"], "2025-03-26");
|
||||
assert_eq!(body["result"]["serverInfo"]["name"], "story-kit");
|
||||
assert_eq!(body["result"]["serverInfo"]["name"], "storkit");
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
@@ -94,7 +94,7 @@ const STORY_KIT_CLAUDE_SETTINGS: &str = r#"{
|
||||
]
|
||||
},
|
||||
"enabledMcpjsonServers": [
|
||||
"story-kit"
|
||||
"storkit"
|
||||
]
|
||||
}
|
||||
"#;
|
||||
|
||||
@@ -144,13 +144,13 @@ mod tests {
|
||||
|
||||
{
|
||||
let store = JsonFileStore::new(path.clone()).unwrap();
|
||||
store.set("name", json!("story-kit"));
|
||||
store.set("name", json!("storkit"));
|
||||
store.set("version", json!(1));
|
||||
store.save().expect("save should succeed");
|
||||
}
|
||||
|
||||
let store = JsonFileStore::new(path).unwrap();
|
||||
assert_eq!(store.get("name"), Some(json!("story-kit")));
|
||||
assert_eq!(store.get("name"), Some(json!("storkit")));
|
||||
assert_eq!(store.get("version"), Some(json!(1)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user