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.
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.
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