mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-05 22:32:12 +00:00
docs: refresh gateway feature registry mirrors
This commit is contained in:
@@ -82,6 +82,8 @@ sequenceDiagram
|
||||
- After handshake:
|
||||
- Requests: `{type:"req", id, method, params}` → `{type:"res", id, ok, payload|error}`
|
||||
- Events: `{type:"event", event, payload, seq?, stateVersion?}`
|
||||
- `hello-ok.features.methods` / `events` are discovery metadata, not a
|
||||
generated dump of every callable helper route.
|
||||
- Shared-secret auth uses `connect.params.auth.token` or
|
||||
`connect.params.auth.password`, depending on the configured gateway auth mode.
|
||||
- Identity-bearing modes such as Tailscale Serve
|
||||
|
||||
@@ -51,14 +51,14 @@ Common methods + events:
|
||||
| Nodes | `node.list`, `node.invoke`, `node.pair.*` | Gateway WS + node actions |
|
||||
| Events | `tick`, `presence`, `agent`, `chat`, `health`, `shutdown` | server push |
|
||||
|
||||
Authoritative advertised method/event inventory lives in
|
||||
Authoritative advertised **discovery** inventory lives in
|
||||
`src/gateway/server-methods-list.ts` (`listGatewayMethods`, `GATEWAY_EVENTS`).
|
||||
|
||||
## Where the schemas live
|
||||
|
||||
- Source: `src/gateway/protocol/schema.ts`
|
||||
- Runtime validators (AJV): `src/gateway/protocol/index.ts`
|
||||
- Advertised method/event registry: `src/gateway/server-methods-list.ts`
|
||||
- Advertised feature/discovery registry: `src/gateway/server-methods-list.ts`
|
||||
- Server handshake + method dispatch: `src/gateway/server.impl.ts`
|
||||
- Node client: `src/gateway/client.ts`
|
||||
- Generated JSON Schema: `dist/protocol.schema.json`
|
||||
@@ -79,8 +79,13 @@ Authoritative advertised method/event inventory lives in
|
||||
accepts a `connect` request whose params match `ConnectParams`.
|
||||
- **Client side**: the JS client validates event and response frames before
|
||||
using them.
|
||||
- **Method surface**: the Gateway advertises the supported `methods` and
|
||||
`events` in `hello-ok` from `listGatewayMethods()` and `GATEWAY_EVENTS`.
|
||||
- **Feature discovery**: the Gateway sends a conservative `features.methods`
|
||||
and `features.events` list in `hello-ok` from `listGatewayMethods()` and
|
||||
`GATEWAY_EVENTS`.
|
||||
- That discovery list is not a generated dump of every callable helper in
|
||||
`coreGatewayHandlers`; some helper RPCs are implemented in
|
||||
`src/gateway/server-methods/*.ts` without being enumerated in the advertised
|
||||
feature list.
|
||||
|
||||
## Example frames
|
||||
|
||||
|
||||
@@ -305,6 +305,8 @@ Defaults include isolated state/config and base gateway port `19001`.
|
||||
|
||||
- First client frame must be `connect`.
|
||||
- Gateway returns `hello-ok` snapshot (`presence`, `health`, `stateVersion`, `uptimeMs`, limits/policy).
|
||||
- `hello-ok.features.methods` / `events` are a conservative discovery list, not
|
||||
a generated dump of every callable helper route.
|
||||
- Requests: `req(method, params)` → `res(ok/payload|error)`.
|
||||
- Common events: `connect.challenge`, `agent`, `chat`, `presence`, `tick`, `health`, `heartbeat`, `shutdown`.
|
||||
|
||||
|
||||
@@ -218,6 +218,11 @@ This page is not a generated full dump, but the public WS surface is broader
|
||||
than the handshake/auth examples above. These are the main method families the
|
||||
Gateway exposes today.
|
||||
|
||||
`hello-ok.features.methods` is a conservative discovery list built from
|
||||
`src/gateway/server-methods-list.ts` plus loaded plugin/channel method exports.
|
||||
Treat it as feature discovery, not as a generated dump of every callable helper
|
||||
implemented in `src/gateway/server-methods/*.ts`.
|
||||
|
||||
### System and identity
|
||||
|
||||
- `gateway.identity.get` returns the gateway device identity used by relay and
|
||||
|
||||
Reference in New Issue
Block a user