LemonGateway.Engines.CliAdapter (lemon_gateway v0.1.0)

View Source

Shared CLI subprocess runner used by the Claude, Codex, Droid, Opencode, and Pi engines.

Provides common logic for starting a CLI runner process, consuming its event stream, translating LemonAgent events into plain tagged maps via LemonGateway.Event constructors, and handling cancellation and resume token formatting.

Summary

Functions

cancel(arg1)

extract_resume(engine_id, text)

format_resume(engine_id, resume_token)

is_resume_line(engine_id, line)

start_run(runner_module, engine_id, job, opts, sink_pid)

to_event_map(ev)

Translate an LemonAgent CLI runner event into a plain tagged event map.