How nssmd/jev-bot works
JEV is a self-hosted decision workbench with a web UI and a Feishu bot. Users submit a question for automatic candidate generation and Jev selection, or provide options for direct comparison; results include probabilities. Experimental writing repeatedly selects words or characters. The server routes requests to Jev and, optionally, a separate text-model provider. The bot also supports guided input, cancellation, and durable event deduplication. The graph follows documented capabilities and sampled wiring; unsampled UI and server details are represented only where README documentation supports them.
Main entry points: start.mjs Bot runtime · app.js Web UI · gateway.mjs Judge gateway · api.js Browser API client
Components 17
Web workbench
- Web UI
public/app.js - Browser API client
public/api.js
Decision backend
- HTTP server
server.mjs - Judge gateway
gateway.mjs - Candidate generation
structurer.mjs
Writing loops
- Word writing loop
public/word-writing.js - Word decision decoder
word-decoder.mjs - Word inventory
word-inventory.json - Character writing loop
public/writing.js
Feishu bot
- Bot runtime
bot/start.mjs - Message workflow
bot/core.mjs - Deduplication journal
bot/start.mjs
External services
- TypeSafe Jev API
- Text model provider
- Feishu platform
Other components
- Web user
- Feishu user
Connections 23
- Web user → Web UI: submits input
- Web UI → Browser API client: requests decisions
- Browser API client → HTTP server: POSTs request
- HTTP server → Judge gateway: routes request
- Judge gateway → Candidate generation: generates candidates
- Candidate generation → Text model provider: requests options
- Judge gateway → TypeSafe Jev API: requests judgment
- Judge gateway → Word decision decoder: decodes next word
- Word decision decoder → Word inventory: reads vocabulary
- Web UI → Word writing loop: generates words
- Word writing loop → Browser API client: requests predictions
- Web UI → Character writing loop: generates characters
- Character writing loop → Browser API client: requests predictions
- Judge gateway → Browser API client: returns results
- Web UI → Web user: shows probabilities
- Feishu user → Feishu platform: sends message
- Feishu platform → Bot runtime: delivers events
- Bot runtime → Message workflow: dispatches messages
- Message workflow → Bot runtime: invokes callbacks
- Bot runtime → HTTP server: requests judgment
- Bot runtime → Word writing loop: generates bot writing
- Bot runtime → Deduplication journal: claims and records events
- Bot runtime → Feishu platform: replies with cards