@reverbia/sdk 1.0.0-next.20260109140427 → 1.0.0-next.20260109180912
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/index.cjs +49 -26
- package/dist/expo/index.d.mts +130 -8
- package/dist/expo/index.d.ts +130 -8
- package/dist/expo/index.mjs +49 -26
- package/dist/react/index.cjs +178 -60
- package/dist/react/index.d.mts +233 -40
- package/dist/react/index.d.ts +233 -40
- package/dist/react/index.mjs +178 -60
- package/package.json +3 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -882,6 +882,7 @@ type BaseSendMessageArgs = ResponsesApiOptions & {
|
|
|
882
882
|
};
|
|
883
883
|
/**
|
|
884
884
|
* Base options for useChat hook
|
|
885
|
+
* @inline
|
|
885
886
|
*/
|
|
886
887
|
type BaseUseChatOptions = {
|
|
887
888
|
getToken?: () => Promise<string | null>;
|
|
@@ -977,14 +978,17 @@ type SendMessageResult = {
|
|
|
977
978
|
data: LlmapiResponseResponse | null;
|
|
978
979
|
error: string;
|
|
979
980
|
};
|
|
980
|
-
|
|
981
|
+
/**
|
|
982
|
+
* @inline
|
|
983
|
+
*/
|
|
984
|
+
interface UseChatOptions extends BaseUseChatOptions {
|
|
981
985
|
/**
|
|
982
986
|
* Which API endpoint to use. Default: "responses"
|
|
983
987
|
* - "responses": OpenAI Responses API (supports thinking, reasoning, conversations)
|
|
984
988
|
* - "completions": OpenAI Chat Completions API (wider model compatibility)
|
|
985
989
|
*/
|
|
986
990
|
apiType?: ApiType;
|
|
987
|
-
}
|
|
991
|
+
}
|
|
988
992
|
type UseChatResult = BaseUseChatResult & {
|
|
989
993
|
sendMessage: (args: SendMessageArgs) => Promise<SendMessageResult>;
|
|
990
994
|
};
|
|
@@ -1008,11 +1012,6 @@ type UseChatResult = BaseUseChatResult & {
|
|
|
1008
1012
|
*
|
|
1009
1013
|
* @category Hooks
|
|
1010
1014
|
*
|
|
1011
|
-
* @returns An object containing:
|
|
1012
|
-
* - `isLoading`: A boolean indicating whether a request is currently in progress
|
|
1013
|
-
* - `sendMessage`: An async function to send chat messages
|
|
1014
|
-
* - `stop`: A function to abort the current request
|
|
1015
|
-
*
|
|
1016
1015
|
* @example
|
|
1017
1016
|
* ```tsx
|
|
1018
1017
|
* // Basic usage with API
|
|
@@ -1183,6 +1182,22 @@ declare function clearKeyPair(address: string): void;
|
|
|
1183
1182
|
* Clears all key pairs from memory
|
|
1184
1183
|
*/
|
|
1185
1184
|
declare function clearAllKeyPairs(): void;
|
|
1185
|
+
/**
|
|
1186
|
+
* Result returned by the useEncryption hook.
|
|
1187
|
+
* @category Hooks
|
|
1188
|
+
*/
|
|
1189
|
+
interface UseEncryptionResult {
|
|
1190
|
+
/** Request and generate an encryption key for a wallet address */
|
|
1191
|
+
requestEncryptionKey: (walletAddress: string) => Promise<void>;
|
|
1192
|
+
/** Request and generate an ECDH key pair for a wallet address */
|
|
1193
|
+
requestKeyPair: (walletAddress: string) => Promise<void>;
|
|
1194
|
+
/** Export the public key for a wallet address as base64-encoded SPKI */
|
|
1195
|
+
exportPublicKey: (walletAddress: string) => Promise<string>;
|
|
1196
|
+
/** Check if a key pair exists in memory for a wallet address */
|
|
1197
|
+
hasKeyPair: (walletAddress: string) => boolean;
|
|
1198
|
+
/** Clear the key pair for a wallet address from memory */
|
|
1199
|
+
clearKeyPair: (walletAddress: string) => void;
|
|
1200
|
+
}
|
|
1186
1201
|
/**
|
|
1187
1202
|
* Hook that provides encryption key management for securing local data.
|
|
1188
1203
|
*
|
|
@@ -1311,13 +1326,7 @@ declare function clearAllKeyPairs(): void;
|
|
|
1311
1326
|
*
|
|
1312
1327
|
* @category Hooks
|
|
1313
1328
|
*/
|
|
1314
|
-
declare function useEncryption(signMessage: SignMessageFn, embeddedWalletSigner?: EmbeddedWalletSignerFn):
|
|
1315
|
-
requestEncryptionKey: (walletAddress: string) => Promise<void>;
|
|
1316
|
-
requestKeyPair: (walletAddress: string) => Promise<void>;
|
|
1317
|
-
exportPublicKey: (walletAddress: string) => Promise<string>;
|
|
1318
|
-
hasKeyPair: (walletAddress: string) => boolean;
|
|
1319
|
-
clearKeyPair: (walletAddress: string) => void;
|
|
1320
|
-
};
|
|
1329
|
+
declare function useEncryption(signMessage: SignMessageFn, embeddedWalletSigner?: EmbeddedWalletSignerFn): UseEncryptionResult;
|
|
1321
1330
|
|
|
1322
1331
|
declare const chatStorageSchema: Readonly<{
|
|
1323
1332
|
version: _nozbe_watermelondb_Schema.SchemaVersion;
|
|
@@ -1372,6 +1381,9 @@ interface StoredMemory extends MemoryItem {
|
|
|
1372
1381
|
interface StoredMemoryWithSimilarity extends StoredMemory {
|
|
1373
1382
|
similarity: number;
|
|
1374
1383
|
}
|
|
1384
|
+
/**
|
|
1385
|
+
* @inline
|
|
1386
|
+
*/
|
|
1375
1387
|
interface BaseUseMemoryStorageOptions {
|
|
1376
1388
|
database: Database;
|
|
1377
1389
|
completionsModel?: string;
|
|
@@ -1512,27 +1524,122 @@ interface UpdateMessageOptions {
|
|
|
1512
1524
|
* @inline
|
|
1513
1525
|
*/
|
|
1514
1526
|
interface BaseUseChatStorageOptions {
|
|
1527
|
+
/** WatermelonDB database instance for storing conversations and messages */
|
|
1515
1528
|
database: Database;
|
|
1529
|
+
/** ID of an existing conversation to load and continue */
|
|
1516
1530
|
conversationId?: string;
|
|
1531
|
+
/** Automatically create a new conversation if none is set (default: true) */
|
|
1517
1532
|
autoCreateConversation?: boolean;
|
|
1533
|
+
/** Title for auto-created conversations (default: "New conversation") */
|
|
1518
1534
|
defaultConversationTitle?: string;
|
|
1535
|
+
/** Function to retrieve the auth token for API requests */
|
|
1519
1536
|
getToken?: () => Promise<string | null>;
|
|
1537
|
+
/** Base URL for the chat API endpoint */
|
|
1520
1538
|
baseUrl?: string;
|
|
1539
|
+
/** Callback invoked with each streamed response chunk */
|
|
1521
1540
|
onData?: (chunk: string) => void;
|
|
1541
|
+
/** Callback invoked when the response completes successfully */
|
|
1522
1542
|
onFinish?: (response: LlmapiResponseResponse) => void;
|
|
1543
|
+
/** Callback invoked when an error occurs during the request */
|
|
1523
1544
|
onError?: (error: Error) => void;
|
|
1524
1545
|
}
|
|
1546
|
+
/**
|
|
1547
|
+
* Base arguments for sending a message with automatic storage.
|
|
1548
|
+
*
|
|
1549
|
+
* These arguments control both the AI request and how the message
|
|
1550
|
+
* is persisted to the local database.
|
|
1551
|
+
* @inline
|
|
1552
|
+
*/
|
|
1525
1553
|
interface BaseSendMessageWithStorageArgs {
|
|
1526
|
-
|
|
1554
|
+
/**
|
|
1555
|
+
* The message array to send to the AI.
|
|
1556
|
+
*
|
|
1557
|
+
* Uses the modern array format that supports multimodal content (text, images, files).
|
|
1558
|
+
* The last user message in this array will be extracted and stored in the database.
|
|
1559
|
+
*
|
|
1560
|
+
* When `includeHistory` is true (default), conversation history is prepended.
|
|
1561
|
+
* When `includeHistory` is false, only these messages are sent.
|
|
1562
|
+
*
|
|
1563
|
+
* @example
|
|
1564
|
+
* ```ts
|
|
1565
|
+
* // Simple usage
|
|
1566
|
+
* sendMessage({
|
|
1567
|
+
* messages: [
|
|
1568
|
+
* { role: "user", content: [{ type: "text", text: "Hello!" }] }
|
|
1569
|
+
* ]
|
|
1570
|
+
* })
|
|
1571
|
+
*
|
|
1572
|
+
* // With system prompt and history disabled
|
|
1573
|
+
* sendMessage({
|
|
1574
|
+
* messages: [
|
|
1575
|
+
* { role: "system", content: [{ type: "text", text: "You are helpful" }] },
|
|
1576
|
+
* { role: "user", content: [{ type: "text", text: "Question" }] },
|
|
1577
|
+
* ],
|
|
1578
|
+
* includeHistory: false
|
|
1579
|
+
* })
|
|
1580
|
+
*
|
|
1581
|
+
* // With images
|
|
1582
|
+
* sendMessage({
|
|
1583
|
+
* messages: [
|
|
1584
|
+
* { role: "user", content: [
|
|
1585
|
+
* { type: "text", text: "What's in this image?" },
|
|
1586
|
+
* { type: "image_url", image_url: { url: "data:image/png;base64,..." } }
|
|
1587
|
+
* ]}
|
|
1588
|
+
* ]
|
|
1589
|
+
* })
|
|
1590
|
+
* ```
|
|
1591
|
+
*/
|
|
1592
|
+
messages: LlmapiMessage[];
|
|
1593
|
+
/**
|
|
1594
|
+
* The model identifier to use for this request (e.g., "gpt-4o", "claude-sonnet-4-20250514").
|
|
1595
|
+
* If not specified, uses the default model configured on the server.
|
|
1596
|
+
*/
|
|
1527
1597
|
model?: string;
|
|
1528
|
-
|
|
1598
|
+
/**
|
|
1599
|
+
* Whether to automatically include previous messages from the conversation as context.
|
|
1600
|
+
* When true, fetches stored messages and prepends them to the request.
|
|
1601
|
+
* Ignored if `messages` is provided.
|
|
1602
|
+
* @default true
|
|
1603
|
+
*/
|
|
1529
1604
|
includeHistory?: boolean;
|
|
1605
|
+
/**
|
|
1606
|
+
* Maximum number of historical messages to include when `includeHistory` is true.
|
|
1607
|
+
* Only the most recent N messages are included to manage context window size.
|
|
1608
|
+
* @default 50
|
|
1609
|
+
*/
|
|
1530
1610
|
maxHistoryMessages?: number;
|
|
1611
|
+
/**
|
|
1612
|
+
* File attachments to include with the message (images, documents, etc.).
|
|
1613
|
+
* Files with image MIME types and URLs are sent as image content parts.
|
|
1614
|
+
* File metadata is stored with the message (URLs are stripped if they're data URIs).
|
|
1615
|
+
*/
|
|
1531
1616
|
files?: FileMetadata[];
|
|
1617
|
+
/**
|
|
1618
|
+
* Per-request callback invoked with each streamed response chunk.
|
|
1619
|
+
* Overrides the hook-level `onData` callback for this request only.
|
|
1620
|
+
* Use this to update UI as the response streams in.
|
|
1621
|
+
*/
|
|
1532
1622
|
onData?: (chunk: string) => void;
|
|
1623
|
+
/**
|
|
1624
|
+
* Additional context from memory/RAG system to include in the request.
|
|
1625
|
+
* Typically contains retrieved relevant information from past conversations.
|
|
1626
|
+
*/
|
|
1533
1627
|
memoryContext?: string;
|
|
1628
|
+
/**
|
|
1629
|
+
* Additional context from search results to include in the request.
|
|
1630
|
+
* Typically contains relevant information from web or document searches.
|
|
1631
|
+
*/
|
|
1534
1632
|
searchContext?: string;
|
|
1633
|
+
/**
|
|
1634
|
+
* Search sources to attach to the stored message for citation/reference.
|
|
1635
|
+
* These are combined with any sources extracted from the assistant's response.
|
|
1636
|
+
*/
|
|
1535
1637
|
sources?: SearchSource[];
|
|
1638
|
+
/**
|
|
1639
|
+
* Activity phases for tracking the request lifecycle in the UI.
|
|
1640
|
+
* Each phase represents a step like "Searching", "Thinking", "Generating".
|
|
1641
|
+
* The final phase is automatically marked as completed when stored.
|
|
1642
|
+
*/
|
|
1536
1643
|
thoughtProcess?: ActivityPhase[];
|
|
1537
1644
|
/**
|
|
1538
1645
|
* Whether to store the response server-side.
|
|
@@ -1550,33 +1657,43 @@ interface BaseSendMessageWithStorageArgs {
|
|
|
1550
1657
|
serverConversation?: string;
|
|
1551
1658
|
/**
|
|
1552
1659
|
* Controls randomness in the response (0.0 to 2.0).
|
|
1660
|
+
* Lower values make output more deterministic, higher values more creative.
|
|
1553
1661
|
*/
|
|
1554
1662
|
temperature?: number;
|
|
1555
1663
|
/**
|
|
1556
1664
|
* Maximum number of tokens to generate in the response.
|
|
1665
|
+
* Use this to limit response length and control costs.
|
|
1557
1666
|
*/
|
|
1558
1667
|
maxOutputTokens?: number;
|
|
1559
1668
|
/**
|
|
1560
1669
|
* Array of tool definitions available to the model.
|
|
1670
|
+
* Tools enable the model to call functions, search, execute code, etc.
|
|
1561
1671
|
*/
|
|
1562
1672
|
tools?: LlmapiTool[];
|
|
1563
1673
|
/**
|
|
1564
|
-
* Controls which tool
|
|
1674
|
+
* Controls which tool the model should use:
|
|
1675
|
+
* - "auto": Model decides whether to use a tool (default)
|
|
1676
|
+
* - "any": Model must use one of the provided tools
|
|
1677
|
+
* - "none": Model cannot use any tools
|
|
1678
|
+
* - "required": Model must use a tool
|
|
1679
|
+
* - Specific tool name: Model must use that specific tool
|
|
1565
1680
|
*/
|
|
1566
1681
|
toolChoice?: string;
|
|
1567
1682
|
/**
|
|
1568
1683
|
* Reasoning configuration for o-series and other reasoning models.
|
|
1569
|
-
* Controls reasoning effort and summary
|
|
1684
|
+
* Controls reasoning effort level and whether to include reasoning summary.
|
|
1570
1685
|
*/
|
|
1571
1686
|
reasoning?: LlmapiResponseReasoning;
|
|
1572
1687
|
/**
|
|
1573
1688
|
* Extended thinking configuration for Anthropic models (Claude).
|
|
1574
|
-
* Enables the model to think through complex problems step by step
|
|
1689
|
+
* Enables the model to think through complex problems step by step
|
|
1690
|
+
* before generating the final response.
|
|
1575
1691
|
*/
|
|
1576
1692
|
thinking?: LlmapiThinkingOptions;
|
|
1577
1693
|
/**
|
|
1578
1694
|
* Per-request callback for thinking/reasoning chunks.
|
|
1579
1695
|
* Called with delta chunks as the model "thinks" through a problem.
|
|
1696
|
+
* Use this to display thinking progress in the UI.
|
|
1580
1697
|
*/
|
|
1581
1698
|
onThinking?: (chunk: string) => void;
|
|
1582
1699
|
}
|
|
@@ -1631,30 +1748,49 @@ declare class Conversation extends Model {
|
|
|
1631
1748
|
* Options for useChatStorage hook (React version)
|
|
1632
1749
|
*
|
|
1633
1750
|
* Extends base options with apiType support.
|
|
1751
|
+
* @inline
|
|
1634
1752
|
*/
|
|
1635
|
-
|
|
1753
|
+
interface UseChatStorageOptions extends BaseUseChatStorageOptions {
|
|
1636
1754
|
/**
|
|
1637
1755
|
* Which API endpoint to use. Default: "responses"
|
|
1638
1756
|
* - "responses": OpenAI Responses API (supports thinking, reasoning, conversations)
|
|
1639
1757
|
* - "completions": OpenAI Chat Completions API (wider model compatibility)
|
|
1640
1758
|
*/
|
|
1641
1759
|
apiType?: ApiType;
|
|
1642
|
-
}
|
|
1760
|
+
}
|
|
1643
1761
|
/**
|
|
1644
1762
|
* Arguments for sendMessage with storage (React version)
|
|
1645
1763
|
*
|
|
1646
1764
|
* Extends base arguments with headers and apiType support.
|
|
1765
|
+
* @inline
|
|
1647
1766
|
*/
|
|
1648
1767
|
interface SendMessageWithStorageArgs extends BaseSendMessageWithStorageArgs {
|
|
1649
|
-
/**
|
|
1768
|
+
/**
|
|
1769
|
+
* Custom HTTP headers to include with the API request.
|
|
1770
|
+
* Useful for passing additional authentication, tracking, or feature flags.
|
|
1771
|
+
*/
|
|
1650
1772
|
headers?: Record<string, string>;
|
|
1651
1773
|
/**
|
|
1652
|
-
* Override the API type for this request
|
|
1653
|
-
*
|
|
1654
|
-
*
|
|
1774
|
+
* Override the API type for this specific request.
|
|
1775
|
+
* - "responses": OpenAI Responses API (supports thinking, reasoning, conversations)
|
|
1776
|
+
* - "completions": OpenAI Chat Completions API (wider model compatibility)
|
|
1777
|
+
*
|
|
1778
|
+
* Useful when different models need different APIs within the same hook instance.
|
|
1655
1779
|
*/
|
|
1656
1780
|
apiType?: ApiType;
|
|
1657
|
-
/**
|
|
1781
|
+
/**
|
|
1782
|
+
* Function to write files to storage (for MCP image processing).
|
|
1783
|
+
* When provided, MCP-generated images in the response are automatically
|
|
1784
|
+
* downloaded and stored locally via this function. The content is updated
|
|
1785
|
+
* with placeholders that can be resolved to the stored files.
|
|
1786
|
+
*
|
|
1787
|
+
* If not provided, MCP images remain as URLs in the response content.
|
|
1788
|
+
*
|
|
1789
|
+
* @param fileId - Unique identifier for the file
|
|
1790
|
+
* @param blob - The file content as a Blob
|
|
1791
|
+
* @param options - Optional progress callback and abort signal
|
|
1792
|
+
* @returns Promise resolving to the stored file URL/path
|
|
1793
|
+
*/
|
|
1658
1794
|
writeFile?: (fileId: string, blob: Blob, options?: {
|
|
1659
1795
|
onProgress?: (progress: number) => void;
|
|
1660
1796
|
signal?: AbortSignal;
|
|
@@ -1691,7 +1827,34 @@ interface SearchMessagesOptions {
|
|
|
1691
1827
|
* Extends base result with React-specific sendMessage signature.
|
|
1692
1828
|
*/
|
|
1693
1829
|
interface UseChatStorageResult extends BaseUseChatStorageResult {
|
|
1694
|
-
/**
|
|
1830
|
+
/**
|
|
1831
|
+
* Sends a message to the AI and automatically persists both the user message
|
|
1832
|
+
* and assistant response to the database.
|
|
1833
|
+
*
|
|
1834
|
+
* This method handles the complete message lifecycle:
|
|
1835
|
+
* 1. Ensures a conversation exists (creates one if `autoCreateConversation` is enabled)
|
|
1836
|
+
* 2. Optionally includes conversation history for context
|
|
1837
|
+
* 3. Stores the user message before sending
|
|
1838
|
+
* 4. Streams the response via the underlying `useChat` hook
|
|
1839
|
+
* 5. Stores the assistant response (including usage stats, sources, and thinking)
|
|
1840
|
+
* 6. Handles abort/error states gracefully
|
|
1841
|
+
*
|
|
1842
|
+
* @example
|
|
1843
|
+
* ```ts
|
|
1844
|
+
* const result = await sendMessage({
|
|
1845
|
+
* content: "Explain quantum computing",
|
|
1846
|
+
* model: "gpt-4o",
|
|
1847
|
+
* includeHistory: true,
|
|
1848
|
+
* onData: (chunk) => setStreamingText(prev => prev + chunk),
|
|
1849
|
+
* });
|
|
1850
|
+
*
|
|
1851
|
+
* if (result.error) {
|
|
1852
|
+
* console.error("Failed:", result.error);
|
|
1853
|
+
* } else {
|
|
1854
|
+
* console.log("Stored message ID:", result.assistantMessage.uniqueId);
|
|
1855
|
+
* }
|
|
1856
|
+
* ```
|
|
1857
|
+
*/
|
|
1695
1858
|
sendMessage: (args: SendMessageWithStorageArgs) => Promise<SendMessageWithStorageResult>;
|
|
1696
1859
|
/** Search messages by vector similarity */
|
|
1697
1860
|
searchMessages: (queryVector: number[], options?: SearchMessagesOptions) => Promise<StoredMessageWithSimilarity[]>;
|
|
@@ -1866,8 +2029,10 @@ declare class Memory extends Model {
|
|
|
1866
2029
|
* Options for useMemoryStorage hook (React version)
|
|
1867
2030
|
*
|
|
1868
2031
|
* Uses the base options. React-specific features can be added here if needed.
|
|
2032
|
+
* @inline
|
|
1869
2033
|
*/
|
|
1870
|
-
|
|
2034
|
+
interface UseMemoryStorageOptions extends BaseUseMemoryStorageOptions {
|
|
2035
|
+
}
|
|
1871
2036
|
/**
|
|
1872
2037
|
* Result returned by useMemoryStorage hook (React version)
|
|
1873
2038
|
*
|
|
@@ -1945,6 +2110,9 @@ interface CreateModelPreferenceOptions {
|
|
|
1945
2110
|
interface UpdateModelPreferenceOptions {
|
|
1946
2111
|
models?: string;
|
|
1947
2112
|
}
|
|
2113
|
+
/**
|
|
2114
|
+
* @inline
|
|
2115
|
+
*/
|
|
1948
2116
|
interface BaseUseSettingsOptions {
|
|
1949
2117
|
database: Database;
|
|
1950
2118
|
walletAddress?: string;
|
|
@@ -2072,6 +2240,7 @@ interface ProfileUpdate {
|
|
|
2072
2240
|
|
|
2073
2241
|
/**
|
|
2074
2242
|
* Options for useSettings hook (React version)
|
|
2243
|
+
* @inline
|
|
2075
2244
|
*/
|
|
2076
2245
|
interface UseSettingsOptions extends BaseUseSettingsOptions {
|
|
2077
2246
|
}
|
|
@@ -2144,14 +2313,22 @@ interface PdfFile {
|
|
|
2144
2313
|
filename?: string;
|
|
2145
2314
|
}
|
|
2146
2315
|
/**
|
|
2147
|
-
*
|
|
2316
|
+
* Result returned by the usePdf hook.
|
|
2148
2317
|
* @category Hooks
|
|
2149
2318
|
*/
|
|
2150
|
-
|
|
2319
|
+
interface UsePdfResult {
|
|
2320
|
+
/** Extract text from PDF files */
|
|
2151
2321
|
extractPdfContext: (files: PdfFile[]) => Promise<string | null>;
|
|
2322
|
+
/** Whether PDF processing is in progress */
|
|
2152
2323
|
isProcessing: boolean;
|
|
2324
|
+
/** Error from the last PDF extraction attempt */
|
|
2153
2325
|
error: Error | null;
|
|
2154
|
-
}
|
|
2326
|
+
}
|
|
2327
|
+
/**
|
|
2328
|
+
* React hook for extracting text from PDF files.
|
|
2329
|
+
* @category Hooks
|
|
2330
|
+
*/
|
|
2331
|
+
declare function usePdf(): UsePdfResult;
|
|
2155
2332
|
|
|
2156
2333
|
interface OCRFile {
|
|
2157
2334
|
url: string | File | Blob;
|
|
@@ -2159,15 +2336,26 @@ interface OCRFile {
|
|
|
2159
2336
|
language?: string;
|
|
2160
2337
|
}
|
|
2161
2338
|
/**
|
|
2162
|
-
*
|
|
2339
|
+
* Result returned by the useOCR hook.
|
|
2163
2340
|
* @category Hooks
|
|
2164
2341
|
*/
|
|
2165
|
-
|
|
2342
|
+
interface UseOCRResult {
|
|
2343
|
+
/** Extract text from images using OCR */
|
|
2166
2344
|
extractOCRContext: (files: OCRFile[]) => Promise<string | null>;
|
|
2345
|
+
/** Whether OCR processing is in progress */
|
|
2167
2346
|
isProcessing: boolean;
|
|
2347
|
+
/** Error from the last OCR extraction attempt */
|
|
2168
2348
|
error: Error | null;
|
|
2169
|
-
}
|
|
2349
|
+
}
|
|
2350
|
+
/**
|
|
2351
|
+
* React hook for extracting text from images using OCR.
|
|
2352
|
+
* @category Hooks
|
|
2353
|
+
*/
|
|
2354
|
+
declare function useOCR(): UseOCRResult;
|
|
2170
2355
|
|
|
2356
|
+
/**
|
|
2357
|
+
* @inline
|
|
2358
|
+
*/
|
|
2171
2359
|
type UseModelsOptions = {
|
|
2172
2360
|
/**
|
|
2173
2361
|
* Custom function to get auth token for API calls
|
|
@@ -2199,6 +2387,9 @@ type UseModelsResult = {
|
|
|
2199
2387
|
*/
|
|
2200
2388
|
declare function useModels(options?: UseModelsOptions): UseModelsResult;
|
|
2201
2389
|
|
|
2390
|
+
/**
|
|
2391
|
+
* @inline
|
|
2392
|
+
*/
|
|
2202
2393
|
type UseSearchOptions = {
|
|
2203
2394
|
/**
|
|
2204
2395
|
* Custom function to get auth token for API calls
|
|
@@ -2262,6 +2453,9 @@ type UseSearchResult = {
|
|
|
2262
2453
|
*/
|
|
2263
2454
|
declare function useSearch(options?: UseSearchOptions): UseSearchResult;
|
|
2264
2455
|
|
|
2456
|
+
/**
|
|
2457
|
+
* @inline
|
|
2458
|
+
*/
|
|
2265
2459
|
type UseImageGenerationOptions = {
|
|
2266
2460
|
/**
|
|
2267
2461
|
* Custom function to get auth token for API calls
|
|
@@ -2361,6 +2555,7 @@ interface DropboxImportResult {
|
|
|
2361
2555
|
|
|
2362
2556
|
/**
|
|
2363
2557
|
* Options for useDropboxBackup hook
|
|
2558
|
+
* @inline
|
|
2364
2559
|
*/
|
|
2365
2560
|
interface UseDropboxBackupOptions {
|
|
2366
2561
|
/** WatermelonDB database instance */
|
|
@@ -2526,7 +2721,6 @@ interface DropboxAuthContextValue {
|
|
|
2526
2721
|
* }
|
|
2527
2722
|
* ```
|
|
2528
2723
|
*
|
|
2529
|
-
* @category Components
|
|
2530
2724
|
*/
|
|
2531
2725
|
declare function DropboxAuthProvider({ appKey, callbackPath, apiClient, walletAddress, children, }: DropboxAuthProviderProps): JSX.Element;
|
|
2532
2726
|
/**
|
|
@@ -2641,7 +2835,6 @@ interface GoogleDriveAuthContextValue {
|
|
|
2641
2835
|
* }
|
|
2642
2836
|
* ```
|
|
2643
2837
|
*
|
|
2644
|
-
* @category Components
|
|
2645
2838
|
*/
|
|
2646
2839
|
declare function GoogleDriveAuthProvider({ clientId, callbackPath, apiClient, walletAddress, children, }: GoogleDriveAuthProviderProps): JSX.Element;
|
|
2647
2840
|
/**
|
|
@@ -2707,6 +2900,7 @@ interface GoogleDriveImportResult {
|
|
|
2707
2900
|
|
|
2708
2901
|
/**
|
|
2709
2902
|
* Options for useGoogleDriveBackup hook
|
|
2903
|
+
* @inline
|
|
2710
2904
|
*/
|
|
2711
2905
|
interface UseGoogleDriveBackupOptions {
|
|
2712
2906
|
/** WatermelonDB database instance */
|
|
@@ -2846,8 +3040,6 @@ interface ICloudAuthContextValue {
|
|
|
2846
3040
|
* );
|
|
2847
3041
|
* }
|
|
2848
3042
|
* ```
|
|
2849
|
-
*
|
|
2850
|
-
* @category Components
|
|
2851
3043
|
*/
|
|
2852
3044
|
declare function ICloudAuthProvider({ apiToken, containerIdentifier, environment, children, }: ICloudAuthProviderProps): JSX.Element;
|
|
2853
3045
|
/**
|
|
@@ -3033,6 +3225,7 @@ interface ICloudImportResult {
|
|
|
3033
3225
|
|
|
3034
3226
|
/**
|
|
3035
3227
|
* Options for useICloudBackup hook
|
|
3228
|
+
* @inline
|
|
3036
3229
|
*/
|
|
3037
3230
|
interface UseICloudBackupOptions {
|
|
3038
3231
|
/** WatermelonDB database instance */
|
|
@@ -3219,7 +3412,6 @@ interface BackupAuthContextValue {
|
|
|
3219
3412
|
* }
|
|
3220
3413
|
* ```
|
|
3221
3414
|
*
|
|
3222
|
-
* @category Components
|
|
3223
3415
|
*/
|
|
3224
3416
|
declare function BackupAuthProvider({ dropboxAppKey, dropboxCallbackPath, googleClientId, googleCallbackPath, icloudApiToken, icloudContainerIdentifier, icloudEnvironment, apiClient, walletAddress, children, }: BackupAuthProviderProps): JSX.Element;
|
|
3225
3417
|
/**
|
|
@@ -3272,6 +3464,7 @@ declare function useBackupAuth(): BackupAuthContextValue;
|
|
|
3272
3464
|
|
|
3273
3465
|
/**
|
|
3274
3466
|
* Options for useBackup hook
|
|
3467
|
+
* @inline
|
|
3275
3468
|
*/
|
|
3276
3469
|
interface UseBackupOptions {
|
|
3277
3470
|
/** WatermelonDB database instance */
|
|
@@ -3549,4 +3742,4 @@ declare function storeDriveToken(accessToken: string, expiresIn?: number, refres
|
|
|
3549
3742
|
*/
|
|
3550
3743
|
declare function hasDriveCredentials(): boolean;
|
|
3551
3744
|
|
|
3552
|
-
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 CreateConversationOptions, type CreateMemoryOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateUserPreferenceOptions, 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_PERSONALITY_SETTINGS, type DropboxAuthContextValue, DropboxAuthProvider, type DropboxAuthProviderProps, type DropboxExportResult, type DropboxImportResult, type EmbeddedWalletSignerFn, 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 PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type ProfileUpdate, type ProgressCallback, type ProviderAuthState, type ProviderBackupState, SLIDER_CONFIG, 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 StoredUserPreference, UserPreference as StoredUserPreferenceModel, type UpdateMemoryOptions, type UpdateModelPreferenceOptions, type UpdateUserPreferenceOptions, 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, clearAllEncryptionKeys, clearAllKeyPairs, clearCalendarToken, clearDriveToken, clearToken as clearDropboxToken, clearEncryptionKey, clearGoogleDriveToken, clearICloudAuth, clearKeyPair, createMemoryContextSystemMessage, decryptData, decryptDataBytes, encryptData, exportPublicKey, extractConversationContext, formatMemoriesForChat, generateCompositeKey, generateConversationId, generateUniqueKey, getAndClearCalendarPendingMessage, getAndClearCalendarReturnUrl, getAndClearDrivePendingMessage, getAndClearDriveReturnUrl, getCalendarAccessToken, getDriveAccessToken, getGoogleDriveStoredToken, getValidCalendarToken, getValidDriveToken, handleCalendarCallback, handleDriveCallback, hasCalendarCredentials, hasDriveCredentials, hasDropboxCredentials, hasEncryptionKey, hasGoogleDriveCredentials, hasICloudCredentials, hasKeyPair, isCalendarCallback, isDriveCallback, memoryStorageSchema, refreshCalendarToken, refreshDriveToken, requestEncryptionKey, requestKeyPair, revokeCalendarToken, revokeDriveToken, sdkMigrations, sdkModelClasses, sdkSchema, settingsStorageSchema, startCalendarAuth, startDriveAuth, storeCalendarPendingMessage, storeCalendarReturnUrl, storeCalendarToken, storeDrivePendingMessage, storeDriveReturnUrl, storeDriveToken, useBackup, useBackupAuth, useChat, useChatStorage, useDropboxAuth, useDropboxBackup, useEncryption, useGoogleDriveAuth, useGoogleDriveBackup, useICloudAuth, useICloudBackup, useImageGeneration, useMemoryStorage, useModels, useOCR, usePdf, useSearch, useSettings, userPreferencesStorageSchema };
|
|
3745
|
+
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 CreateConversationOptions, type CreateMemoryOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateUserPreferenceOptions, 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_PERSONALITY_SETTINGS, type DropboxAuthContextValue, DropboxAuthProvider, type DropboxAuthProviderProps, type DropboxExportResult, type DropboxImportResult, type EmbeddedWalletSignerFn, 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 PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type ProfileUpdate, type ProgressCallback, type ProviderAuthState, type ProviderBackupState, SLIDER_CONFIG, 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 StoredUserPreference, UserPreference as StoredUserPreferenceModel, type UpdateMemoryOptions, type UpdateModelPreferenceOptions, type UpdateUserPreferenceOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseDropboxBackupOptions, type UseDropboxBackupResult, type UseEncryptionResult, type UseGoogleDriveBackupOptions, type UseGoogleDriveBackupResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseImageGenerationResult, type UseMemoryStorageOptions, type UseMemoryStorageResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UseSearchResult, type UseSettingsOptions, type UseSettingsResult, chatStorageMigrations, chatStorageSchema, clearAllEncryptionKeys, clearAllKeyPairs, clearCalendarToken, clearDriveToken, clearToken as clearDropboxToken, clearEncryptionKey, clearGoogleDriveToken, clearICloudAuth, clearKeyPair, createMemoryContextSystemMessage, decryptData, decryptDataBytes, encryptData, exportPublicKey, extractConversationContext, formatMemoriesForChat, generateCompositeKey, generateConversationId, generateUniqueKey, getAndClearCalendarPendingMessage, getAndClearCalendarReturnUrl, getAndClearDrivePendingMessage, getAndClearDriveReturnUrl, getCalendarAccessToken, getDriveAccessToken, getGoogleDriveStoredToken, getValidCalendarToken, getValidDriveToken, handleCalendarCallback, handleDriveCallback, hasCalendarCredentials, hasDriveCredentials, hasDropboxCredentials, hasEncryptionKey, hasGoogleDriveCredentials, hasICloudCredentials, hasKeyPair, isCalendarCallback, isDriveCallback, memoryStorageSchema, refreshCalendarToken, refreshDriveToken, requestEncryptionKey, requestKeyPair, revokeCalendarToken, revokeDriveToken, sdkMigrations, sdkModelClasses, sdkSchema, settingsStorageSchema, startCalendarAuth, startDriveAuth, storeCalendarPendingMessage, storeCalendarReturnUrl, storeCalendarToken, storeDrivePendingMessage, storeDriveReturnUrl, storeDriveToken, useBackup, useBackupAuth, useChat, useChatStorage, useDropboxAuth, useDropboxBackup, useEncryption, useGoogleDriveAuth, useGoogleDriveBackup, useICloudAuth, useICloudBackup, useImageGeneration, useMemoryStorage, useModels, useOCR, usePdf, useSearch, useSettings, userPreferencesStorageSchema };
|