get_queue_state with includeJobs:true (the DEFAULT path) scrubbed the job list
with value-scrub only, so an opaque token a hoster returns inside a job error
(token=... that is NOT one of the user's stored credentials) survived in the
response. Same leak class already fixed for get_config_redacted and
server_health, still open on the queue collector's default path.
The first end-to-end gate missed it on two coincidences: server_health calls
getQueueState with includeJobs:false (no job error ever serialized), and the
fixture's queue error used a value that WAS a config secret (so value-scrub
caught it anyway). The direct get_queue_state{includeJobs:true} path with a
non-config token was never exercised.
- getQueueState job list and getRotationState now go through _deepRedact
(per-leaf pattern + value scrub), matching the other collectors.
- e2e-verify.mjs now plants a non-config token in a queue job error and asserts
both get_queue_state{includeJobs:true} and the default-args call leak nothing.
- Added a main-suite regression test for the default includeJobs path.
386 app tests + 9 gateway tests + e2e gate pass; lint 0 errors.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| test | ||
| .gitignore | ||
| agent-client.js | ||
| code.js | ||
| index.js | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| registry.example.json | ||
| registry.js | ||
mhu-diagnostics-gateway
A standalone local stdio MCP gateway for remote, read-only diagnostics of the Multi-Hoster-Uploader app.
It is two things at once:
- an MCP server to Claude Code (stdio transport), exposing read-only diagnostic tools, and
- a plain WebSocket client to a diagnostic agent running inside the Electron app on a remote Windows server.
The operator enables "Diagnose-Zugriff" on a server, copies the connection code, and tells
Claude server <name> at <host>, code <CODE>. Claude calls connect_server(code, host) and then
the read-only diagnostic tools. After the first successful connect the server is remembered under
its label, so later you can just say connect_server(label:"prod-3") with no code.
This package is fully self-contained. It does not import anything from the parent Electron app and is not part of the app build.
Install
cd gateway
npm install
Requires Node >= 18.
Register with Claude Code (one time)
claude mcp add --transport stdio mhu-diag -- node "C:\Users\ploet\Desktop\Claude Projekte\multi-hoster-uploader\gateway\index.js"
Adjust the absolute path if you cloned the repo elsewhere.
Usage
In Claude Code, tell Claude:
server prod-3 at 127.0.0.1, code mhu1_<...>
Claude will call connect_server and then diagnostic tools such as server_health
(the one-shot "what's wrong" hub), read_log, list_errors, get_queue_state,
get_rotation_state, and so on.
Security
- Read-only. No screen access, no input injection, no writes. Only reads logs, errors, queue/history/config (redacted), rotation and system info.
- The code is a secret — it carries the auth token. Do not paste it anywhere public.
- The safe default is to reach the agent over
127.0.0.1via an SSH local port-forward or WireGuard. Seedocs/remote-diagnostics-setup.md. registry.jsonstores tokens and is git-ignored — never commit it.