HolographicMemorySystem¶
Constructors¶
Constructor¶
Parameters¶
| Parameter | Type |
|---|---|
dimensions | number |
storagePath? | string | null |
config? | HmsConfigJs | null |
Returns¶
HolographicMemorySystem
Accessors¶
activeGoalCount¶
Get Signature¶
Returns¶
number
cognitionCycleCount¶
Get Signature¶
Returns¶
number
cognitionEnabled¶
Get Signature¶
Returns¶
boolean
cognitionInsightCount¶
Get Signature¶
Returns¶
number
cognitionRunning¶
Get Signature¶
Returns¶
boolean
dimensions¶
Get Signature¶
Returns¶
number
documentIndexTrained¶
Get Signature¶
Returns¶
boolean
goalCount¶
Get Signature¶
Returns¶
number
ivfTrained¶
Get Signature¶
Returns¶
boolean
meaningEnabled¶
Get Signature¶
Returns¶
boolean
nsgTrained¶
Get Signature¶
Returns¶
boolean
pendingProposals¶
Get Signature¶
Returns¶
number
relationCount¶
Get Signature¶
Returns¶
number
vectorCount¶
Get Signature¶
Returns¶
number
Methods¶
activeGoals()¶
Returns¶
GoalJs[]
addGoal()¶
Parameters¶
| Parameter | Type |
|---|---|
name | string |
description | string |
relevance | number |
urgency | number |
cost | number |
Returns¶
number | null
addRelation()¶
Parameters¶
| Parameter | Type |
|---|---|
sourceId | string |
relationType | string |
targetId | string |
properties? | string | null |
validFrom? | number | null |
validTo? | number | null |
Returns¶
Promise\<void>
analyzeComponents()¶
Parameters¶
| Parameter | Type |
|---|---|
text | string |
Returns¶
Promise\<RetrievalResult[]>
analyzeText()¶
Parameters¶
| Parameter | Type |
|---|---|
text | string |
Returns¶
Promise\<TextMetrics>
approveProposal()¶
Parameters¶
| Parameter | Type |
|---|---|
id | number |
Returns¶
boolean
auditSince()¶
Parameters¶
| Parameter | Type |
|---|---|
timestampMs | number |
Returns¶
Promise\<AuditEntryJs[]>
bundleTexts()¶
Bundle multiple text items into a single hypervector. Respects the PrivacyConfig: when dp_enabled, uses epsilon-DP noise.
Parameters¶
| Parameter | Type |
|---|---|
texts | string[] |
Returns¶
Promise\<number[]>
calculateReadability()¶
Parameters¶
| Parameter | Type |
|---|---|
metrics | TextMetrics |
Returns¶
Promise\<number>
chunkDocument()¶
Parameters¶
| Parameter | Type |
|---|---|
input | DocumentInput |
Returns¶
Promise\<DocumentChunk[]>
cleanupVector()¶
Parameters¶
| Parameter | Type |
|---|---|
vector | Float32Array |
Returns¶
Promise\<CleanupResultJs | null>
compact()¶
Returns¶
Promise\<void>
configureMemory()¶
Replaces the memory API's configuration (policies and defaults; see docs/memory-api). Pass nothing to restore the defaults.
Parameters¶
| Parameter | Type |
|---|---|
config? | any |
Returns¶
void
deactivateGoal()¶
Parameters¶
| Parameter | Type |
|---|---|
name | string |
Returns¶
boolean
declareCompositionRule()¶
Parameters¶
| Parameter | Type |
|---|---|
name | string |
inputRelations | string[] |
outputRelation | string |
Returns¶
void
declareRelationType()¶
Parameters¶
| Parameter | Type |
|---|---|
name | string |
transitive? | boolean | null |
symmetric? | boolean | null |
Returns¶
void
delete()¶
Parameters¶
| Parameter | Type |
|---|---|
id | string |
Returns¶
Promise\<boolean>
deleteDocument()¶
Parameters¶
| Parameter | Type |
|---|---|
id | string |
Returns¶
Promise\<boolean>
explainQuery()¶
Parameters¶
| Parameter | Type |
|---|---|
text | string |
k | number |
Returns¶
factorizeDiffusion()¶
Parameters¶
| Parameter | Type |
|---|---|
productText | string |
domains | string[][] |
maxIter | number |
Returns¶
Promise\<(string | null | undefined)[]>
federatedQuery()¶
Parameters¶
| Parameter | Type |
|---|---|
peerPaths | string[] |
text | string |
k | number |
Returns¶
Promise\<RetrievalResult[]>
findAnalogy()¶
Finds an analogy: A is to B as C is to ?.
NOTE: Currently uses character trigram encoding, which has limited semantic understanding. Complex semantic analogies may require higher-level word embeddings (slated for future upgrade).
Parameters¶
| Parameter | Type |
|---|---|
a | string |
b | string |
c | string |
k? | number | null |
traceId? | string | null |
Returns¶
Promise\<RetrievalResult[]>
flush()¶
Returns¶
Promise\<void>
generateQuestions()¶
Returns¶
governMemory()¶
Returns¶
hardwareCapabilities()¶
Returns¶
incomingRelations()¶
Parameters¶
| Parameter | Type |
|---|---|
targetId | string |
relationType? | string | null |
atTime? | number | null |
Returns¶
Promise\<Relation[]>
indexStatus()¶
Returns¶
maintainIndices()¶
Returns¶
Promise\<IndexStatus>
meaningCleanup()¶
Parameters¶
| Parameter | Type |
|---|---|
text | string |
Returns¶
Promise\<CleanupResultJs | null>
memorizeBatch()¶
Batch memorize multiple id/text pairs in a single native call. Uses rayon for parallel encoding, then inserts sequentially.
Parameters¶
| Parameter | Type |
|---|---|
items | MemorizeBatchItem[] |
traceId? | string | null |
Returns¶
Promise\<void>
memorizeDocument()¶
Parameters¶
| Parameter | Type |
|---|---|
input | DocumentInput |
Returns¶
Promise\<number>
memorizeDocuments()¶
Parameters¶
| Parameter | Type |
|---|---|
inputs | DocumentInput[] |
Returns¶
Promise\<number[]>
memorizeFile()¶
Ingest a UTF-8 file (up to 8 MiB) as a chunked document with source offsets. Retrieve passages with searchDocuments and remove them with deleteDocument.
Parameters¶
| Parameter | Type |
|---|---|
id | string |
filePath | string |
Returns¶
Promise\<void>
memorizeMeaning()¶
Parameters¶
| Parameter | Type |
|---|---|
id | string |
text | string |
Returns¶
Promise\<void>
memorizeScalar()¶
Parameters¶
| Parameter | Type |
|---|---|
id | string |
value | number |
min | number |
max | number |
Returns¶
Promise\<void>
memorizeSequence()¶
Parameters¶
| Parameter | Type |
|---|---|
id | string |
sequence | string[] |
Returns¶
Promise\<void>
memorizeText()¶
Parameters¶
| Parameter | Type |
|---|---|
id | string |
text | string |
traceId? | string | null |
Returns¶
Promise\<void>
memorizeTextBuffer()¶
Zero-copy text ingestion from a Node.js Buffer. Avoids the UTF-8 copy that occurs with String parameters by reading bytes in-place.
Parameters¶
| Parameter | Type |
|---|---|
id | string |
text | Buffer |
traceId? | string | null |
Returns¶
Promise\<void>
memorizeTriplet()¶
Parameters¶
| Parameter | Type |
|---|---|
id | string |
head | string |
relation | string |
tail | string |
Returns¶
Promise\<void>
memorizeVector()¶
Parameters¶
| Parameter | Type |
|---|---|
id | string |
vector | Float32Array |
Returns¶
Promise\<void>
memoryCall()¶
One memory API operation as JSON in and JSON out: remember, recall, explain, forget, get, history, applyForgetting or consolidate. The typed wrapper is Memory in memory.js.
Parameters¶
| Parameter | Type |
|---|---|
op | string |
request | any |
Returns¶
Promise\<any>
multiHopQuery()¶
Parameters¶
| Parameter | Type |
|---|---|
startEntity | string |
relations | string[] |
Returns¶
Promise\<MultiHopResultJs[]>
outgoingRelations()¶
Parameters¶
| Parameter | Type |
|---|---|
sourceId | string |
relationType? | string | null |
atTime? | number | null |
Returns¶
Promise\<Relation[]>
planGoal()¶
Parameters¶
| Parameter | Type |
|---|---|
goal | string |
causalRelations | string[] |
maxDepth? | number | null |
Returns¶
proposeRule()¶
Parameters¶
| Parameter | Type |
|---|---|
name | string |
inputRelations | string[] |
outputRelation | string |
reason | string |
Returns¶
number | null
query()¶
Parameters¶
| Parameter | Type |
|---|---|
text | string |
k | number |
traceId? | string | null |
Returns¶
Promise\<RetrievalResult[]>
queryBatch()¶
Process multiple text queries in parallel, returning results for each.
Parameters¶
| Parameter | Type |
|---|---|
texts | string[] |
k | number |
Returns¶
Promise\<RetrievalResult[][]>
queryScalar()¶
Parameters¶
| Parameter | Type |
|---|---|
value | number |
min | number |
max | number |
k | number |
Returns¶
Promise\<RetrievalResult[]>
querySequence()¶
Parameters¶
| Parameter | Type |
|---|---|
partial | string[] |
k | number |
Returns¶
Promise\<RetrievalResult[]>
queryTriplet()¶
Parameters¶
| Parameter | Type |
|---|---|
head | string |
relation | string |
k | number |
Returns¶
Promise\<RetrievalResult[]>
queryVector()¶
Converts float32→sparse EntangledHVec on JS thread, then queries on background.
Parameters¶
| Parameter | Type |
|---|---|
vector | Float32Array |
k | number |
Returns¶
Promise\<RetrievalResult[]>
queryVectorBatch()¶
Process multiple float32 vector queries in parallel.
Parameters¶
| Parameter | Type |
|---|---|
vectors | Float32Array\<ArrayBufferLike>[] |
k | number |
Returns¶
Promise\<RetrievalResult[][]>
rejectProposal()¶
Parameters¶
| Parameter | Type |
|---|---|
id | number |
Returns¶
boolean
removeRelation()¶
Parameters¶
| Parameter | Type |
|---|---|
sourceId | string |
relationType | string |
targetId | string |
Returns¶
Promise\<boolean>
runCognitionOnce()¶
Returns¶
number
searchDocuments()¶
Parameters¶
| Parameter | Type |
|---|---|
text | string |
options? | SearchOptions | null |
Returns¶
Promise\<DocumentResult[]>
securityStatus()¶
Returns¶
any
startCognition()¶
Returns¶
void
stopCognition()¶
Returns¶
void
storageHealth()¶
Returns¶
structuralQuery()¶
Parameters¶
| Parameter | Type |
|---|---|
knownSubjects | string[] |
knownRelations | string[] |
targetRole | string |
Returns¶
Promise\<StructuralResultJs[]>
synthesizeConcepts()¶
Returns¶
Promise\<ConceptCandidate[]>
trainDocumentIndex()¶
Returns¶
Promise\<void>
trainIvf()¶
Returns¶
Promise\<void>
trainNsg()¶
Returns¶
Promise\<void>
traverse()¶
Parameters¶
| Parameter | Type |
|---|---|
startId | string |
relationType? | string | null |
maxDepth? | number | null |
atTime? | number | null |
Returns¶
Promise\<GraphPath[]>