- community/mochis/: teams of Mochis as .mochis.json files with an index (name, description in
English and French, author, tags); three to start: Maintainer team, Night shift, Solo builder.
A README says how to share one.
- scripts/community-mochis.py checks every file (format, 1 to 12 Mochis, no secret, no local
path, no repository, nothing autonomous) and keeps the index's counts and faces in step; its own
CI workflow runs it when community/mochis/ changes.
- Mochis › Team › From the community: the index is read from GitHub only on a click, and Import
opens the import sheet on that file. The Mochis arrive off and asking first.
- 6 new strings in 16 languages.
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
Co-authored-by: Claude <noreply@anthropic.com>
GitHub offers fine-grained tokens no Checks permission, so the pulse's
statusCheckRollup can't read check runs with one: each repository or pull
request whose CI runs on GitHub Actions comes back with a GraphQL error, and
the pill shows no CI status for it. Says so next to the token's permissions,
in windows/README.md and docs/INTEGRATIONS.md.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
On a weekly schedule (the ready-made one's default is now Monday 07:30), PR Triage sorts every
PR opened in the 7 days before (150 at most), sorted before or not; it notes, for each, the files
it changes that the default branch no longer has (the code moved since), and its report starts
with "The best" and "The weakest". On a daily schedule it works as before. brain 0.15.3.
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
Co-authored-by: Claude <noreply@anthropic.com>
- In a team whose lead is on, only the lead writes: no notch card, no iPhone notification, no
Telegram or WhatsApp message from its Mochis. What went wrong for them since its last report
is in its report ("What went wrong"), and it answers for them (Mac, Telegram, WhatsApp, iPhone).
- The bell on the lead's card picks where the team's report goes (notch, iPhone, Telegram,
WhatsApp) without turning anyone off.
- The iPhone doesn't ring for what Telegram or WhatsApp already got.
- Botan's chat on the iPhone shows a team as its lead: its Mochis' pills are gone (still
reachable with @).
- Messages say the team: "PR Triage · coucou had a problem".
- brain 0.15.2.
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
Co-authored-by: Claude <noreply@anthropic.com>
- A team folds on the Team page (the chevron by its name): its title and its Mochis' faces,
remembered between launches.
- The lead takes the team's colour when it's made, and again when the team's colour changes
(`team lead|set --color`).
- Turning a lead on turns its whole team on; each Mochi can be turned off again on its own.
- brain 0.15.1.
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
Co-authored-by: Claude <noreply@anthropic.com>
- The Team page groups the Mochis by team (tiles and list): each team under its title and
repositories, its lead's card on top, the Mochis it sends below a line in the team's colour.
- A team is made or changed in one sheet (name, colour, its Mochis, a lead at its time);
right-click a Mochi › Move to team; a team's menu edits, adds a lead or ungroups it.
- The Team Lead (brain `team-lead`, `lead: true`): at each run it reads what its Mochis did,
what waits for a click and the team's repositories (PRs, issues, CI), sends up to 4 Mochis
with a precise ask (a PR or an issue for code Mochis), and writes one report. It only sends
Mochis that are on, awake, local and within budget; nothing is merged, closed or posted
without the click. The page's mission goes through the team's lead (`team plan|run --team`).
- Telegram and WhatsApp: a Mochi sent by its lead only writes when something waits for a tap.
- Fix: pausing a Mochi (or changing its channels) no longer resets its time to "on demand".
- brain 0.15.0: `brain team set`, `brain team lead`; leads are shared in .mochis.json files.
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
Co-authored-by: Claude <noreply@anthropic.com>
A ready-made Mochi (on: pr-queue, daily 07:30) for repositories that get more
pull requests than one can read. brain reads the open queue with gh, sorts
the new ones and a slice of the backlog against the repository's CLAUDE.md
and every title (to find duplicates): ready, needs work, duplicate or against
the rules, can wait. What it would close is one "close" proposal (15 at
most, each with its own comment), closed only on the click, never on its
own. It never merges and stays on the Mac.
brain 0.14.0.
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
Co-authored-by: Claude <noreply@anthropic.com>
* Mochis: WhatsApp, where each reports, another time or a pause in a sentence, the team from the iPhone
- WhatsApp (22): the Mochis' chat also works in your own WhatsApp chat,
through Coucou's WhatsApp integration: /start <code> pairs it, only what
you write from your account there is read, choices come numbered, Coucou's
own messages are never read back.
- Where it reports (23): notch, iPhone, Telegram, WhatsApp, per Mochi (brain
`quiet`); the Telegram page's switches use it.
- Sentences: "passe à 2 h", "every day at 7:30", "pause cette semaine",
"pause until monday" change a Mochi from Telegram, WhatsApp, Botan on the
iPhone and "@Name …" in the notch's chat (brain `mochi schedule`, `mochi
snooze`: asleep until a date, a click still runs it).
- The team lead from the iPhone: /team <mission> in Botan's chat, the plan
shows above the field, Run the team on a tap; how it went comes back.
- The notch's chat: "@Night Shift …" goes to that Mochi (MochiTalk).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
* Mochis on WhatsApp: the welcome says your name; explicit self in its tasks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
---------
Co-authored-by: Claude <noreply@anthropic.com>
Mochis → Telegram: paste a @BotFather token (Keychain), pair one chat with
/start and a code, and the Mochis write there after each run or in one
morning recap. From the chat: /mochis, /waiting, /recap, /team <mission>,
/run /last /pause /wake, @Name or a reply to talk to a Mochi. Proposals only
go to GitHub on a button tap. Per-Mochi switch for who writes there.
brain 0.12.0: `mochi run --ask` adds what you asked to the run.
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
Co-authored-by: Claude <noreply@anthropic.com>
- Mac 0.5.7 (build 24): Mail in the notch (search, filters, reading, actions),
automatic sorting in Coucou → Mail with rules, banned words, VIPs and Undo,
mail plans from the chat, search in the settings, Coucou in a corner of the
screen. GitHub build.
- Windows and Linux 0.5.7: Mail with classic Outlook (Windows), Outlook script
hardening (#1004 by @Ohualtex), settings search (#1002 by @Ohualtex).
- CHANGELOG, README versions and features, Linux links, What's new (16 and 14
languages), SPEC 12 bis and INTEGRATIONS brought up to date with what ships.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
A Mail switch in the chat sends the AI the latest 40 messages (attachments
and text for the newest and for the ones the request names). The AI may
answer with a plan (a coucou-mail JSON block): sort, reply drafts, sends,
a mail merge that gives each recipient their page of a PDF, saving
attachments. The chat shows it as a card: the mails to send, the ones that
can't be sent in red, Send me a test, and Run, which starts a 5-second
countdown before anything happens. Sends are listed in the Mail section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
The Mail pill gets a search (free words, from:, subject:) and quick filters
(All, Unread, Important, Today), Load more, and on a message: Important,
Junk, Always important (VIP), Always ignore this sender.
The Coucou window gets a Mail section (Overview, Rules, Banned words, VIP).
Automatic sorting, off by default, looks once at each message that arrives
after it is turned on: VIPs are flagged, banned words send to Junk, then the
first matching rule acts (Junk, important, read, move). Nothing is ever
deleted; every action is in a journal with Undo (found again by Message-ID).
Rules, search and scripts are pure Foundation, tested on CI.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
Conductor (conductor.build) runs Claude Code with
__CFBundleIdentifier=com.conductor.app and no TERM_PROGRAM, so every hook
event was dropped ("Ignored PreToolUse from com.conductor.app"). It is now a
known host, matched on its bundle id like Orca and cmux: its sessions go to
integration_claude, the pill's button reads "Open Conductor", and "Open
terminal" / ⌃⌥T bring Conductor forward. Conductor has no documented deep
link to an existing workspace, so the app is activated, not a workspace.
Questions and permissions follow the existing terminal opt-in.
The ClaudeHost tests cover Conductor and now run in CI.
Closes#793
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
- "Install WhatsApp" in Settings: GOWA's latest macOS build for this Mac,
from its GitHub releases, checked against checksums-macos.txt (or GitHub's
digest; no checksum, nothing installed), unzipped with ditto into
Application Support/Coucou/GOWA/gowa, then "Start GOWA automatically" is
turned on and the QR follows. Redirects only to GitHub's own hosts.
"Update" fetches the latest again.
- Settings: the install button first; the gateway picker, address,
credentials, start-automatically, port and Test fold under "Advanced: your
own gateway". The status line waits for a gateway to exist.
- GOWA launched by Coucou runs with APP_UI_ENABLED=false (no dashboard
fetched from GitHub at each start).
- README: three steps, the manual GOWA (right file names: darwin-arm64 or
darwin-amd64) and OpenWA under a folded "Advanced". Tests for the release
parsing. CHANGELOG 0.5.1, version 0.5.1 (18).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
- No redirect is ever followed (and an answer from another host is
refused): credentials and a reply's text only reach the gateway.
- GOWA started by Coucou is restarted only when its binary, address or
password changes, after the old one has gone; Save and Test no longer kill
it. Test connection waits a few seconds for a GOWA just started, and uses
the running connection.
- Focus authorization callback is @Sendable (Intents may answer off the
main thread).
- History loaded at connection is added as quiet history instead of
zeroing every unread count afterwards.
- Messages arriving in the conversation open on screen aren't unread and
don't make Mochi react; the receipt still waits for a reply or an opening.
- The badge clears on the unread you can actually see (muted groups and
ignored chats aside). Ignoring a chat removes it from the inbox.
- The conversation and its draft survive a missed status check (a banner
says it); a send finishing after WhatsApp is turned off adds nothing back.
- QR: never asked again within 15 s, even when none came (each GOWA login
call restarts the pairing).
- Dedupe forgets the oldest ids, not a random half. Webhook callbacks are
set and read behind a lock.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
- "Start GOWA automatically" (GitHub build only: the whole feature is under
#if !APPSTORE, the App Store build is sandboxed). Coucou runs the binary
the user picks as a child process: rest --host=127.0.0.1 on the URL's port,
--auto-download-media=false, credential through APP_BASIC_AUTH (not the
command line), output to /dev/null, its own folder in Application Support.
Stopped when Coucou quits or the option is turned off, started again if it
dies (once a minute at most).
- OpenWAProvider covers everything GOWAProvider does: session found, created
and started; QR; webhook registered or updated; polling; send; mark read;
group names.
- Wake from sleep: status and webhook asked again; the gateway-down badge
from phase 2.
- README "WhatsApp (experimental)": install GOWA, scan the QR, set up Coucou,
OpenWA, privacy, limits. CHANGELOG "Unreleased" entry. docs/INTEGRATIONS.md
section 6bis (in French) and the Focus permission.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
Spotify (GitHub build): a new integration_spotify pill. Its card shows the
album cover, title, artist and album, a progress bar you drag or click to
seek, play/pause, previous/next, shuffle, repeat and volume. State comes from
Spotify's com.spotify.client.PlaybackStateChanged notification and AppleScript;
nothing polls and Spotify is never launched by Coucou. The cover comes from
Spotify's `artwork url`, or from its public oEmbed before Automation is allowed.
Apple Music: the card gets the same layout, with the cover (from Music, or
Apple's public iTunes Search API when the track has none), seek, shuffle,
repeat all/one, volume and a favorite heart. The pill ID, the hover pill and
the Automation-denied card are unchanged.
The cover, bar, volume and buttons live in NowPlayingViews.swift and are shared
by both cards; each player keeps its own controller. Mochi dances for either.
Privacy page, README, SPEC, INTEGRATIONS and CHANGELOG updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat: GitHub contribution grid in the notch
Data layer:
- GitHubActivity.swift: ContributionDay (date, count, level 0–4, weekday),
GitHubActivity (total, weeks, fetchedAt), parse(), lastWeeks(), lastDays().
- GithubPoller: separate activity chain (activityInFlight, nextActivity),
fetchActivity() with same tokenGeneration guard as pulse, 30 min cadence
starting 15 s after launch, refreshActivityIfStale(maxAge:300).
- AppState.githubActivity: cleared on integration disable and token change.
UI:
- GitHubPulseCardView header: "★ N.Nk" + 7-day mini-row (7pt squares,
spacing 2pt) when activity loaded; tapping opens Activity detail.
"· N repos" removed from header (shown in detail instead).
- GitHubDetailSection.activity + GitHubDetailView routes to
GitHubActivityDetailContent.
- GitHubActivityDetailContent: ~20-week grid (8pt squares, spacing 2pt,
Sun at top); hover/tap shows "Oct 3 · 12 contributions" in header;
header right opens github.com/<login>; refreshActivityIfStale on appear.
Tests: 31 cases in tests/GitHubActivityTests.swift + test script added to
scripts/ and CI (build.yml). Docs: INTEGRATIONS.md, SPEC.md, privacy.html.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: activity grid fit, mini-row without stats, token reload, past year label
- Contribution grid: squareSize 8→7pt, spacing 2→1.5pt, numWeeks computed
from available width (~23) instead of hardcoded 20; header-to-grid gap 5pt
- GitHubPulseCardView header: show 7-square mini-row even when githubStats is
nil but githubActivity is loaded ("Overview" only when both nil)
- SettingsView.saveIntegrations: also call refreshActivityIfStale() alongside
triggerPulseNow() when a new GitHub token is saved
- Replace "this year" with "past year" in headerRight and SPEC.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Missed alerts fix (fast CIs between polls):
- GraphQL query now fetches `oid` of the last commit on PRs and default
branches. GitHubPR and GitHubRepoCI gain `headSha: String?`.
- GitHubPulse.events: if headSha is unchanged (or both nil), classic
state-transition rules apply. If the SHA changed or the PR is new,
fire immediately when CI is already done (success → .ciPassed,
failure → .ciFailed / .mainFailed). Pending → nothing; next poll
(same SHA) will catch the result. No "green" event for main CI.
Fresh data on open:
- GitHubPulse.isStale(fetchedAt:now:maxAge:): pure predicate, tested.
- GithubPoller.refreshIfStale(maxAge:60): dispatches to main, no-ops
when a request is in flight or data is fresh.
- Called when integration_github takes focus, when the island expands
with GitHub focused, and when a GitHub detail view opens.
Tests: 5 headSha event scenarios + 3 isStale assertions added.
Docs: INTEGRATIONS.md updated with headSha alert rules and
refresh-on-open behaviour.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: GitHub pulse — open PRs, CI status and review requests in the notch
Adds a live GitHub integration to the integration_github pill:
- One GraphQL query fetches open PRs (CI + review decision), PRs
to review and default-branch CI for 10 recent repos
- Adaptive polling: 60 s when a PR/CI is pending, 300 s otherwise
- Alerts (badge + sound) on CI failure, new review request, CI pass;
priority: failure > review > pass; first poll is always silent
- GitHubPulseCardView replaces the stats card when pulse data is available
- GitHubDetailView with tappable PR/repo rows opens the matching GitHub URL
- Settings help text for the token (scope requirements)
- 37 unit tests covering parse, events, CIState and edge cases
- CI step "GitHub pulse tests" added to build.yml
- Docs: INTEGRATIONS.md §1quater, SPEC.md card/detail sections,
privacy.html section 4 (EN + FR), README integrations line
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(github-pulse): 6 correctifs avant merge
1. Partial GraphQL errors: parse data when "data" key is present even if
"errors" exists; only keep old data when "data" is absent/null.
Replace print() with appendAppLog("github.log", ...) via private nbLog.
2. Badge: skip badge (not sound) when integration_github is already in focus.
3. Stale data: clear githubPulse when integration_github is removed from
activeIntegrations (AppState.didSet); clear githubPulse (+ githubStats
if deleted) when token changes in saveIntegrations(), then trigger an
immediate pulse poll on new token via GithubPoller.triggerPulseNow().
4. Duplicate IDs: parse() deduplicates myPRs and toReview by id (keeps
first). events() uses Dictionary(_:uniquingKeysWith:) for both PR and
repo maps. 5 new tests covering parse-time dedup and event dedup.
5. GitHubRepoCIRowView: CI dot + short name (10.5 pt #9398A1) + branch
(11 pt #C5C8CD) + status word right (failing/running/passing, 10 pt
in CI colour). Tap opens repo/actions URL filtered on host==github.com.
6. Height: .clipped() on GitHubPulseCardView and GitHubDetailView outer
containers; ScrollView maxHeight reduced to 80 pt (4 × 20 pt rows
exactly) so list never overflows the 160 pt overview card.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: GitHub card header shows stats inline, list height 3 rows + bottom fade
- GitHubPulseCardView: replace "Overview" label with "★ N · N repos" (11pt
#8E939C) when githubStats available; fall back to "Overview" otherwise.
Remove right-aligned stats text and Spacer. Trailing padding 12 → 36 to
avoid ↗ button overlap.
- GitHubDetailView: maxHeight 80 → 60 (3 rows × 20pt, no half-row cut).
Add bottom fade mask (black → clear over last 20%) when item count > 3.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
FinishedView: restore exact pre-live-diff layout (AgentWho + one-line
summary text + Open terminal / OK buttons, paddings leading 116 /
trailing 16 / vertical 4). Removed the touched-files list, the
showingDiff overlay and the DiffCardView branch. Kept the
finalLine → last non-diff step → "Session finished" text source from
live-diff; added .lineLimit(1).truncationMode(.tail). Deleted
AppState.touchedFiles(for:) which is now unused.
DiffEngine.toOneLine: stop at the first paragraph separator (blank
line, 3+ repeated -/*/_ chars, or line starting with |) so that long
tool output doesn't bleed into the finished-session summary. Also
strips leading bullet markers (-, *, •, N.). Falls through to the next
paragraph if the first one is empty. Nine new test cases added.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: live diff — see file changes in the notch as Claude edits
- DiffEngine.swift (Foundation-only): LCS-based line diff with 3-line context
hunks, 200 KB / 4000-line size guards, CRLF normalization; handles Edit,
MultiEdit and Write tool inputs. String.makeDiffStep/parseDiffStep encode
diff step metadata in a private-use prefix so TickerRowView can detect them
- HookServer: PostToolUse for Edit/MultiEdit/Write builds and stores a FileDiff
in AppState.sessionDiffs[pillId], then appends a diff step. SessionEnd clears
the session; 1-hour inactivity timer auto-expires diffs
- TickerRowView: diff steps render filename + "+N" (green #22C55E) + "−M"
(red #F4505E), small monospaced — all other steps unchanged
- TickerView: tap on a diff step fires onDiffTap callback with the step index
- OverviewView: diff overlay (DiffCardView) replaces the ticker in the left
card when a diff step is tapped; Escape or ← dismisses it
- DiffCardView: scrollable monospaced diff lines (10.5 pt), ±12% background,
header with filename + totals + ↗ (code -g path:line or NSWorkspace)
- FinishedView: lists up to 4 touched files with +/− totals below the buttons;
tapping a file opens its DiffCardView
- Tests: 38 assertions across 11 groups; all 6 test scripts pass
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: diff tap on integration pills, static final line after Stop
Bug 1 — diff step taps now work on both the current and completed ticker
rows for all pills (including integration pills like integration_claude).
IntegrationCardView gains an onDiffTap callback wired from OverviewView;
TickerView passes per-row closures computed from the row text rather than
a single global tap; activeDiffStep renamed to activeDiffIdx and stores
the sessionDiffs index directly so it survives appendStep's 20-step cap.
Diff card also closes on view/mode change.
Bug 2 — after Stop the ticker shows the last assistant message as static
text (#C9CDD4, no shimmer, checkmark icon) until a new turn starts.
DiffEngine.toOneLine strips Markdown and collapses whitespace; Stop reads
last_assistant_message (fallback message), calls toOneLine, appendStep
and sets AgentTask.finalLine. finalLine is cleared on SessionStart,
UserPromptSubmit, PreToolUse and SessionEnd. TickerRowView gates shimmer
and chevron on isActive (thinking || working).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: stable diff ids, memory cap, ticker polish, Write jump, CI step
1. Stable diff ids: FileDiff gains an `id` int assigned by AppState from a
monotonically-increasing counter (nextDiffId) that is never reset across
sessions. appendSessionDiff sets and returns this id; the step marker
encodes diffId instead of a transient array index. Lookup is now
first(where: { \$0.id == diffId }) — tapping a step whose diff was
evicted is a no-op.
2. Memory cap: appendSessionDiff keeps at most 50 diffs per pill (oldest
evicted first). DiffEngine.fromNew applies the same 200 KB / 4 000-line
limit as fromEdit (tooLarge, no hunks, line count preserved).
3. Ticker non-active style: staticColor (#C9CDD4) only when !isActive &&
phase < 0.5 (current row); the completed row above keeps #6B7079.
4. FinishedView main text: finalLine ?? last non-diff step ?? "Session
finished". Never shows a \u{E001}-prefixed diff marker string.
5. DiffCardView ↗ button: /opt/homebrew/bin/code added first; Write opens
`code -g file:1`, Edit/MultiEdit opens `code file`. firstChangedLine
removed from FileDiff (no longer used).
6. fromEdit perf guard: m*n > 1_000_000 triggers countFallback (tooLarge).
7. CI: "Diff engine tests" step added to build.yml.
Tests: new cases for m*n blowup, fromNew tooLarge, diffId > 9 round-trip.
Docs: INTEGRATIONS.md corrected for Write semantics and 50-diff cap.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: answer AskUserQuestion from the notch (issue #94)
Parse AskUserQuestion PermissionRequests into a Foundation-only AskQuestion
model (1–4 questions, 2–4 options each, single- or multi-select). The question
card shows options as buttons (single-select: click = answer; multi-select:
toggles + Send), a free-text Other… field, a 1/N counter for multi-question
flows, and a "Reply in terminal" fallback. nb-hook.py emits allow +
updatedInput when decision is "answer". 21 parsing and answer-construction
tests, CI step added.
Idea from issue #94 by @Vega8991
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: answer AskUserQuestion via PreToolUse --ask hook (Claude Code 2.1.85+)
- nb-hook.py --ask mode: guards tool_name == AskUserQuestion, injects
coucou_kind, holds socket 125 s; on answer emits PreToolUse hookSpecificOutput
with updatedInput {questions, answers} so Claude Code receives the replies
- HookServer: dedicated AskUserQuestion PreToolUse hook entry (130 s timeout)
added to both buildHooksData() variants; hooksNeedUpdate() returns true when
that entry is absent; banner updated accordingly
- handleClient routes coucou_kind == ask_user_question to processQuestionRequest;
PermissionRequest for AskUserQuestion replies ask immediately; PreToolUse
general event skips state update for AskUserQuestion
- AskQuestion.buildAnswers now returns [String: Any]: single-select → String,
multi-select → [String] array (Claude Code 2.1.136+)
- QuestionView: ChipFlowLayout for option chips (shared with ModelPickerView),
header shows 1/N counter + Reply-in-terminal link, Send/Next only for
multi-select (disabled until a choice is made), single-select auto-advances
- Tests, docs updated; both schemes build clean
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: question card never appeared — treat .question as alert in expandIfNeeded
Added .question to the isAlert set so it force-expands when the island is
collapsed/hidden, and made it an always-wins view (alongside .approval) so it
replaces whatever is showing when the island is already open.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: question card UX — compact Other field, auto-release fd, header label
- Other… mode: field + Send capsule + ✕ now on one line (no extra row),
field has rounded background (white 7%, r8), Send capsule dims when empty,
Escape key resets to options, multi-select Send button hidden while Other
field is open
- releaseQuestionFD(): sends "ask" immediately when QuestionView disappears
without an explicit answer (collapse, view change, another alert taking over),
does not touch state.view — called via QuestionView.onDisappear
- Header label: "Claude Code is asking" (static, not project-name-dependent)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add Claude plan gauge pill with statusline relay and settings UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix claude-plan-gauge review: safe preview, live pill color, githubOnly, validation
- Preview writes nothing; all file I/O deferred to confirm (fixes cancel-uninstall data loss)
- Reinstall preserves existing statusLine padding/refreshInterval (only command swapped)
- Pill label and color computed live from claudePlanUsage at render; removed tasks mutation in didSet
- integration_claude_plan is githubOnly: true (App Store has no installer)
- Install checks xcode-select -p and shows clear error if CLTools missing
- nb-hook.py: invalid stdin returns early in normal mode; --statusline continues regardless
- Validation: clamp pct 100-200 to 100 (not rejected); reject pct > 200; reject resets_at > 400 days
- Card: TimelineView every 30s; DateFormatter created once with en_US_POSIX locale
- Settings Plan usage: shows Installed/Not installed state and only the relevant button
- Diff shows only the statusLine key (before/after), not full settings.json
- settings.json written with .withoutEscapingSlashes
- 27/27 tests pass
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: mark Claude plan gauge as GitHub build only
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Redesign Claude plan gauge: header pill and Settings toggle, not a catalog pill
- Remove integration_claude_plan from PillCatalog; it was never shipped
- Add "Show in the notch" toggle in Settings → Agents → Plan usage; enabling
it auto-triggers relay install if not yet installed; cancelling reverts toggle
- Small capsule pill in IslandHeader (home view, GitHub build): colored dot +
"Claude 73%" label, active look while plan detail is open
- Tap pill: ClaudePlanCardView replaces left card; showingPlanDetail resets on
focusId/view/mode change; big Mochi takes plan usage color while open
- Card tweaks: fixed 50pt bar, arrow.clockwise icon, compact reset labels
("in 1 h 20" / "Mon 9:00"), subtitle "just now / N min ago / N h ago",
no truncation; TimelineView every 30s
- App Store build unaffected (all new UI is #if !APPSTORE)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Polish plan gauge: reset label, label width, cached relay state
- Weekly reset label: "Mon 9:00" without "Resets" prefix (icon suffices)
- Label column widened to 40pt so "5 hours" never truncates
- Cache relay-installed state in AppState.planRelayInstalled; set at launch,
refreshed on Settings open and after every Install/Uninstall confirm;
IslandHeader reads state.planRelayInstalled instead of calling
HookServer.statusLineInstalled() on each render
- Uninstall confirm sets showPlanInNotch = false
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: Ollama and LM Studio chat via OpenAI-compatible streaming API
- Add ollama/lmstudio cases to ChatProvider with isLocal, pillID, init?(pillID:)
- Add LocalChat helpers: normaliseURL, parseSSEDelta, filterThinkingBlocks
- Stream local responses token-by-token via URLSession.bytes
- Add ai_ollama (#FACC15) and ai_lmstudio (#A3E635) pills to PillCatalog
- Add server URL settings in Settings → Chat (Local models GroupBox)
- NSAllowsLocalNetworking in both Info.plist targets
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: Markdown rendering in chat assistant responses
- Add ChatMarkdown block parser (Foundation only) and ChatMarkdownView renderer
- ChatBubble uses ChatMarkdownView for assistant messages
- Update system prompt to allow markdown formatting
- Add ChatMarkdown/LocalChat test suite with compile-and-run script
- Add test-chat-parsing step to CI build workflow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor: move local model networking into LocalChat, add fake server e2e tests
- Add LocalChatError typed enum (serverUnreachable, modelNotFound, serverError)
- Add LocalChat.fetchModels with embedding model filter (nomic-embed, bge, etc.)
- Add LocalChat.streamChat: full SSE streaming with typed error handling
- Add LocalChat.progressiveFilter for partial think-block suppression
- ClaudeService delegates local streaming entirely to LocalChat.streamChat
- Add tests/fake_local_llm.py: stdlib Python server with think blocks, null-content
deltas, model filter, unknown model 404, and Markdown streaming
- ChatParsingTests: unit tests + 4 end-to-end tests against fake server
- test-chat-parsing.sh starts/stops fake server with port-file handoff
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Local model connect flow, Markdown improvements, and docs update
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix pill hints, local model error flow, streaming scroll, and docs polish
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Make the chat test server start reliably on CI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* design: agent pills, Settings agents section, model picker mockups
Three additions to notch-buddy.html:
- Agent pills: Gemini CLI (#4285F4), Antigravity (#FF7043), Codex (#22C55E)
with two togglable variants (A: tinted bg / B: colored top accent)
- Settings panel: Agents section with per-tool install/uninstall buttons,
inline diff preview and result directly under each row
- Model picker: variant A (compact dropdowns) and variant B (provider chips)
each with a provider-change animation (wink or surprised, togglable)
New sim buttons: "Agents mélangés" and "Fin d'une session Gemini".
All controls in a new "Nouveautés" panel at the bottom of the controls.
* feat: agent pills variant B, multi-provider model picker, provider animation
Pills: top gradient accent + tool color label (uppercased) replacing the
plain grey label; border at higher opacity; shadow on hover.
Model picker: provider chips (Anthropic / Google / OpenAI) + model list
popover accessible from a capsule button in the chat prompt view. Mochi
plays the "surprised" emote whenever the provider changes.
Multi-provider chat: ClaudeService routes to chatOpenAICompatible() for
Google and OpenAI (OpenAI-compatible endpoint); API keys stored in
Keychain (google-api-key, openai-api-key); per-provider model choice
persisted in UserDefaults.
Settings: new "Chat — autres fournisseurs" section with Google and
OpenAI API key fields.
Prototype: variant B locked as default in notch-buddy.html.
* Keep the shipped pill design and add the rule to CLAUDE.md
* Load chat models from each provider's API
* Keep hidden views from pushing the island header off screen
* Declare your tools in Settings with a pill catalog
* Update the docs for the pill catalog and the multi-provider chat
* Keep the design mockups out of the prototype
- CHANGELOG: entry for n°12
- docs/AGENTS.md: new file — JSON format, hook command examples,
event table, quick test for third-party agent integration
- docs/INTEGRATIONS.md §1: mention --agent flag and coucou_agent field
- README: update Claude Code bullet to mention other agents
- supportDir and log dir created at 0700; socket file set to 0600 after bind
- getpeereid check on each accepted connection (same-UID only)
- 32 concurrent-connection ceiling (NSLock counter, decremented via defer)
- SO_RCVTIMEO of 5 s and 1 MiB payload limit in handleClient
- listen backlog raised to 32
- Shared appendAppLog/escapedForLog in AppLog.swift; nbLog and n8nLog delegate to it
- Log files capped at 1 MiB (rotated on write), set to 0600
- PreToolUse and PermissionRequest log only the tool name (no command, no step text)
- N8nPoller logs host+path only (no full URL), response byte count (no content),
workflow name only (no execution detail)
- Resend error logging drops the response body
Co-authored-by: Vignesh <Vignesh.thangamariappan@gmail.com>
Co-authored-by: Cris1670 <20190806+Cris1670@users.noreply.github.com>
- Move safeWebURL(_:) from IslandViewContent.swift to SafeWebURL.swift
so it can be compiled and tested independently
- Add tests/SafeWebURLTests.swift: 15 cases (5 accepted, 10 rejected)
- Add scripts/test-safe-links.sh on the same model as test-screen-geometry.sh
- Add "Test link filter" step to build.yml after "Test screen geometry"
- CHANGELOG: add entry for http/https-only links (#16)
- docs/INTEGRATIONS.md: document that Open button is disabled for non-web URLs
- docs/support.html: typographic apostrophes in French no-notch FAQ answer
Co-authored-by: Cris1670 <20190806+Cris1670@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>