Replaces socket-per-command pattern that crashed the dev server.
Connection pool keyed by host:port. Thread-safe with lock.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Error correction on both sudo and pray paths
- Broadened RCON error detection: <--[HERE] catches all syntax errors
- Fixed fire fallback matching "firework" as fire intent
- Dynamic Gemini pricing by model name
- Command format RIGHT vs WRONG examples in prompts
- max_tokens 600 for command calls
- Removed template workflow from sudo prompt and context
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ThreadPoolExecutor (3 workers) for concurrent prayer/sudo processing
- Single-call mode: one LLM call returns commands + message (config: single_call)
- Validator hit-rate tracking to /var/log/mc_validator_stats.json
- Strip <think> blocks from Qwen3 model output via regex
- Fresh LangGraph sessions (no history carryover)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- _llm_call routes through cascade: Haiku ($20) → Gemini Flash Lite ($20) → Ollama fallback
- Gemini API call function with persistent cost tracking
- Full status report on POS printer at each $1 milestone
(cost, audit counts, services)
- Prayer title flash: "Your prayers have been answered!"
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cost survives service restarts via /var/log/mc_anthropic_cost.json.
Saves after every API call. POS receipt prints at each $1 milestone.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- llm_provider config: "anthropic" or "ollama" (default)
- Anthropic call with cost tracking and budget cap
- Auto-fallback to Ollama when budget exhausted
- God message prompt: "1-2 sentences max, Old Testament telegram"
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Loads god_soul.md from script directory or /etc/god_soul.md
- Command prompt includes full soul for decision-making guidance
- Message prompt includes soul for voice and personality
- Multilingual: message matches prayer language, commands always English
- Deployed to prod (paper-ai) and dev (paper-dev)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CONFIG_PATH now reads from MC_AIGOD_CONFIG env var, falling back
to /etc/mc_aigod_paper.json. Enables running multiple instances
with different configs (e.g. dev server with fine-tuned model).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Structured JSONL audit log for every pray/sudo interaction
- Bug_log feedback linked to last interaction with trust-level tagging
- sudo_allow_all_players config flag for playtest mode (enabled)
- training_audit_path config key (/var/log/mc_training_audit.jsonl)
- Deployed to CT 644 paper-ai server
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Detect inode changes and truncation in tail_log
- Reopen latest.log automatically when Paper recreates log file
- Prevent lost trigger parsing after server restarts
- Use /var/log/mc_aigod_paper.log and _paper_responses.log
- Keep paper service logs separate from vanilla service
- Include paper config/service/runtime docs in fork
- Rewrite README to reflect live architecture and feature set
- Document pray/bible/sudo triggers (chat without slash)
- Document two-call model split and context payloads
- Add first-login benevolence behavior and persistence
- Add sudo history context and whitelist details
- Update config table and shrink-world example values
- Refresh deployment and debugging sections
- Document sudo history context (last 10 actions)
- Document whitelist scope and syntax auto-repair
- Clarify sudo must be typed in chat without slash
- Add additional sudo usage example
- First-login benevolence hook on player join (once per player, persisted)
- New first-login memory file and config keys
- Benevolence command prompt enforces multi-command blessing behavior
- Limit first-login player-kill commands to at most one
- Add sudo history buffer (last 10 actions) and inject into sudo translator context
- Add effect syntax auto-fix for malformed 'effect <player> ...' outputs
- New sudo chat trigger: 'sudo <request>'
- Authorized user only (configurable, default slingshooter08)
- Uses command_model to translate natural language to JSON commands
- Executes commands through existing whitelist/validator pipeline
- No God persona or speech call in sudo mode
- Added sudo_enabled/sudo_user/sudo_max_commands config keys
- Added common give-item alias normalization (wood->oak_log, bed->white_bed)
- Updated README with sudo usage and config docs