Repository navigation
feat(gateway): add system.info RPC and Gateway Host card in Settings - #100478
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2068245ba3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
2068245 to
399e03e
Compare
|
Codex review: found issues before merge. Reviewed July 5, 2026, 9:26 PM ET / 01:26 UTC. Summary Reproducibility: not applicable. this is a feature PR rather than a bug report. The changed behavior is supported by redacted live RPC output, focused Testbox runs, generated Swift proof, and macOS DOM proof in the PR discussion. Review metrics: 2 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Land a refreshed, narrow Gateway Host PR that documents the public RPC, removes release-owned changelog and unrelated drift, fixes the extended-stable and Android carryovers, and has explicit maintainer acceptance of the Do we have a high-confidence way to reproduce the issue? Not applicable; this is a feature PR rather than a bug report. The changed behavior is supported by redacted live RPC output, focused Testbox runs, generated Swift proof, and macOS DOM proof in the PR discussion. Is this the best way to solve the issue? No; the feature shape is plausible, but the current branch is too broad and still carries concrete blockers. The best path is a narrow refreshed Gateway Host PR with protocol docs, no release-owned changelog, fixed upgrade carryovers, and explicit scope acceptance. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d6f0747f69d3. Label changesLabel changes:
Label justifications:
Evidence reviewedSecurity concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (7 earlier review cycles)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 399e03ed8d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 310b24b2ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd0f8d45f4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { name: "terminal.list", scope: "operator.admin" }, | ||
| { name: "terminal.text", scope: "operator.admin" }, | ||
| // Additive discovery methods append here so older clients keep stable indices. | ||
| { name: "system.info", scope: "operator.read" }, |
There was a problem hiding this comment.
Document the new Gateway RPC in protocol docs
Because this advertises system.info as a new public Gateway RPC and adds protocol/native model contracts, the canonical Gateway protocol page needs the method, scope, and payload shape too. I checked docs/gateway/protocol.md and it still has no system.info entry, while taxonomy routes Gateway RPC API docs to that page; SDK/native users following the protocol docs would not discover this new read API.
Useful? React with 👍 / 👎.
|
Land-ready review proof for rebased head
|
bbe4589 to
5b445d1
Compare
|
Merged via squash.
|


What Problem This Solves
The web UI gives no answer to "which machine is this Gateway actually running on, and does it have headroom?" Nothing in Settings (or anywhere else in the Control UI) shows the gateway host's name, LAN address, or system resources; the quick-settings footer only shows connection state and server version. Users managing a remote or headless gateway have to SSH in to check.
Closes #100465.
Why This Change Was Made
Adds one additive, read-only surface end to end:
system.infogateway RPC (scopeoperator.read, same assystem-presence): machine display name, hostname, platform/release/arch, advertised LAN address, actual runtime port, Node version, PID, process uptime, CPU count/model, load average (omitted when the platform reports all zeros, e.g. Windows), total/free RAM, and free/total disk for the state-dir volume. Collection reuses existingsrc/infrahelpers (machine-name,advertised-lan-host,disk-space); the port comes fromresolveGatewayPort(), which reflects the real runtime port because the server pinsOPENCLAW_GATEWAY_PORTat startup (src/gateway/server.impl.ts).operator.reador against older gateways that don't know the method.packages/gateway-protocol(additive; no protocol version bump), generated Swift protocol models refreshed viapnpm protocol:gen:swift, method listed intaxonomy.yaml, docs updated indocs/web/control-ui.md.Alternatives considered: extending the
hellosnapshot (rejected — dynamic stats would bloat a payload every client gets on connect) and extendingstatus/health(rejected — those are channel-health contracts).User Impact
Settings now shows where the Gateway runs (machine name, LAN IP:port, OS) and how the host is doing (uptime, CPU/load, RAM, free disk) at a glance. No behavior changes for existing surfaces; clients lacking the read scope simply don't see the card.
Evidence
All proof runs on Blacksmith Testbox (Linux, Node 24):
Focused tests:
pnpm test src/gateway/server-methods/system-info.test.ts packages/gateway-protocol/src/schema/system-info.test.ts ui/src/pages/config/quick.test.ts— 3 shards passed (server handler test in both gateway projects, 19 UI quick-settings tests incl. populated/loading/hidden card states, schema accept/reject tests).Live round-trip against a real built gateway (
pnpm build,openclaw gateway run, token auth):pnpm check:changed: typecheck all (tsgo -b), oxlint shards, runtime import cycles, database-first/media/sidecar guards — all green (exit 0).Server handler payload is validated against
SystemInfoResultSchemainside the test; structured autoreview (Codex, gpt-5.5) over the full diff reported no actionable findings.