LemonCliRunners. PiSubagent
(lemon_cli_runners v0.1.0)
View Source
High-level API for using Pi (pi-coding-agent CLI) as a collaborating subagent.
Summary
Types
@type session() :: %{ pid: pid(), stream: LemonAgent.EventStream.t(), resume_token: LemonCore.ResumeToken.t() | nil, token_agent: pid() | nil, cwd: String.t() }
A Pi subagent session
@type subagent_event() :: {:started, LemonCore.ResumeToken.t()} | {:action, action :: map(), phase :: atom(), opts :: keyword()} | {:completed, answer :: String.t(), opts :: keyword()} | {:error, reason :: term()}
Normalized event from the subagent
Functions
@spec events(session()) :: Enumerable.t()
@spec resume( LemonCore.ResumeToken.t(), keyword() ) :: {:ok, session()} | {:error, term()}
@spec resume_token(session()) :: LemonCore.ResumeToken.t() | nil