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:
Dave
2026-03-20 09:24:06 +00:00
parent 1a22e0cb41
commit 31085e8c9f
5 changed files with 13 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
{ {
"enabledMcpjsonServers": [ "enabledMcpjsonServers": [
"story-kit" "storkit"
], ],
"permissions": { "permissions": {
"allow": [ "allow": [

View File

@@ -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 // 3. Build the server binary, matching the current build profile so the
// re-exec via current_exe() picks up the new binary. // re-exec via current_exe() picks up the new binary.
let build_args: Vec<&str> = if cfg!(debug_assertions) { let build_args: Vec<&str> = if cfg!(debug_assertions) {
vec!["build", "-p", "story-kit"] vec!["build", "-p", "storkit"]
} else { } else {
vec!["build", "--release", "-p", "story-kit"] vec!["build", "--release", "-p", "storkit"]
}; };
slog!("[rebuild] cargo {}", build_args.join(" ")); slog!("[rebuild] cargo {}", build_args.join(" "));
let output = tokio::task::spawn_blocking({ let output = tokio::task::spawn_blocking({
@@ -619,7 +619,7 @@ mod tests {
fs::create_dir_all(&claude_dir).unwrap(); fs::create_dir_all(&claude_dir).unwrap();
fs::write( fs::write(
claude_dir.join("settings.json"), claude_dir.join("settings.json"),
r#"{"permissions":{"allow":["Edit"]},"enabledMcpjsonServers":["story-kit"]}"#, r#"{"permissions":{"allow":["Edit"]},"enabledMcpjsonServers":["storkit"]}"#,
) )
.unwrap(); .unwrap();
@@ -629,7 +629,7 @@ mod tests {
let settings: Value = serde_json::from_str(&content).unwrap(); let settings: Value = serde_json::from_str(&content).unwrap();
let servers = settings["enabledMcpjsonServers"].as_array().unwrap(); let servers = settings["enabledMcpjsonServers"].as_array().unwrap();
assert_eq!(servers.len(), 1); assert_eq!(servers.len(), 1);
assert_eq!(servers[0], "story-kit"); assert_eq!(servers[0], "storkit");
} }
#[test] #[test]
@@ -669,9 +669,9 @@ mod tests {
// binary, otherwise cargo build outputs to a different target dir and // binary, otherwise cargo build outputs to a different target dir and
// current_exe() still points at the old binary. // current_exe() still points at the old binary.
let build_args: Vec<&str> = if cfg!(debug_assertions) { let build_args: Vec<&str> = if cfg!(debug_assertions) {
vec!["build", "-p", "story-kit"] vec!["build", "-p", "storkit"]
} else { } else {
vec!["build", "--release", "-p", "story-kit"] vec!["build", "--release", "-p", "storkit"]
}; };
// Tests always run in debug mode, so --release must NOT be present. // Tests always run in debug mode, so --release must NOT be present.

View File

@@ -301,7 +301,7 @@ fn handle_initialize(id: Option<Value>, params: &Value) -> JsonRpcResponse {
"tools": {} "tools": {}
}, },
"serverInfo": { "serverInfo": {
"name": "story-kit", "name": "storkit",
"version": "1.0.0" "version": "1.0.0"
} }
}), }),
@@ -1136,7 +1136,7 @@ mod tests {
let result = resp.result.unwrap(); let result = resp.result.unwrap();
assert_eq!(result["protocolVersion"], "2025-03-26"); assert_eq!(result["protocolVersion"], "2025-03-26");
assert!(result["capabilities"]["tools"].is_object()); assert!(result["capabilities"]["tools"].is_object());
assert_eq!(result["serverInfo"]["name"], "story-kit"); assert_eq!(result["serverInfo"]["name"], "storkit");
} }
#[test] #[test]
@@ -1402,7 +1402,7 @@ mod tests {
) )
.await; .await;
assert_eq!(body["result"]["protocolVersion"], "2025-03-26"); 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] #[tokio::test]

View File

@@ -94,7 +94,7 @@ const STORY_KIT_CLAUDE_SETTINGS: &str = r#"{
] ]
}, },
"enabledMcpjsonServers": [ "enabledMcpjsonServers": [
"story-kit" "storkit"
] ]
} }
"#; "#;

View File

@@ -144,13 +144,13 @@ mod tests {
{ {
let store = JsonFileStore::new(path.clone()).unwrap(); let store = JsonFileStore::new(path.clone()).unwrap();
store.set("name", json!("story-kit")); store.set("name", json!("storkit"));
store.set("version", json!(1)); store.set("version", json!(1));
store.save().expect("save should succeed"); store.save().expect("save should succeed");
} }
let store = JsonFileStore::new(path).unwrap(); 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))); assert_eq!(store.get("version"), Some(json!(1)));
} }