pub struct M4aSessionAccounts { /* private fields */ }Implementations§
Source§impl M4aSessionAccounts
impl M4aSessionAccounts
Sourcepub fn bin(&self) -> &Path
pub fn bin(&self) -> &Path
The m4a-agent binary the node runs (also the command of the node’s MCP entry).
Sourcepub fn session_file_path(&self, nick: &str) -> Option<PathBuf>
pub fn session_file_path(&self, nick: &str) -> Option<PathBuf>
Fallback identity channel: <root>/sessions/<nick>.session (owner-only), the same three
keys as SessionAccount::env_mutations, for a provider whose tools run in a process
that did not inherit the session environment (m4a-agent --session-file <path> ...).
pub fn write_session_file( &self, account: &SessionAccount, ) -> Result<PathBuf, String>
Sourcepub fn mcp_launch_args(
&self,
g4a_provider: &str,
nick: &str,
) -> Result<Vec<OsString>, String>
pub fn mcp_launch_args( &self, g4a_provider: &str, nick: &str, ) -> Result<Vec<OsString>, String>
Provider flags that give one spawned session its own m4a MCP server (m4a-agent --session-file <file> mcp), without touching any user config. Empty for providers with
no verified per-session MCP flag (grok TUI, kimi PTY): those use attach (/m4a/attach).
pub fn remove_session_file(&self, nick: &str)
pub fn new(bin: impl Into<PathBuf>, base: impl Into<PathBuf>) -> Self
Sourcepub fn wake_token(&self) -> Result<String, String>
pub fn wake_token(&self) -> Result<String, String>
The node’s letter-wake token (<root>/.node-wake-token, 0600), created on first use.
Sourcepub fn find_agent_bin() -> Option<PathBuf>
pub fn find_agent_bin() -> Option<PathBuf>
Resolve m4a-agent: env override, then next to this binary, then PATH, then ~/.cargo/bin.
Sourcepub fn default_accounts_root(enroll_dir: Option<&Path>) -> Option<PathBuf>
pub fn default_accounts_root(enroll_dir: Option<&Path>) -> Option<PathBuf>
Accounts root: env, else <enroll_dir>/m4a-accounts.
Sourcepub fn resolve_product_url(enroll_dir: Option<&Path>) -> Option<String>
pub fn resolve_product_url(enroll_dir: Option<&Path>) -> Option<String>
Product URL: env override, else what C2 answered on connect (set_c2_product_url), else
m4a_product_url from enrollment.json under enroll_dir.
Sourcepub fn from_env() -> Option<Self>
pub fn from_env() -> Option<Self>
Open from env and defaults. Logs clearly when m4a cannot start.
pub fn from_enroll_dir(enroll_dir: Option<&Path>) -> Option<Self>
pub fn base(&self) -> &Path
Trait Implementations§
Source§impl Clone for M4aSessionAccounts
impl Clone for M4aSessionAccounts
Auto Trait Implementations§
impl Freeze for M4aSessionAccounts
impl RefUnwindSafe for M4aSessionAccounts
impl Send for M4aSessionAccounts
impl Sync for M4aSessionAccounts
impl Unpin for M4aSessionAccounts
impl UnsafeUnpin for M4aSessionAccounts
impl UnwindSafe for M4aSessionAccounts
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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