Skip to main content

Command

Enum Command 

Source
pub enum Command {
Show 31 variants Ping, Metrics, Get(GetInput), HookEvaluate(HookEvaluateInput), ScanPrefix(ScanPrefixInput), History(HistoryInput), HistorySince(HistorySinceInput), SessionCheckConsulted(SessionCheckConsultedInput), SessionCheckConsultedRecent(SessionCheckConsultedRecentInput), MemQuery(MemQueryInput), ScanEnforcementEvents(ScanEnforcementEventsInput), ConfigGet(ConfigGetInput), MemGet(MemGetInput), MemBootstrap(MemBootstrapInput), GotchaUpsert(GotchaDraftInput), GotchaConfirm(GotchaConfirmInput), GotchaTombstone(GotchaTombstoneInput), FileEnrich(FileEnrichInput), FileReparse(FileReparseInput), FileEditHook(FileEditHookInput), DocCapture(DocCaptureInput), DecisionUpsert(DecisionUpsertInput), DevNoteUpsert(DevNoteUpsertInput), ConfigSet(ConfigSetInput), SandboxAudit(SandboxAuditInput), SessionLog(SessionLogInput), ConsultationHit(ConsultationHitInput), SessionFlush, SessionHarvest, SessionClearConsults, RecordImport(RecordImportInput),
}
Expand description

All commands available over the daemon IPC protocol.

Internally tagged by "type". Each variant either has no arguments (unit) or wraps a typed input DTO with #[serde(deny_unknown_fields)].

There is no public put or delete command. All mutations are semantic.

Variants§

§

Ping

Health check. No arguments.

§

Metrics

Snapshot of live daemon metrics — per-command counters and latency percentiles. Pure read, no audit, no side effects.

§

Get(GetInput)

Single record lookup by key.

§

HookEvaluate(HookEvaluateInput)

Bulk lookup for hook decision: file record + linked gotchas + consultation status.

§

ScanPrefix(ScanPrefixInput)

Scan all records whose key starts with a prefix.

§

History(HistoryInput)

Version history for a single key.

§

HistorySince(HistorySinceInput)

Version history for a single key since a timestamp.

§

SessionCheckConsulted(SessionCheckConsultedInput)

Check whether a consultation receipt exists for a key.

§

SessionCheckConsultedRecent(SessionCheckConsultedRecentInput)

Check whether a recent consultation receipt exists (within TTL).

§

MemQuery(MemQueryInput)

BM25 text search or graph traversal.

§

ScanEnforcementEvents(ScanEnforcementEventsInput)

Scan enforcement events stored as raw JSON in the knowledge tree.

§

ConfigGet(ConfigGetInput)

Read a runtime configuration value (e.g. audit.write_durability). Pure read — no audit, no side effects.

§

MemGet(MemGetInput)

Single record lookup with consultation receipt side effect.

§

MemBootstrap(MemBootstrapInput)

Assemble a token-budgeted context packet for session startup.

§

GotchaUpsert(GotchaDraftInput)

Create or update a gotcha record. Always sets confirmed=false.

§

GotchaConfirm(GotchaConfirmInput)

Confirm a gotcha for hook enforcement. Sets confirmed=true.

§

GotchaTombstone(GotchaTombstoneInput)

Tombstone a gotcha and clean up file links + graph edges.

§

FileEnrich(FileEnrichInput)

Enrich a file record with LLM-derived purpose, entry points, etc. File record must already exist (created by init/reparse).

§

FileReparse(FileReparseInput)

Re-analyze a file from disk and update structural fields.

§

FileEditHook(FileEditHookInput)

Post-edit hook compound: consultation hit + file reparse.

§

DocCapture(DocCaptureInput)

Extract doc comment from file on disk and update file record purpose.

§

DecisionUpsert(DecisionUpsertInput)

Create or update a decision record.

§

DevNoteUpsert(DevNoteUpsertInput)

Create or update a dev note.

§

ConfigSet(ConfigSetInput)

Write a runtime configuration value. Records an EnforcementConfigChanged event when the value actually changes.

§

SandboxAudit(SandboxAuditInput)

Record an EnforcementConfigChanged audit event for an L3 sandbox-floor change (mati sandbox apply/clear/protect/unprotect). Lets the CLI log the change even when a daemon holds the store (socket mode).

§

SessionLog(SessionLogInput)

Append a session analytics event (6 homogeneous event types).

§

ConsultationHit(ConsultationHitInput)

Record a consultation hit: receipt + access metrics + daily agg.

§

SessionFlush

Flush session data (collect consulted markers into session:current).

§

SessionHarvest

Archive session, run promotions, collect stale reviews.

§

SessionClearConsults

Clear all consult receipts (PostCompact: force re-block after compaction).

§

RecordImport(RecordImportInput)

Bulk-import a batch of pre-built Records into the knowledge tree. Bypasses the semantic upsert handlers — records are written verbatim so an export → import round-trip preserves every field (confirmed, source, confidence, lifecycle, etc.) without the destructive resets the typed upsert commands apply.

Only gotcha:*, decision:*, dev_note:*, file:*, stage:*, and dep:* keys are accepted (the knowledge-tree namespaces). Session-tree keys (session:*, analytics:*, compliance:*, audit:*) are rejected at the boundary — those are daemon-owned telemetry that an export should never round-trip.

Implementations§

Source§

impl Command

Source

pub fn kind(&self) -> &'static str

Returns the serde rename string for this command variant. Used for audit logging and tracing spans.

Source

pub fn target_key(&self) -> &str

Returns the primary target key for this command, if applicable. Used for audit trail correlation.

Source

pub fn is_mutation(&self) -> bool

Returns true for commands that mutate state (categories B and C).

Category B (reads with audited side effects): MemGet, MemBootstrap Category C (semantic mutations): all 13 mutation commands

Audit entries are written for all of these.

Trait Implementations§

Source§

impl Debug for Command

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Command

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Command

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts 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>

Converts 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)

Converts &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)

Converts &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
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Fruit for T
where T: Send + Downcast,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more