@memnexus-ai/typescript-sdk 1.53.27 → 1.53.29

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
@@ -116,6 +116,36 @@ interface Hook {
116
116
  afterResponse(request: HttpRequest, response: HttpResponse<any>, params: Map<string, string>): Promise<HttpResponse<any>>;
117
117
  onError(request: HttpRequest, response: HttpResponse<any>, params: Map<string, string>): Promise<HttpError>;
118
118
  }
119
+ /**
120
+ * Typed error thrown by the SDK for non-2xx HTTP responses.
121
+ * Use `instanceof SdkError` to catch API errors and access the status code directly.
122
+ *
123
+ * @example
124
+ * ```ts
125
+ * try {
126
+ * await sdk.memories.createMemory({ name: 'my-note', content: '...' });
127
+ * } catch (e) {
128
+ * if (e instanceof SdkError && e.status === 409) {
129
+ * // Named memory already exists — upsert via updateNamedMemory
130
+ * }
131
+ * }
132
+ * ```
133
+ */
134
+ declare class SdkError extends Error {
135
+ /** HTTP status code (e.g. 404, 409) */
136
+ readonly status: number;
137
+ /** HTTP status text (e.g. "Not Found") */
138
+ readonly statusText: string;
139
+ /** Parsed response body, if any */
140
+ readonly data: unknown;
141
+ constructor(
142
+ /** HTTP status code (e.g. 404, 409) */
143
+ status: number,
144
+ /** HTTP status text (e.g. "Not Found") */
145
+ statusText: string,
146
+ /** Parsed response body, if any */
147
+ data: unknown, message: string);
148
+ }
119
149
 
120
150
  /**
121
151
  * Request builder for constructing HTTP requests.
@@ -320,6 +350,8 @@ declare const memory: z.ZodObject<{
320
350
  userTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
321
351
  /** Topics automatically extracted from content */
322
352
  extractedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
353
+ /** Agent session ID that created this memory (MCP session ID or CLI session UUID). Used to group memories by agent instance for conversation threading. */
354
+ agentSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
323
355
  /** Entities extracted from memory content */
324
356
  entities: z.ZodOptional<z.ZodArray<z.ZodObject<{
325
357
  /** Entity name */
@@ -361,6 +393,7 @@ declare const memory: z.ZodObject<{
361
393
  extractedEntityCount?: number | undefined;
362
394
  userTopics?: string[] | undefined;
363
395
  extractedTopics?: string[] | undefined;
396
+ agentSessionId?: string | null | undefined;
364
397
  entities?: {
365
398
  type: string;
366
399
  name: string;
@@ -390,6 +423,7 @@ declare const memory: z.ZodObject<{
390
423
  extractedEntityCount?: number | undefined;
391
424
  userTopics?: string[] | undefined;
392
425
  extractedTopics?: string[] | undefined;
426
+ agentSessionId?: string | null | undefined;
393
427
  entities?: {
394
428
  type: string;
395
429
  name: string;
@@ -399,7 +433,8 @@ declare const memory: z.ZodObject<{
399
433
  declare const createMemoryRequest: z.ZodObject<{
400
434
  /** Conversation ID - use "NEW" to create a new conversation or provide existing conversation ID */
401
435
  conversationId: z.ZodString;
402
- /** AI agent session ID (e.g. Claude Code session UUID). When provided with conversationId "NEW", reuses the existing conversation for this session instead of creating a new one. */
436
+ /** Agent session ID (e.g. MCP session ID, Claude Code session UUID). When provided with conversationId "NEW", reuses the existing conversation for this session instead of creating a new one. Works with any MCP client (Claude, Copilot, Cursor, etc.). */
437
+ agentSessionId: z.ZodOptional<z.ZodString>;
403
438
  claudeSessionId: z.ZodOptional<z.ZodString>;
404
439
  /** Optional human-readable name for deterministic retrieval. Must be unique per user. */
405
440
  name: z.ZodOptional<z.ZodString>;
@@ -429,6 +464,7 @@ declare const createMemoryRequest: z.ZodObject<{
429
464
  eventTime?: string | undefined;
430
465
  validFrom?: string | undefined;
431
466
  validTo?: string | undefined;
467
+ agentSessionId?: string | undefined;
432
468
  claudeSessionId?: string | undefined;
433
469
  role?: "user" | "assistant" | "system" | undefined;
434
470
  }, {
@@ -441,6 +477,7 @@ declare const createMemoryRequest: z.ZodObject<{
441
477
  eventTime?: string | undefined;
442
478
  validFrom?: string | undefined;
443
479
  validTo?: string | undefined;
480
+ agentSessionId?: string | undefined;
444
481
  claudeSessionId?: string | undefined;
445
482
  role?: "user" | "assistant" | "system" | undefined;
446
483
  }>;
@@ -539,6 +576,8 @@ declare const createMemoryResponse: z.ZodLazy<z.ZodObject<{
539
576
  userTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
540
577
  /** Topics automatically extracted from content */
541
578
  extractedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
579
+ /** Agent session ID that created this memory (MCP session ID or CLI session UUID). Used to group memories by agent instance for conversation threading. */
580
+ agentSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
542
581
  /** Entities extracted from memory content */
543
582
  entities: z.ZodOptional<z.ZodArray<z.ZodObject<{
544
583
  /** Entity name */
@@ -580,6 +619,7 @@ declare const createMemoryResponse: z.ZodLazy<z.ZodObject<{
580
619
  extractedEntityCount?: number | undefined;
581
620
  userTopics?: string[] | undefined;
582
621
  extractedTopics?: string[] | undefined;
622
+ agentSessionId?: string | null | undefined;
583
623
  entities?: {
584
624
  type: string;
585
625
  name: string;
@@ -609,6 +649,7 @@ declare const createMemoryResponse: z.ZodLazy<z.ZodObject<{
609
649
  extractedEntityCount?: number | undefined;
610
650
  userTopics?: string[] | undefined;
611
651
  extractedTopics?: string[] | undefined;
652
+ agentSessionId?: string | null | undefined;
612
653
  entities?: {
613
654
  type: string;
614
655
  name: string;
@@ -660,6 +701,7 @@ declare const createMemoryResponse: z.ZodLazy<z.ZodObject<{
660
701
  extractedEntityCount?: number | undefined;
661
702
  userTopics?: string[] | undefined;
662
703
  extractedTopics?: string[] | undefined;
704
+ agentSessionId?: string | null | undefined;
663
705
  entities?: {
664
706
  type: string;
665
707
  name: string;
@@ -697,6 +739,7 @@ declare const createMemoryResponse: z.ZodLazy<z.ZodObject<{
697
739
  extractedEntityCount?: number | undefined;
698
740
  userTopics?: string[] | undefined;
699
741
  extractedTopics?: string[] | undefined;
742
+ agentSessionId?: string | null | undefined;
700
743
  entities?: {
701
744
  type: string;
702
745
  name: string;
@@ -758,6 +801,8 @@ declare const relatedMemoryResult: z.ZodObject<{
758
801
  userTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
759
802
  /** Topics automatically extracted from content */
760
803
  extractedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
804
+ /** Agent session ID that created this memory (MCP session ID or CLI session UUID). Used to group memories by agent instance for conversation threading. */
805
+ agentSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
761
806
  /** Entities extracted from memory content */
762
807
  entities: z.ZodOptional<z.ZodArray<z.ZodObject<{
763
808
  /** Entity name */
@@ -799,6 +844,7 @@ declare const relatedMemoryResult: z.ZodObject<{
799
844
  extractedEntityCount?: number | undefined;
800
845
  userTopics?: string[] | undefined;
801
846
  extractedTopics?: string[] | undefined;
847
+ agentSessionId?: string | null | undefined;
802
848
  entities?: {
803
849
  type: string;
804
850
  name: string;
@@ -828,6 +874,7 @@ declare const relatedMemoryResult: z.ZodObject<{
828
874
  extractedEntityCount?: number | undefined;
829
875
  userTopics?: string[] | undefined;
830
876
  extractedTopics?: string[] | undefined;
877
+ agentSessionId?: string | null | undefined;
831
878
  entities?: {
832
879
  type: string;
833
880
  name: string;
@@ -865,6 +912,7 @@ declare const relatedMemoryResult: z.ZodObject<{
865
912
  extractedEntityCount?: number | undefined;
866
913
  userTopics?: string[] | undefined;
867
914
  extractedTopics?: string[] | undefined;
915
+ agentSessionId?: string | null | undefined;
868
916
  entities?: {
869
917
  type: string;
870
918
  name: string;
@@ -899,6 +947,7 @@ declare const relatedMemoryResult: z.ZodObject<{
899
947
  extractedEntityCount?: number | undefined;
900
948
  userTopics?: string[] | undefined;
901
949
  extractedTopics?: string[] | undefined;
950
+ agentSessionId?: string | null | undefined;
902
951
  entities?: {
903
952
  type: string;
904
953
  name: string;
@@ -960,6 +1009,8 @@ declare const getMemoryResponse: z.ZodLazy<z.ZodObject<{
960
1009
  userTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
961
1010
  /** Topics automatically extracted from content */
962
1011
  extractedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1012
+ /** Agent session ID that created this memory (MCP session ID or CLI session UUID). Used to group memories by agent instance for conversation threading. */
1013
+ agentSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
963
1014
  /** Entities extracted from memory content */
964
1015
  entities: z.ZodOptional<z.ZodArray<z.ZodObject<{
965
1016
  /** Entity name */
@@ -1001,6 +1052,7 @@ declare const getMemoryResponse: z.ZodLazy<z.ZodObject<{
1001
1052
  extractedEntityCount?: number | undefined;
1002
1053
  userTopics?: string[] | undefined;
1003
1054
  extractedTopics?: string[] | undefined;
1055
+ agentSessionId?: string | null | undefined;
1004
1056
  entities?: {
1005
1057
  type: string;
1006
1058
  name: string;
@@ -1030,6 +1082,7 @@ declare const getMemoryResponse: z.ZodLazy<z.ZodObject<{
1030
1082
  extractedEntityCount?: number | undefined;
1031
1083
  userTopics?: string[] | undefined;
1032
1084
  extractedTopics?: string[] | undefined;
1085
+ agentSessionId?: string | null | undefined;
1033
1086
  entities?: {
1034
1087
  type: string;
1035
1088
  name: string;
@@ -1061,6 +1114,7 @@ declare const getMemoryResponse: z.ZodLazy<z.ZodObject<{
1061
1114
  extractedEntityCount?: number | undefined;
1062
1115
  userTopics?: string[] | undefined;
1063
1116
  extractedTopics?: string[] | undefined;
1117
+ agentSessionId?: string | null | undefined;
1064
1118
  entities?: {
1065
1119
  type: string;
1066
1120
  name: string;
@@ -1092,6 +1146,7 @@ declare const getMemoryResponse: z.ZodLazy<z.ZodObject<{
1092
1146
  extractedEntityCount?: number | undefined;
1093
1147
  userTopics?: string[] | undefined;
1094
1148
  extractedTopics?: string[] | undefined;
1149
+ agentSessionId?: string | null | undefined;
1095
1150
  entities?: {
1096
1151
  type: string;
1097
1152
  name: string;
@@ -1244,6 +1299,8 @@ declare const batchGetMemoriesResponse: z.ZodLazy<z.ZodObject<{
1244
1299
  userTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1245
1300
  /** Topics automatically extracted from content */
1246
1301
  extractedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1302
+ /** Agent session ID that created this memory (MCP session ID or CLI session UUID). Used to group memories by agent instance for conversation threading. */
1303
+ agentSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1247
1304
  /** Entities extracted from memory content */
1248
1305
  entities: z.ZodOptional<z.ZodArray<z.ZodObject<{
1249
1306
  /** Entity name */
@@ -1285,6 +1342,7 @@ declare const batchGetMemoriesResponse: z.ZodLazy<z.ZodObject<{
1285
1342
  extractedEntityCount?: number | undefined;
1286
1343
  userTopics?: string[] | undefined;
1287
1344
  extractedTopics?: string[] | undefined;
1345
+ agentSessionId?: string | null | undefined;
1288
1346
  entities?: {
1289
1347
  type: string;
1290
1348
  name: string;
@@ -1314,6 +1372,7 @@ declare const batchGetMemoriesResponse: z.ZodLazy<z.ZodObject<{
1314
1372
  extractedEntityCount?: number | undefined;
1315
1373
  userTopics?: string[] | undefined;
1316
1374
  extractedTopics?: string[] | undefined;
1375
+ agentSessionId?: string | null | undefined;
1317
1376
  entities?: {
1318
1377
  type: string;
1319
1378
  name: string;
@@ -1361,6 +1420,7 @@ declare const batchGetMemoriesResponse: z.ZodLazy<z.ZodObject<{
1361
1420
  extractedEntityCount?: number | undefined;
1362
1421
  userTopics?: string[] | undefined;
1363
1422
  extractedTopics?: string[] | undefined;
1423
+ agentSessionId?: string | null | undefined;
1364
1424
  entities?: {
1365
1425
  type: string;
1366
1426
  name: string;
@@ -1397,6 +1457,7 @@ declare const batchGetMemoriesResponse: z.ZodLazy<z.ZodObject<{
1397
1457
  extractedEntityCount?: number | undefined;
1398
1458
  userTopics?: string[] | undefined;
1399
1459
  extractedTopics?: string[] | undefined;
1460
+ agentSessionId?: string | null | undefined;
1400
1461
  entities?: {
1401
1462
  type: string;
1402
1463
  name: string;
@@ -1485,6 +1546,8 @@ declare const graphRAGQueryResponse: z.ZodLazy<z.ZodObject<{
1485
1546
  userTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1486
1547
  /** Topics automatically extracted from content */
1487
1548
  extractedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1549
+ /** Agent session ID that created this memory (MCP session ID or CLI session UUID). Used to group memories by agent instance for conversation threading. */
1550
+ agentSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1488
1551
  /** Entities extracted from memory content */
1489
1552
  entities: z.ZodOptional<z.ZodArray<z.ZodObject<{
1490
1553
  /** Entity name */
@@ -1526,6 +1589,7 @@ declare const graphRAGQueryResponse: z.ZodLazy<z.ZodObject<{
1526
1589
  extractedEntityCount?: number | undefined;
1527
1590
  userTopics?: string[] | undefined;
1528
1591
  extractedTopics?: string[] | undefined;
1592
+ agentSessionId?: string | null | undefined;
1529
1593
  entities?: {
1530
1594
  type: string;
1531
1595
  name: string;
@@ -1555,6 +1619,7 @@ declare const graphRAGQueryResponse: z.ZodLazy<z.ZodObject<{
1555
1619
  extractedEntityCount?: number | undefined;
1556
1620
  userTopics?: string[] | undefined;
1557
1621
  extractedTopics?: string[] | undefined;
1622
+ agentSessionId?: string | null | undefined;
1558
1623
  entities?: {
1559
1624
  type: string;
1560
1625
  name: string;
@@ -1596,6 +1661,7 @@ declare const graphRAGQueryResponse: z.ZodLazy<z.ZodObject<{
1596
1661
  extractedEntityCount?: number | undefined;
1597
1662
  userTopics?: string[] | undefined;
1598
1663
  extractedTopics?: string[] | undefined;
1664
+ agentSessionId?: string | null | undefined;
1599
1665
  entities?: {
1600
1666
  type: string;
1601
1667
  name: string;
@@ -1631,6 +1697,7 @@ declare const graphRAGQueryResponse: z.ZodLazy<z.ZodObject<{
1631
1697
  extractedEntityCount?: number | undefined;
1632
1698
  userTopics?: string[] | undefined;
1633
1699
  extractedTopics?: string[] | undefined;
1700
+ agentSessionId?: string | null | undefined;
1634
1701
  entities?: {
1635
1702
  type: string;
1636
1703
  name: string;
@@ -1696,6 +1763,7 @@ declare const graphRAGQueryResponse: z.ZodLazy<z.ZodObject<{
1696
1763
  extractedEntityCount?: number | undefined;
1697
1764
  userTopics?: string[] | undefined;
1698
1765
  extractedTopics?: string[] | undefined;
1766
+ agentSessionId?: string | null | undefined;
1699
1767
  entities?: {
1700
1768
  type: string;
1701
1769
  name: string;
@@ -1740,6 +1808,7 @@ declare const graphRAGQueryResponse: z.ZodLazy<z.ZodObject<{
1740
1808
  extractedEntityCount?: number | undefined;
1741
1809
  userTopics?: string[] | undefined;
1742
1810
  extractedTopics?: string[] | undefined;
1811
+ agentSessionId?: string | null | undefined;
1743
1812
  entities?: {
1744
1813
  type: string;
1745
1814
  name: string;
@@ -2137,6 +2206,8 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
2137
2206
  userTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2138
2207
  /** Topics automatically extracted from content */
2139
2208
  extractedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2209
+ /** Agent session ID that created this memory (MCP session ID or CLI session UUID). Used to group memories by agent instance for conversation threading. */
2210
+ agentSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2140
2211
  /** Entities extracted from memory content */
2141
2212
  entities: z.ZodOptional<z.ZodArray<z.ZodObject<{
2142
2213
  /** Entity name */
@@ -2178,6 +2249,7 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
2178
2249
  extractedEntityCount?: number | undefined;
2179
2250
  userTopics?: string[] | undefined;
2180
2251
  extractedTopics?: string[] | undefined;
2252
+ agentSessionId?: string | null | undefined;
2181
2253
  entities?: {
2182
2254
  type: string;
2183
2255
  name: string;
@@ -2207,6 +2279,7 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
2207
2279
  extractedEntityCount?: number | undefined;
2208
2280
  userTopics?: string[] | undefined;
2209
2281
  extractedTopics?: string[] | undefined;
2282
+ agentSessionId?: string | null | undefined;
2210
2283
  entities?: {
2211
2284
  type: string;
2212
2285
  name: string;
@@ -2328,6 +2401,7 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
2328
2401
  extractedEntityCount?: number | undefined;
2329
2402
  userTopics?: string[] | undefined;
2330
2403
  extractedTopics?: string[] | undefined;
2404
+ agentSessionId?: string | null | undefined;
2331
2405
  entities?: {
2332
2406
  type: string;
2333
2407
  name: string;
@@ -2389,6 +2463,7 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
2389
2463
  extractedEntityCount?: number | undefined;
2390
2464
  userTopics?: string[] | undefined;
2391
2465
  extractedTopics?: string[] | undefined;
2466
+ agentSessionId?: string | null | undefined;
2392
2467
  entities?: {
2393
2468
  type: string;
2394
2469
  name: string;
@@ -2541,6 +2616,8 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
2541
2616
  userTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2542
2617
  /** Topics automatically extracted from content */
2543
2618
  extractedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2619
+ /** Agent session ID that created this memory (MCP session ID or CLI session UUID). Used to group memories by agent instance for conversation threading. */
2620
+ agentSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2544
2621
  /** Entities extracted from memory content */
2545
2622
  entities: z.ZodOptional<z.ZodArray<z.ZodObject<{
2546
2623
  /** Entity name */
@@ -2582,6 +2659,7 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
2582
2659
  extractedEntityCount?: number | undefined;
2583
2660
  userTopics?: string[] | undefined;
2584
2661
  extractedTopics?: string[] | undefined;
2662
+ agentSessionId?: string | null | undefined;
2585
2663
  entities?: {
2586
2664
  type: string;
2587
2665
  name: string;
@@ -2611,6 +2689,7 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
2611
2689
  extractedEntityCount?: number | undefined;
2612
2690
  userTopics?: string[] | undefined;
2613
2691
  extractedTopics?: string[] | undefined;
2692
+ agentSessionId?: string | null | undefined;
2614
2693
  entities?: {
2615
2694
  type: string;
2616
2695
  name: string;
@@ -2732,6 +2811,7 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
2732
2811
  extractedEntityCount?: number | undefined;
2733
2812
  userTopics?: string[] | undefined;
2734
2813
  extractedTopics?: string[] | undefined;
2814
+ agentSessionId?: string | null | undefined;
2735
2815
  entities?: {
2736
2816
  type: string;
2737
2817
  name: string;
@@ -2793,6 +2873,7 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
2793
2873
  extractedEntityCount?: number | undefined;
2794
2874
  userTopics?: string[] | undefined;
2795
2875
  extractedTopics?: string[] | undefined;
2876
+ agentSessionId?: string | null | undefined;
2796
2877
  entities?: {
2797
2878
  type: string;
2798
2879
  name: string;
@@ -2937,6 +3018,7 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
2937
3018
  extractedEntityCount?: number | undefined;
2938
3019
  userTopics?: string[] | undefined;
2939
3020
  extractedTopics?: string[] | undefined;
3021
+ agentSessionId?: string | null | undefined;
2940
3022
  entities?: {
2941
3023
  type: string;
2942
3024
  name: string;
@@ -3021,6 +3103,7 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
3021
3103
  extractedEntityCount?: number | undefined;
3022
3104
  userTopics?: string[] | undefined;
3023
3105
  extractedTopics?: string[] | undefined;
3106
+ agentSessionId?: string | null | undefined;
3024
3107
  entities?: {
3025
3108
  type: string;
3026
3109
  name: string;
@@ -3636,6 +3719,8 @@ declare const narrativeMemory: z.ZodObject<{
3636
3719
  userTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3637
3720
  /** Topics automatically extracted from content */
3638
3721
  extractedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3722
+ /** Agent session ID that created this memory (MCP session ID or CLI session UUID). Used to group memories by agent instance for conversation threading. */
3723
+ agentSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3639
3724
  /** Entities extracted from memory content */
3640
3725
  entities: z.ZodOptional<z.ZodArray<z.ZodObject<{
3641
3726
  /** Entity name */
@@ -3677,6 +3762,7 @@ declare const narrativeMemory: z.ZodObject<{
3677
3762
  extractedEntityCount?: number | undefined;
3678
3763
  userTopics?: string[] | undefined;
3679
3764
  extractedTopics?: string[] | undefined;
3765
+ agentSessionId?: string | null | undefined;
3680
3766
  entities?: {
3681
3767
  type: string;
3682
3768
  name: string;
@@ -3706,6 +3792,7 @@ declare const narrativeMemory: z.ZodObject<{
3706
3792
  extractedEntityCount?: number | undefined;
3707
3793
  userTopics?: string[] | undefined;
3708
3794
  extractedTopics?: string[] | undefined;
3795
+ agentSessionId?: string | null | undefined;
3709
3796
  entities?: {
3710
3797
  type: string;
3711
3798
  name: string;
@@ -3741,6 +3828,7 @@ declare const narrativeMemory: z.ZodObject<{
3741
3828
  extractedEntityCount?: number | undefined;
3742
3829
  userTopics?: string[] | undefined;
3743
3830
  extractedTopics?: string[] | undefined;
3831
+ agentSessionId?: string | null | undefined;
3744
3832
  entities?: {
3745
3833
  type: string;
3746
3834
  name: string;
@@ -3774,6 +3862,7 @@ declare const narrativeMemory: z.ZodObject<{
3774
3862
  extractedEntityCount?: number | undefined;
3775
3863
  userTopics?: string[] | undefined;
3776
3864
  extractedTopics?: string[] | undefined;
3865
+ agentSessionId?: string | null | undefined;
3777
3866
  entities?: {
3778
3867
  type: string;
3779
3868
  name: string;
@@ -3832,6 +3921,8 @@ declare const narrativeTimelineResponse: z.ZodLazy<z.ZodObject<{
3832
3921
  userTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3833
3922
  /** Topics automatically extracted from content */
3834
3923
  extractedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3924
+ /** Agent session ID that created this memory (MCP session ID or CLI session UUID). Used to group memories by agent instance for conversation threading. */
3925
+ agentSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3835
3926
  /** Entities extracted from memory content */
3836
3927
  entities: z.ZodOptional<z.ZodArray<z.ZodObject<{
3837
3928
  /** Entity name */
@@ -3873,6 +3964,7 @@ declare const narrativeTimelineResponse: z.ZodLazy<z.ZodObject<{
3873
3964
  extractedEntityCount?: number | undefined;
3874
3965
  userTopics?: string[] | undefined;
3875
3966
  extractedTopics?: string[] | undefined;
3967
+ agentSessionId?: string | null | undefined;
3876
3968
  entities?: {
3877
3969
  type: string;
3878
3970
  name: string;
@@ -3902,6 +3994,7 @@ declare const narrativeTimelineResponse: z.ZodLazy<z.ZodObject<{
3902
3994
  extractedEntityCount?: number | undefined;
3903
3995
  userTopics?: string[] | undefined;
3904
3996
  extractedTopics?: string[] | undefined;
3997
+ agentSessionId?: string | null | undefined;
3905
3998
  entities?: {
3906
3999
  type: string;
3907
4000
  name: string;
@@ -3937,6 +4030,7 @@ declare const narrativeTimelineResponse: z.ZodLazy<z.ZodObject<{
3937
4030
  extractedEntityCount?: number | undefined;
3938
4031
  userTopics?: string[] | undefined;
3939
4032
  extractedTopics?: string[] | undefined;
4033
+ agentSessionId?: string | null | undefined;
3940
4034
  entities?: {
3941
4035
  type: string;
3942
4036
  name: string;
@@ -3970,6 +4064,7 @@ declare const narrativeTimelineResponse: z.ZodLazy<z.ZodObject<{
3970
4064
  extractedEntityCount?: number | undefined;
3971
4065
  userTopics?: string[] | undefined;
3972
4066
  extractedTopics?: string[] | undefined;
4067
+ agentSessionId?: string | null | undefined;
3973
4068
  entities?: {
3974
4069
  type: string;
3975
4070
  name: string;
@@ -4066,6 +4161,7 @@ declare const narrativeTimelineResponse: z.ZodLazy<z.ZodObject<{
4066
4161
  extractedEntityCount?: number | undefined;
4067
4162
  userTopics?: string[] | undefined;
4068
4163
  extractedTopics?: string[] | undefined;
4164
+ agentSessionId?: string | null | undefined;
4069
4165
  entities?: {
4070
4166
  type: string;
4071
4167
  name: string;
@@ -4119,6 +4215,7 @@ declare const narrativeTimelineResponse: z.ZodLazy<z.ZodObject<{
4119
4215
  extractedEntityCount?: number | undefined;
4120
4216
  userTopics?: string[] | undefined;
4121
4217
  extractedTopics?: string[] | undefined;
4218
+ agentSessionId?: string | null | undefined;
4122
4219
  entities?: {
4123
4220
  type: string;
4124
4221
  name: string;
@@ -6524,6 +6621,7 @@ declare class MemoriesService extends BaseService {
6524
6621
  */
6525
6622
  createMemory(body: {
6526
6623
  conversationId: string;
6624
+ agentSessionId?: string;
6527
6625
  claudeSessionId?: string;
6528
6626
  name?: string;
6529
6627
  content: string;
@@ -6905,6 +7003,7 @@ declare class MemoriesService extends BaseService {
6905
7003
  extractedEntityCount?: number;
6906
7004
  userTopics?: string[];
6907
7005
  extractedTopics?: string[];
7006
+ agentSessionId?: string;
6908
7007
  entities?: {
6909
7008
  name: string;
6910
7009
  type: string;
@@ -7295,6 +7394,7 @@ declare class ConversationsService extends BaseService {
7295
7394
  * @param since - Return only conversations created after this timestamp (ISO 8601 format)
7296
7395
  * @param sortBy - Field to sort conversations by
7297
7396
  * @param order - Sort order
7397
+ * @param hasMemories - When true, return only conversations that contain at least one memory
7298
7398
  */
7299
7399
  listConversations(options?: {
7300
7400
  limit?: number;
@@ -7302,6 +7402,7 @@ declare class ConversationsService extends BaseService {
7302
7402
  since?: string;
7303
7403
  sortBy?: 'lastActivityAt' | 'createdAt' | 'memoryCount';
7304
7404
  order?: 'asc' | 'desc';
7405
+ hasMemories?: boolean;
7305
7406
  }): Promise<HttpResponse<{
7306
7407
  data?: Conversation[];
7307
7408
  pagination?: {
@@ -7803,4 +7904,4 @@ declare class Memnexus {
7803
7904
  setEnvironment(environment: Environment): void;
7804
7905
  }
7805
7906
 
7806
- export { type AddMemoryToNarrativeRequest, AdminService, type ApiKey, ApiKeysService, type Artifact, ArtifactsService, type BatchGetMemoriesMeta, type BatchGetMemoriesRequest, type BatchGetMemoriesResponse, BehaviorService, type BillingOverview, BillingService, type BuildContextActiveWork, type BuildContextActivity, type BuildContextFact, type BuildContextGotcha, type BuildContextMeta, type BuildContextPattern, type BuildContextRequest, type BuildContextResponse, type CheckoutSessionResponse, type Community, ContentType, type Conversation, ConversationsService, type CreateArtifactRequest, type CreateCheckoutSessionRequest, type CreateConversationRequest, type CreateFactRequest, type CreateMemoryRelationshipRequest, type CreateMemoryRequest, type CreateMemoryResponse, type CreateMemoryResponseMeta, type CreateNarrativeRequest, type CreatePortalSessionRequest, type DigestEntity, type DigestKeyFact, type DigestMetadata, type DigestRequest, type DigestResponse, type DigestSource, type DigestTimeRange, type EffectiveStateBreakdown, EntitiesService, type Entity, type EntityNode, Environment, type Error$1 as Error, type ErrorDefinition, type Fact, type FactSearchRequest, FactsService, type GetMemoryResponse, type GetNarrativeResponse, type GraphRAGQueryRequest, type GraphRAGQueryResponse, GraphragService, type HealthCheck, HealthService, type Hook, type HttpError, type HttpMetadata, type HttpMethod, type HttpRequest, type HttpResponse, InvitesService, type Invoice, type ListInvoicesResponse, type ListNarrativesResponse, type ListPaymentMethodsResponse, Memnexus, MemoriesService, type Memory, type MemoryRelationship, type MemoryRelationshipsResponse, MonitoringService, type NamedMemoryHistoryResponse, type NarrativeMemory, type NarrativeThread, type NarrativeTimelineResponse, NarrativesService, type Pagination, type Pattern, PatternsService, type PaymentMethod, type PortalSessionResponse, type RelatedMemoryResult, type RequestParameter, type ResponseDefinition, type RetryOptions, type SdkConfig, type SearchRequest, type SearchResponse, type SearchResult, SerializationStyle, type ServiceCheck, type Subscription, SystemService, type TemporalMetadata, type Topic, type TopicReference, TopicsService, type UpdateArtifactRequest, type UpdateFactRequest, type UpdateMemoryRequest, type UpdateNamedMemoryRequest, type UpdateNarrativeRequest, type User, type UserUsage, UsersService, type ValidationOptions, addMemoryToNarrativeRequest, apiKey, artifact, batchGetMemoriesMeta, batchGetMemoriesRequest, batchGetMemoriesResponse, billingOverview, buildContextActiveWork, buildContextActivity, buildContextFact, buildContextGotcha, buildContextMeta, buildContextPattern, buildContextRequest, buildContextResponse, checkoutSessionResponse, community, conversation, createArtifactRequest, createCheckoutSessionRequest, createConversationRequest, createFactRequest, createMemoryRelationshipRequest, createMemoryRequest, createMemoryResponse, createMemoryResponseMeta, createNarrativeRequest, createPortalSessionRequest, Memnexus as default, digestEntity, digestKeyFact, digestMetadata, digestRequest, digestResponse, digestSource, digestTimeRange, effectiveStateBreakdown, entity, entityNode, error, fact, factSearchRequest, getMemoryResponse, getNarrativeResponse, graphRAGQueryRequest, graphRAGQueryResponse, healthCheck, invoice, listInvoicesResponse, listNarrativesResponse, listPaymentMethodsResponse, memory, memoryRelationship, memoryRelationshipsResponse, namedMemoryHistoryResponse, narrativeMemory, narrativeThread, narrativeTimelineResponse, pagination, pattern, paymentMethod, portalSessionResponse, relatedMemoryResult, searchRequest, searchResponse, searchResult, serviceCheck, subscription, temporalMetadata, topic, topicReference, updateArtifactRequest, updateFactRequest, updateMemoryRequest, updateNamedMemoryRequest, updateNarrativeRequest, user, userUsage };
7907
+ export { type AddMemoryToNarrativeRequest, AdminService, type ApiKey, ApiKeysService, type Artifact, ArtifactsService, type BatchGetMemoriesMeta, type BatchGetMemoriesRequest, type BatchGetMemoriesResponse, BehaviorService, type BillingOverview, BillingService, type BuildContextActiveWork, type BuildContextActivity, type BuildContextFact, type BuildContextGotcha, type BuildContextMeta, type BuildContextPattern, type BuildContextRequest, type BuildContextResponse, type CheckoutSessionResponse, type Community, ContentType, type Conversation, ConversationsService, type CreateArtifactRequest, type CreateCheckoutSessionRequest, type CreateConversationRequest, type CreateFactRequest, type CreateMemoryRelationshipRequest, type CreateMemoryRequest, type CreateMemoryResponse, type CreateMemoryResponseMeta, type CreateNarrativeRequest, type CreatePortalSessionRequest, type DigestEntity, type DigestKeyFact, type DigestMetadata, type DigestRequest, type DigestResponse, type DigestSource, type DigestTimeRange, type EffectiveStateBreakdown, EntitiesService, type Entity, type EntityNode, Environment, type Error$1 as Error, type ErrorDefinition, type Fact, type FactSearchRequest, FactsService, type GetMemoryResponse, type GetNarrativeResponse, type GraphRAGQueryRequest, type GraphRAGQueryResponse, GraphragService, type HealthCheck, HealthService, type Hook, type HttpError, type HttpMetadata, type HttpMethod, type HttpRequest, type HttpResponse, InvitesService, type Invoice, type ListInvoicesResponse, type ListNarrativesResponse, type ListPaymentMethodsResponse, Memnexus, MemoriesService, type Memory, type MemoryRelationship, type MemoryRelationshipsResponse, MonitoringService, type NamedMemoryHistoryResponse, type NarrativeMemory, type NarrativeThread, type NarrativeTimelineResponse, NarrativesService, type Pagination, type Pattern, PatternsService, type PaymentMethod, type PortalSessionResponse, type RelatedMemoryResult, type RequestParameter, type ResponseDefinition, type RetryOptions, type SdkConfig, SdkError, type SearchRequest, type SearchResponse, type SearchResult, SerializationStyle, type ServiceCheck, type Subscription, SystemService, type TemporalMetadata, type Topic, type TopicReference, TopicsService, type UpdateArtifactRequest, type UpdateFactRequest, type UpdateMemoryRequest, type UpdateNamedMemoryRequest, type UpdateNarrativeRequest, type User, type UserUsage, UsersService, type ValidationOptions, addMemoryToNarrativeRequest, apiKey, artifact, batchGetMemoriesMeta, batchGetMemoriesRequest, batchGetMemoriesResponse, billingOverview, buildContextActiveWork, buildContextActivity, buildContextFact, buildContextGotcha, buildContextMeta, buildContextPattern, buildContextRequest, buildContextResponse, checkoutSessionResponse, community, conversation, createArtifactRequest, createCheckoutSessionRequest, createConversationRequest, createFactRequest, createMemoryRelationshipRequest, createMemoryRequest, createMemoryResponse, createMemoryResponseMeta, createNarrativeRequest, createPortalSessionRequest, Memnexus as default, digestEntity, digestKeyFact, digestMetadata, digestRequest, digestResponse, digestSource, digestTimeRange, effectiveStateBreakdown, entity, entityNode, error, fact, factSearchRequest, getMemoryResponse, getNarrativeResponse, graphRAGQueryRequest, graphRAGQueryResponse, healthCheck, invoice, listInvoicesResponse, listNarrativesResponse, listPaymentMethodsResponse, memory, memoryRelationship, memoryRelationshipsResponse, namedMemoryHistoryResponse, narrativeMemory, narrativeThread, narrativeTimelineResponse, pagination, pattern, paymentMethod, portalSessionResponse, relatedMemoryResult, searchRequest, searchResponse, searchResult, serviceCheck, subscription, temporalMetadata, topic, topicReference, updateArtifactRequest, updateFactRequest, updateMemoryRequest, updateNamedMemoryRequest, updateNarrativeRequest, user, userUsage };