@papr/memory 1.8.3 → 1.10.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/CHANGELOG.md +28 -0
- package/README.md +2 -2
- package/client.d.mts +17 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +17 -5
- package/client.d.ts.map +1 -1
- package/client.js +24 -11
- package/client.js.map +1 -1
- package/client.mjs +24 -11
- package/client.mjs.map +1 -1
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/internal/request-options.d.mts +42 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +42 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/uploads.js +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +4 -3
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +4 -3
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js +26 -5
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +26 -5
- package/internal/utils/path.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/feedback.d.mts +333 -0
- package/resources/feedback.d.mts.map +1 -0
- package/resources/feedback.d.ts +333 -0
- package/resources/feedback.d.ts.map +1 -0
- package/resources/feedback.js +108 -0
- package/resources/feedback.js.map +1 -0
- package/resources/feedback.mjs +104 -0
- package/resources/feedback.mjs.map +1 -0
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/memory.d.mts +66 -12
- package/resources/memory.d.mts.map +1 -1
- package/resources/memory.d.ts +66 -12
- package/resources/memory.d.ts.map +1 -1
- package/resources/memory.js +11 -0
- package/resources/memory.js.map +1 -1
- package/resources/memory.mjs +11 -0
- package/resources/memory.mjs.map +1 -1
- package/resources/user.d.mts +12 -4
- package/resources/user.d.mts.map +1 -1
- package/resources/user.d.ts +12 -4
- package/resources/user.d.ts.map +1 -1
- package/src/client.ts +55 -14
- package/src/index.ts +2 -0
- package/src/internal/request-options.ts +53 -0
- package/src/internal/uploads.ts +1 -1
- package/src/internal/utils/log.ts +3 -2
- package/src/internal/utils/path.ts +32 -7
- package/src/resources/feedback.ts +424 -0
- package/src/resources/index.ts +9 -0
- package/src/resources/memory.ts +74 -13
- package/src/resources/user.ts +4 -4
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/src/resources/memory.ts
CHANGED
|
@@ -167,6 +167,17 @@ export class Memory extends APIResource {
|
|
|
167
167
|
*
|
|
168
168
|
* The API supports response compression for improved performance. Responses larger than 1KB will be automatically compressed when this header is present.
|
|
169
169
|
*
|
|
170
|
+
* **HIGHLY RECOMMENDED SETTINGS FOR BEST RESULTS:**
|
|
171
|
+
* - Set `enable_agentic_graph: true` for intelligent, context-aware search that can understand ambiguous references
|
|
172
|
+
* - Use `max_memories: 15-20` for comprehensive memory coverage
|
|
173
|
+
* - Use `max_nodes: 10-15` for comprehensive graph entity relationships
|
|
174
|
+
*
|
|
175
|
+
* **Agentic Graph Benefits:**
|
|
176
|
+
* When enabled, the system can understand vague references by first identifying specific entities from your memory graph, then performing targeted searches. For example:
|
|
177
|
+
* - "customer feedback" → identifies your customers first, then finds their specific feedback
|
|
178
|
+
* - "project issues" → identifies your projects first, then finds related issues
|
|
179
|
+
* - "team meeting notes" → identifies your team members first, then finds meeting notes
|
|
180
|
+
*
|
|
170
181
|
* **User Resolution Precedence:**
|
|
171
182
|
* - If both user_id and external_user_id are provided, user_id takes precedence.
|
|
172
183
|
* - If only external_user_id is provided, it will be resolved to the internal user.
|
|
@@ -282,6 +293,8 @@ export interface ContextItem {
|
|
|
282
293
|
* Metadata for memory request
|
|
283
294
|
*/
|
|
284
295
|
export interface MemoryMetadata {
|
|
296
|
+
assistantMessage?: string | null;
|
|
297
|
+
|
|
285
298
|
conversationId?: string | null;
|
|
286
299
|
|
|
287
300
|
/**
|
|
@@ -305,6 +318,8 @@ export interface MemoryMetadata {
|
|
|
305
318
|
|
|
306
319
|
external_user_write_access?: Array<string> | null;
|
|
307
320
|
|
|
321
|
+
goalClassificationScores?: Array<number> | null;
|
|
322
|
+
|
|
308
323
|
/**
|
|
309
324
|
* Hierarchical structures to enable navigation from broad topics to specific ones
|
|
310
325
|
*/
|
|
@@ -314,22 +329,38 @@ export interface MemoryMetadata {
|
|
|
314
329
|
|
|
315
330
|
pageId?: string | null;
|
|
316
331
|
|
|
332
|
+
post?: string | null;
|
|
333
|
+
|
|
334
|
+
relatedGoals?: Array<string> | null;
|
|
335
|
+
|
|
336
|
+
relatedSteps?: Array<string> | null;
|
|
337
|
+
|
|
338
|
+
relatedUseCases?: Array<string> | null;
|
|
339
|
+
|
|
317
340
|
role_read_access?: Array<string> | null;
|
|
318
341
|
|
|
319
342
|
role_write_access?: Array<string> | null;
|
|
320
343
|
|
|
344
|
+
sessionId?: string | null;
|
|
345
|
+
|
|
321
346
|
sourceType?: string | null;
|
|
322
347
|
|
|
323
348
|
sourceUrl?: string | null;
|
|
324
349
|
|
|
350
|
+
stepClassificationScores?: Array<number> | null;
|
|
351
|
+
|
|
325
352
|
topics?: Array<string> | null;
|
|
326
353
|
|
|
354
|
+
useCaseClassificationScores?: Array<number> | null;
|
|
355
|
+
|
|
327
356
|
user_id?: string | null;
|
|
328
357
|
|
|
329
358
|
user_read_access?: Array<string> | null;
|
|
330
359
|
|
|
331
360
|
user_write_access?: Array<string> | null;
|
|
332
361
|
|
|
362
|
+
userMessage?: string | null;
|
|
363
|
+
|
|
333
364
|
workspace_id?: string | null;
|
|
334
365
|
|
|
335
366
|
workspace_read_access?: Array<string> | null;
|
|
@@ -348,13 +379,21 @@ export type MemoryType = 'text' | 'code_snippet' | 'document';
|
|
|
348
379
|
* Relationship item for memory request
|
|
349
380
|
*/
|
|
350
381
|
export interface RelationshipItem {
|
|
351
|
-
|
|
382
|
+
relation_type: string;
|
|
352
383
|
|
|
353
|
-
|
|
384
|
+
metadata?: { [key: string]: unknown };
|
|
354
385
|
|
|
355
|
-
|
|
386
|
+
related_item_id?: string | null;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Legacy field - not used in processing
|
|
390
|
+
*/
|
|
391
|
+
related_item_type?: string | null;
|
|
356
392
|
|
|
357
|
-
|
|
393
|
+
/**
|
|
394
|
+
* Enum for relationship types
|
|
395
|
+
*/
|
|
396
|
+
relationship_type?: 'previous_memory_item_id' | 'all_previous_memory_items' | 'link_to_id' | null;
|
|
358
397
|
}
|
|
359
398
|
|
|
360
399
|
export interface SearchResponse {
|
|
@@ -378,6 +417,12 @@ export interface SearchResponse {
|
|
|
378
417
|
*/
|
|
379
418
|
error?: string | null;
|
|
380
419
|
|
|
420
|
+
/**
|
|
421
|
+
* Unique identifier for this search query, maps to QueryLog objectId in Parse
|
|
422
|
+
* Server
|
|
423
|
+
*/
|
|
424
|
+
search_id?: string | null;
|
|
425
|
+
|
|
381
426
|
/**
|
|
382
427
|
* 'success' or 'error'
|
|
383
428
|
*/
|
|
@@ -417,7 +462,7 @@ export namespace SearchResponse {
|
|
|
417
462
|
|
|
418
463
|
current_step?: string | null;
|
|
419
464
|
|
|
420
|
-
customMetadata?: unknown | null;
|
|
465
|
+
customMetadata?: { [key: string]: unknown } | null;
|
|
421
466
|
|
|
422
467
|
external_user_id?: string | null;
|
|
423
468
|
|
|
@@ -433,7 +478,7 @@ export namespace SearchResponse {
|
|
|
433
478
|
|
|
434
479
|
location?: string | null;
|
|
435
480
|
|
|
436
|
-
metadata?: string | unknown | null;
|
|
481
|
+
metadata?: string | { [key: string]: unknown } | null;
|
|
437
482
|
|
|
438
483
|
page?: string | null;
|
|
439
484
|
|
|
@@ -1066,6 +1111,8 @@ export namespace MemoryDeleteResponse {
|
|
|
1066
1111
|
parse?: boolean;
|
|
1067
1112
|
|
|
1068
1113
|
pinecone?: boolean;
|
|
1114
|
+
|
|
1115
|
+
qdrant?: boolean;
|
|
1069
1116
|
}
|
|
1070
1117
|
}
|
|
1071
1118
|
|
|
@@ -1230,25 +1277,39 @@ export interface MemorySearchParams {
|
|
|
1230
1277
|
/**
|
|
1231
1278
|
* Body param: Detailed search query describing what you're looking for. For best
|
|
1232
1279
|
* results, write 2-3 sentences that include specific details, context, and time
|
|
1233
|
-
* frame.
|
|
1234
|
-
*
|
|
1235
|
-
*
|
|
1280
|
+
* frame. Examples: 'Find recurring customer complaints about API performance from
|
|
1281
|
+
* the last month. Focus on issues where customers specifically mentioned timeout
|
|
1282
|
+
* errors or slow response times in their conversations.' 'What are the main issues
|
|
1283
|
+
* and blockers in my current projects? Focus on technical challenges and timeline
|
|
1284
|
+
* impacts.' 'Find insights about team collaboration and communication patterns
|
|
1285
|
+
* from recent meetings and discussions.'
|
|
1236
1286
|
*/
|
|
1237
1287
|
query: string;
|
|
1238
1288
|
|
|
1239
1289
|
/**
|
|
1240
|
-
* Query param: Maximum number of memories to return
|
|
1290
|
+
* Query param: HIGHLY RECOMMENDED: Maximum number of memories to return. Use at
|
|
1291
|
+
* least 15-20 for comprehensive results. Lower values (5-10) may miss relevant
|
|
1292
|
+
* information. Default is 20 for optimal coverage.
|
|
1241
1293
|
*/
|
|
1242
1294
|
max_memories?: number;
|
|
1243
1295
|
|
|
1244
1296
|
/**
|
|
1245
|
-
* Query param: Maximum number of neo nodes to return
|
|
1297
|
+
* Query param: HIGHLY RECOMMENDED: Maximum number of neo nodes to return. Use at
|
|
1298
|
+
* least 10-15 for comprehensive graph results. Lower values may miss important
|
|
1299
|
+
* entity relationships. Default is 15 for optimal coverage.
|
|
1246
1300
|
*/
|
|
1247
1301
|
max_nodes?: number;
|
|
1248
1302
|
|
|
1249
1303
|
/**
|
|
1250
|
-
* Body param:
|
|
1251
|
-
*
|
|
1304
|
+
* Body param: HIGHLY RECOMMENDED: Enable agentic graph search for intelligent,
|
|
1305
|
+
* context-aware results. When enabled, the system can understand ambiguous
|
|
1306
|
+
* references by first identifying specific entities from your memory graph, then
|
|
1307
|
+
* performing targeted searches. Examples: 'customer feedback' → identifies your
|
|
1308
|
+
* customers first, then finds their specific feedback; 'project issues' →
|
|
1309
|
+
* identifies your projects first, then finds related issues; 'team meeting notes'
|
|
1310
|
+
* → identifies team members first, then finds meeting notes. This provides much
|
|
1311
|
+
* more relevant and comprehensive results. Set to false only if you need faster,
|
|
1312
|
+
* simpler keyword-based search.
|
|
1252
1313
|
*/
|
|
1253
1314
|
enable_agentic_graph?: boolean;
|
|
1254
1315
|
|
package/src/resources/user.ts
CHANGED
|
@@ -118,7 +118,7 @@ export interface UserResponse {
|
|
|
118
118
|
|
|
119
119
|
external_id?: string | null;
|
|
120
120
|
|
|
121
|
-
metadata?: unknown | null;
|
|
121
|
+
metadata?: { [key: string]: unknown } | null;
|
|
122
122
|
|
|
123
123
|
updated_at?: string | null;
|
|
124
124
|
|
|
@@ -212,7 +212,7 @@ export interface UserCreateParams {
|
|
|
212
212
|
|
|
213
213
|
email?: string | null;
|
|
214
214
|
|
|
215
|
-
metadata?: unknown | null;
|
|
215
|
+
metadata?: { [key: string]: unknown } | null;
|
|
216
216
|
|
|
217
217
|
type?: UserType;
|
|
218
218
|
}
|
|
@@ -222,7 +222,7 @@ export interface UserUpdateParams {
|
|
|
222
222
|
|
|
223
223
|
external_id?: string | null;
|
|
224
224
|
|
|
225
|
-
metadata?: unknown | null;
|
|
225
|
+
metadata?: { [key: string]: unknown } | null;
|
|
226
226
|
|
|
227
227
|
type?: UserType | null;
|
|
228
228
|
}
|
|
@@ -257,7 +257,7 @@ export namespace UserCreateBatchParams {
|
|
|
257
257
|
|
|
258
258
|
email?: string | null;
|
|
259
259
|
|
|
260
|
-
metadata?: unknown | null;
|
|
260
|
+
metadata?: { [key: string]: unknown } | null;
|
|
261
261
|
|
|
262
262
|
type?: UserAPI.UserType;
|
|
263
263
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.10.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.10.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.10.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.10.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
|