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
Pill catalog, multi-provider chat and docs (#87)
Louisadfef6b8a20b
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 5967b938..d3fffbc3 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,8 @@## Unreleased+- Declare the tools you use in Settings: Gemini CLI, Antigravity, Anthropic, Google AI and OpenAI pills join the existing ones (Cursor and Codex pills are coming soon), and you pick the main pill.+- Chat now supports Google AI (Gemini) and OpenAI in addition to Anthropic; switch provider and model by clicking the model name in the chat view, on macOS.- Compact island on screens without a notch (#22) — thanks @Kamasoutra- Only web links (http/https) open from the notch; other kinds of links from Claude or integrations are ignored (#16) — thanks @Cris1670- Hook socket limited to your own user account, with size and time limits; logs no longer keep commands, n8n data or full URLs, and stay under 1 MB (#16) — thanks @Cris1670 and @Vignesh-Thangamariappandiff --git a/CLAUDE.md b/CLAUDE.mdindex f180d842..64396a1e 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -1,9 +1,10 @@# Coucou — guide for AI coding agents-Coucou is a native macOS app: Mochi, a small animated character living in the MacBook notch, shows Claude Code sessions and a few integrations, and lets the user approve, answer, chat and drop files from the notch.+Coucou is a native macOS app: Mochi, a small animated character living in the MacBook notch, shows AI coding agent sessions (Claude Code, Gemini CLI, Antigravity and more) and a few integrations, and lets the user approve, answer, chat and drop files from the notch.## Where things are- `NotchBuddy/Sources/App/` — all Swift code. `NotchBuddy/Resources/sounds/` — the 28 WAV sounds. `NotchBuddy/project.yml` — XcodeGen project (never edit the `.xcodeproj` by hand).+- `NotchBuddy/Sources/App/PillCatalog.swift` — single source of truth for all declared pills (workspace tools, agents, AI providers, services). Every pill ID, color, category and subtitle lives here.- `docs/SPEC.md`, `docs/INTEGRATIONS.md` — behaviour, views, states, integrations (in French).- `design/prototype/notch-buddy.html` — original prototype, the visual source of truth. `design/captures/` — target screenshots.- `docs/*.html` — the GitHub Pages site (privacy, terms, support, legal notice).@@ -22,4 +23,6 @@ cd NotchBuddy && xcodegen && xcodebuild -scheme NotchBuddy -configuration Debug- Never send an email or approve a Claude Code permission without an explicit click.- Performance: 0 % CPU when the island is hidden.- Keep the bundle identifier `fr.louisraille.NotchBuddy` (Keychain items, preferences and permissions depend on it).-- Visual changes must match the prototype and the screenshots in `design/captures/`.+- Never restyle what already ships (pills, cards, Settings, chat…): existing views stay exactly as they are in `main`, which is the App Store build. Change the look of an existing view only when explicitly asked.+- Pill IDs are stable contract values (Keychain, UserDefaults, hook routing): never rename an existing pill ID.+- New views follow the existing app style. `design/prototype/notch-buddy.html` and `design/captures/` are references for new work, not a reason to change existing views.diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 3ade7f06..879ac24e 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -19,7 +19,8 @@ bash scripts/test-screen-geometry.sh## Good first contributions-- A new integration (a poller + a pill + a detail card). Look at `StripePoller.swift` for a compact example.+- A new service integration (a poller + an entry in `PillCatalog.swift` in the `.service` category + a detail card). Look at `StripePoller.swift` for a compact example.+- A new agent: any agent already gets its own automatic pill by sending `coucou_agent` in its hook payload (see `docs/AGENTS.md`). Add an entry in `PillCatalog.swift` in the `.agent` or `.workspace` category only if you want it to be declarable in Settings → Active pills.- A new emote or sound for Mochi.- Bug fixes — please describe how to reproduce.diff --git a/NotchBuddy/NotchBuddy.xcodeproj/project.pbxproj b/NotchBuddy/NotchBuddy.xcodeproj/project.pbxprojindex 67afeee4..4e580ceb 100644--- a/NotchBuddy/NotchBuddy.xcodeproj/project.pbxproj+++ b/NotchBuddy/NotchBuddy.xcodeproj/project.pbxproj@@ -58,11 +58,13 @@C940B651C6CA952D99388E04 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192844E7299DEED5C2372067 /* AppDelegate.swift */; };CA3321C14A11FED94E48B3E3 /* IslandRootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15A1A8206F73376F4CAF2057 /* IslandRootView.swift */; };CD8DECA66B9E09C97E469DB9 /* BotCanvasView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A29F4C0B02BE91654D02AA0C /* BotCanvasView.swift */; };+ D58B1E93AF65DE404C40E21E /* PillCatalog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B6A38B5686C4A1F15AB5D29 /* PillCatalog.swift */; };D82E93014C8087AE81511E40 /* IslandTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3CE3617E9D336DDBA10F7A /* IslandTypes.swift */; };DCAC390FF9EC65B945A15B24 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 506824380E9C80B9BC6DCE72 /* Assets.xcassets */; };DE05D09A32117582AC93A24A /* NotchBuddyApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1BD8F3CAA60CF37640759E1 /* NotchBuddyApp.swift */; };E4B9986674F4D425826F15A8 /* StripePoller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EF78999D68D56ADE4CEFBE2 /* StripePoller.swift */; };E776C7D1DE5C62EA8D4BA3E3 /* FileDropView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3232F258523DD8D09B670363 /* FileDropView.swift */; };+ E7A5D23F455565FE1E210398 /* PillCatalog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B6A38B5686C4A1F15AB5D29 /* PillCatalog.swift */; };EB23ED9F1C12EA8B54A76A91 /* ResendPoller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61B5FDDE03F5F711146937E2 /* ResendPoller.swift */; };ECECA2F225E82B7C951658D7 /* UploadSequenceEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD65943C32E150F1CD65C31 /* UploadSequenceEngine.swift */; };F06EE0A97CB77096A337AA8B /* sounds in Resources */ = {isa = PBXBuildFile; fileRef = C066E2B991AA4F56B2724263 /* sounds */; };@@ -78,6 +80,7 @@2EF78999D68D56ADE4CEFBE2 /* StripePoller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StripePoller.swift; sourceTree = "<group>"; };3104222B3F17BA5E8DEA5277 /* CalcomPoller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalcomPoller.swift; sourceTree = "<group>"; };3232F258523DD8D09B670363 /* FileDropView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileDropView.swift; sourceTree = "<group>"; };+ 3B6A38B5686C4A1F15AB5D29 /* PillCatalog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PillCatalog.swift; sourceTree = "<group>"; };4DC2A07E42245A8CF3BBD2AB /* CoucouAppStore.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CoucouAppStore.app; sourceTree = BUILT_PRODUCTS_DIR; };506824380E9C80B9BC6DCE72 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };61B5FDDE03F5F711146937E2 /* ResendPoller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResendPoller.swift; sourceTree = "<group>"; };@@ -131,6 +134,7 @@B89DA1A0C21AE3535A1760BB /* N8nPoller.swift */,F1BD8F3CAA60CF37640759E1 /* NotchBuddyApp.swift */,BE03E03D1804B0B92C5C2DAD /* NotionPoller.swift */,+ 3B6A38B5686C4A1F15AB5D29 /* PillCatalog.swift */,61B5FDDE03F5F711146937E2 /* ResendPoller.swift */,B2FDED98F7F6C755A72C97A3 /* SafeWebURL.swift */,7C1A7D5CBE2AC084A10C5FF3 /* SettingsView.swift */,@@ -302,6 +306,7 @@0A267EE2955C7AD8E02A296C /* N8nPoller.swift in Sources */,06BF5FD95E03010CAFDBF2D0 /* NotchBuddyApp.swift in Sources */,2F36E3C6C073E968A682AFA4 /* NotionPoller.swift in Sources */,+ D58B1E93AF65DE404C40E21E /* PillCatalog.swift in Sources */,967B525F7D3837F31D740D18 /* ResendPoller.swift in Sources */,6FC65C190ED614C664C9BC17 /* SafeWebURL.swift in Sources */,56BE8C733F10A030A638FB60 /* SettingsView.swift in Sources */,@@ -338,6 +343,7 @@160EDB9D06275E2607DA5151 /* N8nPoller.swift in Sources */,DE05D09A32117582AC93A24A /* NotchBuddyApp.swift in Sources */,78FCEDC8F78B683AB10E6529 /* NotionPoller.swift in Sources */,+ E7A5D23F455565FE1E210398 /* PillCatalog.swift in Sources */,EB23ED9F1C12EA8B54A76A91 /* ResendPoller.swift in Sources */,FEFEF1EBAB0E6CA74A33C10B /* SafeWebURL.swift in Sources */,8D1C01F283FA7806119A1C85 /* SettingsView.swift in Sources */,diff --git a/NotchBuddy/Sources/App/AppState.swift b/NotchBuddy/Sources/App/AppState.swiftindex 7ce7f890..3c1465c5 100644--- a/NotchBuddy/Sources/App/AppState.swift+++ b/NotchBuddy/Sources/App/AppState.swift@@ -2,27 +2,6 @@ import Foundationimport SwiftUIimport Combine-// Integration pills — always-present, never purged-extension AgentTask {- /// All available integration pills. Claude is always active; others are opt-in (max 4).- static let integrationAgents: [AgentTask] = [- AgentTask(id: "integration_claude", name: "VS Code", color: "#F5F6F8", state: .idle, steps: [], source: .claudeCode, isIntegration: true),- AgentTask(id: "integration_resend", name: "Resend", color: "#22C55E", state: .idle, steps: [], source: .n8n, isIntegration: true),- AgentTask(id: "integration_n8n", name: "n8n", color: "#F29B38", state: .idle, steps: [], source: .n8n, isIntegration: true),- AgentTask(id: "integration_vercel", name: "Vercel", color: "#7C5CFF", state: .idle, steps: [], source: .n8n, isIntegration: true),- AgentTask(id: "integration_github", name: "GitHub", color: "#F4505E", state: .idle, steps: [], source: .n8n, isIntegration: true),- AgentTask(id: "integration_notion", name: "Notion", color: "#8C8C8C", state: .idle, steps: [], source: .n8n, isIntegration: true),- AgentTask(id: "integration_calcom", name: "Cal.com", color: "#C9956A", state: .idle, steps: [], source: .n8n, isIntegration: true),- AgentTask(id: "integration_stripe", name: "Stripe", color: "#0570DE", state: .idle, steps: [], source: .n8n, isIntegration: true),- ]-- /// IDs that can be toggled (VS Code is always on and excluded from this list)- static let toggleableIntegrationIds: [String] = [- "integration_resend", "integration_n8n", "integration_vercel", "integration_github",- "integration_notion", "integration_calcom", "integration_stripe",- ]--}@MainActorfinal class AppState: ObservableObject {@@ -80,6 +59,79 @@ final class AppState: ObservableObject {didSet { UserDefaults.standard.set(claudeModel, forKey: "claudeModel") }}+ // In-chat provider + model — picked via the model selector in the prompt view+ @Published var chatProvider: ChatProvider = .anthropic {+ didSet { UserDefaults.standard.set(chatProvider.rawValue, forKey: "chatProvider") }+ }+ @Published var googleChatModel: String = ChatProvider.google.defaultModel {+ didSet { UserDefaults.standard.set(googleChatModel, forKey: "googleChatModel") }+ }+ @Published var openAIChatModel: String = ChatProvider.openai.defaultModel {+ didSet { UserDefaults.standard.set(openAIChatModel, forKey: "openAIChatModel") }+ }++ // The always-on workspace pill (default: VS Code). Persisted.+ @Published var mainPillId: String = PillCatalog.defaultMainPillId {+ didSet { UserDefaults.standard.set(mainPillId, forKey: "mainPill") }+ }++ // Dynamically fetched model lists for the in-chat picker (keyed by provider)+ @Published var fetchedProviderModels: [ChatProvider: [(id: String, label: String)]] = [:]+ @Published var providerModelFetchError: [ChatProvider: String] = [:]+ @Published var loadingProviderModels: Set<ChatProvider> = []++ /// Fetches models for `provider` if not already loaded or loading.+ /// Sets `providerModelFetchError` if the key is absent or the request fails.+ func fetchModelsIfNeeded(for provider: ChatProvider) {+ guard !loadingProviderModels.contains(provider),+ fetchedProviderModels[provider] == nil else { return }+ guard let apiKey = KeychainStore.shared.get(provider.keychainKey), !apiKey.isEmpty else {+ providerModelFetchError[provider] = "No API key — add it in Settings."+ return+ }+ loadingProviderModels.insert(provider)+ providerModelFetchError.removeValue(forKey: provider)+ Task {+ let models: [(id: String, label: String)]+ switch provider {+ case .anthropic: models = await ClaudeService.fetchModels(apiKey: apiKey)+ case .google: models = await ClaudeService.fetchGoogleModels(apiKey: apiKey)+ case .openai: models = await ClaudeService.fetchOpenAIModels(apiKey: apiKey)+ }+ loadingProviderModels.remove(provider)+ if models.isEmpty {+ providerModelFetchError[provider] = "Failed to load models. Check your API key."+ } else {+ fetchedProviderModels[provider] = models+ // If the saved model isn't in the fetched list, pick a sensible default:+ // prefer "sonnet" (Anthropic), "flash" (Google), "mini" (OpenAI); else first.+ switch provider {+ case .anthropic:+ if !models.contains(where: { $0.id == claudeModel }) {+ claudeModel = models.first(where: { $0.id.contains("sonnet") })?.id ?? models.first!.id+ }+ case .google:+ if !models.contains(where: { $0.id == googleChatModel }) {+ googleChatModel = models.first(where: { $0.id.contains("flash") })?.id ?? models.first!.id+ }+ case .openai:+ if !models.contains(where: { $0.id == openAIChatModel }) {+ openAIChatModel = models.first(where: { $0.id.contains("mini") })?.id ?? models.first!.id+ }+ }+ }+ }+ }++ /// The model currently active for chat (provider-aware).+ var activeChatModel: String {+ switch chatProvider {+ case .anthropic: return claudeModel+ case .google: return googleChatModel+ case .openai: return openAIChatModel+ }+ }+// Sound volume (0–0.2) — persisted, synced to SoundEngine@Published var soundVolume: Double = 0.12 {didSet {@@ -196,6 +248,9 @@ final class AppState: ObservableObject {if let v = ud.object(forKey: "soundVolume") as? Double { soundVolume = v }if let v = ud.string(forKey: "claudeModel"),!v.trimmingCharacters(in: .whitespaces).isEmpty { claudeModel = v }+ if let v = ud.string(forKey: "chatProvider"), let p = ChatProvider(rawValue: v) { chatProvider = p }+ if let v = ud.string(forKey: "googleChatModel"), !v.isEmpty { googleChatModel = v }+ if let v = ud.string(forKey: "openAIChatModel"), !v.isEmpty { openAIChatModel = v }// Migrate old 60s default → 15sif let v = ud.object(forKey: "autoCloseInterval") as? Double {autoCloseInterval = (v == 60) ? 15 : v@@ -211,6 +266,12 @@ final class AppState: ObservableObject {let a = try? JSONDecoder().decode([String].self, from: d) { n8nWorkflowFilter = Set(a) }if let d = ud.data(forKey: "activeIntegrations"),let a = try? JSONDecoder().decode([String].self, from: d) { activeIntegrations = Set(a) }+ if let v = ud.string(forKey: "mainPill"), !v.isEmpty,+ v == "integration_claude" ||+ (PillCatalog.available.contains(where: { $0.id == v && $0.category == .workspace })+ && activeIntegrations.contains(v)) {+ mainPillId = v+ }// Sync SoundEngine volume on launchSoundEngine.shared.volume = Float(soundVolume)@@ -240,8 +301,24 @@ final class AppState: ObservableObject {}func removeTask(id: String) {+ // integration_claude: ALWAYS reset, never remove (Claude Code sessions pass through it)+ // mainPillId: also always reset (the active workspace pill)+ let isProtected = id == "integration_claude" || id == mainPillId+ let isActiveDecl = PillCatalog.definition(for: id) != nil && activeIntegrations.contains(id)+ if isProtected || isActiveDecl {+ if let idx = tasks.firstIndex(where: { $0.id == id }) {+ let catalogName = PillCatalog.definition(for: id)?.name+ tasks[idx].state = .idle+ tasks[idx].steps = []+ tasks[idx].stepIndex = 0+ tasks[idx].pillBadge = nil+ if let n = catalogName { tasks[idx].name = n }+ }+ return+ }+ // Undeclared or declared-but-not-active: removetasks.removeAll { $0.id == id }- if focusId == id { focusId = tasks.first?.id }+ if focusId == id { focusId = mainPillId }syncMode()syncView()}@@ -272,36 +349,85 @@ final class AppState: ObservableObject {else if view == .overview && tasks.isEmpty { view = .empty }}- /// Load integration pills respecting activeIntegrations. VS Code always loads. Safe to call multiple times.+ /// Load catalog pills into tasks, respecting activeIntegrations. Safe to call multiple times.func loadIntegrationTasks() {- for task in AgentTask.integrationAgents {- let shouldLoad = task.id == "integration_claude" || activeIntegrations.contains(task.id)- let loaded = tasks.contains(where: { $0.id == task.id })- if shouldLoad && !loaded { tasks.append(task) }- if !shouldLoad && loaded { tasks.removeAll { $0.id == task.id } }+ let catalog = PillCatalog.available+ // Sanitize: remove saved IDs not in catalog+ let catalogIds = Set(catalog.map { $0.id })+ activeIntegrations = activeIntegrations.filter { catalogIds.contains($0) }+ // Validate mainPillId: must be integration_claude or a checked workspace pill+ if mainPillId != "integration_claude",+ !(PillCatalog.available.contains(where: { $0.id == mainPillId && $0.category == .workspace })+ && activeIntegrations.contains(mainPillId)) {+ mainPillId = "integration_claude"+ }+ for def in catalog {+ // integration_claude always loads; mainPillId always loads; activeIntegrations load+ let shouldLoad = def.id == "integration_claude"+ || def.id == mainPillId+ || activeIntegrations.contains(def.id)+ let loaded = tasks.contains(where: { $0.id == def.id })+ if shouldLoad && !loaded {+ let task = AgentTask(id: def.id, name: def.name, color: def.color,+ state: .idle, steps: [], source: def.source, isIntegration: true)+ tasks.append(task)+ }+ if !shouldLoad && loaded+ && def.id != "integration_claude" && def.id != mainPillId {+ tasks.removeAll { $0.id == def.id }+ }}- if focusId == nil { focusId = "integration_claude" }+ sortTasksByCatalog()+ if focusId == nil { focusId = mainPillId }syncMode()}- /// Toggle an integration pill on/off. VS Code cannot be toggled. Max 4 active at once.+ /// Toggle a catalog pill on/off.+ /// integration_claude: never toggleable.+ /// mainPillId (workspace): can be unchecked — resets mainPillId to integration_claude.+ /// Max 4 non-claude pills active at once.func toggleIntegration(_ id: String) {guard id != "integration_claude" else { return }+ guard PillCatalog.available.contains(where: { $0.id == id }) else { return }if activeIntegrations.contains(id) {activeIntegrations.remove(id)tasks.removeAll { $0.id == id }- if focusId == id { focusId = "integration_claude" }+ if mainPillId == id { mainPillId = "integration_claude" }+ if focusId == id { focusId = mainPillId }} else {guard activeIntegrations.count < 4 else { return }activeIntegrations.insert(id)- if let task = AgentTask.integrationAgents.first(where: { $0.id == id }),+ if let def = PillCatalog.available.first(where: { $0.id == id }),!tasks.contains(where: { $0.id == id }) {+ let task = AgentTask(id: def.id, name: def.name, color: def.color,+ state: .idle, steps: [], source: def.source, isIntegration: true)tasks.append(task)+ sortTasksByCatalog()}}syncMode()}+ /// Sort tasks so catalog pills are in catalog order, undeclared pills sit right after+ /// integration_claude (matching HookServer insertion behaviour), and the rest follows.+ private func sortTasksByCatalog() {+ let order = PillCatalog.available.enumerated()+ .reduce(into: [String: Int]()) { $0[$1.element.id] = $1.offset }+ let catalogPills = tasks.filter { order[$0.id] != nil }+ let undeclaredPills = tasks.filter { order[$0.id] == nil }+ let sortedCatalog = catalogPills.sorted { (order[$0.id] ?? 0) < (order[$1.id] ?? 0) }+ if let claudeIdx = sortedCatalog.firstIndex(where: { $0.id == "integration_claude" }) {+ var result: [AgentTask] = Array(sortedCatalog[...claudeIdx])+ result.append(contentsOf: undeclaredPills)+ if claudeIdx + 1 < sortedCatalog.count {+ result.append(contentsOf: sortedCatalog[(claudeIdx + 1)...])+ }+ tasks = result+ } else {+ tasks = undeclaredPills + sortedCatalog+ }+ }+}// MARK: - Supporting typesdiff --git a/NotchBuddy/Sources/App/ClaudeService.swift b/NotchBuddy/Sources/App/ClaudeService.swiftindex 06dc9a54..5144fc49 100644--- a/NotchBuddy/Sources/App/ClaudeService.swift+++ b/NotchBuddy/Sources/App/ClaudeService.swift@@ -62,6 +62,8 @@ final class KeychainStore: @unchecked Sendable {private static let allKeys = ["anthropic-api-key",+ "google-api-key",+ "openai-api-key","resend-api-key", "resend-from","n8n-url", "n8n-api-key","vercel-token",@@ -128,6 +130,51 @@ final class ClaudeService {return (id: id, label: name)}}++ /// Fetches Gemini models via the OpenAI-compatible endpoint.+ /// Strips the "models/" prefix that the API sometimes returns and filters non-chat models.+ static func fetchGoogleModels(apiKey: String) async -> [(id: String, label: String)] {+ guard let url = URL(string: "https://generativelanguage.googleapis.com/v1beta/openai/models") else { return [] }+ var req = URLRequest(url: url, timeoutInterval: 10)+ req.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")+ guard let (data, response) = try? await URLSession.shared.data(for: req),+ (response as? HTTPURLResponse)?.statusCode == 200,+ let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any],+ let items = json["data"] as? [[String: Any]] else { return [] }+ let excluded = ["embed", "imagen", "veo", "aqa", "tts", "audio", "live"]+ return items.compactMap { item in+ guard let raw = item["id"] as? String else { return nil }+ let id = raw.hasPrefix("models/") ? String(raw.dropFirst(7)) : raw+ let lower = id.lowercased()+ guard !excluded.contains(where: { lower.contains($0) }) else { return nil }+ return (id: id, label: id)+ }+ }++ /// Fetches chat models from the OpenAI API, sorted newest-first by creation date.+ /// Excludes non-chat model families.+ static func fetchOpenAIModels(apiKey: String) async -> [(id: String, label: String)] {+ guard let url = URL(string: "https://api.openai.com/v1/models") else { return [] }+ var req = URLRequest(url: url, timeoutInterval: 10)+ req.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")+ guard let (data, response) = try? await URLSession.shared.data(for: req),+ (response as? HTTPURLResponse)?.statusCode == 200,+ let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any],+ let items = json["data"] as? [[String: Any]] else { return [] }+ let excluded = ["embed", "tts", "whisper", "dall-e", "audio", "realtime", "moderat",+ "codex", "computer-use", "transcribe", "image", "sora",+ "babbage", "davinci", "instruct"]+ return items+ .compactMap { item -> (id: String, created: Int)? in+ guard let id = item["id"] as? String else { return nil }+ let lower = id.lowercased()+ guard !excluded.contains(where: { lower.contains($0) }) else { return nil }+ return (id: id, created: item["created"] as? Int ?? 0)+ }+ .sorted { $0.created > $1.created }+ .map { (id: $0.id, label: $0.id) }+ }+/// Chosen in Settings; falls back to the default when the field is left empty.private var model: String {let m = AppState.shared.claudeModel.trimmingCharacters(in: .whitespacesAndNewlines)@@ -157,6 +204,10 @@ final class ClaudeService {// MARK: - Chat (multi-turn, natural text + web search)func chat(query: String, context: PromptContext?, state: AppState) async {+ guard state.chatProvider == .anthropic else {+ await chatOpenAICompatible(query: query, context: context, state: state)+ return+ }guard let key = apiKey, !key.isEmpty else {await showError("API key missing. Open settings.", state: state)return@@ -200,6 +251,92 @@ final class ClaudeService {}}+ // MARK: - OpenAI-compatible chat (Google Gemini / OpenAI)++ func chatOpenAICompatible(query: String, context: PromptContext?, state: AppState) async {+ let provider = state.chatProvider+ guard provider != .anthropic else { return }+ guard let key = KeychainStore.shared.get(provider.keychainKey), !key.isEmpty else {+ await showError("\(provider.displayName) API key missing. Configure it in Settings.", state: state)+ return+ }++ let baseURL: String+ switch provider {+ case .google: baseURL = "https://generativelanguage.googleapis.com/v1beta/openai/chat/completions"+ case .openai: baseURL = "https://api.openai.com/v1/chat/completions"+ case .anthropic: return+ }+ guard let url = URL(string: baseURL) else { return }++ // Build messages: system + conversation history + new user turn+ var msgs: [[String: Any]] = [["role": "system", "content": systemPrompt]]+ for m in conversationMessages {+ // Remap Anthropic content arrays to plain strings for OpenAI compat+ var simplified = m+ if let content = m["content"] as? [[String: Any]],+ let textBlock = content.first(where: { ($0["type"] as? String) == "text" }),+ let text = textBlock["text"] as? String {+ simplified["content"] = text+ }+ msgs.append(simplified)+ }+ // Add user message (plain text for OpenAI compat)+ var userText = query+ if conversationMessages.isEmpty, let ctx = context {+ switch ctx {+ case .window(let app, let title, let url):+ var prefix = "Context — App: \(app), Window: \(title)"+ if let u = url { prefix += ", URL: \(u)" }+ userText = prefix + "\n\n" + query+ case .file(let name, _):+ userText = "File: \(name)\n\n" + query+ }+ }+ msgs.append(["role": "user", "content": userText])+ conversationMessages.append(["role": "user", "content": userText])++ let body: [String: Any] = [+ "model": state.activeChatModel,+ "max_tokens": 4096,+ "messages": msgs,+ ]++ var req = URLRequest(url: url, timeoutInterval: 30)+ req.httpMethod = "POST"+ req.setValue("application/json", forHTTPHeaderField: "Content-Type")+ req.setValue("Bearer \(key)", forHTTPHeaderField: "Authorization")+ req.httpBody = try? JSONSerialization.data(withJSONObject: body)++ do {+ let (data, response) = try await URLSession.shared.data(for: req)+ guard (response as? HTTPURLResponse)?.statusCode == 200 else {+ if let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any],+ let err = (json["error"] as? [String: Any])?["message"] as? String {+ throw NSError(domain: "ChatAPI", code: 0, userInfo: [NSLocalizedDescriptionKey: err])+ }+ throw NSError(domain: "ChatAPI", code: 0, userInfo: [NSLocalizedDescriptionKey: "HTTP \((response as? HTTPURLResponse)?.statusCode ?? 0)"])+ }+ guard let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any],+ let choices = json["choices"] as? [[String: Any]],+ let message = choices.first?["message"] as? [String: Any],+ let content = message["content"] as? String else {+ throw NSError(domain: "ChatAPI", code: 0, userInfo: [NSLocalizedDescriptionKey: "Unexpected response format"])+ }+ let trimmed = content.trimmingCharacters(in: .whitespacesAndNewlines)+ conversationMessages.append(["role": "assistant", "content": trimmed])+ await MainActor.run {+ state.chatHistory.append(ChatMessage(role: .assistant, content: trimmed))+ state.stateOverride = nil+ state.view = .prompt+ NotificationCenter.default.post(name: .triggerEmote, object: BotEmote.happy)+ }+ } catch {+ conversationMessages.removeLast()+ await showError(error.localizedDescription, state: state)+ }+ }+// MARK: - Structured search (M8 — window attach + web search)func search(query: String, context: PromptContext?, state: AppState) async {diff --git a/NotchBuddy/Sources/App/IslandRootView.swift b/NotchBuddy/Sources/App/IslandRootView.swiftindex bda8bfee..9eb8b69b 100644--- a/NotchBuddy/Sources/App/IslandRootView.swift+++ b/NotchBuddy/Sources/App/IslandRootView.swift@@ -444,7 +444,7 @@ struct IslandContentView: View {IslandViewContent(view: v, state: state).frame(maxWidth: .infinity).frame(height: isTall ? nil : 98)- .frame(maxHeight: isTall ? .infinity : nil)+ .frame(minHeight: (isTall && !active) ? 0 : nil, maxHeight: isTall ? .infinity : nil).opacity(active ? 1 : 0).scaleEffect(active ? 1 : 0.97).allowsHitTesting(active)diff --git a/NotchBuddy/Sources/App/IslandTypes.swift b/NotchBuddy/Sources/App/IslandTypes.swiftindex e8483848..5200af8e 100644--- a/NotchBuddy/Sources/App/IslandTypes.swift+++ b/NotchBuddy/Sources/App/IslandTypes.swift@@ -63,6 +63,46 @@ enum AgentSource: Equatable {case agent // third-party agent via coucou_agent field}+// MARK: - Chat provider++enum ChatProvider: String, CaseIterable, Codable {+ case anthropic = "anthropic"+ case google = "google"+ case openai = "openai"++ var displayName: String {+ switch self {+ case .anthropic: "Anthropic"+ case .google: "Google"+ case .openai: "OpenAI"+ }+ }++ var accentHex: String {+ switch self {+ case .anthropic: "#E07950"+ case .google: "#4285F4"+ case .openai: "#10A37F"+ }+ }++ var defaultModel: String {+ switch self {+ case .anthropic: "claude-sonnet-4-6"+ case .google: "gemini-2.0-flash"+ case .openai: "gpt-4o"+ }+ }++ var keychainKey: String {+ switch self {+ case .anthropic: "anthropic-api-key"+ case .google: "google-api-key"+ case .openai: "openai-api-key"+ }+ }+}+// MARK: - View dimensions (from VIEWS in prototype)struct ViewLayout {@@ -126,22 +166,6 @@ enum IslandConst {static let fallbackColors = ["#22C55E", "#EAB308", "#60A5FA", "#E879F9"]- // Available integration pills (matches AgentTask.integrationAgents)- struct IntegrationMeta {- let id: String- let name: String- let color: String- }- static let allIntegrations: [IntegrationMeta] = [- .init(id: "integration_resend", name: "Resend", color: "#22C55E"),- .init(id: "integration_n8n", name: "n8n", color: "#F29B38"),- .init(id: "integration_vercel", name: "Vercel", color: "#7C5CFF"),- .init(id: "integration_github", name: "GitHub", color: "#F4505E"),- .init(id: "integration_notion", name: "Notion", color: "#8C8C8C"),- .init(id: "integration_calcom", name: "Cal.com", color: "#C9956A"),- .init(id: "integration_stripe", name: "Stripe", color: "#0570DE"),- ]-/// Returns the fixed project color for a display name, or a stable fallback.static func colorForProject(_ name: String) -> String {let key = name.lowercased().trimmingCharacters(in: .whitespaces)diff --git a/NotchBuddy/Sources/App/IslandViewContent.swift b/NotchBuddy/Sources/App/IslandViewContent.swiftindex 778f1216..c0e1ec3c 100644--- a/NotchBuddy/Sources/App/IslandViewContent.swift+++ b/NotchBuddy/Sources/App/IslandViewContent.swift@@ -145,6 +145,36 @@ struct OverviewView: View {NSWorkspace.shared.open(URL(string: "https://notion.so")!)case "integration_calcom":NSWorkspace.shared.open(URL(string: "https://app.cal.com/bookings")!)+ case "agent_cursor":+ #if !APPSTORE+ if let url = NSWorkspace.shared.urlForApplication(+ withBundleIdentifier: "com.todesktop.230313mzl4w4u92") {+ NSWorkspace.shared.openApplication(at: url, configuration: .init(), completionHandler: nil)+ }+ #endif+ case "agent_codex":+ #if !APPSTORE+ if let url = NSWorkspace.shared.urlForApplication(+ withBundleIdentifier: "com.openai.codex") {+ NSWorkspace.shared.openApplication(at: url, configuration: .init(), completionHandler: nil)+ }+ #endif+ case "agent_gemini", "agent_antigravity":+ #if !APPSTORE+ let terminalBundleIds = ["com.apple.Terminal", "com.googlecode.iterm2",+ "net.kovidgoyal.kitty", "com.mitchellh.ghostty"]+ if let hit = terminalBundleIds.compactMap({ id in+ NSWorkspace.shared.runningApplications.first { $0.bundleIdentifier == id }+ }).first {+ hit.activate(options: .activateIgnoringOtherApps)+ }+ #endif+ case "ai_anthropic":+ switchChatProvider(.anthropic)+ case "ai_google":+ switchChatProvider(.google)+ case "ai_openai":+ switchChatProvider(.openai)default:// Non-integration real tasksif task.source == .n8n {@@ -717,6 +747,7 @@ struct PromptView: View {@ObservedObject var state: AppState@State private var text: String = ""@FocusState private var focused: Bool+ @State private var showModelPicker = falsevar body: some View {ZStack(alignment: .leading) {@@ -760,6 +791,37 @@ struct PromptView: View {Spacer()}+ HStack(spacing: 0) {+ Spacer()+ Button {+ withAnimation(.spring(response: 0.3, dampingFraction: 0.75)) {+ showModelPicker.toggle()+ }+ } label: {+ HStack(spacing: 5) {+ Circle()+ .fill(Color(hex: state.chatProvider.accentHex))+ .frame(width: 6, height: 6)+ Text(state.activeChatModel)+ .font(.system(size: 10.5, weight: .medium))+ .foregroundColor(Color(hex: "#7B8089"))+ Image(systemName: "chevron.up.chevron.down")+ .font(.system(size: 8))+ .foregroundColor(Color(hex: "#5C6370"))+ }+ .padding(.horizontal, 8)+ .padding(.vertical, 4)+ .background(Color.white.opacity(0.06))+ .clipShape(Capsule())+ }+ .buttonStyle(.plain)+ .popover(isPresented: $showModelPicker, arrowEdge: .bottom) {+ ModelPickerView(state: state, isPresented: $showModelPicker)+ .frame(width: 300)+ }+ }+ .padding(.horizontal, 10)+HStack(spacing: 8) {TextField(state.chatHistory.isEmpty ? "Ask me anything…" : "Continue…", text: $text).textFieldStyle(.plain)@@ -787,6 +849,16 @@ struct PromptView: View {}.padding(.bottom, 10).onAppear { focused = true }+ .onChange(of: state.view) { _, view in+ if view == .prompt {+ state.fetchModelsIfNeeded(for: state.chatProvider)+ }+ }+ .onChange(of: state.chatProvider) { _, provider in+ if state.view == .prompt {+ state.fetchModelsIfNeeded(for: provider)+ }+ }}private func sendMessage() {@@ -804,6 +876,119 @@ struct PromptView: View {}+// MARK: - Model / provider picker++struct ModelPickerView: View {+ @ObservedObject var state: AppState+ @Binding var isPresented: Bool++ var body: some View {+ VStack(alignment: .leading, spacing: 12) {+ // Provider chips+ HStack(spacing: 6) {+ ForEach(ChatProvider.allCases, id: \.self) { provider in+ Button {+ guard provider != state.chatProvider else { return }+ withAnimation(.spring(response: 0.25, dampingFraction: 0.7)) {+ state.chatProvider = provider+ }+ NotificationCenter.default.post(name: .triggerEmote, object: BotEmote.surprised)+ SoundEngine.shared.play("pop")+ } label: {+ HStack(spacing: 5) {+ Circle()+ .fill(Color(hex: provider.accentHex))+ .frame(width: 7, height: 7)+ Text(provider.displayName)+ .font(.system(size: 12, weight: state.chatProvider == provider ? .semibold : .regular))+ }+ .padding(.horizontal, 10)+ .padding(.vertical, 6)+ .background(state.chatProvider == provider+ ? Color(hex: provider.accentHex).opacity(0.18)+ : Color.white.opacity(0.06))+ .overlay(Capsule().stroke(+ state.chatProvider == provider+ ? Color(hex: provider.accentHex).opacity(0.5)+ : Color.white.opacity(0.1),+ lineWidth: 1))+ .clipShape(Capsule())+ }+ .buttonStyle(.plain)+ }+ }++ Divider().opacity(0.2)++ // Model list for current provider — fetched dynamically+ modelListView+ .frame(height: 260, alignment: .top)+ }+ .padding(14)+ .background(Color(hex: "#16171B"))+ .onAppear { state.fetchModelsIfNeeded(for: state.chatProvider) }+ .onChange(of: state.chatProvider) { _, provider in+ state.fetchModelsIfNeeded(for: provider)+ }+ }++ @ViewBuilder+ private var modelListView: some View {+ if state.loadingProviderModels.contains(state.chatProvider) {+ HStack(spacing: 8) {+ ProgressView().scaleEffect(0.7)+ Text("Loading models…")+ .font(.system(size: 12))+ .foregroundColor(Color(hex: "#8A8F98"))+ }+ .frame(maxWidth: .infinity, alignment: .leading)+ .padding(.vertical, 4)+ } else if let error = state.providerModelFetchError[state.chatProvider] {+ Text(error)+ .font(.system(size: 11))+ .foregroundColor(Color(hex: "#8A8F98"))+ .padding(.vertical, 4)+ } else if let models = state.fetchedProviderModels[state.chatProvider] {+ ScrollView {+ VStack(alignment: .leading, spacing: 2) {+ ForEach(models, id: \.id) { model in+ Button {+ switch state.chatProvider {+ case .anthropic: state.claudeModel = model.id+ case .google: state.googleChatModel = model.id+ case .openai: state.openAIChatModel = model.id+ }+ isPresented = false+ SoundEngine.shared.play("blip")+ } label: {+ HStack {+ Text(model.label)+ .font(.system(size: 12))+ .foregroundColor(state.activeChatModel == model.id+ ? Color(hex: state.chatProvider.accentHex)+ : Color(hex: "#C8CDD4"))+ Spacer()+ if state.activeChatModel == model.id {+ Image(systemName: "checkmark")+ .font(.system(size: 10, weight: .semibold))+ .foregroundColor(Color(hex: state.chatProvider.accentHex))+ }+ }+ .padding(.horizontal, 8)+ .padding(.vertical, 6)+ .background(state.activeChatModel == model.id+ ? Color(hex: state.chatProvider.accentHex).opacity(0.1)+ : Color.clear)+ .clipShape(RoundedRectangle(cornerRadius: 6))+ }+ .buttonStyle(.plain)+ }+ }+ }+ }+ }+}+struct ChatBubble: View {let message: ChatMessage@@ -978,6 +1163,23 @@ struct IntegrationCardView: View {return cmd?.contains("NotchBuddy") == true || cmd?.contains("coucou") == true} ?? false }#endif+ case "agent_gemini":+ #if !APPSTORE+ return HookServer.geminiHooksInstalled()+ #else+ return false+ #endif+ case "agent_antigravity":+ #if !APPSTORE+ return HookServer.agyHooksInstalled()+ #else+ return false+ #endif+ case "agent_cursor", "agent_codex":+ return false // coming soon+ case "ai_anthropic": return KeychainStore.shared.get("anthropic-api-key") != nil+ case "ai_google": return KeychainStore.shared.get("google-api-key") != nil+ case "ai_openai": return KeychainStore.shared.get("openai-api-key") != nilcase "integration_resend": return KeychainStore.shared.get("resend-api-key") != nilcase "integration_n8n": return KeychainStore.shared.get("n8n-api-key") != nilcase "integration_vercel": return KeychainStore.shared.get("vercel-token") != nil@@ -1005,9 +1207,11 @@ struct IntegrationCardView: View {}}- // VS Code with active session: show ticker layout (same as overview)- private var vsCodeSessionActive: Bool {- task.id == "integration_claude" && (task.state != .idle || !task.steps.isEmpty)+ // Workspace/agent pill with active session: show ticker layout+ private var agentSessionActive: Bool {+ guard let def = PillCatalog.definition(for: task.id) else { return false }+ guard def.category == .workspace || def.category == .agent else { return false }+ return task.state != .idle || !task.steps.isEmpty}// n8n with a finished execution: show result row instead of "Open n8n" button@@ -1046,6 +1250,38 @@ struct IntegrationCardView: View {task.id == "integration_notion" && appState.notionLoaded}+ private var statusDot: Color {+ if PillCatalog.definition(for: task.id)?.comingSoon == true { return Color(hex: "#6B7079") }+ let svcErr = task.id == "integration_stripe" ? appState.stripeError+ : task.id == "integration_calcom" ? appState.calcomError+ : nil+ if svcErr != nil { return Color(hex: "#F4505E") }+ return isConfigured ? Color(hex: "#22C55E") : Color(hex: "#F4505E")+ }++ private var statusLabel: String {+ if PillCatalog.definition(for: task.id)?.comingSoon == true { return "Coming soon" }+ let svcErr = task.id == "integration_stripe" ? appState.stripeError+ : task.id == "integration_calcom" ? appState.calcomError+ : nil+ if let err = svcErr { return err }+ let isHooks = task.id == "agent_gemini" || task.id == "agent_antigravity"+ let isAI = task.id == "ai_anthropic" || task.id == "ai_google" || task.id == "ai_openai"+ if isConfigured {+ if isHooks { return "Hooks installed" }+ if isAI {+ let model = task.id == "ai_anthropic" ? appState.claudeModel+ : task.id == "ai_google" ? appState.googleChatModel+ : appState.openAIChatModel+ return "Key configured · \(model)"+ }+ return "Connected · loading…"+ } else {+ if isHooks { return "Hooks not installed" }+ return "Key not configured"+ }+ }+var body: some View {if showingDetail && n8nHasActivity {N8nDetailView(task: task) {@@ -1077,7 +1313,7 @@ struct IntegrationCardView: View {} else if notionHasData {NotionCardView().transition(.opacity)- } else if vsCodeSessionActive {+ } else if agentSessionActive {// Active session view — reuse overview layoutVStack(alignment: .leading, spacing: 0) {HStack(spacing: 6) {@@ -1089,7 +1325,7 @@ struct IntegrationCardView: View {.foregroundColor(Color(hex: "#F5F6F8")).lineLimit(1).truncationMode(.tail).layoutPriority(1)- Text("Claude Code")+ Text(PillCatalog.definition(for: task.id)?.sessionSubtitle ?? "Agent").font(.system(size: 11)).foregroundColor(Color(hex: "#8E939C")).lineLimit(1).truncationMode(.tail)@@ -1120,10 +1356,10 @@ struct IntegrationCardView: View {Circle().fill(Color(hex: task.color)).frame(width: 7, height: 7)- Text(task.id == "integration_claude" ? "VS Code" : task.name)+ Text(PillCatalog.definition(for: task.id)?.name ?? task.name).font(.system(size: 12, weight: .semibold)).foregroundColor(Color(hex: "#F5F6F8"))- Text("Integration")+ Text(PillCatalog.definition(for: task.id)?.subtitle ?? "Integration").font(.system(size: 11)).foregroundColor(Color(hex: "#8E939C"))Spacer(minLength: 2)@@ -1133,15 +1369,8 @@ struct IntegrationCardView: View {.padding(.trailing, 36)HStack(spacing: 5) {- let stripeErr = task.id == "integration_stripe" ? appState.stripeError- : task.id == "integration_calcom" ? appState.calcomError- : nil- let dot = stripeErr != nil ? Color(hex: "#F4505E")- : isConfigured ? Color(hex: "#22C55E")- : Color(hex: "#F4505E")- let label = stripeErr ?? (isConfigured ? "Connected · loading…" : "Key not configured")- Circle().fill(dot).frame(width: 5, height: 5)- Text(label)+ Circle().fill(statusDot).frame(width: 5, height: 5)+ Text(statusLabel).font(.system(size: 11)).foregroundColor(Color(hex: "#6B7079"))}@@ -1154,6 +1383,43 @@ struct IntegrationCardView: View {.font(.system(size: 11, weight: .medium)).foregroundColor(Color(hex: task.color).opacity(0.7)).buttonStyle(.plain)+ } else if task.id == "agent_cursor" {+ #if !APPSTORE+ if let url = NSWorkspace.shared.urlForApplication(+ withBundleIdentifier: "com.todesktop.230313mzl4w4u92") {+ Button("Open Cursor") {+ NSWorkspace.shared.openApplication(at: url, configuration: .init(),+ completionHandler: nil)+ }+ .font(.system(size: 11, weight: .medium))+ .foregroundColor(Color(hex: task.color).opacity(0.85))+ .buttonStyle(.plain)+ }+ #endif+ } else if task.id == "agent_codex" {+ #if !APPSTORE+ if let url = NSWorkspace.shared.urlForApplication(+ withBundleIdentifier: "com.openai.codex") {+ Button("Open Codex") {+ NSWorkspace.shared.openApplication(at: url, configuration: .init(),+ completionHandler: nil)+ }+ .font(.system(size: 11, weight: .medium))+ .foregroundColor(Color(hex: task.color).opacity(0.85))+ .buttonStyle(.plain)+ }+ #endif+ } else if task.id == "ai_anthropic" || task.id == "ai_google" || task.id == "ai_openai" {+ if isConfigured {+ let provider: ChatProvider = task.id == "ai_anthropic" ? .anthropic+ : task.id == "ai_google" ? .google : .openai+ Button("Chat with \(task.name)") {+ switchChatProvider(provider)+ }+ .font(.system(size: 11, weight: .medium))+ .foregroundColor(Color(hex: task.color).opacity(0.85))+ .buttonStyle(.plain)+ }} else if n8nHasActivity {// Clickable pill — tap to open execution detaillet success = task.state == .finished@@ -1183,13 +1449,11 @@ struct IntegrationCardView: View {.foregroundColor(Color(hex: task.color).opacity(0.85)).buttonStyle(.plain)}- if task.id == "integration_stripe" {- if isConfigured {- Button("Refresh") { Task { @MainActor in StripePoller.shared.pollNow() } }- .font(.system(size: 11, weight: .medium))- .foregroundColor(Color(hex: "#0570DE").opacity(0.85))- .buttonStyle(.plain)- }+ if task.id == "integration_stripe" && isConfigured {+ Button("Refresh") { Task { @MainActor in StripePoller.shared.pollNow() } }+ .font(.system(size: 11, weight: .medium))+ .foregroundColor(Color(hex: "#0570DE").opacity(0.85))+ .buttonStyle(.plain)}if task.id == "integration_calcom" && isConfigured {Button("Refresh") { Task { @MainActor in CalcomPoller.shared.pollNow() } }@@ -1197,7 +1461,10 @@ struct IntegrationCardView: View {.foregroundColor(Color(hex: "#C9956A").opacity(0.85)).buttonStyle(.plain)}- if !isConfigured {+ // Settings button: shown when not configured, except cursor/codex (coming soon)+ if !isConfigured+ && task.id != "agent_cursor"+ && task.id != "agent_codex" {Button("Settings…") {NotificationCenter.default.post(name: .openFullSettings, object: nil)}@@ -1241,6 +1508,7 @@ struct IntegrationCardView: View {NSWorkspace.shared.openApplication(at: appURL, configuration: .init(), completionHandler: nil)}}+}// MARK: - Vercel Deployment List View@@ -2793,6 +3061,23 @@ struct StatusBadge: View {// MARK: - Color extension (lighten)+// MARK: - Chat-provider switch (used by AI pill buttons and ↗ action)++/// Mirrors ModelPickerView provider-chip tap: animates, fires surprised emote + "pop" sound,+/// then opens the chat view. No-op if provider is already selected (just opens chat).+@MainActor+func switchChatProvider(_ provider: ChatProvider) {+ let state = AppState.shared+ if provider != state.chatProvider {+ withAnimation(.spring(response: 0.25, dampingFraction: 0.7)) {+ state.chatProvider = provider+ }+ NotificationCenter.default.post(name: .triggerEmote, object: BotEmote.surprised)+ SoundEngine.shared.play("pop")+ }+ state.view = .prompt+}+extension Color {func lighter(by amount: Double) -> Color {guard let components = NSColor(self).usingColorSpace(.sRGB) else { return self }diff --git a/NotchBuddy/Sources/App/PillCatalog.swift b/NotchBuddy/Sources/App/PillCatalog.swiftnew file mode 100644index 00000000..6d9b1988--- /dev/null+++ b/NotchBuddy/Sources/App/PillCatalog.swift@@ -0,0 +1,97 @@+import Foundation++// MARK: - Pill category++enum PillCategory: String, CaseIterable {+ case workspace+ case agent+ case ai+ case service++ var title: String {+ switch self {+ case .workspace: return "Where you code"+ case .agent: return "Agents"+ case .ai: return "AI for the chat"+ case .service: return "Services"+ }+ }+}++// MARK: - Pill definition++struct PillDefinition {+ let id: String+ let name: String+ let color: String+ let category: PillCategory+ /// Label shown next to the task name in the idle card header.+ let subtitle: String+ let source: AgentSource+ var comingSoon: Bool = false+ var githubOnly: Bool = false++ /// Label shown in the active-session card header (workspace/agent pills only).+ var sessionSubtitle: String {+ id == "integration_claude" ? "Claude Code" : "Agent"+ }+}++// MARK: - Catalog++enum PillCatalog {+ // All declared pills in display order.+ static let all: [PillDefinition] = [+ // ── Where you code ───────────────────────────────────────────────────+ .init(id: "integration_claude", name: "VS Code", color: "#F5F6F8",+ category: .workspace, subtitle: "Integration", source: .claudeCode),+ .init(id: "agent_cursor", name: "Cursor", color: "#C0C4CC",+ category: .workspace, subtitle: "Integration", source: .agent, comingSoon: true),+ .init(id: "agent_codex", name: "Codex", color: "#2DD4BF",+ category: .workspace, subtitle: "Integration", source: .agent, comingSoon: true, githubOnly: true),+ // ── Agents ───────────────────────────────────────────────────────────+ .init(id: "agent_gemini", name: "Gemini CLI", color: "#8AB4F8",+ category: .agent, subtitle: "Agent", source: .agent, githubOnly: true),+ .init(id: "agent_antigravity", name: "Antigravity", color: "#E879F9",+ category: .agent, subtitle: "Agent", source: .agent, githubOnly: true),+ // ── AI for the chat ──────────────────────────────────────────────────+ .init(id: "ai_anthropic", name: "Anthropic", color: ChatProvider.anthropic.accentHex,+ category: .ai, subtitle: "Chat", source: .n8n),+ .init(id: "ai_google", name: "Google AI", color: ChatProvider.google.accentHex,+ category: .ai, subtitle: "Chat", source: .n8n),+ .init(id: "ai_openai", name: "OpenAI", color: ChatProvider.openai.accentHex,+ category: .ai, subtitle: "Chat", source: .n8n),+ // ── Services ─────────────────────────────────────────────────────────+ .init(id: "integration_resend", name: "Resend", color: "#22C55E",+ category: .service, subtitle: "Integration", source: .n8n),+ .init(id: "integration_n8n", name: "n8n", color: "#F29B38",+ category: .service, subtitle: "Integration", source: .n8n),+ .init(id: "integration_vercel", name: "Vercel", color: "#7C5CFF",+ category: .service, subtitle: "Integration", source: .n8n),+ .init(id: "integration_github", name: "GitHub", color: "#F4505E",+ category: .service, subtitle: "Integration", source: .n8n),+ .init(id: "integration_notion", name: "Notion", color: "#8C8C8C",+ category: .service, subtitle: "Integration", source: .n8n),+ .init(id: "integration_calcom", name: "Cal.com", color: "#C9956A",+ category: .service, subtitle: "Integration", source: .n8n),+ .init(id: "integration_stripe", name: "Stripe", color: "#0570DE",+ category: .service, subtitle: "Integration", source: .n8n),+ ]++ /// Pills available in the current build target.+ static var available: [PillDefinition] {+ #if APPSTORE+ all.filter { !$0.githubOnly }+ #else+ all+ #endif+ }++ /// Default ID for the always-on main workspace pill.+ static let defaultMainPillId = "integration_claude"++ /// Looks up a definition by task ID (nil if not in catalog).+ static func definition(for id: String) -> PillDefinition? {+ all.first { $0.id == id }+ }+}diff --git a/NotchBuddy/Sources/App/SettingsView.swift b/NotchBuddy/Sources/App/SettingsView.swiftindex ffb56180..f9ee07ee 100644--- a/NotchBuddy/Sources/App/SettingsView.swift+++ b/NotchBuddy/Sources/App/SettingsView.swift@@ -44,6 +44,10 @@ struct SettingsView: View {@State private var agyPendingInstall: Bool = true#endif+ // Multi-provider chat keys+ @State private var googleKey: String = KeychainStore.shared.get("google-api-key") ?? ""+ @State private var openAIKey: String = KeychainStore.shared.get("openai-api-key") ?? ""+// Integration keys@State private var resendKey: String = KeychainStore.shared.get("resend-api-key") ?? ""@State private var resendFrom: String = KeychainStore.shared.get("resend-from") ?? ""@@ -119,6 +123,41 @@ struct SettingsView: View {.padding(6)}+ GroupBox("Chat — other providers") {+ VStack(alignment: .leading, spacing: 12) {+ Text("To use Google Gemini or OpenAI from the chat. Keys are stored in the Keychain.")+ .font(.system(size: 12))+ .foregroundColor(.secondary)++ HStack(spacing: 8) {+ Circle().fill(Color(hex: "#4285F4")).frame(width: 8, height: 8)+ Text("Google AI").font(.system(size: 12, weight: .semibold))+ }+ SecureField("API key (AI Studio)", text: $googleKey)+ .textFieldStyle(.roundedBorder)+ Button("Save") {+ KeychainStore.shared.set("google-api-key", value: googleKey)+ statusMessage = "✓ Google key saved."+ }+ .buttonStyle(.borderedProminent)++ Divider()++ HStack(spacing: 8) {+ Circle().fill(Color(hex: "#10A37F")).frame(width: 8, height: 8)+ Text("OpenAI").font(.system(size: 12, weight: .semibold))+ }+ SecureField("API key (sk-…)", text: $openAIKey)+ .textFieldStyle(.roundedBorder)+ Button("Save") {+ KeychainStore.shared.set("openai-api-key", value: openAIKey)+ statusMessage = "✓ OpenAI key saved."+ }+ .buttonStyle(.borderedProminent)+ }+ .padding(.vertical, 4)+ }+// MARK: HooksGroupBox("Claude Code Hooks") {VStack(alignment: .leading, spacing: 10) {@@ -389,6 +428,7 @@ struct SettingsView: View {// MARK: Active pillsGroupBox("Active pills") {VStack(alignment: .leading, spacing: 10) {+ // VS Code: always active (mirrors main branch row exactly)HStack {Text("VS Code").font(.system(size: 12, weight: .semibold))@@ -401,28 +441,44 @@ struct SettingsView: View {Divider()+ Text("Choose the tools you use. Coucou only shows what you declare here.")+ .font(.system(size: 11))+ .foregroundColor(.secondary)+Text("\(state.activeIntegrations.count)/4 slots used").font(.system(size: 11)).foregroundColor(state.activeIntegrations.count >= 4 ? .orange : .secondary)- ForEach(AgentTask.toggleableIntegrationIds, id: \.self) { id in- let task = AgentTask.integrationAgents.first { $0.id == id }!- let isOn = state.activeIntegrations.contains(id)- let atMax = state.activeIntegrations.count >= 4 && !isOn- HStack(spacing: 8) {- Circle()- .fill(Color(hex: task.color))- .frame(width: 10, height: 10)- Text(task.name)- .font(.system(size: 12))- .foregroundColor(atMax ? .secondary : .primary)- Spacer()- Toggle("", isOn: Binding(- get: { isOn },- set: { _ in state.toggleIntegration(id) }- ))- .labelsHidden()- .disabled(atMax)+ // Main pill picker: shown only when a workspace pill (Cursor/Codex) is active+ let workspacePills = PillCatalog.available.filter {+ $0.category == .workspace && $0.id != "integration_claude"+ && state.activeIntegrations.contains($0.id)+ }+ if !workspacePills.isEmpty {+ Picker("Main pill", selection: $state.mainPillId) {+ Text("VS Code").tag("integration_claude")+ ForEach(workspacePills, id: \.id) { def in+ Text(def.name).tag(def.id)+ }+ }+ .onChange(of: state.mainPillId) { _, newId in+ state.setFocus(newId)+ }+ }++ // Categories — integration_claude excluded (shown above)+ ForEach(PillCategory.allCases, id: \.self) { cat in+ let catPills = PillCatalog.available.filter {+ $0.category == cat && $0.id != "integration_claude"+ }+ if !catPills.isEmpty {+ Divider()+ Text(cat.title)+ .font(.system(size: 11, weight: .semibold))+ .foregroundColor(.secondary)+ ForEach(catPills, id: \.id) { def in+ pillRow(def)+ }}}}@@ -737,6 +793,46 @@ struct SettingsView: View {}}.resume()}++ @ViewBuilder+ private func pillRow(_ def: PillDefinition) -> some View {+ let isOn = state.activeIntegrations.contains(def.id)+ let atMax = state.activeIntegrations.count >= 4 && !isOn+ // Status hint: shown in 11pt gray before the toggle+ let hint: String? = {+ if def.comingSoon { return "Coming soon" }+ #if !APPSTORE+ if def.id == "agent_gemini" && !HookServer.geminiHooksInstalled() { return "Hooks not installed" }+ if def.id == "agent_antigravity" && !HookServer.agyHooksInstalled() { return "Hooks not installed" }+ #endif+ if def.category == .ai {+ let keyId = def.id == "ai_anthropic" ? "anthropic-api-key"+ : def.id == "ai_google" ? "google-api-key" : "openai-api-key"+ if KeychainStore.shared.get(keyId) == nil { return "Key not configured" }+ }+ return nil+ }()+ HStack(spacing: 8) {+ Circle()+ .fill(Color(hex: def.color))+ .frame(width: 10, height: 10)+ Text(def.name)+ .font(.system(size: 12))+ .foregroundColor(atMax ? .secondary : .primary)+ Spacer()+ if let h = hint {+ Text(h)+ .font(.system(size: 11))+ .foregroundColor(.secondary)+ }+ Toggle("", isOn: Binding(+ get: { isOn },+ set: { _ in state.toggleIntegration(def.id) }+ ))+ .labelsHidden()+ .disabled(atMax)+ }+ }}// MARK: - Integration filter row (reusable for Vercel / n8n)diff --git a/README.md b/README.mdindex c153137e..cf83dd40 100644--- a/README.md+++ b/README.md@@ -4,7 +4,7 @@# Coucou-**A tiny friend that lives in your Mac's notch — or at the top of your screen on Windows — and keeps an eye on your Claude Code sessions.**+**A tiny friend that lives in your Mac's notch — or at the top of your screen on Windows — and keeps an eye on your AI coding agent sessions.**Approve permissions, watch your agents work, drop a file, chat with Claude — all without leaving what you're doing.@@ -31,10 +31,11 @@ Meet **Mochi**: a soft little squircle with big eyes that pops out of your notch## Features-- 🤖 **Claude Code, Gemini CLI, Antigravity and other agents, live** — see every session in your notch: what it reads, edits and runs, step by step. Tag a hook payload with `coucou_agent` to give any agent its own pill (see [`docs/AGENTS.md`](docs/AGENTS.md)). Finished? Mochi does a happy little jump.+- 🤖 **Claude Code, Gemini CLI, Antigravity and other agents, live** — see every session in your notch: what it reads, edits and runs, step by step. Tag a hook payload with `coucou_agent` to give any agent its own pill (see [`docs/AGENTS.md`](docs/AGENTS.md)). Finished? Mochi does a happy little jump. Cursor and Codex pills are coming soon.- ✅ **Approve from the notch** — Claude Code permission requests show up with **Allow / Deny**. One click, back to work.- 🧑💻 **Jump to the right terminal** — open the exact terminal window of a session *(macOS)*.-- 💬 **Ask Claude anything** — built-in chat, straight from the notch. Pick the model in Settings; the list comes from your Anthropic account.+- 💬 **Chat with Claude, or with Gemini and OpenAI models using your own keys** *(Gemini and OpenAI: macOS)* — click the model name above the chat box to switch provider and pick a model; the list comes from each API account.+- 📋 **Declare the tools you use** — open Settings → Active pills and choose which coding tools, agents and AI providers show up in the island. VS Code is always there; toggle Gemini CLI, Antigravity, Anthropic, Google AI, OpenAI and more. Check Cursor or Codex and you can make it your main pill, the one in the big card *(macOS)*.- 📎 **Drop a file on the notch** — Mochi turns into a box and swallows it, then ask a question about it or send it by email *(email: macOS, Mail.app)*.- 🪟 **Drag Mochi onto any window** — attach that window as context for Claude *(macOS)*.- 🔌 **Integrations** — Stripe payments, n8n workflows, GitHub, Vercel deployments, Resend emails, Notion, Cal.com. Each one gets its own little colored Mochi.@@ -103,8 +104,11 @@ Click the Coucou icon in the menu bar (macOS) or in the system tray (Windows)| **Claude Code hooks** | live sessions and approvals | **Install hooks** — Coucou backs up `~/.claude/settings.json`, merges its hooks and shows you the diff before writing anything || **Gemini CLI hooks** *(macOS)* | Gemini CLI sessions in the island | **Install hooks** in Settings → Gemini CLI — backs up `~/.gemini/settings.json` || **Antigravity (agy) hooks** *(macOS)* | agy sessions in the island | **Install hooks** in Settings → Antigravity — backs up `~/.gemini/config/hooks.json` |-| **Anthropic API key** | chat and questions about files | Keychain / Windows Credential Manager |-| Stripe, n8n, GitHub, Vercel, Resend, Notion, Cal.com | the integration pills | Keychain / Windows Credential Manager, all optional |+| **Anthropic API key** | chat and questions about files | Settings → Anthropic API · Keychain / Windows Credential Manager |+| **Google AI API key** *(macOS)* | chat with Google AI (Gemini) | Settings → Chat — other providers · Keychain |+| **OpenAI API key** *(macOS)* | chat with OpenAI | Settings → Chat — other providers · Keychain |+| **Active pills** *(macOS)* | choose which tools and agents appear in the island | Settings → Active pills |+| Stripe, n8n, GitHub, Vercel, Resend, Notion, Cal.com | the service pills | Keychain / Windows Credential Manager, all optional |If Coucou isn't running, the hook exits immediately: **Claude Code is never blocked.**@@ -119,6 +123,7 @@ If Coucou isn't running, the hook exits immediately: **Claude Code is never bloc| Click 3 times fast | 😵💫 dizzy for a few seconds || Drag a file onto the island | turns into a box and swallows it || Drag Mochi onto a window *(macOS)* | attaches it as context |+| Click the model name above the chat box *(macOS)* | switch AI provider or model |## How it works@@ -128,6 +133,7 @@ If Coucou isn't running, the hook exits immediately: **Claude Code is never bloc- **Character**: drawn in SwiftUI `Canvas` + `TimelineView` at 60 fps — squircle body, eyes projected on a sphere, spring animations. No Rive, no Lottie, no images.- **Claude Code**: a tiny `nb-hook` script receives hook events and forwards them over a Unix socket to the app. For approvals it waits for your click, then answers the hook.- **Integrations**: lightweight pollers, paused when nothing is watching.+- **Declared pills**: `PillCatalog.swift` is the single source of truth — every pill (coding tools, agents, AI providers, services) is declared there with its ID, color and category.- **Sounds**: 28 short WAVs played through preloaded `AVAudioPlayer`s.The macOS app is native Swift 6 / SwiftUI / AppKit with **zero third-party dependencies**.diff --git a/docs/AGENTS.md b/docs/AGENTS.mdindex bb2cda22..cf1ff6fe 100644--- a/docs/AGENTS.md+++ b/docs/AGENTS.md@@ -73,11 +73,19 @@ The pill lifecycle:| `PreToolUse` | State → working; tool label shown in ticker || `PostToolUse` / `PostToolUseFailure` | State → working || `Notification` | Rate-limit or question state if applicable |-| `Stop` | State → finished for 5 s, then pill removed |+| `Stop` | State → finished for 5 s; active declared pills (catalog + checked in Settings) reset to idle — all others are removed || `StopFailure` | State → error |-| `SessionEnd` | Pill removed |+| `SessionEnd` | Active declared pills (catalog + checked in Settings) reset to idle — all others are removed || `SubagentStart` / `SubagentStop` | Step added to ticker |+## Declared pills++A **declared pill** is a catalog entry (`PillCatalog.swift`) that has been enabled in **Settings → Active pills**. When a session ends for a declared pill, the pill stays visible and resets to idle instead of disappearing.++A catalog pill that is not checked in Settings behaves like any other agent: it gets an automatic pill when a session starts, and that pill is removed when the session ends.++The GitHub build exposes Gemini CLI (`agent_gemini`) and Antigravity (`agent_antigravity`) in Settings → Active pills. Cursor (`agent_cursor`) and Codex (`agent_codex`, GitHub build only) are there too — their pills can be declared and set as the main pill; session support is coming in a future version.+## Real-world examples### Gemini CLI (macOS)diff --git a/docs/INTEGRATIONS.md b/docs/INTEGRATIONS.mdindex 715a825f..c494c2f5 100644--- a/docs/INTEGRATIONS.md+++ b/docs/INTEGRATIONS.md@@ -16,7 +16,7 @@ claude (terminal, VS Code, app Claude)└─ socket Unix ─► Notch Buddy.app◄─ décision (pour PermissionRequest)```-- `nb-hook` : cible séparée dans le projet, copiée dans `~/Library/Application Support/NotchBuddy/bin/nb-hook` au premier lancement.+- `nb-hook` (script shell) et `nb-hook.py` (relais Python) : écrits par l'app (`HookServer.swift`). Version GitHub : au lancement, dans `~/Library/Application Support/NotchBuddy/`. Version App Store : à l'installation des hooks, dans `~/.claude/coucou/`. Voir `docs/AGENTS.md` pour les autres agents qui utilisent ces scripts.- Socket : `~/Library/Application Support/NotchBuddy/nb.sock` (version GitHub) ou `~/Library/Containers/fr.louisraille.Coucou/Data/nb.sock` (version App Store). Dossier en 0700, socket en 0600. Connexions du même utilisateur seulement (vérification `getpeereid`). 1 Mio et 5 s maximum par message, 32 connexions simultanées.- `nb-hook [--agent <nom>] <Event>` lit le JSON du hook sur stdin, ajoute le contexte du terminal (`TERM_PROGRAM`, `ITERM_SESSION_ID`, `TERM_SESSION_ID`, `__CFBundleIdentifier`, le tty trouvé en remontant les processus parents, `cwd`) et, si `--agent` est fourni, le champ `coucou_agent`, puis l'envoie à l'app.- **Si l'app ne répond pas en 300 ms, `nb-hook` sort en code 0 sans rien écrire** : Claude Code continue normalement. Jamais de blocage.@@ -112,7 +112,7 @@ Permissions : Enregistrement de l'écran (capture) et Automatisation (navigateur## 5. API Claude (recherche)- `POST https://api.anthropic.com/v1/messages`, en-têtes `x-api-key`, `anthropic-version`, `content-type: application/json` (versions à vérifier dans la doc).-- Modèle par défaut : `claude-sonnet-4-6`, choisi dans Settings → Anthropic API. La liste est récupérée au chargement des réglages via `GET /v1/models?limit=100` (en-têtes `x-api-key` et `anthropic-version: 2023-06-01`) ; si l'appel échoue ou qu'il n'y a pas de clé, une liste de secours est utilisée (`claude-sonnet-4-6`, `claude-sonnet-5-5`, `claude-opus-5-5`, `claude-haiku-4-5-20251001`). Un champ libre permet d'entrer n'importe quel identifiant. Si le modèle sauvegardé n'est pas dans la liste, le sélecteur reste sur « Custom… ».+- Modèle par défaut : `claude-sonnet-4-6`, choisi dans Settings → Anthropic API **ou depuis la puce de modèle dans la vue `.prompt`**. La liste est récupérée à l'ouverture des réglages via `GET /v1/models?limit=100` (en-têtes `x-api-key` et `anthropic-version: 2023-06-01`) ; si l'appel échoue ou qu'il n'y a pas de clé, une liste de secours est utilisée (`claude-sonnet-4-6`, `claude-sonnet-5-5`, `claude-opus-5-5`, `claude-haiku-4-5-20251001`). Un champ libre permet d'entrer n'importe quel identifiant. Si le modèle sauvegardé n'est pas dans la liste, le sélecteur reste sur « Custom… ». Dans le chat, si le modèle enregistré n'est pas dans la liste reçue, le premier dont l'identifiant contient « sonnet », sinon le premier de la liste.- Erreurs de l'API : affiche `error.message` au lieu du JSON brut. Pour un `not_found_error`, affiche « Model not found: \<id\>. Pick another one in Settings. »- Outil de recherche web côté serveur de l'API : l'identifiant de type à jour est dans la doc (au moment d'écrire, `web_search_20250305`) ; `max_uses` 5.- Prompt système (français) : répondre court, pour un affichage dans le notch, au format JSON strict :@@ -128,6 +128,19 @@ Permissions : Enregistrement de l'écran (capture) et Automatisation (navigateur---+## 5bis. Autres fournisseurs du chat (Google AI, OpenAI)++Clés dans Settings → Chat — other providers (Trousseau : `google-api-key`, `openai-api-key`). La liste des modèles est récupérée à l'ouverture du chat selon le fournisseur :++- **Google AI (Gemini)** : `GET https://generativelanguage.googleapis.com/v1beta/openai/models` (en-tête `Authorization: Bearer <clé>`) — on retire le préfixe `models/`, on filtre les modèles dont l'identifiant contient `embed`, `imagen`, `veo`, `aqa`, `tts`, `audio` ou `live`. Dans le chat, si le modèle enregistré n'est pas dans la liste reçue, le premier dont l'identifiant contient « flash », sinon le premier de la liste. Endpoint du chat : `POST https://generativelanguage.googleapis.com/v1beta/openai/chat/completions`.+- **OpenAI** : `GET https://api.openai.com/v1/models` (en-tête `Authorization: Bearer <clé>`) — triés par champ `created` décroissant, on filtre les modèles dont l'identifiant contient `embed`, `tts`, `whisper`, `dall-e`, `audio`, `realtime`, `moderat`, `codex`, `computer-use`, `transcribe`, `image`, `sora`, `babbage`, `davinci` ou `instruct`. Dans le chat, si le modèle enregistré n'est pas dans la liste reçue, le premier dont l'identifiant contient « mini », sinon le premier de la liste. Endpoint du chat : `POST https://api.openai.com/v1/chat/completions`.++Ce qui est envoyé au fournisseur lors d'un échange : le texte saisi et la conversation en cours. Si une fenêtre est attachée : nom de l'app, titre et URL. Si un fichier est attaché : son nom seulement (le contenu d'un fichier ne part que chez Anthropic).++Voir le catalogue de pastilles dans `docs/SPEC.md` (section « Catalogue de pastilles ») pour les pastilles `ai_google` et `ai_openai`.++---+## 6. Mail (app Mail du Mac)- Vue `mail` : À (obligatoire, validation d'adresse), Objet (prérempli : nom du fichier), Message (optionnel, une ligne).diff --git a/docs/SPEC.md b/docs/SPEC.mdindex 8dca0adf..0621552e 100644--- a/docs/SPEC.md+++ b/docs/SPEC.md@@ -75,7 +75,7 @@ rouge `rgba(244,80,94,.55)`, vert `rgba(52,211,153,.5)`, rose `rgba(244,114,182,| `uploading` | 150 | sur la barre, Ø 28 | « Envoi de fichier » + %, barre verte, le bonhomme est le curseur de la barre | 10 || `choose` | 170 | 60, 52 | « fichier est prêt. », Poser une question dessus, Envoyer par mail | 11 || `mail` | 210 | 56, 46 | champs À, Objet (+ Message optionnel), Envoyer, Annuler | 12 |-| `prompt` | 156 | 52, 44 | pastille de contexte + champ + micro + envoyer | 13 |+| `prompt` | 156 | 52, 44 | pastille de contexte + puce de modèle (clic → sélecteur fournisseur/modèle) + champ + micro + envoyer | 13 || `searching` | 156 | 52, 44 | contexte + texte scintillant « Claude lit la page et cherche sur le web… » | 14 || `result` | 262 (s'adapte au contenu, max 320) | 52, 44 | titre, 3 lignes de résultat, boutons | 15 || `note` | 136 | 60, 50 | message court (mail envoyé, copié, j'ouvre n8n…), se ferme seul après 2 s | — |@@ -91,6 +91,28 @@ Centre vertical du bonhomme : 36 + (hauteur − 46) / 2, sauf `result` (y = 86).### Pastilles (overview)- 132 × 34, rayon 17, fond couleur de l'agent à 13 %, bord à 32 %, mini-bonhomme Ø 24 centré à 17 pt du bord gauche, libellé 12 pt couleur de l'agent éclaircie de 25 %. Deux colonnes, écart 8, centrées verticalement dans la carte droite (qui commence à x = 342).+### Catalogue de pastilles+Toutes les pastilles déclarées sont définies dans `PillCatalog.all` (source de vérité unique). Quatre catégories :++| Catégorie | Titre | Pastilles | Subtitle (repos) | Subtitle (session) |+|---|---|---|---|---|+| `workspace` | Where you code | VS Code, Cursor *(coming soon)*, Codex *(coming soon, GitHub only)* | Integration | Claude Code / Agent |+| `agent` | Agents | Gemini CLI *(GitHub only)*, Antigravity *(GitHub only)* | Agent | Agent |+| `ai` | AI for the chat | Anthropic, Google AI, OpenAI | Chat | — |+| `service` | Services | Resend, n8n, Vercel, GitHub, Notion, Cal.com, Stripe | Integration | — |++Couleurs : Cursor `#C0C4CC`, Codex `#2DD4BF`, Gemini CLI `#8AB4F8`, Antigravity `#E879F9`, pastilles IA = `ChatProvider.accentHex`.++Règles :+- **`integration_claude` est toujours chargée, jamais retirée, jamais décochée.** Elle ne compte pas dans les 4 places.+- `mainPillId` (défaut `integration_claude`) peut valoir une pastille workspace cochée (ex. Cursor). Si on décoche la principale, `mainPillId` revient à `integration_claude`.+- Max 4 pastilles autres qu'`integration_claude` actives à la fois (`activeIntegrations`, persisté). Cursor/Codex comptent dans les 4.+- `removeTask` sur `integration_claude` ou `mainPillId` ou une pastille déclarée + active → reset à `.idle` + `pillBadge = nil` + nom du catalogue (pas de suppression). Sinon → suppression normale.+- `sortTasksByCatalog` : pastilles du catalogue dans l'ordre du catalogue ; pastilles hors catalogue juste après `integration_claude`.+- Pastilles `githubOnly` : exclues des builds App Store (`#if APPSTORE`).+- Hooks (Gemini CLI, Antigravity) : `isConfigured` = `HookServer.geminiHooksInstalled()` / `agyHooksInstalled()` sous `#if !APPSTORE`.+- Pastilles IA : `isConfigured` = clé API dans le Keychain. Bouton « Chat with… » → change le fournisseur et ouvre la vue `.prompt`.+### Boutons- Pilule, 12,5 pt medium, fond blanc 9 % (survol 15 %), primaire : fond `#F5F6F8` texte `#0B0C0E`. Appui : échelle 0,94. Raccourcis affichés en petite pastille bordée (Y, N).@@ -185,13 +207,18 @@ Pas de son pour les mises à jour silencieuses (défilé de tâches, mini-bonhomPetit item dans la barre de menus (icône : silhouette du Mochi, monochrome). Menu : Ouvrir le notch, Lancer la démo (⌃⌥⌘D), Réglages…, Debug ▸ (forcer chaque vue, chaque état, chaque émote, ajouter des tâches factices), Quitter.-Fenêtre Réglages (SwiftUI, simple) :-- Clé API Anthropic (Trousseau), modèle (par défaut voir INTEGRATIONS §5).-- n8n : URL de l'instance, clé API (Trousseau), intervalle de polling, workflows suivis (tous par défaut).-- Claude Code : état des hooks (installés / non), bouton Installer / Désinstaller, délai d'attente d'une décision (défaut 110 s).-- Son on/off, volume. Fermeture auto (défaut 60 s). Délai d'absence (défaut 3 min).-- Lancer au démarrage (`SMAppService.mainApp`).-- Alias de noms de projets et couleurs.+Fenêtre Réglages (SwiftUI, simple), sections dans l'ordre d'affichage :+- **Anthropic API** : clé (Trousseau), modèle (défaut `claude-sonnet-4-6` ; liste depuis l'API, voir INTEGRATIONS §5).+- **Chat — other providers** : clé Google AI (Trousseau) ; clé OpenAI (Trousseau). Les modèles se choisissent dans le chat (voir INTEGRATIONS §5bis).+- **Claude Code Hooks** : état des hooks, bouton Installer / Désinstaller.+- **Gemini CLI Hooks** *(build GitHub)* : état des hooks, bouton Installer / Désinstaller.+- **Antigravity Hooks** *(build GitHub)* : état des hooks, bouton Installer / Désinstaller.+- **Integrations** : clé ou token (Trousseau) pour chaque service (n8n, Stripe, GitHub, Vercel, Resend, Notion, Cal.com).+- **Sound** : son on/off, volume.+- **Behavior** : fermeture après N s d'inactivité ; masquage après N min sans mouvement.+- **Active pills** : pastilles actives (VS Code toujours actif + jusqu'à 4 autres) ; sélecteur de pastille principale (affiché uniquement si une pastille workspace est active) ; liste par catégorie (voir catalogue §5).+- **Hotkey** : raccourci global pour ouvrir le notch.+- **Startup** : lancer au démarrage (`SMAppService.mainApp`).## 11. Jalonsdiff --git a/docs/index.html b/docs/index.htmlindex eb310fdf..69673b2e 100644--- a/docs/index.html+++ b/docs/index.html@@ -4,7 +4,7 @@<nav><a href="index.html" class="on">Home</a><a href="support.html">Support</a><a href="privacy.html">Privacy</a><a href="terms.html">Terms</a><a href="legal.html">Legal</a></nav></header><div class="hero"><h1>A tiny friend that lives in your notch</h1>-<p class="meta" style="font-size:17px">Coucou watches your Claude Code sessions, lets you approve its requests from the notch, and keeps an eye on Stripe, GitHub, Vercel, n8n and more. Free and open source.</p>+<p class="meta" style="font-size:17px">Coucou watches your AI coding agents — Claude Code, Gemini CLI, Antigravity and more — lets you approve Claude Code's requests from the notch, chat with Anthropic, Google AI or OpenAI, and keeps an eye on Stripe, GitHub, Vercel, n8n and more. Free and open source.</p><a class="btn" href="https://github.com/Louis-CFM/coucou/releases/latest">Download for Mac</a><a class="btn ghost" href="https://github.com/Louis-CFM/coucou">View on GitHub</a><img class="demo" src="media/demo.gif" alt="Coucou in action"></div>diff --git a/docs/privacy.html b/docs/privacy.htmlindex 257e8a49..66ec45e9 100644--- a/docs/privacy.html+++ b/docs/privacy.html@@ -5,7 +5,7 @@<div class="lang"><a href="#en">English</a><a href="#fr">Français</a></div><section id="en"><h1>Privacy Policy</h1>-<div class="meta">Last updated: September 30, 2026</div>+<div class="meta">Last updated: October 2, 2026</div><div class="card"><b>In short:</b> Coucou has no account, no analytics, no ads and no tracking. The developer receives none of your data. Everything stays on your computer (Mac or PC), except what you choose to send to the services you connect yourself.</div><h2>1. Who is responsible</h2>@@ -17,8 +17,8 @@<h2>3. Data stored on your computer</h2><table><tr><th>What</th><th>Where</th><th>Why</th></tr>-<tr><td>API keys and tokens you enter (Anthropic, Stripe, GitHub, Vercel, Resend, Notion, Cal.com, n8n)</td><td>macOS Keychain, or Windows Credential Manager</td><td>To call these services on your behalf</td></tr>-<tr><td>Preferences (sound, delays, active integrations, shortcut)</td><td>App preferences on your Mac, or <code>%APPDATA%\Coucou</code> on Windows</td><td>To remember your settings</td></tr>+<tr><td>API keys and tokens you enter (Anthropic, Google AI, OpenAI, Stripe, GitHub, Vercel, Resend, Notion, Cal.com, n8n)</td><td>macOS Keychain, or Windows Credential Manager</td><td>To call these services on your behalf</td></tr>+<tr><td>Preferences (sound, delays, active pill selection, chat provider and model, shortcut)</td><td>App preferences on your Mac, or <code>%APPDATA%\Coucou</code> on Windows</td><td>To remember your settings</td></tr><tr><td>Files you drop on the notch</td><td>A copy in the app’s own folder (on Windows: <code>%LOCALAPPDATA%\Coucou</code>)</td><td>So you can ask a question about them or attach them to an email</td></tr><tr><td>Claude Code session events (project name, current step, permission requests)</td><td>In memory only</td><td>To show them in the notch</td></tr><tr><td>Diagnostic log (event and tool names, project names, HTTP status codes — no commands, content or API keys)</td><td><code>~/Library/Logs/NotchBuddy</code> on Mac (App Store: same path inside the container); <code>%LOCALAPPDATA%\Coucou\coucou.log</code> on Windows. Capped at 1 MB. Never leaves your computer.</td><td>To help diagnose connection issues between Claude Code and Coucou</td></tr>@@ -28,13 +28,15 @@<h2>4. Services you connect yourself</h2><p>Coucou only talks to the services you configure, directly from your Mac, using your own keys. Those services process your data under their own privacy policies:</p><ul>-<li><b>Anthropic (Claude API)</b> — when you chat with Claude or ask about a file or a window, the text you type, the file content and/or the window context you chose are sent to Anthropic. <a href="https://www.anthropic.com/legal/privacy">Anthropic privacy policy</a>.</li>+<li><b>Anthropic (Claude API)</b> — when you chat using Anthropic or ask about a file or a window, the text you type, the file content and/or the window context you chose are sent to Anthropic. When you open the chat or Settings, the list of available models is also fetched from the Anthropic API using your key. <a href="https://www.anthropic.com/legal/privacy">Anthropic privacy policy</a>.</li>+<li><b>Google AI (Gemini API)</b> <i>(macOS)</i> — when you chat using Google AI, the text you type and the current conversation are sent to Google's Gemini API. If you attached a window, the app name, title and URL are also sent. If you attached a file, only its name is sent (file content is only sent to Anthropic). The list of available models is fetched when you open the chat. <a href="https://policies.google.com/privacy">Google privacy policy</a>.</li>+<li><b>OpenAI</b> <i>(macOS)</i> — when you chat using OpenAI, the text you type and the current conversation are sent to the OpenAI API. If you attached a window, the app name, title and URL are also sent. If you attached a file, only its name is sent (file content is only sent to Anthropic). The list of available models is fetched when you open the chat. <a href="https://openai.com/policies/privacy-policy">OpenAI privacy policy</a>.</li><li><b>Stripe, GitHub, Vercel, Resend, Notion, Cal.com, n8n</b> — Coucou reads data from your own accounts (payments, repositories, deployments, emails, pages, bookings, workflow runs) to display them. Coucou only reads from them.</li></ul><p>We have no access to these requests or their responses.</p>-<h2>5. Claude Code</h2>-<p>If you install the Claude Code hooks, Claude Code sends session events to Coucou through a local connection on your computer. These events never leave your computer through Coucou. Before changing <code>~/.claude/settings.json</code>, Coucou makes a dated backup and shows you the changes.</p>+<h2>5. Claude Code, Gemini CLI and Antigravity hooks</h2>+<p>If you install the Claude Code hooks, Claude Code sends session events to Coucou through a local connection on your computer. If you install the Gemini CLI or Antigravity hooks, those agents send their session events the same way. These events never leave your computer through Coucou. Before changing any settings file (<code>~/.claude/settings.json</code>, <code>~/.gemini/settings.json</code>, <code>~/.gemini/config/hooks.json</code>), Coucou makes a dated backup and shows you the changes.</p><h2>6. Email</h2><p>When you send a file by email, the message is created and sent by your own Mail app. Coucou never sends email by itself.</p>@@ -55,7 +57,7 @@<hr><section id="fr" lang="fr"><h1>Politique de confidentialité</h1>-<div class="meta">Dernière mise à jour : 30 septembre 2026</div>+<div class="meta">Dernière mise à jour : 2 octobre 2026</div><div class="card"><b>En bref :</b> Coucou n’a ni compte, ni statistiques, ni publicité, ni pistage. Le développeur ne reçoit aucune de tes données. Tout reste sur ton ordinateur (Mac ou PC), sauf ce que tu choisis d’envoyer aux services que tu connectes toi-même.</div><h2>1. Responsable</h2>@@ -67,23 +69,26 @@<h2>3. Données stockées sur ton ordinateur</h2><table><tr><th>Quoi</th><th>Où</th><th>Pourquoi</th></tr>-<tr><td>Clés d’API et jetons saisis (Anthropic, Stripe, GitHub, Vercel, Resend, Notion, Cal.com, n8n)</td><td>Trousseau macOS, ou Gestionnaire d’identifiants Windows</td><td>Appeler ces services pour toi</td></tr>-<tr><td>Préférences (son, délais, intégrations actives, raccourci)</td><td>Préférences de l’app sur ton Mac, ou <code>%APPDATA%\Coucou</code> sous Windows</td><td>Garder tes réglages</td></tr>+<tr><td>Clés d’API et jetons saisis (Anthropic, Google AI, OpenAI, Stripe, GitHub, Vercel, Resend, Notion, Cal.com, n8n)</td><td>Trousseau macOS, ou Gestionnaire d’identifiants Windows</td><td>Appeler ces services pour toi</td></tr>+<tr><td>Préférences (son, délais, pastilles actives, fournisseur et modèle du chat, raccourci)</td><td>Préférences de l’app sur ton Mac, ou <code>%APPDATA%\Coucou</code> sous Windows</td><td>Garder tes réglages</td></tr><tr><td>Fichiers déposés sur le notch</td><td>Une copie dans le dossier de l’app (sous Windows : <code>%LOCALAPPDATA%\Coucou</code>)</td><td>Pouvoir poser une question dessus ou les joindre à un mail</td></tr><tr><td>Événements des sessions Claude Code (nom du projet, étape en cours, demandes de permission)</td><td>En mémoire uniquement</td><td>Les afficher dans le notch</td></tr>+<tr><td>Journal de diagnostic (noms d’événements et d’outils, noms de projets, codes HTTP — aucune commande, contenu ni clé)</td><td><code>~/Library/Logs/NotchBuddy</code> sur Mac (App Store : même chemin dans le conteneur). Plafonné à 1 Mo. Ne quitte jamais ton ordinateur.</td><td>Aider à diagnostiquer les problèmes de connexion entre les agents et Coucou</td></tr></table><p>Tu peux tout supprimer à tout moment : retire tes clés dans les Réglages, puis supprime l’app et son dossier <code>~/Library/Application Support/NotchBuddy</code> (ou le conteneur de l’app pour la version App Store). Sous Windows : désinstalle Coucou depuis Paramètres → Applications, puis supprime <code>%APPDATA%\Coucou</code> et <code>%LOCALAPPDATA%\Coucou</code>.</p><h2>4. Services que tu connectes toi-même</h2><p>Coucou ne communique qu’avec les services que tu configures, directement depuis ton Mac, avec tes propres clés. Ces services traitent tes données selon leur propre politique :</p><ul>-<li><b>Anthropic (API Claude)</b> : quand tu discutes avec Claude ou poses une question sur un fichier ou une fenêtre, le texte saisi, le contenu du fichier et/ou le contexte de la fenêtre choisie sont envoyés à Anthropic. <a href="https://www.anthropic.com/legal/privacy">Politique de confidentialité d’Anthropic</a>.</li>+<li><b>Anthropic (API Claude)</b> : quand tu discutes via Anthropic ou poses une question sur un fichier ou une fenêtre, le texte saisi, le contenu du fichier et/ou le contexte de la fenêtre choisie sont envoyés à Anthropic. À l’ouverture du chat ou des Réglages, la liste des modèles disponibles est aussi récupérée depuis l’API d’Anthropic avec ta clé. <a href="https://www.anthropic.com/legal/privacy">Politique de confidentialité d’Anthropic</a>.</li>+<li><b>Google AI (API Gemini)</b> <i>(macOS)</i> : quand tu discutes via Google AI, le texte saisi et la conversation en cours sont envoyés à l’API Gemini de Google. Si une fenêtre est attachée, le nom de l’app, le titre et l’URL sont aussi envoyés. Si un fichier est attaché, seul son nom est envoyé (le contenu d’un fichier ne part que chez Anthropic). La liste des modèles disponibles est récupérée à l’ouverture du chat. <a href="https://policies.google.com/privacy">Politique de confidentialité de Google</a>.</li>+<li><b>OpenAI</b> <i>(macOS)</i> : quand tu discutes via OpenAI, le texte saisi et la conversation en cours sont envoyés à l’API OpenAI. Si une fenêtre est attachée, le nom de l’app, le titre et l’URL sont aussi envoyés. Si un fichier est attaché, seul son nom est envoyé (le contenu d’un fichier ne part que chez Anthropic). La liste des modèles disponibles est récupérée à l’ouverture du chat. <a href="https://openai.com/policies/privacy-policy">Politique de confidentialité d’OpenAI</a>.</li><li><b>Stripe, GitHub, Vercel, Resend, Notion, Cal.com, n8n</b> : Coucou lit les données de tes propres comptes (paiements, dépôts, déploiements, e-mails, pages, rendez-vous, exécutions de workflows) pour les afficher. Coucou ne fait que lire.</li></ul><p>Le développeur n’a accès ni à ces requêtes ni à leurs réponses.</p>-<h2>5. Claude Code</h2>-<p>Si tu installes les hooks Claude Code, Claude Code envoie les événements de session à Coucou par une connexion locale sur ton ordinateur. Coucou ne les fait jamais sortir de ton ordinateur. Avant de modifier <code>~/.claude/settings.json</code>, Coucou en fait une sauvegarde datée et te montre les changements.</p>+<h2>5. Claude Code, Gemini CLI et Antigravity</h2>+<p>Si tu installes les hooks Claude Code, Claude Code envoie les événements de session à Coucou par une connexion locale sur ton ordinateur. Si tu installes les hooks Gemini CLI ou Antigravity, ces agents envoient leurs événements de la même façon. Coucou ne les fait jamais sortir de ton ordinateur. Avant de modifier un fichier de configuration (<code>~/.claude/settings.json</code>, <code>~/.gemini/settings.json</code>, <code>~/.gemini/config/hooks.json</code>), Coucou en fait une sauvegarde datée et te montre les changements.</p><h2>6. E-mail</h2><p>Quand tu envoies un fichier par e-mail, le message est créé et envoyé par ta propre app Mail. Coucou n’envoie jamais d’e-mail de lui-même.</p>diff --git a/docs/support.html b/docs/support.htmlindex 8de6a41d..d7c30bfb 100644--- a/docs/support.html+++ b/docs/support.html@@ -20,17 +20,21 @@<h3>Can I use Coucou with Gemini CLI or Antigravity (agy)? (macOS)</h3><p>Yes. Open <b>Settings → Gemini CLI → Install hooks</b> or <b>Settings → Antigravity → Install hooks</b>. The same backup-and-diff flow as Claude Code applies. Once installed, each <code>gemini</code> or <code>agy</code> session gets its own pill in the island.</p><h3>The chat doesn’t answer</h3>-<p>Add your Anthropic API key in Settings. API usage is billed by Anthropic, separately from a Claude subscription.</p>+<p>Add your API key in Settings: <b>Settings → Anthropic API</b> for Claude, or <b>Settings → Chat — other providers</b> <i>(macOS)</i> for Google AI (Gemini) or OpenAI. API usage is billed by the provider, separately from any subscription.</p><h3>An integration pill stays grey</h3>-<p>Check its key in Settings → Integrations. Up to 4 integrations can be shown at once.</p>+<p>Check its key in Settings. Up to 4 pills (other than VS Code) can be active at once — see <b>Settings → Active pills</b>.</p>+<h3>What are Active pills? (macOS)</h3>+<p>Active pills are the coding tools, agents and AI providers you declare in <b>Settings → Active pills</b>. VS Code is always there; you can add up to 4 more, including Gemini CLI, Antigravity, Anthropic, Google AI, OpenAI and service integrations. When Cursor or Codex is checked, a Main pill menu lets you choose which one opens in the big card. An agent that sends <code>coucou_agent</code> in its hook payload still gets its own automatic pill regardless.</p>+<h3>When are Cursor and Codex sessions available?</h3>+<p>Cursor and Codex pills are already in <b>Settings → Active pills</b> <i>(Codex: GitHub build only)</i>. You can declare them and set either as the Main pill. Support for their actual sessions is coming in a future version.</p><h3>No sound</h3><p>Check the speaker icon in the notch header and the volume in Settings.</p>-<h3>Which Claude model does the chat use?</h3>-<p>On Mac, Claude Sonnet 4.6 by default. You can pick another one in <b>Settings → Anthropic API</b>. The list comes from your Anthropic account, and each model is billed at its own price.</p>+<h3>Which model does the chat use?</h3>+<p>On Mac, Claude Sonnet 4.6 by default (Anthropic). Switch provider and model by clicking the model name above the chat box. For Anthropic, the model can also be set in <b>Settings → Anthropic API</b>. Each model is billed at its own price by the provider.</p><h3>Does it work without a notch?</h3><p>Yes. On an iMac, a Mac mini, or a MacBook with its lid closed on an external display, Mochi sits in a small bar at the top of the main screen. With the lid open, it stays in the notch.</p><h3>How do I uninstall?</h3>-<p>Settings → Claude Code → <b>Uninstall</b> (removes only Coucou’s hooks), then quit the app and move it to the Trash. Optionally delete <code>~/Library/Application Support/NotchBuddy</code>.</p>+<p>Remove hooks first: <b>Settings → Claude Code → Uninstall</b>, and if you installed them, also <b>Settings → Gemini CLI → Uninstall</b> and <b>Settings → Antigravity → Uninstall</b>. Then quit the app and move it to the Trash. Optionally delete <code>~/Library/Application Support/NotchBuddy</code>.</p><p>On Windows: same <b>Uninstall</b> button for the hooks, then Windows Settings → Apps → <b>Coucou</b> → Uninstall. Optionally delete <code>%LOCALAPPDATA%\Coucou</code>.</p></section><hr>@@ -50,17 +54,21 @@<h3>Puis-je utiliser Coucou avec Gemini CLI ou Antigravity (agy) ? (macOS)</h3><p>Oui. Ouvre <b>Réglages → Gemini CLI → Install hooks</b> ou <b>Réglages → Antigravity → Install hooks</b>. Le même flux sauvegarde + diff qu’avec Claude Code s’applique. Une fois installé, chaque session <code>gemini</code> ou <code>agy</code> obtient sa propre pastille dans l’island.</p><h3>Le chat ne répond pas</h3>-<p>Ajoute ta clé d’API Anthropic dans les Réglages. L’API est facturée par Anthropic, à part d’un abonnement Claude.</p>-<h3>Une pastille d’intégration reste grise</h3>-<p>Vérifie sa clé dans Réglages → Intégrations. Jusqu’à 4 intégrations s’affichent en même temps.</p>+<p>Ajoute ta clé d’API dans les Réglages : <b>Réglages → Anthropic API</b> pour Claude, ou <b>Réglages → Chat — other providers</b> <i>(macOS)</i> pour Google AI (Gemini) ou OpenAI. L’API est facturée par le fournisseur, à part de tout abonnement.</p>+<h3>Une pastille reste grise</h3>+<p>Vérifie sa clé dans les Réglages. Jusqu’à 4 pastilles (hors VS Code) peuvent être actives en même temps — voir <b>Réglages → Active pills</b>.</p>+<h3>Qu’est-ce que les Active pills ? (macOS)</h3>+<p>Les Active pills sont les outils de code, agents et fournisseurs IA que tu déclares dans <b>Réglages → Active pills</b>. VS Code est toujours présent ; tu peux en ajouter jusqu’à 4 autres, dont Gemini CLI, Antigravity, Anthropic, Google AI, OpenAI et des intégrations de services. Quand Cursor ou Codex est coché, un menu Main pill te permet de choisir lequel s’affiche dans la grande carte de l’island. Un agent qui envoie <code>coucou_agent</code> dans son payload obtient quand même sa pastille automatique.</p>+<h3>Quand les sessions Cursor et Codex seront-elles disponibles ?</h3>+<p>Les pastilles Cursor et Codex sont déjà dans <b>Réglages → Active pills</b> <i>(Codex : version GitHub uniquement)</i>. Tu peux les déclarer et en faire la Main pill. La prise en charge de leurs sessions arrivera dans une prochaine version.</p><h3>Pas de son</h3><p>Vérifie l’icône haut-parleur dans l’en-tête du notch et le volume dans les Réglages.</p>-<h3>Quel modèle Claude utilise le chat ?</h3>-<p>Sur Mac, Claude Sonnet 4.6 par défaut. Tu peux en choisir un autre dans <b>Réglages → Anthropic API</b>. La liste vient de ton compte Anthropic, et chaque modèle est facturé à son propre tarif.</p>+<h3>Quel modèle utilise le chat ?</h3>+<p>Sur Mac, Claude Sonnet 4.6 par défaut (Anthropic). Change de fournisseur et de modèle en cliquant sur le nom du modèle au-dessus du champ de chat. Pour Anthropic, le modèle peut aussi être défini dans <b>Réglages → Anthropic API</b>. Chaque modèle est facturé à son propre tarif par le fournisseur.</p><h3>Ça marche sans notch ?</h3><p>Oui. Sur un iMac, un Mac mini ou un MacBook capot fermé branché à un écran externe, Mochi s’affiche dans une petite barre en haut de l’écran principal. Capot ouvert, il reste dans le notch.</p><h3>Comment désinstaller ?</h3>-<p>Réglages → Claude Code → <b>Uninstall</b> (retire seulement les hooks de Coucou), puis quitte l’app et mets-la à la corbeille. Tu peux aussi supprimer <code>~/Library/Application Support/NotchBuddy</code>.</p>+<p>Retire d’abord les hooks : <b>Réglages → Claude Code → Uninstall</b>, et si tu les as installés, aussi <b>Réglages → Gemini CLI → Uninstall</b> et <b>Réglages → Antigravity → Uninstall</b>. Puis quitte l’app et mets-la à la corbeille. Tu peux aussi supprimer <code>~/Library/Application Support/NotchBuddy</code>.</p><p>Sous Windows : le même bouton <b>Uninstall</b> pour les hooks, puis Paramètres Windows → Applications → <b>Coucou</b> → Désinstaller. Tu peux aussi supprimer <code>%LOCALAPPDATA%\Coucou</code>.</p></section><footer>© 2026 Louis Raillé · Coucou is free and open source (MIT) · <a href="https://github.com/Louis-CFM/coucou">GitHub</a> · <a href="privacy.html">Privacy</a> · <a href="terms.html">Terms</a> · <a href="legal.html">Legal notice</a></footer></div></body></html>diff --git a/docs/terms.html b/docs/terms.htmlindex 4a69b07e..8bfeb352 100644--- a/docs/terms.html+++ b/docs/terms.html@@ -5,7 +5,7 @@<div class="lang"><a href="#en">English</a><a href="#fr">Français</a></div><section id="en"><h1>Terms of Use</h1>-<div class="meta">Last updated: September 30, 2026</div>+<div class="meta">Last updated: October 2, 2026</div><h2>1. The app</h2><p>Coucou is a free app for macOS and Windows published by Louis Raillé. Its source code is available on <a href="https://github.com/Louis-CFM/coucou">GitHub</a> under the MIT License. By downloading or using Coucou, you accept these terms.</p>@@ -17,7 +17,7 @@</ul><h2>3. Your keys and third-party services</h2>-<p>Coucou works with services you connect yourself (Anthropic, Stripe, GitHub, Vercel, Resend, Notion, Cal.com, n8n). You are responsible for your accounts, your keys, complying with those services’ terms, and any costs they charge you — for example Anthropic API usage, which is billed by Anthropic.</p>+<p>Coucou works with services you connect yourself (Anthropic, Google AI, OpenAI, Stripe, GitHub, Vercel, Resend, Notion, Cal.com, n8n). You are responsible for your accounts, your keys, complying with those services’ terms, and any costs they charge you — for example API usage billed by Anthropic, Google or OpenAI.</p><h2>4. Claude Code</h2><p>Coucou can show and answer Claude Code permission requests. Approving a request from the notch has the same effect as approving it in your terminal: you remain responsible for what you allow Claude Code to do.</p>@@ -26,7 +26,7 @@<p>Coucou is provided “as is”, without warranty of any kind. To the extent permitted by law, the developer is not liable for any damage arising from its use, including data loss, unexpected actions approved through the app, or charges from third-party services. Nothing in these terms limits rights you have under mandatory consumer protection law.</p><h2>6. Trademarks</h2>-<p>Claude and Claude Code are trademarks of Anthropic, PBC. Mac, macOS and Mac App Store are trademarks of Apple Inc. Stripe, GitHub, Vercel, Resend, Notion, Cal.com and n8n are trademarks of their respective owners. Coucou is an independent project and is not affiliated with, endorsed or sponsored by any of them.</p>+<p>Claude and Claude Code are trademarks of Anthropic, PBC. Mac, macOS and Mac App Store are trademarks of Apple Inc. Google, Gemini, OpenAI, Codex, Cursor, Visual Studio Code, Antigravity, Stripe, GitHub, Vercel, Resend, Notion, Cal.com and n8n are trademarks of their respective owners. Coucou is an independent project and is not affiliated with, endorsed or sponsored by any of them.</p><h2>7. Changes and termination</h2><p>These terms may be updated; the new version will be published here with a new date. You can stop using Coucou at any time by deleting it.</p>@@ -41,7 +41,7 @@<hr><section id="fr" lang="fr"><h1>Conditions d’utilisation</h1>-<div class="meta">Dernière mise à jour : 30 septembre 2026</div>+<div class="meta">Dernière mise à jour : 2 octobre 2026</div><h2>1. L’app</h2><p>Coucou est une app gratuite pour macOS et Windows publiée par Louis Raillé. Son code source est disponible sur <a href="https://github.com/Louis-CFM/coucou">GitHub</a> sous licence MIT. En téléchargeant ou en utilisant Coucou, tu acceptes ces conditions.</p>@@ -53,7 +53,7 @@</ul><h2>3. Tes clés et les services tiers</h2>-<p>Coucou fonctionne avec des services que tu connectes toi-même (Anthropic, Stripe, GitHub, Vercel, Resend, Notion, Cal.com, n8n). Tu es responsable de tes comptes, de tes clés, du respect des conditions de ces services et des frais qu’ils te facturent, par exemple l’utilisation de l’API d’Anthropic, facturée par Anthropic.</p>+<p>Coucou fonctionne avec des services que tu connectes toi-même (Anthropic, Google AI, OpenAI, Stripe, GitHub, Vercel, Resend, Notion, Cal.com, n8n). Tu es responsable de tes comptes, de tes clés, du respect des conditions de ces services et des frais qu’ils te facturent, par exemple l’utilisation des API d’Anthropic, Google ou OpenAI, facturée par chaque fournisseur.</p><h2>4. Claude Code</h2><p>Coucou peut afficher les demandes de permission de Claude Code et y répondre. Autoriser une demande depuis le notch a le même effet que l’autoriser dans ton terminal : tu restes responsable de ce que tu permets à Claude Code de faire.</p>@@ -62,7 +62,7 @@<p>Coucou est fourni « en l’état », sans garantie d’aucune sorte. Dans les limites permises par la loi, le développeur n’est pas responsable des dommages liés à son utilisation, notamment une perte de données, une action autorisée par erreur via l’app ou des frais facturés par un service tiers. Rien dans ces conditions ne limite les droits que te garantit le droit de la consommation.</p><h2>6. Marques</h2>-<p>Claude et Claude Code sont des marques d’Anthropic, PBC. Mac, macOS et Mac App Store sont des marques d’Apple Inc. Stripe, GitHub, Vercel, Resend, Notion, Cal.com et n8n sont des marques de leurs propriétaires respectifs. Coucou est un projet indépendant, sans lien avec eux et ni approuvé ni sponsorisé par eux.</p>+<p>Claude et Claude Code sont des marques d’Anthropic, PBC. Mac, macOS et Mac App Store sont des marques d’Apple Inc. Google, Gemini, OpenAI, Codex, Cursor, Visual Studio Code, Antigravity, Stripe, GitHub, Vercel, Resend, Notion, Cal.com et n8n sont des marques de leurs propriétaires respectifs. Coucou est un projet indépendant, sans lien avec eux et ni approuvé ni sponsorisé par eux.</p><h2>7. Modifications et fin</h2><p>Ces conditions peuvent évoluer ; la nouvelle version sera publiée ici avec une nouvelle date. Tu peux arrêter d’utiliser Coucou à tout moment en le supprimant.</p>