Skip to main content

agentmux_srv_core/backend/cli_native/
mod.rs

1// Copyright 2026, AgentMux Corp.
2// SPDX-License-Identifier: Apache-2.0
3
4//! Messages agents send each other through the Claude CLI's own messaging
5//! (its `SendMessage` tool between sessions), seen from both ends and written
6//! to the audit log next to the jekts.
7//!
8//! The receiving CLI starts a turn on its own and writes nothing about the
9//! message to the stream srv reads, unless it is launched with
10//! `--replay-user-messages`. With it, the message arrives as a `user` frame
11//! carrying `origin.kind == "peer"`, and the same flag replays every user turn
12//! srv writes, as `isReplay` frames the pane already records itself.
13//! [`reader::CliNativeReader`] therefore takes those two kinds of frame out of
14//! the stream the pane sees, and audits the peer ones. The CLI's own `isReplay`
15//! frames (a local command's output) are none of those and stay ([`sent`]).
16//!
17//! Who sent a message is decided here, from the process id the CLI verified for
18//! the sender's connection ([`sender`]), never from the name the message gives.
19
20pub mod frame;
21pub mod live;
22pub mod pids;
23pub mod reader;
24pub mod sender;
25pub mod sent;