import { execFile } from 'child_process' import { promisify } from 'util' import { POWERSHELL_EXE } from './lib/systemPaths' import type { SkillDefinition } from '../types' const execFileAsync = promisify(execFile) export const emptyRecycleBin: SkillDefinition = { name: 'empty_recycle_bin', description: "Vide la corbeille Windows pour liberer de l'espace disque.", parameters: { type: 'object', properties: {} }, execute: async () => { try { await execFileAsync(POWERSHELL_EXE, ['-NoProfile', '-Command', 'Clear-RecycleBin -Force']) } catch { // Clear-RecycleBin renvoie parfois un code d'erreur si la corbeille est deja vide. } return 'Corbeille videe.' } }