pub(crate) enum Command {
Exec(Args),
Hook,
Precompact(Args),
Sessionstart(Args),
GitCredential {
op: String,
},
GithubToken {
gh_args: Vec<String>,
},
GithubContainer {
gh_args: Vec<String>,
},
GithubOwnerTag {
gh_args: Vec<String>,
},
GithubTextGuard {
gh_args: Vec<String>,
},
GitHook {
name: String,
args: Vec<String>,
},
AwsCredentials {
profile: String,
},
GitEnv {
git_args: Vec<String>,
},
}Variants§
Exec(Args)
Run a bash command inside an owned PTY, stream its stdout/stderr to the AgentMux sidecar’s MPS broker, and print the aggregated output on this process’s stdout for Claude to capture.
Hook
Read a PreToolUse JSON payload on stdin (from Claude Code) and
emit a hook response that rewrites the command to invoke exec.
Precompact(Args)
Registered as Claude Code’s PreCompact hook. Publishes a
compaction_started MPS event and exits 0 with no stdout
output — observe-only, never blocks compaction.
Sessionstart(Args)
Registered as Claude Code’s SessionStart hook, once per part.
Prints this part of the agent’s memory as the hook’s
additionalContext (or nothing), then acknowledges it.
GitCredential
git’s credential helper (get, store, erase) for an agent whose person connected
GitHub through AgentMux Cloud: the GitHub App’s token for the repository, from srv.
GithubToken
Print a token for the repository a gh command is about, or say why there is none. The
gh function this wrapper exports calls it.
GithubContainer
A container’s gh pr merge (done by srv) or a raw gh api write its token cannot make (refused, naming the
command that does the job); exit 3 for any other command. The gh function this wrapper exports calls it.
GithubOwnerTag
The arguments of a gh pr create or gh pr edit with the owner tag in its body, each
followed by a NUL byte. The gh function this wrapper exports calls it.
GithubTextGuard
Scan the text a gh command sends (a PR, issue or comment body, release notes, an API field)
for credentials: print the arguments to run, each followed by a NUL, then ok; or refused
and the reason on stderr. The gh function this wrapper exports calls it.
GitHook
One of the git hooks srv installs for an agent (pre-push, prepare-commit-msg): the
repository’s own hook, then AgentMux’s part (the push scan, the commit trailers).
AwsCredentials
AWS’s credential_process for a container agent’s AWS config: print the credentials of the grant
--profile names as JSON, or say on stderr why there are none. srv writes the config that calls it.
GitEnv
Refuse a git command that would skip the hooks, and print the environment a commit needs.
The git function this wrapper exports calls it.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more