Tanstack AI Core Locks

LockStore, InMemoryLockStore, LocksCapability and withLocks for multi-instance coordination in TanStack AI. Ships in @tanstack/ai — NOT in @tanstack/ai-persistence. Separate from AIPersistence state stores — not a stores key, not composable. InMemoryLockStore vs a distributed (e.g. Cloudflare Durable Object) lock, lease recovery, AbortSignal in critical sections. Use when sandbox or other middleware needs cross-worker mutual exclusion — NOT for storing messages/runs (use withPersistence).

lukasa1993 8fce791 3 files · 7.2 KB Updated

File contents

lukasa1993/tanstack-skills-extracted/tree/main/skills/tanstack-ai-core-locks commit 8fce791b53

Frequently asked questions

npx skillmds@latest add lukasa1993/tanstack-ai-core-locks