12 · 18 extension points
Where new behavior goes
For everything you might want to add there is a specific place, and it is documented.
The project maintains a map of goals and mechanisms. You want to add a model provider, a new tool, a permission policy, a command, background work, an integration with your editor. For each one there is a specific documented place.
On this site that map is a lookup, generated from the same file that feeds the rest of the section, so it cannot drift from the repository.
The group that gets used most
The tool pipeline deserves a mention of its own because it is where most people hook in and where it is easiest to get things wrong.
| Point | What for | Can it change things |
|---|---|---|
| Before running | Decide whether a tool may run | yes, it blocks it |
| Around | Wrap execution with a timeout, a retry or a measurement | yes, it wraps it |
| After | Transform the result before returning it | yes, the result |
| Observe | Find out what is happening | no, it only watches |