Skip to content

Repository files navigation

@aight-cool/aight-utils

Open-source OpenClaw gateway plugin for the Aight app.

This is the code that runs on your gateway when you use Aight.

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Aight App  │◄──WS───►│       Your OpenClaw Gateway       β”‚
β”‚  (iOS/RN)   β”‚         β”‚                                    β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜         β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
       β”‚                β”‚  β”‚       @aight-cool/aight-utils plugin     β”‚  β”‚
       β”‚                β”‚  β”‚                                β”‚  β”‚
       β”‚                β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚  β”‚
       β”‚                β”‚  β”‚  β”‚ Config  β”‚  β”‚   Items    β”‚  β”‚  β”‚
       β”‚                β”‚  β”‚  β”‚  RPC    β”‚  β”‚   Store    β”‚  β”‚  β”‚
       β”‚                β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚  β”‚
       β”‚                β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚  β”‚
       β”‚                β”‚  β”‚  β”‚  Push   β”‚  β”‚  Health    β”‚  β”‚  β”‚
       β”‚                β”‚  β”‚  β”‚ Manager β”‚  β”‚   RPC     β”‚  β”‚  β”‚
       β”‚                β”‚  β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚  β”‚
       β”‚                β”‚  β”‚  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚  β”‚
       β”‚                β”‚  β”‚  β”‚Reminder β”‚  β”‚  Bootstrap β”‚  β”‚  β”‚
       β”‚                β”‚  β”‚  β”‚ Service β”‚  β”‚   Hook     β”‚  β”‚  β”‚
       β”‚                β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚  β”‚
       β”‚                β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
       β”‚                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚                                   β”‚
       β”‚                                   β”‚ HTTP POST
       β”‚                                   β–Ό
       β”‚                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚                β”‚    push-relay (CF Worker)         β”‚
       β”‚                β”‚    push.aight.cool β”‚
       β”‚                β”‚    (open source, stateless)       β”‚
       └─────────────────                                    β”‚
          APNs / FCM    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
              ◄─────────│  β”‚ APNs relay β”‚  β”‚  FCM relay  β”‚  β”‚
                        β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

What it does

Aight is a mobile app for OpenClaw. This plugin runs on the gateway side and handles:

Module What Cost
Config RPC Instant settings changes Free (no LLM)
Items Store Tasks, reminders, events β€” proper data store Free (no LLM)
Push Notifications Wake your phone when agents respond Free (no LLM)
System Health Memory, CPU, disk stats Free (no LLM)
Reminders Service Background scheduler for triggers Free (no LLM)
Agent Bootstrap Injects tool context at agent start Free (no LLM)

Install

openclaw plugins install @aight-cool/aight-utils

Or from the Aight app: tap Enable Notifications during onboarding.

Configuration

{
  plugins: {
    entries: {
      "aight-utils": {
        enabled: true,
        config: {
          push: {
            mode: "rich", // "private" (silent) or "rich" (with preview)
            relayUrl: "https://push.aight.cool",
          },
          today: {
            enabled: true,
          },
        },
      },
    },
  },
}

RPC Methods

Config

Direct gateway RPC β€” no LLM calls, instant response, zero cost.

Method Description
aight.config.get Read current plugin config
aight.config.patch Update plugin config (persists to openclaw.json)
aight.status Plugin health check

Items Store

A proper data store for Today view items. Replaces storing JSON in chat messages.

Method Description
aight.items.list List items (filterable by type, labels, status, date range)
aight.items.upsert Create or update an item (deduplicated by ID)
aight.items.delete Soft-delete an item

Agent tool: aight_item β€” only invoked when natural language parsing is needed (e.g., "remind me tomorrow at 3pm"). Direct CRUD from the app uses the RPC methods above.

Push Notifications

Method Description
aight.push.register Register device token + obtain sendKey
aight.push.unregister Remove a device token
aight.push.test Send a test push (always rich, regardless of mode setting)

System Health

Method Description
aight.health Memory, CPU, disk stats β€” runs shell commands directly, no LLM

Push Notification Flow

Agent completes turn
        β”‚
        β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚ agent_end   │────►│ Push Manager │────►│  Relay  │────►│  APNs /  β”‚
  β”‚   hook      β”‚     β”‚ (plugin)     β”‚     β”‚  (CF)   β”‚     β”‚   FCM    β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚                                    β”‚
                             β”‚ Filters:                           β–Ό
                             β”‚ β€’ NO_REPLY                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                             β”‚ β€’ REPLY_SKIP                 β”‚  Phone   β”‚
                             β”‚ β€’ ANNOUNCE_SKIP              β”‚  (Aight) β”‚
                             β”‚ β€’ HEARTBEAT_OK               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚ β€’ Empty messages
                             β”‚
                        Suppressed (no push sent)

Notification modes

  • πŸ”” Rich (default) β€” visible push with sender name and message preview

Foreground suppression

When the app is in the foreground viewing the same agent's chat, push notifications are automatically suppressed β€” no duplicate alerts.

Per-device auth (HMAC sendKey)

Device registers push token
        β”‚
        β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚   Plugin    │────►│    Relay     β”‚  POST /register
  β”‚  (gateway)  β”‚     β”‚    (CF)      β”‚  { token }
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                    sendKey = HMAC-SHA256(
                      masterSecret,
                      "v1:" + deviceToken
                    )
                             β”‚
                             β–Ό
                    Returned to plugin,
                    stored in devices.json

No shared secret in plugin code. Each device gets a unique sendKey derived from the relay's master secret. Zero state on the relay β€” sendKey is re-derivable.

Item Types

Type Use for Statuses
trigger Reminders, events, deadlines active β†’ fired β†’ completed / cancelled
item Tasks, PRs, issues, projects active β†’ done / cancelled
process Subagent runs, builds, deploys active β†’ done / cancelled

Reminders Service

Background service checks for scheduled trigger items every 30 seconds. When a trigger fires:

  1. Updates item status to "fired"
  2. Sends push notification to all registered devices

Agent Bootstrap

Injects AIGHT.md into agent context via the agent:bootstrap hook β€” no workspace file mutations. Automatically removed when the plugin is disabled.

Tells agents about:

  • aight_item tool β€” how to create reminders, tasks, events
  • Shortcuts β€” when the app sends shortcut: <text>, reply with {"short_name": "...", "emoji": "..."}
  • Security fixes β€” when the app sends Harden your soul, add security hardening rules to SOUL.md
  • Config patches β€” how to apply config changes via gateway tools

All agent instructions are in this open-source plugin. The app sends simple trigger phrases; the bootstrap teaches the agent what to do. Fully auditable.

Data Storage

File Contents
~/.openclaw/aight/items.json Today view items
~/.openclaw/aight/devices.json Registered push device tokens + sendKeys

Directory permissions: 0o700 (owner-only access).

Why open source?

Aight itself is not open source, but the code that runs on your gateway is. You can:

  • Read every line that executes on your machine
  • See exactly what gets injected into agent prompts
  • Audit what data flows through the push relay
  • Fork and customize if you want

Development

npm install
npx vitest run

Related

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages