Class KiroLogFormat

java.lang.Object
io.jenkins.plugins.aiagentjob.kiro.KiroLogFormat
All Implemented Interfaces:
AiAgentLogFormat

public final class KiroLogFormat extends Object implements AiAgentLogFormat
Classifies Kiro CLI output: session JSONL, ACP JSON-RPC, and plain-text headless lines.
  • Field Details

  • Method Details

    • classify

      public AiAgentLogParser.ParsedLine classify(long lineNumber, net.sf.json.JSONObject json)
      Description copied from interface: AiAgentLogFormat
      Attempt to classify a single JSON object into a parsed event.
      Specified by:
      classify in interface AiAgentLogFormat
      Parameters:
      lineNumber - 1-based line number in the raw log file
      json - the parsed JSON object for this line
      Returns:
      a classified AiAgentLogParser.ParsedLine, or null if this format does not handle the given JSON structure
    • classifyAll

      public List<AiAgentLogParser.ParsedLine> classifyAll(long lineNumber, net.sf.json.JSONObject json)
      Description copied from interface: AiAgentLogFormat
      Attempt to classify a JSON object that may contain multiple displayable events.

      Implementations that emit at most one event can rely on this default. Returning null still means the format did not recognize the input; an empty list means it recognized the input but intentionally produced no visible events.

      Specified by:
      classifyAll in interface AiAgentLogFormat
    • classifyRaw

      public List<AiAgentLogParser.ParsedLine> classifyRaw(long lineNumber, String line)
      Description copied from interface: AiAgentLogFormat
      Attempt to classify a non-JSON log line (raw text) into a parsed event.

      Implementations that handle non-JSON text lines (e.g. ANSI-colored > prefixed headless output) should override this method. The default returns null, meaning the line should be kept as-is.

      Specified by:
      classifyRaw in interface AiAgentLogFormat
      Parameters:
      lineNumber - 1-based line number in the raw log file
      line - the raw (non-JSON) text line
      Returns:
      a list of classified lines, or null if this format does not handle raw text