huskies: merge 855
This commit is contained in:
@@ -40,7 +40,7 @@ pub(crate) async fn ensure_project_root_with_story_kit(
|
||||
// Always update .mcp.json with the current port so the bot connects to
|
||||
// the right endpoint even when HUSKIES_PORT changes between restarts.
|
||||
let mcp_content = format!(
|
||||
"{{\n \"mcpServers\": {{\n \"huskies\": {{\n \"type\": \"http\",\n \"url\": \"http://localhost:{port}/mcp\"\n }}\n }}\n}}\n"
|
||||
"{{\n \"mcpServers\": {{\n \"huskies\": {{\n \"url\": \"ws://localhost:{port}/crdt-sync\"\n }}\n }}\n}}\n"
|
||||
);
|
||||
fs::write(path.join(".mcp.json"), mcp_content)
|
||||
.map_err(|e| format!("Failed to write .mcp.json: {}", e))?;
|
||||
|
||||
@@ -68,11 +68,12 @@ pub(crate) fn scaffold_story_kit(root: &Path, port: u16) -> Result<(), String> {
|
||||
BOT_TOML_SLACK_EXAMPLE,
|
||||
)?;
|
||||
|
||||
// Write .mcp.json at the project root so agents can find the MCP server.
|
||||
// Write .mcp.json at the project root so agents can find the MCP server
|
||||
// via the rendezvous WebSocket endpoint.
|
||||
// Only written when missing — never overwrites an existing file, because
|
||||
// the port is environment-specific and must not clobber a running instance.
|
||||
let mcp_content = format!(
|
||||
"{{\n \"mcpServers\": {{\n \"huskies\": {{\n \"type\": \"http\",\n \"url\": \"http://localhost:{port}/mcp\"\n }}\n }}\n}}\n"
|
||||
"{{\n \"mcpServers\": {{\n \"huskies\": {{\n \"url\": \"ws://localhost:{port}/crdt-sync\"\n }}\n }}\n}}\n"
|
||||
);
|
||||
write_file_if_missing(&root.join(".mcp.json"), &mcp_content)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user