Back to Eliza

Smartglasses Upstream Audit

plugins/plugin-smartglasses/docs/upstream-audit.md

2.0.38.9 KB
Original Source

Smartglasses Upstream Audit

This plugin was built from the gitignored research checkouts under research/even-realities/. The repository root .gitignore ignores that checkout folder, so these upstream repos remain local evidence and are not part of the committed package.

Repository Coverage

Requested sourceLocal checkoutPrimary files reviewedCapability carried into @elizaos/plugin-smartglasses
fabioglimb/even-toolkitresearch/even-realities/even-toolkitglasses/bridge.ts, glasses/glass-format.ts, glasses/paginate-text.ts, glasses/gestures.ts, stt/sources/glass-bridge.ts, stt/audio/pcm-utils.tsG2/EvenHub bridge display, event, and PCM audio assumptions; text pagination and gesture normalization informed src/transport/even-bridge.ts and src/protocol.ts.
BxNxM/even-devresearch/even-realities/even-devapps/_shared/even-events.ts, apps/_shared/autoconnect.ts, apps/base_app/src/base-template.ts, README.mdSimulator bridge lifecycle, sendStartUpPage, app bridge readiness, and click/double-click input expectations used by packages/examples/smartglasses/evenhub-smoke.ts and simulator-automation-smoke.ts.
emingenc/even_glassesresearch/even-realities/even_glasseseven_glasses/models.py, even_glasses/utils.py, even_glasses/commands.py, even_glasses/notification_handlers.py, even_glasses/bluetooth_manager.py, even_glasses/README.mdG1 command constants, display packet framing, RSVP, mic control, mic response parsing, LC3 notification parsing, heartbeat, dashboard/settings, BMP, and notification handling in src/protocol.ts and src/services/smartglasses-service.ts.
binarythinktank/eveng1_python_sdkresearch/even-realities/eveng1_python_sdkconnector/bluetooth_manager.py, services/commands.py, services/notification_handlers.py, utils/message_utils.py, examples/*.pyNordic UART UUIDs, broad scan plus _L_/_R_ lens matching, heartbeat bytes, LC3 mic chunks, and display packet shape used by src/transport/noble.ts, src/transport/web-bluetooth.ts, and protocol tests.
meyskens/fahrplanresearch/even-realities/fahrplanlib/bluetooth_manager.dart, lib/services/*, lib/features/*, README.mdPractical G1 app coverage for dashboard/checklist display, notification mirroring, navigation, translation, QuickNote/voice-note packets, and live transcription expectations reflected in src/actions/control.ts, src/protocol.ts, and package smoke coverage.
nickustinov/weather-even-g2research/even-realities/weather-even-g2g2/index.ts, g2/events.ts, g2/ui.tsx, _shared/*, README.mdG2 captured-event behavior, list/text/system event handling, and zero-value index edge cases used by EvenHub event normalization.
jappyjan/even-realitiesresearch/even-realities/even-realitiespackages/*, apps/*, SDK/app examplesEvenHub SDK wrapper patterns for page startup, rebuild, and listener registration used by EvenBridgeTransport.
emingenc/g1_flutter_blue_plusresearch/even-realities/g1_flutter_blue_pluslib/services/commands.dart, lib/services/reciever.dart, lib/services/bluetooth_manager.dart, lib/main.dartFlutter BLE discovery and direct G1 receiver behavior cross-checked command constants, _L_/_R_ pairing, 0xF5 taps, 0x0E mic responses, and 0xF1 voice data.
nickustinov/tesla-even-g2research/even-realities/tesla-even-g2g2/events.ts, g2/renderer.ts, g2/navigation.ts, g2/ui.tsx, README.mdG2 bridge event normalization for nested event keys, click/double-click/scroll fallback, and dashboard/menu rendering expectations used by src/transport/even-bridge.ts and simulator smoke.
galfaroth/awesome-even-realities-g1research/even-realities/awesome-even-realities-g1README.mdEcosystem cross-check for the G1 SDK/demo sources and command families.
even-realities/EvenDemoAppresearch/even-realities/EvenDemoApplib/ble_manager.dart, lib/services/ble.dart, lib/services/evenai.dart, lib/services/features_services.dart, lib/controllers/bmp_update_manager.dart, ios/Runner/BluetoothManager.swift, android/app/src/main/kotlin/com/example/demo_ai_even/bluetooth/BleManager.ktOfficial demo behavior for right-lens mic, LC3 audio, text streaming, native exit, serial request, app whitelist, iOS same-init (0x4D 0x01 to both lenses), Android same-init (0xF4 0x01 to both lenses), notification flows, and BMP transfer.
Mentra-Community/MentraOSresearch/even-realities/MentraOScloud/docs/sdk/display-layouts.mdx, cloud/docs/cloud-architecture/managers/audio-manager.mdx, cloud/docs/cloud-architecture/managers/microphone-manager.mdx, cloud/docs/cloud-architecture/managers/transcription-manager.mdx, sdk/*, mobile/*Bridge/native display APIs, setMicState, mic_pcm/mic_lc3, local transcription streams, display width/glyph constraints, and hardware validation requirements used by src/transport/even-bridge.ts, display wrapping, transcript events, and hardware smoke evidence.

Implemented Surface

The upstream review maps to the following local implementation:

  • Direct G1 BLE packet protocol and parsing: src/protocol.ts
  • Eliza service lifecycle, display streaming, mic control, tap handling, audio/transcript events, heartbeat, and settings: src/services/smartglasses-service.ts
  • Eliza actions/providers: src/actions/*.ts, src/providers/status.ts
  • Direct BLE transports: src/transport/web-bluetooth.ts, src/transport/noble.ts
  • EvenHub/G2/Mentra bridge transport: src/transport/even-bridge.ts
  • Mock transport for deterministic Eliza tests: src/transport/mock.ts
  • Physical validation harnesses:
    • packages/examples/smartglasses/hardware-smoke.ts
    • packages/examples/smartglasses/noble-hardware-smoke.ts
    • packages/examples/smartglasses/hardware-evidence.ts
  • Simulator validation harness:
    • packages/examples/smartglasses/evenhub-smoke.ts
    • packages/examples/smartglasses/simulator-automation-smoke.ts

Test Coverage

The implementation is covered by:

  • src/__tests__/protocol.test.ts: packet encoding, pixel-aware display wrapping, display chunking, mic commands, tap/audio/serial parsing, settings, dashboard, navigation, translation, notifications, notes, voice notes, BMP, heartbeat, init modes, and app whitelist/setup.
  • src/__tests__/service.test.ts: Eliza service display streaming, RSVP, sequence counters, mic toggle state, side tap behavior, long press/stop recording, raw and decoded audio paths, transcript events, startup auto-init, heartbeat loop, pre-connected transport listener attachment, and transport preference.
  • src/__tests__/actions.test.ts: exported action/provider/service wiring.
  • src/__tests__/even-bridge.test.ts: G2/EvenHub/Mentra bridge rendering, audio, transcription, and input normalization.
  • src/__tests__/web-bluetooth.test.ts and src/__tests__/noble.test.ts: direct BLE lens pairing, UART subscription/write behavior, and notification parsing.
  • packages/examples/smartglasses/smartglasses.test.ts: package example packet path plus physical evidence helper requirements.
  • packages/examples/smartglasses/package-smoke.ts: public package export, Eliza event emission, status provider, and action path.

Remaining Physical Gate

The code includes physical G1 validation paths and the latest direct BLE smoke does reach both lenses on the plugged-in headset. The current latest report from 2026-05-20T06:21:51Z proves whole-headset direct BLE connectivity, serial response, init/display/settings responses, state packets, heartbeats, and right-lens mic-disable response for serial S110LABC040019. It does not complete the physical gate because the glasses still report charged_in_cradle / cradle_fully_charged, so wearing, tap, and microphone audio evidence cannot be observed yet.

Use the latest-report helpers for the next hardware proof attempt:

bash
bun run --cwd packages/examples/smartglasses hardware:bleak:latest
bun run --cwd packages/examples/smartglasses hardware:status-latest
bun run --cwd packages/examples/smartglasses hardware:validate-latest

or run the proof wrapper, which prints the latest status summary even when the physical gate fails:

bash
bun run --cwd packages/examples/smartglasses hardware:prove:bleak

The Noble/Web Bluetooth paths are still available for adapter/browser-specific checks:

bash
bun run --cwd packages/examples/smartglasses hardware:prove:noble
bun run --cwd packages/examples/smartglasses dev:hardware

The required evidence checklist is enforced by packages/examples/smartglasses/hardware-evidence.ts: connected lenses, connection-ready/init writes, display packets, serial request and response, settings writes, wearing physical state, single-tap mic enable, right-lens mic-enable write, microphone audio, double-tap mic disable, and right-lens mic-disable write.