feat(memory): add explicit paths config for memory search

Add a `paths` option to `memorySearch` config, allowing users to
explicitly specify additional directories or files to include in
memory search.

Follow-up to #2961 as suggested by @gumadeiras — instead of auto-following
symlinks (which has security implications), users can now explicitly
declare additional search paths.

- Add `memorySearch.paths` config option (array of strings)
- Paths can be absolute or relative (resolved from workspace)
- Directories are recursively scanned for `.md` files
- Single `.md` files can also be specified
- Paths from defaults and agent overrides are merged
- Added 4 test cases for listMemoryFiles
This commit is contained in:
Kira
2026-01-28 17:08:17 -05:00
committed by Gustavo Madeira Santana
parent b717724275
commit 0fd9d3abd1
9 changed files with 13334 additions and 5 deletions

View File

@@ -226,6 +226,8 @@ export type MemorySearchConfig = {
enabled?: boolean;
/** Sources to index and search (default: ["memory"]). */
sources?: Array<"memory" | "sessions">;
/** Additional paths to include in memory search (directories or .md files). */
paths?: string[];
/** Experimental memory search settings. */
experimental?: {
/** Enable session transcript indexing (experimental, default: false). */