mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
5ecdee36b8
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.
47 lines
1.7 KiB
JSON
47 lines
1.7 KiB
JSON
{
|
|
"name": "slack-example",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"description": "Runnable demo for @copilotkit/bot-slack, @copilotkit/bot-discord, and @copilotkit/bot-telegram — an on-call triage bot (Slack, Discord, and/or Telegram from one shared app) backed by Linear + Notion MCP (query/file issues, find/write Notion pages), with a confirm-before-write HITL gate and e2e harnesses.",
|
|
"license": "MIT",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "tsx watch app/index.ts",
|
|
"start": "tsx app/index.ts",
|
|
"demo:restart": "tsx app/demo-restart.tsx",
|
|
"build": "pnpm exec nx run-many -t build -p \"@copilotkit/bot*\" @copilotkit/runtime",
|
|
"runtime": "tsx runtime.ts",
|
|
"notion-mcp": "tsx scripts/start-notion-mcp.ts",
|
|
"check-types": "tsc --noEmit -p tsconfig.json",
|
|
"test": "vitest run",
|
|
"e2e": "tsx e2e/run.ts",
|
|
"e2e:restart": "tsx e2e/restart-recovery.ts",
|
|
"e2e:telegram": "tsx e2e/telegram-run.ts"
|
|
},
|
|
"dependencies": {
|
|
"@copilotkit/bot": "workspace:*",
|
|
"@copilotkit/bot-discord": "workspace:*",
|
|
"@copilotkit/bot-slack": "workspace:*",
|
|
"@copilotkit/bot-store-redis": "workspace:*",
|
|
"@copilotkit/bot-telegram": "workspace:*",
|
|
"@copilotkit/bot-ui": "workspace:*",
|
|
"@copilotkit/bot-whatsapp": "workspace:*",
|
|
"@copilotkit/runtime": "workspace:*",
|
|
"@tanstack/ai": "^0.32.0",
|
|
"@tanstack/ai-mcp": "^0.1.3",
|
|
"@tanstack/ai-openai": "^0.15.2",
|
|
"@slack/bolt": "^4.2.0",
|
|
"@slack/types": "^2.21.1",
|
|
"playwright": "^1.49.0",
|
|
"zod": "^3.25.76"
|
|
},
|
|
"devDependencies": {
|
|
"@notionhq/notion-mcp-server": "^2.2.1",
|
|
"@types/node": "^22.10.0",
|
|
"dotenv": "^16.4.5",
|
|
"tsx": "^4.19.2",
|
|
"typescript": "^5.6.3",
|
|
"vitest": "^4.1.3"
|
|
}
|
|
}
|