@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.
- package/ARCHITECTURE.md +547 -547
- package/BENCHMARKS.md +238 -238
- package/README.md +310 -181
- package/dist/ai-sdk/tools.d.ts +2 -2
- package/dist/ai-sdk/tools.js +2 -2
- package/dist/client/ClientMemoryManager.js +2 -2
- package/dist/client/ClientMemoryManager.js.map +1 -1
- package/dist/client/PersonalDataWallet.d.ts.map +1 -1
- package/dist/client/SimplePDWClient.d.ts +29 -1
- package/dist/client/SimplePDWClient.d.ts.map +1 -1
- package/dist/client/SimplePDWClient.js +45 -13
- package/dist/client/SimplePDWClient.js.map +1 -1
- package/dist/client/namespaces/EmbeddingsNamespace.d.ts +1 -1
- package/dist/client/namespaces/EmbeddingsNamespace.js +1 -1
- package/dist/client/namespaces/MemoryNamespace.d.ts +31 -0
- package/dist/client/namespaces/MemoryNamespace.d.ts.map +1 -1
- package/dist/client/namespaces/MemoryNamespace.js +272 -39
- package/dist/client/namespaces/MemoryNamespace.js.map +1 -1
- package/dist/client/namespaces/consolidated/AINamespace.d.ts +2 -2
- package/dist/client/namespaces/consolidated/AINamespace.js +2 -2
- package/dist/client/namespaces/consolidated/BlockchainNamespace.d.ts +12 -2
- package/dist/client/namespaces/consolidated/BlockchainNamespace.d.ts.map +1 -1
- package/dist/client/namespaces/consolidated/BlockchainNamespace.js +62 -4
- package/dist/client/namespaces/consolidated/BlockchainNamespace.js.map +1 -1
- package/dist/client/namespaces/consolidated/StorageNamespace.d.ts +67 -2
- package/dist/client/namespaces/consolidated/StorageNamespace.d.ts.map +1 -1
- package/dist/client/namespaces/consolidated/StorageNamespace.js +549 -16
- package/dist/client/namespaces/consolidated/StorageNamespace.js.map +1 -1
- package/dist/config/ConfigurationHelper.js +61 -61
- package/dist/config/defaults.js +2 -2
- package/dist/config/defaults.js.map +1 -1
- package/dist/graph/GraphService.js +21 -21
- package/dist/graph/GraphService.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/seal/EncryptionService.d.ts +9 -5
- package/dist/infrastructure/seal/EncryptionService.d.ts.map +1 -1
- package/dist/infrastructure/seal/EncryptionService.js +37 -15
- package/dist/infrastructure/seal/EncryptionService.js.map +1 -1
- package/dist/infrastructure/seal/SealService.d.ts +13 -5
- package/dist/infrastructure/seal/SealService.d.ts.map +1 -1
- package/dist/infrastructure/seal/SealService.js +36 -34
- package/dist/infrastructure/seal/SealService.js.map +1 -1
- package/dist/langchain/createPDWRAG.js +30 -30
- package/dist/retrieval/MemoryDecryptionPipeline.d.ts.map +1 -1
- package/dist/retrieval/MemoryDecryptionPipeline.js +2 -1
- package/dist/retrieval/MemoryDecryptionPipeline.js.map +1 -1
- package/dist/retrieval/MemoryRetrievalService.d.ts +31 -0
- package/dist/retrieval/MemoryRetrievalService.d.ts.map +1 -1
- package/dist/retrieval/MemoryRetrievalService.js +44 -4
- package/dist/retrieval/MemoryRetrievalService.js.map +1 -1
- package/dist/services/CapabilityService.d.ts.map +1 -1
- package/dist/services/CapabilityService.js +30 -14
- package/dist/services/CapabilityService.js.map +1 -1
- package/dist/services/CrossContextPermissionService.d.ts.map +1 -1
- package/dist/services/CrossContextPermissionService.js +9 -7
- package/dist/services/CrossContextPermissionService.js.map +1 -1
- package/dist/services/EmbeddingService.d.ts +28 -1
- package/dist/services/EmbeddingService.d.ts.map +1 -1
- package/dist/services/EmbeddingService.js +54 -0
- package/dist/services/EmbeddingService.js.map +1 -1
- package/dist/services/EncryptionService.d.ts.map +1 -1
- package/dist/services/EncryptionService.js +6 -5
- package/dist/services/EncryptionService.js.map +1 -1
- package/dist/services/GeminiAIService.js +309 -309
- package/dist/services/IndexManager.d.ts +5 -1
- package/dist/services/IndexManager.d.ts.map +1 -1
- package/dist/services/IndexManager.js +17 -40
- package/dist/services/IndexManager.js.map +1 -1
- package/dist/services/QueryService.js +1 -1
- package/dist/services/QueryService.js.map +1 -1
- package/dist/services/StorageService.d.ts +11 -0
- package/dist/services/StorageService.d.ts.map +1 -1
- package/dist/services/StorageService.js +73 -10
- package/dist/services/StorageService.js.map +1 -1
- package/dist/services/TransactionService.d.ts +20 -0
- package/dist/services/TransactionService.d.ts.map +1 -1
- package/dist/services/TransactionService.js +43 -0
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/services/ViewService.js +2 -2
- package/dist/services/ViewService.js.map +1 -1
- package/dist/services/storage/QuiltBatchManager.d.ts +101 -1
- package/dist/services/storage/QuiltBatchManager.d.ts.map +1 -1
- package/dist/services/storage/QuiltBatchManager.js +410 -20
- package/dist/services/storage/QuiltBatchManager.js.map +1 -1
- package/dist/services/storage/index.d.ts +1 -1
- package/dist/services/storage/index.d.ts.map +1 -1
- package/dist/services/storage/index.js.map +1 -1
- package/dist/utils/LRUCache.d.ts +106 -0
- package/dist/utils/LRUCache.d.ts.map +1 -0
- package/dist/utils/LRUCache.js +281 -0
- package/dist/utils/LRUCache.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/memoryIndexOnChain.d.ts +212 -0
- package/dist/utils/memoryIndexOnChain.d.ts.map +1 -0
- package/dist/utils/memoryIndexOnChain.js +312 -0
- package/dist/utils/memoryIndexOnChain.js.map +1 -0
- package/dist/utils/rebuildIndexNode.d.ts +29 -0
- package/dist/utils/rebuildIndexNode.d.ts.map +1 -1
- package/dist/utils/rebuildIndexNode.js +366 -98
- package/dist/utils/rebuildIndexNode.js.map +1 -1
- package/dist/vector/HnswWasmService.d.ts +20 -5
- package/dist/vector/HnswWasmService.d.ts.map +1 -1
- package/dist/vector/HnswWasmService.js +73 -40
- package/dist/vector/HnswWasmService.js.map +1 -1
- package/dist/vector/IHnswService.d.ts +10 -1
- package/dist/vector/IHnswService.d.ts.map +1 -1
- package/dist/vector/IHnswService.js.map +1 -1
- package/dist/vector/NodeHnswService.d.ts +16 -0
- package/dist/vector/NodeHnswService.d.ts.map +1 -1
- package/dist/vector/NodeHnswService.js +84 -5
- package/dist/vector/NodeHnswService.js.map +1 -1
- package/dist/vector/createHnswService.d.ts +1 -1
- package/dist/vector/createHnswService.js +1 -1
- package/dist/vector/index.d.ts +1 -1
- package/dist/vector/index.js +1 -1
- package/package.json +157 -157
- package/src/access/PermissionService.ts +635 -635
- package/src/aggregation/AggregationService.ts +389 -389
- package/src/ai-sdk/PDWVectorStore.ts +715 -715
- package/src/ai-sdk/index.ts +65 -65
- package/src/ai-sdk/tools.ts +460 -460
- package/src/ai-sdk/types.ts +404 -404
- package/src/batch/BatchManager.ts +597 -597
- package/src/batch/BatchingService.ts +429 -429
- package/src/batch/MemoryProcessingCache.ts +492 -492
- package/src/batch/index.ts +30 -30
- package/src/browser.ts +200 -200
- package/src/client/ClientMemoryManager.ts +987 -987
- package/src/client/PersonalDataWallet.ts +345 -345
- package/src/client/SimplePDWClient.ts +1289 -1222
- package/src/client/factory.ts +154 -154
- package/src/client/namespaces/AnalyticsNamespace.ts +377 -377
- package/src/client/namespaces/BatchNamespace.ts +356 -356
- package/src/client/namespaces/CacheNamespace.ts +123 -123
- package/src/client/namespaces/CapabilityNamespace.ts +217 -217
- package/src/client/namespaces/ClassifyNamespace.ts +169 -169
- package/src/client/namespaces/ContextNamespace.ts +297 -297
- package/src/client/namespaces/EmbeddingsNamespace.ts +99 -99
- package/src/client/namespaces/EncryptionNamespace.ts +221 -221
- package/src/client/namespaces/GraphNamespace.ts +468 -468
- package/src/client/namespaces/IndexNamespace.ts +361 -361
- package/src/client/namespaces/MemoryNamespace.ts +1422 -1135
- package/src/client/namespaces/PermissionsNamespace.ts +254 -254
- package/src/client/namespaces/PipelineNamespace.ts +220 -220
- package/src/client/namespaces/SearchNamespace.ts +1049 -1049
- package/src/client/namespaces/StorageNamespace.ts +458 -458
- package/src/client/namespaces/TxNamespace.ts +260 -260
- package/src/client/namespaces/WalletNamespace.ts +243 -243
- package/src/client/namespaces/consolidated/AINamespace.ts +449 -449
- package/src/client/namespaces/consolidated/BlockchainNamespace.ts +607 -546
- package/src/client/namespaces/consolidated/SecurityNamespace.ts +648 -648
- package/src/client/namespaces/consolidated/StorageNamespace.ts +1141 -497
- package/src/client/namespaces/consolidated/index.ts +39 -39
- package/src/client/signers/KeypairSigner.ts +108 -108
- package/src/client/signers/UnifiedSigner.ts +110 -110
- package/src/client/signers/WalletAdapterSigner.ts +159 -159
- package/src/client/signers/index.ts +26 -26
- package/src/config/ConfigurationHelper.ts +412 -412
- package/src/config/defaults.ts +51 -51
- package/src/config/index.ts +8 -8
- package/src/config/validation.ts +70 -70
- package/src/core/index.ts +14 -14
- package/src/core/interfaces/IService.ts +307 -307
- package/src/core/interfaces/index.ts +8 -8
- package/src/core/types/capability.ts +297 -297
- package/src/core/types/index.ts +870 -870
- package/src/core/types/wallet.ts +270 -270
- package/src/core/types.ts +9 -9
- package/src/core/wallet.ts +222 -222
- package/src/embedding/index.ts +19 -19
- package/src/embedding/types.ts +357 -357
- package/src/errors/index.ts +602 -602
- package/src/errors/recovery.ts +461 -461
- package/src/errors/validation.ts +567 -567
- package/src/generated/pdw/capability.ts +319 -319
- package/src/graph/GraphService.ts +887 -887
- package/src/graph/KnowledgeGraphManager.ts +728 -728
- package/src/graph/index.ts +25 -25
- package/src/index.ts +498 -474
- package/src/infrastructure/index.ts +22 -22
- package/src/infrastructure/seal/EncryptionService.ts +628 -603
- package/src/infrastructure/seal/SealService.ts +613 -615
- package/src/infrastructure/seal/index.ts +9 -9
- package/src/infrastructure/sui/BlockchainManager.ts +627 -627
- package/src/infrastructure/sui/SuiService.ts +888 -888
- package/src/infrastructure/sui/index.ts +9 -9
- package/src/infrastructure/walrus/StorageManager.ts +604 -604
- package/src/infrastructure/walrus/WalrusStorageService.ts +612 -612
- package/src/infrastructure/walrus/index.ts +9 -9
- package/src/langchain/PDWEmbeddings.ts +145 -145
- package/src/langchain/PDWVectorStore.ts +456 -456
- package/src/langchain/createPDWRAG.ts +303 -303
- package/src/langchain/index.ts +47 -47
- package/src/permissions/ConsentRepository.browser.ts +249 -249
- package/src/permissions/ConsentRepository.ts +364 -364
- package/src/pipeline/MemoryPipeline.ts +862 -862
- package/src/pipeline/PipelineManager.ts +683 -683
- package/src/pipeline/index.ts +26 -26
- package/src/retrieval/AdvancedSearchService.ts +629 -629
- package/src/retrieval/MemoryAnalyticsService.ts +711 -711
- package/src/retrieval/MemoryDecryptionPipeline.ts +825 -824
- package/src/retrieval/MemoryRetrievalService.ts +904 -830
- package/src/retrieval/index.ts +42 -42
- package/src/services/BatchService.ts +352 -352
- package/src/services/CapabilityService.ts +464 -448
- package/src/services/ClassifierService.ts +465 -465
- package/src/services/CrossContextPermissionService.ts +486 -484
- package/src/services/EmbeddingService.ts +771 -706
- package/src/services/EncryptionService.ts +712 -711
- package/src/services/GeminiAIService.ts +753 -753
- package/src/services/IndexManager.ts +977 -1004
- package/src/services/MemoryIndexService.ts +1003 -1003
- package/src/services/MemoryService.ts +369 -369
- package/src/services/QueryService.ts +890 -890
- package/src/services/StorageService.ts +1182 -1111
- package/src/services/TransactionService.ts +838 -790
- package/src/services/VectorService.ts +462 -462
- package/src/services/ViewService.ts +484 -484
- package/src/services/index.ts +25 -25
- package/src/services/storage/BlobAttributesManager.ts +333 -333
- package/src/services/storage/KnowledgeGraphManager.ts +425 -425
- package/src/services/storage/MemorySearchManager.ts +387 -387
- package/src/services/storage/QuiltBatchManager.ts +1130 -660
- package/src/services/storage/WalrusMetadataManager.ts +268 -268
- package/src/services/storage/WalrusStorageManager.ts +287 -287
- package/src/services/storage/index.ts +57 -52
- package/src/types/index.ts +13 -13
- package/src/utils/LRUCache.ts +378 -0
- package/src/utils/index.ts +76 -68
- package/src/utils/memoryIndexOnChain.ts +507 -0
- package/src/utils/rebuildIndex.ts +290 -290
- package/src/utils/rebuildIndexNode.ts +771 -424
- package/src/vector/BrowserHnswIndexService.ts +758 -758
- package/src/vector/HnswWasmService.ts +731 -679
- package/src/vector/IHnswService.ts +233 -224
- package/src/vector/NodeHnswService.ts +833 -735
- package/src/vector/VectorManager.ts +478 -478
- package/src/vector/createHnswService.ts +135 -135
- package/src/vector/index.ts +56 -56
- package/src/wallet/ContextWalletService.ts +656 -656
- 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 {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
export {
|
|
43
|
-
export {
|
|
44
|
-
export {
|
|
45
|
-
export {
|
|
46
|
-
export {
|
|
47
|
-
export {
|
|
48
|
-
export {
|
|
49
|
-
export
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
export
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
//
|
|
69
|
-
|
|
70
|
-
export
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
export {
|
|
77
|
-
export
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
//
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
} from './
|
|
109
|
-
|
|
110
|
-
export type {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
} from './
|
|
114
|
-
|
|
115
|
-
export type {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
export type {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
export type {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
} from './infrastructure/sui/
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
export const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
enableBatching:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
enableBatching: true,
|
|
196
|
-
network: 'testnet'
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
},
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
'
|
|
337
|
-
'
|
|
338
|
-
'
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
// Validate
|
|
360
|
-
if (config.
|
|
361
|
-
warnings.push('Large
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
// Validate
|
|
365
|
-
if (config.
|
|
366
|
-
warnings.push('
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
export {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
export
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
export {
|
|
425
|
-
|
|
426
|
-
export
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
export
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
//
|
|
459
|
-
export {
|
|
460
|
-
export type {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
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';
|