Class CodexStatsExtractor

java.lang.Object
io.jenkins.plugins.aiagentjob.codex.CodexStatsExtractor
All Implemented Interfaces:
AiAgentStatsExtractor

public final class CodexStatsExtractor extends Object implements AiAgentStatsExtractor
Stats extractor for Codex CLI JSONL output. Codex reports usage in "turn.completed" events with a nested "usage" object.
  • Field Details

  • Method Details

    • extract

      public boolean extract(net.sf.json.JSONObject json, AgentUsageStats stats)
      Description copied from interface: AiAgentStatsExtractor
      Attempt to extract usage statistics from a single JSON line.
      Specified by:
      extract in interface AiAgentStatsExtractor
      Parameters:
      json - the parsed JSON object for this line
      stats - the stats accumulator to update
      Returns:
      true if this extractor handled the line, false to fall through to the shared extractor