@memnexus-ai/typescript-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
@@ -3506,10 +3506,18 @@ var MemoriesService = class extends BaseService {
3506
3506
  return this.client.call(request);
3507
3507
  }
3508
3508
  /**
3509
- * Update a named memory (create new version)
3510
- * Creates a new version of a named memory. The name pointer moves to the new version,
3511
- and a SUPERSEDES relationship links the new version to the old one.
3512
- The old version's effectiveState becomes 'superseded'.
3509
+ * Update a named memory (new version, or metadata in place)
3510
+ * With `content`: creates a new version of a named memory. The name pointer moves to
3511
+ the new version, and a SUPERSEDES relationship links the new version to the old one.
3512
+ The old version's effectiveState becomes 'superseded'. Returns 201.
3513
+
3514
+ Without `content` (metadata-only update): at least one of `codeContext`, `topics`,
3515
+ `memoryType` or `context` is required, and they are set on the CURRENT head in place.
3516
+ The head keeps its id and version; no new version or SUPERSEDES edge is created, the
3517
+ content is not changed or re-embedded, extraction does not re-run, and no memory quota
3518
+ is used. Omitted metadata fields keep their stored values. `conversationId` and
3519
+ `supersedes` require `content` (400 otherwise). `expectedHeadId` applies as on the
3520
+ content path (409 on mismatch). Returns 200.
3513
3521
 
3514
3522
  * @param name - Memory name (kebab-case, 2-64 chars)
3515
3523
  * @param body - Request body
@@ -6634,8 +6642,8 @@ var getMemoryResponse = import_zod.z.lazy(() => import_zod.z.object({
6634
6642
  data: memory
6635
6643
  }));
6636
6644
  var updateNamedMemoryRequest = import_zod.z.object({
6637
- /** New content for the named memory version */
6638
- content: import_zod.z.string().min(1).max(5e4),
6645
+ /** 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. */
6646
+ content: import_zod.z.string().min(1).max(5e4).optional(),
6639
6647
  /** 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). */
6640
6648
  expectedHeadId: import_zod.z.string().uuid().optional(),
6641
6649
  /** Type of memory (defaults to previous version's type) */