Class ClaudeCodeLogFormat
java.lang.Object
io.jenkins.plugins.aiagentjob.claudecode.ClaudeCodeLogFormat
- All Implemented Interfaces:
AiAgentLogFormat
Format-specific log classification for Claude Code stream-json output. Handles content arrays
(tool_use, tool_result, thinking, text) and stream_event deltas.
Used by both ClaudeCodeAgentHandler and GeminiCliAgentHandler since they
share the same stream-json format.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionclassify(long lineNumber, net.sf.json.JSONObject json) Attempt to classify a single JSON object into a parsed event.static AiAgentLogParser.ParsedLineclassifyContentArray(long lineNumber, String parentType, net.sf.json.JSONArray contentArr, String rawDetails) static AiAgentLogParser.ParsedLineclassifyStreamEvent(long lineNumber, net.sf.json.JSONObject event, String rawDetails)
-
Field Details
-
INSTANCE
-
-
Method Details
-
classify
Description copied from interface:AiAgentLogFormatAttempt to classify a single JSON object into a parsed event.- Specified by:
classifyin interfaceAiAgentLogFormat- Parameters:
lineNumber- 1-based line number in the raw log filejson- the parsed JSON object for this line- Returns:
- a classified
AiAgentLogParser.ParsedLine, ornullif this format does not handle the given JSON structure
-
classifyContentArray
public static AiAgentLogParser.ParsedLine classifyContentArray(long lineNumber, String parentType, net.sf.json.JSONArray contentArr, String rawDetails) -
classifyStreamEvent
public static AiAgentLogParser.ParsedLine classifyStreamEvent(long lineNumber, net.sf.json.JSONObject event, String rawDetails)
-