Skip to content

feat(fs): restore SearchCapable/SearchProvider traits#779

Merged
chaliy merged 1 commit intomainfrom
claude/revert-search-traits-IwqLE
Mar 20, 2026
Merged

feat(fs): restore SearchCapable/SearchProvider traits#779
chaliy merged 1 commit intomainfrom
claude/revert-search-traits-IwqLE

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Mar 20, 2026

Summary

Test plan

  • 20 unit tests covering: mock provider, capabilities, runtime discovery, edge cases (error results, path-scoped providers, limited capabilities), clone/debug impls
  • 1 doctest with full SearchCapable implementation example
  • cargo fmt --check clean
  • cargo clippy --all-targets --all-features -- -D warnings clean
  • All 2099 lib tests pass

Reverts the removal from #755 and restores the SearchCapable/SearchProvider
traits as public API surface. These traits allow filesystem implementations
to provide indexed search, with grep builtin checking at runtime and falling
back to linear scan when unavailable.

- Restore fs/search.rs with SearchCapable, SearchProvider, SearchQuery,
  SearchResults, SearchMatch, SearchCapabilities types
- Re-add as_search_capable() default method on FileSystem trait
- Re-add try_indexed_search() in grep builtin for indexed search path
- Re-export all search types from lib.rs public API
- Add comprehensive tests: edge cases, error handling, path-scoped
  providers, capability variations, clone/debug impls
- Add rustdoc with full working example showing how to implement
  a custom SearchCapable filesystem

Closes #658
Reopens #739 functionality
@chaliy chaliy force-pushed the claude/revert-search-traits-IwqLE branch from 64dc993 to 9344358 Compare March 20, 2026 16:26
@chaliy chaliy merged commit 46ba5bb into main Mar 20, 2026
23 checks passed
@chaliy chaliy deleted the claude/revert-search-traits-IwqLE branch March 20, 2026 16:35
@chaliy chaliy mentioned this pull request Mar 21, 2026
5 tasks
yonas pushed a commit to yonasBSD/bashkit that referenced this pull request Mar 22, 2026
## Summary

- Bump version to 0.1.12
- Update CHANGELOG.md with 4 PRs since v0.1.11

### What's Changed

* feat(fs): restore SearchCapable/SearchProvider traits (everruns#779)
* refactor(builtins): adopt read_text_file helper across 17 builtins
(everruns#778)
* chore(skills): move repo skills under .agents (everruns#777)
* refactor(builtins): share lossy text file reads (everruns#775)

## Test plan

- [x] `cargo fmt --check` passes
- [x] `cargo clippy --all-targets --all-features -- -D warnings` passes
- [x] `cargo test --all-features` passes
- [ ] CI green on PR
- [ ] Merge triggers release.yml to create GitHub Release v0.1.12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant