API Reference
SearchBackend
Defined in: tools/builtin/builtin.types.ts:183
The regex-search capability seam — implement this against your host.
Remarks
Wire it to e.g. ripgrep, a filesystem walk, or an index. Read-only by nature, so it is far less dangerous than ShellBackend, but it still touches a filesystem the core knows nothing about, hence a seam rather than a shipped implementation.
See
- SearchQuery
- SearchMatch
- searchTool which wraps this seam in a model-facing tool.
Methods
search()
search(query, ctx): Promise<SearchMatch[]>;Defined in: tools/builtin/builtin.types.ts:191
Run a regex search and return the matching lines.
Parameters
| Parameter | Type | Description |
|---|---|---|
query | SearchQuery | The search request (pattern, optional path, flags). |
ctx | ToolContext | Per-call context; ctx.signal may be used to abort the search. |
Returns
Promise<SearchMatch[]>
The matching lines found.