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
Merge port/github-pulse: GitHub pulse card, alerts and contribution grid
Claude1066c7f33400
diff --cc windows/README.mdindex 6b3306f1,924b91ec..865d6ecd--- a/windows/README.md+++ b/windows/README.md@@@ -277,41 -180,12 +298,43 @@@ own windowthe top edge instead of hiding in a notch.- Permission approval works from **any** terminal; the Mac build only listens toVS Code sessions.-- Not in this version: sending a file by email, dragging Mochi onto a window to- attach it as context, and jumping to a specific terminal window — "Open- terminal" opens the working folder in VS Code when `code` is on your `PATH`.+- "Open terminal" finds the session's window by walking up from the relay's+ process to the terminal or editor that runs it. A session in a classic+ console window (`cmd.exe` or PowerShell without Windows Terminal) has no such+ ancestor — conhost owns that window — so its folder opens in VS Code instead,+ as it does when `code` is on your `PATH` and nothing was found.+- No global keyboard shortcuts yet: a waiting card is folded with its **⌃** or+ `Esc` in the island, and reopened by clicking the island or Open in the tray.+- Apple Music, the one pill from the Mac catalog with nothing behind it here,+ is left out.+- Not in this version: sending a dropped file by email and dragging Mochi onto+ a window to attach it as context. On the Mac, email goes through Resend or+ Apple Mail's scripting; neither has a safe equivalent that attaches a file+ here, and the drop card would need a third button it doesn't have.- Cal.com shows the next bookings as a list rather than the Mac's calendar.+- The Cursor pill carries both Cursor Agent's own hooks and Claude Code running+ in Cursor's terminal.+- Hermes: Coucou writes the plugin but does not run the `hermes` CLI, so it is+ turned on once by hand. Hermes runs natively on Linux; on Windows it is+ untested.+- Plan usage: the user's previous status line runs through Git Bash on Windows+ (`/bin/sh` on Linux and Mac); without Git Bash it is not run, rather than+ guessed at with `cmd`. The Codex CLI is looked for on `PATH` and in npm's,+ Volta's, Bun's and pnpm's folders (and nvm's on Linux).+- The chat's model picker opens inside the chat card instead of a popover, and+ it also offers OpenRouter and any OpenAI-compatible server, which the Mac+ does not. Google AI, OpenAI and OpenRouter can see an image you dropped (sent+ inline), where the Mac sends its name only.+- Live diff: the relay forwards an edit's text whole only once the edit is done+ (PostToolUse), up to 256 KB per string and 512 KB per event. A bigger edit+ shows its "Modifie · file" step without counts rather than wrong ones. The+ diff's ↗ needs `code` on your `PATH`; without it, it opens the file's folder —+ never the file itself. Counts and diffs come from Claude Code's Edit,+ MultiEdit and Write, on whichever pill its session is on (VS Code, Cursor,+ Claude Desktop); other agents' edits show as plain steps. There is no+ ⌘E-style shortcut.+ - The GitHub lists are clicked, not walked with the arrow keys, and there is no+ iPhone to keep fetching them while the pill is off.## Linuxdiff --cc windows/src-tauri/src/lib.rsindex 05bce4ab,96749206..413ac8ac--- a/windows/src-tauri/src/lib.rs+++ b/windows/src-tauri/src/lib.rs@@@ -1,20 -1,12 +1,21 @@@// Coucou for Windows — app wiring and the commands the island calls.+mod agent_hooks;+mod agents;+mod chat;mod claude;+mod config_file;+mod codex_plan;mod files;+ mod github;mod hooks;+mod identity;mod integrations;mod island;+mod local_chat;mod log;+mod net;+mod openai_compat;mod pipe;mod platform;mod secrets;diff --cc windows/src/island/integrations.tsindex bf798c93,3e59dde7..712f6cad--- a/windows/src/island/integrations.ts+++ b/windows/src/island/integrations.ts@@@ -3,56 -3,63 +3,87 @@@// the pill isn't focused, plays a sound, and clears itself after 60 s.import { onEvent, Bridge, type IntegrationUpdate } from "../core/bridge";+ import { gitHubAlert, type GitHubEvent } from "../core/github";+import { availablePills } from "../core/pills";import { Sound } from "../core/sound";import { State } from "../core/state";import type { Island } from "./island";+ const GITHUB = "integration_github";+-/** Which Credential Manager key backs each pill. */-const KEY_FOR: Record<string, string> = {- integration_stripe: "stripe-api-key",- integration_github: "github-token",- integration_vercel: "vercel-token",- integration_n8n: "n8n-api-key",- integration_resend: "resend-api-key",- integration_notion: "notion-api-key",- integration_calcom: "calcom-api-key",-};-const clearTimers = new Map<string, number>();export function registerIntegrationHandlers(island: Island) {void onEvent<IntegrationUpdate>("integration", (update) => handle(island, update));+ void onEvent<GitHubEvent[]>("github-alerts", handleGitHubAlerts);void refreshConfigured();+ State.subscribe(refreshGitHubWhenShown);+ }++ /**+ * AppState.handleGitHubEvents: the loudest event sets the badge — only while the+ * GitHub pill isn't the one on screen — and plays its sound. Unlike the other+ * integrations it leaves Mochi's state alone and the badge stays until the pill+ * is focused, as on macOS.+ */+ export function handleGitHubAlerts(events: GitHubEvent[]) {+ if (State.paused) return;+ const alert = gitHubAlert(events);+ if (!alert) return;+ const task = State.tasks.find((t) => t.id === GITHUB);+ if (!task) return;+ if (State.focusId !== GITHUB) task.pillBadge = alert.badge;+ Sound.play(alert.sound);+ State.notify();+ }++ let gitHubShown = false;++ /** The GitHub card just came on screen (focused, island opened): refresh it if stale. */+ function refreshGitHubWhenShown() {+ const shown = State.mode === "expanded" && State.focusTask?.id === GITHUB;+ if (shown && !gitHubShown) void Bridge.githubRefresh("pulse");+ gitHubShown = shown;}-/** Asks Rust which keys exist so the idle cards can say so. */+/**+ * Whether each pill is connected, so its idle card can say so: a key in the+ * credential store for a service or a chat provider, the hooks in place for a+ * pill fed by hook events (Mac #183), nothing at all for Claude Desktop.+ */export async function refreshConfigured() {- for (const [id, key] of Object.entries(KEY_FOR)) {- const present = (await Bridge.secretPresent(key)) ?? false;+ const hooks = (await Bridge.agentHooksStatus()) ?? null;+ for (const def of availablePills(State.os)) {+ let configured: boolean;+ switch (def.connect.kind) {+ case "key":+ configured = (await Bridge.secretPresent(def.connect.key)) ?? false;+ break;+ case "hooks":+ // Without an answer from Rust (a plain browser), the Claude Code pill+ // falls back to what the settings say about its hooks.+ configured = hooks?.[def.id] ??+ (def.id === "integration_claude" ? State.settings.hooksInstalled : false);+ break;+ case "server":+ // A local model server counts once the chat is connected to it.+ configured = State.settings[def.connect.field] !== "";+ break;+ case "none":+ configured = true;+ break;+ }+ const info = State.integrations[def.id] ?? { data: {}, error: null, loaded: false, configured: false };+ State.integrations[def.id] = { ...info, configured };+ }+ State.notify();+}++/** Only the hook-driven pills, for when the island opens: a few small file reads. */+export async function refreshHookPills() {+ const hooks = await Bridge.agentHooksStatus();+ if (!hooks) return;+ for (const [id, present] of Object.entries(hooks)) {const info = State.integrations[id] ?? { data: {}, error: null, loaded: false, configured: false };State.integrations[id] = { ...info, configured: present };}diff --cc windows/src/style.cssindex c1cd4fa2,7e4134f8..70a5644f--- a/windows/src/style.css+++ b/windows/src/style.css@@@ -1829,154 -1366,174 +1829,326 @@@ input[type="range"]::-webkit-slider-thupadding-top: 8px;}+/* ── Plan usage: the pills in the header and the card behind them ────────────+ ClaudePlanHeaderPill / ClaudePlanCardView / CodexPlanCardView on the Mac.+ Nothing here applies until a pill is turned on in Settings. */++/* Off: takes no room, so the header is exactly as it shipped. */+.plan-pills {+ display: none;+ align-items: center;+ gap: 5px;+ /* .header-actions spaces its items 14px apart; the Mac puts 8px between+ the pills and the gear. */+ margin-right: -6px;+}++.plan-pills.on {+ display: flex;+}++/* Both pills: the Mac tightens the right side (icons 10px apart, pills 5px+ from the gear, 8px from the edge). */+.header-actions.both-plans {+ gap: 10px;+ padding-right: 8px;+}++.header-actions.both-plans .plan-pills {+ margin-right: -5px;+}++.header-actions .plan-pill {+ --plan: #6b7079;+ display: flex;+ align-items: center;+ gap: 4px;+ padding: 4px 8px;+ border: 1px solid color-mix(in srgb, var(--plan) 14%, transparent);+ border-radius: 999px;+ background: #0e0f11;+ color: var(--dim-3);+ font: 600 10px var(--font);+ line-height: 12px;+ white-space: nowrap;+ cursor: default;+ transition: background 0.18s, border-color 0.18s, color 0.18s;+}++.header-actions .plan-pill:hover,+.header-actions .plan-pill.active {+ background: color-mix(in srgb, var(--plan) 18%, transparent);+ border-color: color-mix(in srgb, var(--plan) 55%, transparent);+ color: color-mix(in srgb, var(--plan) 70%, white);+}++.plan-pill-dot {+ width: 6px;+ height: 6px;+ border-radius: 50%;+}++.plan-card {+ position: relative;+ z-index: 1;+ padding-top: 10px;+}++.plan-head {+ display: flex;+ align-items: center;+ gap: 6px;+ padding: 0 36px 0 108px;+ white-space: nowrap;+}++.plan-head > * {+ flex: 0 0 auto;+}++.plan-title {+ font: 600 12px var(--font);+ color: var(--ink);+}++.plan-head > .plan-sub {+ flex: 0 1 auto; /* the one part that gives way, with an ellipsis */+ min-width: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ font: 400 11px var(--font);+ color: var(--dim-2);+}++.plan-rows {+ display: flex;+ flex-direction: column;+ gap: 5px;+ padding: 8px 12px 0 108px;+}++.plan-row {+ display: flex;+ align-items: center;+ gap: 5px;+ font: 400 11px var(--font);+ white-space: nowrap;+}++.plan-label {+ flex: 0 0 40px;+ color: var(--dim-3);+}++.plan-bar {+ flex: 0 0 50px;+ height: 4px;+ border-radius: 2px;+ background: rgba(255, 255, 255, 0.08);+ overflow: hidden;+}++.plan-fill {+ display: block;+ height: 100%;+ border-radius: 2px;+}++.plan-pct {+ flex: 0 0 30px;+ text-align: right;+ font-weight: 600;+ font-variant-numeric: tabular-nums;+ color: #c5c8cd;+}++.plan-reset-icon {+ display: inline-flex;+ color: var(--dim-3);+}++.plan-reset {+ font-size: 10px;+ color: var(--dim-3);+}++.plan-none {+ color: var(--dim-3);+}++.plan-credits {+ font-weight: 600;+ color: #c5c8cd;+}+++ /* ── GitHub pulse (GitHubPulseCardView / GitHubDetailView) ─────────────── */++ .gh-spark {+ display: inline-flex;+ align-items: center;+ gap: 4px;+ border: 0;+ padding: 0;+ background: transparent;+ font: 400 11px var(--font);+ color: var(--dim-2);+ white-space: nowrap;+ cursor: default;+ min-width: 0;+ }++ .gh-mini {+ display: inline-flex;+ gap: 2px;+ }++ .gh-mini i,+ .gh-cell {+ width: 7px;+ height: 7px;+ border-radius: 1.5px;+ flex: 0 0 auto;+ }++ .int-stats.gh-rows {+ gap: 4px;+ padding-top: 6px;+ }++ .gh-stat {+ border: 0;+ padding: 0;+ background: transparent;+ width: 100%;+ text-align: left;+ cursor: default;+ }++ .gh-detail-head {+ display: flex;+ align-items: center;+ gap: 6px;+ min-width: 0;+ }++ .gh-back {+ display: inline-flex;+ align-items: center;+ gap: 3px;+ border: 0;+ padding: 0;+ background: transparent;+ font: 600 12px var(--font);+ color: var(--ink);+ white-space: nowrap;+ cursor: default;+ flex: 0 0 auto;+ }++ .gh-head-right {+ margin-left: auto;+ border: 0;+ padding: 0;+ background: transparent;+ font: 400 11px var(--font);+ color: var(--dim-2);+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+ min-width: 0;+ cursor: default;+ }++ .gh-list {+ display: flex;+ flex-direction: column;+ max-height: 60px; /* three 20 px rows; the rest scrolls */+ overflow-y: auto;+ margin-top: 4px;+ scrollbar-width: none;+ }++ .gh-list::-webkit-scrollbar {+ display: none;+ }++ .gh-list.fade {+ -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 80%, transparent 100%);+ mask-image: linear-gradient(to bottom, #000 0%, #000 80%, transparent 100%);+ }++ .gh-row {+ display: flex;+ align-items: center;+ gap: 5px;+ height: 20px;+ flex: 0 0 20px;+ padding: 0 4px 0 0;+ border: 0;+ border-radius: 4px;+ background: transparent;+ text-align: left;+ cursor: default;+ min-width: 0;+ }++ .gh-row:hover {+ background: rgba(255, 255, 255, 0.05);+ }++ .gh-gap {+ width: 5px;+ flex: 0 0 5px;+ }++ .gh-ref {+ font: 400 10.5px var(--font);+ color: #9398a1;+ white-space: nowrap;+ flex: 0 0 auto;+ }++ .gh-title {+ font: 400 11px var(--font);+ color: #c5c8cd;+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+ min-width: 0;+ }++ .gh-draft {+ font: 400 9.5px var(--font);+ color: var(--dim-3);+ flex: 0 0 auto;+ }++ .gh-word {+ margin-left: auto;+ padding-left: 4px;+ font: 400 10px var(--font);+ white-space: nowrap;+ flex: 0 0 auto;+ }++ .gh-empty {+ font: 400 10.5px var(--font);+ color: var(--dim-3);+ padding-top: 8px;+ }++ .gh-grid {+ display: flex;+ gap: 1.5px;+ padding-top: 5px;+ }++ .gh-week {+ display: flex;+ flex-direction: column;+ gap: 1.5px;+ }++ .gh-cell.empty {+ background: transparent;+ }diff --cc windows/src/views/icons.tsindex 197b8d2b,7c99e969..923ad026--- a/windows/src/views/icons.ts+++ b/windows/src/views/icons.ts@@@ -40,10 -36,14 +40,18 @@@ export const ICONS =star: "M12 3.2l2.6 5.55 5.9.82-4.3 4.3 1.05 6.13L12 17.1l-5.25 2.9L7.8 13.87 3.5 9.57l5.9-.82L12 3.2z",// square.stack.fillstack: "M5 8h14v11.5H5V8zm1.8-3h10.4v1.6H6.8V5zm1.6-2.6h7.2V4H8.4V2.4z",+ // doc.on.doc (copy)+ copy: "M9 3.5h8.5L21 7v10.5H9v-14zm1.8 1.8v10.4h8.4V7.8l-2.5-2.5h-5.9zM3 7.5h4.2v1.8H4.8v10.4h8.4v-2.2H15v4H3v-14z",+ // chevron.up.chevron.down+ chevronUpDown: "M8 9.5 12 5.5l4 4M8 14.5l4 4 4-4",+ // arrow.triangle.pull (stroked)+ pull: "M6 3a2.2 2.2 0 1 1 0 4.4A2.2 2.2 0 0 1 6 3zM6 7.4v9.2M6 16.6a2.2 2.2 0 1 1 0 4.4 2.2 2.2 0 0 1 0-4.4zM18 16.6a2.2 2.2 0 1 1 0 4.4 2.2 2.2 0 0 1 0-4.4zM18 16.6V9a3 3 0 0 0-3-3h-4.5M13 3.5 10.5 6 13 8.5",+ // eye (stroked)+ eye: "M2 12s3.6-6.5 10-6.5S22 12 22 12s-3.6 6.5-10 6.5S2 12 2 12zM12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z",+ // checkmark.seal.fill (even-odd)+ seal: "M12 1.8 14.23 3.69 17.1 3.17 18.08 5.92 20.83 6.9 20.31 9.77 22.2 12 20.31 14.23 20.83 17.1 18.08 18.08 17.1 20.83 14.23 20.31 12 22.2 9.77 20.31 6.9 20.83 5.92 18.08 3.17 17.1 3.69 14.23 1.8 12 3.69 9.77 3.17 6.9 5.92 5.92 6.9 3.17 9.77 3.69zM7.4 12.3 8.8 10.9 10.7 12.8 15.2 8.3 16.6 9.7 10.7 15.6z",+ // xmark.octagon.fill (even-odd)+ octagonX: "M21.61 15.98 15.98 21.61 8.02 21.61 2.39 15.98 2.39 8.02 8.02 2.39 15.98 2.39 21.61 8.02zM8.53 7.66 12 11.13 15.47 7.66 16.34 8.53 12.87 12 16.34 15.47 15.47 16.34 12 12.87 8.53 16.34 7.66 15.47 11.13 12 7.66 8.53z",// doc.textdoc: "M6.5 2.6h7l4 4v14.8h-11V2.6zm6.6 1.6v3.3h3.3l-3.3-3.3zM8.6 11h6.8v1.5H8.6V11zm0 3.4h6.8v1.5H8.6v-1.5z",} as const;diff --cc windows/src/views/integrations.tsindex 9d9741e7,f170ce2a..71314da9--- a/windows/src/views/integrations.ts+++ b/windows/src/views/integrations.ts@@@ -8,8 -8,8 +8,10 @@@ import { h, svg, clear, dot } from "./dimport { ICONS } from "./icons";import { State, type AgentTask } from "../core/state";import { Bridge } from "../core/bridge";+import { isComingSoon, pillDefinition } from "../core/pills";+import { refreshHookPills } from "../island/integrations";+ import { readActivity, readPulse, readStats } from "../core/github";+ import { githubDetail, githubPulseCard } from "./github";/** Same shape as the Swift `timeAgo` computed properties. */export function timeAgo(value: unknown): string {