A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.
Swift ai-agentsanthropicantigravityclaudeclaude-codecodexcursordynamic-islandgemini-cliiosiphonlinuxmacosmacos-appmenubar-appnotchopen-sourceswiftswiftuiwindows
WhatsApp pill, phase 3: GOWA started by Coucou, docs and release notes
Claude4e50582c17cd
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex cba792c3..92e50fad 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1,5 +1,9 @@# Changelog+## Unreleased (macOS, GitHub build)++- **WhatsApp in the notch** *(experimental)* — your incoming WhatsApp messages in a new green pill, one row per conversation with initials, name, the last message and the unread count; photos, voice messages and documents show as a label. Click a conversation to see its last ten messages and reply: Return sends, Shift-Return starts a new line, Esc goes back. Mochi smiles at a new message (with a sound if sounds are on). Groups stay quiet unless you're mentioned, chats you ignore never show, and read receipts go only when you open a conversation or reply. It goes through an unofficial gateway that runs on your Mac ([GOWA](https://github.com/aldinokemal/go-whatsapp-web-multidevice), or [OpenWA](https://github.com/rmyndharis/OpenWA)), which Coucou can start for you; scan its QR code right in Settings → Integrations → WhatsApp. Nothing leaves your Mac: messages stay in memory, are never logged or saved, and are forgotten when Coucou quits. Use it on your own account only: WhatsApp may restrict accounts that abuse it. Off by default; see [WhatsApp (experimental)](README.md#whatsapp-experimental)+## Windows and Linux 0.5.0 — October 15, 2026Windows and Linux catch up with the Mac's 0.3.0 and 0.4.0: the Coucou window, Flow dictation, the Notetaker and « OK Coucou ». All of it free and open source.diff --git a/NotchBuddy/Resources/Localizable.xcstrings b/NotchBuddy/Resources/Localizable.xcstringsindex 63e371f4..12e8b70a 100644--- a/NotchBuddy/Resources/Localizable.xcstrings+++ b/NotchBuddy/Resources/Localizable.xcstrings@@ -1,6 +1,266 @@{"sourceLanguage" : "en","strings" : {+ "whatsapp.autostart" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "تشغيل GOWA تلقائيًا"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "GOWA স্বয়ংক্রিয়ভাবে চালু করো"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Start GOWA automatically"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Iniciar GOWA automáticamente"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Lancer GOWA automatiquement"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "GOWA अपने-आप शुरू करें"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Jalankan GOWA otomatis"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Iniciar o GOWA automaticamente"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Запускать GOWA автоматически"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "自动启动 GOWA"+ }+ }+ }+ },+ "whatsapp.autostart.hint" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "يشغّله Coucou على هذا الـMac فقط (127.0.0.1، منفذ العنوان)، دون تنزيل الوسائط، ويوقفه عند إغلاق Coucou. تبقى جلسة واتساب في ~/Library/Application Support/Coucou/GOWA."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Coucou এটি শুধু এই Mac-এ চালায় (127.0.0.1, URL-এর পোর্ট), মিডিয়া ডাউনলোড ছাড়াই, এবং Coucou বন্ধ হলে থামিয়ে দেয়। এর WhatsApp সেশন থাকে ~/Library/Application Support/Coucou/GOWA-তে।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Coucou runs it on this Mac only (127.0.0.1, the URL’s port), without downloading media, and stops it when Coucou quits. Its WhatsApp session stays in ~/Library/Application Support/Coucou/GOWA."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Coucou lo ejecuta solo en este Mac (127.0.0.1, el puerto de la URL), sin descargar archivos, y lo detiene al cerrar Coucou. Su sesión de WhatsApp queda en ~/Library/Application Support/Coucou/GOWA."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Coucou le lance sur ce Mac uniquement (127.0.0.1, le port de l’URL), sans télécharger les médias, et l’arrête quand Coucou quitte. Sa session WhatsApp reste dans ~/Library/Application Support/Coucou/GOWA."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Coucou इसे सिर्फ़ इस Mac पर चलाता है (127.0.0.1, URL का पोर्ट), मीडिया डाउनलोड किए बिना, और Coucou बंद होने पर रोक देता है। इसका WhatsApp सेशन ~/Library/Application Support/Coucou/GOWA में रहता है।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Coucou menjalankannya hanya di Mac ini (127.0.0.1, port dari URL), tanpa mengunduh media, dan menghentikannya saat Coucou ditutup. Sesi WhatsApp-nya ada di ~/Library/Application Support/Coucou/GOWA."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "O Coucou o executa só neste Mac (127.0.0.1, a porta da URL), sem baixar mídias, e o encerra quando o Coucou fecha. A sessão do WhatsApp fica em ~/Library/Application Support/Coucou/GOWA."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Coucou запускает его только на этом Mac (127.0.0.1, порт из адреса), без загрузки медиа, и останавливает при выходе. Сессия WhatsApp хранится в ~/Library/Application Support/Coucou/GOWA."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Coucou 仅在这台 Mac 上运行它(127.0.0.1,使用地址中的端口),不下载媒体,并在 Coucou 退出时停止它。其 WhatsApp 会话保存在 ~/Library/Application Support/Coucou/GOWA。"+ }+ }+ }+ },+ "whatsapp.autostart.path" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "مسار ملف GOWA التنفيذي (whatsapp)"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "GOWA বাইনারির পাথ (whatsapp)"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Path to the GOWA binary (whatsapp)"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ruta del binario de GOWA (whatsapp)"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Chemin du binaire GOWA (whatsapp)"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "GOWA बाइनरी का पाथ (whatsapp)"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Jalur biner GOWA (whatsapp)"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Caminho do binário do GOWA (whatsapp)"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Путь к бинарнику GOWA (whatsapp)"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "GOWA 程序路径(whatsapp)"+ }+ }+ }+ },+ "whatsapp.choose" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "اختيار…"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "বেছে নাও…"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Choose…"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Elegir…"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Choisir…"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "चुनें…"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Pilih…"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Escolher…"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Выбрать…"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "选择…"+ }+ }+ }+ },"whatsapp.mark-read-on-open" : {"extractionState" : "manual","localizations" : {diff --git a/NotchBuddy/Sources/App/AppDelegate.swift b/NotchBuddy/Sources/App/AppDelegate.swiftindex cb5fb24e..cb34d554 100644--- a/NotchBuddy/Sources/App/AppDelegate.swift+++ b/NotchBuddy/Sources/App/AppDelegate.swift@@ -10,6 +10,8 @@ final class AppDelegate: NSObject, NSApplicationDelegate {func applicationWillTerminate(_ notification: Notification) {#if !APPSTORENoteTaker.shared.shutdown()+ // The GOWA gateway Coucou started never outlives it.+ WhatsAppGOWAProcess.shared.stopNow()#endifDemoEngine.shared.stop()HotKeyCenter.shared.unregisterAll()diff --git a/NotchBuddy/Sources/App/WhatsAppController.swift b/NotchBuddy/Sources/App/WhatsAppController.swiftindex 7006511b..4dfb5835 100644--- a/NotchBuddy/Sources/App/WhatsAppController.swift+++ b/NotchBuddy/Sources/App/WhatsAppController.swift@@ -203,6 +203,8 @@ final class WhatsAppController: ObservableObject {link = .connectingstartListener(kind: provider.kind)if WhatsAppSettings.respectFocus { askFocus() }+ // GOWA started by Coucou when asked to (Settings), before the first check.+ WhatsAppGOWAProcess.shared.startIfNeeded()let t = Timer(timeInterval: 5, repeats: true) { _ inMainActor.assumeIsolated { WhatsAppController.shared.onTick() }}@@ -226,6 +228,8 @@ final class WhatsAppController: ObservableObject {lastWebhook = nilnamingGroups = []failures = 0+ // Started again on the next begin() with the new settings, or gone for good.+ WhatsAppGOWAProcess.shared.stop()if forget {inbox.clear()resetTask()@@ -301,6 +305,8 @@ final class WhatsAppController: ObservableObject {failures += 1// Twice in a row (not a gateway still starting): a small red dot on the pill, nothing more.if failures == 2 { showDown(true) }+ // GOWA started by Coucou and gone (crash, killed): started again, once a minute at most.+ if error == .unreachable { WhatsAppGOWAProcess.shared.startIfNeeded() }}/// The discreet error pill: the pill's red badge while the gateway is down.diff --git a/NotchBuddy/Sources/App/WhatsAppGOWAProcess.swift b/NotchBuddy/Sources/App/WhatsAppGOWAProcess.swiftnew file mode 100644index 00000000..4068a450--- /dev/null+++ b/NotchBuddy/Sources/App/WhatsAppGOWAProcess.swift@@ -0,0 +1,108 @@+#if !APPSTORE+import Foundation++// GitHub build only (#if !APPSTORE): the App Store build is sandboxed and may not run+// another program. Starts the GOWA binary the user picked as a child of Coucou, on the+// address set in Settings, and stops it when Coucou quits.++/// GOWA launched by Coucou ("Start GOWA automatically" in Settings).+@MainActor+final class WhatsAppGOWAProcess {+ static let shared = WhatsAppGOWAProcess()++ private var process: Process?+ private var lastStart: Date = .distantPast++ static var autoStart: Bool {+ get { UserDefaults.standard.bool(forKey: "whatsappAutoStartGOWA") }+ set { UserDefaults.standard.set(newValue, forKey: "whatsappAutoStartGOWA") }+ }++ /// The binary's path (not a secret: UserDefaults).+ static var binaryPath: String {+ get { UserDefaults.standard.string(forKey: "whatsappGOWAPath") ?? "" }+ set { UserDefaults.standard.set(newValue, forKey: "whatsappGOWAPath") }+ }++ var isRunning: Bool { process?.isRunning == true }++ /// Where GOWA keeps its own WhatsApp session (its database, not Coucou's): one folder in+ /// Application Support, so the link survives restarts.+ static var workingDirectory: URL {+ let base = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask)[0]+ return base.appendingPathComponent("Coucou/GOWA", isDirectory: true)+ }++ /// Starts GOWA unless it already runs (or was started less than a minute ago).+ /// Returns false when the binary can't be run.+ @discardableResult+ func startIfNeeded() -> Bool {+ guard Self.autoStart, WhatsAppSettings.gateway == .gowa else { return false }+ if isRunning { return true }+ guard Date().timeIntervalSince(lastStart) > 60 else { return true }+ let path = (Self.binaryPath as NSString).expandingTildeInPath+ guard !path.isEmpty, FileManager.default.isExecutableFile(atPath: path),+ let url = URL(string: WhatsAppSettings.url) else {+ appendAppLog("nb.log", "[WhatsApp] GOWA binary missing or not executable")+ return false+ }+ // Only ever on this Mac: an address elsewhere is someone else's gateway.+ guard ["127.0.0.1", "localhost", "::1"].contains(url.host ?? "") else { return false }+ try? FileManager.default.createDirectory(at: Self.workingDirectory, withIntermediateDirectories: true)++ let p = Process()+ p.executableURL = URL(fileURLWithPath: path)+ p.arguments = WAGOWA.launchArguments(for: url)+ p.currentDirectoryURL = Self.workingDirectory+ var env = ProcessInfo.processInfo.environment+ // The credential goes through the environment, not the command line (`ps` shows that).+ if let auth = KeychainStore.shared.get(WhatsAppSettings.credentialKey), auth.contains(":") {+ env["APP_BASIC_AUTH"] = auth+ }+ p.environment = env+ // GOWA's own output may name contacts or quote messages: it goes nowhere.+ p.standardOutput = FileHandle.nullDevice+ p.standardError = FileHandle.nullDevice+ p.terminationHandler = { proc in+ let status = proc.terminationStatus+ Task { @MainActor in+ appendAppLog("nb.log", "[WhatsApp] GOWA exited (\(status))")+ }+ }+ do {+ try p.run()+ process = p+ lastStart = Date()+ appendAppLog("nb.log", "[WhatsApp] GOWA started (pid \(p.processIdentifier))")+ return true+ } catch {+ appendAppLog("nb.log", "[WhatsApp] GOWA could not start: \(error.localizedDescription)")+ return false+ }+ }++ /// Stops GOWA if Coucou started it (Coucou quits, the option or WhatsApp is turned off).+ func stop() {+ lastStart = .distantPast+ guard let p = process else { return }+ process = nil+ guard p.isRunning else { return }+ p.terminate()+ // Still there after 2 s: killed.+ let pid = p.processIdentifier+ DispatchQueue.global().asyncAfter(deadline: .now() + 2) {+ if kill(pid, 0) == 0 { kill(pid, SIGKILL) }+ }+ }++ /// At quit: the gateway can't outlive Coucou, and there is no time to wait.+ func stopNow() {+ guard let p = process, p.isRunning else { return }+ p.terminate()+ let deadline = Date().addingTimeInterval(1)+ while p.isRunning && Date() < deadline { usleep(50_000) }+ if p.isRunning { kill(p.processIdentifier, SIGKILL) }+ process = nil+ }+}+#endifdiff --git a/NotchBuddy/Sources/App/WhatsAppGateway.swift b/NotchBuddy/Sources/App/WhatsAppGateway.swiftindex 527d8019..03c0055c 100644--- a/NotchBuddy/Sources/App/WhatsAppGateway.swift+++ b/NotchBuddy/Sources/App/WhatsAppGateway.swift@@ -180,6 +180,13 @@ enum WAGOWA {return (url.path, (r["qr_duration"] as? Int) ?? 30)}+ /// `./whatsapp rest` for Coucou's "Start GOWA automatically": on this Mac only, on the+ /// URL's port, and media never downloaded (Coucou shows a label), so GOWA keeps no photo+ /// or voice note on disk.+ static func launchArguments(for url: URL) -> [String] {+ ["rest", "--host=127.0.0.1", "--port=\(url.port ?? 3000)", "--auto-download-media=false"]+ }+/// The error code of a refused call (`ALREADY_LOGGED_IN`, `DEVICE_ID_REQUIRED`…).static func errorCode(_ data: Data) -> String? {((try? JSONSerialization.jsonObject(with: data)) as? [String: Any])?["code"] as? Stringdiff --git a/NotchBuddy/Sources/App/WhatsAppViews.swift b/NotchBuddy/Sources/App/WhatsAppViews.swiftindex 77e174ec..7459913d 100644--- a/NotchBuddy/Sources/App/WhatsAppViews.swift+++ b/NotchBuddy/Sources/App/WhatsAppViews.swift@@ -429,6 +429,8 @@ struct WhatsAppSettingsSection: View {@State private var port = String(WhatsAppSettings.port)@State private var respectFocus = WhatsAppSettings.respectFocus@State private var markReadOnOpen = WhatsAppSettings.markReadOnOpen+ @State private var autoStart = WhatsAppGOWAProcess.autoStart+ @State private var gowaPath = WhatsAppGOWAProcess.binaryPath@State private var testResult: String?@State private var testing = false@State private var ignoreEntry = ""@@ -468,6 +470,7 @@ struct WhatsAppSettingsSection: View {: String(localized: "whatsapp.credential.openwa"),text: $credential).textFieldStyle(.roundedBorder)+ if gateway == .gowa { autoStartRow }HStack(spacing: 6) {Text("whatsapp.port").font(.system(size: 11))TextField(String(WhatsAppSettings.defaultPort), text: $port)@@ -575,6 +578,44 @@ struct WhatsAppSettingsSection: View {}}+ /// Phase 3: Coucou starts the GOWA binary itself (GitHub build: the App Store build is+ /// sandboxed and never compiles this).+ @ViewBuilder private var autoStartRow: some View {+ Toggle("whatsapp.autostart", isOn: $autoStart)+ .onChange(of: autoStart) { _, on in+ WhatsAppGOWAProcess.autoStart = on+ wa.settingsChanged()+ }+ if autoStart {+ HStack(spacing: 6) {+ TextField(String(localized: "whatsapp.autostart.path"), text: $gowaPath)+ .textFieldStyle(.roundedBorder)+ .onSubmit { savePath() }+ Button("whatsapp.choose") { chooseBinary() }+ }+ Text("whatsapp.autostart.hint")+ .font(.system(size: 10))+ .foregroundColor(Color(hex: "#8E939C"))+ .fixedSize(horizontal: false, vertical: true)+ }+ }++ private func chooseBinary() {+ let panel = NSOpenPanel()+ panel.canChooseFiles = true+ panel.canChooseDirectories = false+ panel.allowsMultipleSelection = false+ panel.treatsFilePackagesAsDirectories = true+ guard panel.runModal() == .OK, let url = panel.url else { return }+ gowaPath = url.path+ savePath()+ }++ private func savePath() {+ WhatsAppGOWAProcess.binaryPath = gowaPath.trimmingCharacters(in: .whitespaces)+ wa.settingsChanged()+ }+private var webhookLine: String {switch wa.webhook {case .registered: return String(localized: "whatsapp.webhook.live")@@ -623,6 +664,7 @@ struct WhatsAppSettingsSection: View {if trimmedCredential.isEmpty { KeychainStore.shared.remove(WhatsAppSettings.credentialKey) }else { KeychainStore.shared.set(WhatsAppSettings.credentialKey, value: trimmedCredential) }WhatsAppSettings.gateway = gateway+ WhatsAppGOWAProcess.binaryPath = gowaPath.trimmingCharacters(in: .whitespaces)if let p = Int(port), (1024...65535).contains(p) { WhatsAppSettings.port = p }port = String(WhatsAppSettings.port)wa.settingsChanged()diff --git a/README.md b/README.mdindex bc7f2b1d..d404e207 100644--- a/README.md+++ b/README.md@@ -316,9 +316,53 @@ On the Mac, open Coucou from the Dock or the menu bar: its window has every sett| **Flow dictation** *(macOS, GitHub build)* | hold a key, speak, the words are pasted | Coucou → Flow → Settings · the Accessibility and Microphone permissions || **Parakeet** *(macOS, Apple silicon)* | offline dictation, more accurate | Coucou → Flow → Settings → Recognition → **Download** (about 650 MB) || Stripe, n8n, GitHub, Vercel, Resend, Notion, Cal.com | the service pills | Keychain / Windows Credential Manager / Secret Service, all optional |+| **WhatsApp** *(macOS, GitHub build, experimental)* | your WhatsApp messages in the notch, and replies | Settings → Integrations → WhatsApp · a gateway on your Mac, see [WhatsApp (experimental)](#whatsapp-experimental) |If Coucou isn't running, the hook exits immediately: **Claude Code is never blocked.**+### WhatsApp (experimental)++*macOS, GitHub build only.* The WhatsApp pill shows your incoming messages in the notch, one row per conversation, and lets you reply without opening WhatsApp. WhatsApp has no API for personal accounts, so Coucou goes through an **unofficial gateway that runs on your Mac** and speaks the WhatsApp Web protocol: [GOWA](https://github.com/aldinokemal/go-whatsapp-web-multidevice) (recommended) or [OpenWA](https://github.com/rmyndharis/OpenWA). Coucou only reads and sends through that gateway.++> **Unofficial.** Use it on your own account only. WhatsApp may restrict an account that abuses it (bulk messages, automation). Coucou only replies in a conversation that wrote to you, a few messages a minute at most.++**1. Install GOWA.** Download the macOS build from the [latest release](https://github.com/aldinokemal/go-whatsapp-web-multidevice/releases/latest), unzip it, and let macOS run it (it isn't signed):++```bash+xattr -d com.apple.quarantine ./whatsapp+```++**2. Start it on your Mac only**, without downloading media (Coucou shows a label, never the file):++```bash+./whatsapp rest --host=127.0.0.1 --port=3000 --auto-download-media=false+```++Add `--basic-auth=user:password` to protect it with a password. Or let Coucou start it for you: Settings → Integrations → WhatsApp → **Start GOWA automatically**, then pick the binary. Coucou runs it as its own child process and stops it when Coucou quits.++**3. Set up Coucou.** Settings → Integrations → WhatsApp (experimental): turn it on, pick **GOWA**, keep `http://127.0.0.1:3000` (and `user:password` if you set one), **Save**, then **Test connection**. The address and the password go to the Keychain.++**4. Scan the QR code** that shows right there in Settings: on your phone, WhatsApp → Settings → Linked devices → Link a device. The dot turns green and the pill fills in as messages arrive.++Coucou tells the gateway where to post new messages (a small server on `127.0.0.1`, port 47823 by default, never reachable from another machine), with a random secret kept in the Keychain; every delivery is checked against its HMAC-SHA256 signature. If no message comes that way, Coucou checks every 20 seconds instead.++**OpenWA instead.** Start it with the Baileys engine and allow its webhook to reach your Mac, then pick **OpenWA** in Settings with `http://127.0.0.1:2785` and its API key (`data/.api-key` on first start):++```bash+ENGINE_TYPE=baileys SSRF_ALLOWED_HOSTS=127.0.0.1 npm run start:prod+```++**What it does**+- One row per conversation: initials, name, the last message cut short, the unread count. Photos, voice messages and documents show as a label (« Photo », « Voice message », « Document »); nothing is downloaded.+- A new message: Mochi's little happy face, a sound if sounds are on, and the island opens under its usual rules.+- Click a conversation: its last ten messages and a reply field. Return sends, Shift-Return starts a new line, Esc goes back.+- Read receipts only when you open a conversation (or, if you turn that off, only when you reply). Never when a message just arrives.+- Groups stay quiet unless you're mentioned; chats you ignore never show (right-click a row, or Settings); quiet during a macOS Focus when the system lets Coucou read it.++**Privacy.** Coucou talks only to the gateway on your Mac. Messages stay in memory, are never written to disk or to a log, and are forgotten when Coucou quits or WhatsApp is turned off. No profile photo is fetched: they live on WhatsApp's servers, so the pill shows initials.++**Limits.** No profile photos, no voice-message duration (neither gateway gives it), no new conversations from Coucou, no media sending. The gateway must run for messages to arrive. Following a Focus needs Coucou to be signed with Apple's Communication Notifications capability; until then that setting says it's unavailable.+### Supported agents| Agent | How it connects (Mac) | Mac-only? |diff --git a/docs/INTEGRATIONS.md b/docs/INTEGRATIONS.mdindex 5aec7e2d..acf4c4c2 100644--- a/docs/INTEGRATIONS.md+++ b/docs/INTEGRATIONS.md@@ -321,6 +321,22 @@ Réglages → Chat → Local models → **Disconnect**. Efface l'URL sauvegardé---+## 6bis. WhatsApp (expérimental, build GitHub uniquement)++Pas d'API WhatsApp pour un compte perso : Coucou parle à une **passerelle locale non officielle** que l'utilisateur lance sur son Mac, [GOWA](https://github.com/aldinokemal/go-whatsapp-web-multidevice) (par défaut) ou [OpenWA](https://github.com/rmyndharis/OpenWA). Tout le code est sous `#if !APPSTORE` ; la pill `integration_whatsapp` (#25D366) est `githubOnly`.++- **Fichiers** : `WhatsAppModels.swift` (boîte en mémoire, filtres, garde-fous, requête HTTP), `WhatsAppGateway.swift` (payloads et réponses des deux passerelles, HMAC), `WhatsAppProvider.swift` (`GOWAProvider`, `OpenWAProvider`), `WhatsAppWebhook.swift` (serveur 127.0.0.1), `WhatsAppController.swift`, `WhatsAppViews.swift` (carte, conversation, Réglages), `WhatsAppGOWAProcess.swift` (GOWA lancé par Coucou). Tests : `scripts/test-whatsapp.sh`.+- **GOWA** : `http://127.0.0.1:3000`, auth basique `user:pass` facultative. Coucou prend l'appareil connecté, sinon crée `coucou` (`POST /devices`) ; QR = PNG de `GET /devices/{id}/login`, récupéré sur la passerelle elle-même ; webhook déclaré par `PATCH /devices/{id}/webhook` (événement `message`), signé `X-Hub-Signature-256: sha256=<hex>`. Messages : `GET /chats`, `GET /chat/{jid}/messages` ; envoi `POST /send/message` ; lu `POST /message/{id}/read`. Pas de liste de mentions : `@<mon numéro>` dans le texte.+- **OpenWA** : `http://127.0.0.1:2785/api`, en-tête `X-API-Key`, moteur `ENGINE_TYPE=baileys`. Session prête, sinon `coucou` créée et démarrée ; QR = data-URL de `GET /sessions/{id}/qr` ; webhook `POST /sessions/{id}/webhooks` (`message.received`, `message.sent`), signé `X-OpenWA-Signature`. Il faut `SSRF_ALLOWED_HOSTS=127.0.0.1` côté OpenWA, sinon il refuse l'adresse locale (Coucou passe alors au polling).+- **Temps réel** : `NWListener` lié à `127.0.0.1` (port 47823 par défaut), pairs non-loopback refusés, signature HMAC-SHA256 vérifiée sur le corps brut avec un secret aléatoire du Keychain. Sans livraison depuis 5 min : polling toutes les 20 s. Statut toutes les 5 s tant que ce n'est pas lié, toutes les minutes ensuite, toutes les 30 s après une minute de panne. Réveil : on redemande tout.+- **Pill** : une ligne par conversation (initiales, nom, aperçu, non-lus), médias en libellé. Nouveau message : émote `happy`, son `pop` (réglage son global), état `finished` comme Stripe (règles d'ouverture habituelles), seulement le nom de la conversation dans la pill, jamais le texte. Passerelle en panne deux fois de suite : badge rouge, rien de plus.+- **Répondre** : clic → 10 derniers messages + champ (Entrée envoie, Maj+Entrée saut de ligne, Échap ferme ; le brouillon garde l'île ouverte). Réponse seulement dans une conversation déjà là, 4 096 caractères max, 6 par minute. Lu à l'ouverture (option) ou à la réponse, jamais à la réception.+- **Filtres** : groupes muets sauf mention, chats ignorés (clic droit ou Réglages), Concentration via `INFocusStatusCenter` (demande la capability Communication Notifications ; sans elle, le réglage s'affiche indisponible).+- **Vie privée** : rien d'autre que la passerelle locale (pas de photo de profil, elles sont sur les serveurs de WhatsApp), historique en mémoire seulement (20 messages par conversation), vidé à la fermeture ou à la désactivation, aucun contenu dans les logs ni sur disque. URL, identifiants et secret dans le Keychain.+- **Lancer GOWA automatiquement** : processus enfant `rest --host=127.0.0.1 --port=<port de l'URL> --auto-download-media=false`, identifiant passé par `APP_BASIC_AUTH` (pas sur la ligne de commande), sortie vers `/dev/null`, dossier `~/Library/Application Support/Coucou/GOWA`, arrêté à la fermeture de Coucou, relancé s'il tombe (une fois par minute au plus).++---+## 7. Permissions macOS demandées (récapitulatif pour Louis)| Permission | Pourquoi | Quand |@@ -331,6 +347,7 @@ Réglages → Chat → Local models → **Disconnect**. Efface l'URL sauvegardé| Automatisation → Spotify *(GitHub only)* | lire la position, le shuffle, le volume ; piloter la lecture | activation de la pill Spotify, ou première ouverture de sa carte || Enregistrement de l'écran | capturer la fenêtre attrapée | première attache || Micro + Reconnaissance vocale (optionnel) | dictée | premier clic sur le micro |+| État de Concentration *(GitHub only)* | WhatsApp reste discret pendant une Concentration | activation de WhatsApp, si « Rester discret pendant une Concentration » est coché |Aucune permission Accessibilité nécessaire.diff --git a/tests/WhatsAppGatewayTests.swift b/tests/WhatsAppGatewayTests.swiftindex b12ee085..eef26b1a 100644--- a/tests/WhatsAppGatewayTests.swift+++ b/tests/WhatsAppGatewayTests.swift@@ -235,6 +235,9 @@ extension WhatsAppTests {let login = #"{"code":"SUCCESS","message":"Success","results":{"device_id":"coucou","qr_duration":30,"qr_link":"http://localhost:3000/statics/qrcode/scan-qr-b0b7bb43-9a22-455a-814f-5a225c743310.png"}}"#let qr = WAGOWA.qrPath(Data(login.utf8))check("GOWA: QR path only, fetched from the gateway", qr?.path == "/statics/qrcode/scan-qr-b0b7bb43-9a22-455a-814f-5a225c743310.png" && qr?.seconds == 30)+ check("GOWA launched on this Mac only, no media download",+ WAGOWA.launchArguments(for: URL(string: "http://127.0.0.1:3001")!)+ == ["rest", "--host=127.0.0.1", "--port=3001", "--auto-download-media=false"])check("GOWA: error code", WAGOWA.errorCode(Data(#"{"code":"ALREADY_LOGGED_IN","message":"you are already logged in."}"#.utf8)) == "ALREADY_LOGGED_IN")let msgs = #"{"code":"SUCCESS","message":"ok","results":{"data":[{"id":"M2","chat_jid":"[email protected]","sender_jid":"[email protected]","sender_display_name":"John","content":"","timestamp":"2025-07-13T11:06:00Z","is_from_me":false,"media_type":"document","filename":"devis.pdf"},{"id":"M1","chat_jid":"[email protected]","sender_jid":"[email protected]","content":"salut","timestamp":"2025-07-13T11:05:00Z","is_from_me":true,"media_type":""}],"pagination":{"limit":10,"offset":0,"total":2},"chat_info":{"jid":"[email protected]","name":"Famille","last_message_time":"2025-07-13T11:06:00Z"}}}"#diff --git a/windows/src/i18n/strings.json b/windows/src/i18n/strings.jsonindex deca21d4..0b6ff8e2 100644--- a/windows/src/i18n/strings.json+++ b/windows/src/i18n/strings.json@@ -838,6 +838,17 @@"ru": "Выбери инструменты, которые ты используешь. Coucou показывает только то, что ты здесь объявишь.","id": "Pilih alat yang Anda gunakan. Coucou hanya menampilkan yang Anda deklarasikan di sini."},+ "Choose…": {+ "zh-Hans": "选择…",+ "hi": "चुनें…",+ "es": "Elegir…",+ "ar": "اختيار…",+ "fr": "Choisir…",+ "bn": "বেছে নাও…",+ "pt-BR": "Escolher…",+ "ru": "Выбрать…",+ "id": "Pilih…"+ },"City": {"zh-Hans": "城市","hi": "शहर",@@ -1443,6 +1454,17 @@"ru": "Coucou отвечает вслух","id": "Coucou merespons dengan suara"},+ "Coucou runs it on this Mac only (127.0.0.1, the URL’s port), without downloading media, and stops it when Coucou quits. Its WhatsApp session stays in ~/Library/Application Support/Coucou/GOWA.": {+ "zh-Hans": "Coucou 仅在这台 Mac 上运行它(127.0.0.1,使用地址中的端口),不下载媒体,并在 Coucou 退出时停止它。其 WhatsApp 会话保存在 ~/Library/Application Support/Coucou/GOWA。",+ "hi": "Coucou इसे सिर्फ़ इस Mac पर चलाता है (127.0.0.1, URL का पोर्ट), मीडिया डाउनलोड किए बिना, और Coucou बंद होने पर रोक देता है। इसका WhatsApp सेशन ~/Library/Application Support/Coucou/GOWA में रहता है।",+ "es": "Coucou lo ejecuta solo en este Mac (127.0.0.1, el puerto de la URL), sin descargar archivos, y lo detiene al cerrar Coucou. Su sesión de WhatsApp queda en ~/Library/Application Support/Coucou/GOWA.",+ "ar": "يشغّله Coucou على هذا الـMac فقط (127.0.0.1، منفذ العنوان)، دون تنزيل الوسائط، ويوقفه عند إغلاق Coucou. تبقى جلسة واتساب في ~/Library/Application Support/Coucou/GOWA.",+ "fr": "Coucou le lance sur ce Mac uniquement (127.0.0.1, le port de l’URL), sans télécharger les médias, et l’arrête quand Coucou quitte. Sa session WhatsApp reste dans ~/Library/Application Support/Coucou/GOWA.",+ "bn": "Coucou এটি শুধু এই Mac-এ চালায় (127.0.0.1, URL-এর পোর্ট), মিডিয়া ডাউনলোড ছাড়াই, এবং Coucou বন্ধ হলে থামিয়ে দেয়। এর WhatsApp সেশন থাকে ~/Library/Application Support/Coucou/GOWA-তে।",+ "pt-BR": "O Coucou o executa só neste Mac (127.0.0.1, a porta da URL), sem baixar mídias, e o encerra quando o Coucou fecha. A sessão do WhatsApp fica em ~/Library/Application Support/Coucou/GOWA.",+ "ru": "Coucou запускает его только на этом Mac (127.0.0.1, порт из адреса), без загрузки медиа, и останавливает при выходе. Сессия WhatsApp хранится в ~/Library/Application Support/Coucou/GOWA.",+ "id": "Coucou menjalankannya hanya di Mac ini (127.0.0.1, port dari URL), tanpa mengunduh media, dan menghentikannya saat Coucou ditutup. Sesi WhatsApp-nya ada di ~/Library/Application Support/Coucou/GOWA."+ },"Coucou writes your calls on your Mac with Parakeet, and tells the voices apart with a second small model. Both are downloaded once (about 650 MB), then everything works offline.": {"zh-Hans": "Coucou 用 Parakeet 在你的 Mac 上转写通话,并用第二个小模型区分说话人。两者只需下载一次(约 650 MB),之后一切离线运行。","hi": "Coucou आपकी कॉल Parakeet से आपके Mac पर ही लिखता है, और एक दूसरे छोटे मॉडल से आवाज़ें पहचानता है। दोनों एक बार डाउनलोड होते हैं (लगभग 650 MB), फिर सब ऑफ़लाइन चलता है।",@@ -4314,6 +4336,17 @@"ru": "Вставить · или нажмите {0}","id": "Tempel · atau tekan {0}"},+ "Path to the GOWA binary (whatsapp)": {+ "zh-Hans": "GOWA 程序路径(whatsapp)",+ "hi": "GOWA बाइनरी का पाथ (whatsapp)",+ "es": "Ruta del binario de GOWA (whatsapp)",+ "ar": "مسار ملف GOWA التنفيذي (whatsapp)",+ "fr": "Chemin du binaire GOWA (whatsapp)",+ "bn": "GOWA বাইনারির পাথ (whatsapp)",+ "pt-BR": "Caminho do binário do GOWA (whatsapp)",+ "ru": "Путь к бинарнику GOWA (whatsapp)",+ "id": "Jalur biner GOWA (whatsapp)"+ },"Pause": {"zh-Hans": "暂停","hi": "रोकें",@@ -5491,6 +5524,17 @@"ru": "Spotify не установлен","id": "Spotify belum terpasang"},+ "Start GOWA automatically": {+ "zh-Hans": "自动启动 GOWA",+ "hi": "GOWA अपने-आप शुरू करें",+ "es": "Iniciar GOWA automáticamente",+ "ar": "تشغيل GOWA تلقائيًا",+ "fr": "Lancer GOWA automatiquement",+ "bn": "GOWA স্বয়ংক্রিয়ভাবে চালু করো",+ "pt-BR": "Iniciar o GOWA automaticamente",+ "ru": "Запускать GOWA автоматически",+ "id": "Jalankan GOWA otomatis"+ },"Startup": {"zh-Hans": "启动","hi": "स्टार्टअप",