async function setup() {
  // Clean up before tests
  await cleanupTestDirectories();
  
  // Save original config to restore later
  const originalConfig = await configManager.getConfig();
  
  // Set allowed directories to include the home directory for testing tilde expansion
  await configManager.setValue('allowedDirectories', [HOME_DIR, __dirname]);
  console.log(`Set allowed directories to: ${HOME_DIR}, ${__dirname}`);
  
  return originalConfig;
}
Setup function to prepare the test environment