Skip to main content

ProjectionCommand

Enum ProjectionCommand 

Source
pub enum ProjectionCommand {
    Brief(BriefArgs),
    Init(InitArgs),
    Migrate(MigrateArgs),
    Enable(EnableArgs),
    Advance(AdvanceArgs),
    Exclude(ExcludeArgs),
    Verify(VerifyArgs),
}

Variants§

§

Brief(BriefArgs)

Render a binding’s run-brief — the Markdown prompt an agent consumes — on stdout. Takes the canonical binding id <mem>/<stem> (D3), e.g. engine/graph. Omit the id (or pass --all) to select the next due (binding, operation) pair by round-robin + backoff and render that operation’s brief; --operation picks which operations rotate (default build — the classic build-only rotation; any rotates every loop-declared build / sync / verify pair). An operation participates only where its binding block declares trigger: loop. Reads the v2 binding store and the destination mem’s schema / writing guidance; the assembly is shared with the UniFFI surface, so CLI and app briefs are byte-identical by construction.

--verify renders the verify brief (group C) for the named binding: measurement + capped-adjudication instructions only, with no destination-mutation instruction. --sync renders the sync brief — the sole maintenance-writer prompt, carrying both the cursor slice and the open verify findings in one brief with the absorbed reconcile conservatism. Both are read-only on the mem; the sync brief’s repairs reach the mem only when an agent acts on it through the MCP mutation surface.

§

Init(InitArgs)

Scaffold a fresh v2 binding non-interactively: ONE record with one inline source, at .memstead/projections/<mem>/<stem>.json. All inputs are flags — no prompts ever (parity across callers). The default binding declares build+sync+verify where the medium permits: a web source scaffolds build-only, with the deferral named in warnings[]. A prune block is scaffolded wherever sync survived, with the strongest guarantee the medium supports (never-clobber for a git-backed source). Refuses PROJECTION_EXISTS (without touching disk) when a binding of the same id already exists — never overwrites.

§

Migrate(MigrateArgs)

Migrate every prior on-disk generation into v2 single-record bindings, in place. Gen-1 — the root-folder scopes|projections|ingests/ JSON layout — is first materialized into the four-primitive store, then folded. Gen-2 — the four-primitive store (per-mem Projection + flat Ingest) — merges each ingest into its projection and folds the referenced facets + mediums inline. v1 — the three-file store — folds each binding’s facet references inline the same way, source names preserved byte-verbatim (they key sync watermarks). The emptied mediums/ and facets/ trees are removed; orphan records refuse rather than drop. refinement mode and dangling refs refuse with a typed error. Idempotent on a migrated store. Use --dry-run to preview without writing.

§

Enable(EnableArgs)

Enable a build / sync / verify operation on an existing binding by adding its block (with sensible defaults) if absent. This is the remedy a refused mutating operation cites (D6): projection enable sync <binding>. Before writing, the operation is checked against the medium-capability matrix (D6) — enabling sync/verify over a medium that cannot support it (e.g. a web source) refuses with the capability gap and writes nothing. Enabling an already-present operation refuses PROJECTION_OP_ALREADY_ENABLED; a missing binding refuses PROJECTION_NOT_FOUND.

§

Advance(AdvanceArgs)

Advance a binding’s sync baseline by recording per-artifact dispositions (D7). The engine freezes the presented changed slice, subtracts already-disposed artifacts on re-presentation, appends new-HEAD deltas when the source moves mid-pass, and — when the remainder empties — advances the destination mem’s #synced token via the sync-state writer (provenance piggybacks that commit). Dispositions are durable (.memstead/state/advance/), so a partial pass resumes across process restarts. The gate accepts only artifact ids the engine presented — an unknown id refuses the whole call atomically (PROJECTION_ADVANCE_UNKNOWN_ARTIFACT). In this cycle the agent supplies a disposition for every artifact explicitly (auto-derivation lands later).

§

Exclude(ExcludeArgs)

Declare authored exclusions for in-scope source artifacts. Unlike advance (whose gate accepts only artifacts in the changed slice), this gates on enumerable S(D) membership, so a stable, unchanged artifact can be recorded as deliberately not-modeled with a rationale. Each accepted (artifact, rationale) lands in the durable exclusion ledger the fidelity report consults, so the artifact stops re-surfacing as uncovered under exhaustive coverage and keeps its reasoning. An artifact outside S(D) refuses the whole call atomically (PROJECTION_EXCLUDE_NOT_SOURCE_MEMBER); re-declaring merges into the ledger. The write path for the option-(a) process-mem judgment migration, and the general “this in-scope artifact is mined and warrants no destination entity, because …” capability.

§

Verify(VerifyArgs)

Measure a binding’s fidelity and record durable findings (E3b, group A). Read-only on the destination mem: verify adjudicates the mem’s anchors against the live source and samples in-scope artifacts, writing findings keyed (hash(D), source_head) into the engine-owned findings store (.memstead/state/findings/). A binding-declaration edit or a source-head move partitions the keyspace, so prior findings are segregated as superseded, never presented as current. Verify never mutates the mem — any repair routes through the (later) sync brief. It then renders the deterministic, token-budgeted tier-1 fidelity report (group B) over the findings just recorded: grain-classed coverage with tree-anchor fan-out on its own axis, anchor-resolution %, freshness vs. both sync_state tokens (signal: none → freshness unknowable), the capability-matrix block, and the tier-3 backlog depth — aggregates always ship; heavy per-artifact lists greedy-fill under --budget and drop to hints (forced back in with --include).

Trait Implementations§

Source§

impl Debug for ProjectionCommand

Source§

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

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

impl FromArgMatches for ProjectionCommand

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for ProjectionCommand

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

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> 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. 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<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