{"_id":"@breadai/transport-redis","_rev":"3-522ff3385fdf6fa6455bc6f9d2724bc1","name":"@breadai/transport-redis","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@breadai/transport-redis","version":"0.1.0","keywords":["ai","agents","redis","streams","bus","sse","bread"],"author":"Matteo Zambon <matteo@yeeti.co>","license":"MIT","_id":"@breadai/transport-redis@0.1.0","maintainers":[{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"}],"homepage":"https://github.com/matteozambon89/bread","dist":{"shasum":"b3180c99c5da391e7ffd241b3bca883c157395dd","tarball":"https://registry.npmjs.org/@breadai/transport-redis/-/transport-redis-0.1.0.tgz","fileCount":6,"integrity":"sha512-mgqJLB3sPGqj/VI7VV08WESjtVLieU2F+5x2i/mzekpZD+qFLM0RWVcyBbZ6fvJ4ZfFtHKOxSerq+Wf0kaqnpg==","signatures":[{"sig":"MEYCIQCttfSuauZvx5mT/jDnWnc/7IYTed4g+biKHlgiwFTWQAIhANxwTb3oDlpP1kwztd7k9RTtO/E4Tfrwdu91YuHp09VM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11358},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"b3180c99c5da391e7ffd241b3bca883c157395dd","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","bread-source":"./src/index.ts"}},"scripts":{"build":"bun build ./src/index.ts --outdir dist --target node --format esm --packages external && tsc --emitDeclarationOnly --outDir dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"},"_integrity":"sha512-mgqJLB3sPGqj/VI7VV08WESjtVLieU2F+5x2i/mzekpZD+qFLM0RWVcyBbZ6fvJ4ZfFtHKOxSerq+Wf0kaqnpg==","repository":{"url":"https://github.com/matteozambon89/bread.git","type":"git","directory":"transports/redis"},"_npmVersion":"10.8.3","description":"Redis Streams BreadBus for bread — cross-replica crumb fan-out so passive run streams and HITL work from any container.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"ioredis":"^5.6.1","@breadai/core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/transport-redis_0.1.0_1786817726015_0.34337360561387853","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@breadai/transport-redis","version":"0.1.1","keywords":["ai","agents","redis","streams","bus","sse","bread"],"author":"Matteo Zambon <matteo@yeeti.co>","license":"MIT","_id":"@breadai/transport-redis@0.1.1","maintainers":[{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"}],"homepage":"https://github.com/matteozambon89/bread","dist":{"shasum":"e97978db5e448a6b13e96ee92badd33eb4030004","tarball":"https://registry.npmjs.org/@breadai/transport-redis/-/transport-redis-0.1.1.tgz","fileCount":6,"integrity":"sha512-Rm+EwGl7dYQTlv+TAANl70tHgR418il/1hVbDylu1nF7vc/lcuDYeI3d3mMOd5ELtFG82iA2cN4QTDPZ9FVuAA==","signatures":[{"sig":"MEUCIAC/CHHotikpaqOpz0oUN5i1+bjP2L9SDzjgq3LF9PwHAiEAjn89Wos+WhTmPYQn/wahcoBI2TRIMKs2Wvnm5dzfsL8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11358},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"e97978db5e448a6b13e96ee92badd33eb4030004","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","bread-source":"./src/index.ts"}},"scripts":{"build":"bun build ./src/index.ts --outdir dist --target node --format esm --packages external && tsc --emitDeclarationOnly --outDir dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"},"_integrity":"sha512-Rm+EwGl7dYQTlv+TAANl70tHgR418il/1hVbDylu1nF7vc/lcuDYeI3d3mMOd5ELtFG82iA2cN4QTDPZ9FVuAA==","repository":{"url":"https://github.com/matteozambon89/bread.git","type":"git","directory":"transports/redis"},"_npmVersion":"10.8.3","description":"Redis Streams BreadBus for bread — cross-replica crumb fan-out so passive run streams and HITL work from any container.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"ioredis":"^5.6.1","@breadai/core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/transport-redis_0.1.1_1786919713944_0.4626170871283506","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@breadai/transport-redis","version":"0.1.2","type":"module","exports":{".":{"bread-source":"./src/index.ts","types":"./dist/index.d.ts","import":"./dist/index.js"}},"dependencies":{"@breadai/core":">=0.1.1 <1.0.0","ioredis":"^5.6.1"},"scripts":{"typecheck":"tsc --noEmit","build":"bun build ./src/index.ts --outdir dist --target node --format esm --packages external && tsc --emitDeclarationOnly --outDir dist"},"description":"Redis Streams BreadBus for bread — cross-replica crumb fan-out so passive run streams and HITL work from any container.","license":"MIT","author":"Matteo Zambon <matteo@yeeti.co>","keywords":["ai","agents","redis","streams","bus","sse","bread"],"repository":{"type":"git","url":"https://github.com/matteozambon89/bread.git","directory":"transports/redis"},"homepage":"https://github.com/matteozambon89/bread","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","publishConfig":{"access":"public"},"_id":"@breadai/transport-redis@0.1.2","_integrity":"sha512-gnvGIa92PcdbmmWuNeorY7OXoJQSuD74AH41Q3yTFRPRrqHwRPZnJy6FliIOWCsWy+Xg+S1q1fkvdcB671L7sg==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"128572bcb1504c22da9c9fd1a7a9c3230e6a6617","dist":{"integrity":"sha512-gnvGIa92PcdbmmWuNeorY7OXoJQSuD74AH41Q3yTFRPRrqHwRPZnJy6FliIOWCsWy+Xg+S1q1fkvdcB671L7sg==","shasum":"128572bcb1504c22da9c9fd1a7a9c3230e6a6617","tarball":"https://registry.npmjs.org/@breadai/transport-redis/-/transport-redis-0.1.2.tgz","fileCount":6,"unpackedSize":11367,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIH2BbIDNbRGXsNdvaLm9RcQqEJi+J2JQD3dFaDqmnPkjAiEAqd4UFsCjVtkhzWsoO8bFI3iVFMK7rEKBV0cfHV95vXc="}]},"_npmUser":{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"},"directories":{},"maintainers":[{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/transport-redis_0.1.2_1788713741675_0.37629928124874734"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-15T18:15:25.844Z","modified":"2026-09-06T16:55:41.953Z","0.1.0":"2026-08-15T18:15:26.165Z","0.1.1":"2026-08-16T22:35:14.089Z","0.1.2":"2026-09-06T16:55:41.790Z"},"author":"Matteo Zambon <matteo@yeeti.co>","license":"MIT","homepage":"https://github.com/matteozambon89/bread","keywords":["ai","agents","redis","streams","bus","sse","bread"],"repository":{"type":"git","url":"https://github.com/matteozambon89/bread.git","directory":"transports/redis"},"description":"Redis Streams BreadBus for bread — cross-replica crumb fan-out so passive run streams and HITL work from any container.","maintainers":[{"name":"matteozambon89","email":"matteo.zambon.89@gmail.com"}],"readme":"<p align=\"center\">\n  <a href=\"https://github.com/matteozambon89/bread\">\n    <img alt=\"bread\" src=\"https://cdn.jsdelivr.net/gh/matteozambon89/bread/assets/brand/mark-light-512.png\" height=\"64\">\n  </a>\n</p>\n\n# @breadai/transport-redis\n\nRedis Streams [`BreadTransport`](../../docs/transports.md) for [bread](https://github.com/matteozambon89/bread) —\nthe crumb fabric between replicas of one app. With it, `GET /runs/:runId/stream` and\ncross-container HITL work from **any** container behind the load balancer: the replica executing\na run publishes every client-visible crumb as a `{ runId, seq, crumb }` frame; every other\nreplica can tail it live. The store stays the source of truth (catch-up/replay).\n\n## Install\n\n```bash\nbun add @breadai/transport-redis ioredis\n```\n\n## Usage\n\n```ts\n// bread.config.ts — same config on every replica\nimport { transport } from '@breadai/transport-redis'\n\nexport default defineConfig({\n  entrypoints: ['writer'],\n  store: store(),                    // shared truth\n  transport: transport(),            // shared liveness (REDIS_URL)\n})\n```\n\n### Options\n\n| Option | Default | Meaning |\n|--------|---------|---------|\n| `url` | `REDIS_URL` → `redis://localhost:6379` | Connection string |\n| `keyPrefix` | `bread:run:` | Stream key prefix (`bread:run:{<runId>}` — braces are a cluster hash tag) |\n| `maxLen` | `10000` | Approximate per-stream cap (`XADD MAXLEN ~`) |\n| `ttlSeconds` | `86400` | Per-stream TTL, refreshed on every publish |\n| `blockMs` | `1000` | `XREAD BLOCK` timeout — how fast new subscriptions go live |\n\n## Semantics\n\n- One Redis Stream per run; per-run ordering falls out of per-key ordering.\n- Broadcast, not competing consumers: every replica sees every frame (plain `XREAD`, no\n  consumer groups).\n- At-least-once: per-key last-delivered ids survive ioredis auto-reconnects; duplicates are\n  possible around a reconnect and clients dedup by `seq`.\n- A late subscriber replays history via `subscribe(runId, afterSeq)`: each subscribe independently\n  `XRANGE`s the run's retained history (bounded by `maxLen` + TTL, same trimming as above) and\n  replays entries with `seq > afterSeq` before tailing live — the full `BreadTransport` contract\n  guarantee, not just a tail-anchor.\n\nTests run against a real Redis: set `REDIS_URL`, or have `redis-server` on `PATH` (an ephemeral,\npersistence-free instance is spawned), otherwise the contract registers as skipped.\n","readmeFilename":"README.md"}