Skip to main content

Op

Enum Op 

Source
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).

Fields

§message: String
§images: Vec<Value>
§

PromptAndWait

Start a run and answer when it ends ({accepted, operationId, error}), as the agent controller does.

Fields

§message: String
§images: Vec<Value>
§

Enqueue

Queue a message (as entry_id when the client chose it); answers its entry id.

Fields

§message: String
§images: Vec<Value>
§entry_id: Option<String>
§

CancelQueued

Drop one queued message; answers whether it was queued.

Fields

§entry_id: String
§

ClearQueue

Empty the queues: {steering, followUp} texts.

§

Abort

§

State

§

AvailableModels

§

SetModel

Fields

§provider: String
§model_id: String
§

CycleModel

§

ThinkingLevels

§

SetThinking

Fields

§level: String
§

CycleThinking

§

SetQueueMode

Fields

§mode: String
§

Compact

Fields

§instructions: Option<String>
§

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).

Fields

§theme: String
§

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.

Fields

§command: String
§exclude: bool
§

AbortBash

§

BugSummary

/bug’s summary written by the session’s model (AgentSession summarizeForBugReport): the report text.

Fields

§

AbortBugSummary

Cancel the bug report summary in progress (its loader’s Esc).

§

ShareContext

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.

Fields

§custom_type: String
§data: Value
§

Stats

§

ForkMessages

§

Entries

Fields

§

Tree

§

LastAssistantText

§

SetName

Fields

§name: String
§

Messages

§

ForkSource

The text of the user message entry_id, which a fork starts before (an error for any other entry).

Fields

§entry_id: String
§

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).

Fields

§target: String
§

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.

§

Navigate

Move main’s tip to target_id (None: the root), optionally summarizing the branch left (/tree), and label the target (or the branch summary).

Fields

§target_id: Option<String>
§summarize: bool
§instructions: Option<String>
§

SetLabel

Label a tree entry (None removes the label).

Fields

§entry_id: String
§

KillAgent

Cancel a subagent and its unfinished descendants (the agent hub’s kill).

Fields

§

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}.

Fields

§message: String
§

ReviveAgent

Start an interrupted subagent again from its brief (the agent hub’s revive); answers {id, revived}.

Fields

§

AgentTranscript

A subagent’s transcript (agents.transcript): {id, busy, messages}, its child conversation’s messages.

Fields

§

Goal

/goal <args>: the session goal’s command (set, pause, resume, clear, check); answers its text.

Fields

§args: String
§

Observer

Fields

§args: String
§

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}.

Fields

§message: String
§

ConversationInput

Give conversation id another input (queued while it runs).

Fields

§id: u64
§message: String
§

Conversations

Conversation id: {id, busy, messages: [{role, text}]}; without an id, every root conversation’s.

Fields

§

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.

Fields

§request: String
§payload: Value
§

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.

Fields

§entry_id: Option<String>
§checkpoint: Option<String>
§

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}.

Fields

§due: i64
§

ScheduleCancel

Cancel the active schedule id (or name); answers it.

Fields

§

Persona

/persona on|off|auto (empty: report): the session’s own persona toggle over the settings’ (resources::keep_going). Answers {text, persona, effective, keepGoing}.

Fields

§args: String
§

KeepGoing

/keepgoing on|off (empty: report): the session’s keep-going mode. Answers as Op::Persona.

Fields

§args: String
§

ContinueFrom

/continue: this new session continues session session by searching its log (crate::continuation). Answers {session, name}.

Fields

§session: String

Implementations§

Source§

impl Op

Source

pub fn from_json(value: &Value) -> Result<Op, String>

The operation a JSON request names ({op, ...}), as clients send it over the worker’s control service.

Source

pub fn to_json(&self) -> Value

The JSON request for this operation (Op::from_json reads it back).

Trait Implementations§

Source§

impl Clone for Op

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Op

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&Op> for Value

The JSON request a client sends for an operation (Op::to_json).

Source§

fn from(op: &Op) -> Value

Converts to this type from the input type.
Source§

impl PartialEq for Op

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Op

Auto Trait Implementations§

§

impl Forget for Op

§

impl Freeze for Op

§

impl Move for Op

§

impl RefUnwindSafe for Op

§

impl Send for Op

§

impl Sync for Op

§

impl Unpin for Op

§

impl UnsafeUnpin for Op

§

impl UnwindSafe for Op

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more