Class OpenCodeStatsExtractor
java.lang.Object
io.jenkins.plugins.aiagentjob.opencode.OpenCodeStatsExtractor
- All Implemented Interfaces:
AiAgentStatsExtractor
Stats extractor for OpenCode JSONL output. OpenCode reports per-step usage in "step_finish"
events with a nested "part" object containing cost, tokens, and cache data. Values are
accumulated additively across multiple steps.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanextract(net.sf.json.JSONObject json, AgentUsageStats stats) Attempt to extract usage statistics from a single JSON line.
-
Field Details
-
INSTANCE
-
-
Method Details
-
extract
Description copied from interface:AiAgentStatsExtractorAttempt to extract usage statistics from a single JSON line.- Specified by:
extractin interfaceAiAgentStatsExtractor- Parameters:
json- the parsed JSON object for this linestats- the stats accumulator to update- Returns:
trueif this extractor handled the line,falseto fall through to the shared extractor
-