v0.143.0 — guest RAM resize UI (R-24) — MinAgent: 0.90.0

The customer sees the guest's current memory + allowed range on the Rendszer settings
page and resizes it. The controller proxies + maps the agent's machine code to Hungarian;
the agent (felhom-agent v0.90.0) enforces every bound and applies live (no reboot).

agentapi: GuestMemory + ResizeMemory; ruled 412 -> *MemoryRefusedError (code+bounds);
pre-0.90 agent 404 -> typed *StatusError. Capability: FeatureGuestMemoryResize +
featureMinAgent 0.90.0 + a featureProbes row (type-asserts GuestMemory so the shared
SupportProber/netAgent are untouched).

UI (internal/web/system_memory_handlers.go, settings_system.html): "Szerver memoria (RAM)"
card + number input; POST /api/system/memory/resize -> capability gate -> agent -> flash.
JS confirm only on shrink. Code->Hungarian map; agent-outdated hides the control;
agent-unreachable falls back to the guest's /proc/meminfo. Agent English never shown raw.

Tests: agentapi (decode, 404, refusal-code, capability table) + web handler (success/
below_usage_floor/agent_outdated). Gates + go build/vet/test all pass.
This commit is contained in:
2026-07-17 19:10:00 +02:00
parent f900c83eed
commit 3286c7faaf
10 changed files with 688 additions and 1 deletions
+5
View File
@@ -109,6 +109,11 @@ type Server struct {
// semantics — the add gate + the settings-page banner read it. Zero value ready.
netFeatures agentapi.SupportCache
// memFeatures caches the guest-memory-resize capability probe (agent v0.90.0, R-24) — the resize
// handler gate + the settings-page render read it. Zero value ready. memAgentFn is the test seam.
memFeatures agentapi.SupportCache
memAgentFn func() (memAgent, error)
// Asset syncer for Hub-managed assets (optional)
assetsSyncer *assets.Syncer