pub struct ExoSubstrateNode { /* private fields */ }Expand description
EXO-AI cognitive substrate for Node.js
Provides vector similarity search, hypergraph queries, and temporal memory backed by the high-performance ruvector database.
Implementations§
Source§impl ExoSubstrateNode
impl ExoSubstrateNode
pub fn into_reference( val: ExoSubstrateNode, env: Env, ) -> Result<Reference<ExoSubstrateNode>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<ExoSubstrateNode>>
Source§impl ExoSubstrateNode
impl ExoSubstrateNode
Sourcepub fn new(dimensions: u32) -> Result<Self>
pub fn new(dimensions: u32) -> Result<Self>
Create a new substrate instance
§Example
const substrate = new ExoSubstrateNode({
dimensions: 384,
distanceMetric: 'Cosine'
});Sourcepub fn with_dimensions(dimensions: u32) -> Result<Self>
pub fn with_dimensions(dimensions: u32) -> Result<Self>
Create a substrate with default configuration (768 dimensions)
§Example
const substrate = ExoSubstrateNode.withDimensions(384);Sourcepub fn store(&self, pattern: JsPattern) -> Result<String>
pub fn store(&self, pattern: JsPattern) -> Result<String>
Store a pattern in the substrate
Returns the ID of the stored pattern
§Example
const id = await substrate.store({
embedding: new Float32Array([1.0, 2.0, 3.0, ...]),
metadata: '{"text": "example", "category": "demo"}',
salience: 1.0
});Sourcepub fn search(
&self,
embedding: Float32Array,
k: u32,
) -> Result<Vec<JsSearchResult>>
pub fn search( &self, embedding: Float32Array, k: u32, ) -> Result<Vec<JsSearchResult>>
Search for similar patterns
Returns an array of search results sorted by similarity
§Example
const results = await substrate.search(
new Float32Array([1.0, 2.0, 3.0, ...]),
10 // top-k
);Sourcepub fn hypergraph_query(&self, _query: String) -> Result<String>
pub fn hypergraph_query(&self, _query: String) -> Result<String>
Query hypergraph topology
Performs topological data analysis queries on the substrate Note: This feature is not yet fully implemented in the classical backend
§Example
const result = await substrate.hypergraphQuery('{"BettiNumbers":{"max_dimension":3}}');Sourcepub fn dimensions(&self) -> u32
pub fn dimensions(&self) -> u32
Get substrate dimensions
§Example
const dims = substrate.dimensions();
console.log(`Dimensions: ${dims}`);Trait Implementations§
Source§impl FromNapiMutRef for ExoSubstrateNode
impl FromNapiMutRef for ExoSubstrateNode
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for ExoSubstrateNode
impl FromNapiRef for ExoSubstrateNode
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &ExoSubstrateNode
impl FromNapiValue for &ExoSubstrateNode
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl FromNapiValue for &mut ExoSubstrateNode
impl FromNapiValue for &mut ExoSubstrateNode
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ObjectFinalize for ExoSubstrateNode
impl ObjectFinalize for ExoSubstrateNode
Source§impl ToNapiValue for ExoSubstrateNode
impl ToNapiValue for ExoSubstrateNode
Source§unsafe fn to_napi_value(
env: napi_env,
val: ExoSubstrateNode,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: ExoSubstrateNode, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for &ExoSubstrateNode
impl TypeName for &ExoSubstrateNode
Source§impl TypeName for &mut ExoSubstrateNode
impl TypeName for &mut ExoSubstrateNode
Source§impl TypeName for ExoSubstrateNode
impl TypeName for ExoSubstrateNode
Source§impl ValidateNapiValue for &ExoSubstrateNode
impl ValidateNapiValue for &ExoSubstrateNode
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut ExoSubstrateNode
impl ValidateNapiValue for &mut ExoSubstrateNode
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for ExoSubstrateNode
impl !RefUnwindSafe for ExoSubstrateNode
impl Send for ExoSubstrateNode
impl Sync for ExoSubstrateNode
impl Unpin for ExoSubstrateNode
impl !UnwindSafe for ExoSubstrateNode
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
Mutably borrows from an owned value. Read more
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>
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 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>
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