Channels
Clawglassos
OpenClaw channel plugin for ClawGlassOS (Even Realities G2 smart glasses)
Install
npm install
npm
README
# openclaw-clawglassos
Community OpenClaw channel plugin for **ClawGlassOS** โ the Even Realities
G2 smart-glasses companion app in this repo. Not an Even Realities or
OpenClaw official package.
## What this is
A **Channel Plugin** in the same slot as the bundled `qqbot`, `googlechat`,
`msteams` extensions in OpenClaw. It exposes the glasses as a chat channel
(`clawglassos`) so OpenClaw can:
- receive user voice / text from the glasses, and
- push AI replies / notifications back to the glasses display.
## Wiring
```
โโโโโโโโโโโโโโโ WSS โโโโโโโโโโโโโโโโโโโโโโโโโโ inbound dispatch โโโโโโโโโโโโ
โ WebView โ <โโโโ> โ ws-server (plugin) โ โโโโโโโโโโโโโโโโโโโโบ โ OpenClaw โ
โ (on iPhone) โ โ :8787 /ws โ โโโโโโโโโโโโโโโโโโโโ โ core โ
โ + G2 mic โ โโโโโโโโโโโโโโโโโโโโโโโโโโ outbound.sendText โโโโโโโโโโโโ
โโโโโโโโโโโโโโโ
```
- **Channel id**: `clawglassos`
- **Default endpoint**: `ws://<host>:8787/ws?token=<token>&device=<id>`
- **Inbound frames** (client โ server):
- `{type:"hello", deviceId, label?}` โ sent once, right after socket open.
- `{type:"text", text}` โ typed input.
- `{type:"voice", text, lang?, streamId?}` โ **client-side STT** result;
treated like `text` but tagged as voice for OpenClaw rendering.
- `{type:"audio_start", streamId, encoding?, sampleRate?, channels?, lang?}`
+ binary PCM frames + `{type:"audio_end", streamId?}` โ **server-side STT**
path. Defaults: `pcm_s16le`, 16 kHz, mono.
- `{type:"ping"}`.
- **Outbound frames** (server โ client):
- `{type:"reply", messageId, text}` โ AI reply.
- `{type:"transcript", streamId?, text, final}` โ server STT echo of the
user's utterance (only emitted on the audio_start path).
- `{type:"display", text}`, `{type:"status", text}`, `{type:"pong"}`,
`{type:"error", text}`.
## MVP scope
- Open WSS endpoint
- Token gate on connection
- Text round-trip (WebView โ OpenClaw โ reply โ WebView)
- Audio path stub: receives PCM, currently surfaces a placeholder
(`[voice message]`) for STT. Real STT slot reserved in `src/stt.ts`.
## Status
Plumbing is in place; the actual injection of a user message into OpenClaw's
session store follows the same pattern as the bundled `qqbot` extension
(`runtime.gateway` + `buildInboundContext` + `dispatchOutbound`). The
dispatch site is marked `TODO(plugin-runtime)` in `src/inbound.ts` and will
be wired against the real `PluginRuntime` next.
## Build
```bash
npm install
npm run build
```
Then load it into your OpenClaw install per your plugin loader conventions
(externally-installed plugins use `defineChannelPluginEntry`; the bundled
`defineBundledChannelEntry` path is only for in-repo extensions).
channels
Comments
Sign in to leave a comment