feat: device identity for OpenClaw 2026.2.14+ pairing (#6)

- Generate Ed25519 keypair via Web Crypto API
- Persist keypair in IndexedDB (survives page reloads)
- Sign connect payload with device private key
- Include device object in connect params (id, publicKey, signature, signedAt)
- Handle NOT_PAIRED error with 'pairing' connection status
- Show pairing-pending banner with instructions to run openclaw devices approve
- Extract nonce from connect.challenge for v2 payload signing
- Add i18n translations for pairing banner in all 8 languages

Closes #6
This commit is contained in:
Nicolas Varrot
2026-02-16 00:00:20 +00:00
parent da75ac3ccc
commit 151215cd4b
9 changed files with 361 additions and 31 deletions

View File

@@ -53,7 +53,7 @@ export interface AgentIdentity {
agentId?: string;
}
export type ConnectionStatus = 'disconnected' | 'connecting' | 'connected';
export type ConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'pairing';
export interface GatewayState {
status: ConnectionStatus;