Skip to content

Liquid Glass Watch IOS Open Claw 🦞 Interface

Notifications You must be signed in to change notification settings

CryptoThaler/mudbug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🦞 mudbug β€” OpenClaw watchOS Client

Liquid Glass Watch β€’ iOS β€’ OpenClaw Interface

A thin Gateway client for OpenClaw on watchOS 12, targeting the Apple Watch Series 11. One tap on your wrist to command your autonomous AI agent.


πŸ—οΈ Architecture

mudbug uses Path 1: Thin Gateway Client β€” the Watch sends messages to your self-hosted OpenClaw Gateway via the OpenAI-compatible REST API (/v1/chat/completions). The Gateway handles all the heavy lifting: Telegram routing, ClawHub skills, and persistent memory.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       HTTPS/SSE        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       TDLib        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Apple Watch β”‚  ──────────────────▢  β”‚  OpenClaw Gateway β”‚  ──────────────▢  β”‚ Telegram β”‚
β”‚  (mudbug)    β”‚  ◀──────────────────  β”‚  :18789           β”‚  ◀──────────────  β”‚ Servers  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    text/event-stream   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Why Gateway, not standalone TDLib?

Criteria Gateway (mudbug) Standalone TDLib
Binary size ~5 MB ~300 MB
Battery impact Minimal High
RAM pressure Low > 500 MB
Auth complexity Bearer token QR code sync
Supports all Skills βœ… ❌
Requires server βœ… ❌

πŸ“‚ Project Structure

OpenClawWatch/
β”œβ”€β”€ App/
β”‚   β”œβ”€β”€ OpenClawApp.swift               # Entry point
β”‚   └── ComplicationBundle.swift        # Widget extension entry
β”œβ”€β”€ Features/
β”‚   β”œβ”€β”€ Chat/
β”‚   β”‚   β”œβ”€β”€ ChatView.swift              # Main chat UI
β”‚   β”‚   β”œβ”€β”€ ChatViewModel.swift         # Business logic & streaming
β”‚   β”‚   β”œβ”€β”€ MessageBubble.swift         # Chat bubble component
β”‚   β”‚   └── SettingsView.swift          # Gateway config & diagnostics
β”‚   └── Complication/
β”‚       └── QuickActionComplication.swift # Watch face widget
β”œβ”€β”€ Core/
β”‚   β”œβ”€β”€ Network/
β”‚   β”‚   β”œβ”€β”€ OpenClawAPI.swift           # SSE streaming engine
β”‚   β”‚   β”œβ”€β”€ APIConstants.swift.sample   # Config template (committed)
β”‚   β”‚   └── APIConstants.swift          # Your secrets (gitignored)
β”‚   β”œβ”€β”€ Models/
β”‚   β”‚   └── OpenClawModels.swift        # Protocol models
β”‚   β”œβ”€β”€ Persistence/
β”‚   β”‚   └── ConversationStore.swift     # UserDefaults chat history
β”‚   └── Haptics/
β”‚       └── HapticManager.swift         # Tactile feedback
└── Preview Content/
    └── PreviewData.swift               # Mock data for previews

πŸš€ Getting Started

Prerequisites

  • Xcode 26 (or later) with watchOS 12 SDK
  • An OpenClaw Gateway running and reachable (local network, Tailscale, or public URL)
  • Gateway HTTP API enabled in openclaw.json:
    {
      "gateway": {
        "http": {
          "endpoints": {
            "chatCompletions": { "enabled": true }
          }
        }
      }
    }

Setup

  1. Clone the repo:

    git clone https://github.com/CryptoThaler/mudbug.git
    cd mudbug
  2. Configure your Gateway credentials:

    cp OpenClawWatch/Core/Network/APIConstants.swift.sample \
       OpenClawWatch/Core/Network/APIConstants.swift

    Edit APIConstants.swift with your Gateway URL and bearer token.

  3. Open in Xcode:

    open OpenClawWatch.xcodeproj

    Or create a new watchOS project in Xcode and drag in the OpenClawWatch/ source folder.

  4. Build & Run:

    • Select the Watch App scheme
    • Target: Apple Watch Series 11 (45mm) Simulator or your physical Watch
    • Press ⌘R

⌚ Features

πŸ’¬ Streaming Chat

Real-time token-by-token display using URLSession.bytes(for:) and AsyncThrowingStream. See the AI "type" on your wrist.

🧠 Thinking Indicator

Animated progress view with OpenClaw's signature orange while the agent processes your request.

πŸ“³ Haptic Feedback

  • Click when you send a message
  • Success when the AI finishes responding
  • Failure on network errors

⌚ Watch Face Complication

One-tap complication in circular, rectangular, corner, and inline styles. Shows the last assistant message preview and opens directly to chat.

πŸ’Ύ Conversation Persistence

Last 50 messages stored in UserDefaults so your chat survives app suspension and relaunch from the Watch Dock.

πŸ”„ Error Recovery

Automatic retry support, connection status banner, and Gateway health check from Settings.


πŸ”‘ Security

  • APIConstants.swift is gitignored β€” your token never leaves your machine
  • The .sample template is committed so collaborators know the expected structure
  • All connections use HTTPS with bearer token auth
  • Consider using a proper cert (Let's Encrypt / Cloudflare) rather than self-signed

πŸ›‘ The "Push" Problem

OpenClaw Gateway doesn't natively send Apple Push Notifications. For long-running tasks:

The Telegram Hack: Let your agent send results to your Telegram DM. The Telegram app's system notification hits your Watch; tap it to open mudbug.

A v2 could implement a lightweight push relay via CloudKit or a serverless function.


πŸ“‹ Roadmap

  • v1.0 β€” Core chat with streaming SSE (this release)
  • v1.1 β€” HealthKit integration (workout context for the agent)
  • v1.2 β€” Siri Shortcuts / App Intents integration
  • v2.0 β€” Push notification relay via CloudKit
  • v2.1 β€” Multi-conversation support with SwiftData
  • v2.2 β€” ClawHub skill browser on the wrist

🀝 Contributing

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/health-kit-integration)
  3. Commit your changes (git commit -m 'Add HealthKit context to chat')
  4. Push to the branch (git push origin feature/health-kit-integration)
  5. Open a Pull Request

πŸ“„ License

This project is open source. See LICENSE for details.


🦞 Built for the wrist. Powered by OpenClaw.
mudbug β€” because crawdads are just lobsters with ambition.

About

Liquid Glass Watch IOS Open Claw 🦞 Interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages