Package io.jenkins.plugins.aiagentjob
Class AiAgentLogParser
java.lang.Object
io.jenkins.plugins.aiagentjob.AiAgentLogParser
Parses JSONL output from AI agents into classified
AiAgentLogParser.EventView objects.
Each AiAgentTypeHandler may supply its own AiAgentLogFormat via AiAgentTypeHandler.getLogFormat(). When a format is provided, the parser first delegates to it;
if the format returns null (unrecognised line), the parser falls through to the shared
format and the generic fallback.
Built-in formats:
- Claude Code log format — Claude Code / Gemini CLI stream-json
- Codex log format — Codex CLI JSONL
- Cursor log format — Cursor Agent stream-json
- OpenCode log format — OpenCode JSONL
LogFormatUtils.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents a single conversation event for rendering in the UI.static final class -
Method Summary
Modifier and TypeMethodDescriptionstatic List<AiAgentLogParser.EventView> static List<AiAgentLogParser.EventView> parse(File rawLogFile, AiAgentLogFormat format) static AiAgentLogParser.ParsedLinestatic AiAgentLogParser.ParsedLineparseLine(long lineNumber, String line, AiAgentLogFormat format)
-
Method Details
-
parse
- Throws:
IOException
-
parse
public static List<AiAgentLogParser.EventView> parse(File rawLogFile, AiAgentLogFormat format) throws IOException - Throws:
IOException
-
parseLine
-
parseLine
public static AiAgentLogParser.ParsedLine parseLine(long lineNumber, String line, AiAgentLogFormat format)
-