Add sudo translator agent with whitelist and user lock

- 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
This commit is contained in:
2026-03-15 19:56:50 -04:00
parent c94fa1872a
commit 52d288406a
3 changed files with 165 additions and 4 deletions
+26
View File
@@ -97,6 +97,9 @@ Minecraft_Ai_God.md # Full design document with architecture details
| `max_commands_per_response` | int | `6` | Max commands God can issue per prayer |
| `interventions_per_day` | float | `4` | Avg unprompted interventions per 24h. `0` to disable |
| `debug_commands` | bool | `false` | Show executed commands in-game via dark gray tellraw |
| `sudo_enabled` | bool | `true` | Enable sudo translator mode |
| `sudo_user` | string | `"slingshooter08"` | Only this username can execute sudo commands |
| `sudo_max_commands` | int | `3` | Max translated commands per sudo request |
| `memory_path` | string | see below | Path to persist prayer memory JSON |
| `god_chat_prefix` | string | `"[GOD]"` | Chat prefix (supports Minecraft color codes) |
@@ -120,6 +123,9 @@ Default memory path: `<instance_data_dir>/aigod_memory.json`
"max_commands_per_response": 6,
"interventions_per_day": 4,
"debug_commands": false,
"sudo_enabled": true,
"sudo_user": "slingshooter08",
"sudo_max_commands": 3,
"memory_path": "/path/to/minecraft/aigod_memory.json",
"god_chat_prefix": "[§6§lGOD§r]"
}
@@ -134,6 +140,26 @@ Type in chat (no slash — vanilla 1.21 rejects unknown slash commands client-si
```
pray <message> — send a prayer to God
bible — show help/guidance
sudo <request> — command translator mode (authorized user only)
```
### Sudo Translator Mode
`sudo` is a separate agent path bundled in the same script. It does not use God's persona or speech pipeline.
- Trigger: `sudo <natural language request>`
- Authorization: only `sudo_user` (default `slingshooter08`)
- Model: uses `command_model`
- Output: JSON commands only, then executes via same whitelist validator
- No divine speech generated
Example:
```
sudo give me 500 wood
```
Best-effort translation:
```
give slingshooter08 minecraft:oak_log 500
```
On login players see: