fix: add recursive option to fs.rm for directory removal

fs.rm() without { recursive: true } throws ERR_FS_EISDIR on directories,
unlike the deprecated fs.rmdir() which handled empty dirs. Also fix
broken roadmap bullet in README.
This commit is contained in:
iliya 2026-03-24 21:43:43 +02:00
parent 1645f278bc
commit 896c749e76
3 changed files with 3 additions and 4 deletions

View file

@ -296,12 +296,11 @@ pnpm dist # macOS + Windows + Linux
## Roadmap ## Roadmap
- [ ] Planning mode to organize agent plans before execution - [ ] Planning mode to organize agent plans before execution
- [ ] Visual workflow editor ([@xyflow/react](https://github.com/xyflow/xyflow)) for building and - [ ] Visual workflow editor ([@xyflow/react](https://github.com/xyflow/xyflow)) for building and orchestrating agent pipelines with drag & drop
- [ ] Multi-model support: proxy layer to use other popular LLMs (GPT, Gemini, DeepSeek, Llama, etc.), including offline/local models - [ ] Multi-model support: proxy layer to use other popular LLMs (GPT, Gemini, DeepSeek, Llama, etc.), including offline/local models
- [ ] Remote agent execution via SSH: launch and manage agent teams on remote machines over SSH (stream-json protocol over SSH channel, SFTP-based file monitoring for tasks/inboxes/config) - [ ] Remote agent execution via SSH: launch and manage agent teams on remote machines over SSH (stream-json protocol over SSH channel, SFTP-based file monitoring for tasks/inboxes/config)
- [ ] CLI runtime: Run not only on a local PC but in any headless/console environment (web UI), e.g. VPS, remote server, etc. - [ ] CLI runtime: Run not only on a local PC but in any headless/console environment (web UI), e.g. VPS, remote server, etc.
- [ ] 2 modes: current (agent teams), and a new mode: regular subagents (no communication between them) - [ ] 2 modes: current (agent teams), and a new mode: regular subagents (no communication between them)
orchestrating agent pipelines with drag & drop
- [ ] Curate what context each agent sees (files, docs, MCP servers, skills) - [ ] Curate what context each agent sees (files, docs, MCP servers, skills)
- [ ] Slash commands - [ ] Slash commands

View file

@ -401,7 +401,7 @@ export class SkillPlanService {
if (entries.length > 0) { if (entries.length > 0) {
return; return;
} }
await fs.rm(nextDir); await fs.rm(nextDir, { recursive: true });
} catch { } catch {
return; return;
} }

View file

@ -180,7 +180,7 @@ export class TeamTaskAttachmentStore {
try { try {
const entries = await fs.promises.readdir(dir); const entries = await fs.promises.readdir(dir);
if (entries.length === 0) { if (entries.length === 0) {
await fs.promises.rm(dir); await fs.promises.rm(dir, { recursive: true });
} }
} catch { } catch {
// ignore cleanup errors // ignore cleanup errors