pub struct SccEngine { /* private fields */ }Expand description
Owned SCC engine: open root once, call namespaces repeatedly.
Implementations§
Source§impl SccEngine
impl SccEngine
Sourcepub fn open(root: impl AsRef<Path>) -> Result<Self>
pub fn open(root: impl AsRef<Path>) -> Result<Self>
Open the engine at root (creates .scc/ state, loads config).
Sourcepub fn invoke(&self, operation: &str, input: Value) -> Result<Value>
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.
Sourcepub fn session(&self) -> Result<Session>
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.
Sourcepub fn invoke_session(
&self,
session: &Session,
operation: &str,
input: Value,
) -> Result<Value>
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.
Sourcepub fn refresh(&mut self) -> Result<()>
pub fn refresh(&mut self) -> Result<()>
Re-open the store after an external mutation (index, ingest, contribution commit) so later calls see fresh state.
Sourcepub fn with_engine<T>(
&self,
f: impl FnOnce(Engine<'_>) -> Result<T>,
) -> Result<T>
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.
pub fn workspace_status(&self) -> Result<Status>
pub fn index_full(&self) -> Result<IndexReport>
pub fn index_paths(&self, paths: &[String]) -> Result<IndexReport>
pub fn graph_entity(&self, id: &str) -> Result<Option<Entity>>
pub fn graph_relationships( &self, subject: Option<&str>, predicate: Option<&str>, limit: usize, ) -> Result<Vec<Relationship>>
pub fn evidence_list( &self, path: Option<&str>, limit: usize, ) -> Result<Vec<Evidence>>
pub fn model(&self) -> Result<Value>
pub fn history(&self) -> Result<Vec<GraphRevision>>
pub fn history_diff(&self, from: i64, to: i64) -> Result<SemanticDelta>
pub fn runtime_status(&self) -> Result<Vec<RuntimeEdge>>
pub fn runtime_reconcile(&self) -> Result<Reconciliation>
Sourcepub fn surface_build(
&self,
task: &str,
budget: usize,
explain: bool,
) -> Result<(SurfaceRenderResult, String)>
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).
Sourcepub fn ranking_symbols(
&self,
goal: &str,
limit: usize,
explain: bool,
) -> Result<RankResult>
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.
Sourcepub fn context_task(
&self,
goal: &str,
budget: usize,
) -> Result<TaskContextArtifact>
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.
Sourcepub fn context_atlas(&self, budget: usize) -> Result<ContextPack>
pub fn context_atlas(&self, budget: usize) -> Result<ContextPack>
System atlas pack (spec §5 usage): same builder the
context.atlas operation calls.
Sourcepub fn context_ns(&self) -> ContextNs<'_>
pub fn context_ns(&self) -> ContextNs<'_>
Spec §5 namespace chain: scc.context() — context packs behind a
namespace view instead of one flat method list.
Sourcepub fn surface_ns(&self) -> SurfaceNs<'_>
pub fn surface_ns(&self) -> SurfaceNs<'_>
Spec §5 namespace chain: scc.surface().
Sourcepub fn ranking_ns(&self) -> RankingNs<'_>
pub fn ranking_ns(&self) -> RankingNs<'_>
Spec §5 namespace chain: scc.ranking().