mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
`ruflo memory init` previously emitted `[ERROR] Database already exists. Use --force to reinitialize.` and a "Initialization failed" spinner whenever `.swarm/memory.db` was already on disk — even though the existing DB was perfectly healthy and there was nothing to fail. This made the command awkward to script (callers had to either probe disk first or invoke `--force` and lose data) and confused users who read `[ERROR]` as something actually being wrong. Treat the "DB exists, no --force" case as a successful no-op: - `MemoryInitResult` gains an optional `alreadyExists?: boolean` flag - The early-return branch now returns `success: true, alreadyExists: true` - `memory init` CLI prints `Memory database already initialized at <path>` with a hint about `--force`, exits 0 - MCP-side callers (`mcp-server.ts`, `mcp-tools/memory-tools.ts`) that only check `result.success` continue to work — they previously treated this case as a failure, now they see the existing DB as ready, which matches their intent Closes #1791 (sub-bug 6).