Expand description
RPC mode: commands read from stdin and the responses written to stdout, as
in modes/rpc/rpc-types.ts of pi v1.0.0. Events use the JSON mode shapes
in crate::event.
Structs§
- Bash
Result - What a user
!command produced: thebashresponse data. - Context
Usage - How full the context window is;
tokensandpercentarenullwhile unknown. - Extension
UiResponse - An
extension_ui_responseline on stdin. - Fork
Message - A fork point in
get_fork_messagesdata. - Session
State get_statedata.- Session
Stats get_session_statsdata.- Slash
Command - A command a prompt can invoke, in
get_commandsdata. - Source
Info - Where a resource was found, as pi’s
SourceInfo:sourceisautofor discovered files,clifor command-line paths and the package for package resources;scopeisuser,projectortemporary. - Token
Totals - Token totals in
SessionStats. - Tree
Node - One node of
get_treedata, as pi’sSessionTreeNode.
Enums§
- Command
Source - Where a
SlashCommandcomes from. - Prompt
Disposition - What became of a prompt once it passed preflight.
- RpcCommand
- A command line on stdin, without its
id. - Streaming
Behavior - How a prompt sent while the agent runs is queued.
Functions§
- response_
line - A response line:
datais serialized JSON, or absent. A line without atypegets a response withoutcommand, asJSON.stringifydrops pi’sundefined. - tree_
json - Serializes the trees under
rootswithout recursion, so a long linear session cannot exhaust the stack.