pub struct DaemonMetadata {
pub pid: u32,
pub session: Uuid,
pub owner: DaemonOwner,
pub version: String,
}Expand description
On-disk daemon metadata. Persisted as mati.pid, read by the CLI proxy
and hook scripts to route through the daemon socket.
The session UUID is a session marker for audit/provenance — NOT an
authentication token. Peer identity is established via Unix peer
credentials (peer_cred()).
Fields§
§pid: u32PID of the daemon process.
session: UuidSession UUID — included in every IPC request for audit correlation. Generated fresh on each daemon startup.
owner: DaemonOwnerWho started this daemon (daemon vs mcp server).
version: StringVersion of the binary serving this store.
Hooks and the MCP server can resolve to different binaries — hooks
run .claude/hooks/mati, which mati init pinned to whichever
executable ran it, while .mcp.json registers a bare mati off PATH.
A rebuild of one and not the other puts a stale client against a live
daemon, and hooks fail open on a protocol mismatch, so the symptom is
silent under-enforcement. Recording the version here lets mati doctor
name the mismatch instead.
#[serde(default)]: a mati.pid written by an older binary has no
version, and must still parse.
Implementations§
Source§impl DaemonMetadata
impl DaemonMetadata
Sourcepub fn new(owner: DaemonOwner) -> Self
pub fn new(owner: DaemonOwner) -> Self
Create metadata for the current process.
Trait Implementations§
Source§impl Clone for DaemonMetadata
impl Clone for DaemonMetadata
Source§fn clone(&self) -> DaemonMetadata
fn clone(&self) -> DaemonMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DaemonMetadata
impl Debug for DaemonMetadata
Source§impl<'de> Deserialize<'de> for DaemonMetadata
impl<'de> Deserialize<'de> for DaemonMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for DaemonMetadata
impl RefUnwindSafe for DaemonMetadata
impl Send for DaemonMetadata
impl Sync for DaemonMetadata
impl Unpin for DaemonMetadata
impl UnsafeUnpin for DaemonMetadata
impl UnwindSafe for DaemonMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§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>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§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.Source§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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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