Commit graph

10 commits

Author SHA1 Message Date
Ryan Vogel
d6962522a4 discord: ignore local env and data artifacts 2026-02-14 16:04:18 -05:00
Ryan Vogel
292ff126c4 discord: simplify Docker workflow with Makefile and update documentation
Replace complex Docker commands with simple Make targets for building,
running, and managing the Discord bot container. This makes it easier
for developers to get started without memorizing lengthy Docker flags.

Also removes outdated CLAUDE.md and adds AGENTS.md files to guide AI
agents working on conversation, database, actors, and sandbox modules.
2026-02-14 15:39:09 -05:00
Kit Langton
46cc9e7567 refactor: restructure conversation runtime around thread entities 2026-02-14 13:40:52 -05:00
Kit Langton
1885db3d8b discord: simplify ConversationLedger to offsets + in-memory dedup
Replace the full inbox state machine (admit/start/setTarget/setPrompt/
setResponse/complete/retry/prune/replayPending) with three methods:
dedup (bounded in-memory Set), getOffset, and setOffset.

Discord is already the durable inbox — on startup we just resume from
persisted offsets per source. Within a session, in-memory dedup prevents
double-processing. This removes ~565 lines of inbox lifecycle code,
the conversation_inbox SQLite table, MessageState, ReliabilityError,
and the prune schedule.
2026-02-14 10:37:47 -05:00
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
Ryan Vogel
ef92226c33 core: let teams deploy discord bot as a single container 2026-02-12 18:20:13 -05:00
Ryan Vogel
c332258f54 docs: add setup guide and env variable reference to discord bot README 2026-02-12 13:15:17 -05:00
Ryan Vogel
bbab5b10d3 core: replace Neon Postgres with bun:sqlite to eliminate external DB signup 2026-02-12 13:09:26 -05:00
Ryan Vogel
9444c95eb2 wip: remove bun.lock and rename package to @opencode/discord 2026-02-12 12:55:55 -05:00
Ryan Vogel
b0e49eb1ac wip: discord bot that provisions daytona sandboxes for opencode sessions in threads 2026-02-12 12:51:38 -05:00