# WARM Sync Encrypted document synchronization for WARM. Requires Node.js 22 or later. The initial supported platform is macOS arm64. Other native engine builds exist but are not covered by this client release's acceptance checks. Install the versioned package from https://writerslogic.com/warm/sync/. After checkout, download the activation file shown on the welcome page. ```sh npx warm-sync activate --dir ./memory --activation-file ./warm-activation.json --recovery-file ./recovery.json ``` The client saves the recovery file **before** activating the account. Copy it to a password manager or encrypted offline location separate from this computer. It contains your API credential, account recovery credential and document encryption key. Anyone with it can read your documents and control the account. WritersLogic cannot recover documents if all copies are lost. Generated files require private filesystem permissions. Preserve mode 0600 when transferring recovery files; memory directories require mode 0700. Create `document.json`: ```json {"id":"note-1","text":"Aster opens the observatory at dusk.","sourceUri":"notes/aster.md","version":"1","metadata":{"project":"novel"}} ``` ```sh npx warm-sync put --dir ./memory --file ./document.json npx warm-sync sync --dir ./memory npx warm-sync search --dir ./memory --query "observatory" npx warm-sync restore --dir ./second-device --recovery-file ./recovery.json ``` Sync preserves document ID, text, source URI, version, JSON metadata and deletion. It does not back up arbitrary native-engine stores, facts, vectors, embeddings or writes made outside this client. Individual document JSON is limited to 512 KiB, including metadata (at most 32 KiB). The local pending queue holds at most 10,000 changes or 16 MiB. Sync before reaching that limit. The relay stores AES-256-GCM encrypted frames and verifies a SHA-256 ordered chain. It can see account, log and device identifiers, sizes, timing and usage; choose identifiers accordingly. The local engine, checkpoints and document copies are encrypted; the account settings file is protected by filesystem permissions. This does not protect against a compromised device. Keep an independent offline export as well as the recovery kit. Sync is explicit. Schedule `npx warm-sync sync --dir /absolute/memory` with your existing scheduler if desired. Only one process may open a local store at a time. Network failures preserve pending work. Retry the same command. Concurrent changes use relay order; local pending changes are rebased after download and therefore may overwrite remote changes to the same document. The sync result lists conflicting document IDs. There is no semantic merge. Existing checkpoints detect rollback; a fresh restore cannot detect a relay withholding a valid suffix of history. ```sh npx warm-sync delete --dir ./memory --id note-1 npx warm-sync sync --dir ./memory npx warm-sync export --dir ./memory --out ./documents.jsonl ``` Export works offline and creates a new private plaintext JSONL file. A delete removes the current document on connected clients, but encrypted history remains in the log until the whole log is deleted or retention expires. After exporting, `npx warm-sync delete-log --dir ./memory --confirm-delete` permanently removes that log from the relay and frees its stored allowance. Local documents remain. Deleted log identifiers cannot be reused; create a new log with `init --from-recovery ... --log new-name --recovery-file ...`. After cancellation/payment failure, use `sync --recovery` to download without uploading. The service reserves 5,000 recovery requests and 100,000 frame reads separately from regular usage per billing period. Canceled accounts retain encrypted history for 30 days after the subscription ends. Export before that deadline. Local data remains accessible without a subscription. If an API key is lost or revoked, restore the recovery kit into an empty directory. If the download fails with 401, run: ```sh npx warm-sync recover-account --dir ./restored npx warm-sync sync --dir ./restored --recovery npx warm-sync export-recovery --dir ./restored --out ./replacement-recovery.json ``` Account recovery revokes every previous API key. Transfer the replacement recovery kit to your other devices. This does not rotate the document key. Billing is separately accessible through email at https://writerslogic.com/api/warm/portal. Canceling billing does not need your document key. To resume an ended subscription, use that page's resume flow. JavaScript: ```js import { SyncMemory } from '@writerslogic/warm-sync'; const memory = await SyncMemory.open('./memory'); await memory.memorize({ id: 'note-2', text: 'The archive closes at dawn.' }); await memory.sync(); const matches = await memory.search('archive'); ``` Do not mutate `memory.engine` directly; those writes are outside sync. Keep one instance per directory for the lifetime of your process. The client uses the versioned `warm-document-sync/v2` payload; older Rust sync payloads are not interchangeable. Data-key rotation and background sync are not included in this release.