Expand MCP controls and add cached system resource telemetry
CI / verify (push) Canceled after 0s

This commit is contained in:
Sucukdeluxe committed 2026-10-20 13:12:21 +02:00
1 parent d3cba015b5
commit c4439480bd
6 files changed
+224 -17

No files matched your search

+6
View File
@@ -328,6 +328,12 @@ The update first saves its resume intent, stops new admission and waits for curr
`mhu_performance_get` is read-only and returns bounded in-memory samples of main-thread timer delay, renderer round trips, CPU usage, process memory, asynchronous file-I/O waits and upload-slot occupancy. It does not launch host commands. A slow network request, provider wait or asynchronous disk operation is not itself a main-thread freeze. Long timer gaps are reported as measurement gaps, not proven freezes. Historical samples cover only the current process and their bounded retention window.
`mhu_system_metrics` provides separate system-wide CPU and RAM measurements, process CPU/RAM, Windows physical-disk read/write throughput, IOPS, activity, queue lengths, cumulative byte counters and volume capacity. Sampling runs every ten seconds while MCP is enabled. Windows storage counters are collected asynchronously through a fixed, hidden, timeout-limited system query; the tool itself only reads the cache. Use `limit` (1–60) for recent samples. Large responses are truncated with an explicit flag. Initial rates are `null` until two valid samples exist; failed queries retain the last storage sample with `available: false` and `stale: true`. Cumulative byte totals are decimal strings to preserve integer precision. Storage metrics cover the whole machine, not just uploader I/O; the `_Total` activity counter is an aggregate, not the busiest disk.
Use `mhu_capabilities` to inspect effective permissions and available actions before controlling an installation. `mhu_automation_pause` and `mhu_automation_resume` explicitly control the shared upload/automation pause; their queue equivalents remain supported. Resuming does not enable a disabled monitor. `mhu_automation_start` enables configured monitoring and returns `AUTOMATION_PAUSED` if the shared pause must first be resumed. Failed lifecycle operations return an MCP error, not a successful response containing an error string. A read-only status check never changes the pause state.
Structured settings updates also support upload parallelism scaling, partial filename-scrambling settings, history retention and hoster size-limit memory. Enabling automatic source deletion, a completion power action or limited history retention requires exact local confirmation. `mhu_shutdown_cancel` cancels the pending completion action immediately, then saves `nothing` as the policy. This does not authorize immediate system shutdown or unrestricted operating-system control.
The upload scheduler no longer reserves a global transfer slot while waiting for a hoster's configured start interval. Per-hoster spacing remains enforced at admission. Upload file metadata and chunk reads use asynchronous I/O. These changes do not reduce configured parallelism or change successful-upload confirmation requirements. Synthetic benchmark results demonstrate the targeted scheduling case only; server-specific throughput and freeze improvements require measurements after installing the new version.
### Diagnostic artifacts and file transfer