Class LogFormatUtils

java.lang.Object
io.jenkins.plugins.aiagentjob.LogFormatUtils

public final class LogFormatUtils extends Object
Shared utility methods used by agent-specific log format classes. Provides JSON field extraction, text normalization, and tool input/output helpers.
  • Method Details

    • firstNonEmpty

      public static String firstNonEmpty(net.sf.json.JSONObject json, String... keys)
    • normalize

      public static String normalize(String value)
    • capitalize

      public static String capitalize(String s)
    • excerpt

      public static String excerpt(String text, int maxLen)
    • extractText

      public static String extractText(net.sf.json.JSONObject json)
    • joinTextArray

      public static String joinTextArray(net.sf.json.JSONArray array)
    • extractToolInput

      public static String extractToolInput(net.sf.json.JSONObject input, String toolName)
    • extractToolResultContent

      public static String extractToolResultContent(net.sf.json.JSONObject json)
    • isToolCall

      public static boolean isToolCall(String typeLower, net.sf.json.JSONObject json)
    • isToolResult

      public static boolean isToolResult(String typeLower, net.sf.json.JSONObject json)