[claude] Stand up Gemini harness as network worker (#748) #811

Merged
claude merged 1 commits from claude/issue-748 into main 2026-04-04 01:41:54 +00:00

1 Commits

Author SHA1 Message Date
Alexander Whitestone
05182c85b9 feat: Stand up Gemini harness as network worker instance (Fixes #748)
Some checks failed
CI / validate (pull_request) Has been cancelled
Add nexus/gemini_harness.py — a Hermes/OpenClaw harness backed by the
Gemini API, following the same pattern as Ezra, Bezalel, and Allegro.

Features implemented:
- Text, code, and multimodal (image) generation via Gemini OpenAI-compat API
- Streaming response support (stream_generate)
- Model fallback chain: gemini-2.5-pro-preview → gemini-2.0-pro → gemini-2.0-flash
- Context caching with configurable TTL (set_context / clear_context)
- Per-call latency, token, and cost telemetry logged + emitted to Hermes WS
- Hermes WebSocket registration on harness.start()
- HTTP server (create_app) exposing /generate, /generate/code, /health,
  /status, /context endpoints for network access (--serve --port 9300)
- Sovereign-orchestration worker registration (register_in_orchestration)
- 48 unit tests (all passing), live API tests gated on RUN_LIVE_TESTS=1

Timmy is sovereign. Gemini is a worker on the network.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 21:41:12 -04:00