(filePath: string)
| 51 | } |
| 52 | |
| 53 | function removeIfPresent(filePath: string): void { |
| 54 | try { |
| 55 | fs.unlinkSync(filePath); |
| 56 | } catch (error) { |
| 57 | if ((error as NodeJS.ErrnoException).code !== 'ENOENT') { |
| 58 | throw error; |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | // Removes worktree-scoped state dirs under ~/.agent-device/dev/ that no live daemon |
| 64 | // owns and that have been idle past the retention threshold. Never touches the |