Agent update

This commit is contained in:
Frank Harris 2026-06-06 11:41:17 -05:00
parent c195c0930b
commit cc5f7bb90c
16 changed files with 474 additions and 85 deletions

View file

@ -42,6 +42,7 @@ Panel module
| `remote_server_status` / `server_status` | Structured server status | `gamemanager` | The preferred source for online/start/stop state. |
| `remote_restart_server` / `restart_server` | Restart a server | `gamemanager` | Intended to be stop, wait, start. |
| `remote_query` | Query game metadata | `gamemanager` | Optional metadata only. |
| `exec` | Execute a constrained agent-side command | `gamemanager` fallback status checks, admin tooling | The Game Monitor currently uses this only as a fallback to test whether the configured game port is listening with `ss`/`netstat`. Customer input must not be passed through this path. |
| `steam_cmd` / `steam` / `automatic_steam_update` | SteamCMD-based update flows | Update actions, Workshop/install tools | Used by Steam-based server maintenance. |
| `start_file_download` | Download external content | Update/content tools | Returns a PID or progress handle. |
| `uncompress_file` | Extract archives | Content installers | Used for zip/tar package installs. |
@ -76,6 +77,25 @@ Return values differ by method, but common patterns are:
- `UNRESPONSIVE`
- `UNKNOWN`
The Panel Game Monitor has a defensive fallback path while the structured status system is still being hardened:
```text
remote_server_status if available
-> is_screen_running fallback
-> agent-side port listening check through exec
-> LGSL/GameQ only for optional player/map/query metadata
```
A confirmed managed screen/session, process flag, or listening game port is enough for the Panel to display `ONLINE`. Query failure alone must not produce `OFFLINE` or `UNKNOWN`.
Current compatibility behavior:
- New agents should expose `server_status` / `remote_server_status`.
- Older agents may only expose `is_screen_running` and generic `exec`.
- The Panel therefore falls back to `is_screen_running` and an agent-side port check.
- Agents report `ONLINE` when the configured game port is listening even if the managed screen/session cannot be found, with `last_error` carrying the warning.
- LGSL/GameQ/Steam query data is optional metadata only.
## Sequence Diagrams
### Start
@ -117,7 +137,7 @@ Panel log page
Agent
-> read screen log or console log
Panel
-> refresh textarea via AJAX
-> refresh dedicated preformatted log panel via AJAX
```
## Error Handling Notes
@ -126,4 +146,3 @@ Panel
- Do not treat marker-file presence as the source of truth.
- Do not expose raw shell execution to customers through generic RPC routes.
- When a method returns a payload, record the error text in the Panel UI if the operation fails.