RuntimeEnvironment
type RuntimeEnvironment = "cloudflare-workers" | "deno" | "bun" | "node" | "unknown";Runtime detection utility for automatic vector store selection.
Detects the current JavaScript runtime environment and returns a descriptor that helps callers choose the appropriate vector store implementation without importing all store packages.
Detection order:
- Cloudflare Workers (caches global, no fs)
- Deno (Deno global)
- Bun (Bun global)
- Node.js (process.versions.node)
- Unknown (fallback)