@anuma/sdk 7.2.0 → 7.3.1
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 +169 -68
- package/dist/expo/index.d.mts +8 -2
- package/dist/expo/index.d.ts +8 -2
- package/dist/expo/index.mjs +169 -68
- package/dist/react/index.cjs +167 -68
- package/dist/react/index.d.mts +8 -2
- package/dist/react/index.d.ts +8 -2
- package/dist/react/index.mjs +167 -68
- package/dist/server/index.cjs +144 -65
- package/dist/server/index.d.mts +3 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.mjs +144 -65
- package/package.json +1 -1
package/dist/expo/index.cjs
CHANGED
|
@@ -12722,9 +12722,72 @@ init_logger();
|
|
|
12722
12722
|
|
|
12723
12723
|
// src/lib/db/entities/operations.ts
|
|
12724
12724
|
var import_watermelondb19 = require("@nozbe/watermelondb");
|
|
12725
|
+
|
|
12726
|
+
// src/lib/db/memoryVault/types.ts
|
|
12727
|
+
var MEMORY_KINDS = [
|
|
12728
|
+
"display_name",
|
|
12729
|
+
"birth_date",
|
|
12730
|
+
"bio",
|
|
12731
|
+
"occupation",
|
|
12732
|
+
"interest",
|
|
12733
|
+
"gender",
|
|
12734
|
+
"height_cm",
|
|
12735
|
+
"looking_for",
|
|
12736
|
+
"politics",
|
|
12737
|
+
"religion",
|
|
12738
|
+
"ethnicity",
|
|
12739
|
+
"smoking",
|
|
12740
|
+
"drinking",
|
|
12741
|
+
"exercise",
|
|
12742
|
+
"sexuality",
|
|
12743
|
+
"prompt"
|
|
12744
|
+
];
|
|
12745
|
+
var MEMORY_LEVELS = ["private", "matching", "profile"];
|
|
12746
|
+
var MemoryLevelError = class extends Error {
|
|
12747
|
+
constructor(message) {
|
|
12748
|
+
super(message);
|
|
12749
|
+
this.name = "MemoryLevelError";
|
|
12750
|
+
}
|
|
12751
|
+
};
|
|
12752
|
+
var MemorySourceIneligibleError = class extends Error {
|
|
12753
|
+
constructor() {
|
|
12754
|
+
super("Memory source is no longer eligible");
|
|
12755
|
+
this.name = "MemorySourceIneligibleError";
|
|
12756
|
+
}
|
|
12757
|
+
};
|
|
12758
|
+
var PUBLISHED_SCOPES = /* @__PURE__ */ new Set(["shared", "public"]);
|
|
12759
|
+
function levelFromScope(scope) {
|
|
12760
|
+
return typeof scope === "string" && PUBLISHED_SCOPES.has(scope) ? "matching" : "private";
|
|
12761
|
+
}
|
|
12762
|
+
function scopeForLevel(level) {
|
|
12763
|
+
return level === "private" ? "private" : "shared";
|
|
12764
|
+
}
|
|
12765
|
+
function resolveMemoryLevel(level, scope) {
|
|
12766
|
+
return typeof level === "string" && MEMORY_LEVELS.includes(level) ? level : levelFromScope(scope);
|
|
12767
|
+
}
|
|
12768
|
+
function levelForScopeChange(current, nextScope) {
|
|
12769
|
+
const implied = levelFromScope(nextScope);
|
|
12770
|
+
return implied === "matching" && resolveMemoryLevel(current.level, current.scope) === "profile" ? "profile" : implied;
|
|
12771
|
+
}
|
|
12772
|
+
function parseMedia(value) {
|
|
12773
|
+
if (typeof value !== "string" || value === "") return null;
|
|
12774
|
+
try {
|
|
12775
|
+
const parsed = JSON.parse(value);
|
|
12776
|
+
if (!Array.isArray(parsed)) return null;
|
|
12777
|
+
const refs = parsed.filter((r) => typeof r === "object" && r !== null).map((r) => ({
|
|
12778
|
+
feedItemId: Number(r.feedItemId ?? r.feed_item_id),
|
|
12779
|
+
objectKey: r.objectKey ?? r.object_key ?? null
|
|
12780
|
+
})).filter((r) => Number.isFinite(r.feedItemId));
|
|
12781
|
+
return refs.length > 0 ? refs : null;
|
|
12782
|
+
} catch {
|
|
12783
|
+
return null;
|
|
12784
|
+
}
|
|
12785
|
+
}
|
|
12786
|
+
|
|
12787
|
+
// src/lib/db/entities/operations.ts
|
|
12725
12788
|
async function assertCanWrite(ctx) {
|
|
12726
12789
|
if (ctx.canWrite && !await ctx.canWrite()) {
|
|
12727
|
-
throw new
|
|
12790
|
+
throw new MemorySourceIneligibleError();
|
|
12728
12791
|
}
|
|
12729
12792
|
}
|
|
12730
12793
|
function entityToStored(e) {
|
|
@@ -13117,61 +13180,6 @@ function serializeSourceChunkIds(ids) {
|
|
|
13117
13180
|
return JSON.stringify(ids.slice(start));
|
|
13118
13181
|
}
|
|
13119
13182
|
|
|
13120
|
-
// src/lib/db/memoryVault/types.ts
|
|
13121
|
-
var MEMORY_KINDS = [
|
|
13122
|
-
"display_name",
|
|
13123
|
-
"birth_date",
|
|
13124
|
-
"bio",
|
|
13125
|
-
"occupation",
|
|
13126
|
-
"interest",
|
|
13127
|
-
"gender",
|
|
13128
|
-
"height_cm",
|
|
13129
|
-
"looking_for",
|
|
13130
|
-
"politics",
|
|
13131
|
-
"religion",
|
|
13132
|
-
"ethnicity",
|
|
13133
|
-
"smoking",
|
|
13134
|
-
"drinking",
|
|
13135
|
-
"exercise",
|
|
13136
|
-
"sexuality",
|
|
13137
|
-
"prompt"
|
|
13138
|
-
];
|
|
13139
|
-
var MEMORY_LEVELS = ["private", "matching", "profile"];
|
|
13140
|
-
var MemoryLevelError = class extends Error {
|
|
13141
|
-
constructor(message) {
|
|
13142
|
-
super(message);
|
|
13143
|
-
this.name = "MemoryLevelError";
|
|
13144
|
-
}
|
|
13145
|
-
};
|
|
13146
|
-
var PUBLISHED_SCOPES = /* @__PURE__ */ new Set(["shared", "public"]);
|
|
13147
|
-
function levelFromScope(scope) {
|
|
13148
|
-
return typeof scope === "string" && PUBLISHED_SCOPES.has(scope) ? "matching" : "private";
|
|
13149
|
-
}
|
|
13150
|
-
function scopeForLevel(level) {
|
|
13151
|
-
return level === "private" ? "private" : "shared";
|
|
13152
|
-
}
|
|
13153
|
-
function resolveMemoryLevel(level, scope) {
|
|
13154
|
-
return typeof level === "string" && MEMORY_LEVELS.includes(level) ? level : levelFromScope(scope);
|
|
13155
|
-
}
|
|
13156
|
-
function levelForScopeChange(current, nextScope) {
|
|
13157
|
-
const implied = levelFromScope(nextScope);
|
|
13158
|
-
return implied === "matching" && resolveMemoryLevel(current.level, current.scope) === "profile" ? "profile" : implied;
|
|
13159
|
-
}
|
|
13160
|
-
function parseMedia(value) {
|
|
13161
|
-
if (typeof value !== "string" || value === "") return null;
|
|
13162
|
-
try {
|
|
13163
|
-
const parsed = JSON.parse(value);
|
|
13164
|
-
if (!Array.isArray(parsed)) return null;
|
|
13165
|
-
const refs = parsed.filter((r) => typeof r === "object" && r !== null).map((r) => ({
|
|
13166
|
-
feedItemId: Number(r.feedItemId ?? r.feed_item_id),
|
|
13167
|
-
objectKey: r.objectKey ?? r.object_key ?? null
|
|
13168
|
-
})).filter((r) => Number.isFinite(r.feedItemId));
|
|
13169
|
-
return refs.length > 0 ? refs : null;
|
|
13170
|
-
} catch {
|
|
13171
|
-
return null;
|
|
13172
|
-
}
|
|
13173
|
-
}
|
|
13174
|
-
|
|
13175
13183
|
// src/lib/db/memoryVault/operations.ts
|
|
13176
13184
|
function visibilityOrPrivate(value) {
|
|
13177
13185
|
return value === "public" ? value : "private";
|
|
@@ -13191,7 +13199,7 @@ function isKinded(record2) {
|
|
|
13191
13199
|
}
|
|
13192
13200
|
async function assertCanWrite2(ctx) {
|
|
13193
13201
|
if (ctx.canWrite && !await ctx.canWrite()) {
|
|
13194
|
-
throw new
|
|
13202
|
+
throw new MemorySourceIneligibleError();
|
|
13195
13203
|
}
|
|
13196
13204
|
}
|
|
13197
13205
|
function assertValidKindLevel(kind, level) {
|
|
@@ -13882,7 +13890,7 @@ async function updateVaultMemoryOp(ctx, id, opts) {
|
|
|
13882
13890
|
ctx.embeddedWalletSigner
|
|
13883
13891
|
);
|
|
13884
13892
|
} catch (err) {
|
|
13885
|
-
if (err instanceof MemoryLevelError) throw err;
|
|
13893
|
+
if (err instanceof MemoryLevelError || err instanceof MemorySourceIneligibleError) throw err;
|
|
13886
13894
|
return null;
|
|
13887
13895
|
}
|
|
13888
13896
|
}
|
|
@@ -17423,6 +17431,13 @@ var DEFAULT_AUTO_MERGE_THRESHOLD = 0.8;
|
|
|
17423
17431
|
var DEFAULT_SCOPE = "private";
|
|
17424
17432
|
var DEFAULT_CONSOLIDATE_THRESHOLD = 0.55;
|
|
17425
17433
|
var DEFAULT_CONSOLIDATE_TOP_K = 20;
|
|
17434
|
+
var RetainError = class extends Error {
|
|
17435
|
+
constructor(reason, message) {
|
|
17436
|
+
super(message);
|
|
17437
|
+
this.reason = reason;
|
|
17438
|
+
this.name = "RetainError";
|
|
17439
|
+
}
|
|
17440
|
+
};
|
|
17426
17441
|
async function retain(content, ctx, options = {}) {
|
|
17427
17442
|
const embeddingOptions = {
|
|
17428
17443
|
...ctx.embeddingOptions,
|
|
@@ -17478,7 +17493,8 @@ async function retainWithPersistence(content, ctx, options = {}) {
|
|
|
17478
17493
|
});
|
|
17479
17494
|
prepared = withoutKindedRows(prepared);
|
|
17480
17495
|
if (prepared.embeddingFailure || prepared.embeddingsUnavailable) {
|
|
17481
|
-
throw new
|
|
17496
|
+
throw new RetainError(
|
|
17497
|
+
"embeddings-unavailable",
|
|
17482
17498
|
"retain: embeddings unavailable \u2014 refusing to auto-merge against an inert cosine lane, which would create a duplicate instead of merging into the existing memory. Retry when embeddings recover, or pass enableAutoMerge: false to force a create."
|
|
17483
17499
|
);
|
|
17484
17500
|
}
|
|
@@ -17848,7 +17864,10 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
|
|
|
17848
17864
|
async function assertMergeTargetGoneOrThrow(ctx, targetId) {
|
|
17849
17865
|
const stillExists = await (ctx.persistence.getFresh ? ctx.persistence.getFresh(targetId) : ctx.persistence.get(targetId));
|
|
17850
17866
|
if (stillExists && (stillExists.kind === null || stillExists.kind === void 0)) {
|
|
17851
|
-
throw new
|
|
17867
|
+
throw new RetainError(
|
|
17868
|
+
"merge-not-persisted",
|
|
17869
|
+
`retain: merge into memory ${targetId} failed to persist`
|
|
17870
|
+
);
|
|
17852
17871
|
}
|
|
17853
17872
|
}
|
|
17854
17873
|
|
|
@@ -18006,6 +18025,12 @@ function restoreCandidates(candidates, redactor, ownNames) {
|
|
|
18006
18025
|
(c) => c.candidate.content.length <= MAX_CONTENT_LENGTH && !c.unresolved && !isLowSignalContent(c.candidate.content, ownNames)
|
|
18007
18026
|
).map((c) => c.candidate);
|
|
18008
18027
|
}
|
|
18028
|
+
function writeFailureReasonOf(err) {
|
|
18029
|
+
if (err instanceof MemorySourceIneligibleError) return "source-ineligible";
|
|
18030
|
+
if (err instanceof RetainError) return err.reason;
|
|
18031
|
+
if (err?.name === "AbortError") return "aborted";
|
|
18032
|
+
return "unknown";
|
|
18033
|
+
}
|
|
18009
18034
|
async function extractAndRetain(messages, retainCtx, options) {
|
|
18010
18035
|
const { memoryStore, signal } = options;
|
|
18011
18036
|
if (memoryStore === null) throw new Error("Memory store is not ready");
|
|
@@ -18095,6 +18120,7 @@ async function extractAndRetain(messages, retainCtx, options) {
|
|
|
18095
18120
|
const results = [];
|
|
18096
18121
|
const quarantinedInfo = [];
|
|
18097
18122
|
let failedWrites = 0;
|
|
18123
|
+
let writeFailureReason;
|
|
18098
18124
|
let auditRows;
|
|
18099
18125
|
const tRetain = Date.now();
|
|
18100
18126
|
for (const { candidate, isQuarantined, reason, signature } of toRetain) {
|
|
@@ -18190,6 +18216,7 @@ async function extractAndRetain(messages, retainCtx, options) {
|
|
|
18190
18216
|
}
|
|
18191
18217
|
} catch (err) {
|
|
18192
18218
|
failedWrites++;
|
|
18219
|
+
writeFailureReason ?? (writeFailureReason = writeFailureReasonOf(err));
|
|
18193
18220
|
log.warn("[memory/extract] retain failed for one candidate", err);
|
|
18194
18221
|
options.onCandidateFailed?.(candidate, err);
|
|
18195
18222
|
}
|
|
@@ -18202,6 +18229,7 @@ async function extractAndRetain(messages, retainCtx, options) {
|
|
|
18202
18229
|
candidates: succeededCandidates,
|
|
18203
18230
|
results,
|
|
18204
18231
|
failedCount: failedWrites,
|
|
18232
|
+
...writeFailureReason !== void 0 && { writeFailureReason },
|
|
18205
18233
|
outcome: outcome2,
|
|
18206
18234
|
quarantined: quarantinedInfo,
|
|
18207
18235
|
funnel: {
|
|
@@ -18472,7 +18500,17 @@ function createAutoExtractor(options) {
|
|
|
18472
18500
|
const t0 = Date.now();
|
|
18473
18501
|
void (async () => {
|
|
18474
18502
|
try {
|
|
18475
|
-
const {
|
|
18503
|
+
const {
|
|
18504
|
+
candidates,
|
|
18505
|
+
results,
|
|
18506
|
+
failedCount,
|
|
18507
|
+
writeFailureReason,
|
|
18508
|
+
outcome: outcome2,
|
|
18509
|
+
failure,
|
|
18510
|
+
funnel,
|
|
18511
|
+
timings,
|
|
18512
|
+
model
|
|
18513
|
+
} = await extractAndRetain(window2, retainCtx, {
|
|
18476
18514
|
extract,
|
|
18477
18515
|
memoryStore: options.memoryStore,
|
|
18478
18516
|
signal: options.signal,
|
|
@@ -18508,6 +18546,7 @@ function createAutoExtractor(options) {
|
|
|
18508
18546
|
candidates,
|
|
18509
18547
|
results,
|
|
18510
18548
|
failedCount,
|
|
18549
|
+
...writeFailureReason !== void 0 && { writeFailureReason },
|
|
18511
18550
|
durationMs: Date.now() - t0,
|
|
18512
18551
|
conversationId,
|
|
18513
18552
|
outcome: outcome2,
|
|
@@ -20613,10 +20652,10 @@ function createLocalMemoryStore(options) {
|
|
|
20613
20652
|
const assertWrite = async (writeOptions) => {
|
|
20614
20653
|
writeOptions?.signal?.throwIfAborted();
|
|
20615
20654
|
if (writeOptions?.canWrite && !await writeOptions.canWrite()) {
|
|
20616
|
-
throw new
|
|
20655
|
+
throw new MemorySourceIneligibleError();
|
|
20617
20656
|
}
|
|
20618
20657
|
if (options.canWrite && !await options.canWrite()) {
|
|
20619
|
-
throw new
|
|
20658
|
+
throw new MemorySourceIneligibleError();
|
|
20620
20659
|
}
|
|
20621
20660
|
writeOptions?.signal?.throwIfAborted();
|
|
20622
20661
|
};
|
|
@@ -20962,6 +21001,7 @@ var queryFields = [
|
|
|
20962
21001
|
"updated_after",
|
|
20963
21002
|
"topics_due",
|
|
20964
21003
|
"topics_extracted",
|
|
21004
|
+
"event_time_overlaps",
|
|
20965
21005
|
"order",
|
|
20966
21006
|
"cursor",
|
|
20967
21007
|
"limit",
|
|
@@ -21429,7 +21469,7 @@ function createRemoteMemoryPipeline(options) {
|
|
|
21429
21469
|
const assertWrite = async () => {
|
|
21430
21470
|
signal?.throwIfAborted();
|
|
21431
21471
|
if (writeOptions?.canWrite && !await writeOptions.canWrite())
|
|
21432
|
-
throw new
|
|
21472
|
+
throw new MemorySourceIneligibleError();
|
|
21433
21473
|
signal?.throwIfAborted();
|
|
21434
21474
|
};
|
|
21435
21475
|
const rejectUndecryptable = (failed) => {
|
|
@@ -22211,6 +22251,7 @@ var MAX_QUERY_IDS = 1e3;
|
|
|
22211
22251
|
var MAX_QUERY_TOPICS = 100;
|
|
22212
22252
|
var MAX_QUERY_FILTER = 20;
|
|
22213
22253
|
var GRAPH_LANE_ROWS = 256;
|
|
22254
|
+
var TEMPORAL_LANE_ROWS = 256;
|
|
22214
22255
|
var RemoteMemoryPartialCreateError = class extends Error {
|
|
22215
22256
|
constructor(created, cause) {
|
|
22216
22257
|
super(`createMany stored ${created.length} memories before a batch failed`);
|
|
@@ -22309,7 +22350,7 @@ function createRemoteMemoryStore(options) {
|
|
|
22309
22350
|
const pipeline = createRemoteMemoryPipeline({
|
|
22310
22351
|
...options,
|
|
22311
22352
|
graphRanking: options.graphRanking ?? ((query, _traverse, recallOptions) => topicGraphRanking(query, recallOptions)),
|
|
22312
|
-
temporalRanking: options.temporalRanking ?? (() =>
|
|
22353
|
+
temporalRanking: options.temporalRanking ?? ((query, now) => eventTimeRanking(query, now))
|
|
22313
22354
|
});
|
|
22314
22355
|
const subscribers = /* @__PURE__ */ new Set();
|
|
22315
22356
|
const seen = /* @__PURE__ */ new Map();
|
|
@@ -22372,6 +22413,24 @@ function createRemoteMemoryStore(options) {
|
|
|
22372
22413
|
matched: [...canonicalTopics(memory)].filter((name) => wanted.has(name)).length
|
|
22373
22414
|
})).filter((row) => row.matched > 0).sort((a, b) => b.matched - a.matched).slice(0, NODE_BUDGET).map((row) => row.memoryId);
|
|
22374
22415
|
};
|
|
22416
|
+
const eventTimeRanking = async (query, now) => {
|
|
22417
|
+
const window2 = parseQueryTimeWindow(query, now);
|
|
22418
|
+
if (!window2) return [];
|
|
22419
|
+
const rows = await pages(
|
|
22420
|
+
metadata2,
|
|
22421
|
+
{ event_time_overlaps: { start: window2.start, end: window2.end } },
|
|
22422
|
+
TEMPORAL_LANE_ROWS
|
|
22423
|
+
);
|
|
22424
|
+
return rows.map(({ memory }) => ({
|
|
22425
|
+
memoryId: memory.memory_id,
|
|
22426
|
+
score: scoreEventTimeOverlap(
|
|
22427
|
+
memory.event_time_start ?? null,
|
|
22428
|
+
memory.event_time_end ?? null,
|
|
22429
|
+
memory.event_time_kind ?? null,
|
|
22430
|
+
window2
|
|
22431
|
+
)
|
|
22432
|
+
})).filter((row) => row.score > 0).sort((a, b) => b.score - a.score).map((row) => row.memoryId);
|
|
22433
|
+
};
|
|
22375
22434
|
const enumerateIds = async (read, ids, filters) => (await Promise.all(
|
|
22376
22435
|
chunks2([...new Set(ids)], MAX_QUERY_IDS).map(
|
|
22377
22436
|
(memory_ids) => pages(read, { ...filters, memory_ids })
|
|
@@ -22417,7 +22476,7 @@ function createRemoteMemoryStore(options) {
|
|
|
22417
22476
|
if (!record2) return null;
|
|
22418
22477
|
if (record2.memory.is_deleted) return null;
|
|
22419
22478
|
if (writeOptions?.canWrite && !await writeOptions.canWrite())
|
|
22420
|
-
throw new
|
|
22479
|
+
throw new MemorySourceIneligibleError();
|
|
22421
22480
|
writeOptions?.signal?.throwIfAborted();
|
|
22422
22481
|
const next = edit(structuredClone(record2.memory));
|
|
22423
22482
|
if (!next) return null;
|
|
@@ -24047,6 +24106,26 @@ function createDurableAutoExtractor(options) {
|
|
|
24047
24106
|
);
|
|
24048
24107
|
continue;
|
|
24049
24108
|
}
|
|
24109
|
+
const foreign = new Set(
|
|
24110
|
+
ids.filter((_id, index) => loaded[index]?.conversationId !== conversationId)
|
|
24111
|
+
);
|
|
24112
|
+
if (foreign.size) {
|
|
24113
|
+
await database.write(
|
|
24114
|
+
() => job.update(
|
|
24115
|
+
(r) => r._setRaw(
|
|
24116
|
+
"message_ids",
|
|
24117
|
+
JSON.stringify(idsOf(job).filter((id) => !foreign.has(id)))
|
|
24118
|
+
)
|
|
24119
|
+
)
|
|
24120
|
+
);
|
|
24121
|
+
attempts.delete(job.id);
|
|
24122
|
+
scheduleAfterSuccess = true;
|
|
24123
|
+
reportError(
|
|
24124
|
+
new Error(`Dropped ${foreign.size} source id(s) from another conversation`),
|
|
24125
|
+
conversationId
|
|
24126
|
+
);
|
|
24127
|
+
continue;
|
|
24128
|
+
}
|
|
24050
24129
|
const locked = loaded.filter((message) => message && isEncrypted(message.content));
|
|
24051
24130
|
if (locked.length) {
|
|
24052
24131
|
throw new LockedSourcesError(
|
|
@@ -24056,7 +24135,7 @@ function createDurableAutoExtractor(options) {
|
|
|
24056
24135
|
);
|
|
24057
24136
|
}
|
|
24058
24137
|
const messages = loaded.flatMap(
|
|
24059
|
-
(m) => m &&
|
|
24138
|
+
(m) => m && (m.role === "user" || m.role === "assistant") ? [{ id: m.uniqueId, role: m.role, content: m.content }] : []
|
|
24060
24139
|
);
|
|
24061
24140
|
const jobScope = currentScope() === "private" ? "private" : String(job._getRaw("scope"));
|
|
24062
24141
|
const jobFolderId = job._getRaw("folder_id") ?? null;
|
|
@@ -24149,9 +24228,31 @@ function createDurableAutoExtractor(options) {
|
|
|
24149
24228
|
(candidate) => candidate._getRaw("scope") === scope && (candidate._getRaw("folder_id") ?? null) === folderId
|
|
24150
24229
|
);
|
|
24151
24230
|
const positions = new Map(ids.map((id, index) => [id, index]));
|
|
24231
|
+
const watermarks = existing.flatMap((prior) => {
|
|
24232
|
+
const watermark = prior._getRaw("watermark");
|
|
24233
|
+
return typeof watermark === "string" && watermark ? [watermark] : [];
|
|
24234
|
+
});
|
|
24235
|
+
if (watermarks.length) {
|
|
24236
|
+
const misplaced = new Set(
|
|
24237
|
+
await storage.messagesCollection.query(
|
|
24238
|
+
import_watermelondb24.Q.where("id", import_watermelondb24.Q.oneOf(watermarks)),
|
|
24239
|
+
import_watermelondb24.Q.where("conversation_id", import_watermelondb24.Q.notEq(conversationId))
|
|
24240
|
+
).fetchIds()
|
|
24241
|
+
);
|
|
24242
|
+
for (const prior of existing)
|
|
24243
|
+
if (misplaced.has(String(prior._getRaw("watermark"))))
|
|
24244
|
+
await prior.update((r) => {
|
|
24245
|
+
r._setRaw("watermark", null);
|
|
24246
|
+
r._setRaw("watermark_seq", null);
|
|
24247
|
+
});
|
|
24248
|
+
}
|
|
24152
24249
|
const rows = await storage.messagesCollection.query(import_watermelondb24.Q.where("id", import_watermelondb24.Q.oneOf(ids))).fetch();
|
|
24250
|
+
const foreignRows = new Set(
|
|
24251
|
+
rows.filter((row) => row._getRaw("conversation_id") !== conversationId).map((row) => row.id)
|
|
24252
|
+
);
|
|
24153
24253
|
const sequences = /* @__PURE__ */ new Map();
|
|
24154
24254
|
for (const row of rows) {
|
|
24255
|
+
if (foreignRows.has(row.id)) continue;
|
|
24155
24256
|
const sequence = Number(row._getRaw("message_id"));
|
|
24156
24257
|
if (Number.isFinite(sequence) && sequence > 0) sequences.set(row.id, sequence);
|
|
24157
24258
|
}
|
|
@@ -24194,7 +24295,7 @@ function createDurableAutoExtractor(options) {
|
|
|
24194
24295
|
const ownWatermark = job?._getRaw("watermark");
|
|
24195
24296
|
const atOwnWatermark = !!job && boundary >= 0 && failedSessionsOf(job, String(ownWatermark)) < MAX_FAILED_SESSIONS && (ids[boundary] === ownWatermark || sequences.get(ids[boundary]) !== void 0 && sequences.get(ids[boundary]) === seqOf(job));
|
|
24196
24297
|
const overlapStart = atOwnWatermark ? Math.max(0, boundary - 1) : start;
|
|
24197
|
-
const fresh = ids.slice(overlapStart).filter((id) => !foreignSources.has(id));
|
|
24298
|
+
const fresh = ids.slice(overlapStart).filter((id) => !foreignSources.has(id) && !foreignRows.has(id));
|
|
24198
24299
|
if (!fresh.length) return;
|
|
24199
24300
|
if (job) {
|
|
24200
24301
|
await job.update(
|
package/dist/expo/index.d.mts
CHANGED
|
@@ -5249,6 +5249,7 @@ declare function extractFacts(messages: AutoExtractMessage[], options: ExtractFa
|
|
|
5249
5249
|
* look like `no-facts`.
|
|
5250
5250
|
*/
|
|
5251
5251
|
type ExtractOutcome = "extracted" | "no-facts" | "empty-after-retry" | "dropped-after-redaction";
|
|
5252
|
+
type WriteFailureReason = "source-ineligible" | "embeddings-unavailable" | "merge-not-persisted" | "aborted" | "unknown";
|
|
5252
5253
|
/**
|
|
5253
5254
|
* Stage 2 — for each extracted candidate, call retain() with auto-merge
|
|
5254
5255
|
* enabled. When `consolidateOptions` are wired, retain()'s consolidation pass
|
|
@@ -5319,6 +5320,7 @@ declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: Ret
|
|
|
5319
5320
|
candidates: ExtractedCandidate[];
|
|
5320
5321
|
results: RetainResult[];
|
|
5321
5322
|
failedCount: number;
|
|
5323
|
+
writeFailureReason?: WriteFailureReason;
|
|
5322
5324
|
outcome: ExtractOutcome;
|
|
5323
5325
|
/**
|
|
5324
5326
|
* Tier-0 security (PR3) — candidates quarantined by the injection screen and
|
|
@@ -8829,6 +8831,7 @@ interface TurnCompleteEvent {
|
|
|
8829
8831
|
results: RetainResult[];
|
|
8830
8832
|
/** Per-candidate retain() failures. `onError` only fires on pipeline throws. */
|
|
8831
8833
|
failedCount: number;
|
|
8834
|
+
writeFailureReason?: WriteFailureReason;
|
|
8832
8835
|
durationMs: number;
|
|
8833
8836
|
conversationId?: string;
|
|
8834
8837
|
/**
|
|
@@ -9654,6 +9657,10 @@ interface RemoteMemoryQueryOptions extends RemoteMemoryReadFilters {
|
|
|
9654
9657
|
updated_after?: number;
|
|
9655
9658
|
topics_due?: number;
|
|
9656
9659
|
topics_extracted?: boolean;
|
|
9660
|
+
event_time_overlaps?: {
|
|
9661
|
+
start: number;
|
|
9662
|
+
end: number;
|
|
9663
|
+
};
|
|
9657
9664
|
order?: "created" | "updated" | "archived" | "changed";
|
|
9658
9665
|
cursor?: string;
|
|
9659
9666
|
limit?: number;
|
|
@@ -9832,7 +9839,6 @@ interface RemoteMemoryStoreOptions {
|
|
|
9832
9839
|
embeddingOptions: EmbeddingOptions;
|
|
9833
9840
|
/** Defaults to ranking memories by how many query entities their topics name. */
|
|
9834
9841
|
graphRanking?: RecallFactSource["graphRanking"];
|
|
9835
|
-
/** Defaults to no temporal lane: nearby has no event-time filter yet. */
|
|
9836
9842
|
temporalRanking?: RecallFactSource["temporalRanking"];
|
|
9837
9843
|
pollIntervalMs?: number;
|
|
9838
9844
|
}
|
|
@@ -11454,4 +11460,4 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
|
|
|
11454
11460
|
*/
|
|
11455
11461
|
declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageResult;
|
|
11456
11462
|
|
|
11457
|
-
export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkSearchStats, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, 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, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, 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, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionMcpCaller, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptToolCallEventsOp, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
|
|
11463
|
+
export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkSearchStats, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, 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, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, 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, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionMcpCaller, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WriteFailureReason, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptToolCallEventsOp, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
|
package/dist/expo/index.d.ts
CHANGED
|
@@ -5249,6 +5249,7 @@ declare function extractFacts(messages: AutoExtractMessage[], options: ExtractFa
|
|
|
5249
5249
|
* look like `no-facts`.
|
|
5250
5250
|
*/
|
|
5251
5251
|
type ExtractOutcome = "extracted" | "no-facts" | "empty-after-retry" | "dropped-after-redaction";
|
|
5252
|
+
type WriteFailureReason = "source-ineligible" | "embeddings-unavailable" | "merge-not-persisted" | "aborted" | "unknown";
|
|
5252
5253
|
/**
|
|
5253
5254
|
* Stage 2 — for each extracted candidate, call retain() with auto-merge
|
|
5254
5255
|
* enabled. When `consolidateOptions` are wired, retain()'s consolidation pass
|
|
@@ -5319,6 +5320,7 @@ declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: Ret
|
|
|
5319
5320
|
candidates: ExtractedCandidate[];
|
|
5320
5321
|
results: RetainResult[];
|
|
5321
5322
|
failedCount: number;
|
|
5323
|
+
writeFailureReason?: WriteFailureReason;
|
|
5322
5324
|
outcome: ExtractOutcome;
|
|
5323
5325
|
/**
|
|
5324
5326
|
* Tier-0 security (PR3) — candidates quarantined by the injection screen and
|
|
@@ -8829,6 +8831,7 @@ interface TurnCompleteEvent {
|
|
|
8829
8831
|
results: RetainResult[];
|
|
8830
8832
|
/** Per-candidate retain() failures. `onError` only fires on pipeline throws. */
|
|
8831
8833
|
failedCount: number;
|
|
8834
|
+
writeFailureReason?: WriteFailureReason;
|
|
8832
8835
|
durationMs: number;
|
|
8833
8836
|
conversationId?: string;
|
|
8834
8837
|
/**
|
|
@@ -9654,6 +9657,10 @@ interface RemoteMemoryQueryOptions extends RemoteMemoryReadFilters {
|
|
|
9654
9657
|
updated_after?: number;
|
|
9655
9658
|
topics_due?: number;
|
|
9656
9659
|
topics_extracted?: boolean;
|
|
9660
|
+
event_time_overlaps?: {
|
|
9661
|
+
start: number;
|
|
9662
|
+
end: number;
|
|
9663
|
+
};
|
|
9657
9664
|
order?: "created" | "updated" | "archived" | "changed";
|
|
9658
9665
|
cursor?: string;
|
|
9659
9666
|
limit?: number;
|
|
@@ -9832,7 +9839,6 @@ interface RemoteMemoryStoreOptions {
|
|
|
9832
9839
|
embeddingOptions: EmbeddingOptions;
|
|
9833
9840
|
/** Defaults to ranking memories by how many query entities their topics name. */
|
|
9834
9841
|
graphRanking?: RecallFactSource["graphRanking"];
|
|
9835
|
-
/** Defaults to no temporal lane: nearby has no event-time filter yet. */
|
|
9836
9842
|
temporalRanking?: RecallFactSource["temporalRanking"];
|
|
9837
9843
|
pollIntervalMs?: number;
|
|
9838
9844
|
}
|
|
@@ -11454,4 +11460,4 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
|
|
|
11454
11460
|
*/
|
|
11455
11461
|
declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageResult;
|
|
11456
11462
|
|
|
11457
|
-
export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkSearchStats, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, 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, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, 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, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionMcpCaller, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptToolCallEventsOp, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
|
|
11463
|
+
export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkSearchStats, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, 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, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, 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, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionMcpCaller, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WriteFailureReason, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptToolCallEventsOp, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
|