@memnexus-ai/sdk 1.80.2 → 1.81.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.cjs CHANGED
@@ -1486,11 +1486,19 @@ var Memories = class {
1486
1486
  });
1487
1487
  }
1488
1488
  /**
1489
- * Update a named memory (create new version)
1490
- *
1491
- * Creates a new version of a named memory. The name pointer moves to the new version,
1492
- * and a SUPERSEDES relationship links the new version to the old one.
1493
- * The old version's effectiveState becomes 'superseded'.
1489
+ * Update a named memory (new version, or metadata in place)
1490
+ *
1491
+ * With `content`: creates a new version of a named memory. The name pointer moves to
1492
+ * the new version, and a SUPERSEDES relationship links the new version to the old one.
1493
+ * The old version's effectiveState becomes 'superseded'. Returns 201.
1494
+ *
1495
+ * Without `content` (metadata-only update): at least one of `codeContext`, `topics`,
1496
+ * `memoryType` or `context` is required, and they are set on the CURRENT head in place.
1497
+ * The head keeps its id and version; no new version or SUPERSEDES edge is created, the
1498
+ * content is not changed or re-embedded, extraction does not re-run, and no memory quota
1499
+ * is used. Omitted metadata fields keep their stored values. `conversationId` and
1500
+ * `supersedes` require `content` (400 otherwise). `expectedHeadId` applies as on the
1501
+ * content path (409 on mismatch). Returns 200.
1494
1502
  *
1495
1503
  * @param name — Memory name (kebab-case, 2-64 chars)
1496
1504
  * @param body — Request body
package/dist/index.d.cts CHANGED
@@ -345,9 +345,10 @@ interface RelatedMemoryResult {
345
345
  interface GetMemoryResponse {
346
346
  data: Memory;
347
347
  }
348
+ /** Update a named memory. Send content to create a new version (201). Without content, at least one of codeContext, topics, memoryType, context is required, and the request updates the current head in place (200). conversationId and supersedes require content. A body with neither content nor any of those fields is rejected with 400. */
348
349
  interface UpdateNamedMemoryRequest {
349
- /** New content for the named memory version */
350
- content: string;
350
+ /** New content for the named memory version. When present, a new version is created. When omitted, the request is a metadata-only update: at least one of codeContext, topics, memoryType or context must be set, and those fields are written on the CURRENT head in place (same id and version, no new version, no re-embedding, no extraction, no quota use). conversationId and supersedes require content. */
351
+ content?: string;
351
352
  /** Optimistic concurrency (compare-and-swap): if provided, the update only succeeds when the current head version's id matches this value. On mismatch the server returns 409 Conflict with the current head id, so the caller can re-read, re-merge, and retry. When omitted, the update is an unconditional replace (backward compatible). */
352
353
  expectedHeadId?: string;
353
354
  /** Type of memory (defaults to previous version's type) */
@@ -2978,17 +2979,25 @@ declare class Memories {
2978
2979
  data: Memory;
2979
2980
  }>>;
2980
2981
  /**
2981
- * Update a named memory (create new version)
2982
+ * Update a named memory (new version, or metadata in place)
2983
+ *
2984
+ * With `content`: creates a new version of a named memory. The name pointer moves to
2985
+ * the new version, and a SUPERSEDES relationship links the new version to the old one.
2986
+ * The old version's effectiveState becomes 'superseded'. Returns 201.
2982
2987
  *
2983
- * Creates a new version of a named memory. The name pointer moves to the new version,
2984
- * and a SUPERSEDES relationship links the new version to the old one.
2985
- * The old version's effectiveState becomes 'superseded'.
2988
+ * Without `content` (metadata-only update): at least one of `codeContext`, `topics`,
2989
+ * `memoryType` or `context` is required, and they are set on the CURRENT head in place.
2990
+ * The head keeps its id and version; no new version or SUPERSEDES edge is created, the
2991
+ * content is not changed or re-embedded, extraction does not re-run, and no memory quota
2992
+ * is used. Omitted metadata fields keep their stored values. `conversationId` and
2993
+ * `supersedes` require `content` (400 otherwise). `expectedHeadId` applies as on the
2994
+ * content path (409 on mismatch). Returns 200.
2986
2995
  *
2987
2996
  * @param name — Memory name (kebab-case, 2-64 chars)
2988
2997
  * @param body — Request body
2989
2998
  */
2990
2999
  updateNamedMemory(name: string, body: {
2991
- content: string;
3000
+ content?: string;
2992
3001
  expectedHeadId?: string;
2993
3002
  memoryType?: 'episodic' | 'semantic' | 'procedural';
2994
3003
  context?: string;
@@ -3005,10 +3014,10 @@ declare class Memories {
3005
3014
  };
3006
3015
  supersedes?: string;
3007
3016
  }): Promise<HttpResponse<{
3008
- data?: Memory;
3009
- meta?: {
3017
+ data: Memory;
3018
+ meta: {
3010
3019
  previousVersionId?: string;
3011
- version?: number;
3020
+ version: number;
3012
3021
  };
3013
3022
  }>>;
3014
3023
  /**
package/dist/index.d.ts CHANGED
@@ -345,9 +345,10 @@ interface RelatedMemoryResult {
345
345
  interface GetMemoryResponse {
346
346
  data: Memory;
347
347
  }
348
+ /** Update a named memory. Send content to create a new version (201). Without content, at least one of codeContext, topics, memoryType, context is required, and the request updates the current head in place (200). conversationId and supersedes require content. A body with neither content nor any of those fields is rejected with 400. */
348
349
  interface UpdateNamedMemoryRequest {
349
- /** New content for the named memory version */
350
- content: string;
350
+ /** New content for the named memory version. When present, a new version is created. When omitted, the request is a metadata-only update: at least one of codeContext, topics, memoryType or context must be set, and those fields are written on the CURRENT head in place (same id and version, no new version, no re-embedding, no extraction, no quota use). conversationId and supersedes require content. */
351
+ content?: string;
351
352
  /** Optimistic concurrency (compare-and-swap): if provided, the update only succeeds when the current head version's id matches this value. On mismatch the server returns 409 Conflict with the current head id, so the caller can re-read, re-merge, and retry. When omitted, the update is an unconditional replace (backward compatible). */
352
353
  expectedHeadId?: string;
353
354
  /** Type of memory (defaults to previous version's type) */
@@ -2978,17 +2979,25 @@ declare class Memories {
2978
2979
  data: Memory;
2979
2980
  }>>;
2980
2981
  /**
2981
- * Update a named memory (create new version)
2982
+ * Update a named memory (new version, or metadata in place)
2983
+ *
2984
+ * With `content`: creates a new version of a named memory. The name pointer moves to
2985
+ * the new version, and a SUPERSEDES relationship links the new version to the old one.
2986
+ * The old version's effectiveState becomes 'superseded'. Returns 201.
2982
2987
  *
2983
- * Creates a new version of a named memory. The name pointer moves to the new version,
2984
- * and a SUPERSEDES relationship links the new version to the old one.
2985
- * The old version's effectiveState becomes 'superseded'.
2988
+ * Without `content` (metadata-only update): at least one of `codeContext`, `topics`,
2989
+ * `memoryType` or `context` is required, and they are set on the CURRENT head in place.
2990
+ * The head keeps its id and version; no new version or SUPERSEDES edge is created, the
2991
+ * content is not changed or re-embedded, extraction does not re-run, and no memory quota
2992
+ * is used. Omitted metadata fields keep their stored values. `conversationId` and
2993
+ * `supersedes` require `content` (400 otherwise). `expectedHeadId` applies as on the
2994
+ * content path (409 on mismatch). Returns 200.
2986
2995
  *
2987
2996
  * @param name — Memory name (kebab-case, 2-64 chars)
2988
2997
  * @param body — Request body
2989
2998
  */
2990
2999
  updateNamedMemory(name: string, body: {
2991
- content: string;
3000
+ content?: string;
2992
3001
  expectedHeadId?: string;
2993
3002
  memoryType?: 'episodic' | 'semantic' | 'procedural';
2994
3003
  context?: string;
@@ -3005,10 +3014,10 @@ declare class Memories {
3005
3014
  };
3006
3015
  supersedes?: string;
3007
3016
  }): Promise<HttpResponse<{
3008
- data?: Memory;
3009
- meta?: {
3017
+ data: Memory;
3018
+ meta: {
3010
3019
  previousVersionId?: string;
3011
- version?: number;
3020
+ version: number;
3012
3021
  };
3013
3022
  }>>;
3014
3023
  /**
package/dist/index.js CHANGED
@@ -1459,11 +1459,19 @@ var Memories = class {
1459
1459
  });
1460
1460
  }
1461
1461
  /**
1462
- * Update a named memory (create new version)
1463
- *
1464
- * Creates a new version of a named memory. The name pointer moves to the new version,
1465
- * and a SUPERSEDES relationship links the new version to the old one.
1466
- * The old version's effectiveState becomes 'superseded'.
1462
+ * Update a named memory (new version, or metadata in place)
1463
+ *
1464
+ * With `content`: creates a new version of a named memory. The name pointer moves to
1465
+ * the new version, and a SUPERSEDES relationship links the new version to the old one.
1466
+ * The old version's effectiveState becomes 'superseded'. Returns 201.
1467
+ *
1468
+ * Without `content` (metadata-only update): at least one of `codeContext`, `topics`,
1469
+ * `memoryType` or `context` is required, and they are set on the CURRENT head in place.
1470
+ * The head keeps its id and version; no new version or SUPERSEDES edge is created, the
1471
+ * content is not changed or re-embedded, extraction does not re-run, and no memory quota
1472
+ * is used. Omitted metadata fields keep their stored values. `conversationId` and
1473
+ * `supersedes` require `content` (400 otherwise). `expectedHeadId` applies as on the
1474
+ * content path (409 on mismatch). Returns 200.
1467
1475
  *
1468
1476
  * @param name — Memory name (kebab-case, 2-64 chars)
1469
1477
  * @param body — Request body
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memnexus-ai/sdk",
3
- "version": "1.80.2",
3
+ "version": "1.81.1",
4
4
  "description": "Official Node.js SDK for the MemNexus API",
5
5
  "license": "Proprietary",
6
6
  "type": "module",