pub enum Op {
Show 19 variants
SendMessage {Show 14 fields
content: String,
mode: TurnLoopMode,
model: String,
goal_objective: Option<String>,
reasoning_effort: Option<String>,
reasoning_effort_auto: bool,
auto_model: bool,
allow_shell: bool,
trust_mode: bool,
auto_approve: bool,
approval_mode: ApprovalMode,
temperature: Option<f32>,
top_p: Option<f32>,
max_output_tokens: Option<u32>,
},
CancelRequest,
ApproveToolCall {
id: String,
},
DenyToolCall {
id: String,
},
SpawnSubAgent {
prompt: String,
},
ListSubAgents,
ChangeMode {
mode: TurnLoopMode,
},
SetModel {
model: String,
},
SetCompaction {
config: CompactionConfig,
},
SyncSession {
messages: Vec<Message>,
system_prompt: Option<SystemPrompt>,
model: String,
workspace: PathBuf,
},
ApplyKernelResume {
hints: KernelResumeHints,
},
CompactContext,
Rlm {
content: String,
model: String,
child_model: String,
max_depth: u32,
},
EditLastTurn {
new_message: String,
},
TruncateBeforeLastUserMessage {
reply: Sender<bool>,
},
QueryContext {
reply: Sender<ThreadContextSnapshot>,
},
QueryHarnessTaskGraph {
reply: Sender<Value>,
},
QueryHarnessCycles {
reply: Sender<Value>,
},
Shutdown,
}Expand description
Operations that can be submitted to the engine.
Variants§
SendMessage
Send a message to the AI.
Fields
mode: TurnLoopModereasoning_effort: Option<String>Reasoning-effort tier: "off" | "low" | "medium" | "high" | "max".
None lets the provider apply its default.
reasoning_effort_auto: boolTrue when the user selected auto thinking, even though the UI sends a concrete per-turn value to the model API.
approval_mode: ApprovalModeCancelRequest
Cancel the current request.
ApproveToolCall
Approve a tool call that requires permission.
DenyToolCall
Deny a tool call that requires permission.
SpawnSubAgent
Spawn a sub-agent.
ListSubAgents
List current sub-agents and their status.
ChangeMode
Change the operating mode.
Fields
mode: TurnLoopModeSetModel
Update the model being used.
SetCompaction
Update auto-compaction settings.
Fields
config: CompactionConfigSyncSession
Sync engine session state (used for resume/load).
ApplyKernelResume
Restore kernel turn frame from persisted event-log projection (Phase 3b 6e).
Fields
hints: KernelResumeHintsCompactContext
Run context compaction immediately.
Rlm
Run a Recursive Language Model (RLM) turn per Algorithm 1 of
Zhang et al. (arXiv:2512.24601). The prompt is stored in the REPL
as context; the root LLM only sees metadata.
Fields
EditLastTurn
Edit the last user message: remove the last user+assistant exchange from the session, then re-send with the new content.
TruncateBeforeLastUserMessage
Drop the last user message and everything after it (#383 /edit, F4 HTTP).
QueryContext
Return a TUI-aligned context usage snapshot (Zagens / runtime API).
Fields
reply: Sender<ThreadContextSnapshot>QueryHarnessTaskGraph
Return derived LHT task graph JSON (GET …/harness/task-graph).
QueryHarnessCycles
Return cycle briefings + archive summaries (GET …/harness/cycles).
Shutdown
Shutdown the engine.