How asphyksia/opencore works
Opencore extends the opencode coding-agent runtime with three agent modes and plugins for memory, code search, session recall, usage tracking, and skills. Its optional Telegram gateway authenticates users, maintains per-chat agent/session/model state, and forwards prompts to a locally spawned opencode server. The README documents the plugin capabilities and gateway behavior; plugin source was not sampled, so internal plugin-to-storage calls are not asserted.
Main entry points: index.ts Gateway Orchestrator · opencode-service.ts Server Bridge · dev.md Dev Agent · chat.md Chat Agent
Components 24
Agent Modes
- Dev Agent
.opencode/agents/dev.md - Chat Agent
.opencode/agents/chat.md - Plan Agent
.opencode/agents/plan.md
Context Plugins
- Persistent Memory
.opencode/plugins/memory.ts - Memory Storage
.opencode/plugins/lib/memory-store.ts - Codebase Search
.opencode/plugins/codebase.ts - Code Indexer
.opencode/plugins/lib/indexer.ts - Hybrid Search
.opencode/plugins/lib/hybrid.ts - Embeddings
.opencode/plugins/lib/embeddings.ts - Codebase Storage
.opencode/plugins/lib/codebase-store.ts - Session Recall
.opencode/plugins/session-search.ts - Session Storage
.opencode/plugins/lib/session-store.ts - Token Budget
.opencode/plugins/budget.ts - Skill Telemetry
.opencode/plugins/skill-telemetry.ts - Agent Skills
.opencode/skills/git-release/SKILL.md
Telegram Gateway
- Gateway Orchestrator
gateway/src/index.ts - Gateway Config
gateway/src/config.ts - Pairing Allowlist
gateway/src/allowlist.ts - Server Bridge
gateway/src/opencode-service.ts
External Services
- opencode Runtime
- Telegram API
- MCP Servers
Other components
- User
- Telegram User
Connections 20
- User → opencode Runtime: prompts
README.md - opencode Runtime → Dev Agent: loads mode
README.md - opencode Runtime → Chat Agent: loads mode
README.md - opencode Runtime → Plan Agent: loads mode
README.md - opencode Runtime → Persistent Memory: loads plugin
README.md - opencode Runtime → Codebase Search: loads plugin
README.md - opencode Runtime → Session Recall: loads plugin
README.md - opencode Runtime → Token Budget: loads plugin
README.md - opencode Runtime → Skill Telemetry: loads plugin
README.md - opencode Runtime → Agent Skills: loads on demand
README.md - opencode Runtime → MCP Servers: queries docs
README.md - Telegram User → Telegram API: sends messages
- Telegram API → Gateway Orchestrator: delivers updates
gateway/src/index.ts - Gateway Orchestrator → Gateway Config: loads settings
gateway/src/index.ts - Gateway Orchestrator → Pairing Allowlist: checks pairing
gateway/src/index.ts - Gateway Orchestrator → Server Bridge: starts server
gateway/src/index.ts - Gateway Orchestrator → Server Bridge: creates sessions
gateway/src/index.ts - Gateway Orchestrator → Server Bridge: forwards prompts
gateway/src/index.ts - Server Bridge → opencode Runtime: calls local server
gateway/src/opencode-service.ts - Gateway Orchestrator → Telegram API: replies
gateway/src/index.ts