22 Commits

Author SHA1 Message Date
Claude Code f243384d4e Semver rename + single-call gateway
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 21:37:37 -04:00
Claude Code f10e901fe0 Persistent RCON — single connection per server, auto-reconnect
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>
2026-03-20 18:25:05 -04:00
Claude Code 618c98cc4e Error correction, fire fix, Gemini pricing, command format examples
- 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>
2026-03-19 23:09:42 -04:00
Claude Code 4706952c52 Async processing, single-call mode, validator tracking, think stripping
- 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>
2026-03-19 19:03:41 -04:00
Claude Code 6f585e0021 API cascade: Haiku → Gemini → local model, full POS status reports
- _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>
2026-03-19 04:55:59 -04:00
Claude Code 616aab7cf4 Persistent Anthropic cost tracking to disk
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>
2026-03-18 22:29:50 -04:00
Claude Code 9ce2013814 Short God messages, escpos cost printing, Anthropic provider fixes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:33:31 -04:00
Claude Code e4c7dba580 Add Anthropic API provider, short God messages, budget tracking
- 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>
2026-03-18 19:19:11 -04:00
Claude Code 545deb8674 Integrate God Soul into command and message prompts
- 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>
2026-03-18 18:31:36 -04:00
Claude Code a4405f79ea Support MC_AIGOD_CONFIG env var for multi-instance deployment
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>
2026-03-18 17:36:58 -04:00
Claude Code 72c4469fd9 5 validator fixes, [Not Secure] regex, interventions 48/day
Validator improvements (deployed to paper-ai):
- Fix 1: @s → player name (RCON has no executor entity)
- Fix 2: Old NBT {Enchantments:[...]} → 1.21 [enchantments={...}] converter
- Fix 3: Strip invalid item components (display, durability, enc)
- Fix 4: Hallucinated effect repair (invincibility→resistance, etc.)
- Fix 5: Hallucinated command repair (setworldborder→worldborder set, etc.)
- All fixes applied in execute-tail chains too

Chat patterns updated for online-mode=false ([Not Secure] prefix)
Divine interventions set to 48/day

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 16:05:09 -04:00
Claude Code 1e9bda4a15 Add training audit logger, open sudo for playtesting
- 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>
2026-03-18 13:38:25 -04:00
Claude Code 30aa8388e3 Fix sudo follow-up status checks and intent repair gaps 2026-03-17 20:26:29 -04:00
Claude Code 40b4da345a Add retrieval-grounded sudo flow and execution feedback loop 2026-03-17 19:53:32 -04:00
Claude Code f4ce19db6d Add paper bug_log flow and more ironic God persona 2026-03-17 14:53:54 -04:00
Claude Code 0e67883bec Add online player positions to sudo context 2026-03-16 19:41:53 -04:00
Claude Code cf2aeb1a5e Add server_type variable, gate fill/setblock/clone and template build on server_type=paper 2026-03-16 19:36:12 -04:00
Claude Code b7451e3290 Add LangGraph gateway, template manager, teleport border guard, enchantment context, server_type prep, session persistence 2026-03-16 19:28:52 -04:00
Seth 08e8f067ad Paper fork: harden latest.log tailing across rotation/restart
- Detect inode changes and truncation in tail_log
- Reopen latest.log automatically when Paper recreates log file
- Prevent lost trigger parsing after server restarts
2026-03-15 23:40:41 -04:00
Seth d2c302b48e Paper fork polish: isolate logs and deploy docs
- 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
2026-03-15 23:29:08 -04:00
Seth 34697b5341 Paper fork: fallback build package when player position unavailable 2026-03-15 23:27:46 -04:00
Seth 0c2902de8a Add Paper advanced fork implementation
- Introduce dedicated paper AI script (mc_aigod_paper.py)
- Add expanded whitelist for structure ops: fill/setblock/clone
- Add deterministic sudo build templates (house/tower/wall/church)
- Keep prayer/sudo/memory/intervention architecture from base branch
- Add paper-specific config and systemd unit files
- Document deployment/runtime in rewritten README
2026-03-15 23:27:17 -04:00