Skip to main content

SccEngine

Struct SccEngine 

Source
pub struct SccEngine { /* private fields */ }
Expand description

Owned SCC engine: open root once, call namespaces repeatedly.

Implementations§

Source§

impl SccEngine

Source

pub fn open(root: impl AsRef<Path>) -> Result<Self>

Open the engine at root (creates .scc/ state, loads config).

Source

pub fn root(&self) -> &Path

Repository root this handle is bound to.

Source

pub fn invoke(&self, operation: &str, input: Value) -> Result<Value>

Generic invocation: the same dispatch transports use. A new operation needs no new wrapper before it is callable here.

Source

pub fn session(&self) -> Result<Session>

Pin the current model session (§6): repo, revision, epochs, config hash, plugin set + config, ranking pipeline, trust profile. Pass to invoke_session for epoch-consistent reads.

Source

pub fn invoke_session( &self, session: &Session, operation: &str, input: Value, ) -> Result<Value>

Invoke under a pinned session: fails loudly on drift instead of answering from a moved model.

Source

pub fn refresh(&mut self) -> Result<()>

Re-open the store after an external mutation (index, ingest, contribution commit) so later calls see fresh state.

Source

pub fn with_engine<T>( &self, f: impl FnOnce(Engine<'_>) -> Result<T>, ) -> Result<T>

Borrowed live view for one closure call: typed namespaces borrow the store, so they cannot be returned. Run the closure, then the borrow ends.

Source

pub fn workspace_status(&self) -> Result<Status>

Source

pub fn index_full(&self) -> Result<IndexReport>

Source

pub fn index_paths(&self, paths: &[String]) -> Result<IndexReport>

Source

pub fn graph_entity(&self, id: &str) -> Result<Option<Entity>>

Source

pub fn graph_relationships( &self, subject: Option<&str>, predicate: Option<&str>, limit: usize, ) -> Result<Vec<Relationship>>

Source

pub fn evidence_list( &self, path: Option<&str>, limit: usize, ) -> Result<Vec<Evidence>>

Source

pub fn model(&self) -> Result<Value>

Source

pub fn history(&self) -> Result<Vec<GraphRevision>>

Source

pub fn history_diff(&self, from: i64, to: i64) -> Result<SemanticDelta>

Source

pub fn runtime_status(&self) -> Result<Vec<RuntimeEdge>>

Source

pub fn runtime_reconcile(&self) -> Result<Reconciliation>

Source

pub fn surface_build( &self, task: &str, budget: usize, explain: bool, ) -> Result<(SurfaceRenderResult, String)>

Surface build for a task goal + budget (spec §5 usage): structured result plus rendered text. Same derivation as the surface.build operation (one builder, two callers).

Source

pub fn ranking_symbols( &self, goal: &str, limit: usize, explain: bool, ) -> Result<RankResult>

Full per-symbol blend with feature decomposition (spec §5 usage): same math as surface_build minus MMR/quotas/budget. Goal + limit + explain map onto RankRequest exactly as the ranking.symbols operation builds it.

Source

pub fn context_task( &self, goal: &str, budget: usize, ) -> Result<TaskContextArtifact>

Task context artifact: pack + delta + ids + token count (spec §5 usage). Same builder the context.task operation calls.

Source

pub fn context_atlas(&self, budget: usize) -> Result<ContextPack>

System atlas pack (spec §5 usage): same builder the context.atlas operation calls.

Source

pub fn context_ns(&self) -> ContextNs<'_>

Spec §5 namespace chain: scc.context() — context packs behind a namespace view instead of one flat method list.

Source

pub fn surface_ns(&self) -> SurfaceNs<'_>

Spec §5 namespace chain: scc.surface().

Source

pub fn ranking_ns(&self) -> RankingNs<'_>

Spec §5 namespace chain: scc.ranking().

Source

pub fn graph_ns(&self) -> GraphNs<'_>

Spec §5 namespace chain: scc.graph().

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.