Module: Pikuri::Agent::Event

Defined in:
lib/pikuri/agent/event.rb

Overview

Sealed value-object hierarchy describing a single event in the Agent‘s normalized stream. Every listener consumes these through one Listener::Base#on_event entry point and pattern-matches on the variant.

Each variant is a Data.define with the minimal fields it needs; value equality and pattern-matching support come for free.

One stream, no side channels

Provider-reported token usage rides as Tokens; the detected context-window cap rides as a one-shot ContextCap emitted by #initialize; everything else maps to a turn-or-tool-call variant. Listeners override a single on_event method and case-match on the variant they care about. The per-variant docs below name the emission site for each (which Pikuri::Agent callback wires it and what payload it carries).

Defined Under Namespace

Classes: Assistant, AssistantDelta, Cancelled, ContextCap, FallbackNotice, Thinking, ThinkingDelta, Tokens, ToolCall, ToolResult, UserTurn