@slashml/memory 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,263 +1,377 @@
1
+ /**
2
+ * @slashml/memory -- Official HTTP TypeScript / Node.js SDK for / ml (https://api.slashml.ai)
3
+ *
4
+ * 100% drop-in replacement for `mem0ai` (`MemoryClient`, `AsyncMemoryClient`, `Memory`, `AsyncMemory`).
5
+ */
1
6
  export declare const DEFAULT_BASE_URL = "https://api.slashml.ai";
2
7
  export declare const DEFAULT_MODEL = "slashml-1.5-fast";
3
8
  export declare const DEFAULT_TIMEOUT_MS = 30000;
4
-
5
9
  export interface MemoryClientOptions {
6
- apiKey?: string;
7
- api_key?: string;
8
- mem0ApiKey?: string;
9
- baseUrl?: string;
10
- base_url?: string;
11
- host?: string;
12
- orgId?: string;
13
- org_id?: string;
14
- projectId?: string;
15
- project_id?: string;
16
- model?: string;
17
- timeoutMs?: number;
18
- fetchImpl?: typeof fetch;
10
+ apiKey?: string;
11
+ api_key?: string;
12
+ mem0ApiKey?: string;
13
+ baseUrl?: string;
14
+ base_url?: string;
15
+ host?: string;
16
+ orgId?: string;
17
+ org_id?: string;
18
+ projectId?: string;
19
+ project_id?: string;
20
+ model?: string;
21
+ timeoutMs?: number;
22
+ fetchImpl?: typeof fetch;
23
+ }
24
+ export interface RuleScopePattern {
25
+ file_paths?: string[];
26
+ tool_names?: string[];
27
+ environments?: string[];
28
+ git_branches?: string[];
29
+ }
30
+ export declare class RuleScope {
31
+ file_paths: string[];
32
+ tool_names: string[];
33
+ environments: string[];
34
+ git_branches: string[];
35
+ constructor(patterns?: RuleScopePattern);
36
+ matches(context?: Record<string, unknown> | null): boolean;
37
+ toJSON(): Record<string, string[]>;
19
38
  }
20
-
39
+ export interface ContrastiveRuleTriplet {
40
+ rule_id: string;
41
+ do: string;
42
+ dont: string;
43
+ context?: string;
44
+ scope?: RuleScope | RuleScopePattern;
45
+ raw_text?: string;
46
+ }
47
+ export interface CacheAlignedPromptResult {
48
+ zone1_rules_text: string;
49
+ zone2_facts_text: string;
50
+ user_turn: string;
51
+ whisper_block: string;
52
+ full_prompt_text: string;
53
+ has_cache_breakpoint: boolean;
54
+ token_economics: Record<string, unknown>;
55
+ }
56
+ export declare function extractCanonicalSlotKey(text: string, metadata?: Record<string, unknown> | null): string | null;
57
+ export declare function compileContrastiveRule(text: string, ruleId?: string, scope?: RuleScope | RuleScopePattern, options?: {
58
+ do?: string;
59
+ dont?: string;
60
+ }): ContrastiveRuleTriplet;
61
+ export declare function formatCacheAlignedPrompt(rules: ContrastiveRuleTriplet[], facts: Array<string | {
62
+ text?: string;
63
+ memory?: string;
64
+ }>, userPrompt: string, options?: {
65
+ activeContext?: Record<string, unknown>;
66
+ whisperRule?: ContrastiveRuleTriplet | null;
67
+ enableCacheBreakpoint?: boolean;
68
+ }): CacheAlignedPromptResult;
21
69
  export interface MemoryFilters {
22
- user_id?: string | null;
23
- userId?: string | null;
24
- agent_id?: string | null;
25
- agentId?: string | null;
26
- app_id?: string | null;
27
- appId?: string | null;
28
- run_id?: string | null;
29
- runId?: string | null;
30
- metadata?: Record<string, unknown> | null;
31
- filters?: Record<string, unknown> | null;
70
+ user_id?: string | null;
71
+ userId?: string | null;
72
+ agent_id?: string | null;
73
+ agentId?: string | null;
74
+ app_id?: string | null;
75
+ appId?: string | null;
76
+ run_id?: string | null;
77
+ runId?: string | null;
78
+ metadata?: Record<string, unknown> | null;
79
+ filters?: Record<string, unknown> | null;
32
80
  }
33
-
34
81
  export interface AddMemoryOptions extends MemoryFilters {
35
- infer?: boolean;
36
- memory_id?: string;
37
- memoryId?: string;
82
+ infer?: boolean;
83
+ memory_id?: string;
84
+ memoryId?: string;
85
+ record_tier?: string;
86
+ recordTier?: string;
87
+ slot_key?: string;
88
+ slotKey?: string;
89
+ scope?: RuleScope | RuleScopePattern;
90
+ contrastive?: ContrastiveRuleTriplet;
38
91
  }
39
-
40
92
  export interface SearchMemoryOptions extends MemoryFilters {
41
- limit?: number;
42
- top_k?: number;
43
- topK?: number;
44
- threshold?: number;
93
+ limit?: number;
94
+ top_k?: number;
95
+ topK?: number;
96
+ threshold?: number;
97
+ record_tier?: string;
98
+ recordTier?: string;
45
99
  }
46
-
47
100
  export interface IngestOptions {
48
- namespace?: string;
49
- model?: string;
50
- metadata?: Record<string, unknown>;
101
+ namespace?: string;
102
+ model?: string;
103
+ metadata?: Record<string, unknown>;
104
+ record_tier?: string;
105
+ recordTier?: string;
106
+ slot_key?: string;
107
+ slotKey?: string;
108
+ scope?: RuleScope | RuleScopePattern;
109
+ contrastive?: ContrastiveRuleTriplet;
51
110
  }
52
-
53
111
  export interface QueryOptions {
54
- namespace?: string;
55
- model?: string;
56
- top_k?: number;
112
+ namespace?: string;
113
+ model?: string;
114
+ top_k?: number;
115
+ record_tier?: string;
116
+ recordTier?: string;
117
+ context?: Record<string, unknown>;
118
+ include_rules?: boolean;
57
119
  }
58
-
59
120
  export interface ForgetOptions {
60
- namespace?: string;
121
+ namespace?: string;
61
122
  }
62
-
63
123
  export interface InterveneOptions {
64
- hook_event_name?: string;
65
- hookEventName?: string;
66
- prompt?: string;
67
- text?: string;
68
- last_assistant_message?: string | null;
69
- lastAssistantMessage?: string | null;
70
- stop_hook_active?: boolean;
71
- stopHookActive?: boolean;
72
- whispered_memory_ids?: string[] | null;
73
- whisperedMemoryIds?: string[] | null;
74
- tool_name?: string | null;
75
- toolName?: string | null;
76
- tool_input?: Record<string, unknown> | null;
77
- toolInput?: Record<string, unknown> | null;
78
- tool_response?: Record<string, unknown> | null;
79
- toolResponse?: Record<string, unknown> | null;
80
- user_id?: string | null;
81
- userId?: string | null;
82
- project_id?: string | null;
83
- projectId?: string | null;
84
- session_id?: string | null;
85
- sessionId?: string | null;
86
- model?: string;
87
- commit_writes?: boolean;
88
- commitWrites?: boolean;
89
- top_k?: number;
90
- topK?: number;
91
- client_raw_tokens_delta?: number;
92
- clientRawTokensDelta?: number;
93
- client_dropped_tokens_delta?: number;
94
- clientDroppedTokensDelta?: number;
95
- client_dropped_events_delta?: number;
96
- clientDroppedEventsDelta?: number;
124
+ hook_event_name?: string;
125
+ hookEventName?: string;
126
+ prompt?: string;
127
+ text?: string;
128
+ last_assistant_message?: string | null;
129
+ lastAssistantMessage?: string | null;
130
+ stop_hook_active?: boolean;
131
+ stopHookActive?: boolean;
132
+ whispered_memory_ids?: string[] | null;
133
+ whisperedMemoryIds?: string[] | null;
134
+ tool_name?: string | null;
135
+ toolName?: string | null;
136
+ tool_input?: Record<string, unknown> | null;
137
+ toolInput?: Record<string, unknown> | null;
138
+ tool_response?: Record<string, unknown> | null;
139
+ toolResponse?: Record<string, unknown> | null;
140
+ user_id?: string | null;
141
+ userId?: string | null;
142
+ project_id?: string | null;
143
+ projectId?: string | null;
144
+ session_id?: string | null;
145
+ sessionId?: string | null;
146
+ model?: string;
147
+ commit_writes?: boolean;
148
+ commitWrites?: boolean;
149
+ top_k?: number;
150
+ topK?: number;
151
+ client_raw_tokens_delta?: number;
152
+ clientRawTokensDelta?: number;
153
+ client_dropped_tokens_delta?: number;
154
+ clientDroppedTokensDelta?: number;
155
+ client_dropped_events_delta?: number;
156
+ clientDroppedEventsDelta?: number;
97
157
  }
98
-
99
158
  export interface StatusOptions {
100
- user_id?: string | null;
101
- userId?: string | null;
102
- client_raw_tokens_delta?: number;
103
- clientRawTokensDelta?: number;
104
- client_dropped_tokens_delta?: number;
105
- clientDroppedTokensDelta?: number;
106
- client_dropped_events_delta?: number;
107
- clientDroppedEventsDelta?: number;
159
+ user_id?: string | null;
160
+ userId?: string | null;
161
+ client_raw_tokens_delta?: number;
162
+ clientRawTokensDelta?: number;
163
+ client_dropped_tokens_delta?: number;
164
+ clientDroppedTokensDelta?: number;
165
+ client_dropped_events_delta?: number;
166
+ clientDroppedEventsDelta?: number;
108
167
  }
109
-
110
168
  export declare class SlashMLAPIError extends Error {
111
- readonly statusCode: number;
112
- readonly details: Record<string, unknown>;
113
- constructor(statusCode: number, message: string, details?: Record<string, unknown>);
169
+ readonly statusCode: number;
170
+ readonly details: Record<string, unknown>;
171
+ constructor(statusCode: number, message: string, details?: Record<string, unknown>);
114
172
  }
115
-
116
173
  export declare class ProjectManager {
117
- constructor(client: MemoryClient);
118
- get(fields?: string[]): Promise<Record<string, unknown>>;
119
- create(
120
- name: string,
121
- description?: string,
122
- extra?: Record<string, unknown>,
123
- ): Promise<Record<string, unknown>>;
124
- update(settings?: Record<string, unknown>): Promise<Record<string, unknown>>;
125
- delete(): Promise<Record<string, unknown>>;
126
- getMembers(): Promise<Record<string, unknown>>;
127
- get_members(): Promise<Record<string, unknown>>;
128
- addMember(email: string, role?: string): Promise<Record<string, unknown>>;
129
- add_member(email: string, role?: string): Promise<Record<string, unknown>>;
130
- removeMember(email: string): Promise<Record<string, unknown>>;
131
- remove_member(email: string): Promise<Record<string, unknown>>;
174
+ private readonly client;
175
+ constructor(client: MemoryClient);
176
+ get(fieldsOrOptions?: string[] | {
177
+ fields?: string[];
178
+ }): Promise<Record<string, unknown>>;
179
+ create(nameOrOptions: string | {
180
+ name: string;
181
+ description?: string;
182
+ [k: string]: unknown;
183
+ }, description?: string, extra?: Record<string, unknown>): Promise<Record<string, unknown>>;
184
+ update(settings?: Record<string, unknown>): Promise<Record<string, unknown>>;
185
+ delete(): Promise<Record<string, unknown>>;
186
+ getMembers(): Promise<Record<string, unknown>>;
187
+ get_members(): Promise<Record<string, unknown>>;
188
+ addMember(emailOrOptions: string | {
189
+ email: string;
190
+ role?: string;
191
+ }, role?: string): Promise<Record<string, unknown>>;
192
+ add_member(emailOrOptions: string | {
193
+ email: string;
194
+ role?: string;
195
+ }, role?: string): Promise<Record<string, unknown>>;
196
+ removeMember(emailOrOptions: string | {
197
+ email: string;
198
+ }): Promise<Record<string, unknown>>;
199
+ remove_member(emailOrOptions: string | {
200
+ email: string;
201
+ }): Promise<Record<string, unknown>>;
132
202
  }
133
-
134
203
  export declare class MemoryClient {
135
- readonly apiKey: string;
136
- readonly baseUrl: string;
137
- readonly orgId: string | null;
138
- readonly projectId: string | null;
139
- readonly model: string;
140
- readonly timeoutMs: number;
141
- readonly project: ProjectManager;
142
- constructor(options?: MemoryClientOptions);
143
- request<T = Record<string, unknown>>(
144
- method: string,
145
- path: string,
146
- options?: {
147
- params?: Record<string, unknown>;
148
- jsonBody?: Record<string, unknown>;
149
- },
150
- ): Promise<T>;
151
- ingest(documents: string | string[], options?: IngestOptions): Promise<Record<string, unknown>>;
152
- query(prompt: string, options?: QueryOptions): Promise<Record<string, unknown>>;
153
- forget(target: string, options?: ForgetOptions): Promise<Record<string, unknown>>;
154
- intervene(
155
- textOrPayload: string | InterveneOptions,
156
- options?: InterveneOptions,
157
- ): Promise<Record<string, unknown>>;
158
- status(options?: StatusOptions): Promise<Record<string, unknown>>;
159
- add(
160
- messages: string | Array<Record<string, unknown>> | Record<string, unknown>,
161
- options?: AddMemoryOptions,
162
- ): Promise<Record<string, unknown>>;
163
- search(
164
- queryOrOptions: string | ({ query: string } & SearchMemoryOptions),
165
- options?: SearchMemoryOptions,
166
- ): Promise<Record<string, unknown>>;
167
- recall(
168
- queryOrOptions: string | ({ query: string } & SearchMemoryOptions),
169
- options?: SearchMemoryOptions,
170
- ): Promise<Record<string, unknown>>;
171
- getAll(options?: MemoryFilters & { limit?: number }): Promise<Record<string, unknown>>;
172
- get_all(options?: MemoryFilters & { limit?: number }): Promise<Record<string, unknown>>;
173
- get(memoryId: string): Promise<Record<string, unknown> | null>;
174
- update(
175
- memoryId: string,
176
- data: string | { text?: string; metadata?: Record<string, unknown> },
177
- ): Promise<Record<string, unknown>>;
178
- delete(memoryId: string): Promise<Record<string, unknown>>;
179
- deleteAll(options?: MemoryFilters): Promise<Record<string, unknown>>;
180
- delete_all(options?: MemoryFilters): Promise<Record<string, unknown>>;
181
- reset(): Promise<Record<string, unknown>>;
182
- history(memoryId: string): Promise<Array<Record<string, unknown>>>;
183
- batchUpdate(memories: Array<Record<string, unknown>>): Promise<Record<string, unknown>>;
184
- batch_update(memories: Array<Record<string, unknown>>): Promise<Record<string, unknown>>;
185
- batchDelete(memories: Array<string | Record<string, unknown>>): Promise<Record<string, unknown>>;
186
- batch_delete(memories: Array<string | Record<string, unknown>>): Promise<Record<string, unknown>>;
187
- users(): Promise<Record<string, unknown>>;
188
- deleteUsers(options?: MemoryFilters): Promise<Record<string, unknown>>;
189
- delete_users(options?: MemoryFilters): Promise<Record<string, unknown>>;
190
- feedback(
191
- memoryIdOrPayload:
192
- | string
193
- | {
194
- memory_id?: string;
195
- memoryId?: string;
196
- feedback?: string;
197
- feedback_reason?: string;
198
- feedbackReason?: string;
199
- },
200
- feedback?: string,
201
- feedbackReason?: string,
202
- ): Promise<Record<string, unknown>>;
203
- getProject(fields?: string[]): Promise<Record<string, unknown>>;
204
- get_project(fields?: string[]): Promise<Record<string, unknown>>;
205
- updateProject(settings?: Record<string, unknown>): Promise<Record<string, unknown>>;
206
- update_project(settings?: Record<string, unknown>): Promise<Record<string, unknown>>;
207
- getWebhooks(projectId?: string): Promise<Record<string, unknown>>;
208
- get_webhooks(projectId?: string): Promise<Record<string, unknown>>;
209
- createWebhook(options: {
210
- url: string;
211
- name: string;
212
- event_types?: string[];
213
- eventTypes?: string[];
214
- project_id?: string;
215
- projectId?: string;
216
- }): Promise<Record<string, unknown>>;
217
- create_webhook(options: {
218
- url: string;
219
- name: string;
220
- event_types?: string[];
221
- eventTypes?: string[];
222
- project_id?: string;
223
- projectId?: string;
224
- }): Promise<Record<string, unknown>>;
225
- updateWebhook(
226
- webhookId: string | number,
227
- options?: {
228
- name?: string;
229
- url?: string;
230
- event_types?: string[];
231
- eventTypes?: string[];
232
- project_id?: string;
233
- projectId?: string;
234
- },
235
- ): Promise<Record<string, unknown>>;
236
- update_webhook(
237
- webhookId: string | number,
238
- options?: {
239
- name?: string;
240
- url?: string;
241
- event_types?: string[];
242
- eventTypes?: string[];
243
- project_id?: string;
244
- projectId?: string;
245
- },
246
- ): Promise<Record<string, unknown>>;
247
- deleteWebhook(webhookId: string | number): Promise<Record<string, unknown>>;
248
- delete_webhook(webhookId: string | number): Promise<Record<string, unknown>>;
204
+ readonly apiKey: string;
205
+ readonly baseUrl: string;
206
+ readonly orgId: string | null;
207
+ readonly projectId: string | null;
208
+ readonly model: string;
209
+ readonly timeoutMs: number;
210
+ readonly project: ProjectManager;
211
+ private readonly fetchImpl;
212
+ constructor(options?: MemoryClientOptions);
213
+ request<T = Record<string, unknown>>(method: string, path: string, options?: {
214
+ params?: Record<string, unknown>;
215
+ jsonBody?: Record<string, unknown>;
216
+ }): Promise<T>;
217
+ ingest(documents: string | string[], options?: IngestOptions): Promise<Record<string, unknown>>;
218
+ query(prompt: string, options?: QueryOptions): Promise<Record<string, unknown>>;
219
+ forget(target: string, options?: ForgetOptions): Promise<Record<string, unknown>>;
220
+ intervene(textOrPayload: string | InterveneOptions, options?: InterveneOptions): Promise<Record<string, unknown>>;
221
+ status(options?: StatusOptions): Promise<Record<string, unknown>>;
222
+ addRule(text: string, options?: {
223
+ rule_id?: string;
224
+ ruleId?: string;
225
+ do?: string;
226
+ dont?: string;
227
+ scope?: RuleScope | RuleScopePattern;
228
+ user_id?: string;
229
+ userId?: string;
230
+ metadata?: Record<string, unknown>;
231
+ }): Promise<Record<string, unknown>>;
232
+ add_rule(text: string, options?: {
233
+ rule_id?: string;
234
+ ruleId?: string;
235
+ do?: string;
236
+ dont?: string;
237
+ scope?: RuleScope | RuleScopePattern;
238
+ user_id?: string;
239
+ userId?: string;
240
+ metadata?: Record<string, unknown>;
241
+ }): Promise<Record<string, unknown>>;
242
+ getCacheAlignedPrompt(userTurn: string, options?: {
243
+ activeContext?: Record<string, unknown>;
244
+ top_k?: number;
245
+ userId?: string;
246
+ user_id?: string;
247
+ enableCacheBreakpoint?: boolean;
248
+ }): Promise<CacheAlignedPromptResult>;
249
+ get_cache_aligned_prompt(userTurn: string, options?: {
250
+ activeContext?: Record<string, unknown>;
251
+ top_k?: number;
252
+ userId?: string;
253
+ user_id?: string;
254
+ enableCacheBreakpoint?: boolean;
255
+ }): Promise<CacheAlignedPromptResult>;
256
+ add(messages: string | Array<Record<string, unknown>> | Record<string, unknown>, options?: AddMemoryOptions): Promise<Record<string, unknown>>;
257
+ search(queryOrOptions: string | ({
258
+ query: string;
259
+ } & SearchMemoryOptions), options?: SearchMemoryOptions): Promise<Record<string, unknown>>;
260
+ recall(queryOrOptions: string | ({
261
+ query: string;
262
+ } & SearchMemoryOptions), options?: SearchMemoryOptions): Promise<Record<string, unknown>>;
263
+ getAll(options?: MemoryFilters & {
264
+ limit?: number;
265
+ }): Promise<Record<string, unknown>>;
266
+ get_all(options?: MemoryFilters & {
267
+ limit?: number;
268
+ }): Promise<Record<string, unknown>>;
269
+ get(memoryId: string): Promise<Record<string, unknown> | null>;
270
+ update(memoryId: string, data: string | {
271
+ text?: string;
272
+ metadata?: Record<string, unknown>;
273
+ }): Promise<Record<string, unknown>>;
274
+ delete(memoryId: string): Promise<Record<string, unknown>>;
275
+ deleteAll(options?: MemoryFilters): Promise<Record<string, unknown>>;
276
+ delete_all(options?: MemoryFilters): Promise<Record<string, unknown>>;
277
+ reset(): Promise<Record<string, unknown>>;
278
+ history(memoryId: string): Promise<Array<Record<string, unknown>>>;
279
+ batchUpdate(memories: Array<Record<string, unknown>>): Promise<Record<string, unknown>>;
280
+ batch_update(memories: Array<Record<string, unknown>>): Promise<Record<string, unknown>>;
281
+ batchDelete(memories: Array<string | Record<string, unknown>>): Promise<Record<string, unknown>>;
282
+ batch_delete(memories: Array<string | Record<string, unknown>>): Promise<Record<string, unknown>>;
283
+ users(): Promise<Record<string, unknown>>;
284
+ deleteUsers(options?: MemoryFilters): Promise<Record<string, unknown>>;
285
+ delete_users(options?: MemoryFilters): Promise<Record<string, unknown>>;
286
+ feedback(memoryIdOrPayload: string | {
287
+ memory_id?: string;
288
+ memoryId?: string;
289
+ feedback?: string;
290
+ feedback_reason?: string;
291
+ feedbackReason?: string;
292
+ }, feedback?: string, feedbackReason?: string): Promise<Record<string, unknown>>;
293
+ getProject(fields?: string[]): Promise<Record<string, unknown>>;
294
+ get_project(fields?: string[]): Promise<Record<string, unknown>>;
295
+ updateProject(settings?: Record<string, unknown>): Promise<Record<string, unknown>>;
296
+ update_project(settings?: Record<string, unknown>): Promise<Record<string, unknown>>;
297
+ getWebhooks(projectId?: string): Promise<Record<string, unknown>>;
298
+ get_webhooks(projectId?: string): Promise<Record<string, unknown>>;
299
+ createWebhook(options: {
300
+ url: string;
301
+ name: string;
302
+ event_types?: string[];
303
+ eventTypes?: string[];
304
+ project_id?: string;
305
+ projectId?: string;
306
+ }): Promise<Record<string, unknown>>;
307
+ create_webhook(options: {
308
+ url: string;
309
+ name: string;
310
+ event_types?: string[];
311
+ eventTypes?: string[];
312
+ project_id?: string;
313
+ projectId?: string;
314
+ }): Promise<Record<string, unknown>>;
315
+ updateWebhook(webhookIdOrOptions: string | number | {
316
+ webhook_id?: string | number;
317
+ webhookId?: string | number;
318
+ name?: string;
319
+ url?: string;
320
+ event_types?: string[];
321
+ eventTypes?: string[];
322
+ project_id?: string;
323
+ projectId?: string;
324
+ }, options?: {
325
+ name?: string;
326
+ url?: string;
327
+ event_types?: string[];
328
+ eventTypes?: string[];
329
+ project_id?: string;
330
+ projectId?: string;
331
+ }): Promise<Record<string, unknown>>;
332
+ update_webhook(webhookIdOrOptions: string | number | {
333
+ webhook_id?: string | number;
334
+ webhookId?: string | number;
335
+ name?: string;
336
+ url?: string;
337
+ event_types?: string[];
338
+ eventTypes?: string[];
339
+ project_id?: string;
340
+ projectId?: string;
341
+ }, options?: {
342
+ name?: string;
343
+ url?: string;
344
+ event_types?: string[];
345
+ eventTypes?: string[];
346
+ project_id?: string;
347
+ projectId?: string;
348
+ }): Promise<Record<string, unknown>>;
349
+ deleteWebhook(webhookIdOrOptions: string | number | {
350
+ webhook_id?: string | number;
351
+ webhookId?: string | number;
352
+ }): Promise<Record<string, unknown>>;
353
+ delete_webhook(webhookIdOrOptions: string | number | {
354
+ webhook_id?: string | number;
355
+ webhookId?: string | number;
356
+ }): Promise<Record<string, unknown>>;
249
357
  }
250
-
358
+ /**
359
+ * Drop-in Mem0-compatible `Memory` class backed by the / ml Cloud API.
360
+ */
251
361
  export declare class Memory extends MemoryClient {
252
- static fromConfig(configDict?: Record<string, unknown>): Memory;
253
- static from_config(configDict?: Record<string, unknown>): Memory;
362
+ static fromConfig<T extends typeof Memory>(this: T, configDict?: Record<string, unknown>): InstanceType<T>;
363
+ static from_config<T extends typeof Memory>(this: T, configDict?: Record<string, unknown>): InstanceType<T>;
364
+ }
365
+ export declare class AsyncMemoryClient extends MemoryClient {
366
+ }
367
+ export declare class AsyncMemory extends Memory {
368
+ }
369
+ export declare class SlashMLMemory extends MemoryClient {
370
+ }
371
+ export declare class SlashMLClient extends MemoryClient {
372
+ }
373
+ export declare class AsyncSlashMLMemory extends MemoryClient {
374
+ }
375
+ export declare class AsyncSlashMLClient extends MemoryClient {
254
376
  }
255
-
256
- export declare class AsyncMemoryClient extends MemoryClient {}
257
- export declare class AsyncMemory extends Memory {}
258
- export declare class SlashMLMemory extends MemoryClient {}
259
- export declare class SlashMLClient extends MemoryClient {}
260
- export declare class AsyncSlashMLMemory extends MemoryClient {}
261
- export declare class AsyncSlashMLClient extends MemoryClient {}
262
-
263
377
  export default Memory;