LemonCliRunners. Types
(lemon_cli_runners v0.1.0)
View Source
Core type definitions for CLI-based subprocess runners.
This module provides the unified event types used by all CLI runners (Codex, Claude, etc.) to communicate with the rest of the system.
Event Types
ResumeToken- Session identifier for resuming interrupted sessionsAction- A discrete action performed by the CLI agentStartedEvent- Emitted when a session beginsActionEvent- Emitted for action lifecycle (started/updated/completed)CompletedEvent- Emitted when a session ends
Design Philosophy
These types mirror the Takopi project's event model, enabling:
- Unified event handling across different CLI tools
- Session persistence and resumption
- Progress tracking and UI updates
Summary
Types
Kind of action being performed.
Severity level for action messages.
Phase of an action's lifecycle.
Union of all CLI runner event types.
Types
@type action_kind() ::
:command
| :tool
| :file_change
| :web_search
| :subagent
| :note
| :turn
| :warning
| :telemetry
Kind of action being performed.
:command- Shell command execution:tool- Tool/MCP call:file_change- File modification:web_search- Web search:subagent- Subagent invocation:note- Informational note:turn- Conversation turn marker:warning- Warning message:telemetry- Telemetry/metrics
@type action_level() :: :debug | :info | :warning | :error
Severity level for action messages.
@type action_phase() :: :started | :updated | :completed
Phase of an action's lifecycle.
:started- Action has begun:updated- Action is in progress with new information:completed- Action has finished
@type cli_event() :: LemonCliRunners.Types.StartedEvent.t() | LemonCliRunners.Types.ActionEvent.t() | LemonCliRunners.Types.CompletedEvent.t()
Union of all CLI runner event types.