pub enum Op {
Show 61 variants
Prompt {
message: String,
images: Vec<Value>,
queue: Option<QueueKind>,
},
PromptAndWait {
message: String,
images: Vec<Value>,
},
Enqueue {
kind: QueueKind,
message: String,
images: Vec<Value>,
entry_id: Option<String>,
},
CancelQueued {
entry_id: String,
},
ClearQueue,
Abort,
State,
AvailableModels,
SetModel {
provider: String,
model_id: String,
},
CycleModel,
ThinkingLevels,
SetThinking {
level: String,
},
CycleThinking,
SetQueueMode {
kind: QueueKind,
mode: String,
},
Compact {
instructions: Option<String>,
},
SetAutoCompaction(bool),
SetAutoRetry(bool),
SetTerminalTheme {
theme: String,
},
AbortRetry,
Bash {
command: String,
exclude: bool,
id: Option<String>,
},
AbortBash,
BugSummary {
hint: Option<String>,
},
AbortBugSummary,
ShareContext,
AppendCustom {
custom_type: String,
data: Value,
},
Stats,
ForkMessages,
Entries {
since: Option<String>,
},
Tree,
LastAssistantText,
SetName {
name: String,
},
Messages,
ForkSource {
entry_id: String,
},
CloneSource,
Forked {
target: String,
},
Describe,
LaneSnapshot,
ListSessions,
Recover,
Agents,
Navigate {
target_id: Option<String>,
summarize: bool,
instructions: Option<String>,
label: Option<String>,
},
SetLabel {
entry_id: String,
label: Option<String>,
},
KillAgent {
id: String,
},
SteerAgent {
id: String,
message: String,
},
ReviveAgent {
id: String,
},
AgentTranscript {
id: String,
},
Goal {
args: String,
},
Observer {
args: String,
},
StartConversation {
message: String,
},
ConversationInput {
id: u64,
message: String,
},
Conversations {
id: Option<u64>,
},
AsyncPending,
Inspect {
request: String,
payload: Value,
},
Commands,
Checkpoints,
RestoreFiles {
entry_id: Option<String>,
checkpoint: Option<String>,
},
ScheduleFire {
id: String,
due: i64,
},
ScheduleCancel {
id: String,
},
Persona {
args: String,
},
KeepGoing {
args: String,
},
ContinueFrom {
session: String,
},
}Expand description
The operations a client sends (the commands of rpc-native.ts the session worker serves, and the agent
controller’s members). Session selection (new, switch, fork, clone) is the server’s: clients re-attach.
Variants§
Prompt
Start a run; with a run in progress the message joins queue (none: refused).
PromptAndWait
Start a run and answer when it ends ({accepted, operationId, error}), as the agent controller does.
Enqueue
Queue a message (as entry_id when the client chose it); answers its entry id.
CancelQueued
Drop one queued message; answers whether it was queued.
ClearQueue
Empty the queues: {steering, followUp} texts.
Abort
State
AvailableModels
SetModel
CycleModel
ThinkingLevels
SetThinking
CycleThinking
SetQueueMode
Compact
SetAutoCompaction(bool)
SetAutoRetry(bool)
SetTerminalTheme
The terminal appearance the attached TUI detected ("light" / "dark": OSC 11, a scheme report, else its
COLORFGBG): what diagram.mermaid’s auto theme follows (crate::compose::Config::terminal_theme).
AbortRetry
Bash
A user’s own command (RPC bash, the TUI’s !/!!), run by the shell.
id tags its streamed output (bash_execution_update), as AgentSession’s executeBash options.id.
AbortBash
BugSummary
/bug’s summary written by the session’s model (AgentSession summarizeForBugReport): the report text.
AbortBugSummary
Cancel the bug report summary in progress (its loader’s Esc).
What a shared or reported session carries besides its entries (session-share.ts
createShareTrailingEntries): { systemPrompt, tools: [{ name, description, parameters }] }.
AppendCustom
sessionManager.appendCustomEntry(customType, data) (/bug records its report): after the run in progress.
Stats
ForkMessages
Entries
Tree
LastAssistantText
SetName
Messages
ForkSource
The text of the user message entry_id, which a fork starts before (an error for any other entry).
CloneSource
The current Pi leaf (an error without one), which a clone copies to.
Forked
Record the session-start marker in the forked session file target (control.forked), as TypeScript
records it: its first worker removes it (TypeScript’s tells its extensions the session started as a fork).
Describe
The whole session as the TUI shows it: {sessionId, sessionFile, name, messages, model, thinkingLevel}.
LaneSnapshot
The main lane’s snapshot as transcript state starts from (Core::snapshot): what a watcher rebases on after
a navigation, which its events cannot fold.
ListSessions
Sessions of this working directory, newest first ({path, id, name, modified, messageCount, firstMessage, allMessagesText, cwd}).
Recover
Continue what a dead worker left (crate::recovery): the first queued message runs, else an interrupted run
continues. Answers {resumed, runId, reason, recovered}; nothing starts while a run is in progress.
Agents
The subagents of the root lane (rlm.list_subagents as the root sees them: {subagents: [...]}), for the
TUI’s agent hub.
Move main’s tip to target_id (None: the root), optionally summarizing the branch left (/tree), and
label the target (or the branch summary).
SetLabel
Label a tree entry (None removes the label).
KillAgent
Cancel a subagent and its unfinished descendants (the agent hub’s kill).
SteerAgent
Steer a subagent with message (the agent hub’s steer: agent_message.send from the root lane with
receiver_role: "child" and steer: true); answers the family module’s {id, duplicate, state, steered}.
ReviveAgent
Start an interrupted subagent again from its brief (the agent hub’s revive); answers {id, revived}.
AgentTranscript
A subagent’s transcript (agents.transcript): {id, busy, messages}, its child conversation’s messages.
Goal
/goal <args>: the session goal’s command (set, pause, resume, clear, check); answers its text.
Observer
StartConversation
Start another root conversation in the session’s durable runtime with message (Pi Durable’s ownerless
conversations: each runs, survives restarts and resumes on its own); answers {conversationId}.
ConversationInput
Give conversation id another input (queued while it runs).
Conversations
Conversation id: {id, busy, messages: [{role, text}]}; without an id, every root conversation’s.
AsyncPending
Root-owned work whose completion may still re-invoke the root (async.pending): running jobs and subagents
of the root lane, events waiting for delivery, a run in progress.
Inspect
A read-only inspection request (crate::inspect: agents.status, memory.list, rlm.frames, …) answered
by the session’s host stack as the root lane’s; anything else is refused.
Commands
The session’s slash commands (RPC get_commands: crate::commands).
Checkpoints
The session’s working-tree checkpoints (core::checkpoints): {checkpoints: [...], enabled}.
RestoreFiles
Restore the working tree’s files from checkpoint checkpoint, else from the checkpoint of entry entry_id
(the start of its turn), saving the current files as another checkpoint first.
ScheduleFire
Run scheduled prompt id for its slot due (the server’s timer, crates/daemon prompt_schedules): the
prompt starts a run, or waits for the run in progress to end (core::schedule_ops). Answers
{fired, run, schedules}.
ScheduleCancel
Cancel the active schedule id (or name); answers it.
Persona
/persona on|off|auto (empty: report): the session’s own persona toggle over the settings’
(resources::keep_going). Answers {text, persona, effective, keepGoing}.
KeepGoing
/keepgoing on|off (empty: report): the session’s keep-going mode. Answers as Op::Persona.
ContinueFrom
/continue: this new session continues session session by searching its log (crate::continuation).
Answers {session, name}.