@anuma/sdk 6.39.3 → 6.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/expo/index.cjs +229 -26
- package/dist/expo/index.d.mts +24 -2
- package/dist/expo/index.d.ts +24 -2
- package/dist/expo/index.mjs +229 -26
- package/dist/react/index.cjs +229 -26
- package/dist/react/index.d.mts +24 -2
- package/dist/react/index.d.ts +24 -2
- package/dist/react/index.mjs +229 -26
- package/dist/server/index.cjs +19 -16
- package/dist/server/index.d.mts +24 -2
- package/dist/server/index.d.ts +24 -2
- package/dist/server/index.mjs +19 -16
- package/package.json +1 -1
package/dist/react/index.mjs
CHANGED
|
@@ -21346,6 +21346,14 @@ function createLocalMemoryStore(options) {
|
|
|
21346
21346
|
getLogger().warn("[memory/store] Failed to embed memory:", err);
|
|
21347
21347
|
});
|
|
21348
21348
|
};
|
|
21349
|
+
const maintenance = {
|
|
21350
|
+
createDecaySweeper: (sweeperOptions) => createDecaySweeper({ ...sweeperOptions, vaultCtx }),
|
|
21351
|
+
getTopicBacklog: (backlogOptions) => getMemoriesNeedingTopicExtractionOp(vaultCtx, backlogOptions),
|
|
21352
|
+
extractTopics: (memoryIds, extractOptions) => extractAndLinkEntitiesForMemoriesOp(vaultCtx, memoryIds, extractOptions),
|
|
21353
|
+
stampTopicsExtracted: (memoryIds, extractedAt, version) => stampTopicsExtractedAtOp(vaultCtx, memoryIds, extractedAt, version),
|
|
21354
|
+
relinkTopics: (memoryIds) => relinkMemoryTopicsOp(vaultCtx, memoryIds),
|
|
21355
|
+
backfillTopics: (memoryIds) => backfillMemoryTopicsOp(vaultCtx, memoryIds)
|
|
21356
|
+
};
|
|
21349
21357
|
return {
|
|
21350
21358
|
masksEmbeddingInput: options.embeddingOptions.maskInput !== void 0,
|
|
21351
21359
|
list: (listOptions) => getAllVaultMemoriesOp(vaultCtx, listOptions),
|
|
@@ -21359,21 +21367,22 @@ function createLocalMemoryStore(options) {
|
|
|
21359
21367
|
memoriesByTopics: (names) => getMemoriesByEntityNamesOp(entityCtx, names),
|
|
21360
21368
|
topicsByMemories: (memoryIds) => getEntitiesByMemoryIdsOp(entityCtx, memoryIds),
|
|
21361
21369
|
listTopics: async () => {
|
|
21362
|
-
const links = await entityCtx.memoryEntityCollection.query(...linksOwnedBy).
|
|
21370
|
+
const links = await entityCtx.memoryEntityCollection.query(...linksOwnedBy).unsafeFetchRaw();
|
|
21363
21371
|
const members = /* @__PURE__ */ new Map();
|
|
21364
21372
|
for (const link of links) {
|
|
21365
|
-
const entityId = String(link.
|
|
21373
|
+
const entityId = String(link.entity_id);
|
|
21366
21374
|
const set = members.get(entityId) ?? /* @__PURE__ */ new Set();
|
|
21367
|
-
set.add(String(link.
|
|
21375
|
+
set.add(String(link.memory_id));
|
|
21368
21376
|
members.set(entityId, set);
|
|
21369
21377
|
}
|
|
21370
|
-
const entities = userId === void 0 ? await entityCtx.entityCollection.query().
|
|
21378
|
+
const entities = userId === void 0 ? await entityCtx.entityCollection.query().unsafeFetchRaw() : members.size ? await entityCtx.entityCollection.query(Q15.where("id", Q15.oneOf([...members.keys()]))).unsafeFetchRaw() : [];
|
|
21371
21379
|
const byName = /* @__PURE__ */ new Map();
|
|
21372
21380
|
for (const entity of entities) {
|
|
21373
|
-
const
|
|
21374
|
-
const
|
|
21375
|
-
byName.
|
|
21376
|
-
|
|
21381
|
+
const name = String(entity.canonical_name);
|
|
21382
|
+
const count2 = members.get(String(entity.id))?.size ?? 0;
|
|
21383
|
+
const existing = byName.get(name);
|
|
21384
|
+
byName.set(name, {
|
|
21385
|
+
name,
|
|
21377
21386
|
kind: existing?.kind ?? entity.kind ?? null,
|
|
21378
21387
|
memoryCount: (existing?.memoryCount ?? 0) + count2
|
|
21379
21388
|
});
|
|
@@ -21464,14 +21473,8 @@ function createLocalMemoryStore(options) {
|
|
|
21464
21473
|
}
|
|
21465
21474
|
return () => subscriptions.forEach((s) => s.unsubscribe());
|
|
21466
21475
|
},
|
|
21467
|
-
maintenance
|
|
21468
|
-
|
|
21469
|
-
getTopicBacklog: (backlogOptions) => getMemoriesNeedingTopicExtractionOp(vaultCtx, backlogOptions),
|
|
21470
|
-
extractTopics: (memoryIds, extractOptions) => extractAndLinkEntitiesForMemoriesOp(vaultCtx, memoryIds, extractOptions),
|
|
21471
|
-
stampTopicsExtracted: (memoryIds, extractedAt, version) => stampTopicsExtractedAtOp(vaultCtx, memoryIds, extractedAt, version),
|
|
21472
|
-
relinkTopics: (memoryIds) => relinkMemoryTopicsOp(vaultCtx, memoryIds),
|
|
21473
|
-
backfillTopics: (memoryIds) => backfillMemoryTopicsOp(vaultCtx, memoryIds)
|
|
21474
|
-
}
|
|
21476
|
+
maintenance,
|
|
21477
|
+
topicMaintenance: maintenance
|
|
21475
21478
|
};
|
|
21476
21479
|
}
|
|
21477
21480
|
|
|
@@ -22255,7 +22258,7 @@ function createRemoteMemoryPipeline(options) {
|
|
|
22255
22258
|
const memory = {
|
|
22256
22259
|
...snapshot.memory,
|
|
22257
22260
|
content: patch.content,
|
|
22258
|
-
updated_at: patch.preserveUpdatedAt ? snapshot.memory.updated_at : Date.now()
|
|
22261
|
+
updated_at: patch.preserveUpdatedAt ? snapshot.memory.updated_at : Math.max(Date.now(), (snapshot.memory.topics_extracted_at ?? 0) + 1)
|
|
22259
22262
|
};
|
|
22260
22263
|
if (patch.scope !== void 0) memory.scope = patch.scope;
|
|
22261
22264
|
if (patch.embedding === void 0 && patch.content !== snapshot.memory.content) {
|
|
@@ -22388,6 +22391,7 @@ function projection({ memory }) {
|
|
|
22388
22391
|
};
|
|
22389
22392
|
}
|
|
22390
22393
|
function relevant(change, options) {
|
|
22394
|
+
if (change === "metadata") return false;
|
|
22391
22395
|
return options.includeDeleted ? change === "membership" : change !== "embedding" || !!options.embeddings;
|
|
22392
22396
|
}
|
|
22393
22397
|
function safely(onChange) {
|
|
@@ -22479,6 +22483,17 @@ function mergeTopics(existing, added) {
|
|
|
22479
22483
|
}
|
|
22480
22484
|
return [...byName.values()];
|
|
22481
22485
|
}
|
|
22486
|
+
function sameTopics(stored2, next) {
|
|
22487
|
+
const key = (t) => JSON.stringify([t.name, t.kind ?? null, t.source]);
|
|
22488
|
+
if (stored2 === null || stored2.length !== next.length) return false;
|
|
22489
|
+
const keys = new Set(stored2.map(key));
|
|
22490
|
+
return next.every((t) => keys.has(key(t)));
|
|
22491
|
+
}
|
|
22492
|
+
function extractionDue(memory) {
|
|
22493
|
+
const stamp = memory.topics_extracted_at;
|
|
22494
|
+
if (stamp === void 0 || stamp === null) return "fresh";
|
|
22495
|
+
return memory.updated_at > stamp || (memory.topics_extracted_version ?? 0) < TOPICS_EXTRACTION_VERSION ? "stale" : null;
|
|
22496
|
+
}
|
|
22482
22497
|
function canonicalTopics(row) {
|
|
22483
22498
|
return new Set((parseTopics(row.topics) ?? []).map((topic) => normalizeEntityName(topic.name)));
|
|
22484
22499
|
}
|
|
@@ -22491,7 +22506,12 @@ function createRemoteMemoryStore(options) {
|
|
|
22491
22506
|
const seen = /* @__PURE__ */ new Map();
|
|
22492
22507
|
let timer;
|
|
22493
22508
|
const notify = (change, records = []) => {
|
|
22494
|
-
if (timer)
|
|
22509
|
+
if (timer)
|
|
22510
|
+
for (const record2 of records) {
|
|
22511
|
+
const previous = seen.get(record2.memory.memory_id);
|
|
22512
|
+
if ((previous?.version ?? 0) + 1 === record2.version)
|
|
22513
|
+
seen.set(record2.memory.memory_id, record2);
|
|
22514
|
+
}
|
|
22495
22515
|
for (const subscriber of [...subscribers])
|
|
22496
22516
|
if (relevant(change, subscriber.options)) safely(subscriber.onChange);
|
|
22497
22517
|
};
|
|
@@ -22552,15 +22572,72 @@ function createRemoteMemoryStore(options) {
|
|
|
22552
22572
|
const record2 = await persistence.get(id);
|
|
22553
22573
|
return record2 && !record2.memory.is_deleted ? record2 : null;
|
|
22554
22574
|
};
|
|
22555
|
-
const
|
|
22575
|
+
const mutateLocked = async (id, change, edit) => {
|
|
22556
22576
|
const record2 = await live(id);
|
|
22557
22577
|
if (!record2) return null;
|
|
22558
22578
|
const next = edit(structuredClone(record2.memory));
|
|
22559
22579
|
if (!next) return null;
|
|
22560
22580
|
const saved = await persistence.put(next, record2);
|
|
22561
|
-
notify(change, [saved]);
|
|
22581
|
+
notify(typeof change === "function" ? change(record2.memory) : change, [saved]);
|
|
22562
22582
|
return saved;
|
|
22563
|
-
}
|
|
22583
|
+
};
|
|
22584
|
+
const mutate = (id, change, edit) => serialized(id, () => mutateLocked(id, change, edit));
|
|
22585
|
+
const serializedAll = (ids, task) => [...new Set(ids)].sort().reduceRight((inner, id) => () => serialized(id, inner), task)();
|
|
22586
|
+
const mutateMany = async (ids, change, edit) => {
|
|
22587
|
+
const saved = /* @__PURE__ */ new Map();
|
|
22588
|
+
const failed = /* @__PURE__ */ new Map();
|
|
22589
|
+
for (const slice of chunks([...new Set(ids)], MAX_BATCH)) {
|
|
22590
|
+
await serializedAll(slice, async () => {
|
|
22591
|
+
const writes = [];
|
|
22592
|
+
let read;
|
|
22593
|
+
try {
|
|
22594
|
+
read = await readEveryState(slice);
|
|
22595
|
+
} catch (error) {
|
|
22596
|
+
for (const id of slice) failed.set(id, error);
|
|
22597
|
+
return;
|
|
22598
|
+
}
|
|
22599
|
+
const { records, unreadable } = read;
|
|
22600
|
+
for (const id of slice) {
|
|
22601
|
+
const record2 = records.get(id);
|
|
22602
|
+
if (unreadable.has(id)) failed.set(id, new Error(`Memory ${id} could not be decrypted`));
|
|
22603
|
+
else if (!record2) failed.set(id, new Error(`Memory ${id} was not found`));
|
|
22604
|
+
else if (!record2.memory.is_deleted) {
|
|
22605
|
+
const memory = edit(structuredClone(record2.memory));
|
|
22606
|
+
if (memory) writes.push({ before: record2, memory });
|
|
22607
|
+
}
|
|
22608
|
+
}
|
|
22609
|
+
if (writes.length === 0) return;
|
|
22610
|
+
try {
|
|
22611
|
+
const written = await persistence.putMany(
|
|
22612
|
+
writes.map(({ before, memory }) => ({ memory, expectedVersion: before }))
|
|
22613
|
+
);
|
|
22614
|
+
const byChange = /* @__PURE__ */ new Map();
|
|
22615
|
+
written.forEach((record2, i) => {
|
|
22616
|
+
saved.set(record2.memory.memory_id, record2);
|
|
22617
|
+
const kind = change(writes[i].before.memory);
|
|
22618
|
+
byChange.set(kind, [...byChange.get(kind) ?? [], record2]);
|
|
22619
|
+
});
|
|
22620
|
+
for (const [kind, changed] of byChange) notify(kind, changed);
|
|
22621
|
+
} catch (error) {
|
|
22622
|
+
const perRow = error instanceof RemoteMemoryError && (error.code === "version_conflict" || error.status === 429);
|
|
22623
|
+
for (const { before } of writes) {
|
|
22624
|
+
const id = before.memory.memory_id;
|
|
22625
|
+
if (!perRow) {
|
|
22626
|
+
failed.set(id, error);
|
|
22627
|
+
continue;
|
|
22628
|
+
}
|
|
22629
|
+
try {
|
|
22630
|
+
const record2 = await mutateLocked(id, change, edit);
|
|
22631
|
+
if (record2) saved.set(id, record2);
|
|
22632
|
+
} catch (rowError) {
|
|
22633
|
+
failed.set(id, rowError);
|
|
22634
|
+
}
|
|
22635
|
+
}
|
|
22636
|
+
}
|
|
22637
|
+
});
|
|
22638
|
+
}
|
|
22639
|
+
return { saved, failed };
|
|
22640
|
+
};
|
|
22564
22641
|
const embedInBackground = ({ memory: { memory_id: id, content } }) => {
|
|
22565
22642
|
generateEmbedding(content, embeddingOptions).then(
|
|
22566
22643
|
(vector) => serialized(id, async () => {
|
|
@@ -22616,11 +22693,10 @@ function createRemoteMemoryStore(options) {
|
|
|
22616
22693
|
return records.map((record2) => stored(record2.memory));
|
|
22617
22694
|
};
|
|
22618
22695
|
const asStored = (record2) => record2 ? stored(record2.memory) : null;
|
|
22619
|
-
const
|
|
22696
|
+
const knownKinds = async (topics) => {
|
|
22620
22697
|
const unkinded = [
|
|
22621
22698
|
...new Set(topics.filter((t) => !t.kind).map((t) => normalizeEntityName(t.name)))
|
|
22622
22699
|
];
|
|
22623
|
-
if (unkinded.length === 0) return topics;
|
|
22624
22700
|
const kinds = /* @__PURE__ */ new Map();
|
|
22625
22701
|
for (const names of chunks(unkinded, MAX_QUERY_TOPICS)) {
|
|
22626
22702
|
for (const { memory } of await pages(metadata, {
|
|
@@ -22635,10 +22711,136 @@ function createRemoteMemoryStore(options) {
|
|
|
22635
22711
|
}
|
|
22636
22712
|
}
|
|
22637
22713
|
}
|
|
22638
|
-
return
|
|
22714
|
+
return (topic) => {
|
|
22639
22715
|
const kind = topic.kind ?? kinds.get(normalizeEntityName(topic.name));
|
|
22640
22716
|
return kind ? { ...topic, kind } : topic;
|
|
22641
|
-
}
|
|
22717
|
+
};
|
|
22718
|
+
};
|
|
22719
|
+
const withKnownKinds = async (topics) => topics.map(await knownKinds(topics));
|
|
22720
|
+
const readEveryState = async (ids) => {
|
|
22721
|
+
const records = /* @__PURE__ */ new Map();
|
|
22722
|
+
const unreadable = /* @__PURE__ */ new Set();
|
|
22723
|
+
for (const memory_ids of chunks(ids, MAX_QUERY_IDS)) {
|
|
22724
|
+
let cursor2;
|
|
22725
|
+
do {
|
|
22726
|
+
const page = await persistence.query({
|
|
22727
|
+
memory_ids,
|
|
22728
|
+
include_deleted: true,
|
|
22729
|
+
include_archived: true,
|
|
22730
|
+
include_quarantined: true,
|
|
22731
|
+
include_superseded: true,
|
|
22732
|
+
limit: 200,
|
|
22733
|
+
...cursor2 && { cursor: cursor2 }
|
|
22734
|
+
});
|
|
22735
|
+
warnFailed(page.failed);
|
|
22736
|
+
for (const record2 of page.items) records.set(record2.memory.memory_id, record2);
|
|
22737
|
+
for (const failure of page.failed) unreadable.add(failure.memory_id);
|
|
22738
|
+
cursor2 = page.next_cursor;
|
|
22739
|
+
} while (cursor2);
|
|
22740
|
+
}
|
|
22741
|
+
return { records, unreadable };
|
|
22742
|
+
};
|
|
22743
|
+
const topicMaintenance = {
|
|
22744
|
+
getTopicBacklog: async (backlogOptions = {}) => {
|
|
22745
|
+
const stale = [];
|
|
22746
|
+
const fresh = [];
|
|
22747
|
+
for (const { memory } of await pages(metadata, { order: "created" })) {
|
|
22748
|
+
if (memory.topics_user_managed) continue;
|
|
22749
|
+
const due = extractionDue(memory);
|
|
22750
|
+
if (due === "stale") stale.push(memory.memory_id);
|
|
22751
|
+
else if (due === "fresh") fresh.push(memory.memory_id);
|
|
22752
|
+
}
|
|
22753
|
+
const limit = backlogOptions.limit !== void 0 && backlogOptions.limit > 0 ? backlogOptions.limit : Infinity;
|
|
22754
|
+
return {
|
|
22755
|
+
pending: [...stale, ...fresh].slice(0, limit).map((uniqueId) => ({ uniqueId })),
|
|
22756
|
+
linkedUnstamped: [],
|
|
22757
|
+
topicsToRelink: [],
|
|
22758
|
+
topicsBackfill: []
|
|
22759
|
+
};
|
|
22760
|
+
},
|
|
22761
|
+
extractTopics: async (memoryIds, extractOptions) => {
|
|
22762
|
+
const extractedAt = extractOptions.now ?? Date.now();
|
|
22763
|
+
const skippedIds = [];
|
|
22764
|
+
const skippedReasons = /* @__PURE__ */ new Map();
|
|
22765
|
+
const skip = (id, reason) => {
|
|
22766
|
+
if (skippedReasons.has(id)) return;
|
|
22767
|
+
skippedIds.push(id);
|
|
22768
|
+
skippedReasons.set(id, reason);
|
|
22769
|
+
};
|
|
22770
|
+
const ids = [...new Set(memoryIds)];
|
|
22771
|
+
const { records, unreadable } = await readEveryState(ids);
|
|
22772
|
+
const inputs = [];
|
|
22773
|
+
for (const id of ids) {
|
|
22774
|
+
const memory = records.get(id)?.memory;
|
|
22775
|
+
if (unreadable.has(id)) skip(id, "unreadable");
|
|
22776
|
+
else if (!memory) skip(id, "not-found");
|
|
22777
|
+
else if (memory.is_deleted || memory.topics_user_managed) skip(id, "excluded");
|
|
22778
|
+
else inputs.push({ id, content: memory.content });
|
|
22779
|
+
}
|
|
22780
|
+
const entitiesByMemory = await extractEntitiesForMemories(inputs, extractOptions);
|
|
22781
|
+
const answered = /* @__PURE__ */ new Map();
|
|
22782
|
+
for (const input of inputs) {
|
|
22783
|
+
const entities = entitiesByMemory.get(input.id);
|
|
22784
|
+
if (entities === void 0) skip(input.id, "llm-unanswered");
|
|
22785
|
+
else
|
|
22786
|
+
answered.set(input.id, { content: input.content, topics: topicInputs(entities, "auto") });
|
|
22787
|
+
}
|
|
22788
|
+
const stampedIds = [];
|
|
22789
|
+
const fail = (id, reason) => {
|
|
22790
|
+
skip(id, reason);
|
|
22791
|
+
entitiesByMemory.delete(id);
|
|
22792
|
+
};
|
|
22793
|
+
try {
|
|
22794
|
+
const kinded = await knownKinds([...answered.values()].flatMap((a) => a.topics));
|
|
22795
|
+
const topics = new Map(
|
|
22796
|
+
[...answered].map(([id, a]) => [id, mergeTopics([], a.topics.map(kinded))])
|
|
22797
|
+
);
|
|
22798
|
+
const unchanged = (memory) => sameTopics(parseTopics(memory.topics), topics.get(memory.memory_id));
|
|
22799
|
+
const { saved, failed } = await mutateMany(
|
|
22800
|
+
[...answered.keys()],
|
|
22801
|
+
(before) => sameTopics(parseTopics(before.topics) ?? [], topics.get(before.memory_id)) ? "metadata" : "edit",
|
|
22802
|
+
(memory) => {
|
|
22803
|
+
if (memory.topics_user_managed || memory.content !== answered.get(memory.memory_id).content)
|
|
22804
|
+
return null;
|
|
22805
|
+
return {
|
|
22806
|
+
...memory,
|
|
22807
|
+
...!unchanged(memory) && {
|
|
22808
|
+
topics: serializeTopics(topics.get(memory.memory_id)),
|
|
22809
|
+
topics_updated_at: Date.now()
|
|
22810
|
+
},
|
|
22811
|
+
topics_extracted_at: Math.max(extractedAt, memory.updated_at),
|
|
22812
|
+
topics_extracted_version: TOPICS_EXTRACTION_VERSION
|
|
22813
|
+
};
|
|
22814
|
+
}
|
|
22815
|
+
);
|
|
22816
|
+
for (const id of answered.keys()) {
|
|
22817
|
+
if (saved.has(id)) stampedIds.push(id);
|
|
22818
|
+
else fail(id, failed.has(id) ? "link-failed" : "link-declined");
|
|
22819
|
+
}
|
|
22820
|
+
if (failed.size)
|
|
22821
|
+
getLogger().warn(
|
|
22822
|
+
"[memory/remote-store] Failed to write extracted topics:",
|
|
22823
|
+
failed.values().next().value
|
|
22824
|
+
);
|
|
22825
|
+
} catch (error) {
|
|
22826
|
+
getLogger().warn("[memory/remote-store] Failed to write extracted topics:", error);
|
|
22827
|
+
for (const id of answered.keys()) fail(id, "link-failed");
|
|
22828
|
+
}
|
|
22829
|
+
return { entitiesByMemory, stampedIds, skippedIds, skippedReasons };
|
|
22830
|
+
},
|
|
22831
|
+
stampTopicsExtracted: async (memoryIds, extractedAt, version = TOPICS_EXTRACTION_VERSION) => {
|
|
22832
|
+
const ids = [...new Set(memoryIds)];
|
|
22833
|
+
const { saved, failed } = await mutateMany(
|
|
22834
|
+
ids,
|
|
22835
|
+
() => "metadata",
|
|
22836
|
+
(memory) => memory.topics_user_managed ? null : { ...memory, topics_extracted_at: extractedAt, topics_extracted_version: version }
|
|
22837
|
+
);
|
|
22838
|
+
if (failed.size)
|
|
22839
|
+
getLogger().warn("[memory/remote-store] Failed to stamp topics:", [...failed.values()]);
|
|
22840
|
+
return ids.filter((id) => saved.has(id));
|
|
22841
|
+
},
|
|
22842
|
+
relinkTopics: () => Promise.resolve([]),
|
|
22843
|
+
backfillTopics: () => Promise.resolve([])
|
|
22642
22844
|
};
|
|
22643
22845
|
const everyState = {
|
|
22644
22846
|
include_deleted: true,
|
|
@@ -22717,6 +22919,7 @@ function createRemoteMemoryStore(options) {
|
|
|
22717
22919
|
};
|
|
22718
22920
|
return {
|
|
22719
22921
|
masksEmbeddingInput: embeddingOptions.maskInput !== void 0,
|
|
22922
|
+
topicMaintenance,
|
|
22720
22923
|
list: async (listOptions = {}) => (await listRows(decrypted, listOptions, listFilters(listOptions), maxOf(listOptions))).map(
|
|
22721
22924
|
(r) => stored(r.memory)
|
|
22722
22925
|
),
|
|
@@ -22801,7 +23004,7 @@ function createRemoteMemoryStore(options) {
|
|
|
22801
23004
|
const kind = patch.kind !== void 0 ? patch.kind : memory.kind;
|
|
22802
23005
|
assertValidKindLevel(kind, level);
|
|
22803
23006
|
memory.content = patch.content;
|
|
22804
|
-
memory.updated_at = Date.now();
|
|
23007
|
+
memory.updated_at = Math.max(Date.now(), (memory.topics_extracted_at ?? 0) + 1);
|
|
22805
23008
|
if (patch.level !== void 0) {
|
|
22806
23009
|
memory.level = level;
|
|
22807
23010
|
memory.scope = scopeForLevel(level);
|
package/dist/server/index.cjs
CHANGED
|
@@ -35127,6 +35127,14 @@ function createLocalMemoryStore(options) {
|
|
|
35127
35127
|
getLogger().warn("[memory/store] Failed to embed memory:", err);
|
|
35128
35128
|
});
|
|
35129
35129
|
};
|
|
35130
|
+
const maintenance = {
|
|
35131
|
+
createDecaySweeper: (sweeperOptions) => createDecaySweeper({ ...sweeperOptions, vaultCtx }),
|
|
35132
|
+
getTopicBacklog: (backlogOptions) => getMemoriesNeedingTopicExtractionOp(vaultCtx, backlogOptions),
|
|
35133
|
+
extractTopics: (memoryIds, extractOptions) => extractAndLinkEntitiesForMemoriesOp(vaultCtx, memoryIds, extractOptions),
|
|
35134
|
+
stampTopicsExtracted: (memoryIds, extractedAt, version) => stampTopicsExtractedAtOp(vaultCtx, memoryIds, extractedAt, version),
|
|
35135
|
+
relinkTopics: (memoryIds) => relinkMemoryTopicsOp(vaultCtx, memoryIds),
|
|
35136
|
+
backfillTopics: (memoryIds) => backfillMemoryTopicsOp(vaultCtx, memoryIds)
|
|
35137
|
+
};
|
|
35130
35138
|
return {
|
|
35131
35139
|
masksEmbeddingInput: options.embeddingOptions.maskInput !== void 0,
|
|
35132
35140
|
list: (listOptions) => getAllVaultMemoriesOp(vaultCtx, listOptions),
|
|
@@ -35140,21 +35148,22 @@ function createLocalMemoryStore(options) {
|
|
|
35140
35148
|
memoriesByTopics: (names) => getMemoriesByEntityNamesOp(entityCtx, names),
|
|
35141
35149
|
topicsByMemories: (memoryIds) => getEntitiesByMemoryIdsOp(entityCtx, memoryIds),
|
|
35142
35150
|
listTopics: async () => {
|
|
35143
|
-
const links = await entityCtx.memoryEntityCollection.query(...linksOwnedBy).
|
|
35151
|
+
const links = await entityCtx.memoryEntityCollection.query(...linksOwnedBy).unsafeFetchRaw();
|
|
35144
35152
|
const members = /* @__PURE__ */ new Map();
|
|
35145
35153
|
for (const link of links) {
|
|
35146
|
-
const entityId = String(link.
|
|
35154
|
+
const entityId = String(link.entity_id);
|
|
35147
35155
|
const set = members.get(entityId) ?? /* @__PURE__ */ new Set();
|
|
35148
|
-
set.add(String(link.
|
|
35156
|
+
set.add(String(link.memory_id));
|
|
35149
35157
|
members.set(entityId, set);
|
|
35150
35158
|
}
|
|
35151
|
-
const entities = userId === void 0 ? await entityCtx.entityCollection.query().
|
|
35159
|
+
const entities = userId === void 0 ? await entityCtx.entityCollection.query().unsafeFetchRaw() : members.size ? await entityCtx.entityCollection.query(import_watermelondb24.Q.where("id", import_watermelondb24.Q.oneOf([...members.keys()]))).unsafeFetchRaw() : [];
|
|
35152
35160
|
const byName = /* @__PURE__ */ new Map();
|
|
35153
35161
|
for (const entity of entities) {
|
|
35154
|
-
const
|
|
35155
|
-
const
|
|
35156
|
-
byName.
|
|
35157
|
-
|
|
35162
|
+
const name = String(entity.canonical_name);
|
|
35163
|
+
const count = members.get(String(entity.id))?.size ?? 0;
|
|
35164
|
+
const existing = byName.get(name);
|
|
35165
|
+
byName.set(name, {
|
|
35166
|
+
name,
|
|
35158
35167
|
kind: existing?.kind ?? entity.kind ?? null,
|
|
35159
35168
|
memoryCount: (existing?.memoryCount ?? 0) + count
|
|
35160
35169
|
});
|
|
@@ -35245,14 +35254,8 @@ function createLocalMemoryStore(options) {
|
|
|
35245
35254
|
}
|
|
35246
35255
|
return () => subscriptions.forEach((s) => s.unsubscribe());
|
|
35247
35256
|
},
|
|
35248
|
-
maintenance
|
|
35249
|
-
|
|
35250
|
-
getTopicBacklog: (backlogOptions) => getMemoriesNeedingTopicExtractionOp(vaultCtx, backlogOptions),
|
|
35251
|
-
extractTopics: (memoryIds, extractOptions) => extractAndLinkEntitiesForMemoriesOp(vaultCtx, memoryIds, extractOptions),
|
|
35252
|
-
stampTopicsExtracted: (memoryIds, extractedAt, version) => stampTopicsExtractedAtOp(vaultCtx, memoryIds, extractedAt, version),
|
|
35253
|
-
relinkTopics: (memoryIds) => relinkMemoryTopicsOp(vaultCtx, memoryIds),
|
|
35254
|
-
backfillTopics: (memoryIds) => backfillMemoryTopicsOp(vaultCtx, memoryIds)
|
|
35255
|
-
}
|
|
35257
|
+
maintenance,
|
|
35258
|
+
topicMaintenance: maintenance
|
|
35256
35259
|
};
|
|
35257
35260
|
}
|
|
35258
35261
|
|
package/dist/server/index.d.mts
CHANGED
|
@@ -6173,13 +6173,33 @@ interface MemorySubscribeOptions {
|
|
|
6173
6173
|
* from the main interface.
|
|
6174
6174
|
* @public
|
|
6175
6175
|
*/
|
|
6176
|
-
interface MemoryMaintenance {
|
|
6176
|
+
interface MemoryMaintenance extends MemoryTopicMaintenance {
|
|
6177
6177
|
/** Decay sweeper bound to this store's vault (see `createDecaySweeper`). */
|
|
6178
6178
|
createDecaySweeper(options?: Omit<CreateDecaySweeperOptions, "vaultCtx">): DecaySweeper;
|
|
6179
6179
|
/** One page of the topic-extraction backlog (see `getMemoriesNeedingTopicExtractionOp`). */
|
|
6180
6180
|
getTopicBacklog(options?: {
|
|
6181
6181
|
limit?: number;
|
|
6182
6182
|
}): Promise<MemoriesNeedingTopicExtraction>;
|
|
6183
|
+
}
|
|
6184
|
+
/** @public */
|
|
6185
|
+
interface MemoryTopicBacklog {
|
|
6186
|
+
pending: readonly {
|
|
6187
|
+
uniqueId: string;
|
|
6188
|
+
}[];
|
|
6189
|
+
linkedUnstamped: readonly string[];
|
|
6190
|
+
topicsToRelink: readonly string[];
|
|
6191
|
+
topicsBackfill: readonly string[];
|
|
6192
|
+
}
|
|
6193
|
+
/**
|
|
6194
|
+
* Topic-extraction upkeep for either backend. On a remote store `pending` carries ids only, the
|
|
6195
|
+
* other backlog lists are always empty, and `relinkTopics` / `backfillTopics` do nothing.
|
|
6196
|
+
* @public
|
|
6197
|
+
*/
|
|
6198
|
+
interface MemoryTopicMaintenance {
|
|
6199
|
+
/** One page of the topic-extraction backlog, edited or outdated rows first. */
|
|
6200
|
+
getTopicBacklog(options?: {
|
|
6201
|
+
limit?: number;
|
|
6202
|
+
}): Promise<MemoryTopicBacklog>;
|
|
6183
6203
|
/** LLM topic extraction + link + stamp for these memories. */
|
|
6184
6204
|
extractTopics(memoryIds: readonly string[], options: TopicExtractOptions & {
|
|
6185
6205
|
now?: number;
|
|
@@ -6256,6 +6276,8 @@ interface MemoryStore {
|
|
|
6256
6276
|
subscribe(onChange: () => void, options?: MemorySubscribeOptions): () => void;
|
|
6257
6277
|
/** TRANSITIONAL — see {@link MemoryMaintenance}. Absent on a remote backend. */
|
|
6258
6278
|
maintenance?: MemoryMaintenance;
|
|
6279
|
+
/** Topic-extraction upkeep, available on every backend. */
|
|
6280
|
+
readonly topicMaintenance: MemoryTopicMaintenance;
|
|
6259
6281
|
}
|
|
6260
6282
|
|
|
6261
6283
|
/**
|
|
@@ -10856,4 +10878,4 @@ declare class PostgreSQLAdapter implements DatabaseAdapter {
|
|
|
10856
10878
|
*/
|
|
10857
10879
|
declare function serverPlatformStorage(): PlatformStorage;
|
|
10858
10880
|
|
|
10859
|
-
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationAction, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, type LocalMemoryStoreOptions, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryUpdate, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, VaultMemory, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, assembleMemoryContext, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, deriveKeyFromSignatureBytes, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
|
|
10881
|
+
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationAction, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, type LocalMemoryStoreOptions, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, VaultMemory, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, assembleMemoryContext, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, deriveKeyFromSignatureBytes, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
|
package/dist/server/index.d.ts
CHANGED
|
@@ -6173,13 +6173,33 @@ interface MemorySubscribeOptions {
|
|
|
6173
6173
|
* from the main interface.
|
|
6174
6174
|
* @public
|
|
6175
6175
|
*/
|
|
6176
|
-
interface MemoryMaintenance {
|
|
6176
|
+
interface MemoryMaintenance extends MemoryTopicMaintenance {
|
|
6177
6177
|
/** Decay sweeper bound to this store's vault (see `createDecaySweeper`). */
|
|
6178
6178
|
createDecaySweeper(options?: Omit<CreateDecaySweeperOptions, "vaultCtx">): DecaySweeper;
|
|
6179
6179
|
/** One page of the topic-extraction backlog (see `getMemoriesNeedingTopicExtractionOp`). */
|
|
6180
6180
|
getTopicBacklog(options?: {
|
|
6181
6181
|
limit?: number;
|
|
6182
6182
|
}): Promise<MemoriesNeedingTopicExtraction>;
|
|
6183
|
+
}
|
|
6184
|
+
/** @public */
|
|
6185
|
+
interface MemoryTopicBacklog {
|
|
6186
|
+
pending: readonly {
|
|
6187
|
+
uniqueId: string;
|
|
6188
|
+
}[];
|
|
6189
|
+
linkedUnstamped: readonly string[];
|
|
6190
|
+
topicsToRelink: readonly string[];
|
|
6191
|
+
topicsBackfill: readonly string[];
|
|
6192
|
+
}
|
|
6193
|
+
/**
|
|
6194
|
+
* Topic-extraction upkeep for either backend. On a remote store `pending` carries ids only, the
|
|
6195
|
+
* other backlog lists are always empty, and `relinkTopics` / `backfillTopics` do nothing.
|
|
6196
|
+
* @public
|
|
6197
|
+
*/
|
|
6198
|
+
interface MemoryTopicMaintenance {
|
|
6199
|
+
/** One page of the topic-extraction backlog, edited or outdated rows first. */
|
|
6200
|
+
getTopicBacklog(options?: {
|
|
6201
|
+
limit?: number;
|
|
6202
|
+
}): Promise<MemoryTopicBacklog>;
|
|
6183
6203
|
/** LLM topic extraction + link + stamp for these memories. */
|
|
6184
6204
|
extractTopics(memoryIds: readonly string[], options: TopicExtractOptions & {
|
|
6185
6205
|
now?: number;
|
|
@@ -6256,6 +6276,8 @@ interface MemoryStore {
|
|
|
6256
6276
|
subscribe(onChange: () => void, options?: MemorySubscribeOptions): () => void;
|
|
6257
6277
|
/** TRANSITIONAL — see {@link MemoryMaintenance}. Absent on a remote backend. */
|
|
6258
6278
|
maintenance?: MemoryMaintenance;
|
|
6279
|
+
/** Topic-extraction upkeep, available on every backend. */
|
|
6280
|
+
readonly topicMaintenance: MemoryTopicMaintenance;
|
|
6259
6281
|
}
|
|
6260
6282
|
|
|
6261
6283
|
/**
|
|
@@ -10856,4 +10878,4 @@ declare class PostgreSQLAdapter implements DatabaseAdapter {
|
|
|
10856
10878
|
*/
|
|
10857
10879
|
declare function serverPlatformStorage(): PlatformStorage;
|
|
10858
10880
|
|
|
10859
|
-
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationAction, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, type LocalMemoryStoreOptions, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryUpdate, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, VaultMemory, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, assembleMemoryContext, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, deriveKeyFromSignatureBytes, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
|
|
10881
|
+
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationAction, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, type LocalMemoryStoreOptions, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, VaultMemory, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, assembleMemoryContext, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, deriveKeyFromSignatureBytes, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
|