gatelineAPI reference
  • Sums a numeric dotted-path field across events — e.g. opencode emits one step_finish per agent turn, each carrying that turn's own cost/tokens, not a running total, so a multi-turn dispatch (any real tool use) needs every matching line added together. Returns null iff the path itself is unset, or no event had a numeric value there — distinct from a real measured 0.

    Parameters

    • events: unknown[]
    • Optionalpath: string

    Returns null | number