@anuma/sdk 6.19.1 → 6.20.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/client/index.cjs +85 -14
- package/dist/client/index.d.mts +948 -84
- package/dist/client/index.d.ts +948 -84
- package/dist/client/index.mjs +71 -12
- package/dist/expo/{chunk-GRU24OP4.mjs → chunk-7HRJOHW4.mjs} +1 -1
- package/dist/expo/index.cjs +84 -32
- package/dist/expo/index.d.mts +108 -1
- package/dist/expo/index.d.ts +108 -1
- package/dist/expo/index.mjs +85 -33
- package/dist/expo/{recall-PI7FZQNO.mjs → recall-SCMH2R24.mjs} +1 -1
- package/dist/index.d.mts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/react/{chunk-2EEPAOHJ.mjs → chunk-M53NXLZS.mjs} +1 -1
- package/dist/react/index.cjs +84 -32
- package/dist/react/index.d.mts +108 -1
- package/dist/react/index.d.ts +108 -1
- package/dist/react/index.mjs +85 -33
- package/dist/react/{recall-D6ODL36R.mjs → recall-B3M4BWQ2.mjs} +1 -1
- package/dist/server/{chunk-SPHKT76E.mjs → chunk-X5EZQFGR.mjs} +1 -1
- package/dist/server/index.cjs +84 -32
- package/dist/server/index.d.mts +108 -1
- package/dist/server/index.d.ts +108 -1
- package/dist/server/index.mjs +85 -33
- package/dist/server/{recall-NLCZUGXN.mjs → recall-M3KBKU74.mjs} +1 -1
- package/package.json +2 -2
package/dist/server/index.cjs
CHANGED
|
@@ -29296,6 +29296,7 @@ async function retain(content, ctx, options = {}) {
|
|
|
29296
29296
|
const threshold = options.autoMergeThreshold ?? DEFAULT_AUTO_MERGE_THRESHOLD;
|
|
29297
29297
|
const resolvedScope = options.scope ?? DEFAULT_SCOPE;
|
|
29298
29298
|
let supersedeTargetIds = [];
|
|
29299
|
+
let consolidationDecidedCreate = false;
|
|
29299
29300
|
let supersedeContent;
|
|
29300
29301
|
let prepared;
|
|
29301
29302
|
if (enableAutoMerge) {
|
|
@@ -29323,8 +29324,12 @@ async function retain(content, ctx, options = {}) {
|
|
|
29323
29324
|
const outcome = await tryConsolidate(trimmed, ctx, options, prepared);
|
|
29324
29325
|
if (outcome) {
|
|
29325
29326
|
if ("done" in outcome) return outcome.done;
|
|
29326
|
-
|
|
29327
|
-
|
|
29327
|
+
if ("create" in outcome) {
|
|
29328
|
+
consolidationDecidedCreate = true;
|
|
29329
|
+
} else {
|
|
29330
|
+
supersedeTargetIds = outcome.supersede;
|
|
29331
|
+
supersedeContent = outcome.content;
|
|
29332
|
+
}
|
|
29328
29333
|
}
|
|
29329
29334
|
}
|
|
29330
29335
|
if (supersedeTargetIds.length === 0) {
|
|
@@ -29374,7 +29379,14 @@ async function retain(content, ctx, options = {}) {
|
|
|
29374
29379
|
action: "merge",
|
|
29375
29380
|
memoryId: targetId,
|
|
29376
29381
|
targetId,
|
|
29377
|
-
proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1
|
|
29382
|
+
proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1,
|
|
29383
|
+
similarity: matches[0].similarity,
|
|
29384
|
+
// Stage 1 may have run and explicitly said `create`, and Stage 2
|
|
29385
|
+
// then found a strict-cosine match anyway. Reporting the decision
|
|
29386
|
+
// here is what makes that DISAGREEMENT visible — without it the
|
|
29387
|
+
// model's create silently vanished from the distribution whenever
|
|
29388
|
+
// the cosine stage won.
|
|
29389
|
+
...consolidationDecidedCreate && { consolidation: "create" }
|
|
29378
29390
|
};
|
|
29379
29391
|
}
|
|
29380
29392
|
await assertMergeTargetGoneOrThrow(ctx, targetId);
|
|
@@ -29387,12 +29399,18 @@ async function retain(content, ctx, options = {}) {
|
|
|
29387
29399
|
const embedding = reusableQueryEmbedding ?? await generateEmbedding(contentToWrite, ctx.embeddingOptions);
|
|
29388
29400
|
const embeddingModel = ctx.embeddingOptions.model ?? DEFAULT_API_EMBEDDING_MODEL;
|
|
29389
29401
|
if (options.respectTombstones) {
|
|
29390
|
-
const
|
|
29402
|
+
const tombstone = await findTombstoneMatch(embedding, embeddingModel, resolvedScope, ctx, {
|
|
29391
29403
|
threshold,
|
|
29392
29404
|
folderId: options.folderId
|
|
29393
29405
|
});
|
|
29394
|
-
if (
|
|
29395
|
-
return {
|
|
29406
|
+
if (tombstone) {
|
|
29407
|
+
return {
|
|
29408
|
+
action: "suppressed",
|
|
29409
|
+
memoryId: tombstone.id,
|
|
29410
|
+
tombstoneId: tombstone.id,
|
|
29411
|
+
proofCount: 0,
|
|
29412
|
+
similarity: tombstone.similarity
|
|
29413
|
+
};
|
|
29396
29414
|
}
|
|
29397
29415
|
}
|
|
29398
29416
|
const createOpts = {
|
|
@@ -29459,7 +29477,8 @@ async function retain(content, ctx, options = {}) {
|
|
|
29459
29477
|
action: "supersede",
|
|
29460
29478
|
memoryId: created2.uniqueId,
|
|
29461
29479
|
targetId: primaryTargetId,
|
|
29462
|
-
proofCount: 1
|
|
29480
|
+
proofCount: 1,
|
|
29481
|
+
consolidation: "supersede"
|
|
29463
29482
|
};
|
|
29464
29483
|
}
|
|
29465
29484
|
notifyConsolidationFallback(
|
|
@@ -29473,7 +29492,8 @@ async function retain(content, ctx, options = {}) {
|
|
|
29473
29492
|
return {
|
|
29474
29493
|
action: "create",
|
|
29475
29494
|
memoryId: created.uniqueId,
|
|
29476
|
-
proofCount: 1
|
|
29495
|
+
proofCount: 1,
|
|
29496
|
+
...consolidationDecidedCreate && { consolidation: "create" }
|
|
29477
29497
|
};
|
|
29478
29498
|
}
|
|
29479
29499
|
function unionStrings(a, b) {
|
|
@@ -29503,7 +29523,7 @@ async function findTombstoneMatch(embedding, embeddingModel, scope, ctx, opts) {
|
|
|
29503
29523
|
bestId = row.uniqueId;
|
|
29504
29524
|
}
|
|
29505
29525
|
}
|
|
29506
|
-
return bestId;
|
|
29526
|
+
return bestId === null ? null : { id: bestId, similarity: bestSim };
|
|
29507
29527
|
}
|
|
29508
29528
|
function pickEventTimeUpdate(existing, incoming) {
|
|
29509
29529
|
if (incoming === void 0 || incoming === null) return void 0;
|
|
@@ -29545,7 +29565,7 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
|
|
|
29545
29565
|
}));
|
|
29546
29566
|
const { consolidateMemory: doConsolidate } = await Promise.resolve().then(() => (init_consolidate(), consolidate_exports));
|
|
29547
29567
|
const decision = await doConsolidate(trimmed, candidates, consolidateOptions);
|
|
29548
|
-
if (decision.action === "create") return null;
|
|
29568
|
+
if (decision.action === "create") return decision.fallbackReason ? null : { create: true };
|
|
29549
29569
|
if (decision.action === "supersede" && decision.content) {
|
|
29550
29570
|
const requestedIds = decision.targetIds?.length ? decision.targetIds : decision.targetId ? [decision.targetId] : [];
|
|
29551
29571
|
if (requestedIds.length === 0) return null;
|
|
@@ -29604,7 +29624,8 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
|
|
|
29604
29624
|
action: "merge",
|
|
29605
29625
|
memoryId: decision.targetId,
|
|
29606
29626
|
targetId: decision.targetId,
|
|
29607
|
-
proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1
|
|
29627
|
+
proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1,
|
|
29628
|
+
consolidation: "noop"
|
|
29608
29629
|
}
|
|
29609
29630
|
};
|
|
29610
29631
|
}
|
|
@@ -29657,7 +29678,8 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
|
|
|
29657
29678
|
action: "update",
|
|
29658
29679
|
memoryId: decision.targetId,
|
|
29659
29680
|
targetId: decision.targetId,
|
|
29660
|
-
proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1
|
|
29681
|
+
proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1,
|
|
29682
|
+
consolidation: "update"
|
|
29661
29683
|
}
|
|
29662
29684
|
};
|
|
29663
29685
|
}
|
|
@@ -29799,6 +29821,11 @@ Extract durable user facts.`,
|
|
|
29799
29821
|
fallbackSourceId,
|
|
29800
29822
|
options.userIdentity ?? []
|
|
29801
29823
|
);
|
|
29824
|
+
const rawCandidates = parsed.candidates;
|
|
29825
|
+
options.onCandidatesParsed?.({
|
|
29826
|
+
rawCount: Array.isArray(rawCandidates) ? rawCandidates.length : 0,
|
|
29827
|
+
validCount: candidates.length
|
|
29828
|
+
});
|
|
29802
29829
|
if (!redactor) return candidates;
|
|
29803
29830
|
const restored = restoreCandidates(candidates, redactor, options.userIdentity ?? []);
|
|
29804
29831
|
if (candidates.length > 0 && restored.length === 0) {
|
|
@@ -29835,8 +29862,12 @@ async function extractAndRetain(messages, retainCtx, options) {
|
|
|
29835
29862
|
let exhaustedEmpty = false;
|
|
29836
29863
|
let exhaustedFailure;
|
|
29837
29864
|
let droppedAfterRedaction = false;
|
|
29865
|
+
let rawCandidateCount = 0;
|
|
29866
|
+
let validCandidateCount = 0;
|
|
29838
29867
|
const callerOnExhaustedEmpty = options.extract.onExhaustedEmpty;
|
|
29839
29868
|
const callerOnCandidatesDropped = options.extract.onCandidatesDropped;
|
|
29869
|
+
const callerOnCandidatesParsed = options.extract.onCandidatesParsed;
|
|
29870
|
+
const tExtract = Date.now();
|
|
29840
29871
|
const candidates = await extractFacts(messages, {
|
|
29841
29872
|
...options.extract,
|
|
29842
29873
|
onExhaustedEmpty: (failure) => {
|
|
@@ -29847,8 +29878,14 @@ async function extractAndRetain(messages, retainCtx, options) {
|
|
|
29847
29878
|
onCandidatesDropped: () => {
|
|
29848
29879
|
droppedAfterRedaction = true;
|
|
29849
29880
|
callerOnCandidatesDropped?.();
|
|
29881
|
+
},
|
|
29882
|
+
onCandidatesParsed: (stats) => {
|
|
29883
|
+
rawCandidateCount = stats.rawCount;
|
|
29884
|
+
validCandidateCount = stats.validCount;
|
|
29885
|
+
callerOnCandidatesParsed?.(stats);
|
|
29850
29886
|
}
|
|
29851
29887
|
});
|
|
29888
|
+
const extractMs = Date.now() - tExtract;
|
|
29852
29889
|
const filtered = candidates.filter((c) => c.confidence >= minConfidence);
|
|
29853
29890
|
const log = getLogger();
|
|
29854
29891
|
const screened = screenCandidatesForInjection(filtered);
|
|
@@ -29896,6 +29933,7 @@ async function extractAndRetain(messages, retainCtx, options) {
|
|
|
29896
29933
|
const results = [];
|
|
29897
29934
|
const quarantinedInfo = [];
|
|
29898
29935
|
let failedWrites = 0;
|
|
29936
|
+
const tRetain = Date.now();
|
|
29899
29937
|
for (const { candidate, isQuarantined, reason, signature } of toRetain) {
|
|
29900
29938
|
try {
|
|
29901
29939
|
const result = await retain(candidate.content, retainCtx, {
|
|
@@ -29962,6 +30000,21 @@ async function extractAndRetain(messages, retainCtx, options) {
|
|
|
29962
30000
|
failedCount: failedWrites,
|
|
29963
30001
|
outcome,
|
|
29964
30002
|
quarantined: quarantinedInfo,
|
|
30003
|
+
funnel: {
|
|
30004
|
+
rawCandidateCount,
|
|
30005
|
+
validCandidateCount,
|
|
30006
|
+
afterRedactionCount: candidates.length,
|
|
30007
|
+
aboveConfidenceCount: filtered.length,
|
|
30008
|
+
// The PERSISTED quarantines (`quarantinedInfo`), not the screened list: a
|
|
30009
|
+
// screened candidate whose retain() throws is counted in `failedCount`,
|
|
30010
|
+
// and counting it here too would double it and break the identity below.
|
|
30011
|
+
// This also keeps the count equal to `quarantined.length` on the result.
|
|
30012
|
+
quarantinedCount: quarantinedInfo.length,
|
|
30013
|
+
retainedCount: results.length,
|
|
30014
|
+
failedCount: failedWrites
|
|
30015
|
+
},
|
|
30016
|
+
timings: { extractMs, retainMs: Date.now() - tRetain },
|
|
30017
|
+
model: options.extract.model ?? DEFAULT_EXTRACTION_MODEL,
|
|
29965
30018
|
// Only meaningful alongside `outcome: "empty-after-retry"`. Returned as well
|
|
29966
30019
|
// as pushed through the callback so a consumer that only inspects the result
|
|
29967
30020
|
// (rather than wiring a hook) can still report WHY.
|
|
@@ -30217,27 +30270,23 @@ function createAutoExtractor(options) {
|
|
|
30217
30270
|
const t0 = Date.now();
|
|
30218
30271
|
void (async () => {
|
|
30219
30272
|
try {
|
|
30220
|
-
const { candidates, results, failedCount, outcome, failure } = await extractAndRetain(
|
|
30221
|
-
|
|
30222
|
-
|
|
30223
|
-
{
|
|
30224
|
-
|
|
30225
|
-
|
|
30226
|
-
|
|
30227
|
-
|
|
30228
|
-
|
|
30229
|
-
|
|
30230
|
-
|
|
30231
|
-
|
|
30232
|
-
|
|
30233
|
-
|
|
30234
|
-
|
|
30235
|
-
},
|
|
30236
|
-
...options.onMemoryQuarantined && {
|
|
30237
|
-
onQuarantined: (info) => options.onMemoryQuarantined?.({ ...info, conversationId })
|
|
30238
|
-
}
|
|
30273
|
+
const { candidates, results, failedCount, outcome, failure, funnel, timings, model } = await extractAndRetain(window2, retainCtx, {
|
|
30274
|
+
extract,
|
|
30275
|
+
...options.minConfidence !== void 0 && { minConfidence: options.minConfidence },
|
|
30276
|
+
...options.entityCtx !== void 0 && { entityCtx: options.entityCtx },
|
|
30277
|
+
...options.scope !== void 0 && { scope: options.scope },
|
|
30278
|
+
...options.folderId !== void 0 && { folderId: options.folderId },
|
|
30279
|
+
...consolidateOptions !== void 0 && { consolidateOptions },
|
|
30280
|
+
...injectionClassifierOptions !== void 0 && {
|
|
30281
|
+
injectionClassifier: injectionClassifierOptions
|
|
30282
|
+
},
|
|
30283
|
+
...options.onCandidateFailed && {
|
|
30284
|
+
onCandidateFailed: (candidate, error) => options.onCandidateFailed?.({ candidate, error, conversationId })
|
|
30285
|
+
},
|
|
30286
|
+
...options.onMemoryQuarantined && {
|
|
30287
|
+
onQuarantined: (info) => options.onMemoryQuarantined?.({ ...info, conversationId })
|
|
30239
30288
|
}
|
|
30240
|
-
);
|
|
30289
|
+
});
|
|
30241
30290
|
if (outcome !== "empty-after-retry") {
|
|
30242
30291
|
const advancedTo = window2[window2.length - 1].id;
|
|
30243
30292
|
stateFor(conversationId).watermark = advancedTo;
|
|
@@ -30258,6 +30307,9 @@ function createAutoExtractor(options) {
|
|
|
30258
30307
|
durationMs: Date.now() - t0,
|
|
30259
30308
|
conversationId,
|
|
30260
30309
|
outcome,
|
|
30310
|
+
funnel,
|
|
30311
|
+
timings,
|
|
30312
|
+
model,
|
|
30261
30313
|
// Only set alongside `outcome: "empty-after-retry"`. Spread so the key
|
|
30262
30314
|
// is absent rather than explicitly undefined on a healthy turn —
|
|
30263
30315
|
// analytics backends store an explicit undefined as a real value.
|
package/dist/server/index.d.mts
CHANGED
|
@@ -5795,6 +5795,15 @@ interface RecallDiagnostics {
|
|
|
5795
5795
|
degraded: RecallDegradation[];
|
|
5796
5796
|
}
|
|
5797
5797
|
type RetainAction = "create" | "merge" | "update" | "skip" | "suppressed" | "supersede";
|
|
5798
|
+
/**
|
|
5799
|
+
* The consolidation LLM's decision for a candidate, when it made one. Reported
|
|
5800
|
+
* on {@link RetainResult.consolidation} so a host can tell an LLM `noop` (the
|
|
5801
|
+
* fact already exists) from a cosine auto-merge — both arrive as
|
|
5802
|
+
* `action: "merge"` — and can read how often the model reaches for `supersede`
|
|
5803
|
+
* or `update` versus `create`. A degraded fallback create (LLM error, bad
|
|
5804
|
+
* response) carries no decision; `onFallback` reports those.
|
|
5805
|
+
*/
|
|
5806
|
+
type ConsolidationAction = "create" | "update" | "noop" | "supersede";
|
|
5798
5807
|
type RetainSource = "manual" | "auto-extracted" | "capsule";
|
|
5799
5808
|
/**
|
|
5800
5809
|
* Why a retain returned "create" instead of applying a consolidation decision.
|
|
@@ -5934,6 +5943,33 @@ interface RetainResult {
|
|
|
5934
5943
|
tombstoneId?: string;
|
|
5935
5944
|
/** Updated proof_count after this write. 0 when nothing was written (suppressed). */
|
|
5936
5945
|
proofCount: number;
|
|
5946
|
+
/**
|
|
5947
|
+
* How close the write was to the threshold that allowed it. Absent on the
|
|
5948
|
+
* actions that have no such score (`create`, `update`, `supersede`, `skip`).
|
|
5949
|
+
*
|
|
5950
|
+
* The two paths report DIFFERENT things and a dashboard has to know which:
|
|
5951
|
+
*
|
|
5952
|
+
* - `suppressed` — an exact cosine against the tombstone, computed in
|
|
5953
|
+
* `findTombstoneMatch`.
|
|
5954
|
+
* - `merge` — the RANKER's score for the target, not a pure cosine. The
|
|
5955
|
+
* cosine is what cleared `minSimilarity`, but the supersession pass may
|
|
5956
|
+
* then adjust it (`oldScore - delta` / `newScore + delta`) before this
|
|
5957
|
+
* value is read, and can in principle reorder the winner. Read it as
|
|
5958
|
+
* "the score the merge was chosen on", within the supersession delta of
|
|
5959
|
+
* the cosine — not as the raw pairwise similarity.
|
|
5960
|
+
*/
|
|
5961
|
+
similarity?: number;
|
|
5962
|
+
/**
|
|
5963
|
+
* What the consolidation LLM decided for this candidate, when consolidation
|
|
5964
|
+
* ran — see {@link ConsolidationAction}.
|
|
5965
|
+
*
|
|
5966
|
+
* Reported for the DECISION, not for what the write ended up doing, so the
|
|
5967
|
+
* two can disagree and be read as such: a `merge` carrying
|
|
5968
|
+
* `consolidation: "create"` is the model saying "new fact" and the strict
|
|
5969
|
+
* cosine stage merging anyway. Absent when consolidation did not run, and
|
|
5970
|
+
* absent on a degraded fallback create (`onFallback` owns that signal).
|
|
5971
|
+
*/
|
|
5972
|
+
consolidation?: ConsolidationAction;
|
|
5937
5973
|
}
|
|
5938
5974
|
|
|
5939
5975
|
/**
|
|
@@ -6160,6 +6196,61 @@ interface ExtractFactsOptions extends PortalLlmAuth {
|
|
|
6160
6196
|
* callers may leave it unset.
|
|
6161
6197
|
*/
|
|
6162
6198
|
onAttempt?: (attempt: PortalLlmAttempt) => void;
|
|
6199
|
+
/**
|
|
6200
|
+
* Fired once per successful completion with how many candidates the model
|
|
6201
|
+
* emitted (`rawCount`) and how many survived {@link validateCandidates}
|
|
6202
|
+
* (`validCount`) — the non-string / empty / over-cap / low-signal / bad-
|
|
6203
|
+
* confidence drops that until now were a bare `continue` nobody counted.
|
|
6204
|
+
*
|
|
6205
|
+
* Without it a `no-facts` turn cannot be split into "the model found nothing"
|
|
6206
|
+
* and "the model found things we threw away", which is the difference between
|
|
6207
|
+
* a prompt problem and a validator problem. Counts only; never content.
|
|
6208
|
+
*/
|
|
6209
|
+
onCandidatesParsed?: (stats: {
|
|
6210
|
+
rawCount: number;
|
|
6211
|
+
validCount: number;
|
|
6212
|
+
}) => void;
|
|
6213
|
+
}
|
|
6214
|
+
/**
|
|
6215
|
+
* Where a turn's candidates went between the model's completion and the vault —
|
|
6216
|
+
* every stage that can drop one, as a count. Returned by {@link extractAndRetain}
|
|
6217
|
+
* and forwarded on `TurnCompleteEvent` so a host can emit it; nothing here is
|
|
6218
|
+
* content.
|
|
6219
|
+
*
|
|
6220
|
+
* Reads as a funnel: `raw ≥ valid ≥ afterRedaction ≥ aboveConfidence`, then
|
|
6221
|
+
* `aboveConfidence = quarantined + retained + failed`.
|
|
6222
|
+
* @public
|
|
6223
|
+
*/
|
|
6224
|
+
interface ExtractionFunnel {
|
|
6225
|
+
/** Candidates in the model's completion, before any validation. */
|
|
6226
|
+
rawCandidateCount: number;
|
|
6227
|
+
/** Survivors of {@link validateCandidates} (shape, length, low-signal, confidence-is-a-number). */
|
|
6228
|
+
validCandidateCount: number;
|
|
6229
|
+
/** Survivors of PII de-anonymization (equals `validCandidateCount` when redaction is off). */
|
|
6230
|
+
afterRedactionCount: number;
|
|
6231
|
+
/** Survivors of the `minConfidence` floor — the candidates that reached the injection screen. */
|
|
6232
|
+
aboveConfidenceCount: number;
|
|
6233
|
+
/**
|
|
6234
|
+
* Held for review by the injection screen and SUCCESSFULLY persisted — the
|
|
6235
|
+
* same set as `extractAndRetain`'s `quarantined`. A screened candidate whose
|
|
6236
|
+
* `retain()` threw is in `failedCount` instead, never both.
|
|
6237
|
+
*/
|
|
6238
|
+
quarantinedCount: number;
|
|
6239
|
+
/** Written through `retain()` (any disposition). */
|
|
6240
|
+
retainedCount: number;
|
|
6241
|
+
/** `retain()` threw. */
|
|
6242
|
+
failedCount: number;
|
|
6243
|
+
}
|
|
6244
|
+
/**
|
|
6245
|
+
* Wall-clock split of one {@link extractAndRetain} call. The worker's
|
|
6246
|
+
* `durationMs` is the sum plus the screen; these say which half is slow.
|
|
6247
|
+
* @public
|
|
6248
|
+
*/
|
|
6249
|
+
interface ExtractionTimings {
|
|
6250
|
+
/** The extraction LLM call, all attempts and backoff included. */
|
|
6251
|
+
extractMs: number;
|
|
6252
|
+
/** The retain loop — embeddings, consolidation LLM calls, writes — over every candidate. */
|
|
6253
|
+
retainMs: number;
|
|
6163
6254
|
}
|
|
6164
6255
|
/**
|
|
6165
6256
|
* Stage 1 — call the LLM to extract candidate facts from the recent
|
|
@@ -6277,6 +6368,12 @@ declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: Ret
|
|
|
6277
6368
|
* the give-up, so "extraction is failing" can be reported as *why* it failed.
|
|
6278
6369
|
*/
|
|
6279
6370
|
failure?: PortalLlmFailure;
|
|
6371
|
+
/** Where the candidates went, stage by stage — see {@link ExtractionFunnel}. */
|
|
6372
|
+
funnel: ExtractionFunnel;
|
|
6373
|
+
/** Extract vs. retain wall-clock — see {@link ExtractionTimings}. */
|
|
6374
|
+
timings: ExtractionTimings;
|
|
6375
|
+
/** The extraction model this call asked for (the resolved default when unset). */
|
|
6376
|
+
model: string;
|
|
6280
6377
|
}>;
|
|
6281
6378
|
|
|
6282
6379
|
/**
|
|
@@ -8072,6 +8169,16 @@ interface TurnCompleteEvent {
|
|
|
8072
8169
|
* carries content.
|
|
8073
8170
|
*/
|
|
8074
8171
|
failure?: PortalLlmFailure;
|
|
8172
|
+
/**
|
|
8173
|
+
* Where the candidates went between the model and the vault, as counts — the
|
|
8174
|
+
* drops before `retain()` that `candidates`/`results` cannot show. See
|
|
8175
|
+
* {@link ExtractionFunnel}.
|
|
8176
|
+
*/
|
|
8177
|
+
funnel?: ExtractionFunnel;
|
|
8178
|
+
/** Extract vs. retain wall-clock split of `durationMs`. See {@link ExtractionTimings}. */
|
|
8179
|
+
timings?: ExtractionTimings;
|
|
8180
|
+
/** The extraction model this turn asked for. */
|
|
8181
|
+
model?: string;
|
|
8075
8182
|
}
|
|
8076
8183
|
/** @public */
|
|
8077
8184
|
/**
|
|
@@ -10734,4 +10841,4 @@ declare function sanitizeQuotes(s: string): string;
|
|
|
10734
10841
|
declare function renderTemplate(value: string | null | undefined, template: string): string | null;
|
|
10735
10842
|
declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
|
|
10736
10843
|
|
|
10737
|
-
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 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, EncryptionKeyMissingError, 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 MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, 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, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
|
|
10844
|
+
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationAction, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type 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 MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, 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, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
|
package/dist/server/index.d.ts
CHANGED
|
@@ -5795,6 +5795,15 @@ interface RecallDiagnostics {
|
|
|
5795
5795
|
degraded: RecallDegradation[];
|
|
5796
5796
|
}
|
|
5797
5797
|
type RetainAction = "create" | "merge" | "update" | "skip" | "suppressed" | "supersede";
|
|
5798
|
+
/**
|
|
5799
|
+
* The consolidation LLM's decision for a candidate, when it made one. Reported
|
|
5800
|
+
* on {@link RetainResult.consolidation} so a host can tell an LLM `noop` (the
|
|
5801
|
+
* fact already exists) from a cosine auto-merge — both arrive as
|
|
5802
|
+
* `action: "merge"` — and can read how often the model reaches for `supersede`
|
|
5803
|
+
* or `update` versus `create`. A degraded fallback create (LLM error, bad
|
|
5804
|
+
* response) carries no decision; `onFallback` reports those.
|
|
5805
|
+
*/
|
|
5806
|
+
type ConsolidationAction = "create" | "update" | "noop" | "supersede";
|
|
5798
5807
|
type RetainSource = "manual" | "auto-extracted" | "capsule";
|
|
5799
5808
|
/**
|
|
5800
5809
|
* Why a retain returned "create" instead of applying a consolidation decision.
|
|
@@ -5934,6 +5943,33 @@ interface RetainResult {
|
|
|
5934
5943
|
tombstoneId?: string;
|
|
5935
5944
|
/** Updated proof_count after this write. 0 when nothing was written (suppressed). */
|
|
5936
5945
|
proofCount: number;
|
|
5946
|
+
/**
|
|
5947
|
+
* How close the write was to the threshold that allowed it. Absent on the
|
|
5948
|
+
* actions that have no such score (`create`, `update`, `supersede`, `skip`).
|
|
5949
|
+
*
|
|
5950
|
+
* The two paths report DIFFERENT things and a dashboard has to know which:
|
|
5951
|
+
*
|
|
5952
|
+
* - `suppressed` — an exact cosine against the tombstone, computed in
|
|
5953
|
+
* `findTombstoneMatch`.
|
|
5954
|
+
* - `merge` — the RANKER's score for the target, not a pure cosine. The
|
|
5955
|
+
* cosine is what cleared `minSimilarity`, but the supersession pass may
|
|
5956
|
+
* then adjust it (`oldScore - delta` / `newScore + delta`) before this
|
|
5957
|
+
* value is read, and can in principle reorder the winner. Read it as
|
|
5958
|
+
* "the score the merge was chosen on", within the supersession delta of
|
|
5959
|
+
* the cosine — not as the raw pairwise similarity.
|
|
5960
|
+
*/
|
|
5961
|
+
similarity?: number;
|
|
5962
|
+
/**
|
|
5963
|
+
* What the consolidation LLM decided for this candidate, when consolidation
|
|
5964
|
+
* ran — see {@link ConsolidationAction}.
|
|
5965
|
+
*
|
|
5966
|
+
* Reported for the DECISION, not for what the write ended up doing, so the
|
|
5967
|
+
* two can disagree and be read as such: a `merge` carrying
|
|
5968
|
+
* `consolidation: "create"` is the model saying "new fact" and the strict
|
|
5969
|
+
* cosine stage merging anyway. Absent when consolidation did not run, and
|
|
5970
|
+
* absent on a degraded fallback create (`onFallback` owns that signal).
|
|
5971
|
+
*/
|
|
5972
|
+
consolidation?: ConsolidationAction;
|
|
5937
5973
|
}
|
|
5938
5974
|
|
|
5939
5975
|
/**
|
|
@@ -6160,6 +6196,61 @@ interface ExtractFactsOptions extends PortalLlmAuth {
|
|
|
6160
6196
|
* callers may leave it unset.
|
|
6161
6197
|
*/
|
|
6162
6198
|
onAttempt?: (attempt: PortalLlmAttempt) => void;
|
|
6199
|
+
/**
|
|
6200
|
+
* Fired once per successful completion with how many candidates the model
|
|
6201
|
+
* emitted (`rawCount`) and how many survived {@link validateCandidates}
|
|
6202
|
+
* (`validCount`) — the non-string / empty / over-cap / low-signal / bad-
|
|
6203
|
+
* confidence drops that until now were a bare `continue` nobody counted.
|
|
6204
|
+
*
|
|
6205
|
+
* Without it a `no-facts` turn cannot be split into "the model found nothing"
|
|
6206
|
+
* and "the model found things we threw away", which is the difference between
|
|
6207
|
+
* a prompt problem and a validator problem. Counts only; never content.
|
|
6208
|
+
*/
|
|
6209
|
+
onCandidatesParsed?: (stats: {
|
|
6210
|
+
rawCount: number;
|
|
6211
|
+
validCount: number;
|
|
6212
|
+
}) => void;
|
|
6213
|
+
}
|
|
6214
|
+
/**
|
|
6215
|
+
* Where a turn's candidates went between the model's completion and the vault —
|
|
6216
|
+
* every stage that can drop one, as a count. Returned by {@link extractAndRetain}
|
|
6217
|
+
* and forwarded on `TurnCompleteEvent` so a host can emit it; nothing here is
|
|
6218
|
+
* content.
|
|
6219
|
+
*
|
|
6220
|
+
* Reads as a funnel: `raw ≥ valid ≥ afterRedaction ≥ aboveConfidence`, then
|
|
6221
|
+
* `aboveConfidence = quarantined + retained + failed`.
|
|
6222
|
+
* @public
|
|
6223
|
+
*/
|
|
6224
|
+
interface ExtractionFunnel {
|
|
6225
|
+
/** Candidates in the model's completion, before any validation. */
|
|
6226
|
+
rawCandidateCount: number;
|
|
6227
|
+
/** Survivors of {@link validateCandidates} (shape, length, low-signal, confidence-is-a-number). */
|
|
6228
|
+
validCandidateCount: number;
|
|
6229
|
+
/** Survivors of PII de-anonymization (equals `validCandidateCount` when redaction is off). */
|
|
6230
|
+
afterRedactionCount: number;
|
|
6231
|
+
/** Survivors of the `minConfidence` floor — the candidates that reached the injection screen. */
|
|
6232
|
+
aboveConfidenceCount: number;
|
|
6233
|
+
/**
|
|
6234
|
+
* Held for review by the injection screen and SUCCESSFULLY persisted — the
|
|
6235
|
+
* same set as `extractAndRetain`'s `quarantined`. A screened candidate whose
|
|
6236
|
+
* `retain()` threw is in `failedCount` instead, never both.
|
|
6237
|
+
*/
|
|
6238
|
+
quarantinedCount: number;
|
|
6239
|
+
/** Written through `retain()` (any disposition). */
|
|
6240
|
+
retainedCount: number;
|
|
6241
|
+
/** `retain()` threw. */
|
|
6242
|
+
failedCount: number;
|
|
6243
|
+
}
|
|
6244
|
+
/**
|
|
6245
|
+
* Wall-clock split of one {@link extractAndRetain} call. The worker's
|
|
6246
|
+
* `durationMs` is the sum plus the screen; these say which half is slow.
|
|
6247
|
+
* @public
|
|
6248
|
+
*/
|
|
6249
|
+
interface ExtractionTimings {
|
|
6250
|
+
/** The extraction LLM call, all attempts and backoff included. */
|
|
6251
|
+
extractMs: number;
|
|
6252
|
+
/** The retain loop — embeddings, consolidation LLM calls, writes — over every candidate. */
|
|
6253
|
+
retainMs: number;
|
|
6163
6254
|
}
|
|
6164
6255
|
/**
|
|
6165
6256
|
* Stage 1 — call the LLM to extract candidate facts from the recent
|
|
@@ -6277,6 +6368,12 @@ declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: Ret
|
|
|
6277
6368
|
* the give-up, so "extraction is failing" can be reported as *why* it failed.
|
|
6278
6369
|
*/
|
|
6279
6370
|
failure?: PortalLlmFailure;
|
|
6371
|
+
/** Where the candidates went, stage by stage — see {@link ExtractionFunnel}. */
|
|
6372
|
+
funnel: ExtractionFunnel;
|
|
6373
|
+
/** Extract vs. retain wall-clock — see {@link ExtractionTimings}. */
|
|
6374
|
+
timings: ExtractionTimings;
|
|
6375
|
+
/** The extraction model this call asked for (the resolved default when unset). */
|
|
6376
|
+
model: string;
|
|
6280
6377
|
}>;
|
|
6281
6378
|
|
|
6282
6379
|
/**
|
|
@@ -8072,6 +8169,16 @@ interface TurnCompleteEvent {
|
|
|
8072
8169
|
* carries content.
|
|
8073
8170
|
*/
|
|
8074
8171
|
failure?: PortalLlmFailure;
|
|
8172
|
+
/**
|
|
8173
|
+
* Where the candidates went between the model and the vault, as counts — the
|
|
8174
|
+
* drops before `retain()` that `candidates`/`results` cannot show. See
|
|
8175
|
+
* {@link ExtractionFunnel}.
|
|
8176
|
+
*/
|
|
8177
|
+
funnel?: ExtractionFunnel;
|
|
8178
|
+
/** Extract vs. retain wall-clock split of `durationMs`. See {@link ExtractionTimings}. */
|
|
8179
|
+
timings?: ExtractionTimings;
|
|
8180
|
+
/** The extraction model this turn asked for. */
|
|
8181
|
+
model?: string;
|
|
8075
8182
|
}
|
|
8076
8183
|
/** @public */
|
|
8077
8184
|
/**
|
|
@@ -10734,4 +10841,4 @@ declare function sanitizeQuotes(s: string): string;
|
|
|
10734
10841
|
declare function renderTemplate(value: string | null | undefined, template: string): string | null;
|
|
10735
10842
|
declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
|
|
10736
10843
|
|
|
10737
|
-
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 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, EncryptionKeyMissingError, 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 MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, 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, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
|
|
10844
|
+
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationAction, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type 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 MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, 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, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
|