Expand description
The pi --mode rpc command protocol: JSON objects on stdin (one per
line, LF-delimited), {"type":"response",...} acknowledgements and
streamed events on stdout.
Framing contract (from docs/rpc.md): split records on \n ONLY,
tolerate a trailing \r — never use a splitter that also breaks on
U+2028/U+2029, which are legal inside JSON strings.
Structs§
- Agent
State - Typed view of
get_stateresponse data. - Bash
Result - Typed view of
bashresponse data. - Image
Content - An image attached to a
prompt/steer/follow_upcommand. - Messages
- Typed view of
get_messagesresponse data. - RpcResponse
- The
{"type":"response"}acknowledgement for one command.
Enums§
- Input
Disposition - What pi did with a submitted
prompt/steer/follow_upinput (RpcResponse::disposition, pi ≥ 0.99.0). It describes the submitted input only — not independent work an extension started, and not a guarantee of completion or that a queued message stays queued. - RpcCommand
- A client → agent command. Serializes with the wire’s
typetag; the optionalidcorrelates the matchingRpcResponse. - Streaming
Behavior - How a
promptsent mid-stream should queue.