opencode/packages/discord/package.json
Kit Langton 3c22e16386 discord: idiomatic Effect refactor with conversation service, durable ledger, and split sandbox architecture
Refactor the Discord bot to idiomatic Effect TypeScript:

- Branded types (ThreadId, ChannelId, etc.) and Schema.Class for all data
- Split SandboxManager into SandboxProvisioner (stateless lifecycle) + ThreadAgentPool (per-thread orchestration)
- Pure Conversation service with port interfaces (Inbox/Outbox/History/Threads)
- ConversationLedger for message dedup, at-least-once delivery, and replay on restart
- Per-thread serialized execution via ActorMap with idle timeouts
- Discord slash commands (/status, /reset) and in-thread commands (!status, !reset)
- Catch-up on missed messages at startup via offset tracking
- Typed errors (Schema.TaggedError) with retriable/non-retriable classification
- Local CLI (conversation:cli) and automation CLI (conversation:ctl)
- Test coverage for conversation service, ledger, session store, and actors
2026-02-14 00:51:01 -05:00

38 lines
1.2 KiB
JSON

{
"name": "@opencode/discord",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"db:init": "bun run src/db/init.ts",
"dev": "bun run --watch src/index.ts",
"dev:setup": "bun run db:init",
"start": "bun run src/index.ts",
"conversation:cli": "bun run src/conversation/control/cli.ts",
"conversation:controller": "bun run src/conversation/control/controller.ts",
"conversation:ctl": "bun run src/conversation/control/controller.ts",
"build": "bun build src/index.ts --target=bun --outdir=dist",
"typecheck": "tsc --noEmit",
"check": "bun run typecheck && bun run build",
"prepare": "effect-language-service patch"
},
"dependencies": {
"@daytonaio/sdk": "latest",
"@effect/ai": "^0.33.2",
"@effect/ai-anthropic": "^0.23.0",
"@effect/experimental": "^0.58.0",
"@effect/sql-sqlite-bun": "^0.50.0",
"@effect/platform": "latest",
"@effect/platform-bun": "0.87.1",
"@opencode-ai/sdk": "latest",
"discord.js": "^14",
"effect": "^3"
},
"devDependencies": {
"@effect/language-service": "0.73.1",
"@effect/sql": "^0.49.0",
"@types/bun": "latest",
"@types/node": "^22",
"typescript": "^5"
}
}