@anuma/sdk 2.3.1 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/expo/{chunk-SF5AYTXH.mjs → chunk-UOUJUZM4.mjs} +229 -35
- package/dist/expo/index.cjs +310 -44
- package/dist/expo/index.d.mts +212 -10
- package/dist/expo/index.d.ts +212 -10
- package/dist/expo/index.mjs +78 -9
- package/dist/expo/{recall-PCKDVF3U.mjs → recall-HI7VO3VM.mjs} +1 -1
- package/dist/react/{chunk-JUDJVX66.mjs → chunk-IYDQBFS2.mjs} +229 -35
- package/dist/react/index.cjs +306 -43
- package/dist/react/index.d.mts +219 -10
- package/dist/react/index.d.ts +219 -10
- package/dist/react/index.mjs +74 -8
- package/dist/react/{recall-DSJSBDR4.mjs → recall-G3CS444F.mjs} +1 -1
- package/dist/server/{chunk-3AWYZRTS.mjs → chunk-3MLG7SUH.mjs} +229 -35
- package/dist/server/index.cjs +299 -42
- package/dist/server/index.d.mts +219 -10
- package/dist/server/index.d.ts +219 -10
- package/dist/server/index.mjs +67 -7
- package/dist/server/{recall-EWMI64SA.mjs → recall-MJHGXMHZ.mjs} +1 -1
- package/package.json +1 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -5453,6 +5453,37 @@ declare function searchMessagesOp(ctx: StorageOperationsContext, queryVector: nu
|
|
|
5453
5453
|
minSimilarity?: number;
|
|
5454
5454
|
conversationId?: string;
|
|
5455
5455
|
}): Promise<StoredMessageWithSimilarity[]>;
|
|
5456
|
+
/**
|
|
5457
|
+
* Decrypted, model-native chunk vectors for one message, cached across recall
|
|
5458
|
+
* calls so the chunk lane doesn't re-decrypt + re-JSON.parse every message's
|
|
5459
|
+
* embeddings on every query. Keyed by message id; `version` is the message's
|
|
5460
|
+
* `updated_at` at cache time, so a re-embed (which bumps `updated_at`) misses
|
|
5461
|
+
* and repopulates. Vectors are stored Float32 — model-native precision, half
|
|
5462
|
+
* the RAM of float64 `number[]` — mirroring the vault embedding cache (#705).
|
|
5463
|
+
* Content text is deliberately NOT cached (see searchChunksOp): it isn't
|
|
5464
|
+
* needed for scoring, and keeping decrypted content out of the cache preserves
|
|
5465
|
+
* the SDK's data-at-rest posture.
|
|
5466
|
+
*/
|
|
5467
|
+
interface CachedChunkVectors {
|
|
5468
|
+
/** Message `updated_at` (ms) at cache time — the invalidation token. */
|
|
5469
|
+
version: number;
|
|
5470
|
+
/**
|
|
5471
|
+
* Per-chunk embedding vectors, index-aligned with the message's decrypted
|
|
5472
|
+
* `chunks` array (empty-vector chunks kept as zero-length placeholders so
|
|
5473
|
+
* indices stay aligned). Empty when the message has only a whole-message
|
|
5474
|
+
* `fallback` vector.
|
|
5475
|
+
*/
|
|
5476
|
+
chunks: Float32Array[];
|
|
5477
|
+
/** Whole-message vector when the message was embedded without chunking. */
|
|
5478
|
+
fallback?: Float32Array;
|
|
5479
|
+
}
|
|
5480
|
+
/**
|
|
5481
|
+
* Cache consumed by {@link searchChunksOp}, keyed by message id. A plain `Map`
|
|
5482
|
+
* (satisfied by the LRU from `createChunkVectorCache`) — mirrors
|
|
5483
|
+
* `VaultEmbeddingCache` so consumers get the same `clear()`/`delete()`
|
|
5484
|
+
* ergonomics on an encryption-key reset.
|
|
5485
|
+
*/
|
|
5486
|
+
type ChunkVectorCache = Map<string, CachedChunkVectors>;
|
|
5456
5487
|
/**
|
|
5457
5488
|
* Search through message chunks for fine-grained semantic search.
|
|
5458
5489
|
* Returns the matching chunk text along with the parent message.
|
|
@@ -5470,6 +5501,13 @@ declare function searchChunksOp(ctx: StorageOperationsContext, queryVector: numb
|
|
|
5470
5501
|
* messages are re-embedded out-of-band by `chunkAndEmbedAllMessages`.
|
|
5471
5502
|
*/
|
|
5472
5503
|
embeddingModel?: string;
|
|
5504
|
+
/**
|
|
5505
|
+
* Optional decrypted-vector cache. When provided, the per-query decrypt +
|
|
5506
|
+
* JSON.parse of every message's chunk vectors is skipped on warm entries
|
|
5507
|
+
* (validated by `updated_at`), which is the dominant cost of the chunk
|
|
5508
|
+
* lane. Omit for the legacy always-decrypt behavior.
|
|
5509
|
+
*/
|
|
5510
|
+
chunkCache?: ChunkVectorCache;
|
|
5473
5511
|
}): Promise<ChunkSearchResult[]>;
|
|
5474
5512
|
|
|
5475
5513
|
declare const chatStorageSchema: Readonly<{
|
|
@@ -6207,6 +6245,14 @@ interface RecallOptions {
|
|
|
6207
6245
|
* resolves windows in 2026 and never overlaps stored event_time.
|
|
6208
6246
|
*/
|
|
6209
6247
|
now?: number;
|
|
6248
|
+
/**
|
|
6249
|
+
* Best-effort observability hook. Called once per `recall()` with per-lane
|
|
6250
|
+
* timings, lane counts, and soft-degradation signals — the raw material for
|
|
6251
|
+
* tuning latency/quality and for wiring recall telemetry to PostHog. Invoked
|
|
6252
|
+
* synchronously just before `recall()` returns; a throwing callback is
|
|
6253
|
+
* swallowed (diagnostics must never break retrieval). Off unless provided.
|
|
6254
|
+
*/
|
|
6255
|
+
onDiagnostics?: (diagnostics: RecallDiagnostics) => void;
|
|
6210
6256
|
/** Number of candidates fed to the cross-encoder rerank stage. Default: 30. */
|
|
6211
6257
|
rerankTopN?: number;
|
|
6212
6258
|
/** Multiplicative cross-encoder blend weight. Default: 0.1. */
|
|
@@ -6237,6 +6283,12 @@ interface RecallContext {
|
|
|
6237
6283
|
embeddingOptions: EmbeddingOptions;
|
|
6238
6284
|
/** Vault embedding LRU cache. */
|
|
6239
6285
|
vaultCache?: VaultEmbeddingCache;
|
|
6286
|
+
/**
|
|
6287
|
+
* Optional chunk-vector LRU cache. When provided, the chunk lane skips the
|
|
6288
|
+
* per-query decrypt + JSON.parse of every message's chunk vectors on warm
|
|
6289
|
+
* entries. Build via `createChunkVectorCache`. Omit for legacy behavior.
|
|
6290
|
+
*/
|
|
6291
|
+
chunkCache?: ChunkVectorCache;
|
|
6240
6292
|
/**
|
|
6241
6293
|
* Optional — when provided, recall extracts entities from the query
|
|
6242
6294
|
* and adds a graph lane to the RRF fusion (memories sharing entities
|
|
@@ -6256,6 +6308,48 @@ interface RecallResult {
|
|
|
6256
6308
|
/** Diagnostic: total memories in the vault when fact lane was queried. */
|
|
6257
6309
|
vaultSize?: number;
|
|
6258
6310
|
}
|
|
6311
|
+
/** Soft-degradation signals surfaced via {@link RecallDiagnostics.degraded}. */
|
|
6312
|
+
type RecallDegradation =
|
|
6313
|
+
/** Rerank was requested (budget mid/high) but the cross-encoder didn't run
|
|
6314
|
+
* this call — unavailable (e.g. React Native) or a transient failure. */
|
|
6315
|
+
"rerank-unavailable"
|
|
6316
|
+
/** `budget: 'high'` requested but no `decomposeOptions`, so query
|
|
6317
|
+
* decomposition was skipped and the budget downgraded to mid. */
|
|
6318
|
+
| "decompose-unavailable";
|
|
6319
|
+
/**
|
|
6320
|
+
* Per-call recall observability payload (see {@link RecallOptions.onDiagnostics}).
|
|
6321
|
+
* All timings are wall-clock milliseconds. Lane counts are post-dedupe,
|
|
6322
|
+
* pre-fusion. Intended to be forwarded to a metrics sink (e.g. PostHog).
|
|
6323
|
+
*/
|
|
6324
|
+
interface RecallDiagnostics {
|
|
6325
|
+
/** Budget actually executed (may have downgraded from the requested one). */
|
|
6326
|
+
usedBudget: Budget;
|
|
6327
|
+
/** Whether the cross-encoder actually reranked the fact lane this call. */
|
|
6328
|
+
reranked: boolean;
|
|
6329
|
+
/** Total candidates considered before truncation. */
|
|
6330
|
+
candidateCount: number;
|
|
6331
|
+
/** Total vault size when the fact lane ran (absent if it didn't). */
|
|
6332
|
+
vaultSize?: number;
|
|
6333
|
+
/** Facts the fact lane returned (post-dedupe, pre-fusion). */
|
|
6334
|
+
factCount: number;
|
|
6335
|
+
/** Chunks the chunk lane returned (post-dedupe, pre-fusion). */
|
|
6336
|
+
chunkCount: number;
|
|
6337
|
+
/** Wall-clock phase timings (ms). */
|
|
6338
|
+
timings: {
|
|
6339
|
+
/** Whole `recall()` call. */
|
|
6340
|
+
total: number;
|
|
6341
|
+
/** Parallel query-embed + graph/temporal side-lane build. */
|
|
6342
|
+
prep: number;
|
|
6343
|
+
/** Vault fact-lane search (`searchVaultMemoriesWithSize`). */
|
|
6344
|
+
factLane: number;
|
|
6345
|
+
/** Chunk-lane search (`searchChunksOp`). */
|
|
6346
|
+
chunkLane: number;
|
|
6347
|
+
/** Cross-lane RRF fusion + provenance dedup after both lanes. */
|
|
6348
|
+
fuse: number;
|
|
6349
|
+
};
|
|
6350
|
+
/** Soft-degradation signals that fired this call (empty when clean). */
|
|
6351
|
+
degraded: RecallDegradation[];
|
|
6352
|
+
}
|
|
6259
6353
|
type RetainAction = "create" | "merge" | "update" | "skip" | "suppressed";
|
|
6260
6354
|
type RetainSource = "manual" | "auto-extracted" | "capsule";
|
|
6261
6355
|
/** Why the consolidator fell back to "create" instead of a real decision. */
|
|
@@ -6606,15 +6700,32 @@ declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: Ret
|
|
|
6606
6700
|
* newest (superset) message list re-covers any superseded turn. Turns for
|
|
6607
6701
|
* different conversations queue independently and never displace each other.
|
|
6608
6702
|
*
|
|
6609
|
-
* Watermark + window: the worker keeps
|
|
6610
|
-
*
|
|
6611
|
-
*
|
|
6612
|
-
*
|
|
6613
|
-
*
|
|
6614
|
-
*
|
|
6615
|
-
*
|
|
6616
|
-
*
|
|
6617
|
-
*
|
|
6703
|
+
* Watermark + window: the worker keeps a per-conversation watermark of the
|
|
6704
|
+
* last message it extracted through. Each run sends every message *after* that
|
|
6705
|
+
* watermark (plus a small overlap for coreference, capped at `maxWindowSize`)
|
|
6706
|
+
* rather than a fixed trailing slice — so facts stated in turns that arrived
|
|
6707
|
+
* during a busy window are still examined instead of scrolling out of a last-N
|
|
6708
|
+
* window.
|
|
6709
|
+
*
|
|
6710
|
+
* Durability: the in-memory watermark alone does NOT survive process death, so
|
|
6711
|
+
* a session killed after messages accumulate but before extraction would, on
|
|
6712
|
+
* the next launch, fall back to a trailing-window guess and could skip the
|
|
6713
|
+
* un-extracted tail. Pass a {@link ExtractionCursorStore} (`cursorStore`) to
|
|
6714
|
+
* persist the watermark per conversation — it is hydrated synchronously the
|
|
6715
|
+
* first time a conversation is touched, and written through on every *contiguous*
|
|
6716
|
+
* advance (never on a trailing-slice guess, which could jump the durable cursor
|
|
6717
|
+
* past an un-extracted gap), so a later session resumes exactly after the last
|
|
6718
|
+
* extracted message. The primary guarantee is single-session resume across
|
|
6719
|
+
* process death.
|
|
6720
|
+
*
|
|
6721
|
+
* Concurrent sessions sharing one store (web `localStorage`, mobile MMKV) are
|
|
6722
|
+
* best-effort, NOT exclusive: two sessions can each hydrate the same cursor
|
|
6723
|
+
* before either advances it and briefly re-extract the same turn (retain()'s
|
|
6724
|
+
* dedup/consolidation absorbs the duplicate — wasteful, not corrupting). The
|
|
6725
|
+
* durable write is last-writer-wins with a regression guard (it won't move the
|
|
6726
|
+
* cursor backwards when the currently-stored id is ahead within the same turn's
|
|
6727
|
+
* messages), but it does not serialize writers. Omit `cursorStore` for the
|
|
6728
|
+
* legacy in-memory-only behavior.
|
|
6618
6729
|
*
|
|
6619
6730
|
* Memory Studio panel subscribes by passing `onMemoryExtracted` and/or
|
|
6620
6731
|
* `onTurnComplete` callbacks. The Studio uses `onMemoryExtracted` to
|
|
@@ -6662,6 +6773,37 @@ interface TurnCompleteEvent {
|
|
|
6662
6773
|
outcome: ExtractOutcome;
|
|
6663
6774
|
}
|
|
6664
6775
|
/** @public */
|
|
6776
|
+
/**
|
|
6777
|
+
* Durable per-conversation extraction cursor. Synchronous by contract (both
|
|
6778
|
+
* SDK platform stores — web `localStorage`, mobile MMKV — are sync), so the
|
|
6779
|
+
* worker can hydrate the watermark inline without changing its fire-and-forget
|
|
6780
|
+
* control flow. Implementations should be best-effort; the worker guards every
|
|
6781
|
+
* call, so a throwing store degrades to in-memory-only rather than breaking
|
|
6782
|
+
* extraction.
|
|
6783
|
+
*
|
|
6784
|
+
* @public
|
|
6785
|
+
*/
|
|
6786
|
+
interface ExtractionCursorStore {
|
|
6787
|
+
/** Last message id extracted through for `conversationId`, or undefined. */
|
|
6788
|
+
get(conversationId: string): string | undefined;
|
|
6789
|
+
/** Persist the last-extracted message id for `conversationId`. */
|
|
6790
|
+
set(conversationId: string, messageId: string): void;
|
|
6791
|
+
}
|
|
6792
|
+
/** Minimal synchronous key/value surface — satisfied by the SDK's
|
|
6793
|
+
* `PlatformStorage` (web `localStorage`, mobile MMKV). */
|
|
6794
|
+
interface SyncKeyValueStore {
|
|
6795
|
+
getItem(key: string): string | null;
|
|
6796
|
+
setItem(key: string, value: string): void;
|
|
6797
|
+
}
|
|
6798
|
+
/**
|
|
6799
|
+
* Build an {@link ExtractionCursorStore} over a synchronous key/value store
|
|
6800
|
+
* (e.g. the SDK's `PlatformStorage`). Keys are namespaced by `keyPrefix`.
|
|
6801
|
+
* Reads/writes are guarded so a store that throws (quota, private mode) can't
|
|
6802
|
+
* break extraction — the watermark just falls back to in-memory.
|
|
6803
|
+
*
|
|
6804
|
+
* @public
|
|
6805
|
+
*/
|
|
6806
|
+
declare function createPlatformCursorStore(storage: SyncKeyValueStore, keyPrefix?: string): ExtractionCursorStore;
|
|
6665
6807
|
interface CreateAutoExtractorOptions {
|
|
6666
6808
|
retainCtx: RetainContext;
|
|
6667
6809
|
extract: ExtractFactsOptions;
|
|
@@ -6692,6 +6834,15 @@ interface CreateAutoExtractorOptions {
|
|
|
6692
6834
|
* sessions in RAM-constrained hosts. Default 200.
|
|
6693
6835
|
*/
|
|
6694
6836
|
maxTrackedConversations?: number;
|
|
6837
|
+
/**
|
|
6838
|
+
* Durable per-conversation watermark store. When provided, the watermark is
|
|
6839
|
+
* hydrated from it the first time each conversation is touched and written
|
|
6840
|
+
* through on every advance, so extraction resumes exactly after the last
|
|
6841
|
+
* extracted message across process restarts (and, with a process-shared
|
|
6842
|
+
* store, across concurrent sessions). Build via {@link createPlatformCursorStore}.
|
|
6843
|
+
* Omit for in-memory-only (legacy) behavior.
|
|
6844
|
+
*/
|
|
6845
|
+
cursorStore?: ExtractionCursorStore;
|
|
6695
6846
|
/**
|
|
6696
6847
|
* Entity / memory_entity write context — when provided, each retained
|
|
6697
6848
|
* candidate's `entities[]` is persisted via `linkMemoryEntitiesOp`,
|
|
@@ -6767,6 +6918,24 @@ interface AutoExtractor {
|
|
|
6767
6918
|
*/
|
|
6768
6919
|
declare function createAutoExtractor(options: CreateAutoExtractorOptions): AutoExtractor;
|
|
6769
6920
|
|
|
6921
|
+
/**
|
|
6922
|
+
* Default entry cap for the chunk-vector cache. Entries are keyed by message
|
|
6923
|
+
* id, so this bounds how many messages' decrypted chunk vectors stay resident.
|
|
6924
|
+
* Matches the vault cache default (#705).
|
|
6925
|
+
*/
|
|
6926
|
+
declare const DEFAULT_CHUNK_CACHE_SIZE = 5000;
|
|
6927
|
+
/**
|
|
6928
|
+
* Create a {@link ChunkVectorCache} backed by an LRU. Pass the returned cache
|
|
6929
|
+
* into `recall()` (via `RecallContext.chunkCache`) so the chunk lane skips the
|
|
6930
|
+
* per-query decrypt + JSON.parse of every message's chunk vectors on warm
|
|
6931
|
+
* entries. Stale entries self-invalidate on `updated_at` mismatch, so no
|
|
6932
|
+
* explicit invalidation is required beyond clearing it on an encryption-key
|
|
6933
|
+
* reset (wallet switch), mirroring the vault embedding cache.
|
|
6934
|
+
*
|
|
6935
|
+
* @public
|
|
6936
|
+
*/
|
|
6937
|
+
declare function createChunkVectorCache(maxSize?: number): ChunkVectorCache;
|
|
6938
|
+
|
|
6770
6939
|
/**
|
|
6771
6940
|
* Unified Recall API — single retrieval surface above vault + engine.
|
|
6772
6941
|
*
|
|
@@ -6919,6 +7088,46 @@ interface ReflectResult {
|
|
|
6919
7088
|
*/
|
|
6920
7089
|
declare function reflect(query: string, ctx: RecallContext, options: ReflectOptions): Promise<ReflectResult>;
|
|
6921
7090
|
|
|
7091
|
+
/**
|
|
7092
|
+
* Cross-encoder reranker — local inference via @huggingface/transformers.
|
|
7093
|
+
*
|
|
7094
|
+
* Mirrors Hindsight's default reranker (`cross-encoder/ms-marco-MiniLM-L-6-v2`)
|
|
7095
|
+
* for parity with their reference pipeline. Runs fully on-device — no API
|
|
7096
|
+
* key, no network call, works offline. Model file ~25MB; lazy-loaded and
|
|
7097
|
+
* cached for the lifetime of the process.
|
|
7098
|
+
*
|
|
7099
|
+
* Implementation note: transformers.js v3 doesn't expose a "text-ranking"
|
|
7100
|
+
* pipeline, so we drive the cross-encoder directly via the tokenizer +
|
|
7101
|
+
* sequence-classification model. The model outputs a single relevance
|
|
7102
|
+
* logit per (query, doc) pair; we sigmoid it into [0, 1].
|
|
7103
|
+
*/
|
|
7104
|
+
/**
|
|
7105
|
+
* Thrown when the cross-encoder cannot run because its optional peer
|
|
7106
|
+
* dependency (`@huggingface/transformers`) isn't installed — the expected
|
|
7107
|
+
* state on React Native, where the package isn't part of the bundle. Callers
|
|
7108
|
+
* treat this as "reranker unavailable, degrade to the fused ranking" rather
|
|
7109
|
+
* than a transient error worth warning about on every recall.
|
|
7110
|
+
*
|
|
7111
|
+
* @public
|
|
7112
|
+
*/
|
|
7113
|
+
declare class RerankerUnavailableError extends Error {
|
|
7114
|
+
/** The underlying import failure, kept for debugging. */
|
|
7115
|
+
readonly reason: unknown;
|
|
7116
|
+
constructor(reason: unknown);
|
|
7117
|
+
}
|
|
7118
|
+
/**
|
|
7119
|
+
* Whether the cross-encoder reranker can run in this environment.
|
|
7120
|
+
*
|
|
7121
|
+
* - `true` — the model loaded successfully at least once.
|
|
7122
|
+
* - `false` — the optional `@huggingface/transformers` dependency is missing
|
|
7123
|
+
* (e.g. React Native); reranking is permanently degraded to the fused
|
|
7124
|
+
* ranking and no further load attempts are made.
|
|
7125
|
+
* - `undefined` — no rerank has been attempted yet, so availability is unknown.
|
|
7126
|
+
*
|
|
7127
|
+
* @public
|
|
7128
|
+
*/
|
|
7129
|
+
declare function isRerankerAvailable(): boolean | undefined;
|
|
7130
|
+
|
|
6922
7131
|
/**
|
|
6923
7132
|
* Standalone topic (entity) extraction for EXISTING memories.
|
|
6924
7133
|
*
|
|
@@ -12318,4 +12527,4 @@ declare function renderAnumaTree(node: AnumaNode): React.ReactElement | null;
|
|
|
12318
12527
|
*/
|
|
12319
12528
|
declare function renderAnumaJsx(jsx: string): React.ReactElement | null;
|
|
12320
12529
|
|
|
12321
|
-
export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_CONVERSATIONS_FOLDER as BACKUP_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as BACKUP_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_BACKUP_FOLDER, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_CONVERSATIONS_FOLDER as DEFAULT_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as DEFAULT_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_DROPBOX_FOLDER, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DeckProps, type DisplayToolMigrations, type DropboxAuthContextValue, DropboxAuthProvider, type DropboxAuthProviderProps, type DropboxExportResult, type DropboxImportResult, ENTITY_KINDS, type EmbeddedWalletSignerFn, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetMessagesPageOptions, type GoogleDriveAuthContextValue, GoogleDriveAuthProvider, type GoogleDriveAuthProviderProps, type GoogleDriveExportResult, type GoogleDriveImportResult, type GroupProps, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, type IconProps, type ImageProps, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type Logger, LoggerProvider, type LoggerProviderProps, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MessageChunk, type MessageFeedback, type MessageSkeleton, type ModelLoadProgress, type OCRFile, type OperationExecutor, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PlatformStorage, type PortalLlmAuth, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type QuantizedEmbedding, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScreenProps, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, THEME_ATTRS, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseDropboxBackupOptions, type UseDropboxBackupResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseGoogleDriveBackupOptions, type UseGoogleDriveBackupResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, backfillMemoryEntityUserIdsOp, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearCalendarToken, clearConversationMemoriesOp, clearDriveToken, clearToken as clearDropboxToken, clearEncryptionKey, clearGithubToken, clearGoogleDriveToken, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createCryptoPricePreProcessor, createGitHubTools, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createProjectOp, createRecallTool, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, fileExists, findById, findMatchingTools, findParentOfId, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearCalendarPendingMessage, getAndClearCalendarReturnUrl, getAndClearDrivePendingMessage, getAndClearDriveReturnUrl, getAndClearGithubPendingMessage, getAndClearGithubReturnUrl, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getCalendarAccessToken, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getDocumentsOp, getDriveAccessToken, getEncryptionKey, getGithubAccessToken, getGoogleDriveStoredToken, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidCalendarToken, getValidDriveToken, getValidGithubToken, getValidNotionToken, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, handleCalendarCallback, handleDriveCallback, handleGithubCallback, handleNotionCallback, hardDeleteMediaOp, hasCalendarCredentials, hasDriveCredentials, hasDropboxCredentials, hasEncryptionKey, hasGithubCredentials, hasGoogleDriveCredentials, hasICloudCredentials, hasKeyPair, hasNotionCredentials, insertAfterId, insertChild, isAnumaTag, isCalendarCallback, isDriveCallback, isGithubCallback, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, mediaToStored, migrateCalendarToken, migrateDisplayResult, migrateDriveToken, migrateGithubToken, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, preEmbedVaultMemories, preprocessFiles, previewToolSelection, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, readEncryptedFile, recall, reflect, refreshCalendarToken, refreshDriveToken, refreshGithubToken, refreshNotionToken, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, resumeStream, retain, revokeCalendarToken, revokeDriveToken, revokeGithubToken, revokeNotionAccess, savedToolToStored, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, settingsStorageSchema, shouldChunkMessage, shouldRefreshTools, stampTopicsExtractedAtOp, startGithubAuth, startNotionAuth, storeCalendarPendingMessage, storeCalendarReturnUrl, storeCalendarToken, storeDrivePendingMessage, storeDriveReturnUrl, storeDriveToken, storeGithubPendingMessage, storeGithubReturnUrl, storeGithubToken, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useDropboxAuth, useDropboxBackup, useEncryption, useExportPdf, useFiles, useGoogleDriveAuth, useGoogleDriveBackup, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, walk, webPlatformStorage, writeEncryptedFile };
|
|
12530
|
+
export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_CONVERSATIONS_FOLDER as BACKUP_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as BACKUP_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_BACKUP_FOLDER, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_CONVERSATIONS_FOLDER as DEFAULT_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as DEFAULT_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_DROPBOX_FOLDER, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DeckProps, type DisplayToolMigrations, type DropboxAuthContextValue, DropboxAuthProvider, type DropboxAuthProviderProps, type DropboxExportResult, type DropboxImportResult, ENTITY_KINDS, type EmbeddedWalletSignerFn, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetMessagesPageOptions, type GoogleDriveAuthContextValue, GoogleDriveAuthProvider, type GoogleDriveAuthProviderProps, type GoogleDriveExportResult, type GoogleDriveImportResult, type GroupProps, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, type IconProps, type ImageProps, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type Logger, LoggerProvider, type LoggerProviderProps, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MessageChunk, type MessageFeedback, type MessageSkeleton, type ModelLoadProgress, type OCRFile, type OperationExecutor, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PlatformStorage, type PortalLlmAuth, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type QuantizedEmbedding, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScreenProps, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, THEME_ATTRS, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseDropboxBackupOptions, type UseDropboxBackupResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseGoogleDriveBackupOptions, type UseGoogleDriveBackupResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, backfillMemoryEntityUserIdsOp, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearCalendarToken, clearConversationMemoriesOp, clearDriveToken, clearToken as clearDropboxToken, clearEncryptionKey, clearGithubToken, clearGoogleDriveToken, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createGitHubTools, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createPlatformCursorStore, createProjectOp, createRecallTool, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, fileExists, findById, findMatchingTools, findParentOfId, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearCalendarPendingMessage, getAndClearCalendarReturnUrl, getAndClearDrivePendingMessage, getAndClearDriveReturnUrl, getAndClearGithubPendingMessage, getAndClearGithubReturnUrl, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getCalendarAccessToken, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getDocumentsOp, getDriveAccessToken, getEncryptionKey, getGithubAccessToken, getGoogleDriveStoredToken, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidCalendarToken, getValidDriveToken, getValidGithubToken, getValidNotionToken, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, handleCalendarCallback, handleDriveCallback, handleGithubCallback, handleNotionCallback, hardDeleteMediaOp, hasCalendarCredentials, hasDriveCredentials, hasDropboxCredentials, hasEncryptionKey, hasGithubCredentials, hasGoogleDriveCredentials, hasICloudCredentials, hasKeyPair, hasNotionCredentials, insertAfterId, insertChild, isAnumaTag, isCalendarCallback, isDriveCallback, isGithubCallback, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, mediaToStored, migrateCalendarToken, migrateDisplayResult, migrateDriveToken, migrateGithubToken, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, preEmbedVaultMemories, preprocessFiles, previewToolSelection, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, readEncryptedFile, recall, reflect, refreshCalendarToken, refreshDriveToken, refreshGithubToken, refreshNotionToken, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, resumeStream, retain, revokeCalendarToken, revokeDriveToken, revokeGithubToken, revokeNotionAccess, savedToolToStored, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, settingsStorageSchema, shouldChunkMessage, shouldRefreshTools, stampTopicsExtractedAtOp, startGithubAuth, startNotionAuth, storeCalendarPendingMessage, storeCalendarReturnUrl, storeCalendarToken, storeDrivePendingMessage, storeDriveReturnUrl, storeDriveToken, storeGithubPendingMessage, storeGithubReturnUrl, storeGithubToken, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useDropboxAuth, useDropboxBackup, useEncryption, useExportPdf, useFiles, useGoogleDriveAuth, useGoogleDriveBackup, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, walk, webPlatformStorage, writeEncryptedFile };
|
package/dist/react/index.mjs
CHANGED
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
DEFAULT_MIN_CONTENT_LENGTH,
|
|
7
7
|
DEFAULT_VAULT_CACHE_SIZE,
|
|
8
8
|
ENTITY_KINDS,
|
|
9
|
+
LRUCache,
|
|
10
|
+
RerankerUnavailableError,
|
|
9
11
|
backfillMemoryEntityUserIdsOp,
|
|
10
12
|
chunkAndEmbedAllMessages,
|
|
11
13
|
chunkAndEmbedMessage,
|
|
@@ -84,6 +86,7 @@ import {
|
|
|
84
86
|
hasEncryptionKey,
|
|
85
87
|
hasKeyPair,
|
|
86
88
|
isEncrypted,
|
|
89
|
+
isRerankerAvailable,
|
|
87
90
|
linkMemoryEntitiesOp,
|
|
88
91
|
makeSyntheticStoredConversation,
|
|
89
92
|
makeSyntheticStoredMessage,
|
|
@@ -125,7 +128,7 @@ import {
|
|
|
125
128
|
updateVaultMemoryOp,
|
|
126
129
|
useEncryption,
|
|
127
130
|
vaultMemoryToStored
|
|
128
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-IYDQBFS2.mjs";
|
|
129
132
|
import {
|
|
130
133
|
PiiRedactor,
|
|
131
134
|
createStreamingDeAnonymizer,
|
|
@@ -7206,6 +7209,23 @@ function parseLocalCalendarDay(year, month, day) {
|
|
|
7206
7209
|
}
|
|
7207
7210
|
|
|
7208
7211
|
// src/lib/memory/autoExtractWorker.ts
|
|
7212
|
+
function createPlatformCursorStore(storage, keyPrefix = "anuma:mem:xcursor:") {
|
|
7213
|
+
return {
|
|
7214
|
+
get(conversationId) {
|
|
7215
|
+
try {
|
|
7216
|
+
return storage.getItem(keyPrefix + conversationId) ?? void 0;
|
|
7217
|
+
} catch {
|
|
7218
|
+
return void 0;
|
|
7219
|
+
}
|
|
7220
|
+
},
|
|
7221
|
+
set(conversationId, messageId) {
|
|
7222
|
+
try {
|
|
7223
|
+
storage.setItem(keyPrefix + conversationId, messageId);
|
|
7224
|
+
} catch {
|
|
7225
|
+
}
|
|
7226
|
+
}
|
|
7227
|
+
};
|
|
7228
|
+
}
|
|
7209
7229
|
var DEFAULT_WINDOW_SIZE = 6;
|
|
7210
7230
|
var DEFAULT_MAX_WINDOW_SIZE = 20;
|
|
7211
7231
|
var CONTEXT_OVERLAP = 2;
|
|
@@ -7225,12 +7245,24 @@ function createAutoExtractor(options) {
|
|
|
7225
7245
|
let inflight = 0;
|
|
7226
7246
|
let disposed = false;
|
|
7227
7247
|
const conversations = /* @__PURE__ */ new Map();
|
|
7248
|
+
const cursorStore = options.cursorStore;
|
|
7249
|
+
const hydrate = (state, conversationId) => {
|
|
7250
|
+
if (state.hydrated) return;
|
|
7251
|
+
state.hydrated = true;
|
|
7252
|
+
if (!cursorStore || conversationId === void 0 || state.watermark !== void 0) return;
|
|
7253
|
+
try {
|
|
7254
|
+
const persisted = cursorStore.get(conversationId);
|
|
7255
|
+
if (persisted) state.watermark = persisted;
|
|
7256
|
+
} catch {
|
|
7257
|
+
}
|
|
7258
|
+
};
|
|
7228
7259
|
const stateFor = (conversationId) => {
|
|
7229
7260
|
let state = conversations.get(conversationId);
|
|
7230
7261
|
if (!state) {
|
|
7231
7262
|
if (conversations.size >= maxTrackedConversations) evictOldestIdle(conversationId);
|
|
7232
7263
|
state = {};
|
|
7233
7264
|
conversations.set(conversationId, state);
|
|
7265
|
+
hydrate(state, conversationId);
|
|
7234
7266
|
}
|
|
7235
7267
|
return state;
|
|
7236
7268
|
};
|
|
@@ -7243,10 +7275,12 @@ function createAutoExtractor(options) {
|
|
|
7243
7275
|
}
|
|
7244
7276
|
};
|
|
7245
7277
|
function computeWindow(messages, conversationId) {
|
|
7246
|
-
const lastId =
|
|
7278
|
+
const lastId = stateFor(conversationId).watermark;
|
|
7247
7279
|
const idx = lastId === void 0 ? -1 : messages.findIndex((m) => m.id === lastId);
|
|
7248
|
-
if (idx === -1)
|
|
7249
|
-
|
|
7280
|
+
if (idx === -1) {
|
|
7281
|
+
return { window: messages.slice(-windowSize), contiguous: messages.length <= windowSize };
|
|
7282
|
+
}
|
|
7283
|
+
if (idx >= messages.length - 1) return { window: [], contiguous: true };
|
|
7250
7284
|
const start = Math.max(0, idx + 1 - CONTEXT_OVERLAP);
|
|
7251
7285
|
let window2 = messages.slice(start);
|
|
7252
7286
|
if (window2.length > maxWindowSize) {
|
|
@@ -7255,8 +7289,21 @@ function createAutoExtractor(options) {
|
|
|
7255
7289
|
);
|
|
7256
7290
|
window2 = window2.slice(0, maxWindowSize);
|
|
7257
7291
|
}
|
|
7258
|
-
return window2;
|
|
7292
|
+
return { window: window2, contiguous: true };
|
|
7259
7293
|
}
|
|
7294
|
+
const persistCursor = (conversationId, messages, advancedToId, contiguous) => {
|
|
7295
|
+
if (!cursorStore || conversationId === void 0 || !contiguous) return;
|
|
7296
|
+
try {
|
|
7297
|
+
const stored = cursorStore.get(conversationId);
|
|
7298
|
+
if (stored && stored !== advancedToId) {
|
|
7299
|
+
const storedIdx = messages.findIndex((m) => m.id === stored);
|
|
7300
|
+
const newIdx = messages.findIndex((m) => m.id === advancedToId);
|
|
7301
|
+
if (storedIdx !== -1 && newIdx !== -1 && storedIdx >= newIdx) return;
|
|
7302
|
+
}
|
|
7303
|
+
cursorStore.set(conversationId, advancedToId);
|
|
7304
|
+
} catch {
|
|
7305
|
+
}
|
|
7306
|
+
};
|
|
7260
7307
|
const consolidateBaseUrl = options.consolidate?.baseUrl ?? options.extract.baseUrl;
|
|
7261
7308
|
const consolidateOptions = options.consolidate ? {
|
|
7262
7309
|
...options.extract.apiKey !== void 0 && { apiKey: options.extract.apiKey },
|
|
@@ -7302,7 +7349,7 @@ function createAutoExtractor(options) {
|
|
|
7302
7349
|
return dispatch(messages, conversationId);
|
|
7303
7350
|
}
|
|
7304
7351
|
function dispatch(messages, conversationId) {
|
|
7305
|
-
const window2 = computeWindow(messages, conversationId);
|
|
7352
|
+
const { window: window2, contiguous } = computeWindow(messages, conversationId);
|
|
7306
7353
|
if (window2.length === 0) {
|
|
7307
7354
|
options.onSkipped?.({ reason: "no-new-content", conversationId });
|
|
7308
7355
|
drainPending();
|
|
@@ -7327,7 +7374,9 @@ function createAutoExtractor(options) {
|
|
|
7327
7374
|
}
|
|
7328
7375
|
}
|
|
7329
7376
|
);
|
|
7330
|
-
|
|
7377
|
+
const advancedTo = window2[window2.length - 1].id;
|
|
7378
|
+
stateFor(conversationId).watermark = advancedTo;
|
|
7379
|
+
persistCursor(conversationId, messages, advancedTo, contiguous);
|
|
7331
7380
|
for (let i = 0; i < results.length; i++) {
|
|
7332
7381
|
if (results[i].action === "suppressed") continue;
|
|
7333
7382
|
options.onMemoryExtracted?.({
|
|
@@ -7374,6 +7423,12 @@ function createAutoExtractor(options) {
|
|
|
7374
7423
|
};
|
|
7375
7424
|
}
|
|
7376
7425
|
|
|
7426
|
+
// src/lib/memory/chunkVectorCache.ts
|
|
7427
|
+
var DEFAULT_CHUNK_CACHE_SIZE = 5e3;
|
|
7428
|
+
function createChunkVectorCache(maxSize = DEFAULT_CHUNK_CACHE_SIZE) {
|
|
7429
|
+
return new LRUCache(maxSize);
|
|
7430
|
+
}
|
|
7431
|
+
|
|
7377
7432
|
// src/lib/memory/recallTool.ts
|
|
7378
7433
|
var RECALL_TOOL_NAME = "recall_memory";
|
|
7379
7434
|
var RECALL_MAX_LIMIT = 50;
|
|
@@ -10730,6 +10785,7 @@ function useChatStorage(options) {
|
|
|
10730
10785
|
[vaultCtx]
|
|
10731
10786
|
);
|
|
10732
10787
|
const vaultEmbeddingCacheRef = useRef4(createVaultEmbeddingCache());
|
|
10788
|
+
const chunkVectorCacheRef = useRef4(createChunkVectorCache());
|
|
10733
10789
|
const clientToolEmbeddingsCacheRef = useRef4(/* @__PURE__ */ new Map());
|
|
10734
10790
|
useEffect3(() => {
|
|
10735
10791
|
if (!getToken) return;
|
|
@@ -10745,7 +10801,10 @@ function useChatStorage(options) {
|
|
|
10745
10801
|
})();
|
|
10746
10802
|
}, [vaultCtx, getToken, vaultEmbeddingOptions]);
|
|
10747
10803
|
useEffect3(() => {
|
|
10748
|
-
return onClearAllEncryptionState(() =>
|
|
10804
|
+
return onClearAllEncryptionState(() => {
|
|
10805
|
+
vaultEmbeddingCacheRef.current.clear();
|
|
10806
|
+
chunkVectorCacheRef.current.clear();
|
|
10807
|
+
});
|
|
10749
10808
|
}, []);
|
|
10750
10809
|
const createMemoryVaultSearchTool2 = useCallback4(
|
|
10751
10810
|
(searchOptions) => {
|
|
@@ -10773,6 +10832,7 @@ function useChatStorage(options) {
|
|
|
10773
10832
|
storageCtx,
|
|
10774
10833
|
embeddingOptions: vaultEmbeddingOptions,
|
|
10775
10834
|
vaultCache: vaultEmbeddingCacheRef.current,
|
|
10835
|
+
chunkCache: chunkVectorCacheRef.current,
|
|
10776
10836
|
// Graph lane fires when entityCtx is present and the query
|
|
10777
10837
|
// contains extractable entities. Empty memory_entity (e.g.
|
|
10778
10838
|
// before any auto-extraction linked entities) is a graceful
|
|
@@ -10820,6 +10880,7 @@ function useChatStorage(options) {
|
|
|
10820
10880
|
// would embed the raw query (often containing the user's PII).
|
|
10821
10881
|
embeddingOptions: vaultEmbeddingOptions,
|
|
10822
10882
|
vaultCache: vaultEmbeddingCacheRef.current,
|
|
10883
|
+
chunkCache: chunkVectorCacheRef.current,
|
|
10823
10884
|
// Graph lane fires only when entityCtx is present and the query
|
|
10824
10885
|
// has extractable entities; empty memory_entity is a graceful
|
|
10825
10886
|
// no-op (falls through to fact + chunk lanes). Mirrors createRecallTool.
|
|
@@ -22469,6 +22530,7 @@ export {
|
|
|
22469
22530
|
ConversationMemory as ConversationMemoryModel,
|
|
22470
22531
|
DEFAULT_BACKUP_FOLDER,
|
|
22471
22532
|
DEFAULT_CACHE_EXPIRATION_MS,
|
|
22533
|
+
DEFAULT_CHUNK_CACHE_SIZE,
|
|
22472
22534
|
DEFAULT_CHUNK_OVERLAP,
|
|
22473
22535
|
DEFAULT_CHUNK_SIZE,
|
|
22474
22536
|
DEFAULT_CONVERSATIONS_FOLDER as DEFAULT_DRIVE_CONVERSATIONS_FOLDER,
|
|
@@ -22500,6 +22562,7 @@ export {
|
|
|
22500
22562
|
R2_DEFAULT_TTL_MS,
|
|
22501
22563
|
RECALL_MAX_LIMIT,
|
|
22502
22564
|
RECALL_TOOL_NAME,
|
|
22565
|
+
RerankerUnavailableError,
|
|
22503
22566
|
SDK_SCHEMA_VERSION,
|
|
22504
22567
|
SERVER_TOOL_DEPENDENCY_SETS,
|
|
22505
22568
|
SLIDER_CONFIG,
|
|
@@ -22558,6 +22621,7 @@ export {
|
|
|
22558
22621
|
conversationMemoryToStored,
|
|
22559
22622
|
cosineInt8,
|
|
22560
22623
|
createAutoExtractor,
|
|
22624
|
+
createChunkVectorCache,
|
|
22561
22625
|
createCryptoPricePreProcessor,
|
|
22562
22626
|
createGitHubTools,
|
|
22563
22627
|
createMediaBatchOp,
|
|
@@ -22565,6 +22629,7 @@ export {
|
|
|
22565
22629
|
createMemoryEngineTool,
|
|
22566
22630
|
createMemoryVaultSearchTool,
|
|
22567
22631
|
createMemoryVaultTool,
|
|
22632
|
+
createPlatformCursorStore,
|
|
22568
22633
|
createProjectOp,
|
|
22569
22634
|
createRecallTool,
|
|
22570
22635
|
createSavedToolOp,
|
|
@@ -22712,6 +22777,7 @@ export {
|
|
|
22712
22777
|
isNotionCallback,
|
|
22713
22778
|
isOPFSSupported,
|
|
22714
22779
|
isR2UrlExpired,
|
|
22780
|
+
isRerankerAvailable,
|
|
22715
22781
|
isSupportedFile,
|
|
22716
22782
|
isSupportedMediaType,
|
|
22717
22783
|
linkMemoryEntitiesOp,
|