feat(FN-1420): add pluggable memory backend system

- Add FileMemoryBackend with atomic writes, persistence, and conflict resolution
- Add ReadOnlyMemoryBackend for read-only/external memory management
- Add memoryBackendType setting to select backend type (file or readonly)
- Add GET /api/memory/backend endpoint to query current backend status and capabilities
- Update AGENTS.md, README.md, and docs with architecture and settings guidance
- Add memory-backend.test.ts with comprehensive tests for all backends
- Add routes.test.ts coverage for /api/memory/backend endpoint
- Fix settings parity test to include new memoryBackendType key
This commit is contained in:
gsxdsm
2026-04-11 12:13:25 -07:00
parent 12c38ef0ea
commit 18f242b2bc
12 changed files with 1316 additions and 6 deletions

View File

@@ -121,6 +121,7 @@ Defaults from `DEFAULT_PROJECT_SETTINGS`; key scope from `PROJECT_SETTINGS_KEYS`
| `insightExtractionSchedule` | `string` | `"0 2 * * *"` | Insight extraction cron schedule. |
| `insightExtractionMinIntervalMs` | `number` | `86400000` | Minimum interval between insight extraction runs (24h). |
| `memoryEnabled` | `boolean` | `true` | Enable project memory integration. |
| `memoryBackendType` | `string` | `"file"` | Memory backend type: `file` or `readonly`. |
| `runStepsInNewSessions` | `boolean` | `false` | Run each task step in a fresh agent session. |
| `maxParallelSteps` | `number` | `2` | Max concurrent step sessions (14). |
| `agentPrompts` | `object` | `undefined` | Custom agent prompt templates + role assignments. |