LemonCliRunners. Types. EventFactory
(lemon_cli_runners v0.1.0)
View Source
Factory for creating CLI runner events with consistent engine identification.
The factory caches the resume token after the first started/2 call,
allowing subsequent completion events to reference it automatically.
Example
factory = EventFactory.new("codex")
# Create started event - caches the resume token
started = EventFactory.started(factory, token, title: "Codex Session")
# Create action events
action = EventFactory.action_started(factory, "cmd_1", :command, "ls -la")
# Create completed event - uses cached token
completed = EventFactory.completed_ok(factory, "Done!")
Summary
Functions
Create an action event
Create an action completed event
Create an action started event
Create an action updated event
Create a failed completion event
Create a successful completion event
Create a new event factory for an engine
Create a note event with auto-incrementing ID
Create a started event and cache the resume token
Types
@type t() :: %LemonCliRunners.Types.EventFactory{ engine: String.t(), note_seq: non_neg_integer(), resume: LemonCore.ResumeToken.t() | nil }
Functions
Create an action event
Create an action completed event
Create an action started event
Create an action updated event
Create a failed completion event
Create a successful completion event
Create a new event factory for an engine
Create a note event with auto-incrementing ID
Create a started event and cache the resume token