@anuma/sdk 6.17.2 → 6.19.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-JXN7LD6B.mjs → chunk-L253L67R.mjs} +2 -2
- package/dist/expo/{chunk-4Z2X4UYQ.mjs → chunk-WUG6GTHO.mjs} +10 -1
- package/dist/expo/{chunk-A2G6TRUK.mjs → chunk-XDBX4FZY.mjs} +1 -1
- package/dist/{react/consolidate-7NMKF7UC.mjs → expo/consolidate-XBYKAFKT.mjs} +2 -2
- package/dist/expo/index.cjs +90 -8
- package/dist/expo/index.d.mts +100 -2
- package/dist/expo/index.d.ts +100 -2
- package/dist/expo/index.mjs +84 -11
- package/dist/expo/{recall-TGRI5MN4.mjs → recall-B3PUQHJK.mjs} +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/react/{chunk-7X7BNMGS.mjs → chunk-AVYB5IXC.mjs} +1 -1
- package/dist/react/{chunk-TVPCH7ZZ.mjs → chunk-JRJRRO4P.mjs} +2 -2
- package/dist/react/{chunk-4Z2X4UYQ.mjs → chunk-WUG6GTHO.mjs} +10 -1
- package/dist/{expo/consolidate-ZM5JNULQ.mjs → react/consolidate-URHGJT7I.mjs} +2 -2
- package/dist/react/index.cjs +81 -4
- package/dist/react/index.d.mts +100 -2
- package/dist/react/index.d.ts +100 -2
- package/dist/react/index.mjs +75 -7
- package/dist/react/{recall-OKNLU335.mjs → recall-WPYCG4ED.mjs} +2 -2
- package/dist/server/{chunk-K7H7ICPK.mjs → chunk-2A6HXY4P.mjs} +2 -2
- package/dist/server/{chunk-4LPSEROP.mjs → chunk-RKQ4MRS2.mjs} +1 -1
- package/dist/server/{chunk-BSCEZOIW.mjs → chunk-YXL5VKCO.mjs} +10 -1
- package/dist/server/{consolidate-MSAXASHL.mjs → consolidate-54P6QZKU.mjs} +2 -2
- package/dist/server/index.cjs +53 -2
- package/dist/server/index.d.mts +91 -1
- package/dist/server/index.d.ts +91 -1
- package/dist/server/index.mjs +47 -5
- package/dist/server/{recall-YXJATOSD.mjs → recall-JPIWNKA7.mjs} +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
callPortalJsonCompletion,
|
|
3
3
|
getLogger
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WUG6GTHO.mjs";
|
|
5
5
|
import {
|
|
6
6
|
BASE_URL,
|
|
7
7
|
createClientConfig
|
|
@@ -6908,7 +6908,7 @@ function createMemoryVaultSearchTool(vaultCtx, embeddingOptions, cache, searchOp
|
|
|
6908
6908
|
subQueries = decomp.subQueries;
|
|
6909
6909
|
}
|
|
6910
6910
|
}
|
|
6911
|
-
const { recall: recall2 } = await import("./recall-
|
|
6911
|
+
const { recall: recall2 } = await import("./recall-B3PUQHJK.mjs");
|
|
6912
6912
|
let recallDegraded = [];
|
|
6913
6913
|
const result = await recall2(
|
|
6914
6914
|
query,
|
|
@@ -172,7 +172,16 @@ async function callPortalJsonCompletion(req) {
|
|
|
172
172
|
...reinforce && { reinforceJsonContract: true }
|
|
173
173
|
} : reinforce ? { ...req, reinforceJsonContract: true } : req;
|
|
174
174
|
const outcome = await attemptPortalJson(attemptReq, endpoint);
|
|
175
|
-
if (outcome.kind === "ok")
|
|
175
|
+
if (outcome.kind === "ok") {
|
|
176
|
+
req.onAttempt?.({ attempt, ok: true });
|
|
177
|
+
return outcome.value;
|
|
178
|
+
}
|
|
179
|
+
req.onAttempt?.({
|
|
180
|
+
attempt,
|
|
181
|
+
ok: false,
|
|
182
|
+
reason: outcome.code,
|
|
183
|
+
...outcome.httpStatus !== void 0 && { httpStatus: outcome.httpStatus }
|
|
184
|
+
});
|
|
176
185
|
lastFailure = {
|
|
177
186
|
reason: outcome.code,
|
|
178
187
|
...outcome.httpStatus !== void 0 && { httpStatus: outcome.httpStatus },
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
notifyConsolidationFallback,
|
|
3
3
|
resolvePiiRedactor
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XDBX4FZY.mjs";
|
|
5
5
|
import {
|
|
6
6
|
callPortalJsonCompletion
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WUG6GTHO.mjs";
|
|
8
8
|
import "./chunk-GYKJOWEO.mjs";
|
|
9
9
|
|
|
10
10
|
// src/lib/memory/consolidate.ts
|
package/dist/expo/index.cjs
CHANGED
|
@@ -6261,7 +6261,16 @@ async function callPortalJsonCompletion(req) {
|
|
|
6261
6261
|
...reinforce && { reinforceJsonContract: true }
|
|
6262
6262
|
} : reinforce ? { ...req, reinforceJsonContract: true } : req;
|
|
6263
6263
|
const outcome = await attemptPortalJson(attemptReq, endpoint);
|
|
6264
|
-
if (outcome.kind === "ok")
|
|
6264
|
+
if (outcome.kind === "ok") {
|
|
6265
|
+
req.onAttempt?.({ attempt, ok: true });
|
|
6266
|
+
return outcome.value;
|
|
6267
|
+
}
|
|
6268
|
+
req.onAttempt?.({
|
|
6269
|
+
attempt,
|
|
6270
|
+
ok: false,
|
|
6271
|
+
reason: outcome.code,
|
|
6272
|
+
...outcome.httpStatus !== void 0 && { httpStatus: outcome.httpStatus }
|
|
6273
|
+
});
|
|
6265
6274
|
lastFailure = {
|
|
6266
6275
|
reason: outcome.code,
|
|
6267
6276
|
...outcome.httpStatus !== void 0 && { httpStatus: outcome.httpStatus },
|
|
@@ -16861,7 +16870,8 @@ Extract durable user facts.`,
|
|
|
16861
16870
|
...options.maxAttempts !== void 0 && { maxAttempts: options.maxAttempts },
|
|
16862
16871
|
...options.timeoutMs !== void 0 && { timeoutMs: options.timeoutMs },
|
|
16863
16872
|
...options.totalTimeoutMs !== void 0 && { totalTimeoutMs: options.totalTimeoutMs },
|
|
16864
|
-
...options.backoffMs && { backoffMs: options.backoffMs }
|
|
16873
|
+
...options.backoffMs && { backoffMs: options.backoffMs },
|
|
16874
|
+
...options.onAttempt && { onAttempt: options.onAttempt }
|
|
16865
16875
|
});
|
|
16866
16876
|
if (parsed === null) {
|
|
16867
16877
|
options.onExhaustedEmpty?.(failure ?? { reason: "empty-content", attempts: 1 });
|
|
@@ -19308,6 +19318,26 @@ var MANUAL_FACT_TYPES = [
|
|
|
19308
19318
|
function normalizeManualFactType(value) {
|
|
19309
19319
|
return typeof value === "string" && MANUAL_FACT_TYPES.includes(value) ? value : void 0;
|
|
19310
19320
|
}
|
|
19321
|
+
async function notifyWritten(options, input, outcome) {
|
|
19322
|
+
try {
|
|
19323
|
+
await options?.onWritten?.({ input, outcome });
|
|
19324
|
+
} catch {
|
|
19325
|
+
}
|
|
19326
|
+
}
|
|
19327
|
+
function describeWriteOutcome(outcome) {
|
|
19328
|
+
switch (outcome.action) {
|
|
19329
|
+
case "create":
|
|
19330
|
+
return `Memory saved successfully (ID: ${outcome.memoryId}).`;
|
|
19331
|
+
case "update":
|
|
19332
|
+
case "supersede":
|
|
19333
|
+
return `Memory saved successfully (ID: ${outcome.memoryId}); it replaces an earlier version of this fact.`;
|
|
19334
|
+
case "merge":
|
|
19335
|
+
case "skip":
|
|
19336
|
+
return `The vault already holds this fact (ID: ${outcome.memoryId}); it was noted as re-observed. Nothing new was created \u2014 do not save it again.`;
|
|
19337
|
+
case "suppressed":
|
|
19338
|
+
return "Not saved: this matches a memory the user previously deleted. Do not re-save it.";
|
|
19339
|
+
}
|
|
19340
|
+
}
|
|
19311
19341
|
function createMemoryVaultTool(vaultCtx, options, embeddingOptions, cache) {
|
|
19312
19342
|
const hasOnSave = !!options?.onSave;
|
|
19313
19343
|
const folderNames = options?.folderMap ? Array.from(options.folderMap.keys()) : [];
|
|
@@ -19400,6 +19430,17 @@ function createMemoryVaultTool(vaultCtx, options, embeddingOptions, cache) {
|
|
|
19400
19430
|
return `Memory updated successfully (ID: ${updated.uniqueId}).`;
|
|
19401
19431
|
} else {
|
|
19402
19432
|
const folderId = folderName ? options?.folderMap?.get(folderName) : void 0;
|
|
19433
|
+
if (options?.write) {
|
|
19434
|
+
const input = {
|
|
19435
|
+
content,
|
|
19436
|
+
scope,
|
|
19437
|
+
...folderId !== void 0 && { folderId },
|
|
19438
|
+
...factType !== void 0 && { factType }
|
|
19439
|
+
};
|
|
19440
|
+
const outcome = await options.write(input);
|
|
19441
|
+
await notifyWritten(options, input, outcome);
|
|
19442
|
+
return describeWriteOutcome(outcome);
|
|
19443
|
+
}
|
|
19403
19444
|
const created = await createVaultMemoryOp(vaultCtx, {
|
|
19404
19445
|
content,
|
|
19405
19446
|
scope,
|
|
@@ -19419,6 +19460,16 @@ function createMemoryVaultTool(vaultCtx, options, embeddingOptions, cache) {
|
|
|
19419
19460
|
}
|
|
19420
19461
|
);
|
|
19421
19462
|
}
|
|
19463
|
+
await notifyWritten(
|
|
19464
|
+
options,
|
|
19465
|
+
{
|
|
19466
|
+
content,
|
|
19467
|
+
scope,
|
|
19468
|
+
...folderId !== void 0 && { folderId },
|
|
19469
|
+
...factType !== void 0 && { factType }
|
|
19470
|
+
},
|
|
19471
|
+
{ memoryId: created.uniqueId, action: "create" }
|
|
19472
|
+
);
|
|
19422
19473
|
return `Memory saved successfully (ID: ${created.uniqueId}).`;
|
|
19423
19474
|
}
|
|
19424
19475
|
} catch (error) {
|
|
@@ -20771,12 +20822,6 @@ function useChatStorage(options) {
|
|
|
20771
20822
|
},
|
|
20772
20823
|
[storageCtx, getToken, baseUrl, embeddingModel, maskEmbeddingInput]
|
|
20773
20824
|
);
|
|
20774
|
-
const createMemoryVaultTool2 = (0, import_react4.useCallback)(
|
|
20775
|
-
(options2) => {
|
|
20776
|
-
return createMemoryVaultTool(vaultCtx, options2);
|
|
20777
|
-
},
|
|
20778
|
-
[vaultCtx]
|
|
20779
|
-
);
|
|
20780
20825
|
const vaultEmbeddingCache = (0, import_react4.useMemo)(
|
|
20781
20826
|
() => getVaultEmbeddingCache(database, walletAddress, embeddingModel),
|
|
20782
20827
|
[database, walletAddress, embeddingModel]
|
|
@@ -20788,6 +20833,42 @@ function useChatStorage(options) {
|
|
|
20788
20833
|
chunkVectorCacheRef.current.clear();
|
|
20789
20834
|
});
|
|
20790
20835
|
}, [vaultEmbeddingCache]);
|
|
20836
|
+
const retainVaultMemory = (0, import_react4.useCallback)(
|
|
20837
|
+
async (input) => {
|
|
20838
|
+
if (!getToken) {
|
|
20839
|
+
throw new Error("getToken is required to retain a vault memory");
|
|
20840
|
+
}
|
|
20841
|
+
return retain(
|
|
20842
|
+
input.content,
|
|
20843
|
+
{
|
|
20844
|
+
vaultCtx,
|
|
20845
|
+
embeddingOptions: {
|
|
20846
|
+
getToken,
|
|
20847
|
+
baseUrl,
|
|
20848
|
+
model: embeddingModel,
|
|
20849
|
+
maskInput: maskEmbeddingInput
|
|
20850
|
+
},
|
|
20851
|
+
vaultCache: vaultEmbeddingCache
|
|
20852
|
+
},
|
|
20853
|
+
{
|
|
20854
|
+
source: "manual",
|
|
20855
|
+
scope: input.scope,
|
|
20856
|
+
...input.folderId !== void 0 && { folderId: input.folderId },
|
|
20857
|
+
...input.factType !== void 0 && { factType: input.factType }
|
|
20858
|
+
}
|
|
20859
|
+
);
|
|
20860
|
+
},
|
|
20861
|
+
[vaultCtx, getToken, baseUrl, embeddingModel, maskEmbeddingInput, vaultEmbeddingCache]
|
|
20862
|
+
);
|
|
20863
|
+
const createMemoryVaultTool2 = (0, import_react4.useCallback)(
|
|
20864
|
+
(options2) => {
|
|
20865
|
+
return createMemoryVaultTool(
|
|
20866
|
+
vaultCtx,
|
|
20867
|
+
getToken ? { write: retainVaultMemory, ...options2 } : options2
|
|
20868
|
+
);
|
|
20869
|
+
},
|
|
20870
|
+
[vaultCtx, getToken, retainVaultMemory]
|
|
20871
|
+
);
|
|
20791
20872
|
const createRecallTool2 = (0, import_react4.useCallback)(
|
|
20792
20873
|
(toolOptions, callbacks) => {
|
|
20793
20874
|
if (!getToken) {
|
|
@@ -22137,6 +22218,7 @@ function useChatStorage(options) {
|
|
|
22137
22218
|
getMessageCount,
|
|
22138
22219
|
createMemoryEngineTool: createMemoryEngineTool2,
|
|
22139
22220
|
createMemoryVaultTool: createMemoryVaultTool2,
|
|
22221
|
+
retainVaultMemory,
|
|
22140
22222
|
createRecallTool: createRecallTool2,
|
|
22141
22223
|
recall: recallFn,
|
|
22142
22224
|
getVaultMemories,
|
package/dist/expo/index.d.mts
CHANGED
|
@@ -5002,7 +5002,7 @@ interface EntityOperationsContext {
|
|
|
5002
5002
|
*
|
|
5003
5003
|
* @public
|
|
5004
5004
|
*/
|
|
5005
|
-
type TaskType = "title" | "commit_message" | "memory_extract" | "memory_dedup" | "memory_decay" | "memory_injection_check" | "memory_verify_support" | "memory_autosort" | "memory_topic" | "memory_consolidate" | "memory_decompose" | "memory_profile_synth" | "memory_graph" | "folder_context" | "selection_memory" | "summarize" | "style_analysis" | "classify_search" | "app_inspiration_generate" | "app_inspiration_trends" | "app_inspiration_remix" | "spotlight_image" | "slide_image" | "slide_video" | "slide_music" | "slide_sfx" | "media_video" | "media_audio" | "media_bg_removal" | "media_image_preset" | "tool_app_builder" | "tool_document_builder" | "tool_slides" | "tool_slides_image_gen" | "connector_guidance" | "cf_task" | "xbot_intent" | "xbot_council" | "scheduled_task";
|
|
5005
|
+
type TaskType = "title" | "commit_message" | "memory_extract" | "memory_import_extract" | "memory_dedup" | "memory_decay" | "memory_injection_check" | "memory_verify_support" | "memory_autosort" | "memory_topic" | "memory_consolidate" | "memory_decompose" | "memory_profile_synth" | "memory_graph" | "folder_context" | "selection_memory" | "summarize" | "style_analysis" | "classify_search" | "app_inspiration_generate" | "app_inspiration_trends" | "app_inspiration_remix" | "spotlight_image" | "slide_image" | "slide_video" | "slide_music" | "slide_sfx" | "media_video" | "media_audio" | "media_bg_removal" | "media_image_preset" | "tool_app_builder" | "tool_document_builder" | "tool_slides" | "tool_slides_image_gen" | "connector_guidance" | "cf_task" | "xbot_intent" | "xbot_council" | "scheduled_task";
|
|
5006
5006
|
|
|
5007
5007
|
/**
|
|
5008
5008
|
* Shared portal LLM call for the memory pipeline.
|
|
@@ -5099,6 +5099,26 @@ type PortalLlmFailureReason =
|
|
|
5099
5099
|
| "null-completion"
|
|
5100
5100
|
/** `totalTimeoutMs` was spent before the next attempt could run. */
|
|
5101
5101
|
| "time-budget-exhausted";
|
|
5102
|
+
/**
|
|
5103
|
+
* One attempt of a {@link callPortalJsonCompletion} call, reported to
|
|
5104
|
+
* `onAttempt` as it settles — success included. The wire-level diagnostic the
|
|
5105
|
+
* give-up hook cannot provide: a call that succeeds on its third try returns a
|
|
5106
|
+
* value and fires no `onFailure`, yet it cost three completions and its first
|
|
5107
|
+
* two answers were unusable. Extraction quality regressions have hidden in
|
|
5108
|
+
* exactly that shape (a prompt change that made the model answer `NONE` first,
|
|
5109
|
+
* JSON on retry), so the extraction eval gates on the first-attempt clean rate.
|
|
5110
|
+
*
|
|
5111
|
+
* @public
|
|
5112
|
+
*/
|
|
5113
|
+
interface PortalLlmAttempt {
|
|
5114
|
+
/** 1-based attempt index. */
|
|
5115
|
+
attempt: number;
|
|
5116
|
+
/** Whether this attempt produced a parseable JSON value. */
|
|
5117
|
+
ok: boolean;
|
|
5118
|
+
/** Classification when `ok` is false. */
|
|
5119
|
+
reason?: PortalLlmFailureReason;
|
|
5120
|
+
httpStatus?: number;
|
|
5121
|
+
}
|
|
5102
5122
|
/**
|
|
5103
5123
|
* A give-up report: the classified {@link PortalLlmFailureReason} plus the
|
|
5104
5124
|
* little context worth carrying into telemetry. Both extra fields are bounded
|
|
@@ -6278,6 +6298,12 @@ interface ExtractFactsOptions extends PortalLlmAuth {
|
|
|
6278
6298
|
* (i.e. redaction silently eating facts) is alarmable.
|
|
6279
6299
|
*/
|
|
6280
6300
|
onCandidatesDropped?: () => void;
|
|
6301
|
+
/**
|
|
6302
|
+
* Per-attempt wire diagnostic, forwarded to {@link callPortalJsonCompletion}.
|
|
6303
|
+
* The extraction eval gates on it (first-attempt clean rate); production
|
|
6304
|
+
* callers may leave it unset.
|
|
6305
|
+
*/
|
|
6306
|
+
onAttempt?: (attempt: PortalLlmAttempt) => void;
|
|
6281
6307
|
}
|
|
6282
6308
|
/**
|
|
6283
6309
|
* Stage 1 — call the LLM to extract candidate facts from the recent
|
|
@@ -9530,6 +9556,41 @@ declare function decodeChunkVector(vector: number[] | string | null | undefined,
|
|
|
9530
9556
|
* Each operation can be intercepted by the host app for confirmation/cancellation.
|
|
9531
9557
|
*/
|
|
9532
9558
|
|
|
9559
|
+
/**
|
|
9560
|
+
* The 7 FactTypes a manual save may self-classify into (PR5). Mirrors the
|
|
9561
|
+
* extractor's `FactType` union in `memory/autoExtract` — kept as a local const
|
|
9562
|
+
* (not imported) to avoid a memoryVault → memory runtime import cycle. Only used
|
|
9563
|
+
* to validate the optional `type` tool argument; an unrecognized value is
|
|
9564
|
+
* dropped (persisted as null, the untyped/medium-decay bucket).
|
|
9565
|
+
*/
|
|
9566
|
+
declare const MANUAL_FACT_TYPES: readonly ["identity", "preference", "relationship", "plan", "ongoing_context", "constraint", "other"];
|
|
9567
|
+
/** A FactType the save tool's optional `type` argument may carry. */
|
|
9568
|
+
type ManualFactType = (typeof MANUAL_FACT_TYPES)[number];
|
|
9569
|
+
/**
|
|
9570
|
+
* What a {@link VaultMemoryWriter} reports back. The action set mirrors
|
|
9571
|
+
* `RetainResult.action` in `memory/retain` — restated here rather than imported
|
|
9572
|
+
* for the same reason MANUAL_FACT_TYPES is (memoryVault → memory import cycle).
|
|
9573
|
+
*/
|
|
9574
|
+
type VaultWriteAction = "create" | "merge" | "update" | "supersede" | "suppressed" | "skip";
|
|
9575
|
+
interface VaultWriteOutcome {
|
|
9576
|
+
/** The memory the write landed on: the fresh row, or the existing one it merged into. */
|
|
9577
|
+
memoryId: string;
|
|
9578
|
+
action: VaultWriteAction;
|
|
9579
|
+
}
|
|
9580
|
+
/** A NEW memory the tool wants written — `id`-addressed updates never come here. */
|
|
9581
|
+
interface VaultWriteInput {
|
|
9582
|
+
content: string;
|
|
9583
|
+
scope: string;
|
|
9584
|
+
folderId?: string;
|
|
9585
|
+
factType?: ManualFactType;
|
|
9586
|
+
}
|
|
9587
|
+
/**
|
|
9588
|
+
* The seam through which the tool writes NEW memories when the host supplies one.
|
|
9589
|
+
* `useChatStorage` (react + expo) passes a `retain()`-backed writer so a
|
|
9590
|
+
* model-initiated save gets the same cosine auto-merge the background extractor
|
|
9591
|
+
* gets, instead of a bare insert that trusts the model to have de-duplicated.
|
|
9592
|
+
*/
|
|
9593
|
+
type VaultMemoryWriter = (input: VaultWriteInput) => Promise<VaultWriteOutcome>;
|
|
9533
9594
|
/**
|
|
9534
9595
|
* Describes a pending vault save operation for UI confirmation.
|
|
9535
9596
|
*/
|
|
@@ -9568,6 +9629,35 @@ interface MemoryVaultToolOptions {
|
|
|
9568
9629
|
* When provided, the LLM can specify a folderName argument.
|
|
9569
9630
|
*/
|
|
9570
9631
|
folderMap?: Map<string, string>;
|
|
9632
|
+
/**
|
|
9633
|
+
* Writer for NEW memories. When set, a save without an `id` goes through it
|
|
9634
|
+
* instead of a bare `createVaultMemoryOp`, and the tool phrases its reply from
|
|
9635
|
+
* the reported action (a merge reads as "already known", not "saved").
|
|
9636
|
+
*
|
|
9637
|
+
* The hooks supply a `retain()`-backed writer, which is what makes this tool
|
|
9638
|
+
* stop being a dedup bypass: until then the only thing standing between the
|
|
9639
|
+
* model and a duplicate row was the prompt asking it to pass an `id`. Omit it
|
|
9640
|
+
* (as a bare `createMemoryVaultTool(vaultCtx, …)` caller must — retain needs
|
|
9641
|
+
* embeddings) and the direct insert path is unchanged.
|
|
9642
|
+
*
|
|
9643
|
+
* Updates addressed by `id` never come here: the model has already named the
|
|
9644
|
+
* row, so there is nothing to de-duplicate against.
|
|
9645
|
+
*/
|
|
9646
|
+
write?: VaultMemoryWriter;
|
|
9647
|
+
/**
|
|
9648
|
+
* Fires after a NEW memory's write settles, with what was asked and what the
|
|
9649
|
+
* writer did. The host's analytics hook: `onSave` runs BEFORE the write and so
|
|
9650
|
+
* cannot tell a fresh create from a merge into an existing memory — and that
|
|
9651
|
+
* split is the one number that says whether model-initiated saves duplicate
|
|
9652
|
+
* the vault. Fires on both write paths (a `write` seam, or the direct insert
|
|
9653
|
+
* when none is supplied — reported as `create`). Not called for
|
|
9654
|
+
* `id`-addressed updates or cancelled saves. A throwing or rejecting listener
|
|
9655
|
+
* is awaited and swallowed so it can never fail the tool call.
|
|
9656
|
+
*/
|
|
9657
|
+
onWritten?: (event: {
|
|
9658
|
+
input: VaultWriteInput;
|
|
9659
|
+
outcome: VaultWriteOutcome;
|
|
9660
|
+
}) => void | Promise<void>;
|
|
9571
9661
|
}
|
|
9572
9662
|
/**
|
|
9573
9663
|
* Creates a memory vault tool for use with chat completions.
|
|
@@ -9860,6 +9950,14 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
|
|
|
9860
9950
|
createMemoryEngineTool: (searchOptions?: Partial<MemoryEngineSearchOptions>) => ToolConfig;
|
|
9861
9951
|
/** Create a memory vault tool pre-configured with hook's vault context and encryption. */
|
|
9862
9952
|
createMemoryVaultTool: (options?: MemoryVaultToolOptions) => ToolConfig;
|
|
9953
|
+
/**
|
|
9954
|
+
* Write one memory through `retain()` — cosine auto-merge against the vault,
|
|
9955
|
+
* so an explicit "save this" from a host surface (selection → memory, a
|
|
9956
|
+
* manual add) lands as a re-observation of an existing memory instead of a
|
|
9957
|
+
* duplicate row when the vault already holds the fact. The
|
|
9958
|
+
* `memory_vault_save` tool writes through this too. Throws without `getToken`.
|
|
9959
|
+
*/
|
|
9960
|
+
retainVaultMemory: (input: VaultWriteInput) => Promise<RetainResult>;
|
|
9863
9961
|
/**
|
|
9864
9962
|
* Create the unified recall tool — single chat-completion tool that
|
|
9865
9963
|
* searches both vault facts and conversation chunks via recall().
|
|
@@ -10654,4 +10752,4 @@ declare function refreshNotionAccessToken(params: NotionRefreshTokenParams): Pro
|
|
|
10654
10752
|
*/
|
|
10655
10753
|
declare function createNotionTools(getAccessToken: () => string | null, requestNotionAccess: () => Promise<string>): ToolConfig[];
|
|
10656
10754
|
|
|
10657
|
-
export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
|
|
10755
|
+
export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
|
package/dist/expo/index.d.ts
CHANGED
|
@@ -5002,7 +5002,7 @@ interface EntityOperationsContext {
|
|
|
5002
5002
|
*
|
|
5003
5003
|
* @public
|
|
5004
5004
|
*/
|
|
5005
|
-
type TaskType = "title" | "commit_message" | "memory_extract" | "memory_dedup" | "memory_decay" | "memory_injection_check" | "memory_verify_support" | "memory_autosort" | "memory_topic" | "memory_consolidate" | "memory_decompose" | "memory_profile_synth" | "memory_graph" | "folder_context" | "selection_memory" | "summarize" | "style_analysis" | "classify_search" | "app_inspiration_generate" | "app_inspiration_trends" | "app_inspiration_remix" | "spotlight_image" | "slide_image" | "slide_video" | "slide_music" | "slide_sfx" | "media_video" | "media_audio" | "media_bg_removal" | "media_image_preset" | "tool_app_builder" | "tool_document_builder" | "tool_slides" | "tool_slides_image_gen" | "connector_guidance" | "cf_task" | "xbot_intent" | "xbot_council" | "scheduled_task";
|
|
5005
|
+
type TaskType = "title" | "commit_message" | "memory_extract" | "memory_import_extract" | "memory_dedup" | "memory_decay" | "memory_injection_check" | "memory_verify_support" | "memory_autosort" | "memory_topic" | "memory_consolidate" | "memory_decompose" | "memory_profile_synth" | "memory_graph" | "folder_context" | "selection_memory" | "summarize" | "style_analysis" | "classify_search" | "app_inspiration_generate" | "app_inspiration_trends" | "app_inspiration_remix" | "spotlight_image" | "slide_image" | "slide_video" | "slide_music" | "slide_sfx" | "media_video" | "media_audio" | "media_bg_removal" | "media_image_preset" | "tool_app_builder" | "tool_document_builder" | "tool_slides" | "tool_slides_image_gen" | "connector_guidance" | "cf_task" | "xbot_intent" | "xbot_council" | "scheduled_task";
|
|
5006
5006
|
|
|
5007
5007
|
/**
|
|
5008
5008
|
* Shared portal LLM call for the memory pipeline.
|
|
@@ -5099,6 +5099,26 @@ type PortalLlmFailureReason =
|
|
|
5099
5099
|
| "null-completion"
|
|
5100
5100
|
/** `totalTimeoutMs` was spent before the next attempt could run. */
|
|
5101
5101
|
| "time-budget-exhausted";
|
|
5102
|
+
/**
|
|
5103
|
+
* One attempt of a {@link callPortalJsonCompletion} call, reported to
|
|
5104
|
+
* `onAttempt` as it settles — success included. The wire-level diagnostic the
|
|
5105
|
+
* give-up hook cannot provide: a call that succeeds on its third try returns a
|
|
5106
|
+
* value and fires no `onFailure`, yet it cost three completions and its first
|
|
5107
|
+
* two answers were unusable. Extraction quality regressions have hidden in
|
|
5108
|
+
* exactly that shape (a prompt change that made the model answer `NONE` first,
|
|
5109
|
+
* JSON on retry), so the extraction eval gates on the first-attempt clean rate.
|
|
5110
|
+
*
|
|
5111
|
+
* @public
|
|
5112
|
+
*/
|
|
5113
|
+
interface PortalLlmAttempt {
|
|
5114
|
+
/** 1-based attempt index. */
|
|
5115
|
+
attempt: number;
|
|
5116
|
+
/** Whether this attempt produced a parseable JSON value. */
|
|
5117
|
+
ok: boolean;
|
|
5118
|
+
/** Classification when `ok` is false. */
|
|
5119
|
+
reason?: PortalLlmFailureReason;
|
|
5120
|
+
httpStatus?: number;
|
|
5121
|
+
}
|
|
5102
5122
|
/**
|
|
5103
5123
|
* A give-up report: the classified {@link PortalLlmFailureReason} plus the
|
|
5104
5124
|
* little context worth carrying into telemetry. Both extra fields are bounded
|
|
@@ -6278,6 +6298,12 @@ interface ExtractFactsOptions extends PortalLlmAuth {
|
|
|
6278
6298
|
* (i.e. redaction silently eating facts) is alarmable.
|
|
6279
6299
|
*/
|
|
6280
6300
|
onCandidatesDropped?: () => void;
|
|
6301
|
+
/**
|
|
6302
|
+
* Per-attempt wire diagnostic, forwarded to {@link callPortalJsonCompletion}.
|
|
6303
|
+
* The extraction eval gates on it (first-attempt clean rate); production
|
|
6304
|
+
* callers may leave it unset.
|
|
6305
|
+
*/
|
|
6306
|
+
onAttempt?: (attempt: PortalLlmAttempt) => void;
|
|
6281
6307
|
}
|
|
6282
6308
|
/**
|
|
6283
6309
|
* Stage 1 — call the LLM to extract candidate facts from the recent
|
|
@@ -9530,6 +9556,41 @@ declare function decodeChunkVector(vector: number[] | string | null | undefined,
|
|
|
9530
9556
|
* Each operation can be intercepted by the host app for confirmation/cancellation.
|
|
9531
9557
|
*/
|
|
9532
9558
|
|
|
9559
|
+
/**
|
|
9560
|
+
* The 7 FactTypes a manual save may self-classify into (PR5). Mirrors the
|
|
9561
|
+
* extractor's `FactType` union in `memory/autoExtract` — kept as a local const
|
|
9562
|
+
* (not imported) to avoid a memoryVault → memory runtime import cycle. Only used
|
|
9563
|
+
* to validate the optional `type` tool argument; an unrecognized value is
|
|
9564
|
+
* dropped (persisted as null, the untyped/medium-decay bucket).
|
|
9565
|
+
*/
|
|
9566
|
+
declare const MANUAL_FACT_TYPES: readonly ["identity", "preference", "relationship", "plan", "ongoing_context", "constraint", "other"];
|
|
9567
|
+
/** A FactType the save tool's optional `type` argument may carry. */
|
|
9568
|
+
type ManualFactType = (typeof MANUAL_FACT_TYPES)[number];
|
|
9569
|
+
/**
|
|
9570
|
+
* What a {@link VaultMemoryWriter} reports back. The action set mirrors
|
|
9571
|
+
* `RetainResult.action` in `memory/retain` — restated here rather than imported
|
|
9572
|
+
* for the same reason MANUAL_FACT_TYPES is (memoryVault → memory import cycle).
|
|
9573
|
+
*/
|
|
9574
|
+
type VaultWriteAction = "create" | "merge" | "update" | "supersede" | "suppressed" | "skip";
|
|
9575
|
+
interface VaultWriteOutcome {
|
|
9576
|
+
/** The memory the write landed on: the fresh row, or the existing one it merged into. */
|
|
9577
|
+
memoryId: string;
|
|
9578
|
+
action: VaultWriteAction;
|
|
9579
|
+
}
|
|
9580
|
+
/** A NEW memory the tool wants written — `id`-addressed updates never come here. */
|
|
9581
|
+
interface VaultWriteInput {
|
|
9582
|
+
content: string;
|
|
9583
|
+
scope: string;
|
|
9584
|
+
folderId?: string;
|
|
9585
|
+
factType?: ManualFactType;
|
|
9586
|
+
}
|
|
9587
|
+
/**
|
|
9588
|
+
* The seam through which the tool writes NEW memories when the host supplies one.
|
|
9589
|
+
* `useChatStorage` (react + expo) passes a `retain()`-backed writer so a
|
|
9590
|
+
* model-initiated save gets the same cosine auto-merge the background extractor
|
|
9591
|
+
* gets, instead of a bare insert that trusts the model to have de-duplicated.
|
|
9592
|
+
*/
|
|
9593
|
+
type VaultMemoryWriter = (input: VaultWriteInput) => Promise<VaultWriteOutcome>;
|
|
9533
9594
|
/**
|
|
9534
9595
|
* Describes a pending vault save operation for UI confirmation.
|
|
9535
9596
|
*/
|
|
@@ -9568,6 +9629,35 @@ interface MemoryVaultToolOptions {
|
|
|
9568
9629
|
* When provided, the LLM can specify a folderName argument.
|
|
9569
9630
|
*/
|
|
9570
9631
|
folderMap?: Map<string, string>;
|
|
9632
|
+
/**
|
|
9633
|
+
* Writer for NEW memories. When set, a save without an `id` goes through it
|
|
9634
|
+
* instead of a bare `createVaultMemoryOp`, and the tool phrases its reply from
|
|
9635
|
+
* the reported action (a merge reads as "already known", not "saved").
|
|
9636
|
+
*
|
|
9637
|
+
* The hooks supply a `retain()`-backed writer, which is what makes this tool
|
|
9638
|
+
* stop being a dedup bypass: until then the only thing standing between the
|
|
9639
|
+
* model and a duplicate row was the prompt asking it to pass an `id`. Omit it
|
|
9640
|
+
* (as a bare `createMemoryVaultTool(vaultCtx, …)` caller must — retain needs
|
|
9641
|
+
* embeddings) and the direct insert path is unchanged.
|
|
9642
|
+
*
|
|
9643
|
+
* Updates addressed by `id` never come here: the model has already named the
|
|
9644
|
+
* row, so there is nothing to de-duplicate against.
|
|
9645
|
+
*/
|
|
9646
|
+
write?: VaultMemoryWriter;
|
|
9647
|
+
/**
|
|
9648
|
+
* Fires after a NEW memory's write settles, with what was asked and what the
|
|
9649
|
+
* writer did. The host's analytics hook: `onSave` runs BEFORE the write and so
|
|
9650
|
+
* cannot tell a fresh create from a merge into an existing memory — and that
|
|
9651
|
+
* split is the one number that says whether model-initiated saves duplicate
|
|
9652
|
+
* the vault. Fires on both write paths (a `write` seam, or the direct insert
|
|
9653
|
+
* when none is supplied — reported as `create`). Not called for
|
|
9654
|
+
* `id`-addressed updates or cancelled saves. A throwing or rejecting listener
|
|
9655
|
+
* is awaited and swallowed so it can never fail the tool call.
|
|
9656
|
+
*/
|
|
9657
|
+
onWritten?: (event: {
|
|
9658
|
+
input: VaultWriteInput;
|
|
9659
|
+
outcome: VaultWriteOutcome;
|
|
9660
|
+
}) => void | Promise<void>;
|
|
9571
9661
|
}
|
|
9572
9662
|
/**
|
|
9573
9663
|
* Creates a memory vault tool for use with chat completions.
|
|
@@ -9860,6 +9950,14 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
|
|
|
9860
9950
|
createMemoryEngineTool: (searchOptions?: Partial<MemoryEngineSearchOptions>) => ToolConfig;
|
|
9861
9951
|
/** Create a memory vault tool pre-configured with hook's vault context and encryption. */
|
|
9862
9952
|
createMemoryVaultTool: (options?: MemoryVaultToolOptions) => ToolConfig;
|
|
9953
|
+
/**
|
|
9954
|
+
* Write one memory through `retain()` — cosine auto-merge against the vault,
|
|
9955
|
+
* so an explicit "save this" from a host surface (selection → memory, a
|
|
9956
|
+
* manual add) lands as a re-observation of an existing memory instead of a
|
|
9957
|
+
* duplicate row when the vault already holds the fact. The
|
|
9958
|
+
* `memory_vault_save` tool writes through this too. Throws without `getToken`.
|
|
9959
|
+
*/
|
|
9960
|
+
retainVaultMemory: (input: VaultWriteInput) => Promise<RetainResult>;
|
|
9863
9961
|
/**
|
|
9864
9962
|
* Create the unified recall tool — single chat-completion tool that
|
|
9865
9963
|
* searches both vault facts and conversation chunks via recall().
|
|
@@ -10654,4 +10752,4 @@ declare function refreshNotionAccessToken(params: NotionRefreshTokenParams): Pro
|
|
|
10654
10752
|
*/
|
|
10655
10753
|
declare function createNotionTools(getAccessToken: () => string | null, requestNotionAccess: () => Promise<string>): ToolConfig[];
|
|
10656
10754
|
|
|
10657
|
-
export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
|
|
10755
|
+
export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
|