惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Announcements
Recent Announcements
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
博客园 - 司徒正美
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
小众软件
小众软件
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
A
About on SuperTechFans
宝玉的分享
宝玉的分享
WordPress大学
WordPress大学
B
Blog RSS Feed
G
Google Developers Blog
量子位
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 三生石上(FineUI控件)

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 test: merge chat context notice checks · openclaw/openclaw@5c2f4af feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248
docs(gateway): correct protocol.md schema path, hello-ok ...
2026-04-16 · via Recent Commits to openclaw:main

@@ -73,10 +73,24 @@ Gateway → Client:

7373

"type": "res",

7474

"id": "",

7575

"ok": true,

76-

"payload": { "type": "hello-ok", "protocol": 3, "policy": { "tickIntervalMs": 15000 } }

76+

"payload": {

77+

"type": "hello-ok",

78+

"protocol": 3,

79+

"server": { "version": "", "connId": "" },

80+

"features": { "methods": [""], "events": [""] },

81+

"snapshot": { "…": "" },

82+

"policy": {

83+

"maxPayload": 26214400,

84+

"maxBufferedBytes": 52428800,

85+

"tickIntervalMs": 15000

86+

}

87+

}

7788

}

7889

```

799091+

`server`, `features`, `snapshot`, and `policy` are all required by the schema

92+

(`src/gateway/protocol/schema/frames.ts`). `auth` and `canvasHostUrl` are optional.

93+8094

When a device token is issued, `hello-ok` also includes:

81958296

```json

@@ -492,13 +506,36 @@ implemented in `src/gateway/server-methods/*.ts`.

492506493507

## Versioning

494508495-

- `PROTOCOL_VERSION` lives in `src/gateway/protocol/schema.ts`.

509+

- `PROTOCOL_VERSION` lives in `src/gateway/protocol/schema/protocol-schemas.ts`.

496510

- Clients send `minProtocol` + `maxProtocol`; the server rejects mismatches.

497511

- Schemas + models are generated from TypeBox definitions:

498512

- `pnpm protocol:gen`

499513

- `pnpm protocol:gen:swift`

500514

- `pnpm protocol:check`

501515516+

### Client constants

517+518+

The reference client in `src/gateway/client.ts` uses these defaults. Values are

519+

stable across protocol v3 and are the expected baseline for third-party clients.

520+521+

| Constant | Default | Source |

522+

| ----------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------- |

523+

| `PROTOCOL_VERSION` | `3` | `src/gateway/protocol/schema/protocol-schemas.ts` |

524+

| Request timeout (per RPC) | `30_000` ms | `src/gateway/client.ts` (`requestTimeoutMs`) |

525+

| Preauth / connect-challenge timeout | `10_000` ms | `src/gateway/handshake-timeouts.ts` (clamp `250``10_000`) |

526+

| Initial reconnect backoff | `1_000` ms | `src/gateway/client.ts` (`backoffMs`) |

527+

| Max reconnect backoff | `30_000` ms | `src/gateway/client.ts` (`scheduleReconnect`) |

528+

| Fast-retry clamp after device-token close | `250` ms | `src/gateway/client.ts` |

529+

| Force-stop grace before `terminate()` | `250` ms | `FORCE_STOP_TERMINATE_GRACE_MS` |

530+

| `stopAndWait()` default timeout | `1_000` ms | `STOP_AND_WAIT_TIMEOUT_MS` |

531+

| Default tick interval (pre `hello-ok`) | `30_000` ms | `src/gateway/client.ts` |

532+

| Tick-timeout close | code `4000` when silence exceeds `tickIntervalMs * 2` | `src/gateway/client.ts` |

533+

| `MAX_PAYLOAD_BYTES` | `25 * 1024 * 1024` (25 MB) | `src/gateway/server-constants.ts` |

534+535+

The server advertises the effective `policy.tickIntervalMs`, `policy.maxPayload`,

536+

and `policy.maxBufferedBytes` in `hello-ok`; clients should honor those values

537+

rather than the pre-handshake defaults.

538+502539

## Auth

503540504541

- Shared-secret gateway auth uses `connect.params.auth.token` or

@@ -518,8 +555,18 @@ implemented in `src/gateway/server-methods/*.ts`.

518555

approved scope set for that token. This preserves read/probe/status access

519556

that was already granted and avoids silently collapsing reconnects to a

520557

narrower implicit admin-only scope.

521-

- Normal connect auth precedence is explicit shared token/password first, then

522-

explicit `deviceToken`, then stored per-device token, then bootstrap token.

558+

- Client-side connect auth assembly (`selectConnectAuth` in

559+

`src/gateway/client.ts`):

560+

- `auth.password` is orthogonal and is always forwarded when set.

561+

- `auth.token` is populated in priority order: explicit shared token first,

562+

then an explicit `deviceToken`, then a stored per-device token (keyed by

563+

`deviceId` + `role`).

564+

- `auth.bootstrapToken` is sent only when none of the above resolved an

565+

`auth.token`. A shared token or any resolved device token suppresses it.

566+

- Auto-promotion of a stored device token on the one-shot

567+

`AUTH_TOKEN_MISMATCH` retry is gated to **trusted endpoints only**

568+

loopback, or `wss://` with a pinned `tlsFingerprint`. Public `wss://`

569+

without pinning does not qualify.

523570

- Additional `hello-ok.auth.deviceTokens` entries are bootstrap handoff tokens.

524571

Persist them only when the connect used bootstrap auth on a trusted transport

525572

such as `wss://` or loopback/local pairing.