Mochi
Are your agents working, waiting, stuck, or done?
- Type
- Desktop app
- Runs on
- macOS
- Get it
- Download
- Price
- Free
How it’s built
Source available
The source is public to read, but not under an open-source license.
The repository is public; it doesn't include a license file yet.
- App
- Swift 6
- SwiftUI
- AppKit
- Swift Package Manager
- CLI
- swift-argument-parser
- Tests
- Swift Testing
Architecture
A Swift Package Manager package with three targets sharing one platform-agnostic core. MochiCore — the data model, event protocol, state reducer and persistence — has no SwiftUI or AppKit dependency; MochiApp (the menu bar UI) and the mochi CLI both consume it, so the live app and the terminal tool are driven by the exact same session-state logic.
Agent monitoring
Agents don't connect to Mochi over a socket or HTTP server — they write small JSON event files into ~/.mochi/inbox, each created atomically with a temp-file-then-rename so concurrent writers never collide. The app watches that directory with a DispatchSource and only wakes when it changes, so there's no polling while idle.
Session lifecycle
Every event folds into session state through one pure reducer. A session that's gone quiet moves itself from Working to Stale after 20 minutes, then Offline after 90 — both reversible the moment a fresh event arrives, so a stale "Working" badge can't linger indefinitely.
State & persistence
No database. The inbox is the multi-writer side; app-owned state — the session snapshot and user settings — is plain JSON under ~/.mochi, written through the same atomic-file helper.
Development & build
Plain SwiftPM, no Xcode project checked in — swift build and swift test work headlessly. A small build script assembles the actual .app bundle, since a bare swift build only produces an executable, not something macOS treats as a real app with notifications.
Builds & verification
macOS v0.1.0
An unsigned community build — not signed with an Apple Developer ID or notarized yet. The first time, Control-click Mochi and choose Open.
sha256:1f163be0d0ad635b653cb747cc4b527f5276cab44787b8d89fcca7534a9ee763