Skip to main content

Request

Enum Request 

Source
pub enum Request {
Show 45 variants Hello { client: String, since: Option<Seq>, token: Option<String>, epoch: Option<String>, }, Snapshot, Spawn(SpawnRequest), Prompt { session: SessionId, text: String, attachments: Vec<Attachment>, queue: bool, }, Exec { session: SessionId, command: String, }, QueueClear { session: SessionId, }, QueuePop { session: SessionId, }, Cancel { session: SessionId, }, SessionRemove { session: SessionId, force: bool, }, Handoff { session: SessionId, kind: AgentKind, model: Option<String>, effort: Option<String>, note: Option<String>, role: Option<Role>, parent: Option<ParentChange>, force: bool, }, Kill { session: SessionId, }, KillBgProc { session: SessionId, pid: Option<u32>, force: bool, }, Resume { session: SessionId, prompt: Option<String>, }, Clear { session: SessionId, force: bool, }, Sleep { session: SessionId, }, Wake { session: SessionId, }, SessionConfig { session: SessionId, model: Option<String>, effort: Option<String>, }, SessionBudget { session: SessionId, budget_usd: f64, }, McpPermission { session: SessionId, title: String, detail: String, }, ApprovalAsk { session: SessionId, tool: String, input: String, }, Permission { session: SessionId, req: String, decision: Decision, }, McpQuestion { session: SessionId, question: String, header: Option<String>, options: Vec<String>, multi_select: bool, }, AnswerQuestion { session: SessionId, id: String, answers: Vec<String>, }, BusSend { from: Option<SessionId>, to: Target, kind: MsgKind, body: String, reply_to: Option<MsgId>, }, BusInbox { session: SessionId, unread_only: bool, }, BusWait { session: SessionId, from: Option<SessionId>, reply_to: Option<MsgId>, timeout_ms: u64, }, TaskCreate { title: String, detail: String, assignee: Option<SessionId>, created_by: Option<SessionId>, depends_on: Vec<TaskId>, project_root: Option<String>, }, TaskUpdate { id: TaskId, status: Option<TaskStatus>, assignee: Option<SessionId>, detail: Option<String>, }, TaskDelete { id: TaskId, }, SessionLabel { session: SessionId, label: String, }, SessionNote { session: SessionId, note: String, }, ArtifactShare { session: SessionId, kind: ArtifactKind, path: String, note: String, }, WorktreeList, WorktreeDiff { session: SessionId, stat_only: bool, paths: Vec<String>, max_lines: Option<usize>, fold_generated: bool, }, WorktreeDiscard { session: SessionId, file: String, patch: Option<String>, }, WorktreeMerge { session: SessionId, dry_run: bool, resolve: bool, strategy: Option<MergeStrategy>, }, WorktreePr { session: SessionId, title: String, body: String, }, WorktreeGc { session: Option<SessionId>, force: bool, }, Prune { project: Option<String>, }, ReviewComment { session: SessionId, location: String, comment: String, }, WebControl { enabled: Option<bool>, addr: Option<String>, }, KeepAwake { enabled: bool, }, ListModels { kind: String, }, Shutdown, Restart,
}
Expand description

client -> daemon.

Variants§

§

Hello

Greet and (optionally) replay events after since; remote connections may include token.

Fields

§client: String
§since: Option<Seq>
§epoch: Option<String>

Daemon epoch reported on the client’s previous connection; if mismatched, daemon ignores since and sends a full snapshot.

§

Snapshot

Request a full state snapshot.

§

Spawn(SpawnRequest)

§

Prompt

Send a prompt / user input to a session.

Fields

§session: SessionId
§text: String
§attachments: Vec<Attachment>

Attachments (files, images).

§queue: bool

If true: enqueue when the session is busy or the queue is non-empty, and send sequentially when idle.

§

Exec

Execute a shell command in the session’s working directory (bypassing the agent), writing output to the transcript.

Fields

§session: SessionId
§command: String
§

QueueClear

Clear a session’s pending prompt queue.

Fields

§session: SessionId
§

QueuePop

Pop (remove) the last entry from a session’s pending prompt queue, returning its raw text via Frame::Ok { note }.

Fields

§session: SessionId
§

Cancel

Interrupt the current turn (without killing the process).

Fields

§session: SessionId
§

SessionRemove

Remove an ended session from the list; for worktree branches behaves like gc (unmerged or uncommitted changes require force).

Fields

§session: SessionId
§force: bool
§

Handoff

Hand off a session’s work to another agent: generates a handoff brief and reuses the same working directory.

Fields

§session: SessionId
§effort: Option<String>
§note: Option<String>

Extra instructions for the incoming agent.

§role: Option<Role>
§force: bool
§

Kill

End the session and kill its process.

Fields

§session: SessionId
§

KillBgProc

Terminate background child processes of a session (pid: None cleans up all).

Fields

§session: SessionId
§force: bool
§

Resume

Resume an ended session: reconnect to the original conversation using the agent’s native conversation id (keeping the ertangle session id).

Fields

§session: SessionId
§prompt: Option<String>

Prompt sent immediately after resuming succeeds.

§

Clear

Reset context while keeping identity: kill the agent process and restart with a fresh conversation (preserving ertangle session id, label, parent/child links, worktree, inbox, and tasks). Rejected while busy unless force interrupts first.

Fields

§session: SessionId
§force: bool
§

Sleep

Pause an idle session’s child process (SIGSTOP).

Fields

§session: SessionId
§

Wake

Wake a sleeping session’s child process (SIGCONT).

Fields

§session: SessionId
§

SessionConfig

Switch a session’s model and/or effort at runtime (takes effect on the next turn).

Fields

§session: SessionId
§effort: Option<String>
§

SessionBudget

Set or raise a session’s cost limit (USD) and clear over_budget.

Fields

§session: SessionId
§budget_usd: f64
§

McpPermission

Agent (via MCP ertangle_approve) requests approval and waits for the decision.

Fields

§session: SessionId
§title: String
§detail: String
§

ApprovalAsk

Agent (via MCP ertangle_approve) requests approval and waits for the decision; Ok note is allow or deny.

Fields

§session: SessionId
§tool: String
§input: String

Tool input (JSON string).

§

Permission

Reply to an approval request.

Fields

§session: SessionId
§decision: Decision
§

McpQuestion

Agent asks a question through MCP ertangle_question and waits for the user’s answer.

Fields

§session: SessionId
§question: String
§header: Option<String>
§options: Vec<String>
§multi_select: bool
§

AnswerQuestion

Reply to an interactive question.

Fields

§session: SessionId
§answers: Vec<String>
§

BusSend

Send a message onto the bus (inter-agent communication).

Fields

§kind: MsgKind
§body: String
§reply_to: Option<MsgId>
§

BusInbox

Read a session’s inbox (by default unread only, advancing the cursor).

Fields

§session: SessionId
§unread_only: bool
§

BusWait

Block waiting for the next message in the inbox (optionally filtered by sender or reply_to).

Fields

§session: SessionId
§reply_to: Option<MsgId>
§timeout_ms: u64
§

TaskCreate

Fields

§title: String
§detail: String
§assignee: Option<SessionId>
§created_by: Option<SessionId>
§depends_on: Vec<TaskId>
§project_root: Option<String>
§

TaskUpdate

Fields

§assignee: Option<SessionId>
§detail: Option<String>
§

TaskDelete

Fields

§

SessionLabel

Rename a session’s display label.

Fields

§session: SessionId
§label: String
§

SessionNote

Update a session’s short status string (corresponds to ertangle_status).

Fields

§session: SessionId
§note: String
§

ArtifactShare

Share an artifact (file, branch, or diff).

Fields

§session: SessionId
§path: String
§note: String
§

WorktreeList

List all managed worktrees.

§

WorktreeDiff

Get git diff of a session’s workspace (including untracked file summary).

Fields

§session: SessionId
§stat_only: bool

Return only changed file paths and line counts (+N -M), without unified diff hunks.

§paths: Vec<String>

Inspect only files matching the specified relative paths or prefixes.

§max_lines: Option<usize>

Maximum number of diff lines to return (truncates with an omission notice if exceeded).

§fold_generated: bool

Automatically fold large lockfiles / generated files (package-lock.json, *.Designer.cs, etc.) into a single-line summary.

§

WorktreeDiscard

Revert (discard) a single hunk or entire file change in a session’s workspace.

Fields

§session: SessionId
§file: String
§

WorktreeMerge

Merge a session’s worktree branch back into the main workspace.

Fields

§session: SessionId
§dry_run: bool
§resolve: bool
§strategy: Option<MergeStrategy>

Merge strategy; falls back to daemon’s global [git] merge_strategy (default merge) if omitted.

§

WorktreePr

Create a Pull Request for a session’s branch (via gh).

Fields

§session: SessionId
§title: String
§body: String
§

WorktreeGc

Clean up worktrees of ended sessions (or the specified session if given).

Fields

§force: bool

Also remove worktrees with unmerged or uncommitted changes.

§

Prune

Archive every ended session that is merged or has no worktree, removing merged worktrees safely. Live sessions and unmerged work are never touched.

Fields

§project: Option<String>

Restrict to sessions of this project root (absolute path); None = all.

§

ReviewComment

Leave a review comment on a session’s diff line and send it back to the agent to fix.

Fields

§session: SessionId
§location: String
§comment: String
§

WebControl

Control or query Web UI support.

Fields

§enabled: Option<bool>
§

KeepAwake

Toggle OS-level keep-awake at runtime (applied immediately by TUI settings).

Fields

§enabled: bool
§

ListModels

List available models for an agent (built-in for Claude; queried from CLI for others, up to a few seconds).

Fields

§kind: String

Agent kind (claude, codex, opencode, antigravity).

§

Shutdown

Request the daemon to shut down.

§

Restart

Request the daemon to restart with the same binary (re-exec); running sessions resume automatically.

Trait Implementations§

Source§

impl Clone for Request

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 Request

Source§

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

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

impl<'de> Deserialize<'de> for Request

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Request

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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