feat: add Discord channel, OpenCode runtime, rename to Regolith
Some checks failed
Update token count / update-tokens (push) Has been cancelled

- Discord channel integration (discord.js) with mention stripping, attachment tagging, reply context, message chunking
- OpenCode runtime with CLI and SDK modes, SQLite session persistence, idle timeout cleanup
- Multi-channel architecture: WhatsApp + Discord simultaneous or independent via DISCORD_ONLY/DISCORD_BOT_TOKEN
- Config additions: DISCORD_BOT_TOKEN, DISCORD_ONLY, OPENCODE_MODE, OPENCODE_MODEL, OPENCODE_TIMEOUT, OPENCODE_SESSION_TTL_HOURS
- Updated README and CLAUDE.md documentation
- Renamed project to Regolith in package.json
This commit is contained in:
2026-02-19 02:30:14 -05:00
parent 646491ce5c
commit a3a7e7a480
16 changed files with 1744 additions and 180 deletions

32
src/opencode/types.ts Normal file
View File

@@ -0,0 +1,32 @@
export type RuntimeMode = 'cli' | 'sdk';
export interface OpenCodeConfig {
mode: RuntimeMode;
command: string;
serverUrl: string;
serverPassword?: string;
timeoutMs: number;
model?: string;
provider?: string;
systemPrompt?: string;
workspaceDir?: string;
format: 'json' | 'default';
sessionTtlHours: number;
}
export interface AgentResponse {
text: string;
sessionId?: string;
model?: string;
error?: string;
durationMs: number;
rateLimited: boolean;
}
export interface LiveSession {
conversationId: string;
sessionId?: string;
createdAt: number;
lastActive: number;
messageCount: number;
}