aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/aflow/tool/codesearcher/codesearcher.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/aflow/tool/codesearcher: add end-to-end testsDmitry Vyukov2026-02-191-16/+24
| | | | Update #6811
* syz-agent: wipe codesearch binaryDmitry Vyukov2026-02-061-5/+4
| | | | Now it's compiled into the syz-agent binary itself.
* tools/clang: compile clang tools into the binaryDmitry Vyukov2026-02-061-1/+2
| | | | | | | | | | | | | | | | | | Compiled clang tools into Go binaries using cgo. This significantly simplifies building and deployment. This also enables unit testing of clang tools. Now raw go test for clang tools will build them, run, and verify output. Each clang tool is still started as a subprocess. I've experimented with running them in-process, but this makes stdout/stderr interception extremly complicated, and it seems that clang tools still use unsynchronized global state, which breaks when invoked multiple times. Subprocesses also make it safer in the face of potential memory leaks, or memory corruptions in clang tools. Fixes #6645
* pkg/codesearch: expose struct layout in codesearchTamas Koczka2026-01-281-0/+42
| | | | | | | | | | - Extract struct field offsets and sizes in the C++ codesearch indexer. - Add 'fields' to the JSON definition output. - Update pkg/codesearch to parse and expose the new field information. - Add 'struct-layout' command to syz-codesearch for debugging. - Add 'codesearch-struct-layout' tool to pkg/aflow/tool/codesearcher/ to allow LLM agents to query struct memory layout and map byte offsets to fields. - Support pointer marshaling for optional JSON values (e.g. *uint)
* pkg/codesearch: support finding field reads/writesDmitry Vyukov2026-01-261-1/+4
|
* pkg/aflow/tool/codesearcher: take into account DB format when cachingDmitry Vyukov2026-01-211-2/+2
| | | | | | If format of the codesearch DB file changes, we need to create new DB rather than use old cached one. Add DB format hash to cache signature.
* pkg/codesearch: support searching for referencesDmitry Vyukov2026-01-211-5/+45
| | | | | | | | | Extend codesearch clang tool to export info about function references (calls, takes-address-of). Add pkg/codesearch command find-references. Export find-references in pkg/aflow/tools/codesearcher to LLMs. Update #6469
* pkg/aflow: add BadCallErrorDmitry Vyukov2026-01-201-27/+12
| | | | | | | | | | The error allows tools to communicate that an error is not an infrastructure error that must fail the whole workflow, but rather a bad tool invocation by an LLM (e.g. asking for a non-existent file contents). Previously in the codesearcher tool we used a separate Missing bool to communicate that. With the error everything just becomes cleaner and nicer. The errors also allows all other tools to communicate any errors to the LLM when the normal results cannot be provided and don't make sense.
* pkg/codesearch: add read-file commandDmitry Vyukov2026-01-201-0/+23
| | | | Just provides full file contents as last resort.
* pkg/codesearch: add dir-index commandDmitry Vyukov2026-01-201-0/+24
| | | | | dir-index provides a list of subdirectories and files in the given directory in the source tree.
* pkg/aflow/tool/codesearcher: add packageDmitry Vyukov2026-01-091-0/+171