Files
Alem Tuzlak 5ecdee36b8 feat(bot): pluggable StateStore persistence + cross-platform transcripts
Adds a durable persistence layer for @copilotkit/bot, replacing the
in-memory-only ActionStore with a pluggable StateStore.

- StateStore interface (kv/list/lock/dedup/queue) with a shared
  conformance suite; MemoryStore default plus @copilotkit/bot-store-redis
  and @copilotkit/bot-store-postgres backends.
- createBot({ store }): typed per-thread state via Standard Schema,
  action snapshots persisted through the store, per-conversation turn
  lock (onLockConflict drop|force), and inbound-event dedup keyed on a
  stable eventId. ActionStore is kept as a deprecated alias.
- Cross-platform transcripts (bot.transcripts + identity resolver) with
  age-bounded retention (prune on append + filter on read), and
  runAgent({ transcript: true }) to auto-inject history and capture the
  reply.
- createBot({ components }) re-registers components so durable actions
  re-fire after a restart; restart-durability demo in examples/slack.
- Dedup is marked seen only after the turn lock is acquired, so a turn
  dropped on lock-conflict does not burn its eventId (no lost retries).
- Release lockstep: bot-store-redis/postgres version with bot + bot-ui.
2026-06-23 18:33:38 +02:00

56 lines
1.3 KiB
JSON

{
"name": "@copilotkit/bot-store-postgres",
"version": "0.0.2",
"description": "Postgres StateStore backend for @copilotkit/bot.",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/CopilotKit/CopilotKit.git",
"directory": "packages/bot-store-postgres"
},
"homepage": "https://github.com/CopilotKit/CopilotKit",
"keywords": [
"ai",
"agent",
"bot",
"postgres",
"statestore",
"copilotkit",
"ag-ui"
],
"publishConfig": {
"access": "public"
},
"files": [
"dist"
],
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"scripts": {
"build": "tsc -p tsconfig.json",
"check-types": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.check.json",
"test": "vitest run",
"test:watch": "vitest",
"publint": "publint .",
"attw": "attw --pack . --profile esm-only"
},
"dependencies": {
"@copilotkit/bot": "workspace:~",
"pg": "^8"
},
"devDependencies": {
"@copilotkit/typescript-config": "workspace:^",
"@types/node": "^22.10.0",
"@types/pg": "^8",
"typescript": "^5.6.3",
"vitest": "^4.1.3"
}
}