@memnexus-ai/typescript-sdk 1.59.18 → 1.59.20

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
@@ -3509,9 +3509,12 @@ var MemoriesService = class extends BaseService {
3509
3509
  * Atomically append a block to a named memory
3510
3510
  * Atomically appends a text block to a named memory, eliminating the
3511
3511
  read-modify-write clobber that concurrent full-content updates cause on
3512
- shared named memories. The server reads the current head, concatenates
3513
- `existing + separator + block`, and writes a new version under the
3514
- NameLock with an internal compare-and-swap + bounded retry — so
3512
+ shared named memories. Each append runs inside a single transaction that
3513
+ holds the per-name NameLock end to end: it acquires the lock, reads the
3514
+ current head UNDER the lock, concatenates `existing + separator + block`,
3515
+ and writes the new version — all before releasing the lock. Concurrent
3516
+ appends therefore QUEUE on the lock and serialize (the same mechanism the
3517
+ full-content PUT path uses); there is no compare-and-swap retry loop, so
3515
3518
  simultaneous appends all survive and the client needs no retry logic.
3516
3519
  Content is decrypted, assembled, size-checked, and re-encrypted
3517
3520
  server-side; plaintext is never returned to other callers.