ReadonlyapiReadonlydescriptionReadonlyhandlersReadonlynameReadonlyversionAn AI function is about to be asked: its instruction, sections, model, settings, tools.
Which earlier turns a turn is shown, and sections about them.
Its manifest, as data: name, version, api, the hooks it uses (by the contract's names).
The escape hatch: replace the provider request (the call is then not replayable).
A tool is about to run: change its input, block it, or ask a person (event.ask()).
A tool ran: change what the model is shown.
A conversation's turn ended (hears only; may keep entries in its conversation).
A conversation's turn is about to be recorded: may replace its inputs.
A named, versioned set of hooks.
nameis lower-case letters, digits,_and-(its changes and entries are named by it);versionits own, recorded with every change;apithe plugin API it was written for (1). Register handlers withon(hook, fn)or the hook's own method (.toolCall(fn), chainable); each is given an event and returns a change, or nothing.