@memnexus-ai/typescript-sdk 1.84.2 → 1.85.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/dist/index.d.cts CHANGED
@@ -763,6 +763,8 @@ declare const createMemoryRequest: z.ZodLazy<z.ZodObject<{
763
763
  outcome: z.ZodOptional<z.ZodEnum<["resolved", "unresolved"]>>;
764
764
  /** Request distillation of this memory (Pro/Enterprise only) */
765
765
  distill: z.ZodOptional<z.ZodBoolean>;
766
+ /** ID of an existing memory, owned by the caller, that this new memory supersedes. Creates a SUPERSEDES relationship from the new memory to it. A target that does not exist or belongs to another user returns 404 before anything is written. A named create that targets the current head of a different named memory returns 400. An unnamed create that targets a named memory's current head moves that name to the new memory (the response data is serialised before the move, so it does not show the name yet). Any other memory's SUPERSEDES relationship onto the target is replaced and listed in meta.supersedes.replaced. */
767
+ supersedes: z.ZodOptional<z.ZodString>;
766
768
  }, "strip", z.ZodTypeAny, {
767
769
  content: string;
768
770
  role?: "user" | "assistant" | "system" | undefined;
@@ -796,6 +798,7 @@ declare const createMemoryRequest: z.ZodLazy<z.ZodObject<{
796
798
  } | undefined;
797
799
  } | undefined;
798
800
  distill?: boolean | undefined;
801
+ supersedes?: string | undefined;
799
802
  }, {
800
803
  content: string;
801
804
  role?: "user" | "assistant" | "system" | undefined;
@@ -829,6 +832,7 @@ declare const createMemoryRequest: z.ZodLazy<z.ZodObject<{
829
832
  } | undefined;
830
833
  } | undefined;
831
834
  distill?: boolean | undefined;
835
+ supersedes?: string | undefined;
832
836
  }>>;
833
837
  declare const updateMemoryRequest: z.ZodObject<{
834
838
  /** Updated memory content */
@@ -867,16 +871,49 @@ declare const createMemoryResponseMeta: z.ZodObject<{
867
871
  sessionCreated: z.ZodBoolean;
868
872
  /** Whether a new conversation was created (true if conversationId was "NEW") */
869
873
  conversationCreated: z.ZodBoolean;
874
+ /** Present only when the request sent `supersedes`. Reports whether the SUPERSEDES relationship was written after the memory was created. */
875
+ supersedes: z.ZodOptional<z.ZodObject<{
876
+ /** The memory ID sent as `supersedes` */
877
+ targetMemoryId: z.ZodString;
878
+ /** Whether the SUPERSEDES relationship was written. False means the memory was created but is not chained. True with a reason means the relationship was written but a follow-up update did not complete. */
879
+ linked: z.ZodBoolean;
880
+ /** IDs of memories whose existing SUPERSEDES relationship onto the target was removed to keep a single linear chain (empty when none). Read just before the write, so it can be stale. On a failure it lists the edges that may already have been removed. Absent when it could not be read. */
881
+ replaced: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
882
+ /** Present only when the supersedes was not fully applied. relationship_write_failed: no relationship was written (linked is false). post_link_update_failed: the relationship was written (linked is true) but a follow-up update failed, such as moving a named head's name or marking the target superseded. */
883
+ reason: z.ZodOptional<z.ZodEnum<["relationship_write_failed", "post_link_update_failed"]>>;
884
+ }, "strip", z.ZodTypeAny, {
885
+ targetMemoryId: string;
886
+ linked: boolean;
887
+ replaced?: string[] | undefined;
888
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
889
+ }, {
890
+ targetMemoryId: string;
891
+ linked: boolean;
892
+ replaced?: string[] | undefined;
893
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
894
+ }>>;
870
895
  }, "strip", z.ZodTypeAny, {
871
896
  conversationId: string;
872
897
  sessionId: string;
873
898
  sessionCreated: boolean;
874
899
  conversationCreated: boolean;
900
+ supersedes?: {
901
+ targetMemoryId: string;
902
+ linked: boolean;
903
+ replaced?: string[] | undefined;
904
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
905
+ } | undefined;
875
906
  }, {
876
907
  conversationId: string;
877
908
  sessionId: string;
878
909
  sessionCreated: boolean;
879
910
  conversationCreated: boolean;
911
+ supersedes?: {
912
+ targetMemoryId: string;
913
+ linked: boolean;
914
+ replaced?: string[] | undefined;
915
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
916
+ } | undefined;
880
917
  }>;
881
918
  /**
882
919
  * Response from creating a memory, includes the memory and session/conversation metadata
@@ -1169,16 +1206,49 @@ declare const createMemoryResponse: z.ZodLazy<z.ZodObject<{
1169
1206
  sessionCreated: z.ZodBoolean;
1170
1207
  /** Whether a new conversation was created (true if conversationId was "NEW") */
1171
1208
  conversationCreated: z.ZodBoolean;
1209
+ /** Present only when the request sent `supersedes`. Reports whether the SUPERSEDES relationship was written after the memory was created. */
1210
+ supersedes: z.ZodOptional<z.ZodObject<{
1211
+ /** The memory ID sent as `supersedes` */
1212
+ targetMemoryId: z.ZodString;
1213
+ /** Whether the SUPERSEDES relationship was written. False means the memory was created but is not chained. True with a reason means the relationship was written but a follow-up update did not complete. */
1214
+ linked: z.ZodBoolean;
1215
+ /** IDs of memories whose existing SUPERSEDES relationship onto the target was removed to keep a single linear chain (empty when none). Read just before the write, so it can be stale. On a failure it lists the edges that may already have been removed. Absent when it could not be read. */
1216
+ replaced: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1217
+ /** Present only when the supersedes was not fully applied. relationship_write_failed: no relationship was written (linked is false). post_link_update_failed: the relationship was written (linked is true) but a follow-up update failed, such as moving a named head's name or marking the target superseded. */
1218
+ reason: z.ZodOptional<z.ZodEnum<["relationship_write_failed", "post_link_update_failed"]>>;
1219
+ }, "strip", z.ZodTypeAny, {
1220
+ targetMemoryId: string;
1221
+ linked: boolean;
1222
+ replaced?: string[] | undefined;
1223
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
1224
+ }, {
1225
+ targetMemoryId: string;
1226
+ linked: boolean;
1227
+ replaced?: string[] | undefined;
1228
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
1229
+ }>>;
1172
1230
  }, "strip", z.ZodTypeAny, {
1173
1231
  conversationId: string;
1174
1232
  sessionId: string;
1175
1233
  sessionCreated: boolean;
1176
1234
  conversationCreated: boolean;
1235
+ supersedes?: {
1236
+ targetMemoryId: string;
1237
+ linked: boolean;
1238
+ replaced?: string[] | undefined;
1239
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
1240
+ } | undefined;
1177
1241
  }, {
1178
1242
  conversationId: string;
1179
1243
  sessionId: string;
1180
1244
  sessionCreated: boolean;
1181
1245
  conversationCreated: boolean;
1246
+ supersedes?: {
1247
+ targetMemoryId: string;
1248
+ linked: boolean;
1249
+ replaced?: string[] | undefined;
1250
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
1251
+ } | undefined;
1182
1252
  }>;
1183
1253
  }, "strip", z.ZodTypeAny, {
1184
1254
  data: {
@@ -1251,6 +1321,12 @@ declare const createMemoryResponse: z.ZodLazy<z.ZodObject<{
1251
1321
  sessionId: string;
1252
1322
  sessionCreated: boolean;
1253
1323
  conversationCreated: boolean;
1324
+ supersedes?: {
1325
+ targetMemoryId: string;
1326
+ linked: boolean;
1327
+ replaced?: string[] | undefined;
1328
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
1329
+ } | undefined;
1254
1330
  };
1255
1331
  }, {
1256
1332
  data: {
@@ -1323,6 +1399,12 @@ declare const createMemoryResponse: z.ZodLazy<z.ZodObject<{
1323
1399
  sessionId: string;
1324
1400
  sessionCreated: boolean;
1325
1401
  conversationCreated: boolean;
1402
+ supersedes?: {
1403
+ targetMemoryId: string;
1404
+ linked: boolean;
1405
+ replaced?: string[] | undefined;
1406
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
1407
+ } | undefined;
1326
1408
  };
1327
1409
  }>>;
1328
1410
  declare const relatedMemoryResult: z.ZodLazy<z.ZodObject<{
@@ -2229,8 +2311,8 @@ declare const updateNamedMemoryRequest: z.ZodObject<{
2229
2311
  extra?: z.objectOutputType<{}, z.ZodString, "strip"> | undefined;
2230
2312
  } | undefined;
2231
2313
  conversationId?: string | undefined;
2232
- expectedHeadId?: string | undefined;
2233
2314
  supersedes?: string | undefined;
2315
+ expectedHeadId?: string | undefined;
2234
2316
  }, {
2235
2317
  content?: string | undefined;
2236
2318
  memoryType?: "episodic" | "semantic" | "procedural" | undefined;
@@ -2246,8 +2328,8 @@ declare const updateNamedMemoryRequest: z.ZodObject<{
2246
2328
  extra?: z.objectInputType<{}, z.ZodString, "strip"> | undefined;
2247
2329
  } | undefined;
2248
2330
  conversationId?: string | undefined;
2249
- expectedHeadId?: string | undefined;
2250
2331
  supersedes?: string | undefined;
2332
+ expectedHeadId?: string | undefined;
2251
2333
  }>;
2252
2334
  declare const appendNamedMemoryRequest: z.ZodObject<{
2253
2335
  /** Text block to append to the named memory's current content. The total (existing + separator + block) must not exceed the maximum content length or the request is rejected with 413. */
@@ -5553,8 +5635,8 @@ declare const searchFailureResponse: z.ZodLazy<z.ZodObject<{
5553
5635
  }>, "many">>;
5554
5636
  }, "strip", z.ZodTypeAny, {
5555
5637
  error: string;
5556
- degraded?: boolean | undefined;
5557
5638
  reason?: "all_branches_failed" | "deadline_exceeded" | "service_at_capacity" | undefined;
5639
+ degraded?: boolean | undefined;
5558
5640
  branchFailures?: {
5559
5641
  status: "error" | "timeout";
5560
5642
  name: string;
@@ -5564,8 +5646,8 @@ declare const searchFailureResponse: z.ZodLazy<z.ZodObject<{
5564
5646
  retry_after_ms?: number | undefined;
5565
5647
  }, {
5566
5648
  error: string;
5567
- degraded?: boolean | undefined;
5568
5649
  reason?: "all_branches_failed" | "deadline_exceeded" | "service_at_capacity" | undefined;
5650
+ degraded?: boolean | undefined;
5569
5651
  branchFailures?: {
5570
5652
  status: "error" | "timeout";
5571
5653
  name: string;
@@ -5884,8 +5966,8 @@ declare const memoryRelationship: z.ZodObject<{
5884
5966
  id: string;
5885
5967
  createdAt: string;
5886
5968
  confidence: number;
5887
- sourceMemoryId: string;
5888
5969
  targetMemoryId: string;
5970
+ sourceMemoryId: string;
5889
5971
  creationMethod: "manual" | "auto-semantic" | "auto-temporal" | "auto-llm";
5890
5972
  reason?: string | undefined;
5891
5973
  }, {
@@ -5893,8 +5975,8 @@ declare const memoryRelationship: z.ZodObject<{
5893
5975
  id: string;
5894
5976
  createdAt: string;
5895
5977
  confidence: number;
5896
- sourceMemoryId: string;
5897
5978
  targetMemoryId: string;
5979
+ sourceMemoryId: string;
5898
5980
  creationMethod: "manual" | "auto-semantic" | "auto-temporal" | "auto-llm";
5899
5981
  reason?: string | undefined;
5900
5982
  }>;
@@ -5941,8 +6023,8 @@ declare const memoryRelationshipsResponse: z.ZodLazy<z.ZodObject<{
5941
6023
  id: string;
5942
6024
  createdAt: string;
5943
6025
  confidence: number;
5944
- sourceMemoryId: string;
5945
6026
  targetMemoryId: string;
6027
+ sourceMemoryId: string;
5946
6028
  creationMethod: "manual" | "auto-semantic" | "auto-temporal" | "auto-llm";
5947
6029
  reason?: string | undefined;
5948
6030
  }, {
@@ -5950,8 +6032,8 @@ declare const memoryRelationshipsResponse: z.ZodLazy<z.ZodObject<{
5950
6032
  id: string;
5951
6033
  createdAt: string;
5952
6034
  confidence: number;
5953
- sourceMemoryId: string;
5954
6035
  targetMemoryId: string;
6036
+ sourceMemoryId: string;
5955
6037
  creationMethod: "manual" | "auto-semantic" | "auto-temporal" | "auto-llm";
5956
6038
  reason?: string | undefined;
5957
6039
  }>, "many">;
@@ -5965,8 +6047,8 @@ declare const memoryRelationshipsResponse: z.ZodLazy<z.ZodObject<{
5965
6047
  id: string;
5966
6048
  createdAt: string;
5967
6049
  confidence: number;
5968
- sourceMemoryId: string;
5969
6050
  targetMemoryId: string;
6051
+ sourceMemoryId: string;
5970
6052
  creationMethod: "manual" | "auto-semantic" | "auto-temporal" | "auto-llm";
5971
6053
  reason?: string | undefined;
5972
6054
  }[];
@@ -5978,8 +6060,8 @@ declare const memoryRelationshipsResponse: z.ZodLazy<z.ZodObject<{
5978
6060
  id: string;
5979
6061
  createdAt: string;
5980
6062
  confidence: number;
5981
- sourceMemoryId: string;
5982
6063
  targetMemoryId: string;
6064
+ sourceMemoryId: string;
5983
6065
  creationMethod: "manual" | "auto-semantic" | "auto-temporal" | "auto-llm";
5984
6066
  reason?: string | undefined;
5985
6067
  }[];
@@ -10700,6 +10782,7 @@ declare class MemoriesService extends BaseService {
10700
10782
  taskId?: string;
10701
10783
  outcome?: 'resolved' | 'unresolved';
10702
10784
  distill?: boolean;
10785
+ supersedes?: string;
10703
10786
  }): Promise<HttpResponse<{
10704
10787
  data: Memory;
10705
10788
  meta: CreateMemoryResponseMeta;
package/dist/index.d.ts CHANGED
@@ -763,6 +763,8 @@ declare const createMemoryRequest: z.ZodLazy<z.ZodObject<{
763
763
  outcome: z.ZodOptional<z.ZodEnum<["resolved", "unresolved"]>>;
764
764
  /** Request distillation of this memory (Pro/Enterprise only) */
765
765
  distill: z.ZodOptional<z.ZodBoolean>;
766
+ /** ID of an existing memory, owned by the caller, that this new memory supersedes. Creates a SUPERSEDES relationship from the new memory to it. A target that does not exist or belongs to another user returns 404 before anything is written. A named create that targets the current head of a different named memory returns 400. An unnamed create that targets a named memory's current head moves that name to the new memory (the response data is serialised before the move, so it does not show the name yet). Any other memory's SUPERSEDES relationship onto the target is replaced and listed in meta.supersedes.replaced. */
767
+ supersedes: z.ZodOptional<z.ZodString>;
766
768
  }, "strip", z.ZodTypeAny, {
767
769
  content: string;
768
770
  role?: "user" | "assistant" | "system" | undefined;
@@ -796,6 +798,7 @@ declare const createMemoryRequest: z.ZodLazy<z.ZodObject<{
796
798
  } | undefined;
797
799
  } | undefined;
798
800
  distill?: boolean | undefined;
801
+ supersedes?: string | undefined;
799
802
  }, {
800
803
  content: string;
801
804
  role?: "user" | "assistant" | "system" | undefined;
@@ -829,6 +832,7 @@ declare const createMemoryRequest: z.ZodLazy<z.ZodObject<{
829
832
  } | undefined;
830
833
  } | undefined;
831
834
  distill?: boolean | undefined;
835
+ supersedes?: string | undefined;
832
836
  }>>;
833
837
  declare const updateMemoryRequest: z.ZodObject<{
834
838
  /** Updated memory content */
@@ -867,16 +871,49 @@ declare const createMemoryResponseMeta: z.ZodObject<{
867
871
  sessionCreated: z.ZodBoolean;
868
872
  /** Whether a new conversation was created (true if conversationId was "NEW") */
869
873
  conversationCreated: z.ZodBoolean;
874
+ /** Present only when the request sent `supersedes`. Reports whether the SUPERSEDES relationship was written after the memory was created. */
875
+ supersedes: z.ZodOptional<z.ZodObject<{
876
+ /** The memory ID sent as `supersedes` */
877
+ targetMemoryId: z.ZodString;
878
+ /** Whether the SUPERSEDES relationship was written. False means the memory was created but is not chained. True with a reason means the relationship was written but a follow-up update did not complete. */
879
+ linked: z.ZodBoolean;
880
+ /** IDs of memories whose existing SUPERSEDES relationship onto the target was removed to keep a single linear chain (empty when none). Read just before the write, so it can be stale. On a failure it lists the edges that may already have been removed. Absent when it could not be read. */
881
+ replaced: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
882
+ /** Present only when the supersedes was not fully applied. relationship_write_failed: no relationship was written (linked is false). post_link_update_failed: the relationship was written (linked is true) but a follow-up update failed, such as moving a named head's name or marking the target superseded. */
883
+ reason: z.ZodOptional<z.ZodEnum<["relationship_write_failed", "post_link_update_failed"]>>;
884
+ }, "strip", z.ZodTypeAny, {
885
+ targetMemoryId: string;
886
+ linked: boolean;
887
+ replaced?: string[] | undefined;
888
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
889
+ }, {
890
+ targetMemoryId: string;
891
+ linked: boolean;
892
+ replaced?: string[] | undefined;
893
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
894
+ }>>;
870
895
  }, "strip", z.ZodTypeAny, {
871
896
  conversationId: string;
872
897
  sessionId: string;
873
898
  sessionCreated: boolean;
874
899
  conversationCreated: boolean;
900
+ supersedes?: {
901
+ targetMemoryId: string;
902
+ linked: boolean;
903
+ replaced?: string[] | undefined;
904
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
905
+ } | undefined;
875
906
  }, {
876
907
  conversationId: string;
877
908
  sessionId: string;
878
909
  sessionCreated: boolean;
879
910
  conversationCreated: boolean;
911
+ supersedes?: {
912
+ targetMemoryId: string;
913
+ linked: boolean;
914
+ replaced?: string[] | undefined;
915
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
916
+ } | undefined;
880
917
  }>;
881
918
  /**
882
919
  * Response from creating a memory, includes the memory and session/conversation metadata
@@ -1169,16 +1206,49 @@ declare const createMemoryResponse: z.ZodLazy<z.ZodObject<{
1169
1206
  sessionCreated: z.ZodBoolean;
1170
1207
  /** Whether a new conversation was created (true if conversationId was "NEW") */
1171
1208
  conversationCreated: z.ZodBoolean;
1209
+ /** Present only when the request sent `supersedes`. Reports whether the SUPERSEDES relationship was written after the memory was created. */
1210
+ supersedes: z.ZodOptional<z.ZodObject<{
1211
+ /** The memory ID sent as `supersedes` */
1212
+ targetMemoryId: z.ZodString;
1213
+ /** Whether the SUPERSEDES relationship was written. False means the memory was created but is not chained. True with a reason means the relationship was written but a follow-up update did not complete. */
1214
+ linked: z.ZodBoolean;
1215
+ /** IDs of memories whose existing SUPERSEDES relationship onto the target was removed to keep a single linear chain (empty when none). Read just before the write, so it can be stale. On a failure it lists the edges that may already have been removed. Absent when it could not be read. */
1216
+ replaced: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1217
+ /** Present only when the supersedes was not fully applied. relationship_write_failed: no relationship was written (linked is false). post_link_update_failed: the relationship was written (linked is true) but a follow-up update failed, such as moving a named head's name or marking the target superseded. */
1218
+ reason: z.ZodOptional<z.ZodEnum<["relationship_write_failed", "post_link_update_failed"]>>;
1219
+ }, "strip", z.ZodTypeAny, {
1220
+ targetMemoryId: string;
1221
+ linked: boolean;
1222
+ replaced?: string[] | undefined;
1223
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
1224
+ }, {
1225
+ targetMemoryId: string;
1226
+ linked: boolean;
1227
+ replaced?: string[] | undefined;
1228
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
1229
+ }>>;
1172
1230
  }, "strip", z.ZodTypeAny, {
1173
1231
  conversationId: string;
1174
1232
  sessionId: string;
1175
1233
  sessionCreated: boolean;
1176
1234
  conversationCreated: boolean;
1235
+ supersedes?: {
1236
+ targetMemoryId: string;
1237
+ linked: boolean;
1238
+ replaced?: string[] | undefined;
1239
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
1240
+ } | undefined;
1177
1241
  }, {
1178
1242
  conversationId: string;
1179
1243
  sessionId: string;
1180
1244
  sessionCreated: boolean;
1181
1245
  conversationCreated: boolean;
1246
+ supersedes?: {
1247
+ targetMemoryId: string;
1248
+ linked: boolean;
1249
+ replaced?: string[] | undefined;
1250
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
1251
+ } | undefined;
1182
1252
  }>;
1183
1253
  }, "strip", z.ZodTypeAny, {
1184
1254
  data: {
@@ -1251,6 +1321,12 @@ declare const createMemoryResponse: z.ZodLazy<z.ZodObject<{
1251
1321
  sessionId: string;
1252
1322
  sessionCreated: boolean;
1253
1323
  conversationCreated: boolean;
1324
+ supersedes?: {
1325
+ targetMemoryId: string;
1326
+ linked: boolean;
1327
+ replaced?: string[] | undefined;
1328
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
1329
+ } | undefined;
1254
1330
  };
1255
1331
  }, {
1256
1332
  data: {
@@ -1323,6 +1399,12 @@ declare const createMemoryResponse: z.ZodLazy<z.ZodObject<{
1323
1399
  sessionId: string;
1324
1400
  sessionCreated: boolean;
1325
1401
  conversationCreated: boolean;
1402
+ supersedes?: {
1403
+ targetMemoryId: string;
1404
+ linked: boolean;
1405
+ replaced?: string[] | undefined;
1406
+ reason?: "relationship_write_failed" | "post_link_update_failed" | undefined;
1407
+ } | undefined;
1326
1408
  };
1327
1409
  }>>;
1328
1410
  declare const relatedMemoryResult: z.ZodLazy<z.ZodObject<{
@@ -2229,8 +2311,8 @@ declare const updateNamedMemoryRequest: z.ZodObject<{
2229
2311
  extra?: z.objectOutputType<{}, z.ZodString, "strip"> | undefined;
2230
2312
  } | undefined;
2231
2313
  conversationId?: string | undefined;
2232
- expectedHeadId?: string | undefined;
2233
2314
  supersedes?: string | undefined;
2315
+ expectedHeadId?: string | undefined;
2234
2316
  }, {
2235
2317
  content?: string | undefined;
2236
2318
  memoryType?: "episodic" | "semantic" | "procedural" | undefined;
@@ -2246,8 +2328,8 @@ declare const updateNamedMemoryRequest: z.ZodObject<{
2246
2328
  extra?: z.objectInputType<{}, z.ZodString, "strip"> | undefined;
2247
2329
  } | undefined;
2248
2330
  conversationId?: string | undefined;
2249
- expectedHeadId?: string | undefined;
2250
2331
  supersedes?: string | undefined;
2332
+ expectedHeadId?: string | undefined;
2251
2333
  }>;
2252
2334
  declare const appendNamedMemoryRequest: z.ZodObject<{
2253
2335
  /** Text block to append to the named memory's current content. The total (existing + separator + block) must not exceed the maximum content length or the request is rejected with 413. */
@@ -5553,8 +5635,8 @@ declare const searchFailureResponse: z.ZodLazy<z.ZodObject<{
5553
5635
  }>, "many">>;
5554
5636
  }, "strip", z.ZodTypeAny, {
5555
5637
  error: string;
5556
- degraded?: boolean | undefined;
5557
5638
  reason?: "all_branches_failed" | "deadline_exceeded" | "service_at_capacity" | undefined;
5639
+ degraded?: boolean | undefined;
5558
5640
  branchFailures?: {
5559
5641
  status: "error" | "timeout";
5560
5642
  name: string;
@@ -5564,8 +5646,8 @@ declare const searchFailureResponse: z.ZodLazy<z.ZodObject<{
5564
5646
  retry_after_ms?: number | undefined;
5565
5647
  }, {
5566
5648
  error: string;
5567
- degraded?: boolean | undefined;
5568
5649
  reason?: "all_branches_failed" | "deadline_exceeded" | "service_at_capacity" | undefined;
5650
+ degraded?: boolean | undefined;
5569
5651
  branchFailures?: {
5570
5652
  status: "error" | "timeout";
5571
5653
  name: string;
@@ -5884,8 +5966,8 @@ declare const memoryRelationship: z.ZodObject<{
5884
5966
  id: string;
5885
5967
  createdAt: string;
5886
5968
  confidence: number;
5887
- sourceMemoryId: string;
5888
5969
  targetMemoryId: string;
5970
+ sourceMemoryId: string;
5889
5971
  creationMethod: "manual" | "auto-semantic" | "auto-temporal" | "auto-llm";
5890
5972
  reason?: string | undefined;
5891
5973
  }, {
@@ -5893,8 +5975,8 @@ declare const memoryRelationship: z.ZodObject<{
5893
5975
  id: string;
5894
5976
  createdAt: string;
5895
5977
  confidence: number;
5896
- sourceMemoryId: string;
5897
5978
  targetMemoryId: string;
5979
+ sourceMemoryId: string;
5898
5980
  creationMethod: "manual" | "auto-semantic" | "auto-temporal" | "auto-llm";
5899
5981
  reason?: string | undefined;
5900
5982
  }>;
@@ -5941,8 +6023,8 @@ declare const memoryRelationshipsResponse: z.ZodLazy<z.ZodObject<{
5941
6023
  id: string;
5942
6024
  createdAt: string;
5943
6025
  confidence: number;
5944
- sourceMemoryId: string;
5945
6026
  targetMemoryId: string;
6027
+ sourceMemoryId: string;
5946
6028
  creationMethod: "manual" | "auto-semantic" | "auto-temporal" | "auto-llm";
5947
6029
  reason?: string | undefined;
5948
6030
  }, {
@@ -5950,8 +6032,8 @@ declare const memoryRelationshipsResponse: z.ZodLazy<z.ZodObject<{
5950
6032
  id: string;
5951
6033
  createdAt: string;
5952
6034
  confidence: number;
5953
- sourceMemoryId: string;
5954
6035
  targetMemoryId: string;
6036
+ sourceMemoryId: string;
5955
6037
  creationMethod: "manual" | "auto-semantic" | "auto-temporal" | "auto-llm";
5956
6038
  reason?: string | undefined;
5957
6039
  }>, "many">;
@@ -5965,8 +6047,8 @@ declare const memoryRelationshipsResponse: z.ZodLazy<z.ZodObject<{
5965
6047
  id: string;
5966
6048
  createdAt: string;
5967
6049
  confidence: number;
5968
- sourceMemoryId: string;
5969
6050
  targetMemoryId: string;
6051
+ sourceMemoryId: string;
5970
6052
  creationMethod: "manual" | "auto-semantic" | "auto-temporal" | "auto-llm";
5971
6053
  reason?: string | undefined;
5972
6054
  }[];
@@ -5978,8 +6060,8 @@ declare const memoryRelationshipsResponse: z.ZodLazy<z.ZodObject<{
5978
6060
  id: string;
5979
6061
  createdAt: string;
5980
6062
  confidence: number;
5981
- sourceMemoryId: string;
5982
6063
  targetMemoryId: string;
6064
+ sourceMemoryId: string;
5983
6065
  creationMethod: "manual" | "auto-semantic" | "auto-temporal" | "auto-llm";
5984
6066
  reason?: string | undefined;
5985
6067
  }[];
@@ -10700,6 +10782,7 @@ declare class MemoriesService extends BaseService {
10700
10782
  taskId?: string;
10701
10783
  outcome?: 'resolved' | 'unresolved';
10702
10784
  distill?: boolean;
10785
+ supersedes?: string;
10703
10786
  }): Promise<HttpResponse<{
10704
10787
  data: Memory;
10705
10788
  meta: CreateMemoryResponseMeta;
package/dist/index.js CHANGED
@@ -6339,7 +6339,9 @@ var createMemoryRequest = z.lazy(() => z.object({
6339
6339
  /** Task outcome status for this memory */
6340
6340
  outcome: z.enum(["resolved", "unresolved"]).optional(),
6341
6341
  /** Request distillation of this memory (Pro/Enterprise only) */
6342
- distill: z.boolean().optional()
6342
+ distill: z.boolean().optional(),
6343
+ /** ID of an existing memory, owned by the caller, that this new memory supersedes. Creates a SUPERSEDES relationship from the new memory to it. A target that does not exist or belongs to another user returns 404 before anything is written. A named create that targets the current head of a different named memory returns 400. An unnamed create that targets a named memory's current head moves that name to the new memory (the response data is serialised before the move, so it does not show the name yet). Any other memory's SUPERSEDES relationship onto the target is replaced and listed in meta.supersedes.replaced. */
6344
+ supersedes: z.string().uuid().optional()
6343
6345
  }));
6344
6346
  var updateMemoryRequest = z.object({
6345
6347
  /** Updated memory content */
@@ -6363,7 +6365,18 @@ var createMemoryResponseMeta = z.object({
6363
6365
  /** Whether a new session was created (true) or existing session was reused (false) */
6364
6366
  sessionCreated: z.boolean(),
6365
6367
  /** Whether a new conversation was created (true if conversationId was "NEW") */
6366
- conversationCreated: z.boolean()
6368
+ conversationCreated: z.boolean(),
6369
+ /** Present only when the request sent `supersedes`. Reports whether the SUPERSEDES relationship was written after the memory was created. */
6370
+ supersedes: z.object({
6371
+ /** The memory ID sent as `supersedes` */
6372
+ targetMemoryId: z.string(),
6373
+ /** Whether the SUPERSEDES relationship was written. False means the memory was created but is not chained. True with a reason means the relationship was written but a follow-up update did not complete. */
6374
+ linked: z.boolean(),
6375
+ /** IDs of memories whose existing SUPERSEDES relationship onto the target was removed to keep a single linear chain (empty when none). Read just before the write, so it can be stale. On a failure it lists the edges that may already have been removed. Absent when it could not be read. */
6376
+ replaced: z.array(z.string()).optional(),
6377
+ /** Present only when the supersedes was not fully applied. relationship_write_failed: no relationship was written (linked is false). post_link_update_failed: the relationship was written (linked is true) but a follow-up update failed, such as moving a named head's name or marking the target superseded. */
6378
+ reason: z.enum(["relationship_write_failed", "post_link_update_failed"]).optional()
6379
+ }).optional()
6367
6380
  });
6368
6381
  var createMemoryResponse = z.lazy(() => z.object({
6369
6382
  data: memory,