{"_id":"@aibind/redis","name":"@aibind/redis","dist-tags":{"latest":"0.4.0"},"versions":{"0.4.0":{"name":"@aibind/redis","version":"0.4.0","description":"Redis-backed StreamStore and ConversationStore for @aibind","license":"MIT","keywords":["redis","aibind","stream-store","conversation-store","ai"],"repository":{"type":"git","url":"git+https://github.com/puruvj/aibind.git"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"peerDependencies":{"@aibind/core":"*","ioredis":">=5"},"devDependencies":{"ioredis":"^5.4.0","tsup":"^8.5.1","typescript":"^5.7.0","vitest":"^3.0.0","@aibind/core":"0.4.0"},"scripts":{"test":"vitest run","test:watch":"vitest","package":"tsup"},"_id":"@aibind/redis@0.4.0","bugs":{"url":"https://github.com/puruvj/aibind/issues"},"homepage":"https://github.com/puruvj/aibind#readme","_integrity":"sha512-3LET6URIFRAuBgxQ/e8d3ZSeND9umUDyT75Aw6WLJ7zoBXCS42JVnR4Kflq26MYsUhvXDU60T4M1CtIJ/zfqgQ==","_resolved":"/private/var/folders/g3/rxrpm2hd0j1cp1zw5sqckdyc0000gn/T/a7ca325be00a3b6690574cb0d0e9e863/aibind-redis-0.4.0.tgz","_from":"file:aibind-redis-0.4.0.tgz","_nodeVersion":"24.1.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-3LET6URIFRAuBgxQ/e8d3ZSeND9umUDyT75Aw6WLJ7zoBXCS42JVnR4Kflq26MYsUhvXDU60T4M1CtIJ/zfqgQ==","shasum":"cc2af62689c5c44cbc1d95fdc3f1f706786888bb","tarball":"https://registry.npmjs.org/@aibind/redis/-/redis-0.4.0.tgz","fileCount":5,"unpackedSize":10829,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDNQBjVALSKsqh9+s7vrRYnws2DE+sm3C85FDWf6TngEAIhAN77oi6VQCnKRgDlvJ7wYtUiUgabprL7xfzvlTZguz4X"}]},"_npmUser":{"name":"puruvj","email":"awesomepuruvj@gmail.com"},"directories":{},"maintainers":[{"name":"puruvj","email":"awesomepuruvj@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/redis_0.4.0_1772816833999_0.288602098176741"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-06T17:07:13.914Z","0.4.0":"2026-03-06T17:07:14.325Z","modified":"2026-03-06T17:07:14.507Z"},"maintainers":[{"name":"puruvj","email":"awesomepuruvj@gmail.com"}],"description":"Redis-backed StreamStore and ConversationStore for @aibind","homepage":"https://github.com/puruvj/aibind#readme","keywords":["redis","aibind","stream-store","conversation-store","ai"],"repository":{"type":"git","url":"git+https://github.com/puruvj/aibind.git"},"bugs":{"url":"https://github.com/puruvj/aibind/issues"},"license":"MIT","readme":"# @aibind/redis\n\nRedis-backed `StreamStore` and `ConversationStore` for `@aibind`. Works with [ioredis](https://github.com/redis/ioredis), [Upstash](https://upstash.com), [node-redis](https://github.com/redis/node-redis), or any client that implements the minimal `RedisClient` interface.\n\n## Install\n\n```bash\nnpm install @aibind/redis\n```\n\n## Usage\n\n```ts\nimport { Redis } from \"ioredis\";\nimport { RedisStreamStore, RedisConversationStore } from \"@aibind/redis\";\n\nconst redis = new Redis(process.env.REDIS_URL!);\n\n// Durable streams (stop + resume)\nconst streamStore = new RedisStreamStore(redis);\n\n// Server-side conversation history\nconst conversationStore = new RedisConversationStore(redis);\n```\n\nPass to your framework's stream handler:\n\n```ts\nimport { createStreamHandler } from \"@aibind/sveltekit/server\";\n\nexport const handle = createStreamHandler({\n  models,\n  store: streamStore,          // enables durable streams\n  conversation: { store: conversationStore }, // enables multi-turn history\n});\n```\n\n## Clients\n\nAny client with this shape works — no hard dependency on any specific Redis library:\n\n```ts\ninterface RedisClient {\n  get(key: string): Promise<string | null>;\n  set(key: string, value: string, exArg: \"EX\", ttl: number): Promise<unknown>;\n  exists(...keys: string[]): Promise<number>;\n  rpush(key: string, ...values: string[]): Promise<number>;\n  lrange(key: string, start: number, stop: number): Promise<string[]>;\n  llen(key: string): Promise<number>;\n  expire(key: string, seconds: number): Promise<unknown>;\n  del(...keys: string[]): Promise<unknown>;\n}\n```\n\n## Documentation\n\n[Full docs →](https://aibind.dev/integrations/redis)\n","readmeFilename":"README.md","_rev":"1-18339a54456484336c4f57fb8085ca1c"}