Add LangGraph gateway, template manager, teleport border guard, enchantment context, server_type prep, session persistence
This commit is contained in:
@@ -25,6 +25,35 @@ This fork targets a dedicated **Paper** server on port `25567` and adds advanced
|
||||
- Message model: `gemma3:12b`
|
||||
- Command model: `qwen3-coder:30b`
|
||||
|
||||
### LangGraph-style Gateway Sidecar (implemented)
|
||||
|
||||
- Service: `mc-langgraph-gateway.service`
|
||||
- API: `http://127.0.0.1:8091`
|
||||
- Script: `/usr/local/bin/langgraph_gateway.py`
|
||||
- Config: `/etc/mc_langgraph_gateway.json`
|
||||
|
||||
`mc_aigod_paper.py` can route modes through session APIs:
|
||||
|
||||
- `god` (prayer)
|
||||
- `sudo` (translator)
|
||||
- `god_system` (intervention / first-login)
|
||||
|
||||
Enable via config:
|
||||
|
||||
```json
|
||||
"use_langgraph_gateway": true,
|
||||
"langgraph_gateway_url": "http://127.0.0.1:8091"
|
||||
```
|
||||
|
||||
The runtime still enforces whitelist/repair/caps/auth after gateway output.
|
||||
|
||||
Gateway hardening currently included:
|
||||
|
||||
- Session reuse by `player+mode` when still active (less duplicate session churn)
|
||||
- SQLite-backed session persistence across gateway restarts
|
||||
- Command sanitization at gateway return time (strips leading `/`, rejects prose/non-command lines)
|
||||
- Mode-specific command family filtering and command dedupe/cap
|
||||
|
||||
---
|
||||
|
||||
## Services
|
||||
@@ -60,6 +89,32 @@ Examples:
|
||||
- `sudo create church`
|
||||
- `sudo build wall`
|
||||
|
||||
Template manager commands:
|
||||
|
||||
- `sudo template search <query>`
|
||||
- `sudo template download <https-url|#n|n> [name]`
|
||||
- `sudo template install <https-url> [name]`
|
||||
- `sudo template pick <n> [name]` (download from last search result index)
|
||||
- `sudo template sync` (pull from configured sync sources/manifest)
|
||||
- `sudo template build <filename|name>` (or no arg = last downloaded template)
|
||||
- `sudo template list`
|
||||
- `sudo template delete <filename>`
|
||||
- `sudo template hosts`
|
||||
|
||||
Notes:
|
||||
|
||||
- Template download now requires direct file URLs only (`.schem/.schematic/.nbt/.zip`)
|
||||
- Template search is direct-link only (no page scraping)
|
||||
- Recommended workflow is `template sync` + `template build`
|
||||
|
||||
Info lookup mode via sudo:
|
||||
|
||||
- `sudo lookup <question>`
|
||||
- `sudo wiki <question>`
|
||||
- `sudo search <question>`
|
||||
|
||||
Lookup mode is information-only (wiki/web retrieval + optional justification), and does not execute game commands.
|
||||
|
||||
These trigger multi-command `fill/setblock/give` sequences near the player and are optimized for Paper performance.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user