@cilow/sdk 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +412 -199
- package/dist/client.d.mts +224 -0
- package/dist/client.d.ts +224 -0
- package/dist/client.js +509 -0
- package/dist/client.js.map +1 -0
- package/dist/client.mjs +505 -0
- package/dist/client.mjs.map +1 -0
- package/dist/index.d.mts +94 -390
- package/dist/index.d.ts +94 -390
- package/dist/index.js +745 -350
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +732 -318
- package/dist/index.mjs.map +1 -0
- package/dist/providers/langchain.js +821 -0
- package/dist/providers/langchain.js.map +1 -0
- package/dist/providers/langchain.mjs +816 -0
- package/dist/providers/langchain.mjs.map +1 -0
- package/dist/providers/openai.js +737 -0
- package/dist/providers/openai.js.map +1 -0
- package/dist/providers/openai.mjs +732 -0
- package/dist/providers/openai.mjs.map +1 -0
- package/dist/providers/vercel.js +866 -0
- package/dist/providers/vercel.js.map +1 -0
- package/dist/providers/vercel.mjs +860 -0
- package/dist/providers/vercel.mjs.map +1 -0
- package/dist/react/hooks.d.mts +327 -0
- package/dist/react/hooks.d.ts +327 -0
- package/dist/react/hooks.js +1183 -0
- package/dist/react/hooks.js.map +1 -0
- package/dist/react/hooks.mjs +1172 -0
- package/dist/react/hooks.mjs.map +1 -0
- package/dist/types.d.mts +494 -0
- package/dist/types.d.ts +494 -0
- package/dist/types.js +18 -0
- package/dist/types.js.map +1 -0
- package/dist/types.mjs +14 -0
- package/dist/types.mjs.map +1 -0
- package/dist/websocket.d.mts +160 -0
- package/dist/websocket.d.ts +160 -0
- package/dist/websocket.js +342 -0
- package/dist/websocket.js.map +1 -0
- package/dist/websocket.mjs +339 -0
- package/dist/websocket.mjs.map +1 -0
- package/package.json +90 -31
- package/LICENSE +0 -21
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cilow SDK TypeScript Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Comprehensive type definitions for the Cilow memory system.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Memory tier classification based on access frequency and recency
|
|
8
|
+
*/
|
|
9
|
+
type MemoryTier = 'hot' | 'warm' | 'cold';
|
|
10
|
+
/**
|
|
11
|
+
* Memory status for lifecycle management
|
|
12
|
+
*/
|
|
13
|
+
type MemoryStatus = 'active' | 'archived' | 'deleted';
|
|
14
|
+
/**
|
|
15
|
+
* Core memory entity representing a stored piece of information
|
|
16
|
+
*/
|
|
17
|
+
interface Memory {
|
|
18
|
+
/** Unique identifier for the memory */
|
|
19
|
+
id: string;
|
|
20
|
+
/** The content of the memory */
|
|
21
|
+
content: string;
|
|
22
|
+
/** Tags for categorization and filtering */
|
|
23
|
+
tags: string[];
|
|
24
|
+
/** User ID associated with this memory */
|
|
25
|
+
userId?: string;
|
|
26
|
+
/** Session ID for grouping related memories */
|
|
27
|
+
sessionId?: string;
|
|
28
|
+
/** Current tier classification */
|
|
29
|
+
tier: MemoryTier;
|
|
30
|
+
/** Memory status */
|
|
31
|
+
status: MemoryStatus;
|
|
32
|
+
/** Access count for prioritization */
|
|
33
|
+
accessCount: number;
|
|
34
|
+
/** Token count for the content */
|
|
35
|
+
tokenCount: number;
|
|
36
|
+
/** Embedding vector (if available) */
|
|
37
|
+
embedding?: number[];
|
|
38
|
+
/** Additional metadata */
|
|
39
|
+
metadata: Record<string, unknown>;
|
|
40
|
+
/** ISO timestamp of creation */
|
|
41
|
+
createdAt: string;
|
|
42
|
+
/** ISO timestamp of last update */
|
|
43
|
+
updatedAt: string;
|
|
44
|
+
/** ISO timestamp of last access */
|
|
45
|
+
lastAccessedAt: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Minimal memory representation for list operations
|
|
49
|
+
*/
|
|
50
|
+
interface MemorySummary {
|
|
51
|
+
id: string;
|
|
52
|
+
content: string;
|
|
53
|
+
tags: string[];
|
|
54
|
+
tier: MemoryTier;
|
|
55
|
+
createdAt: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Options for creating a new memory
|
|
59
|
+
*/
|
|
60
|
+
interface CreateMemoryOptions {
|
|
61
|
+
/** Tags to apply to the memory */
|
|
62
|
+
tags?: string[];
|
|
63
|
+
/** User ID to associate */
|
|
64
|
+
userId?: string;
|
|
65
|
+
/** Session ID for grouping */
|
|
66
|
+
sessionId?: string;
|
|
67
|
+
/** Additional metadata */
|
|
68
|
+
metadata?: Record<string, unknown>;
|
|
69
|
+
/** Force a specific tier */
|
|
70
|
+
tier?: MemoryTier;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Options for updating a memory
|
|
74
|
+
*/
|
|
75
|
+
interface UpdateMemoryOptions {
|
|
76
|
+
/** New content */
|
|
77
|
+
content?: string;
|
|
78
|
+
/** New tags (replaces existing) */
|
|
79
|
+
tags?: string[];
|
|
80
|
+
/** Updated metadata (merged with existing) */
|
|
81
|
+
metadata?: Record<string, unknown>;
|
|
82
|
+
/** Force tier change */
|
|
83
|
+
tier?: MemoryTier;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Search result containing a memory and its relevance score
|
|
87
|
+
*/
|
|
88
|
+
interface SearchResult {
|
|
89
|
+
/** The matching memory */
|
|
90
|
+
memory: Memory;
|
|
91
|
+
/** Relevance score (0.0 - 1.0) */
|
|
92
|
+
score: number;
|
|
93
|
+
/** Matched terms or phrases */
|
|
94
|
+
matchedTerms?: string[];
|
|
95
|
+
/** Highlighted content snippets */
|
|
96
|
+
highlights?: string[];
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Search query parameters
|
|
100
|
+
*/
|
|
101
|
+
interface SearchQuery {
|
|
102
|
+
/** The search text */
|
|
103
|
+
text: string;
|
|
104
|
+
/** Maximum number of results */
|
|
105
|
+
limit?: number;
|
|
106
|
+
/** Minimum relevance score threshold (0.0 - 1.0) */
|
|
107
|
+
minRelevance?: number;
|
|
108
|
+
/** Filter by tags (AND logic) */
|
|
109
|
+
tags?: string[];
|
|
110
|
+
/** Filter by user ID */
|
|
111
|
+
userId?: string;
|
|
112
|
+
/** Filter by session ID */
|
|
113
|
+
sessionId?: string;
|
|
114
|
+
/** Filter by tier */
|
|
115
|
+
tier?: MemoryTier;
|
|
116
|
+
/** Filter by date range - start */
|
|
117
|
+
createdAfter?: string;
|
|
118
|
+
/** Filter by date range - end */
|
|
119
|
+
createdBefore?: string;
|
|
120
|
+
/** Include archived memories */
|
|
121
|
+
includeArchived?: boolean;
|
|
122
|
+
/** Search mode */
|
|
123
|
+
mode?: 'semantic' | 'keyword' | 'hybrid';
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Advanced search options for complex queries
|
|
127
|
+
*/
|
|
128
|
+
interface AdvancedSearchOptions extends SearchQuery {
|
|
129
|
+
/** Boost recent memories */
|
|
130
|
+
recencyBoost?: number;
|
|
131
|
+
/** Boost frequently accessed memories */
|
|
132
|
+
frequencyBoost?: number;
|
|
133
|
+
/** Required tags (must have all) */
|
|
134
|
+
requiredTags?: string[];
|
|
135
|
+
/** Excluded tags (must not have any) */
|
|
136
|
+
excludedTags?: string[];
|
|
137
|
+
/** Metadata filters */
|
|
138
|
+
metadataFilters?: Record<string, unknown>;
|
|
139
|
+
/** Custom reranking function name */
|
|
140
|
+
reranker?: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Node in the memory knowledge graph
|
|
144
|
+
*/
|
|
145
|
+
interface GraphNode {
|
|
146
|
+
/** Unique node identifier */
|
|
147
|
+
id: string;
|
|
148
|
+
/** Node type/label */
|
|
149
|
+
type: string;
|
|
150
|
+
/** Display name */
|
|
151
|
+
name: string;
|
|
152
|
+
/** Node properties */
|
|
153
|
+
properties: Record<string, unknown>;
|
|
154
|
+
/** Associated memory IDs */
|
|
155
|
+
memoryIds: string[];
|
|
156
|
+
/** Creation timestamp */
|
|
157
|
+
createdAt: string;
|
|
158
|
+
/** Last update timestamp */
|
|
159
|
+
updatedAt: string;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Edge connecting two nodes in the graph
|
|
163
|
+
*/
|
|
164
|
+
interface GraphEdge {
|
|
165
|
+
/** Unique edge identifier */
|
|
166
|
+
id: string;
|
|
167
|
+
/** Source node ID */
|
|
168
|
+
sourceId: string;
|
|
169
|
+
/** Target node ID */
|
|
170
|
+
targetId: string;
|
|
171
|
+
/** Relationship type */
|
|
172
|
+
type: string;
|
|
173
|
+
/** Edge weight/strength */
|
|
174
|
+
weight: number;
|
|
175
|
+
/** Edge properties */
|
|
176
|
+
properties: Record<string, unknown>;
|
|
177
|
+
/** Creation timestamp */
|
|
178
|
+
createdAt: string;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Subgraph result for graph traversal queries
|
|
182
|
+
*/
|
|
183
|
+
interface GraphSubgraph {
|
|
184
|
+
/** Nodes in the subgraph */
|
|
185
|
+
nodes: GraphNode[];
|
|
186
|
+
/** Edges in the subgraph */
|
|
187
|
+
edges: GraphEdge[];
|
|
188
|
+
/** Central node ID (if applicable) */
|
|
189
|
+
centerId?: string;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Options for graph traversal
|
|
193
|
+
*/
|
|
194
|
+
interface GraphTraversalOptions {
|
|
195
|
+
/** Starting node ID */
|
|
196
|
+
startNodeId: string;
|
|
197
|
+
/** Maximum traversal depth */
|
|
198
|
+
maxDepth?: number;
|
|
199
|
+
/** Filter by relationship types */
|
|
200
|
+
relationshipTypes?: string[];
|
|
201
|
+
/** Maximum nodes to return */
|
|
202
|
+
limit?: number;
|
|
203
|
+
/** Traversal direction */
|
|
204
|
+
direction?: 'outbound' | 'inbound' | 'both';
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Memory system statistics
|
|
208
|
+
*/
|
|
209
|
+
interface MemoryStats {
|
|
210
|
+
/** Total number of memories */
|
|
211
|
+
totalMemories: number;
|
|
212
|
+
/** Number of hot tier memories */
|
|
213
|
+
hotMemories: number;
|
|
214
|
+
/** Number of warm tier memories */
|
|
215
|
+
warmMemories: number;
|
|
216
|
+
/** Number of cold tier memories */
|
|
217
|
+
coldMemories: number;
|
|
218
|
+
/** Total token count across all memories */
|
|
219
|
+
totalTokens: number;
|
|
220
|
+
/** Average tokens per memory */
|
|
221
|
+
averageTokensPerMemory: number;
|
|
222
|
+
/** Number of unique users */
|
|
223
|
+
uniqueUsers: number;
|
|
224
|
+
/** Number of unique sessions */
|
|
225
|
+
uniqueSessions: number;
|
|
226
|
+
/** Total number of tags */
|
|
227
|
+
totalTags: number;
|
|
228
|
+
/** Storage size in bytes */
|
|
229
|
+
storageSizeBytes: number;
|
|
230
|
+
/** Stats generation timestamp */
|
|
231
|
+
generatedAt: string;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Tag with usage count
|
|
235
|
+
*/
|
|
236
|
+
interface TagCount {
|
|
237
|
+
/** Tag name */
|
|
238
|
+
tag: string;
|
|
239
|
+
/** Usage count */
|
|
240
|
+
count: number;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* User activity statistics
|
|
244
|
+
*/
|
|
245
|
+
interface UserStats {
|
|
246
|
+
/** User ID */
|
|
247
|
+
userId: string;
|
|
248
|
+
/** Number of memories */
|
|
249
|
+
memoryCount: number;
|
|
250
|
+
/** Total tokens used */
|
|
251
|
+
totalTokens: number;
|
|
252
|
+
/** Number of sessions */
|
|
253
|
+
sessionCount: number;
|
|
254
|
+
/** First activity timestamp */
|
|
255
|
+
firstActivityAt: string;
|
|
256
|
+
/** Last activity timestamp */
|
|
257
|
+
lastActivityAt: string;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Base event type
|
|
261
|
+
*/
|
|
262
|
+
interface BaseEvent {
|
|
263
|
+
/** Event type identifier */
|
|
264
|
+
type: string;
|
|
265
|
+
/** Event timestamp */
|
|
266
|
+
timestamp: string;
|
|
267
|
+
/** Correlation ID for tracking */
|
|
268
|
+
correlationId?: string;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Memory created event
|
|
272
|
+
*/
|
|
273
|
+
interface MemoryCreatedEvent extends BaseEvent {
|
|
274
|
+
type: 'memory.created';
|
|
275
|
+
/** The created memory */
|
|
276
|
+
memory: Memory;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Memory updated event
|
|
280
|
+
*/
|
|
281
|
+
interface MemoryUpdatedEvent extends BaseEvent {
|
|
282
|
+
type: 'memory.updated';
|
|
283
|
+
/** The updated memory */
|
|
284
|
+
memory: Memory;
|
|
285
|
+
/** Changed fields */
|
|
286
|
+
changedFields: string[];
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Memory deleted event
|
|
290
|
+
*/
|
|
291
|
+
interface MemoryDeletedEvent extends BaseEvent {
|
|
292
|
+
type: 'memory.deleted';
|
|
293
|
+
/** Deleted memory ID */
|
|
294
|
+
memoryId: string;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Memory tier changed event
|
|
298
|
+
*/
|
|
299
|
+
interface MemoryTierChangedEvent extends BaseEvent {
|
|
300
|
+
type: 'memory.tier_changed';
|
|
301
|
+
/** Memory ID */
|
|
302
|
+
memoryId: string;
|
|
303
|
+
/** Previous tier */
|
|
304
|
+
previousTier: MemoryTier;
|
|
305
|
+
/** New tier */
|
|
306
|
+
newTier: MemoryTier;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Graph node created event
|
|
310
|
+
*/
|
|
311
|
+
interface GraphNodeCreatedEvent extends BaseEvent {
|
|
312
|
+
type: 'graph.node_created';
|
|
313
|
+
/** The created node */
|
|
314
|
+
node: GraphNode;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Graph edge created event
|
|
318
|
+
*/
|
|
319
|
+
interface GraphEdgeCreatedEvent extends BaseEvent {
|
|
320
|
+
type: 'graph.edge_created';
|
|
321
|
+
/** The created edge */
|
|
322
|
+
edge: GraphEdge;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Connection status event
|
|
326
|
+
*/
|
|
327
|
+
interface ConnectionStatusEvent extends BaseEvent {
|
|
328
|
+
type: 'connection.status';
|
|
329
|
+
/** Connection status */
|
|
330
|
+
status: 'connected' | 'disconnected' | 'reconnecting';
|
|
331
|
+
/** Reason for status change */
|
|
332
|
+
reason?: string;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Union type of all events
|
|
336
|
+
*/
|
|
337
|
+
type CilowEvent = MemoryCreatedEvent | MemoryUpdatedEvent | MemoryDeletedEvent | MemoryTierChangedEvent | GraphNodeCreatedEvent | GraphEdgeCreatedEvent | ConnectionStatusEvent;
|
|
338
|
+
/**
|
|
339
|
+
* Pagination parameters
|
|
340
|
+
*/
|
|
341
|
+
interface PaginationParams {
|
|
342
|
+
/** Number of items per page */
|
|
343
|
+
limit?: number;
|
|
344
|
+
/** Offset for pagination */
|
|
345
|
+
offset?: number;
|
|
346
|
+
/** Cursor for cursor-based pagination */
|
|
347
|
+
cursor?: string;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Paginated response wrapper
|
|
351
|
+
*/
|
|
352
|
+
interface PaginatedResponse<T> {
|
|
353
|
+
/** Items in this page */
|
|
354
|
+
items: T[];
|
|
355
|
+
/** Total count of items */
|
|
356
|
+
total: number;
|
|
357
|
+
/** Current offset */
|
|
358
|
+
offset: number;
|
|
359
|
+
/** Items per page */
|
|
360
|
+
limit: number;
|
|
361
|
+
/** Cursor for next page */
|
|
362
|
+
nextCursor?: string;
|
|
363
|
+
/** Whether there are more items */
|
|
364
|
+
hasMore: boolean;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* API error response
|
|
368
|
+
*/
|
|
369
|
+
interface ApiError {
|
|
370
|
+
/** Error code */
|
|
371
|
+
code: string;
|
|
372
|
+
/** Human-readable error message */
|
|
373
|
+
message: string;
|
|
374
|
+
/** Additional error details */
|
|
375
|
+
details?: Record<string, unknown>;
|
|
376
|
+
/** Request ID for debugging */
|
|
377
|
+
requestId?: string;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Health check response
|
|
381
|
+
*/
|
|
382
|
+
interface HealthCheck {
|
|
383
|
+
/** Service status */
|
|
384
|
+
status: 'healthy' | 'degraded' | 'unhealthy';
|
|
385
|
+
/** Service version */
|
|
386
|
+
version: string;
|
|
387
|
+
/** Uptime in seconds */
|
|
388
|
+
uptimeSeconds: number;
|
|
389
|
+
/** Component statuses */
|
|
390
|
+
components: {
|
|
391
|
+
name: string;
|
|
392
|
+
status: 'healthy' | 'degraded' | 'unhealthy';
|
|
393
|
+
latencyMs?: number;
|
|
394
|
+
}[];
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Client configuration options
|
|
398
|
+
*/
|
|
399
|
+
interface CilowConfig {
|
|
400
|
+
/** Base URL of the Cilow API */
|
|
401
|
+
apiUrl: string;
|
|
402
|
+
/** API key for authentication */
|
|
403
|
+
apiKey: string;
|
|
404
|
+
/** Request timeout in milliseconds */
|
|
405
|
+
timeout?: number;
|
|
406
|
+
/** Number of retry attempts for failed requests */
|
|
407
|
+
retries?: number;
|
|
408
|
+
/** Custom headers to include in requests */
|
|
409
|
+
headers?: Record<string, string>;
|
|
410
|
+
/** Enable debug logging */
|
|
411
|
+
debug?: boolean;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* WebSocket configuration options
|
|
415
|
+
*/
|
|
416
|
+
interface WebSocketConfig {
|
|
417
|
+
/** WebSocket URL (defaults to apiUrl with ws:// protocol) */
|
|
418
|
+
wsUrl?: string;
|
|
419
|
+
/** Reconnection attempts */
|
|
420
|
+
reconnectAttempts?: number;
|
|
421
|
+
/** Reconnection delay in milliseconds */
|
|
422
|
+
reconnectDelay?: number;
|
|
423
|
+
/** Heartbeat interval in milliseconds */
|
|
424
|
+
heartbeatInterval?: number;
|
|
425
|
+
/** Message queue size for offline buffering */
|
|
426
|
+
messageQueueSize?: number;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Combined configuration for full client
|
|
430
|
+
*/
|
|
431
|
+
interface FullCilowConfig extends CilowConfig, WebSocketConfig {
|
|
432
|
+
/** Default user ID for all operations */
|
|
433
|
+
defaultUserId?: string;
|
|
434
|
+
/** Default session ID */
|
|
435
|
+
defaultSessionId?: string;
|
|
436
|
+
/** Default tags to apply */
|
|
437
|
+
defaultTags?: string[];
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Context result for AI integrations
|
|
441
|
+
*/
|
|
442
|
+
interface ContextResult {
|
|
443
|
+
/** Formatted context string */
|
|
444
|
+
context: string;
|
|
445
|
+
/** Number of memories used */
|
|
446
|
+
memoriesUsed: number;
|
|
447
|
+
/** Estimated token count */
|
|
448
|
+
estimatedTokens: number;
|
|
449
|
+
/** Memory IDs included */
|
|
450
|
+
memoryIds: string[];
|
|
451
|
+
/** Search scores */
|
|
452
|
+
scores: number[];
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Conversation turn for storing dialogues
|
|
456
|
+
*/
|
|
457
|
+
interface ConversationTurn {
|
|
458
|
+
/** User's message */
|
|
459
|
+
userMessage: string;
|
|
460
|
+
/** Assistant's response */
|
|
461
|
+
assistantResponse: string;
|
|
462
|
+
/** Session ID */
|
|
463
|
+
sessionId?: string;
|
|
464
|
+
/** Additional metadata */
|
|
465
|
+
metadata?: Record<string, unknown>;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Batch operation result
|
|
469
|
+
*/
|
|
470
|
+
interface BatchResult<T> {
|
|
471
|
+
/** Successful operations */
|
|
472
|
+
succeeded: T[];
|
|
473
|
+
/** Failed operations with errors */
|
|
474
|
+
failed: {
|
|
475
|
+
item: T;
|
|
476
|
+
error: string;
|
|
477
|
+
}[];
|
|
478
|
+
/** Total operations attempted */
|
|
479
|
+
total: number;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Check if an event is a memory event
|
|
483
|
+
*/
|
|
484
|
+
declare function isMemoryEvent(event: CilowEvent): event is MemoryCreatedEvent | MemoryUpdatedEvent | MemoryDeletedEvent;
|
|
485
|
+
/**
|
|
486
|
+
* Check if an event is a graph event
|
|
487
|
+
*/
|
|
488
|
+
declare function isGraphEvent(event: CilowEvent): event is GraphNodeCreatedEvent | GraphEdgeCreatedEvent;
|
|
489
|
+
/**
|
|
490
|
+
* Check if an object is an API error
|
|
491
|
+
*/
|
|
492
|
+
declare function isApiError(obj: unknown): obj is ApiError;
|
|
493
|
+
|
|
494
|
+
export { type AdvancedSearchOptions, type ApiError, type BaseEvent, type BatchResult, type CilowConfig, type CilowEvent, type ConnectionStatusEvent, type ContextResult, type ConversationTurn, type CreateMemoryOptions, type FullCilowConfig, type GraphEdge, type GraphEdgeCreatedEvent, type GraphNode, type GraphNodeCreatedEvent, type GraphSubgraph, type GraphTraversalOptions, type HealthCheck, type Memory, type MemoryCreatedEvent, type MemoryDeletedEvent, type MemoryStats, type MemoryStatus, type MemorySummary, type MemoryTier, type MemoryTierChangedEvent, type MemoryUpdatedEvent, type PaginatedResponse, type PaginationParams, type SearchQuery, type SearchResult, type TagCount, type UpdateMemoryOptions, type UserStats, type WebSocketConfig, isApiError, isGraphEvent, isMemoryEvent };
|