Mewla Docs Get Mewla

Notifications#

Mewla interrupts you only when an agent needs you or finished while you were away. It is not a progress feed. A running task and a question that needs you can also stay on the phone as a live notification and widgets.

Push notifications#

The daemon sends a push for three agent states:

State Title Priority
Needs input <name> needs input High
Failed <name> failed High
Finished <name> finished Default

The name is the Session's alias or project, not a raw terminal name. "Finished" means the Session ended, not that the task succeeded; open it to check.

Mewla stays silent while an agent is running, while its state is unknown, and for connection changes.

If you are looking at that exact Session in the app, Mewla does not notify you. Anywhere else, including another Session, it sends the push, with two exceptions for Finished: it is not sent while the app is open in front of you, and a Work that finishes again in the same run (for example a series of releases) notifies once. Needs input and Failed send once per question: the same prompt blinking, re-rendering or coming back after a daemon restart does not send again, while a new prompt, or the same one after the Session had moved on for 30 seconds, does. A newer push for a Session replaces the older one on your phone instead of stacking. A Work that needed you starts its next run fresh. Every push held back this way is still recorded in Watch, with the reason.

Calendar sends two other kinds of alert:

  • Reminders are scheduled on the phone itself, so they fire without a connection to the daemon.
  • A Mewla action sends one push when its result is ready, which opens the Brain thread that holds the result. The alert never contains the result itself.

What a notification opens#

A notification opens the thing it is about, with the app built around it so Back has somewhere to go:

About Opens
A Session That Session (at its request card, when it asks something)
Sessions that need you Home, with the tray open
A Work Work detail
A Calendar item The item in Calendar
An earlier Brain thread That thread, read-only, with Current chat to return
Another paired computer Switches to that computer first

A question in a notification is the same request as the card in the app and the Needs you row in the tray: answer it from the notification and the card and the row close too. If the answer cannot be sent, the app says "Couldn't send that answer".

What Watch keeps#

Watch keeps a record of every push and every push it held back, and what you did with it (tapped it, opened that Session, brought the app forward). When Watch is on, an agent reads them in context and flags kinds of push that are noise, badly timed, repeated, or that never came when you were needed. The app tells your computer only the push's id, that you tapped it and when, and whether the app is in the foreground.

Delivery#

Each push is a single attempt. If delivery fails or the daemon restarts at the wrong moment, there may be no alert, but the state and results are still there when you open the app.

Official builds need no setup: install the app, pair, and allow notifications when the app asks. It asks once, after your first computer connects, not at launch. If you decline, Mewla does not ask again; turn notifications on in the system settings for Mewla. The Calendar page shows a notice while they are off.

Your daemon sends each push to Expo's push service with your phone's push token, and Expo hands it to Google (Android) or Apple (iOS). Every paired device that has connected since the daemon started gets the push, each under its own token. The push carries the title, the Session name and a short line, never the full result. If Expo reports that a phone is no longer registered, the daemon forgets that token until the app connects again; revoking a device forgets its token at once. Tokens are kept in memory only, so a phone hears pushes again after a daemon restart once its app connects.

A fork that signs its own build needs its own Expo project and Firebase app: change EXPO_PROJECT_ID in client/core/push/registration.ts, replace client/android/app/google-services.json with the file for your Android package, and upload your FCM V1 key to that Expo project. Without them a fork still works, just without remote push.

Live notification and widgets#

While Workers run, or while a question waits for you, the phone can show it without opening the app:

  • Android: one ongoing notification. On Android 16 QPR1 and later, with Live updates allowed for Mewla, it is promoted to a status-bar chip that says the summary ("1 needs you · 6 running") and a pinned card. Otherwise it is a plain ongoing notification with the same content. Home-screen widgets start at 2×2 and 4×2 and can be resized: narrow, the one thing that matters now; wide, the tray with as many rows as its height fits.
  • iOS: a Live Activity in the Dynamic Island and on the Lock Screen, with the summary and what matters now. Home-screen widgets come in small, medium (three rows) and large (five rows), and need iOS 17.

What they show:

  • The summary: what waits for you first, then how many run ("1 needs you · 6 running"), counted as the app's header counts them.
  • Needs you: always the first row. Brain's question shows with up to three of its choices; tapping a choice opens the app on that question and sends the answer once.
  • Running: up to five rows, as many as the widget fits, each a Work as its card reads (the card's title and line) or a Session of yours. A finished Worker leaves. A row shows a time only when its Worker has said nothing for 20 minutes and is past the quiet it announced ("No progress since 21:30").
  • Nothing running and nothing waiting: the notification and the Live Activity go away.

A notification or Live Activity you dismiss stays away until a new Worker starts or a new question arrives. Everything comes from the current computer only.

How it works#

The daemon decides what these show, from the same Brain state the app already receives; the phone only draws it. A change reaches the phone over the app's connection, or, with the app closed, as a silent push that wakes it. On iOS that is the only route: Expo's push service cannot send an ActivityKit push. A late state never overwrites a newer one.

A widget cannot hold the device's key and must not do anything but read. It gets its own credential from the daemon: read-only, one per device, and refused once the device is revoked.

Limits#

  • iOS: a Live Activity can start only while the app is open, so the first card of a run appears once you open Mewla. With the app closed, updates come by silent push, which iOS throttles and does not deliver after you force-quit the app, so an update can be late or missing until you open it again.
  • Widgets on a plain address read the daemon themselves, and a revoked phone stops at the next refresh. On Mewla Relay the widget shows only what the app and pushes gave it, and says "Open Mewla" once its last state is more than 12 hours old. Revoking that phone stops the pushes, but the widget keeps its last state until then.
  • With the app closed, only a push reaches the phone. The computer keeps what each phone registered across its own restarts, so a closed app keeps hearing it. If the app could not get a push token, the notification and widgets keep what the open app last saw; the computer's log says so once ("no phone takes live pushes"), and the app reports why it has no token (push_unregistered).
  • Live updates are not receipt-tracked: a newer state always follows, and a lost one costs nothing.
  • A question is answered only if it is still the current one; a late tap changes nothing.