WarmMemorySystem¶
Constructors¶
Constructor¶
Parameters¶
| Parameter | Type |
|---|---|
dimensions | number |
storagePath? | string | null |
config? | WarmConfigJs | null |
Returns¶
WarmMemorySystem
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[]>
auditVerifyingKey()¶
Hexadecimal Ed25519 public key, or null when signing is disabled. Establish trust independently.
Returns¶
string | null
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()¶
Compacts the store. Searches keep running; writes wait for most of the call (its snapshot and its publication). The first compaction after a bulk ingest, and then whenever at least a quarter of the slots are new, also renumbers the document slots of a store without chunk vectors, which makes it 3 to 5 times as long (measured: 325 s against 64.5 s at 5M documents, 71.5 s against 17.7 s at 1M); with compressed text or encryption, searches also wait while the slots are renumbered in memory. startCompaction never renumbers.
Returns¶
Promise\<void>
configureMemory()¶
Replaces the memory API's configuration (policies and defaults; see docs/reference/api.md). 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¶
getDocumentInfo()¶
Parameters¶
| Parameter | Type |
|---|---|
id | string |
Returns¶
Promise\<ListedDocument | null>
getVectorRecord()¶
Parameters¶
| Parameter | Type |
|---|---|
id | string |
options? | | VectorRecordRevisionOptions | null |
Returns¶
Promise\<VectorRecordGetResult>
governMemory()¶
Returns¶
governMemoryAsync()¶
Returns¶
Promise\<GovernanceReportJs>
hardwareCapabilities()¶
Returns¶
incomingRelations()¶
Parameters¶
| Parameter | Type |
|---|---|
targetId | string |
relationType? | string | null |
atTime? | number | null |
Returns¶
Promise\<Relation[]>
indexStatus()¶
Returns¶
listDocuments()¶
One page of stored documents in id order, without their text. Pass the last id of the previous page as after to continue; limit is 1..=1000 (default 100).
Parameters¶
| Parameter | Type |
|---|---|
after? | string | null |
limit? | number | null |
Returns¶
Promise\<ListedDocument[]>
listVectorRecords()¶
Parameters¶
| Parameter | Type |
|---|---|
options? | | VectorRecordListOptions | null |
Returns¶
Promise\<VectorRecordListResult>
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[]>
mutateVectorRecords()¶
Parameters¶
| Parameter | Type |
|---|---|
operations | ( | { op: "insert" | "upsert"; record: VectorRecordInput; } | { id: string; op: "delete"; })[] |
options? | VectorRecordRevisionOptions |
Returns¶
Promise\<VectorRecordMutationResult>
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[][]>
queryVectorRecords()¶
Parameters¶
| Parameter | Type |
|---|---|
vector | number[] |
k | number |
options? | | VectorRecordQueryOptions | null |
Returns¶
Promise\<VectorRecordQueryResult>
queryVectraRecords()¶
Parameters¶
| Parameter | Type |
|---|---|
vector | number[] |
k | number |
filter | Record\<string, string | number | boolean> |
options? | VectorRecordQueryOptions |
Returns¶
Promise\<VectorRecordQueryResult>
rejectProposal()¶
Parameters¶
| Parameter | Type |
|---|---|
id | number |
Returns¶
boolean
removeRelation()¶
Parameters¶
| Parameter | Type |
|---|---|
sourceId | string |
relationType | string |
targetId | string |
Returns¶
Promise\<boolean>
revision()¶
Opaque store revision. Equal values bracket an unchanged store on this handle.
Returns¶
string
runCognitionOnce()¶
Returns¶
number
searchDocuments()¶
Parameters¶
| Parameter | Type |
|---|---|
text | string |
options? | SearchOptions | null |
Returns¶
Promise\<DocumentResult[]>
searchVectors()¶
Full-dimensional cosine results; optional graph prefixes only select candidates. Filters, stale projected snapshots and zero prefixes use full exact ranking.
Parameters¶
| Parameter | Type |
|---|---|
embedding | number[] |
k | number |
options? | VectorSearchOptions | null |
Returns¶
Promise\<DocumentResult[]>
securityStatus()¶
Returns¶
any
startCognition()¶
Returns¶
void
startCompaction()¶
Starts a compaction on a worker thread and returns its job; reads and writes continue meanwhile. Same lifecycle as Rust WarmCore::start_compaction.
Parameters¶
| Parameter | Type |
|---|---|
options? | CompactionOptions |
Returns¶
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[]>