NAME
Langertha::Raider::Plugin::Events - Report a raid's tool calls and results as machine-output events
VERSION
version 0.503
SYNOPSIS
my $raider = Langertha::Raider->new(
engine => $engine,
plugins => [ '+Langertha::Raider::Plugin::Events' => {
on_event => sub { my ( $type, %payload ) = @_; ... },
} ],
);
DESCRIPTION
The source of the tool.call and tool.result events of a raid: the output of raider --stream-json and its siblings (ADR 0013) and the session journal (ADR 0015) are both fed from here. Every tool call the raid makes is handed to "on_event" twice: before it runs, with its name and arguments, and after, with the outcome and the whole text of its result -- a consumer that shows less (the stream) cuts it itself.
Load it after any plugin that may skip or rewrite a tool call, so the events describe the call that actually runs.
on_event
Code reference called as $on_event->($type, %payload). Required.
tool.call--call(the id of the call within the raid:c1,c2, ...),name,argumentsandstatus(dispatched).tool.result--call(the id of itstool.call),name,status(cancelledfor a call cut off by "cancel" in Langertha::Raider,failedwhen the tool reported an error, elsesucceeded),ok(the same as a boolean),size(characters of the text) andcontent(the whole text).
SEE ALSO
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/langertha-raider/issues.
IRC
Join #langertha on irc.perl.org or message Getty directly.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.