@anuma/sdk 3.4.0 → 3.6.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/{chunk-C7PGRFBG.mjs → chunk-7TATXBC5.mjs} +45 -8
- package/dist/expo/index.cjs +158 -19
- package/dist/expo/index.d.mts +97 -4
- package/dist/expo/index.d.ts +97 -4
- package/dist/expo/index.mjs +104 -11
- package/dist/expo/{recall-7ZX6T2VD.mjs → recall-IO4KJ5W7.mjs} +1 -1
- package/dist/react/{chunk-CGC3UJHM.mjs → chunk-DDHTJGZN.mjs} +45 -8
- package/dist/react/index.cjs +158 -19
- package/dist/react/index.d.mts +97 -4
- package/dist/react/index.d.ts +97 -4
- package/dist/react/index.mjs +104 -11
- package/dist/react/{recall-OTUNGQHQ.mjs → recall-OPKHWKZX.mjs} +1 -1
- package/dist/server/{chunk-LUDHA4X4.mjs → chunk-V7SVKIXQ.mjs} +45 -8
- package/dist/server/index.cjs +158 -19
- package/dist/server/index.d.mts +97 -4
- package/dist/server/index.d.ts +97 -4
- package/dist/server/index.mjs +104 -11
- package/dist/server/{recall-GWRWPGE4.mjs → recall-IWY2MYHR.mjs} +1 -1
- package/package.json +1 -1
package/dist/server/index.cjs
CHANGED
|
@@ -18411,11 +18411,20 @@ async function getModel() {
|
|
|
18411
18411
|
function sigmoid(x) {
|
|
18412
18412
|
return 1 / (1 + Math.exp(-x));
|
|
18413
18413
|
}
|
|
18414
|
+
function formatRerankDoc(content, dateMs) {
|
|
18415
|
+
if (dateMs === null || dateMs === void 0 || !Number.isFinite(dateMs)) return content;
|
|
18416
|
+
const d = new Date(dateMs);
|
|
18417
|
+
if (!Number.isFinite(d.getTime())) return content;
|
|
18418
|
+
const yyyy = d.getFullYear();
|
|
18419
|
+
const mm = String(d.getMonth() + 1).padStart(2, "0");
|
|
18420
|
+
const dd = String(d.getDate()).padStart(2, "0");
|
|
18421
|
+
return `[Date: ${yyyy}-${mm}-${dd}] ${content}`;
|
|
18422
|
+
}
|
|
18414
18423
|
async function rerankPairs(query, items) {
|
|
18415
18424
|
if (items.length === 0 || !query) return [];
|
|
18416
18425
|
const { tokenizer, model } = await getModel();
|
|
18417
18426
|
const queries = items.map(() => query);
|
|
18418
|
-
const docs = items.map((i) => i.content);
|
|
18427
|
+
const docs = items.map((i) => formatRerankDoc(i.content, i.dateMs));
|
|
18419
18428
|
const tokenize2 = tokenizer;
|
|
18420
18429
|
const inputs = tokenize2(queries, { text_pair: docs, padding: true, truncation: true });
|
|
18421
18430
|
const forward = model;
|
|
@@ -19905,6 +19914,23 @@ var init_recall = __esm({
|
|
|
19905
19914
|
function normalizeEventTimeKind(kind) {
|
|
19906
19915
|
return kind === "point" || kind === "range" || kind === "ongoing" ? kind : null;
|
|
19907
19916
|
}
|
|
19917
|
+
function rerankDateMs(item) {
|
|
19918
|
+
if (item.eventTimeStart !== null && item.eventTimeStart !== void 0 && Number.isFinite(item.eventTimeStart) && item.eventTimeStart > 0) {
|
|
19919
|
+
return item.eventTimeStart;
|
|
19920
|
+
}
|
|
19921
|
+
if (item.lastObservedAt !== null && item.lastObservedAt !== void 0 && Number.isFinite(item.lastObservedAt) && item.lastObservedAt > 0) {
|
|
19922
|
+
return item.lastObservedAt;
|
|
19923
|
+
}
|
|
19924
|
+
const updatedMs = item.updatedAt?.getTime();
|
|
19925
|
+
if (updatedMs !== null && updatedMs !== void 0 && Number.isFinite(updatedMs) && updatedMs > 0) {
|
|
19926
|
+
return updatedMs;
|
|
19927
|
+
}
|
|
19928
|
+
const createdMs = item.createdAt?.getTime();
|
|
19929
|
+
if (createdMs !== null && createdMs !== void 0 && Number.isFinite(createdMs) && createdMs > 0) {
|
|
19930
|
+
return createdMs;
|
|
19931
|
+
}
|
|
19932
|
+
return void 0;
|
|
19933
|
+
}
|
|
19908
19934
|
function supersessionDelta(olderScore, newerScore, boostFactor = SUPERSESSION_BOOST_FACTOR) {
|
|
19909
19935
|
const gap = olderScore - newerScore;
|
|
19910
19936
|
return gap * boostFactor;
|
|
@@ -20046,8 +20072,8 @@ function rankFusedVaultMemories(query, queryEmbedding, items, options) {
|
|
|
20046
20072
|
const proofCount = Math.max(1, item?.proofCount ?? 1);
|
|
20047
20073
|
const proofBoost = 1 + proofCountAlpha * Math.log(1 + proofCount) - proofCountAlpha * Math.log(2);
|
|
20048
20074
|
const rawTypeWeight = item?.factType ? factTypeWeights?.[item.factType] : void 0;
|
|
20049
|
-
const
|
|
20050
|
-
return recencyBoost * proofBoost *
|
|
20075
|
+
const typeWeight2 = rawTypeWeight !== void 0 && Number.isFinite(rawTypeWeight) && rawTypeWeight > 0 ? rawTypeWeight : 1;
|
|
20076
|
+
return recencyBoost * proofBoost * typeWeight2;
|
|
20051
20077
|
};
|
|
20052
20078
|
let combined = [...baseRanked, ...admitted].map((r) => ({
|
|
20053
20079
|
...r,
|
|
@@ -20107,6 +20133,7 @@ async function rankFusedVaultMemoriesAsync(query, queryEmbedding, items, options
|
|
|
20107
20133
|
}
|
|
20108
20134
|
let combined;
|
|
20109
20135
|
let tailSlice = [];
|
|
20136
|
+
const itemById = new Map(items.map((i) => [i.id, i]));
|
|
20110
20137
|
if (options?.rerank) {
|
|
20111
20138
|
const rerankTopN = options.rerankTopN ?? 30;
|
|
20112
20139
|
const ceWeight = options.ceWeight ?? 0.1;
|
|
@@ -20114,7 +20141,12 @@ async function rankFusedVaultMemoriesAsync(query, queryEmbedding, items, options
|
|
|
20114
20141
|
try {
|
|
20115
20142
|
const reranked = await rerankPairs(
|
|
20116
20143
|
query,
|
|
20117
|
-
headSlice.map((r) => ({
|
|
20144
|
+
headSlice.map((r) => ({
|
|
20145
|
+
id: r.uniqueId,
|
|
20146
|
+
content: r.content,
|
|
20147
|
+
// C4: date-prefix the CE doc so temporal alignment influences rank.
|
|
20148
|
+
dateMs: rerankDateMs(itemById.get(r.uniqueId) ?? r)
|
|
20149
|
+
}))
|
|
20118
20150
|
);
|
|
20119
20151
|
tailSlice = v2Ranked.slice(rerankTopN);
|
|
20120
20152
|
const v2ScoreById = new Map(headSlice.map((r) => [r.uniqueId, r.similarity]));
|
|
@@ -20149,11 +20181,11 @@ async function rankFusedVaultMemoriesAsync(query, queryEmbedding, items, options
|
|
|
20149
20181
|
const fused = rrfFuse([headIds, headIds, ...sideLanesAsync], options?.rrfK);
|
|
20150
20182
|
const fusedHead = combined.map((r) => ({ ...r, similarity: fused.get(r.uniqueId) ?? r.similarity })).sort((a, b) => b.similarity - a.similarity);
|
|
20151
20183
|
const seen = new Set(combined.map((r) => r.uniqueId));
|
|
20152
|
-
const
|
|
20184
|
+
const itemById2 = new Map(items.map((i) => [i.id, i]));
|
|
20153
20185
|
for (const lane of sideLanesAsync) {
|
|
20154
20186
|
for (const id of lane) {
|
|
20155
20187
|
if (seen.has(id)) continue;
|
|
20156
|
-
const it =
|
|
20188
|
+
const it = itemById2.get(id);
|
|
20157
20189
|
if (!it) continue;
|
|
20158
20190
|
fusedHead.push({
|
|
20159
20191
|
uniqueId: id,
|
|
@@ -20172,11 +20204,11 @@ async function rankFusedVaultMemoriesAsync(query, queryEmbedding, items, options
|
|
|
20172
20204
|
if (options?.mmr) {
|
|
20173
20205
|
const lambda = options.mmrLambda ?? 0.7;
|
|
20174
20206
|
const mmrTopN = options.mmrTopN ?? 20;
|
|
20175
|
-
const
|
|
20207
|
+
const itemById2 = new Map(items.map((i) => [i.id, i]));
|
|
20176
20208
|
const mmrCandidates = combined.slice(0, mmrTopN).map((r) => ({
|
|
20177
20209
|
id: r.uniqueId,
|
|
20178
20210
|
score: r.similarity,
|
|
20179
|
-
embedding:
|
|
20211
|
+
embedding: itemById2.get(r.uniqueId)?.embedding ?? [],
|
|
20180
20212
|
content: r.content
|
|
20181
20213
|
}));
|
|
20182
20214
|
const picked = applyMMR(mmrCandidates, limit, lambda);
|
|
@@ -20298,7 +20330,12 @@ async function rankComposite(originalQuery, originalQueryEmbedding, subQueries,
|
|
|
20298
20330
|
try {
|
|
20299
20331
|
const reranked = await rerankPairs(
|
|
20300
20332
|
originalQuery,
|
|
20301
|
-
headSlice.map((r) => ({
|
|
20333
|
+
headSlice.map((r) => ({
|
|
20334
|
+
id: r.uniqueId,
|
|
20335
|
+
content: r.content,
|
|
20336
|
+
// C4: date-prefix the CE doc so temporal alignment influences rank.
|
|
20337
|
+
dateMs: rerankDateMs(itemById.get(r.uniqueId) ?? r)
|
|
20338
|
+
}))
|
|
20302
20339
|
);
|
|
20303
20340
|
const ceById = new Map(reranked.map((r) => [r.id, r.score]));
|
|
20304
20341
|
const head = headSlice.map((r) => ({
|
|
@@ -21596,6 +21633,9 @@ __export(index_exports, {
|
|
|
21596
21633
|
DEFAULT_MIN_MESSAGES: () => DEFAULT_MIN_MESSAGES,
|
|
21597
21634
|
DEFAULT_PERSONALITY_SETTINGS: () => DEFAULT_PERSONALITY_SETTINGS,
|
|
21598
21635
|
DEFAULT_PROFILE_FACETS: () => DEFAULT_PROFILE_FACETS,
|
|
21636
|
+
DEFAULT_PROFILE_FACT_TYPE_WEIGHTS: () => DEFAULT_PROFILE_FACT_TYPE_WEIGHTS,
|
|
21637
|
+
DEFAULT_PROFILE_PROOF_ALPHA: () => DEFAULT_PROFILE_PROOF_ALPHA,
|
|
21638
|
+
DEFAULT_PROFILE_TREND_MULTIPLIERS: () => DEFAULT_PROFILE_TREND_MULTIPLIERS,
|
|
21599
21639
|
DEFAULT_PROMPT_TEMPLATES: () => DEFAULT_PROMPT_TEMPLATES,
|
|
21600
21640
|
DEFAULT_REFRESH_EVERY_MESSAGES: () => DEFAULT_REFRESH_EVERY_MESSAGES,
|
|
21601
21641
|
DEFAULT_SERVER_TOOLS_MATCH_OPTIONS: () => DEFAULT_SERVER_TOOLS_MATCH_OPTIONS,
|
|
@@ -21808,6 +21848,7 @@ __export(index_exports, {
|
|
|
21808
21848
|
progressiveSummarize: () => progressiveSummarize,
|
|
21809
21849
|
projectToStored: () => projectToStored,
|
|
21810
21850
|
queueManager: () => queueManager,
|
|
21851
|
+
rankProfileCandidates: () => rankProfileCandidates,
|
|
21811
21852
|
recall: () => recall,
|
|
21812
21853
|
reflect: () => reflect,
|
|
21813
21854
|
relinkMisclassifiedVideosOp: () => relinkMisclassifiedVideosOp,
|
|
@@ -21820,6 +21861,7 @@ __export(index_exports, {
|
|
|
21820
21861
|
runToolLoop: () => runToolLoop,
|
|
21821
21862
|
sanitizeQuotes: () => sanitizeQuotes,
|
|
21822
21863
|
schemaToCreateSQL: () => schemaToCreateSQL,
|
|
21864
|
+
scoreProfileSalience: () => scoreProfileSalience,
|
|
21823
21865
|
screenCandidatesForInjection: () => screenCandidatesForInjection,
|
|
21824
21866
|
sdkMigrations: () => sdkMigrations,
|
|
21825
21867
|
sdkModelClasses: () => sdkModelClasses,
|
|
@@ -27405,6 +27447,64 @@ function createDecaySweeper(options) {
|
|
|
27405
27447
|
// src/lib/memory/index.ts
|
|
27406
27448
|
init_graphTraversal();
|
|
27407
27449
|
init_observationTrend();
|
|
27450
|
+
|
|
27451
|
+
// src/lib/memory/profileSalience.ts
|
|
27452
|
+
init_observationTrend();
|
|
27453
|
+
var DEFAULT_PROFILE_PROOF_ALPHA = 0.2;
|
|
27454
|
+
var DEFAULT_PROFILE_FACT_TYPE_WEIGHTS = {
|
|
27455
|
+
identity: 1.5,
|
|
27456
|
+
preference: 1.5,
|
|
27457
|
+
relationship: 1.5,
|
|
27458
|
+
constraint: 1.5,
|
|
27459
|
+
other: 1,
|
|
27460
|
+
plan: 0.6,
|
|
27461
|
+
ongoing_context: 0.6
|
|
27462
|
+
};
|
|
27463
|
+
var DEFAULT_PROFILE_TREND_MULTIPLIERS = {
|
|
27464
|
+
strengthening: 1.25,
|
|
27465
|
+
new: 1.1,
|
|
27466
|
+
stable: 1,
|
|
27467
|
+
weakening: 0.75,
|
|
27468
|
+
stale: 0.5
|
|
27469
|
+
};
|
|
27470
|
+
function typeWeight(factType, weights) {
|
|
27471
|
+
if (!factType) return 1;
|
|
27472
|
+
const w = weights[factType];
|
|
27473
|
+
if (w !== void 0 && Number.isFinite(w) && w > 0) return w;
|
|
27474
|
+
return 1;
|
|
27475
|
+
}
|
|
27476
|
+
function scoreProfileSalience(input, now = Date.now(), options = {}) {
|
|
27477
|
+
const alpha = options.proofCountAlpha ?? DEFAULT_PROFILE_PROOF_ALPHA;
|
|
27478
|
+
const typeWeights = { ...DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, ...options.factTypeWeights };
|
|
27479
|
+
const trendMults = { ...DEFAULT_PROFILE_TREND_MULTIPLIERS, ...options.trendMultipliers };
|
|
27480
|
+
const proofs = Math.max(1, input.proofCount ?? 1);
|
|
27481
|
+
const proofBoost = 1 + alpha * Math.log(1 + proofs) - alpha * Math.log(2);
|
|
27482
|
+
const trend = classifyObservationTrend(input, now);
|
|
27483
|
+
const tw = typeWeight(input.factType, typeWeights);
|
|
27484
|
+
const tm = trendMults[trend] ?? 1;
|
|
27485
|
+
const score = tw * proofBoost * tm;
|
|
27486
|
+
return Number.isFinite(score) ? score : 0;
|
|
27487
|
+
}
|
|
27488
|
+
function rankProfileCandidates(inputs, now = Date.now(), options = {}) {
|
|
27489
|
+
const ranked = inputs.map((input) => {
|
|
27490
|
+
const proofs = Math.max(1, input.proofCount ?? 1);
|
|
27491
|
+
return {
|
|
27492
|
+
id: input.id,
|
|
27493
|
+
score: scoreProfileSalience(input, now, options),
|
|
27494
|
+
trend: classifyObservationTrend(input, now),
|
|
27495
|
+
factType: input.factType ?? null,
|
|
27496
|
+
proofCount: proofs
|
|
27497
|
+
};
|
|
27498
|
+
});
|
|
27499
|
+
ranked.sort((a, b) => {
|
|
27500
|
+
if (b.score !== a.score) return b.score - a.score;
|
|
27501
|
+
if (b.proofCount !== a.proofCount) return b.proofCount - a.proofCount;
|
|
27502
|
+
return a.id < b.id ? -1 : a.id > b.id ? 1 : 0;
|
|
27503
|
+
});
|
|
27504
|
+
return ranked;
|
|
27505
|
+
}
|
|
27506
|
+
|
|
27507
|
+
// src/lib/memory/index.ts
|
|
27408
27508
|
init_recall();
|
|
27409
27509
|
|
|
27410
27510
|
// src/lib/memory/recallTool.ts
|
|
@@ -27638,18 +27738,18 @@ async function reflect(query, ctx, options) {
|
|
|
27638
27738
|
usage: { promptTokens: 0, completionTokens: 0, totalTokens: 0 }
|
|
27639
27739
|
};
|
|
27640
27740
|
if (trimmed.length === 0) return empty;
|
|
27641
|
-
const { maxTokens: _llmMaxTokens, ...recallOptions } = options;
|
|
27642
|
-
const
|
|
27643
|
-
const memoryIds =
|
|
27741
|
+
const { maxTokens: _llmMaxTokens, memories: providedMemories, ...recallOptions } = options;
|
|
27742
|
+
const recalledMemories = providedMemories !== void 0 ? providedMemories : (await recall(trimmed, ctx, recallOptions)).memories;
|
|
27743
|
+
const memoryIds = recalledMemories.map((m) => m.id);
|
|
27644
27744
|
const baseResult = {
|
|
27645
27745
|
text: "",
|
|
27646
27746
|
basedOn: { memoryIds },
|
|
27647
27747
|
usage: { promptTokens: 0, completionTokens: 0, totalTokens: 0 }
|
|
27648
27748
|
};
|
|
27649
|
-
if (
|
|
27749
|
+
if (recalledMemories.length === 0) {
|
|
27650
27750
|
return baseResult;
|
|
27651
27751
|
}
|
|
27652
|
-
const evidence =
|
|
27752
|
+
const evidence = recalledMemories.map((m, i) => `[${i + 1}] (id: ${m.id}, kind: ${m.kind})
|
|
27653
27753
|
${m.content}`).join("\n\n");
|
|
27654
27754
|
const baseUrl = options.baseUrl ?? DEFAULT_BASE_URL2;
|
|
27655
27755
|
const model = options.llmModel ?? DEFAULT_MODEL5;
|
|
@@ -27772,6 +27872,7 @@ init_constants();
|
|
|
27772
27872
|
init_embeddings();
|
|
27773
27873
|
init_vector();
|
|
27774
27874
|
init_observationTrend();
|
|
27875
|
+
init_recall();
|
|
27775
27876
|
var DEFAULT_SYNTHESIS_MODEL = "inclusionai/ling-2.6-flash";
|
|
27776
27877
|
var DEFAULT_FACET_RECALL_LIMIT = 20;
|
|
27777
27878
|
var DEFAULT_FACET_MAX_TOKENS = 512;
|
|
@@ -27844,7 +27945,8 @@ async function synthesizeProfile(ctx, options = {}) {
|
|
|
27844
27945
|
facetKeys: facets.map((f) => f.key).sort(),
|
|
27845
27946
|
facetsSignature: facetsSignature(facets),
|
|
27846
27947
|
scopes: [...scopes].sort(),
|
|
27847
|
-
redacted: options.redactor !== void 0
|
|
27948
|
+
redacted: options.redactor !== void 0,
|
|
27949
|
+
reviewedMemoryIdsSignature: reviewedMemoryIdsSignature(options.reviewedMemoryIds)
|
|
27848
27950
|
};
|
|
27849
27951
|
const previous = options.previous && options.previous.version === PROFILE_DOC_VERSION && configMatches(options.previous.config, config) ? options.previous : void 0;
|
|
27850
27952
|
const memories = await getAllVaultMemoriesOp(ctx.vaultCtx, {
|
|
@@ -27917,7 +28019,11 @@ async function synthesizeProfile(ctx, options = {}) {
|
|
|
27917
28019
|
}
|
|
27918
28020
|
function configMatches(a, b) {
|
|
27919
28021
|
if (!a) return false;
|
|
27920
|
-
return a.redacted === b.redacted && a.facetsSignature === b.facetsSignature && a.scopes.length === b.scopes.length && a.scopes.every((s, i) => s === b.scopes[i]);
|
|
28022
|
+
return a.redacted === b.redacted && a.facetsSignature === b.facetsSignature && (a.reviewedMemoryIdsSignature ?? "") === b.reviewedMemoryIdsSignature && a.scopes.length === b.scopes.length && a.scopes.every((s, i) => s === b.scopes[i]);
|
|
28023
|
+
}
|
|
28024
|
+
function reviewedMemoryIdsSignature(ids) {
|
|
28025
|
+
if (ids === void 0 || ids.length === 0) return "";
|
|
28026
|
+
return [...new Set(ids)].sort().join("\n");
|
|
27921
28027
|
}
|
|
27922
28028
|
function facetsSignature(facets) {
|
|
27923
28029
|
return facets.map((f) => JSON.stringify([f.key, f.label, f.query, f.guidance])).sort().join("\n");
|
|
@@ -28021,18 +28127,46 @@ async function attributeFacts(ctx, candidates, facets) {
|
|
|
28021
28127
|
return keys;
|
|
28022
28128
|
}
|
|
28023
28129
|
async function synthesizeFacet(facet, ctx, options, prior) {
|
|
28130
|
+
const scopes = options.scopes ?? DEFAULT_SCOPES;
|
|
28131
|
+
const limit = options.limit ?? DEFAULT_FACET_RECALL_LIMIT;
|
|
28132
|
+
const factTypeWeights = { ...DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, ...options.factTypeWeights };
|
|
28133
|
+
const proofCountAlpha = options.proofCountAlpha ?? DEFAULT_PROFILE_PROOF_ALPHA;
|
|
28134
|
+
const reviewed = options.reviewedMemoryIds;
|
|
28135
|
+
const hasReviewGate = reviewed !== void 0 && reviewed.length > 0;
|
|
28136
|
+
const recalled = await recall(facet.query, ctx, {
|
|
28137
|
+
scopes,
|
|
28138
|
+
limit: hasReviewGate ? RECALL_MAX_LIMIT : limit,
|
|
28139
|
+
types: ["fact"],
|
|
28140
|
+
factTypeWeights,
|
|
28141
|
+
proofCountAlpha
|
|
28142
|
+
});
|
|
28143
|
+
let memories = recalled.memories;
|
|
28144
|
+
if (hasReviewGate) {
|
|
28145
|
+
const allowed = new Set(reviewed);
|
|
28146
|
+
memories = memories.filter((m) => allowed.has(m.id)).slice(0, limit);
|
|
28147
|
+
}
|
|
28148
|
+
if (memories.length === 0) {
|
|
28149
|
+
return {
|
|
28150
|
+
key: facet.key,
|
|
28151
|
+
label: facet.label,
|
|
28152
|
+
text: "",
|
|
28153
|
+
sourceMemoryIds: [],
|
|
28154
|
+
generatedAt: Date.now()
|
|
28155
|
+
};
|
|
28156
|
+
}
|
|
28024
28157
|
const result = await reflect(facet.query, ctx, {
|
|
28025
28158
|
apiKey: options.apiKey,
|
|
28026
28159
|
getToken: options.getToken,
|
|
28027
28160
|
llmModel: options.llmModel ?? DEFAULT_SYNTHESIS_MODEL,
|
|
28028
28161
|
baseUrl: options.baseUrl,
|
|
28029
28162
|
fetchFn: options.fetchFn,
|
|
28030
|
-
scopes
|
|
28031
|
-
limit
|
|
28163
|
+
scopes,
|
|
28164
|
+
limit,
|
|
28032
28165
|
types: ["fact"],
|
|
28033
28166
|
maxTokens: DEFAULT_FACET_MAX_TOKENS,
|
|
28034
28167
|
systemPrompt: buildFacetSystemPrompt(facet),
|
|
28035
|
-
responseSchema: FACET_RESPONSE_SCHEMA
|
|
28168
|
+
responseSchema: FACET_RESPONSE_SCHEMA,
|
|
28169
|
+
memories
|
|
28036
28170
|
});
|
|
28037
28171
|
const noEvidence = result.basedOn.memoryIds.length === 0;
|
|
28038
28172
|
const { text: text12, legitimateEmpty } = extractFacetText(result.structuredOutput);
|
|
@@ -34002,6 +34136,9 @@ function buildSystemPrompt(ctx, options) {
|
|
|
34002
34136
|
DEFAULT_MIN_MESSAGES,
|
|
34003
34137
|
DEFAULT_PERSONALITY_SETTINGS,
|
|
34004
34138
|
DEFAULT_PROFILE_FACETS,
|
|
34139
|
+
DEFAULT_PROFILE_FACT_TYPE_WEIGHTS,
|
|
34140
|
+
DEFAULT_PROFILE_PROOF_ALPHA,
|
|
34141
|
+
DEFAULT_PROFILE_TREND_MULTIPLIERS,
|
|
34005
34142
|
DEFAULT_PROMPT_TEMPLATES,
|
|
34006
34143
|
DEFAULT_REFRESH_EVERY_MESSAGES,
|
|
34007
34144
|
DEFAULT_SERVER_TOOLS_MATCH_OPTIONS,
|
|
@@ -34214,6 +34351,7 @@ function buildSystemPrompt(ctx, options) {
|
|
|
34214
34351
|
progressiveSummarize,
|
|
34215
34352
|
projectToStored,
|
|
34216
34353
|
queueManager,
|
|
34354
|
+
rankProfileCandidates,
|
|
34217
34355
|
recall,
|
|
34218
34356
|
reflect,
|
|
34219
34357
|
relinkMisclassifiedVideosOp,
|
|
@@ -34226,6 +34364,7 @@ function buildSystemPrompt(ctx, options) {
|
|
|
34226
34364
|
runToolLoop,
|
|
34227
34365
|
sanitizeQuotes,
|
|
34228
34366
|
schemaToCreateSQL,
|
|
34367
|
+
scoreProfileSalience,
|
|
34229
34368
|
screenCandidatesForInjection,
|
|
34230
34369
|
sdkMigrations,
|
|
34231
34370
|
sdkModelClasses,
|
package/dist/server/index.d.mts
CHANGED
|
@@ -4792,7 +4792,7 @@ interface VaultSearchResult {
|
|
|
4792
4792
|
updatedAt?: Date;
|
|
4793
4793
|
/** Times this fact has been re-observed — for C2 trend labels. */
|
|
4794
4794
|
proofCount?: number | null;
|
|
4795
|
-
/** C3 re-observation watermark (Unix ms) — for C2
|
|
4795
|
+
/** C3 re-observation watermark (Unix ms) — for C2 trends + C4 CE dates. */
|
|
4796
4796
|
lastObservedAt?: number | null;
|
|
4797
4797
|
/** W6 temporal-lane anchors carried through to downstream `RankedMemory`
|
|
4798
4798
|
* so the recall executor can surface dates to the answer model without
|
|
@@ -7691,6 +7691,66 @@ interface LlmNeighborRefinerOptions extends PortalLlmAuth {
|
|
|
7691
7691
|
*/
|
|
7692
7692
|
declare function createLlmNeighborRefiner(options: LlmNeighborRefinerOptions): NeighborRefiner;
|
|
7693
7693
|
|
|
7694
|
+
/**
|
|
7695
|
+
* Profile salience — profile-worthiness scoring for vault facts (#706).
|
|
7696
|
+
*
|
|
7697
|
+
* Distinct from query-time relevance (`recall` fusion). Answers: "is this
|
|
7698
|
+
* fact worth putting on a shareable profile?" using durable type, proof
|
|
7699
|
+
* density, and C2 observation trend. Pure + deterministic — no LLM, no DB.
|
|
7700
|
+
*
|
|
7701
|
+
* Used by:
|
|
7702
|
+
* - `synthesizeProfile` facet recall (default factTypeWeights)
|
|
7703
|
+
* - Publish-review UIs via {@link rankProfileCandidates} (nearby / client)
|
|
7704
|
+
*
|
|
7705
|
+
* Persisted `importance` is deferred until publish flow proves the need.
|
|
7706
|
+
*/
|
|
7707
|
+
|
|
7708
|
+
/** Proof-count curve weight inside {@link scoreProfileSalience}. */
|
|
7709
|
+
declare const DEFAULT_PROFILE_PROOF_ALPHA = 0.2;
|
|
7710
|
+
/**
|
|
7711
|
+
* Per-FactType multipliers for profile synthesis / salience.
|
|
7712
|
+
* Durable identity-class types (never age-archive in decay) rank higher;
|
|
7713
|
+
* ephemeral plan/ongoing_context rank lower. Untyped / `other` stay neutral.
|
|
7714
|
+
*/
|
|
7715
|
+
declare const DEFAULT_PROFILE_FACT_TYPE_WEIGHTS: Partial<Record<FactType, number>>;
|
|
7716
|
+
/** C2 trend multipliers for profile-worthiness. */
|
|
7717
|
+
declare const DEFAULT_PROFILE_TREND_MULTIPLIERS: Record<ObservationTrend, number>;
|
|
7718
|
+
interface ProfileSalienceInput extends ObservationTrendInput {
|
|
7719
|
+
/** Vault memory id — required for {@link rankProfileCandidates}. */
|
|
7720
|
+
id: string;
|
|
7721
|
+
/** Extractor FactType; null/undefined → neutral weight (1.0). */
|
|
7722
|
+
factType?: string | null;
|
|
7723
|
+
}
|
|
7724
|
+
interface RankedProfileCandidate {
|
|
7725
|
+
id: string;
|
|
7726
|
+
score: number;
|
|
7727
|
+
trend: ObservationTrend;
|
|
7728
|
+
factType?: string | null;
|
|
7729
|
+
proofCount: number;
|
|
7730
|
+
}
|
|
7731
|
+
interface ScoreProfileSalienceOptions {
|
|
7732
|
+
/** Override type weights (merged over {@link DEFAULT_PROFILE_FACT_TYPE_WEIGHTS}). */
|
|
7733
|
+
factTypeWeights?: Partial<Record<FactType, number>>;
|
|
7734
|
+
/** Override trend multipliers. */
|
|
7735
|
+
trendMultipliers?: Partial<Record<ObservationTrend, number>>;
|
|
7736
|
+
/** Proof-count α. Default: {@link DEFAULT_PROFILE_PROOF_ALPHA}. */
|
|
7737
|
+
proofCountAlpha?: number;
|
|
7738
|
+
}
|
|
7739
|
+
/**
|
|
7740
|
+
* Score a vault fact for profile-worthiness.
|
|
7741
|
+
*
|
|
7742
|
+
* `typeWeight * (1 + α·log(1+proofCount) − α·log(2)) * trendMultiplier`
|
|
7743
|
+
*
|
|
7744
|
+
* The proof term mirrors vault fusion's log curve (neutral at proofCount=1).
|
|
7745
|
+
* Pass `now` for deterministic evals.
|
|
7746
|
+
*/
|
|
7747
|
+
declare function scoreProfileSalience(input: ProfileSalienceInput, now?: number, options?: ScoreProfileSalienceOptions): number;
|
|
7748
|
+
/**
|
|
7749
|
+
* Rank vault facts by profile-worthiness (descending score).
|
|
7750
|
+
* Ties broken by higher proofCount, then id ascending for stability.
|
|
7751
|
+
*/
|
|
7752
|
+
declare function rankProfileCandidates(inputs: readonly ProfileSalienceInput[], now?: number, options?: ScoreProfileSalienceOptions): RankedProfileCandidate[];
|
|
7753
|
+
|
|
7694
7754
|
/**
|
|
7695
7755
|
* Unified Recall API — single retrieval surface above vault + engine.
|
|
7696
7756
|
*
|
|
@@ -7828,6 +7888,12 @@ interface ReflectOptions extends RecallOptions, PortalLlmAuth {
|
|
|
7828
7888
|
fetchFn?: typeof fetch;
|
|
7829
7889
|
/** Optional JSON Schema to coerce structured outputs. */
|
|
7830
7890
|
responseSchema?: Record<string, unknown>;
|
|
7891
|
+
/**
|
|
7892
|
+
* Skip Stage-1 {@link recall} and synthesize from these memories instead.
|
|
7893
|
+
* Used by `synthesizeProfile` after intersecting recall with a
|
|
7894
|
+
* `reviewedMemoryIds` gate so the LLM never sees unreviewed evidence.
|
|
7895
|
+
*/
|
|
7896
|
+
memories?: RankedMemory[];
|
|
7831
7897
|
}
|
|
7832
7898
|
interface ReflectResult {
|
|
7833
7899
|
/** The synthesized answer text. */
|
|
@@ -7951,8 +8017,9 @@ interface ProfileSection {
|
|
|
7951
8017
|
/** Fingerprint of the config that produced a {@link ProfileDoc}. Delta reuse
|
|
7952
8018
|
* (both the wholesale fast path and per-section reuse) is only valid when the
|
|
7953
8019
|
* current call's config matches — otherwise reused sections could carry the
|
|
7954
|
-
* wrong scope's evidence, un-redacted text under a now-present redactor,
|
|
7955
|
-
* old section shape
|
|
8020
|
+
* wrong scope's evidence, un-redacted text under a now-present redactor, an
|
|
8021
|
+
* old section shape, or text grounded in memory ids that are no longer in the
|
|
8022
|
+
* publish-review set. */
|
|
7956
8023
|
interface ProfileConfigFingerprint {
|
|
7957
8024
|
/** Facet keys present in the doc, sorted. */
|
|
7958
8025
|
facetKeys: ProfileFacetKey[];
|
|
@@ -7967,6 +8034,14 @@ interface ProfileConfigFingerprint {
|
|
|
7967
8034
|
/** Whether a PII redactor gated the section text. Reusing un-gated text under
|
|
7968
8035
|
* a now-present redactor would leak PII, so this flips the fingerprint. */
|
|
7969
8036
|
redacted: boolean;
|
|
8037
|
+
/**
|
|
8038
|
+
* Order-independent digest of {@link SynthesizeProfileOptions.reviewedMemoryIds}.
|
|
8039
|
+
* Empty string when the review gate is off (omit / empty array). Changing the
|
|
8040
|
+
* set must invalidate reuse — otherwise a narrowed review keeps text grounded
|
|
8041
|
+
* in unreviewed ids, and a widened review leaves previously-cleared sections
|
|
8042
|
+
* empty.
|
|
8043
|
+
*/
|
|
8044
|
+
reviewedMemoryIdsSignature: string;
|
|
7970
8045
|
}
|
|
7971
8046
|
/** A synthesized profile. Server-authoritative once published; the client
|
|
7972
8047
|
* caches it and passes it back as {@link SynthesizeProfileOptions.previous}. */
|
|
@@ -8012,6 +8087,24 @@ interface SynthesizeProfileOptions extends PortalLlmAuth {
|
|
|
8012
8087
|
* Omit only when the caller redacts downstream — `nearby` also moderates
|
|
8013
8088
|
* server-side, but the client should never publish un-gated text. */
|
|
8014
8089
|
redactor?: PiiRedactor;
|
|
8090
|
+
/**
|
|
8091
|
+
* Per-FactType score multipliers for facet recall. Default:
|
|
8092
|
+
* {@link DEFAULT_PROFILE_FACT_TYPE_WEIGHTS} (durable types boosted).
|
|
8093
|
+
* Does not change global chat `recall()` defaults.
|
|
8094
|
+
*/
|
|
8095
|
+
factTypeWeights?: Partial<Record<FactType, number>>;
|
|
8096
|
+
/**
|
|
8097
|
+
* Proof-count α for facet recall. Default: {@link DEFAULT_PROFILE_PROOF_ALPHA}
|
|
8098
|
+
* (0.2). Chat recall stays at 0.1.
|
|
8099
|
+
*/
|
|
8100
|
+
proofCountAlpha?: number;
|
|
8101
|
+
/**
|
|
8102
|
+
* When non-empty, intersect each facet's recalled evidence with this id set
|
|
8103
|
+
* before the LLM runs (publish-review gate). Empty intersection → empty
|
|
8104
|
+
* section (legitimate no-evidence), not a stale fallback. Omit / empty →
|
|
8105
|
+
* no gate.
|
|
8106
|
+
*/
|
|
8107
|
+
reviewedMemoryIds?: readonly string[];
|
|
8015
8108
|
}
|
|
8016
8109
|
/**
|
|
8017
8110
|
* Synthesize a shareable {@link ProfileDoc} from the user's vault, on-device.
|
|
@@ -9122,4 +9215,4 @@ declare function sanitizeQuotes(s: string): string;
|
|
|
9122
9215
|
declare function renderTemplate(value: string | null | undefined, template: string): string | null;
|
|
9123
9216
|
declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
|
|
9124
9217
|
|
|
9125
|
-
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 ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, 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_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, ENTITY_FANOUT, type EmbeddedWalletSignerFn, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, 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, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, 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 PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, 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 StoredVaultFolder, 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 TurnCompleteEvent, type TurnSkippedEvent, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultFolder, type VaultFolderOperationsContext, VaultMemory, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, 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, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultFoldersOp, 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, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };
|
|
9218
|
+
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 ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, 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, ENTITY_FANOUT, type EmbeddedWalletSignerFn, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, 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, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, 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 PlatformStorage, type PortalLlmAuth, 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 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 RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, 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 StoredVaultFolder, 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 TurnCompleteEvent, type TurnSkippedEvent, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultFolder, type VaultFolderOperationsContext, VaultMemory, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, 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, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultFoldersOp, 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, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };
|