pub enum SrvCommand {
Migrate {
dry_run: bool,
list: bool,
verify: bool,
prepare: bool,
},
Open {
port: Option<u16>,
key_file: Option<PathBuf>,
print: bool,
origin: Option<String>,
},
Logout {
port: Option<u16>,
key_file: Option<PathBuf>,
},
Sessions {
port: Option<u16>,
key_file: Option<PathBuf>,
},
ProbeKeychain,
Shutdown {
port: Option<u16>,
key_file: Option<PathBuf>,
},
MigrateForkSlugs {
plan: bool,
apply: bool,
rollback: Option<String>,
restore: Option<String>,
},
}Variants§
Migrate
Run pending data migrations and exit. Invoked by the launcher before starting the daemon so the srv always starts with clean migrated state.
Fields
verify: boolCheck every APPLIED migration post-condition (row counts, marker files) instead of running anything. Exit 0 if every check holds or is not verifiable, 3 if any is a mismatch or errored (2 is clap usage-error, so a typoed flag never reads as a data finding). This is the doctor pass from SPEC_MIGRATION_SYSTEM_HARDENING_2026_08_03 Phase 1: db_migrations only records that up() returned Ok, never that it wrote what it was meant to.
prepare: boolPrepare this version’s data for its first start, with srv stopped: copy the previous version’s data forward when this version has none, back up, and run the pending migrations, each reported on stderr for the splash. The upgrade step of SPEC_FAST_STARTUP_UPGRADE_OWNS_MIGRATIONS_AND_UPDATES_2026_09_15 §10. It writes, so it can’t be combined with the read-only flags.
Open
Open a browser at a headless srv that serves its own UI (--frontend-dir): mint a one-time
code, open the browser at it, show the check phrase and ask whether it is the page you opened.
Run by the same user, in a terminal. SPEC_HEADLESS_SERVER_PACKAGE_AND_LOCAL_WEB_UI §3.
Fields
Logout
Disconnect every browser from a headless srv that serves its own UI. Proves the key to the
server the way open does, and sends nothing but that proof. Run by the same user.
Fields
Sessions
Print how many browsers are open on a headless srv that serves its own UI: one number. Proves the
key to the server the way open does. Run by the same user; agentmux status shows it.
Fields
ProbeKeychain
Try the operating system’s keychain the way the server would use it: store, read back and delete one test entry, waiting
a few seconds at most and showing no prompt. Prints one word (works, absent, no-answer or failed), then
optionally : why. Run by agentmux setup on Linux to choose between the keychain and owner-only files.
Shutdown
Ask a headless srv that serves its own UI to shut down, as a termination signal does (agentmux stop on
Windows, which has no such signal). Proves the key to the server the way open does. Run by the same user.
Fields
MigrateForkSlugs
Give pre-fix forks the agent id fork_slug gives, keeping the old one
as a former slug (SPEC_FORK_SLUG_MIGRATION_2026_10_22.md §4 Phase 2).
With no flag, or --plan, prints what would change and changes nothing.
Trait Implementations§
Source§impl Debug for SrvCommand
impl Debug for SrvCommand
Source§impl FromArgMatches for SrvCommand
impl FromArgMatches for SrvCommand
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 SrvCommand
impl Subcommand for SrvCommand
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 SrvCommand
impl RefUnwindSafe for SrvCommand
impl Send for SrvCommand
impl Sync for SrvCommand
impl Unpin for SrvCommand
impl UnsafeUnpin for SrvCommand
impl UnwindSafe for SrvCommand
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