@reverbia/sdk 1.0.0-next.20251219092050 → 1.0.0-next.20251219162520

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.
@@ -978,6 +978,8 @@ interface StoredMessage {
978
978
  sources?: SearchSource[];
979
979
  responseDuration?: number;
980
980
  wasStopped?: boolean;
981
+ /** If set, indicates the message failed with this error */
982
+ error?: string;
981
983
  }
982
984
  interface StoredConversation {
983
985
  uniqueId: string;
@@ -1002,6 +1004,8 @@ interface CreateMessageOptions {
1002
1004
  vector?: number[];
1003
1005
  embeddingModel?: string;
1004
1006
  wasStopped?: boolean;
1007
+ /** If set, indicates the message failed with this error */
1008
+ error?: string;
1005
1009
  }
1006
1010
  interface CreateConversationOptions {
1007
1011
  conversationId?: string;
@@ -1063,6 +1067,7 @@ declare class Message extends Model {
1063
1067
  sources?: SearchSource[];
1064
1068
  responseDuration?: number;
1065
1069
  wasStopped?: boolean;
1070
+ error?: string;
1066
1071
  }
1067
1072
  declare class Conversation extends Model {
1068
1073
  static table: string;
@@ -1248,6 +1253,7 @@ declare const sdkSchema: Readonly<{
1248
1253
  * Migration history:
1249
1254
  * - v2 → v3: Added `was_stopped` column to history table
1250
1255
  * - v3 → v4: Added `modelPreferences` table for settings storage
1256
+ * - v4 → v5: Added `error` column to history table for error persistence
1251
1257
  */
1252
1258
  declare const sdkMigrations: Readonly<{
1253
1259
  validated: true;
@@ -1744,7 +1750,7 @@ declare function executeTool(tool: ClientTool, params: Record<string, unknown>):
1744
1750
  * Dropbox uses OAuth 2.0 with PKCE for browser apps.
1745
1751
  */
1746
1752
  /** Default folder path for Dropbox backups */
1747
- declare const DEFAULT_BACKUP_FOLDER = "/ai-chat-app/conversations";
1753
+ declare const DEFAULT_BACKUP_FOLDER$1 = "/ai-chat-app/conversations";
1748
1754
 
1749
1755
  /**
1750
1756
  * Dropbox Backup Implementation
@@ -2191,12 +2197,339 @@ interface UseGoogleDriveBackupResult {
2191
2197
  */
2192
2198
  declare function useGoogleDriveBackup(options: UseGoogleDriveBackupOptions): UseGoogleDriveBackupResult;
2193
2199
 
2200
+ /**
2201
+ * Props for ICloudAuthProvider
2202
+ */
2203
+ interface ICloudAuthProviderProps {
2204
+ /** CloudKit API token (from Apple Developer Console) */
2205
+ apiToken: string;
2206
+ /** CloudKit container identifier (default: "iCloud.Memoryless") */
2207
+ containerIdentifier?: string;
2208
+ /** CloudKit environment (default: "production") */
2209
+ environment?: "development" | "production";
2210
+ /** Children to render */
2211
+ children: ReactNode;
2212
+ }
2213
+ /**
2214
+ * Context value for iCloud authentication
2215
+ */
2216
+ interface ICloudAuthContextValue {
2217
+ /** Whether user is authenticated with iCloud */
2218
+ isAuthenticated: boolean;
2219
+ /** Whether iCloud is configured and available */
2220
+ isConfigured: boolean;
2221
+ /** Whether CloudKit JS is loaded */
2222
+ isAvailable: boolean;
2223
+ /** User record name (unique identifier) */
2224
+ userRecordName: string | null;
2225
+ /** Request access - triggers iCloud sign-in if needed */
2226
+ requestAccess: () => Promise<void>;
2227
+ /** Sign out from iCloud */
2228
+ logout: () => void;
2229
+ }
2230
+ /**
2231
+ * Provider component for iCloud authentication.
2232
+ *
2233
+ * Wrap your app with this provider to enable iCloud authentication.
2234
+ * CloudKit JS is loaded automatically when needed.
2235
+ *
2236
+ * @example
2237
+ * ```tsx
2238
+ * import { ICloudAuthProvider } from "@reverbia/sdk/react";
2239
+ *
2240
+ * function App() {
2241
+ * return (
2242
+ * <ICloudAuthProvider
2243
+ * apiToken={process.env.NEXT_PUBLIC_CLOUDKIT_API_TOKEN!}
2244
+ * containerIdentifier="iCloud.Memoryless"
2245
+ * environment="production"
2246
+ * >
2247
+ * <MyApp />
2248
+ * </ICloudAuthProvider>
2249
+ * );
2250
+ * }
2251
+ * ```
2252
+ *
2253
+ * @category Components
2254
+ */
2255
+ declare function ICloudAuthProvider({ apiToken, containerIdentifier, environment, children, }: ICloudAuthProviderProps): JSX.Element;
2256
+ /**
2257
+ * Hook to access iCloud authentication state and methods.
2258
+ *
2259
+ * Must be used within an ICloudAuthProvider.
2260
+ *
2261
+ * @example
2262
+ * ```tsx
2263
+ * import { useICloudAuth } from "@reverbia/sdk/react";
2264
+ *
2265
+ * function ICloudStatus() {
2266
+ * const { isAuthenticated, isAvailable, requestAccess, logout } = useICloudAuth();
2267
+ *
2268
+ * if (!isAvailable) {
2269
+ * return <p>iCloud is not available. Please load CloudKit JS.</p>;
2270
+ * }
2271
+ *
2272
+ * return (
2273
+ * <div>
2274
+ * {isAuthenticated ? (
2275
+ * <>
2276
+ * <span>Connected to iCloud</span>
2277
+ * <button onClick={logout}>Disconnect</button>
2278
+ * </>
2279
+ * ) : (
2280
+ * <button onClick={requestAccess}>Connect to iCloud</button>
2281
+ * )}
2282
+ * </div>
2283
+ * );
2284
+ * }
2285
+ * ```
2286
+ *
2287
+ * @category Hooks
2288
+ */
2289
+ declare function useICloudAuth(): ICloudAuthContextValue;
2290
+ /**
2291
+ * Check if iCloud is configured (has API token)
2292
+ */
2293
+ declare function hasICloudCredentials(): boolean;
2294
+ /**
2295
+ * Clear iCloud authentication state
2296
+ * Note: This only clears local state; user remains signed in to iCloud
2297
+ */
2298
+ declare function clearICloudAuth(): void;
2299
+
2300
+ /**
2301
+ * iCloud CloudKit API utilities
2302
+ *
2303
+ * Uses Apple CloudKit JS for file operations in iCloud Drive.
2304
+ * Requires CloudKit container configuration and user authentication.
2305
+ *
2306
+ * CloudKit JS is loaded dynamically when needed.
2307
+ */
2308
+ /** Default folder path for iCloud backups */
2309
+ declare const DEFAULT_BACKUP_FOLDER = "conversations";
2310
+ /** CloudKit record structure */
2311
+ interface CloudKitRecord {
2312
+ recordName: string;
2313
+ recordType: string;
2314
+ fields: {
2315
+ filename?: {
2316
+ value: string;
2317
+ };
2318
+ data?: {
2319
+ value: {
2320
+ downloadURL: string;
2321
+ size: number;
2322
+ };
2323
+ };
2324
+ };
2325
+ modified?: {
2326
+ timestamp: number;
2327
+ };
2328
+ created?: {
2329
+ timestamp: number;
2330
+ };
2331
+ }
2332
+ /** CloudKit response structure */
2333
+ interface CloudKitResponse {
2334
+ records?: CloudKitRecord[];
2335
+ continuationMarker?: string;
2336
+ }
2337
+ declare global {
2338
+ interface Window {
2339
+ CloudKit?: {
2340
+ configure: (config: {
2341
+ containers: Array<{
2342
+ containerIdentifier: string;
2343
+ apiTokenAuth: {
2344
+ apiToken: string;
2345
+ persist: boolean;
2346
+ signInButton?: {
2347
+ id: string;
2348
+ theme?: string;
2349
+ };
2350
+ signOutButton?: {
2351
+ id: string;
2352
+ theme?: string;
2353
+ };
2354
+ };
2355
+ environment: string;
2356
+ }>;
2357
+ }) => void;
2358
+ getDefaultContainer: () => CloudKitContainer;
2359
+ };
2360
+ }
2361
+ }
2362
+ interface CloudKitContainer {
2363
+ containerIdentifier: string;
2364
+ setUpAuth: (options?: {
2365
+ buttonContainer?: HTMLElement;
2366
+ signInButtonId?: string;
2367
+ signOutButtonId?: string;
2368
+ }) => Promise<CloudKitUserIdentity | null>;
2369
+ whenUserSignsIn: () => Promise<CloudKitUserIdentity>;
2370
+ whenUserSignsOut: () => Promise<void>;
2371
+ privateCloudDatabase: CloudKitDatabase;
2372
+ }
2373
+ interface CloudKitUserIdentity {
2374
+ userRecordName: string;
2375
+ isDiscoverable?: boolean;
2376
+ }
2377
+ interface CloudKitDatabase {
2378
+ saveRecords: (records: CloudKitRecordToSave | CloudKitRecordToSave[], options?: {
2379
+ zoneName?: string;
2380
+ }) => Promise<CloudKitResponse>;
2381
+ deleteRecords: (recordNames: {
2382
+ recordName: string;
2383
+ }[], options?: {
2384
+ zoneName?: string;
2385
+ }) => Promise<CloudKitResponse>;
2386
+ performQuery: (query: CloudKitQuery) => Promise<CloudKitResponse>;
2387
+ fetchRecords: (recordNames: Array<{
2388
+ recordName: string;
2389
+ }>, options?: {
2390
+ desiredKeys?: string[];
2391
+ }) => Promise<CloudKitResponse>;
2392
+ }
2393
+ interface CloudKitRecordToSave {
2394
+ recordType: string;
2395
+ recordName?: string;
2396
+ fields: Record<string, {
2397
+ value: unknown;
2398
+ }>;
2399
+ }
2400
+ interface CloudKitQuery {
2401
+ recordType: string;
2402
+ filterBy?: Array<{
2403
+ fieldName: string;
2404
+ comparator: string;
2405
+ fieldValue: {
2406
+ value: unknown;
2407
+ };
2408
+ }>;
2409
+ sortBy?: Array<{
2410
+ fieldName: string;
2411
+ ascending: boolean;
2412
+ }>;
2413
+ }
2414
+
2415
+ /**
2416
+ * iCloud Backup Implementation
2417
+ *
2418
+ * Generic backup/restore functionality for iCloud storage.
2419
+ * Works directly with WatermelonDB database.
2420
+ */
2421
+
2422
+ interface ICloudExportResult {
2423
+ success: boolean;
2424
+ uploaded: number;
2425
+ skipped: number;
2426
+ total: number;
2427
+ }
2428
+ interface ICloudImportResult {
2429
+ success: boolean;
2430
+ restored: number;
2431
+ failed: number;
2432
+ total: number;
2433
+ /** True if no backups were found in iCloud */
2434
+ noBackupsFound?: boolean;
2435
+ }
2436
+
2437
+ /**
2438
+ * Options for useICloudBackup hook
2439
+ */
2440
+ interface UseICloudBackupOptions {
2441
+ /** WatermelonDB database instance */
2442
+ database: Database;
2443
+ /** Current user address (null if not signed in) */
2444
+ userAddress: string | null;
2445
+ /** Request encryption key for the user address */
2446
+ requestEncryptionKey: (address: string) => Promise<void>;
2447
+ /** Export a conversation to an encrypted blob */
2448
+ exportConversation: (conversationId: string, userAddress: string) => Promise<{
2449
+ success: boolean;
2450
+ blob?: Blob;
2451
+ }>;
2452
+ /** Import a conversation from an encrypted blob */
2453
+ importConversation: (blob: Blob, userAddress: string) => Promise<{
2454
+ success: boolean;
2455
+ }>;
2456
+ }
2457
+ /**
2458
+ * Result returned by useICloudBackup hook
2459
+ */
2460
+ interface UseICloudBackupResult {
2461
+ /** Backup all conversations to iCloud */
2462
+ backup: (options?: {
2463
+ onProgress?: (current: number, total: number) => void;
2464
+ }) => Promise<ICloudExportResult | {
2465
+ error: string;
2466
+ }>;
2467
+ /** Restore conversations from iCloud */
2468
+ restore: (options?: {
2469
+ onProgress?: (current: number, total: number) => void;
2470
+ }) => Promise<ICloudImportResult | {
2471
+ error: string;
2472
+ }>;
2473
+ /** Whether iCloud is configured */
2474
+ isConfigured: boolean;
2475
+ /** Whether user has signed in to iCloud */
2476
+ isAuthenticated: boolean;
2477
+ /** Whether CloudKit JS is available */
2478
+ isAvailable: boolean;
2479
+ }
2480
+ /**
2481
+ * React hook for iCloud backup and restore functionality.
2482
+ *
2483
+ * This hook provides methods to backup conversations to iCloud and restore them.
2484
+ * It handles all the logic for checking timestamps, skipping unchanged files,
2485
+ * authentication, and managing the backup/restore process.
2486
+ *
2487
+ * Must be used within an ICloudAuthProvider.
2488
+ *
2489
+ * @example
2490
+ * ```tsx
2491
+ * import { useICloudBackup } from "@reverbia/sdk/react";
2492
+ *
2493
+ * function BackupButton() {
2494
+ * const { backup, restore, isConfigured, isAuthenticated, isAvailable } = useICloudBackup({
2495
+ * database,
2496
+ * userAddress,
2497
+ * requestEncryptionKey,
2498
+ * exportConversation,
2499
+ * importConversation,
2500
+ * });
2501
+ *
2502
+ * if (!isAvailable) {
2503
+ * return <p>CloudKit JS not loaded</p>;
2504
+ * }
2505
+ *
2506
+ * const handleBackup = async () => {
2507
+ * const result = await backup({
2508
+ * onProgress: (current, total) => {
2509
+ * console.log(`Progress: ${current}/${total}`);
2510
+ * },
2511
+ * });
2512
+ *
2513
+ * if ("error" in result) {
2514
+ * console.error(result.error);
2515
+ * } else {
2516
+ * console.log(`Uploaded: ${result.uploaded}, Skipped: ${result.skipped}`);
2517
+ * }
2518
+ * };
2519
+ *
2520
+ * return <button onClick={handleBackup} disabled={!isConfigured}>Backup to iCloud</button>;
2521
+ * }
2522
+ * ```
2523
+ *
2524
+ * @category Hooks
2525
+ */
2526
+ declare function useICloudBackup(options: UseICloudBackupOptions): UseICloudBackupResult;
2527
+
2194
2528
  /**
2195
2529
  * Props for BackupAuthProvider
2196
2530
  *
2197
- * At least one of `dropboxAppKey` or `googleClientId` should be provided
2198
- * for the provider to be useful. Both are optional to allow using just
2199
- * one backup provider.
2531
+ * At least one of `dropboxAppKey`, `googleClientId`, or `icloudApiToken` should be provided
2532
+ * for the provider to be useful. All are optional to allow using just one backup provider.
2200
2533
  */
2201
2534
  interface BackupAuthProviderProps {
2202
2535
  /** Dropbox App Key (from Dropbox Developer Console). Optional - omit to disable Dropbox. */
@@ -2207,6 +2540,12 @@ interface BackupAuthProviderProps {
2207
2540
  googleClientId?: string;
2208
2541
  /** Google OAuth callback path (default: "/auth/google/callback") */
2209
2542
  googleCallbackPath?: string;
2543
+ /** CloudKit API token (from Apple Developer Console). Optional - omit to disable iCloud. */
2544
+ icloudApiToken?: string;
2545
+ /** CloudKit container identifier (default: "iCloud.Memoryless") */
2546
+ icloudContainerIdentifier?: string;
2547
+ /** CloudKit environment (default: "production") */
2548
+ icloudEnvironment?: "development" | "production";
2210
2549
  /**
2211
2550
  * API client for backend OAuth requests. Optional - uses the default SDK client if not provided.
2212
2551
  * Only needed if you have a custom client configuration (e.g., different baseUrl).
@@ -2240,6 +2579,8 @@ interface BackupAuthContextValue {
2240
2579
  dropbox: ProviderAuthState;
2241
2580
  /** Google Drive authentication state and methods */
2242
2581
  googleDrive: ProviderAuthState;
2582
+ /** iCloud authentication state and methods */
2583
+ icloud: ProviderAuthState;
2243
2584
  /** Check if any provider is configured */
2244
2585
  hasAnyProvider: boolean;
2245
2586
  /** Check if any provider is authenticated */
@@ -2265,6 +2606,8 @@ interface BackupAuthContextValue {
2265
2606
  * dropboxCallbackPath="/auth/dropbox/callback"
2266
2607
  * googleClientId={process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID}
2267
2608
  * googleCallbackPath="/auth/google/callback"
2609
+ * icloudApiToken={process.env.NEXT_PUBLIC_CLOUDKIT_API_TOKEN}
2610
+ * icloudContainerIdentifier="iCloud.Memoryless"
2268
2611
  * apiClient={apiClient}
2269
2612
  * >
2270
2613
  * <MyApp />
@@ -2275,7 +2618,7 @@ interface BackupAuthContextValue {
2275
2618
  *
2276
2619
  * @category Components
2277
2620
  */
2278
- declare function BackupAuthProvider({ dropboxAppKey, dropboxCallbackPath, googleClientId, googleCallbackPath, apiClient, children, }: BackupAuthProviderProps): JSX.Element;
2621
+ declare function BackupAuthProvider({ dropboxAppKey, dropboxCallbackPath, googleClientId, googleCallbackPath, icloudApiToken, icloudContainerIdentifier, icloudEnvironment, apiClient, children, }: BackupAuthProviderProps): JSX.Element;
2279
2622
  /**
2280
2623
  * Hook to access unified backup authentication state and methods.
2281
2624
  *
@@ -2369,11 +2712,11 @@ interface ProviderBackupState {
2369
2712
  /** Whether user has authenticated with this provider */
2370
2713
  isAuthenticated: boolean;
2371
2714
  /** Backup all conversations to this provider */
2372
- backup: (options?: BackupOperationOptions) => Promise<DropboxExportResult | GoogleDriveExportResult | {
2715
+ backup: (options?: BackupOperationOptions) => Promise<DropboxExportResult | GoogleDriveExportResult | ICloudExportResult | {
2373
2716
  error: string;
2374
2717
  }>;
2375
2718
  /** Restore conversations from this provider */
2376
- restore: (options?: BackupOperationOptions) => Promise<DropboxImportResult | GoogleDriveImportResult | {
2719
+ restore: (options?: BackupOperationOptions) => Promise<DropboxImportResult | GoogleDriveImportResult | ICloudImportResult | {
2377
2720
  error: string;
2378
2721
  }>;
2379
2722
  /** Request access to this provider (triggers OAuth if needed) */
@@ -2389,6 +2732,8 @@ interface UseBackupResult {
2389
2732
  dropbox: ProviderBackupState;
2390
2733
  /** Google Drive backup state and methods */
2391
2734
  googleDrive: ProviderBackupState;
2735
+ /** iCloud backup state and methods */
2736
+ icloud: ProviderBackupState;
2392
2737
  /** Whether any backup provider is configured */
2393
2738
  hasAnyProvider: boolean;
2394
2739
  /** Whether any backup provider is authenticated */
@@ -2462,4 +2807,4 @@ interface UseBackupResult {
2462
2807
  */
2463
2808
  declare function useBackup(options: UseBackupOptions): UseBackupResult;
2464
2809
 
2465
- export { DEFAULT_CONVERSATIONS_FOLDER as BACKUP_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as BACKUP_DRIVE_ROOT_FOLDER, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ClientTool, type CreateConversationOptions, type CreateMemoryOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, DEFAULT_BACKUP_FOLDER, DEFAULT_CONVERSATIONS_FOLDER as DEFAULT_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as DEFAULT_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER as DEFAULT_DROPBOX_FOLDER, DEFAULT_TOOL_SELECTOR_MODEL, type DropboxAuthContextValue, DropboxAuthProvider, type DropboxAuthProviderProps, type DropboxExportResult, type DropboxImportResult, type FileMetadata, type GoogleDriveAuthContextValue, GoogleDriveAuthProvider, type GoogleDriveAuthProviderProps, type GoogleDriveExportResult, type GoogleDriveImportResult, type MemoryItem, type MemoryType, type OCRFile, type PdfFile, type ProgressCallback, type ProviderAuthState, type ProviderBackupState, type SearchMessagesOptions, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type SignMessageFn, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredMemory, Memory as StoredMemoryModel, type StoredMemoryWithSimilarity, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type ToolExecutionResult, type ToolParameter, type ToolSelectionResult, type UpdateMemoryOptions, type UpdateModelPreferenceOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseDropboxBackupOptions, type UseDropboxBackupResult, type UseGoogleDriveBackupOptions, type UseGoogleDriveBackupResult, type UseMemoryStorageOptions, type UseMemoryStorageResult, type UseSettingsOptions, type UseSettingsResult, chatStorageMigrations, chatStorageSchema, clearToken as clearDropboxToken, clearGoogleDriveToken, createMemoryContextSystemMessage, decryptData, decryptDataBytes, encryptData, executeTool, extractConversationContext, formatMemoriesForChat, generateCompositeKey, generateConversationId, generateUniqueKey, getGoogleDriveStoredToken, hasDropboxCredentials, hasEncryptionKey, hasGoogleDriveCredentials, memoryStorageSchema, requestEncryptionKey, sdkMigrations, sdkModelClasses, sdkSchema, selectTool, settingsStorageSchema, useBackup, useBackupAuth, useChat, useChatStorage, useDropboxAuth, useDropboxBackup, useEncryption, useGoogleDriveAuth, useGoogleDriveBackup, useImageGeneration, useMemoryStorage, useModels, useOCR, usePdf, useSearch, useSettings };
2810
+ export { DEFAULT_CONVERSATIONS_FOLDER as BACKUP_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as BACKUP_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ClientTool, type CreateConversationOptions, type CreateMemoryOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_BACKUP_FOLDER, 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_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_TOOL_SELECTOR_MODEL, type DropboxAuthContextValue, DropboxAuthProvider, type DropboxAuthProviderProps, type DropboxExportResult, type DropboxImportResult, type FileMetadata, type GoogleDriveAuthContextValue, GoogleDriveAuthProvider, type GoogleDriveAuthProviderProps, type GoogleDriveExportResult, type GoogleDriveImportResult, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, type MemoryItem, type MemoryType, type OCRFile, type PdfFile, type ProgressCallback, type ProviderAuthState, type ProviderBackupState, type SearchMessagesOptions, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type SignMessageFn, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredMemory, Memory as StoredMemoryModel, type StoredMemoryWithSimilarity, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type ToolExecutionResult, type ToolParameter, type ToolSelectionResult, type UpdateMemoryOptions, type UpdateModelPreferenceOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseDropboxBackupOptions, type UseDropboxBackupResult, type UseGoogleDriveBackupOptions, type UseGoogleDriveBackupResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseMemoryStorageOptions, type UseMemoryStorageResult, type UseSettingsOptions, type UseSettingsResult, chatStorageMigrations, chatStorageSchema, clearToken as clearDropboxToken, clearGoogleDriveToken, clearICloudAuth, createMemoryContextSystemMessage, decryptData, decryptDataBytes, encryptData, executeTool, extractConversationContext, formatMemoriesForChat, generateCompositeKey, generateConversationId, generateUniqueKey, getGoogleDriveStoredToken, hasDropboxCredentials, hasEncryptionKey, hasGoogleDriveCredentials, hasICloudCredentials, memoryStorageSchema, requestEncryptionKey, sdkMigrations, sdkModelClasses, sdkSchema, selectTool, settingsStorageSchema, useBackup, useBackupAuth, useChat, useChatStorage, useDropboxAuth, useDropboxBackup, useEncryption, useGoogleDriveAuth, useGoogleDriveBackup, useICloudAuth, useICloudBackup, useImageGeneration, useMemoryStorage, useModels, useOCR, usePdf, useSearch, useSettings };