@cmdoss/memwal-sdk 0.6.2 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/ARCHITECTURE.md +547 -547
  2. package/BENCHMARKS.md +238 -238
  3. package/README.md +310 -181
  4. package/dist/ai-sdk/tools.d.ts +2 -2
  5. package/dist/ai-sdk/tools.js +2 -2
  6. package/dist/client/ClientMemoryManager.js +2 -2
  7. package/dist/client/ClientMemoryManager.js.map +1 -1
  8. package/dist/client/PersonalDataWallet.d.ts.map +1 -1
  9. package/dist/client/SimplePDWClient.d.ts +29 -1
  10. package/dist/client/SimplePDWClient.d.ts.map +1 -1
  11. package/dist/client/SimplePDWClient.js +45 -13
  12. package/dist/client/SimplePDWClient.js.map +1 -1
  13. package/dist/client/namespaces/EmbeddingsNamespace.d.ts +1 -1
  14. package/dist/client/namespaces/EmbeddingsNamespace.js +1 -1
  15. package/dist/client/namespaces/MemoryNamespace.d.ts +31 -0
  16. package/dist/client/namespaces/MemoryNamespace.d.ts.map +1 -1
  17. package/dist/client/namespaces/MemoryNamespace.js +272 -39
  18. package/dist/client/namespaces/MemoryNamespace.js.map +1 -1
  19. package/dist/client/namespaces/consolidated/AINamespace.d.ts +2 -2
  20. package/dist/client/namespaces/consolidated/AINamespace.js +2 -2
  21. package/dist/client/namespaces/consolidated/BlockchainNamespace.d.ts +12 -2
  22. package/dist/client/namespaces/consolidated/BlockchainNamespace.d.ts.map +1 -1
  23. package/dist/client/namespaces/consolidated/BlockchainNamespace.js +62 -4
  24. package/dist/client/namespaces/consolidated/BlockchainNamespace.js.map +1 -1
  25. package/dist/client/namespaces/consolidated/StorageNamespace.d.ts +67 -2
  26. package/dist/client/namespaces/consolidated/StorageNamespace.d.ts.map +1 -1
  27. package/dist/client/namespaces/consolidated/StorageNamespace.js +549 -16
  28. package/dist/client/namespaces/consolidated/StorageNamespace.js.map +1 -1
  29. package/dist/config/ConfigurationHelper.js +61 -61
  30. package/dist/config/defaults.js +2 -2
  31. package/dist/config/defaults.js.map +1 -1
  32. package/dist/graph/GraphService.js +21 -21
  33. package/dist/graph/GraphService.js.map +1 -1
  34. package/dist/index.d.ts +3 -1
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +3 -1
  37. package/dist/index.js.map +1 -1
  38. package/dist/infrastructure/seal/EncryptionService.d.ts +9 -5
  39. package/dist/infrastructure/seal/EncryptionService.d.ts.map +1 -1
  40. package/dist/infrastructure/seal/EncryptionService.js +37 -15
  41. package/dist/infrastructure/seal/EncryptionService.js.map +1 -1
  42. package/dist/infrastructure/seal/SealService.d.ts +13 -5
  43. package/dist/infrastructure/seal/SealService.d.ts.map +1 -1
  44. package/dist/infrastructure/seal/SealService.js +36 -34
  45. package/dist/infrastructure/seal/SealService.js.map +1 -1
  46. package/dist/langchain/createPDWRAG.js +30 -30
  47. package/dist/retrieval/MemoryDecryptionPipeline.d.ts.map +1 -1
  48. package/dist/retrieval/MemoryDecryptionPipeline.js +2 -1
  49. package/dist/retrieval/MemoryDecryptionPipeline.js.map +1 -1
  50. package/dist/retrieval/MemoryRetrievalService.d.ts +31 -0
  51. package/dist/retrieval/MemoryRetrievalService.d.ts.map +1 -1
  52. package/dist/retrieval/MemoryRetrievalService.js +44 -4
  53. package/dist/retrieval/MemoryRetrievalService.js.map +1 -1
  54. package/dist/services/CapabilityService.d.ts.map +1 -1
  55. package/dist/services/CapabilityService.js +30 -14
  56. package/dist/services/CapabilityService.js.map +1 -1
  57. package/dist/services/CrossContextPermissionService.d.ts.map +1 -1
  58. package/dist/services/CrossContextPermissionService.js +9 -7
  59. package/dist/services/CrossContextPermissionService.js.map +1 -1
  60. package/dist/services/EmbeddingService.d.ts +28 -1
  61. package/dist/services/EmbeddingService.d.ts.map +1 -1
  62. package/dist/services/EmbeddingService.js +54 -0
  63. package/dist/services/EmbeddingService.js.map +1 -1
  64. package/dist/services/EncryptionService.d.ts.map +1 -1
  65. package/dist/services/EncryptionService.js +6 -5
  66. package/dist/services/EncryptionService.js.map +1 -1
  67. package/dist/services/GeminiAIService.js +309 -309
  68. package/dist/services/IndexManager.d.ts +5 -1
  69. package/dist/services/IndexManager.d.ts.map +1 -1
  70. package/dist/services/IndexManager.js +17 -40
  71. package/dist/services/IndexManager.js.map +1 -1
  72. package/dist/services/QueryService.js +1 -1
  73. package/dist/services/QueryService.js.map +1 -1
  74. package/dist/services/StorageService.d.ts +11 -0
  75. package/dist/services/StorageService.d.ts.map +1 -1
  76. package/dist/services/StorageService.js +73 -10
  77. package/dist/services/StorageService.js.map +1 -1
  78. package/dist/services/TransactionService.d.ts +20 -0
  79. package/dist/services/TransactionService.d.ts.map +1 -1
  80. package/dist/services/TransactionService.js +43 -0
  81. package/dist/services/TransactionService.js.map +1 -1
  82. package/dist/services/ViewService.js +2 -2
  83. package/dist/services/ViewService.js.map +1 -1
  84. package/dist/services/storage/QuiltBatchManager.d.ts +101 -1
  85. package/dist/services/storage/QuiltBatchManager.d.ts.map +1 -1
  86. package/dist/services/storage/QuiltBatchManager.js +410 -20
  87. package/dist/services/storage/QuiltBatchManager.js.map +1 -1
  88. package/dist/services/storage/index.d.ts +1 -1
  89. package/dist/services/storage/index.d.ts.map +1 -1
  90. package/dist/services/storage/index.js.map +1 -1
  91. package/dist/utils/LRUCache.d.ts +106 -0
  92. package/dist/utils/LRUCache.d.ts.map +1 -0
  93. package/dist/utils/LRUCache.js +281 -0
  94. package/dist/utils/LRUCache.js.map +1 -0
  95. package/dist/utils/index.d.ts +1 -0
  96. package/dist/utils/index.d.ts.map +1 -1
  97. package/dist/utils/index.js +2 -0
  98. package/dist/utils/index.js.map +1 -1
  99. package/dist/utils/memoryIndexOnChain.d.ts +212 -0
  100. package/dist/utils/memoryIndexOnChain.d.ts.map +1 -0
  101. package/dist/utils/memoryIndexOnChain.js +312 -0
  102. package/dist/utils/memoryIndexOnChain.js.map +1 -0
  103. package/dist/utils/rebuildIndexNode.d.ts +29 -0
  104. package/dist/utils/rebuildIndexNode.d.ts.map +1 -1
  105. package/dist/utils/rebuildIndexNode.js +366 -98
  106. package/dist/utils/rebuildIndexNode.js.map +1 -1
  107. package/dist/vector/HnswWasmService.d.ts +20 -5
  108. package/dist/vector/HnswWasmService.d.ts.map +1 -1
  109. package/dist/vector/HnswWasmService.js +73 -40
  110. package/dist/vector/HnswWasmService.js.map +1 -1
  111. package/dist/vector/IHnswService.d.ts +10 -1
  112. package/dist/vector/IHnswService.d.ts.map +1 -1
  113. package/dist/vector/IHnswService.js.map +1 -1
  114. package/dist/vector/NodeHnswService.d.ts +16 -0
  115. package/dist/vector/NodeHnswService.d.ts.map +1 -1
  116. package/dist/vector/NodeHnswService.js +84 -5
  117. package/dist/vector/NodeHnswService.js.map +1 -1
  118. package/dist/vector/createHnswService.d.ts +1 -1
  119. package/dist/vector/createHnswService.js +1 -1
  120. package/dist/vector/index.d.ts +1 -1
  121. package/dist/vector/index.js +1 -1
  122. package/package.json +157 -157
  123. package/src/access/PermissionService.ts +635 -635
  124. package/src/aggregation/AggregationService.ts +389 -389
  125. package/src/ai-sdk/PDWVectorStore.ts +715 -715
  126. package/src/ai-sdk/index.ts +65 -65
  127. package/src/ai-sdk/tools.ts +460 -460
  128. package/src/ai-sdk/types.ts +404 -404
  129. package/src/batch/BatchManager.ts +597 -597
  130. package/src/batch/BatchingService.ts +429 -429
  131. package/src/batch/MemoryProcessingCache.ts +492 -492
  132. package/src/batch/index.ts +30 -30
  133. package/src/browser.ts +200 -200
  134. package/src/client/ClientMemoryManager.ts +987 -987
  135. package/src/client/PersonalDataWallet.ts +345 -345
  136. package/src/client/SimplePDWClient.ts +1289 -1222
  137. package/src/client/factory.ts +154 -154
  138. package/src/client/namespaces/AnalyticsNamespace.ts +377 -377
  139. package/src/client/namespaces/BatchNamespace.ts +356 -356
  140. package/src/client/namespaces/CacheNamespace.ts +123 -123
  141. package/src/client/namespaces/CapabilityNamespace.ts +217 -217
  142. package/src/client/namespaces/ClassifyNamespace.ts +169 -169
  143. package/src/client/namespaces/ContextNamespace.ts +297 -297
  144. package/src/client/namespaces/EmbeddingsNamespace.ts +99 -99
  145. package/src/client/namespaces/EncryptionNamespace.ts +221 -221
  146. package/src/client/namespaces/GraphNamespace.ts +468 -468
  147. package/src/client/namespaces/IndexNamespace.ts +361 -361
  148. package/src/client/namespaces/MemoryNamespace.ts +1422 -1135
  149. package/src/client/namespaces/PermissionsNamespace.ts +254 -254
  150. package/src/client/namespaces/PipelineNamespace.ts +220 -220
  151. package/src/client/namespaces/SearchNamespace.ts +1049 -1049
  152. package/src/client/namespaces/StorageNamespace.ts +458 -458
  153. package/src/client/namespaces/TxNamespace.ts +260 -260
  154. package/src/client/namespaces/WalletNamespace.ts +243 -243
  155. package/src/client/namespaces/consolidated/AINamespace.ts +449 -449
  156. package/src/client/namespaces/consolidated/BlockchainNamespace.ts +607 -546
  157. package/src/client/namespaces/consolidated/SecurityNamespace.ts +648 -648
  158. package/src/client/namespaces/consolidated/StorageNamespace.ts +1141 -497
  159. package/src/client/namespaces/consolidated/index.ts +39 -39
  160. package/src/client/signers/KeypairSigner.ts +108 -108
  161. package/src/client/signers/UnifiedSigner.ts +110 -110
  162. package/src/client/signers/WalletAdapterSigner.ts +159 -159
  163. package/src/client/signers/index.ts +26 -26
  164. package/src/config/ConfigurationHelper.ts +412 -412
  165. package/src/config/defaults.ts +51 -51
  166. package/src/config/index.ts +8 -8
  167. package/src/config/validation.ts +70 -70
  168. package/src/core/index.ts +14 -14
  169. package/src/core/interfaces/IService.ts +307 -307
  170. package/src/core/interfaces/index.ts +8 -8
  171. package/src/core/types/capability.ts +297 -297
  172. package/src/core/types/index.ts +870 -870
  173. package/src/core/types/wallet.ts +270 -270
  174. package/src/core/types.ts +9 -9
  175. package/src/core/wallet.ts +222 -222
  176. package/src/embedding/index.ts +19 -19
  177. package/src/embedding/types.ts +357 -357
  178. package/src/errors/index.ts +602 -602
  179. package/src/errors/recovery.ts +461 -461
  180. package/src/errors/validation.ts +567 -567
  181. package/src/generated/pdw/capability.ts +319 -319
  182. package/src/graph/GraphService.ts +887 -887
  183. package/src/graph/KnowledgeGraphManager.ts +728 -728
  184. package/src/graph/index.ts +25 -25
  185. package/src/index.ts +498 -474
  186. package/src/infrastructure/index.ts +22 -22
  187. package/src/infrastructure/seal/EncryptionService.ts +628 -603
  188. package/src/infrastructure/seal/SealService.ts +613 -615
  189. package/src/infrastructure/seal/index.ts +9 -9
  190. package/src/infrastructure/sui/BlockchainManager.ts +627 -627
  191. package/src/infrastructure/sui/SuiService.ts +888 -888
  192. package/src/infrastructure/sui/index.ts +9 -9
  193. package/src/infrastructure/walrus/StorageManager.ts +604 -604
  194. package/src/infrastructure/walrus/WalrusStorageService.ts +612 -612
  195. package/src/infrastructure/walrus/index.ts +9 -9
  196. package/src/langchain/PDWEmbeddings.ts +145 -145
  197. package/src/langchain/PDWVectorStore.ts +456 -456
  198. package/src/langchain/createPDWRAG.ts +303 -303
  199. package/src/langchain/index.ts +47 -47
  200. package/src/permissions/ConsentRepository.browser.ts +249 -249
  201. package/src/permissions/ConsentRepository.ts +364 -364
  202. package/src/pipeline/MemoryPipeline.ts +862 -862
  203. package/src/pipeline/PipelineManager.ts +683 -683
  204. package/src/pipeline/index.ts +26 -26
  205. package/src/retrieval/AdvancedSearchService.ts +629 -629
  206. package/src/retrieval/MemoryAnalyticsService.ts +711 -711
  207. package/src/retrieval/MemoryDecryptionPipeline.ts +825 -824
  208. package/src/retrieval/MemoryRetrievalService.ts +904 -830
  209. package/src/retrieval/index.ts +42 -42
  210. package/src/services/BatchService.ts +352 -352
  211. package/src/services/CapabilityService.ts +464 -448
  212. package/src/services/ClassifierService.ts +465 -465
  213. package/src/services/CrossContextPermissionService.ts +486 -484
  214. package/src/services/EmbeddingService.ts +771 -706
  215. package/src/services/EncryptionService.ts +712 -711
  216. package/src/services/GeminiAIService.ts +753 -753
  217. package/src/services/IndexManager.ts +977 -1004
  218. package/src/services/MemoryIndexService.ts +1003 -1003
  219. package/src/services/MemoryService.ts +369 -369
  220. package/src/services/QueryService.ts +890 -890
  221. package/src/services/StorageService.ts +1182 -1111
  222. package/src/services/TransactionService.ts +838 -790
  223. package/src/services/VectorService.ts +462 -462
  224. package/src/services/ViewService.ts +484 -484
  225. package/src/services/index.ts +25 -25
  226. package/src/services/storage/BlobAttributesManager.ts +333 -333
  227. package/src/services/storage/KnowledgeGraphManager.ts +425 -425
  228. package/src/services/storage/MemorySearchManager.ts +387 -387
  229. package/src/services/storage/QuiltBatchManager.ts +1130 -660
  230. package/src/services/storage/WalrusMetadataManager.ts +268 -268
  231. package/src/services/storage/WalrusStorageManager.ts +287 -287
  232. package/src/services/storage/index.ts +57 -52
  233. package/src/types/index.ts +13 -13
  234. package/src/utils/LRUCache.ts +378 -0
  235. package/src/utils/index.ts +76 -68
  236. package/src/utils/memoryIndexOnChain.ts +507 -0
  237. package/src/utils/rebuildIndex.ts +290 -290
  238. package/src/utils/rebuildIndexNode.ts +771 -424
  239. package/src/vector/BrowserHnswIndexService.ts +758 -758
  240. package/src/vector/HnswWasmService.ts +731 -679
  241. package/src/vector/IHnswService.ts +233 -224
  242. package/src/vector/NodeHnswService.ts +833 -735
  243. package/src/vector/VectorManager.ts +478 -478
  244. package/src/vector/createHnswService.ts +135 -135
  245. package/src/vector/index.ts +56 -56
  246. package/src/wallet/ContextWalletService.ts +656 -656
  247. package/src/wallet/MainWalletService.ts +317 -317
package/src/index.ts CHANGED
@@ -1,474 +1,498 @@
1
- /**
2
- * Personal Data Wallet SDK
3
- *
4
- * Comprehensive SDK for decentralized memory processing with AI-powered insights.
5
- *
6
- * Features:
7
- * - 🧠 Local AI embedding generation (Gemini API)
8
- * - 🔍 HNSW vector indexing with intelligent batching
9
- * - 📊 Knowledge graph extraction and management
10
- * - 🗄️ Walrus decentralized storage with encryption
11
- * - ⛓️ Sui blockchain ownership tracking
12
- * - 🔄 Unified processing pipeline with monitoring
13
- *
14
- * @version 1.0.0
15
- * @author Personal Data Wallet Team
16
- */
17
-
18
- // Core pipeline - the main entry point
19
- export { MemoryPipeline, PipelineManager } from './pipeline';
20
- export type {
21
- PipelineConfig,
22
- PipelineExecution,
23
- PipelineMetrics,
24
- PipelineManagerConfig,
25
- SystemMetrics
26
- } from './pipeline';
27
-
28
- // Import for internal use
29
- import { MemoryPipeline } from './pipeline/MemoryPipeline';
30
- import { PipelineManager } from './pipeline/PipelineManager';
31
- import type { PipelineConfig, PipelineManagerConfig } from './pipeline';
32
-
33
- // ==================== SERVICES ====================
34
- // Business logic services
35
- export { StorageService } from './services/StorageService';
36
- export { EmbeddingService } from './services/EmbeddingService';
37
- export { GeminiAIService } from './services/GeminiAIService';
38
- export { QueryService } from './services/QueryService';
39
- export { ClassifierService } from './services/ClassifierService';
40
- export { MemoryIndexService } from './services/MemoryIndexService';
41
- export { ViewService } from './services/ViewService';
42
- export { TransactionService } from './services/TransactionService';
43
- export { BatchService } from './services/BatchService';
44
- export { CrossContextPermissionService } from './services/CrossContextPermissionService';
45
- export { MemoryService } from './services/MemoryService';
46
- export { VectorService } from './services/VectorService';
47
- export { CapabilityService } from './services/CapabilityService';
48
- export { IndexManager } from './services/IndexManager';
49
- export type {
50
- IndexState,
51
- SerializedIndexPackage,
52
- IndexProgressCallback,
53
- IndexManagerOptions
54
- } from './services/IndexManager';
55
-
56
- // ==================== INFRASTRUCTURE ====================
57
- // External integrations (use these instead of old paths)
58
- export { WalrusStorageService, StorageManager } from './infrastructure/walrus';
59
- export { SuiService, BlockchainManager } from './infrastructure/sui';
60
- export { SealService } from './infrastructure/seal';
61
- export { EncryptionService } from './infrastructure/seal';
62
-
63
- // ==================== CORE ====================
64
- // Core interfaces and base classes
65
- export * from './core/interfaces';
66
-
67
- // ==================== UTILITIES ====================
68
- // Vector indexing and batch processing
69
- export { VectorManager, createHnswService, isBrowser, isNode } from './vector';
70
- export type { IHnswService, IHnswSearchResultItem, IHnswSearchOptions, IHnswBatchStats } from './vector';
71
- export { BrowserHnswIndexService } from './vector/BrowserHnswIndexService';
72
- export { BatchManager, BatchingService, MemoryProcessingCache } from './batch';
73
- export { GraphService, KnowledgeGraphManager } from './graph';
74
-
75
- // Memory retrieval, analytics, and decryption
76
- export { MemoryRetrievalService, MemoryDecryptionPipeline } from './retrieval';
77
- export type {
78
- UnifiedMemoryQuery,
79
- UnifiedMemoryResult,
80
- RetrievalStats,
81
- RetrievalContext,
82
- KeyServerConfig,
83
- DecryptionConfig,
84
- DecryptionRequest,
85
- DecryptionResult,
86
- BatchDecryptionResult
87
- } from './retrieval';
88
-
89
- // Configuration management
90
- import { Config as ConfigClass } from './config';
91
- export { ConfigurationHelper, Config } from './config';
92
- export type { SDKConfig, EnvironmentConfig } from './config';
93
-
94
- // Internal Config reference for use in this file
95
- const Config = ConfigClass;
96
-
97
- // Type exports for all modules
98
- export type {
99
- Memory,
100
- ProcessedMemory,
101
- EmbeddingResult,
102
- EmbeddingConfig
103
- } from './embedding/types';
104
-
105
- export type {
106
- VectorSearchResult,
107
- HNSWIndexConfig
108
- } from './vector';
109
-
110
- export type {
111
- CacheConfig,
112
- CacheMetrics
113
- } from './batch';
114
-
115
- export type {
116
- Entity,
117
- Relationship,
118
- KnowledgeGraph
119
- } from './graph';
120
-
121
- // Infrastructure types - Walrus
122
- export type {
123
- WalrusUploadResult,
124
- WalrusRetrievalResult,
125
- MemoryMetadata
126
- } from './infrastructure/walrus/WalrusStorageService';
127
-
128
- export type {
129
- StorageResult
130
- } from './infrastructure/walrus/StorageManager';
131
-
132
- // Infrastructure types - Sui
133
- export type {
134
- MemoryRecord,
135
- TransactionResult
136
- } from './infrastructure/sui/SuiService';
137
-
138
- export type {
139
- OwnershipVerification,
140
- BlockchainStats
141
- } from './infrastructure/sui/BlockchainManager';
142
-
143
- // Utility exports - using imported classes above
144
-
145
- /**
146
- * SDK Version Information
147
- */
148
- export const SDK_VERSION = '1.0.0';
149
- export const SDK_NAME = 'Personal Data Wallet SDK';
150
-
151
- /**
152
- * Quick start configuration presets
153
- */
154
- export const QuickStartConfigs = {
155
- /**
156
- * Basic configuration for simple memory processing
157
- */
158
- BASIC: {
159
- embedding: {
160
- enableBatching: true,
161
- batchSize: 10
162
- },
163
- storage: {
164
- enableEncryption: false,
165
- enableBatching: false
166
- },
167
- blockchain: {
168
- enableOwnershipTracking: false
169
- }
170
- } as PipelineConfig,
171
-
172
- /**
173
- * Full decentralized configuration with all features
174
- */
175
- DECENTRALIZED: {
176
- embedding: {
177
- enableBatching: true,
178
- batchSize: 20
179
- },
180
- vector: {
181
- enablePersistence: true,
182
- maxElements: 10000
183
- },
184
- graph: {
185
- enableExtraction: true,
186
- confidenceThreshold: 0.7
187
- },
188
- storage: {
189
- enableEncryption: true,
190
- enableBatching: true,
191
- network: 'testnet'
192
- },
193
- blockchain: {
194
- enableOwnershipTracking: true,
195
- enableBatching: true,
196
- network: 'testnet'
197
- },
198
- enableRollback: true,
199
- enableMonitoring: true
200
- } as PipelineConfig,
201
-
202
- /**
203
- * High-performance configuration optimized for throughput
204
- */
205
- HIGH_PERFORMANCE: {
206
- embedding: {
207
- enableBatching: true,
208
- batchSize: 50
209
- },
210
- batch: {
211
- enableBatching: true,
212
- batchSize: 100,
213
- batchDelayMs: 2000
214
- },
215
- vector: {
216
- maxElements: 50000,
217
- enablePersistence: true
218
- },
219
- graph: {
220
- enableExtraction: false // Disable for performance
221
- },
222
- storage: {
223
- enableBatching: true,
224
- enableEncryption: false // Disable for performance
225
- },
226
- blockchain: {
227
- enableBatching: true,
228
- enableOwnershipTracking: true
229
- },
230
- skipFailedSteps: true,
231
- maxRetryAttempts: 1,
232
- enableMonitoring: true
233
- } as PipelineConfig,
234
-
235
- /**
236
- * Development configuration with enhanced debugging
237
- */
238
- DEVELOPMENT: {
239
- embedding: {
240
- enableBatching: false // Process individually for debugging
241
- },
242
- vector: {
243
- maxElements: 1000
244
- },
245
- graph: {
246
- enableExtraction: true,
247
- confidenceThreshold: 0.5 // Lower threshold for testing
248
- },
249
- storage: {
250
- enableEncryption: false,
251
- enableBatching: false
252
- },
253
- blockchain: {
254
- enableOwnershipTracking: false, // Skip for dev
255
- enableBatching: false
256
- },
257
- enableRollback: true,
258
- enableMonitoring: true,
259
- skipFailedSteps: false,
260
- maxRetryAttempts: 0 // Fail fast for debugging
261
- } as PipelineConfig
262
- };
263
-
264
- /**
265
- * Create a pre-configured pipeline with quick start settings
266
- */
267
- export function createQuickStartPipeline(
268
- preset: keyof typeof QuickStartConfigs,
269
- overrides: Partial<PipelineConfig> = {}
270
- ): MemoryPipeline {
271
- const baseConfig = QuickStartConfigs[preset];
272
- const mergedConfig = { ...baseConfig, ...overrides };
273
-
274
- // Auto-configure API key if not provided
275
- if (!mergedConfig.embedding?.apiKey) {
276
- try {
277
- // Config is already imported at top of file
278
- const apiKey = Config.getGeminiKey();
279
- mergedConfig.embedding = {
280
- ...mergedConfig.embedding,
281
- apiKey
282
- };
283
- console.log('✅ Auto-configured Gemini API key from environment');
284
- } catch (error) {
285
- console.warn('⚠️ No Gemini API key found. Please provide one for AI features to work.');
286
- }
287
- }
288
-
289
- return new MemoryPipeline(mergedConfig);
290
- }
291
-
292
- /**
293
- * Create a pipeline manager with recommended settings
294
- */
295
- export function createPipelineManager(
296
- config: Partial<PipelineManagerConfig> = {}
297
- ): PipelineManager {
298
- const defaultConfig: PipelineManagerConfig = {
299
- maxConcurrentPipelines: 5,
300
- enableScheduling: true,
301
- enableHealthChecks: true,
302
- enableMetricsCollection: true,
303
- defaultPipelineConfig: QuickStartConfigs.BASIC
304
- };
305
-
306
- const mergedConfig = { ...defaultConfig, ...config };
307
- return new PipelineManager(mergedConfig);
308
- }
309
-
310
- /**
311
- * SDK Information and utilities
312
- */
313
- export const SDK = {
314
- version: SDK_VERSION,
315
- name: SDK_NAME,
316
-
317
- /**
318
- * Get SDK build information
319
- */
320
- getBuildInfo(): {
321
- version: string;
322
- name: string;
323
- buildDate: string;
324
- features: string[];
325
- } {
326
- return {
327
- version: SDK_VERSION,
328
- name: SDK_NAME,
329
- buildDate: new Date().toISOString(),
330
- features: [
331
- 'AI Embedding Generation',
332
- 'HNSW Vector Indexing',
333
- 'Knowledge Graph Extraction',
334
- 'Walrus Decentralized Storage',
335
- 'Sui Blockchain Integration',
336
- 'Unified Processing Pipeline',
337
- 'Batch Processing & Caching',
338
- 'Comprehensive Monitoring'
339
- ]
340
- };
341
- },
342
-
343
- /**
344
- * Validate configuration
345
- */
346
- validateConfig(config: PipelineConfig): {
347
- isValid: boolean;
348
- errors: string[];
349
- warnings: string[];
350
- } {
351
- const errors: string[] = [];
352
- const warnings: string[] = [];
353
-
354
- // Validate embedding config
355
- if (config.embedding?.batchSize && config.embedding.batchSize > 100) {
356
- warnings.push('Large embedding batch size may cause memory issues');
357
- }
358
-
359
- // Validate vector config
360
- if (config.vector?.maxElements && config.vector.maxElements > 100000) {
361
- warnings.push('Large vector index may impact performance');
362
- }
363
-
364
- // Validate network consistency
365
- if (config.storage?.network !== config.blockchain?.network) {
366
- warnings.push('Storage and blockchain networks should match');
367
- }
368
-
369
- return {
370
- isValid: errors.length === 0,
371
- errors,
372
- warnings
373
- };
374
- }
375
- };
376
-
377
- // Default export for convenience
378
- export default {
379
- MemoryPipeline,
380
- PipelineManager,
381
- createQuickStartPipeline,
382
- createPipelineManager,
383
- QuickStartConfigs,
384
- SDK
385
- };
386
-
387
- // Client-side memory management for React dApps
388
- export { ClientMemoryManager } from './client/ClientMemoryManager';
389
- export { PersonalDataWallet } from './client/PersonalDataWallet';
390
- export { SimplePDWClient } from './client/SimplePDWClient';
391
- export type { SimplePDWConfig, ServiceContainer } from './client/SimplePDWClient';
392
-
393
- // Signer abstractions for different environments
394
- export {
395
- KeypairSigner,
396
- WalletAdapterSigner,
397
- DappKitSigner
398
- } from './client/signers';
399
- export type {
400
- UnifiedSigner,
401
- SignAndExecuteResult,
402
- SignPersonalMessageResult,
403
- WalletAdapter,
404
- DappKitSignerConfig,
405
- DappKitSignAndExecuteFn,
406
- DappKitSignPersonalMessageFn
407
- } from './client/signers';
408
- export type {
409
- ClientMemoryManagerConfig,
410
- CreateMemoryOptions as ClientCreateMemoryOptions,
411
- RetrieveMemoryOptions as ClientRetrieveMemoryOptions,
412
- BatchRetrieveMemoriesOptions as ClientBatchRetrieveMemoriesOptions,
413
- BatchRetrieveResult as ClientBatchRetrieveResult,
414
- ClientMemoryMetadata
415
- } from './client/ClientMemoryManager';
416
-
417
- // Wallet architecture components
418
- /** @deprecated Use CapabilityService instead */
419
- export { MainWalletService } from './wallet/MainWalletService';
420
- /** @deprecated Use ContextNamespace instead */
421
- export { ContextWalletService } from './wallet/ContextWalletService';
422
- export { PermissionService } from './access/PermissionService';
423
- export type { ConsentRepository } from './permissions/ConsentRepository';
424
- export { FileSystemConsentRepository, InMemoryConsentRepository } from './permissions/ConsentRepository';
425
- export { AggregationService } from './aggregation/AggregationService';
426
- export type {
427
- MainWallet,
428
- ContextWallet,
429
- ConsentRequest,
430
- ConsentRequestRecord,
431
- ConsentStatus,
432
- AccessGrant,
433
- CreateMainWalletOptions,
434
- CreateContextWalletOptions,
435
- DeriveContextIdOptions,
436
- RotateKeysOptions,
437
- RotateKeysResult,
438
- PermissionScope,
439
- RequestConsentOptions,
440
- GrantPermissionsOptions,
441
- RevokePermissionsOptions,
442
- AggregatedQueryOptions,
443
- PermissionScopes
444
- } from './core/types/wallet';
445
-
446
- // Legacy version for compatibility
447
- export const VERSION = '1.0.0';
448
-
449
- // Rebuild utility (Browser)
450
- export { rebuildIndex, hasExistingIndex, clearIndex } from './utils/rebuildIndex';
451
- export type { RebuildIndexOptions, RebuildIndexResult } from './utils/rebuildIndex';
452
-
453
- // Rebuild utility (Node.js)
454
- export { rebuildIndexNode, hasExistingIndexNode, clearIndexNode } from './utils/rebuildIndexNode';
455
- export type { RebuildIndexNodeOptions, RebuildIndexNodeResult } from './utils/rebuildIndexNode';
456
-
457
- // ==================== AI SDK INTEGRATION ====================
458
- // AI SDK tools and vector store for Vercel AI SDK integration
459
- export { pdwTools } from './ai-sdk/tools';
460
- export type { PDWToolsConfig, PDWToolResult } from './ai-sdk/tools';
461
- export { PDWVectorStore as AIPDWVectorStore } from './ai-sdk/PDWVectorStore';
462
- export type {
463
- PDWVectorStoreConfig as AIPDWVectorStoreConfig,
464
- AddVectorParams,
465
- SearchParams as AISearchParams,
466
- SearchResult as AISearchResult
467
- } from './ai-sdk/types';
468
-
469
- // ==================== LANGCHAIN INTEGRATION ====================
470
- // LangChain adapters for RAG workflows with decentralized storage
471
- export { PDWEmbeddings } from './langchain/PDWEmbeddings';
472
- export type { PDWEmbeddingsParams } from './langchain/PDWEmbeddings';
473
- export { PDWVectorStore } from './langchain/PDWVectorStore';
474
- export type { PDWVectorStoreConfig, PDWAddDocumentOptions } from './langchain/PDWVectorStore';
1
+ /**
2
+ * Personal Data Wallet SDK
3
+ *
4
+ * Comprehensive SDK for decentralized memory processing with AI-powered insights.
5
+ *
6
+ * Features:
7
+ * - 🧠 Local AI embedding generation (Gemini API)
8
+ * - 🔍 HNSW vector indexing with intelligent batching
9
+ * - 📊 Knowledge graph extraction and management
10
+ * - 🗄️ Walrus decentralized storage with encryption
11
+ * - ⛓️ Sui blockchain ownership tracking
12
+ * - 🔄 Unified processing pipeline with monitoring
13
+ *
14
+ * @version 1.0.0
15
+ * @author Personal Data Wallet Team
16
+ */
17
+
18
+ // Core pipeline - the main entry point
19
+ export { MemoryPipeline, PipelineManager } from './pipeline';
20
+ export type {
21
+ PipelineConfig,
22
+ PipelineExecution,
23
+ PipelineMetrics,
24
+ PipelineManagerConfig,
25
+ SystemMetrics
26
+ } from './pipeline';
27
+
28
+ // Import for internal use
29
+ import { MemoryPipeline } from './pipeline/MemoryPipeline';
30
+ import { PipelineManager } from './pipeline/PipelineManager';
31
+ import type { PipelineConfig, PipelineManagerConfig } from './pipeline';
32
+
33
+ // ==================== SERVICES ====================
34
+ // Business logic services
35
+ export { StorageService } from './services/StorageService';
36
+ export {
37
+ EmbeddingService,
38
+ getSharedEmbeddingService,
39
+ clearSharedEmbeddingServices,
40
+ getSharedEmbeddingStats,
41
+ } from './services/EmbeddingService';
42
+ export { GeminiAIService } from './services/GeminiAIService';
43
+ export { QueryService } from './services/QueryService';
44
+ export { ClassifierService } from './services/ClassifierService';
45
+ export { MemoryIndexService } from './services/MemoryIndexService';
46
+ export { ViewService } from './services/ViewService';
47
+ export { TransactionService } from './services/TransactionService';
48
+ export { BatchService } from './services/BatchService';
49
+ export { CrossContextPermissionService } from './services/CrossContextPermissionService';
50
+ export { MemoryService } from './services/MemoryService';
51
+ export { VectorService } from './services/VectorService';
52
+ export { CapabilityService } from './services/CapabilityService';
53
+ export { IndexManager } from './services/IndexManager';
54
+ export type {
55
+ IndexState,
56
+ SerializedIndexPackage,
57
+ IndexProgressCallback,
58
+ IndexManagerOptions
59
+ } from './services/IndexManager';
60
+
61
+ // ==================== INFRASTRUCTURE ====================
62
+ // External integrations (use these instead of old paths)
63
+ export { WalrusStorageService, StorageManager } from './infrastructure/walrus';
64
+ export { SuiService, BlockchainManager } from './infrastructure/sui';
65
+ export { SealService } from './infrastructure/seal';
66
+ export { EncryptionService } from './infrastructure/seal';
67
+
68
+ // ==================== CORE ====================
69
+ // Core interfaces and base classes
70
+ export * from './core/interfaces';
71
+
72
+ // ==================== UTILITIES ====================
73
+ // Vector indexing and batch processing
74
+ export { VectorManager, createHnswService, isBrowser, isNode } from './vector';
75
+ export type { IHnswService, IHnswSearchResultItem, IHnswSearchOptions, IHnswBatchStats } from './vector';
76
+ export { BrowserHnswIndexService } from './vector/BrowserHnswIndexService';
77
+ export { BatchManager, BatchingService, MemoryProcessingCache } from './batch';
78
+ export { GraphService, KnowledgeGraphManager } from './graph';
79
+
80
+ // Memory retrieval, analytics, and decryption
81
+ export { MemoryRetrievalService, MemoryDecryptionPipeline } from './retrieval';
82
+ export type {
83
+ UnifiedMemoryQuery,
84
+ UnifiedMemoryResult,
85
+ RetrievalStats,
86
+ RetrievalContext,
87
+ KeyServerConfig,
88
+ DecryptionConfig,
89
+ DecryptionRequest,
90
+ DecryptionResult,
91
+ BatchDecryptionResult
92
+ } from './retrieval';
93
+
94
+ // Configuration management
95
+ import { Config as ConfigClass } from './config';
96
+ export { ConfigurationHelper, Config } from './config';
97
+ export type { SDKConfig, EnvironmentConfig } from './config';
98
+
99
+ // Internal Config reference for use in this file
100
+ const Config = ConfigClass;
101
+
102
+ // Type exports for all modules
103
+ export type {
104
+ Memory,
105
+ ProcessedMemory,
106
+ EmbeddingResult,
107
+ EmbeddingConfig
108
+ } from './embedding/types';
109
+
110
+ export type {
111
+ VectorSearchResult,
112
+ HNSWIndexConfig
113
+ } from './vector';
114
+
115
+ export type {
116
+ CacheConfig,
117
+ CacheMetrics
118
+ } from './batch';
119
+
120
+ export type {
121
+ Entity,
122
+ Relationship,
123
+ KnowledgeGraph
124
+ } from './graph';
125
+
126
+ // Infrastructure types - Walrus
127
+ export type {
128
+ WalrusUploadResult,
129
+ WalrusRetrievalResult,
130
+ MemoryMetadata
131
+ } from './infrastructure/walrus/WalrusStorageService';
132
+
133
+ export type {
134
+ StorageResult
135
+ } from './infrastructure/walrus/StorageManager';
136
+
137
+ // Infrastructure types - Sui
138
+ export type {
139
+ MemoryRecord,
140
+ TransactionResult
141
+ } from './infrastructure/sui/SuiService';
142
+
143
+ export type {
144
+ OwnershipVerification,
145
+ BlockchainStats
146
+ } from './infrastructure/sui/BlockchainManager';
147
+
148
+ // Utility exports - using imported classes above
149
+
150
+ /**
151
+ * SDK Version Information
152
+ */
153
+ export const SDK_VERSION = '1.0.0';
154
+ export const SDK_NAME = 'Personal Data Wallet SDK';
155
+
156
+ /**
157
+ * Quick start configuration presets
158
+ */
159
+ export const QuickStartConfigs = {
160
+ /**
161
+ * Basic configuration for simple memory processing
162
+ */
163
+ BASIC: {
164
+ embedding: {
165
+ enableBatching: true,
166
+ batchSize: 10
167
+ },
168
+ storage: {
169
+ enableEncryption: false,
170
+ enableBatching: false
171
+ },
172
+ blockchain: {
173
+ enableOwnershipTracking: false
174
+ }
175
+ } as PipelineConfig,
176
+
177
+ /**
178
+ * Full decentralized configuration with all features
179
+ */
180
+ DECENTRALIZED: {
181
+ embedding: {
182
+ enableBatching: true,
183
+ batchSize: 20
184
+ },
185
+ vector: {
186
+ enablePersistence: true,
187
+ maxElements: 10000
188
+ },
189
+ graph: {
190
+ enableExtraction: true,
191
+ confidenceThreshold: 0.7
192
+ },
193
+ storage: {
194
+ enableEncryption: true,
195
+ enableBatching: true,
196
+ network: 'testnet'
197
+ },
198
+ blockchain: {
199
+ enableOwnershipTracking: true,
200
+ enableBatching: true,
201
+ network: 'testnet'
202
+ },
203
+ enableRollback: true,
204
+ enableMonitoring: true
205
+ } as PipelineConfig,
206
+
207
+ /**
208
+ * High-performance configuration optimized for throughput
209
+ */
210
+ HIGH_PERFORMANCE: {
211
+ embedding: {
212
+ enableBatching: true,
213
+ batchSize: 50
214
+ },
215
+ batch: {
216
+ enableBatching: true,
217
+ batchSize: 100,
218
+ batchDelayMs: 2000
219
+ },
220
+ vector: {
221
+ maxElements: 50000,
222
+ enablePersistence: true
223
+ },
224
+ graph: {
225
+ enableExtraction: false // Disable for performance
226
+ },
227
+ storage: {
228
+ enableBatching: true,
229
+ enableEncryption: false // Disable for performance
230
+ },
231
+ blockchain: {
232
+ enableBatching: true,
233
+ enableOwnershipTracking: true
234
+ },
235
+ skipFailedSteps: true,
236
+ maxRetryAttempts: 1,
237
+ enableMonitoring: true
238
+ } as PipelineConfig,
239
+
240
+ /**
241
+ * Development configuration with enhanced debugging
242
+ */
243
+ DEVELOPMENT: {
244
+ embedding: {
245
+ enableBatching: false // Process individually for debugging
246
+ },
247
+ vector: {
248
+ maxElements: 1000
249
+ },
250
+ graph: {
251
+ enableExtraction: true,
252
+ confidenceThreshold: 0.5 // Lower threshold for testing
253
+ },
254
+ storage: {
255
+ enableEncryption: false,
256
+ enableBatching: false
257
+ },
258
+ blockchain: {
259
+ enableOwnershipTracking: false, // Skip for dev
260
+ enableBatching: false
261
+ },
262
+ enableRollback: true,
263
+ enableMonitoring: true,
264
+ skipFailedSteps: false,
265
+ maxRetryAttempts: 0 // Fail fast for debugging
266
+ } as PipelineConfig
267
+ };
268
+
269
+ /**
270
+ * Create a pre-configured pipeline with quick start settings
271
+ */
272
+ export function createQuickStartPipeline(
273
+ preset: keyof typeof QuickStartConfigs,
274
+ overrides: Partial<PipelineConfig> = {}
275
+ ): MemoryPipeline {
276
+ const baseConfig = QuickStartConfigs[preset];
277
+ const mergedConfig = { ...baseConfig, ...overrides };
278
+
279
+ // Auto-configure API key if not provided
280
+ if (!mergedConfig.embedding?.apiKey) {
281
+ try {
282
+ // Config is already imported at top of file
283
+ const apiKey = Config.getGeminiKey();
284
+ mergedConfig.embedding = {
285
+ ...mergedConfig.embedding,
286
+ apiKey
287
+ };
288
+ console.log('✅ Auto-configured Gemini API key from environment');
289
+ } catch (error) {
290
+ console.warn('⚠️ No Gemini API key found. Please provide one for AI features to work.');
291
+ }
292
+ }
293
+
294
+ return new MemoryPipeline(mergedConfig);
295
+ }
296
+
297
+ /**
298
+ * Create a pipeline manager with recommended settings
299
+ */
300
+ export function createPipelineManager(
301
+ config: Partial<PipelineManagerConfig> = {}
302
+ ): PipelineManager {
303
+ const defaultConfig: PipelineManagerConfig = {
304
+ maxConcurrentPipelines: 5,
305
+ enableScheduling: true,
306
+ enableHealthChecks: true,
307
+ enableMetricsCollection: true,
308
+ defaultPipelineConfig: QuickStartConfigs.BASIC
309
+ };
310
+
311
+ const mergedConfig = { ...defaultConfig, ...config };
312
+ return new PipelineManager(mergedConfig);
313
+ }
314
+
315
+ /**
316
+ * SDK Information and utilities
317
+ */
318
+ export const SDK = {
319
+ version: SDK_VERSION,
320
+ name: SDK_NAME,
321
+
322
+ /**
323
+ * Get SDK build information
324
+ */
325
+ getBuildInfo(): {
326
+ version: string;
327
+ name: string;
328
+ buildDate: string;
329
+ features: string[];
330
+ } {
331
+ return {
332
+ version: SDK_VERSION,
333
+ name: SDK_NAME,
334
+ buildDate: new Date().toISOString(),
335
+ features: [
336
+ 'AI Embedding Generation',
337
+ 'HNSW Vector Indexing',
338
+ 'Knowledge Graph Extraction',
339
+ 'Walrus Decentralized Storage',
340
+ 'Sui Blockchain Integration',
341
+ 'Unified Processing Pipeline',
342
+ 'Batch Processing & Caching',
343
+ 'Comprehensive Monitoring'
344
+ ]
345
+ };
346
+ },
347
+
348
+ /**
349
+ * Validate configuration
350
+ */
351
+ validateConfig(config: PipelineConfig): {
352
+ isValid: boolean;
353
+ errors: string[];
354
+ warnings: string[];
355
+ } {
356
+ const errors: string[] = [];
357
+ const warnings: string[] = [];
358
+
359
+ // Validate embedding config
360
+ if (config.embedding?.batchSize && config.embedding.batchSize > 100) {
361
+ warnings.push('Large embedding batch size may cause memory issues');
362
+ }
363
+
364
+ // Validate vector config
365
+ if (config.vector?.maxElements && config.vector.maxElements > 100000) {
366
+ warnings.push('Large vector index may impact performance');
367
+ }
368
+
369
+ // Validate network consistency
370
+ if (config.storage?.network !== config.blockchain?.network) {
371
+ warnings.push('Storage and blockchain networks should match');
372
+ }
373
+
374
+ return {
375
+ isValid: errors.length === 0,
376
+ errors,
377
+ warnings
378
+ };
379
+ }
380
+ };
381
+
382
+ // Default export for convenience
383
+ export default {
384
+ MemoryPipeline,
385
+ PipelineManager,
386
+ createQuickStartPipeline,
387
+ createPipelineManager,
388
+ QuickStartConfigs,
389
+ SDK
390
+ };
391
+
392
+ // Client-side memory management for React dApps
393
+ export { ClientMemoryManager } from './client/ClientMemoryManager';
394
+ export { PersonalDataWallet } from './client/PersonalDataWallet';
395
+ export { SimplePDWClient } from './client/SimplePDWClient';
396
+ export type { SimplePDWConfig, ServiceContainer } from './client/SimplePDWClient';
397
+
398
+ // Signer abstractions for different environments
399
+ export {
400
+ KeypairSigner,
401
+ WalletAdapterSigner,
402
+ DappKitSigner
403
+ } from './client/signers';
404
+ export type {
405
+ UnifiedSigner,
406
+ SignAndExecuteResult,
407
+ SignPersonalMessageResult,
408
+ WalletAdapter,
409
+ DappKitSignerConfig,
410
+ DappKitSignAndExecuteFn,
411
+ DappKitSignPersonalMessageFn
412
+ } from './client/signers';
413
+ export type {
414
+ ClientMemoryManagerConfig,
415
+ CreateMemoryOptions as ClientCreateMemoryOptions,
416
+ RetrieveMemoryOptions as ClientRetrieveMemoryOptions,
417
+ BatchRetrieveMemoriesOptions as ClientBatchRetrieveMemoriesOptions,
418
+ BatchRetrieveResult as ClientBatchRetrieveResult,
419
+ ClientMemoryMetadata
420
+ } from './client/ClientMemoryManager';
421
+
422
+ // Wallet architecture components
423
+ /** @deprecated Use CapabilityService instead */
424
+ export { MainWalletService } from './wallet/MainWalletService';
425
+ /** @deprecated Use ContextNamespace instead */
426
+ export { ContextWalletService } from './wallet/ContextWalletService';
427
+ export { PermissionService } from './access/PermissionService';
428
+ export type { ConsentRepository } from './permissions/ConsentRepository';
429
+ export { FileSystemConsentRepository, InMemoryConsentRepository } from './permissions/ConsentRepository';
430
+ export { AggregationService } from './aggregation/AggregationService';
431
+ export type {
432
+ MainWallet,
433
+ ContextWallet,
434
+ ConsentRequest,
435
+ ConsentRequestRecord,
436
+ ConsentStatus,
437
+ AccessGrant,
438
+ CreateMainWalletOptions,
439
+ CreateContextWalletOptions,
440
+ DeriveContextIdOptions,
441
+ RotateKeysOptions,
442
+ RotateKeysResult,
443
+ PermissionScope,
444
+ RequestConsentOptions,
445
+ GrantPermissionsOptions,
446
+ RevokePermissionsOptions,
447
+ AggregatedQueryOptions,
448
+ PermissionScopes
449
+ } from './core/types/wallet';
450
+
451
+ // Legacy version for compatibility
452
+ export const VERSION = '1.0.0';
453
+
454
+ // Rebuild utility (Browser)
455
+ export { rebuildIndex, hasExistingIndex, clearIndex } from './utils/rebuildIndex';
456
+ export type { RebuildIndexOptions, RebuildIndexResult } from './utils/rebuildIndex';
457
+
458
+ // Rebuild utility (Node.js)
459
+ export { rebuildIndexNode, hasExistingIndexNode, clearIndexNode } from './utils/rebuildIndexNode';
460
+ export type { RebuildIndexNodeOptions, RebuildIndexNodeResult } from './utils/rebuildIndexNode';
461
+
462
+ // MemoryIndex on-chain utilities
463
+ export {
464
+ getMemoryIndex,
465
+ updateMemoryIndexOnChain,
466
+ createMemoryIndexOnChain,
467
+ syncIndexAndUpdateOnChain,
468
+ uploadPlaceholderToWalrus
469
+ } from './utils/memoryIndexOnChain';
470
+ export type {
471
+ OnChainMemoryIndex,
472
+ GetMemoryIndexOptions,
473
+ UpdateMemoryIndexOnChainOptions,
474
+ CreateMemoryIndexOnChainOptions,
475
+ UpdateMemoryIndexResult,
476
+ CreateMemoryIndexResult,
477
+ SyncAndUpdateOptions,
478
+ SyncAndUpdateResult
479
+ } from './utils/memoryIndexOnChain';
480
+
481
+ // ==================== AI SDK INTEGRATION ====================
482
+ // AI SDK tools and vector store for Vercel AI SDK integration
483
+ export { pdwTools } from './ai-sdk/tools';
484
+ export type { PDWToolsConfig, PDWToolResult } from './ai-sdk/tools';
485
+ export { PDWVectorStore as AIPDWVectorStore } from './ai-sdk/PDWVectorStore';
486
+ export type {
487
+ PDWVectorStoreConfig as AIPDWVectorStoreConfig,
488
+ AddVectorParams,
489
+ SearchParams as AISearchParams,
490
+ SearchResult as AISearchResult
491
+ } from './ai-sdk/types';
492
+
493
+ // ==================== LANGCHAIN INTEGRATION ====================
494
+ // LangChain adapters for RAG workflows with decentralized storage
495
+ export { PDWEmbeddings } from './langchain/PDWEmbeddings';
496
+ export type { PDWEmbeddingsParams } from './langchain/PDWEmbeddings';
497
+ export { PDWVectorStore } from './langchain/PDWVectorStore';
498
+ export type { PDWVectorStoreConfig, PDWAddDocumentOptions } from './langchain/PDWVectorStore';