aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/aflow/tool
Commit message (Collapse)AuthorAgeFilesLines
* syz-agent: systematically show verbose error messagesDmitry Vyukov10 days1-1/+1
| | | | | | | | | | | | | Currently we added custom code to kernel build action, and few others to expose verbose errors from executed binaries (notably make). But lots of other binary executions missing this logic, e.g. for git failure we currently see unuseful: failed to run ["git" "fetch" "--force" "--tags" exit status 128 Instead of adding more and more custom code to do the same, remove the custom code and always add verbose output in syz-agent and tools/syz-aflow.
* pkg/aflow/tool/grepper: disable tests on non-linuxDmitry Vyukov10 days1-0/+3
| | | | | | | | | The tests fail on OpenBSD with: expected: "bad expression: fatal: command line, 'bad expression (': Unmatched ( or \\(" actual : "bad expression: fatal: command line, 'bad expression (': parentheses not balanced" Disable the tests on non-linux for now.
* pkg/aflow: ensure we don't register MCP tools with duplicate namesDmitry Vyukov11 days1-1/+1
| | | | | | | If we have duplicate names, then only one of the duplicates will be used at random. Add a check that we don't have duplicate names. Currently it's only "crash-reproducer" (both action and a tool). Also ignore "set-results" tool, and all tools created in tests.
* pkg/aflow/tool/syzlang: add the `read-description` toolAlexander Potapenko12 days2-0/+34
| | | | | | | | | | | Adds a tool that allows an agent to read the content of syzlang description files (e.g., `sys.txt`, `socket.txt`). Providing the ability to fetch exact system call definitions helps reasoning models generate correct and compiling programs from crash reports. Update #6878
* pkg/aflow: add Reproduce toolTaras Madan12 days2-0/+87
|
* pkg/aflow/tool/syzlang: provide list of description filesDmitry Vyukov2026-03-052-0/+37
| | | | Update #6878
* pkg/aflow/tool/codesearcher: add end-to-end testsDmitry Vyukov2026-02-192-16/+69
| | | | Update #6811
* pkg/aflow/tool/grepper: fix grep invocationDmitry Vyukov2026-02-062-8/+21
| | | | | If LLM searches for "->", grep considered it as a flag and failed. Add "--" before the expression to fix such cases.
* 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/aflow/tool/grepper: add the toolDmitry Vyukov2026-02-022-0/+161
| | | | | | Add a tool that executes git grep with the given expression. It can handle long tail of cases that codesearcher can't handle, while still providing less output than reading whole files.
* pkg/aflow: abstract away LLM temperatureDmitry Vyukov2026-02-021-1/+1
| | | | | | | | | | Introduce abstract "task type" for LLM agents instead of specifying temperature explicitly for each agent. This has 2 advantages: - we don't hardcode it everywhere, and can change centrally as our understanding of the right temperature evolves - we can control other LLM parameters (topn/topk) using task type as well Update #6576
* 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/aflow/flow/patching: harden against empty generated patchesDmitry Vyukov2026-01-272-2/+25
| | | | | | | | Make codeeditor error on nop changes that don't actually change the code. Make patch testing error on empty patch. Perhaps we need a notion of "mandatory" tools that must be called successfully at least once... not sure yet.
* pkg/codesearch: support finding field reads/writesDmitry Vyukov2026-01-261-1/+4
|
* pkg/aflow/tool/codeeditor: add actual implementationDmitry Vyukov2026-01-262-18/+252
|
* pkg/aflow: add helper for tool testingDmitry Vyukov2026-01-262-1/+93
| | | | Add simple codeeditor tests to test testing.
* pkg/aflow/tool/codeeditor: add packageDmitry Vyukov2026-01-231-0/+37
| | | | | Code editing tool stub. Update #6470
* pkg/aflow/tool/researcher: add researching LLM toolDmitry Vyukov2026-01-231-0/+44
| | | | | It can answer complex questions about kernel, and provide a concise answer to other LLMs.
* 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