Skip to content

docs(gateway): reconcile RPC surface + local SecretRef resolution (#2724)#2740

Merged
alexey-pelykh merged 1 commit into
mainfrom
docs/gateway-rpc-surface-secrets-2724
Jun 18, 2026
Merged

docs(gateway): reconcile RPC surface + local SecretRef resolution (#2724)#2740
alexey-pelykh merged 1 commit into
mainfrom
docs/gateway-rpc-surface-secrets-2724

Conversation

@alexey-pelykh

@alexey-pelykh alexey-pelykh commented Jun 18, 2026

Copy link
Copy Markdown

Part of #2724 (gateway-suite remediation — docs accuracy). One slice of a multi-part tracker — this PR intentionally leaves #2724 open for the remaining parts.

Reconciles the gateway docs to the fork's actual RPC surface and local SecretRef resolution. Every changed line was verified against the live fork code (BASE_METHODS, GATEWAY_EVENTS, the real handlers, and the resolver modules) — not a mechanical find-replace.

(a) Local SecretRef resolution — docs/cli/qr.md, docs/gateway/secrets.md

The fork resolves SecretRefs locally and in-process via src/secrets/resolve.ts (env/file/exec) and src/gateway/resolve-configured-secret-input-string.ts. The gateway secrets.resolve snapshot RPC was dropped in #2728 (it had no handler) — there is no RPC path anymore.

  • secrets.md § Command-path resolution: rewritten to describe local, in-process resolution; removed the "gateway snapshot RPC", the "read from the active snapshot / gateway-unavailable fallback" framing, and the Gateway RPC method used by these command paths: secrets.resolve line. The strict (fail-fast) vs read-only (degrade) distinction is kept — both verified: qr --remote fails fast (resolveRequiredConfiguredSecretRefInputString throws); the configured but unavailable in this command path degrade diagnostics are real (commands/channels/status.ts, commands/status-all/channels.ts, commands/doctor-config-flow.ts, gateway/credentials.ts).
  • qr.md: line 44 rewritten to local resolution (qr resolves all refs in-process via qr-cli.ts + pairing/setup-code.ts, running exec providers locally; no gateway client); removed the obsolete secrets.resolve gateway-version-skew note.

#2728's own commit body explicitly deferred this as follow-up gap (A): "secrets.md/qr.md command-path SecretRef-resolution docs still name secrets.resolve as the gateway snapshot RPC, but the fork resolves locally."

(b) RPC method families — docs/gateway/protocol.md

Removed the methods #2720 dropped from BASE_METHODS (confirmed absent from BASE_METHODS and with no handler in coreGatewayHandlers):

Removed (method) Evidence
models.list not in BASE_METHODS; no handler (only in server-startup-unavailable-methods.ts)
skills.search, skills.detail, skills.bins not in BASE_METHODS; no handler
plugin.approval.request / .list / .waitDecision / .resolve (methods) not in BASE_METHODS; no handler
commands.list not in BASE_METHODS; no handler

Methods-vs-events distinction preserved: the plugin.approval.requested / plugin.approval.resolved events are in GATEWAY_EVENTS (server-methods-list.ts:139-140) and remain documented under "Common event families".

Verified ambiguous families (the handlers do not confirm them → corrected):

  • sessions.usage / sessions.usage.timeseries / sessions.usage.logs: not in BASE_METHODS, no handler anywhere repo-wide — only an orphan classification in method-scopes.ts:76-78. Removed.
  • exec.approval.get / exec.approval.list: not in BASE_METHODS, not in method-scopes, no handler. Removed from the exec-approval line (kept exec.approval.request / resolve + waitDecision, all in BASE_METHODS).

Also dropped the now-empty "Node helper methods" subsection (it only documented skills.bins) and the stray models token in the "## Scope" capability list.

Note: this fork's BASE_METHODS deliberately still advertises some declared-but-unhandled methods (e.g. sessions.create/send/abort, exec.approval.request) while the execution engine is mid-gutting. Those are the advertised surface and are intentionally left documented — out of scope here.

Verification

  • astro build of the docs site passes (319 pages, exit 0).
  • rebrand-gate passes (no openclaw leakage introduced).
  • oxfmt 0.38.0 --check: all three files correctly formatted.

Out-of-scope findings (flagged, NOT changed — surgical 3-file scope)

These reference removed methods but live outside the three named files; flagging for a future #2724 pass (or confirm if they should be folded in):

  • docs/web/control-ui.md:113 — lists models.list as a manual debug RPC call.
  • docs/tools/exec-approvals.md:261 — describes skills.bins over the Gateway RPC.
  • docs/gateway/bridge-protocol.md:52 — lists skills.bins in the scoped gateway RPC set.
  • docs/gateway/secrets.md § Activation triggers (~lines 387, 396) — reference bare secrets.reload (also not in BASE_METHODS); likely the CLI remoteclaw secrets reload command rather than the gutted RPC.

🤖 Generated with Claude Code

)

The fork resolves SecretRefs locally and the gateway secrets.resolve snapshot
RPC was dropped in #2728; protocol.md still advertised methods #2720 removed
from BASE_METHODS. Reconcile the docs to the fork's actual surface (verified
each line against the live code, not a mechanical edit).

secrets.md + qr.md (local SecretRef resolution):
- Command paths resolve SecretRefs locally and in-process (env/file/exec via
  src/secrets/resolve.ts + gateway/resolve-configured-secret-input-string.ts),
  not via a gateway `secrets.resolve` snapshot RPC (removed in #2728). `qr`
  resolves all refs locally (qr-cli.ts + setup-code.ts) with no gateway client.
- Drop the obsolete qr `secrets.resolve` gateway-version-skew note.

protocol.md (method families — verified vs BASE_METHODS/GATEWAY_EVENTS/handlers):
- Remove methods #2720 dropped from BASE_METHODS: models.list,
  skills.search/detail/bins, the plugin.approval.* methods, and commands.list.
- Remove orphaned sessions.usage* (only a method-scopes classification, no
  handler) and exec.approval.get/list (no BASE_METHODS entry, no handler).
- KEEP the plugin.approval.requested/resolved EVENTS (in GATEWAY_EVENTS) — the
  methods were removed, the events survive.

Verified the docs build (astro/starlight, 319 pages) and rebrand-gate pass.

Part of #2724.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@alexey-pelykh
alexey-pelykh merged commit 781db79 into main Jun 18, 2026
18 checks passed
@alexey-pelykh
alexey-pelykh deleted the docs/gateway-rpc-surface-secrets-2724 branch June 18, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant