fix(deepagents): grep/glob match when path points directly at a file (#713)
## Summary - `grep`/`glob` on `StateBackend`/`StoreBackend` returned zero matches whenever `path` pointed at an exact file (no glob) — the shared `validatePath` helper forced a trailing `/` before prefix-matching, so a file's own key could never match itself+`/`. - Added a `filterFilesByPath` helper that checks for an exact key match in the files map first, falling back to the existing directory-prefix behavior otherwise. ## Test plan - [x] Added regression tests in `utils.test.ts`: exact-file path (no glob) for grep and glob, plus directory + glob/filename non-regression cases for both. - [x] `pnpm --filter deepagents test` — all tests pass.
G
gethin-langchain committed
ffec5de0e66ed5ab64bc4c6bee2ff90effb4bfa1
Parent: bed2d34
Committed by GitHub <noreply@github.com>
on 7/31/2026, 7:54:11 AM