{"_id":"@ai37/a2a-redis-task-store","_rev":"3-091811c378d8c2dbfee019eecc27e092","name":"@ai37/a2a-redis-task-store","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@ai37/a2a-redis-task-store","version":"0.1.0","keywords":["a2a","agent-to-agent","a2a-js","taskstore","task-store","redis","ioredis"],"license":"MIT","_id":"@ai37/a2a-redis-task-store@0.1.0","maintainers":[{"name":"cthtuf","email":"gdazeysinc@gmail.com"}],"dist":{"shasum":"03a347789f43ae4da42b22ddb3fe07f75c4b7d91","tarball":"https://registry.npmjs.org/@ai37/a2a-redis-task-store/-/a2a-redis-task-store-0.1.0.tgz","fileCount":10,"integrity":"sha512-tUs/68+H/WwljJL7xLDC9SH1JmSHKLYTNU71QJwY/uStw7JOmDlRaAfr0nwzFJSoNV6jTjpTNlkWAH0zl0CwoA==","signatures":[{"sig":"MEUCIEbHUlKD9tHTskzerCfa2fk+M1ry15Od8JpEMqdBB49yAiEAz7aKm5Pg2U+q+IzIYW/kV9C+a6kXgKGMMt//9lKIwdU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29429},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"npm":">=10","node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"d3d92025dc13977eeb8a958e13ada1b0bf0ca3b7","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"tsup","clean":"rm -rf dist","verify":"npm run lint && npm run test && npm run build","test:watch":"vitest","prepublishOnly":"npm run verify"},"_npmUser":{"name":"cthtuf","email":"gdazeysinc@gmail.com"},"_npmVersion":"10.9.8","description":"Redis-backed A2A TaskStore for @a2a-js/sdk, built on ioredis: durable Task snapshots for multi-turn/HITL, resubscribe and replay","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"ioredis":"^5.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"npm@10.9.8","devDependencies":{"tsup":"^8.5.0","vitest":"^4.0.8","typescript":"^5.9.3","@a2a-js/sdk":"^0.3.13","@types/node":"^24.11.0"},"peerDependencies":{"@a2a-js/sdk":">=0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/a2a-redis-task-store_0.1.0_1781770444451_0.8270412114342747","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-06-18T08:14:04.269Z","modified":"2026-07-10T08:42:06.325Z","0.1.0":"2026-06-18T08:14:04.579Z"},"license":"MIT","keywords":["a2a","agent-to-agent","a2a-js","taskstore","task-store","redis","ioredis"],"description":"Redis-backed A2A TaskStore for @a2a-js/sdk, built on ioredis: durable Task snapshots for multi-turn/HITL, resubscribe and replay","maintainers":[{"email":"otmjka@gmail.com","name":"akjmto"},{"email":"shtep@list.ru","name":"shtep"},{"email":"gdazeysinc@gmail.com","name":"cthtuf"}],"readme":"# @ai37/a2a-redis-task-store\n\nA Redis-backed [`TaskStore`](https://github.com/a2aproject/a2a-js) for the **A2A** protocol\n(`@a2a-js/sdk`). `Task` snapshots are stored in Redis (with a TTL) and survive **restarts and\nreplicas** — required for multi-turn flows (HITL), resubscribe and replay. A drop-in replacement for\nthe in-memory `TaskStore` that ships with `@a2a-js/sdk`.\n\nFramework-agnostic, built on [`ioredis`](https://github.com/redis/ioredis): pass a connection URL\n(the store creates its own client) or share your application's existing `ioredis` instance.\n\n> **Python?** For Python A2A servers there is a separate, unrelated project —\n> [`a2a-redis`](https://github.com/redis-developer/a2a-redis) — implementing the same A2A `TaskStore`\n> concept (`RedisTaskStore` / `RedisJSONTaskStore`).\n\n## Install\n\n```bash\nnpm i @ai37/a2a-redis-task-store\n# peer dependency:\nnpm i @a2a-js/sdk\n```\n\n`@a2a-js/sdk` is a peer dependency; `ioredis` is installed transitively.\n\n## Usage\n\nPlug it into the A2A request handler instead of the in-memory store:\n\n```ts\nimport { DefaultRequestHandler } from '@a2a-js/sdk/server'\nimport { RedisTaskStore } from '@ai37/a2a-redis-task-store'\n\nconst taskStore = new RedisTaskStore({ url: process.env.REDIS_URL })\nconst handler = new DefaultRequestHandler(agentCard, taskStore, executor)\n```\n\nReuse a shared client (the store will **not** close it in `close()`):\n\n```ts\nimport Redis from 'ioredis'\nimport { RedisTaskStore } from '@ai37/a2a-redis-task-store'\n\nconst redis = new Redis(process.env.REDIS_URL)\nconst taskStore = new RedisTaskStore({ client: redis, keyPrefix: 'myapp:a2a:task:' })\n```\n\nAny A2A server that accepts a `TaskStore` works the same way — just pass an instance.\n\n## Options (`RedisTaskStoreOptions`)\n\n| Option | Default | Description |\n|---|---|---|\n| `url` | — | Connection URL; the store creates its own `ioredis` client and closes it in `close()`. |\n| `client` | — | An existing client (shared with your app); the store does **not** close it. Mutually exclusive with `url`. |\n| `keyPrefix` | `'a2a:task:'` | Key namespace prefix. |\n| `ttlSeconds` | `86400` (24h) | Snapshot TTL. `0` → no expiry. |\n| `logger` | `console` | `{ warn, error }` used for warnings (corrupt snapshot, connection error). |\n\nYou must provide **either** `url` **or** `client` (otherwise the constructor throws).\n\n## API\n\n- `save(task)` / `load(taskId)` — the `@a2a-js/sdk` `TaskStore` contract.\n- `delete(taskId)` — remove a snapshot (outside the contract; handy for cleanup/tests).\n- `close()` — close the connection **if** the store owns the client (created from `url`); otherwise a no-op.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}