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).

TanStack d81c21b 5.2 KB Updated

File contents

tanstack/ai/tree/main/packages/ai/skills/ai-core/locks commit d81c21bfe9

Frequently asked questions

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