The Cloud ran only PR Reviewer. It now runs what each Mochi needs:
- GitHub events: new PR (PR Reviewer), new issue (Issue Triage), an issue
labelled for an unscheduled Night Shift, a failed run on the default
branch (CI Fixer, its failed logs in the prompt);
- schedules in the user's time zone, once per slot (Night Shift takes the
oldest labelled issue it hasn't worked on, Deps & Security, Ship Log from
the week's commits);
- a click on the Mac (POST /v1/mochis/:id/run: Release Prep, or any of them now);
- Prod Watch every 15 minutes, no AI, a run only when an address changes.
A Mochi that changes files is asked, once its report is written, to run a
pack script mounted in the sandbox: the changed files go to the session's
outputs and the Worker keeps them until the click, which makes the draft PR
with GitHub's API (blobs, tree, commit, a mochi/ branch, the PR). Nothing is
pushed from the sandbox, which keeps read-only tokens; each GitHub token asks
only what its step needs. Issue Triage's reply is posted on the issue.
Mac: brain 0.9.1 sends kind, tools, schedule, label, addresses, runs a day
and the time zone; a Cloud Mochi no longer runs on the Mac's schedule, Run
now goes to the Cloud, turning one on or off reaches the Cloud, and Cloud
runs keep their link and what started them. The Cloud page lists Prod Watch
and says why a Mochi stays on the Mac.
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
Co-authored-by: Claude <noreply@anthropic.com>
- The plans page (Coucou › Plans and the onboarding's Cloud page, where it scrolls over the
troupe): a card per offer (its name, what it is, the price, three lines of what you get, its
button), a comparison table (everything on the Mac, open source, works while the Mac sleeps,
Mochis in the Cloud, AI, no key, yearly price, cancel anytime), then five questions.
- Choose: GitHub sign-in first when needed (the code shown on the page), then Stripe Checkout in
the browser. In the onboarding the Cloud page opens at the end for the key and the GitHub app.
- Prices in dollars: the Cloud says usd, and stripe-setup moves the price's lookup key to a
price (the euro one is archived).
- The moon comes out of the notch and goes back into it, as the sun.
- The Plans button keeps its word on one line.
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
Co-authored-by: Claude <noreply@anthropic.com>
The Cloud is now sold: Free (everything on the Mac, unchanged) and
« Cloud · your key » at 9 €/month (the AI on the user's own Anthropic key).
Solo, Pro and Max are listed as coming, until the credit offers open.
Worker (billing.ts): the offers in one place (GET /v1/plans, public, so a
price changes without an app update); Stripe Checkout and the customer
portal, opened in the browser (the card never touches Coucou); the signed
Stripe webhook keeps the subscription's state; a user's Mochis run in the
Cloud only with an active subscription (past_due included while Stripe
retries) or a login in COMP_LOGINS (Louis-CFM). Without STRIPE_SECRET_KEY,
billing is off. Under the VAT franchise: no VAT, the invoice footer says
« TVA non applicable, article 293 B du CGI »; STRIPE_TAX turns Stripe Tax on.
The new user columns are added by the Worker itself.
scripts/stripe-setup.mjs makes the price, the portal and the webhook, and
pipes the webhook's secret straight into wrangler.
brain: `cloud subscribe`, `cloud billing` (--json gives the URL to the app);
`cloud status` carries the offer and the offers.
App: the offers view (CloudPlans.swift, for the onboarding too), a
« Choose your offer » step in the Cloud setup, the offer on the account
card (renews / ends / payment failed, Manage, See the offers); the switch
to move a Mochi needs the offer. 28 strings in the 16 languages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
A repo Mochi can now be Autonomous (editor › What it may do): it does what
is safe and can be undone on its own — opens the draft PR, posts the review
as a comment, replies on the issue — and tells you after. It never merges,
pushes to main, approves or sends a mail; a mail Mochi only drafts and only
a repo Mochi can be autonomous.
- brain: level "autonome"; runMochi posts with the user's git and gh right
away and records it on the run (auto: applied + url, or failed + error).
A post GitHub refuses waits for the click instead. A Cloud Mochi's level
goes to the Cloud when it is saved.
- Worker: mochis.autonomous and runs.auto; when a run is collected, an
autonomous Mochi's review is posted at once. The columns are added to the
existing database by the Worker itself, no command to run.
- Notch: "PR Reviewer posted its review on PR #12" with Open, nothing to
click. Results: "Posted its review on PR #12 on its own" with Open.
- Cloud page: the Mochis as small tiles (a switch each, Soon for the others,
the level shown); the refresh button is gone, the page refreshes itself
every minute while open; a run posted on its own says so, with Open.
12 new strings in the 16 languages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
A new page in the Mochis section of the Hub for Coucou Cloud:
- the setup in three steps: sign in with GitHub (device code shown in
the app), the Anthropic key (Coucou's own or pasted, sent to brain on
stdin, never in the arguments), the GitHub app on the repositories;
- then where it stands: the account and the Cloud's health, this month's
runs, cost and what waits for a click, the repo Mochis with a switch
to move them to the Cloud ("Soon" for those it can't run yet), and the
latest runs with Read and Post review.
- a small cloud badge on Cloud Mochis in Team, on their results, and on
the notch card.
brain: `cloud status`, `login-start` / `login-finish`, `key --stdin`,
and --json on add, remove and pull; login takes its defaults from
brain.config.json (cloudUrl, cloudClientId, cloudInstallUrl).
Worker: GET /v1/me (login, key set, installations, Cloud Mochis).
51 new strings in the 16 languages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
Found while checking the Cloud's security: anyone could sign in, name
someone else's repository in a Cloud Mochi, and that Mochi would run on
the owner's pull_request events. On a private repository its session
would get a clone token, so its instructions could read the code.
- A pull_request event only starts the Mochis of the user who installed
the app where the event comes from (installations.id = the event's).
- PUT /v1/mochis refuses repositories whose owner has no installation
of this user, and says which; brain cloud add says so and the Mac keeps
watching.
- The Worker reads the PR with a token limited to that repository,
pull_requests and contents read; the sandbox clones (private only) with
a token limited to that repository, contents read. Neither can post or
push; posting still needs the click.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
From the Cloud's second review (now in English): the key command no longer
leaves pipefail and f in the terminal, uses find (zsh fails on an
unmatched glob before 2>/dev/null), only takes a key downloaded in the
last 30 minutes, says which one, and says so when there is none. Step 6
starts with brain mochi key, which brain cloud key needs. Also: the name
of the install option, Redeliver after fixing a 401, and a Linux note.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
From the Cloud's own review of this PR: the steps were circular (the key
before the Worker exists, the webhook secret after the form that needs
it), the key command could upload an empty secret and then delete the
only copy if openssl failed (now set -o pipefail, and only after both
worked), and *.pem could pick another file (now *private-key.pem).
Running the secret command again is fine as long as the app gets the
last one; a 401 in the deliveries says how to fix it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
Where GitHub now puts the private key (Credentials → Key pairs), the key
piped to Cloudflare without an intermediate file, the webhook secret made
once and kept in the clipboard, and how to check the deliveries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
A Cloudflare Worker (cloud/) that runs the PR Reviewer while the Mac is
off: a GitHub App webhook for pull_request starts a Claude Managed Agents
session on the subscriber's own Anthropic key, on the PR's head commit,
with the diff in the prompt and a spend ceiling; a cron collects the
finished sessions every minute; the review waits until the click posts
it as a comment. D1 keeps the GitHub id and login, the hash of the Mac's
token, the Anthropic key sealed with AES-GCM, the Cloud Mochis and each
run's result. Never the code.
The prompt and the Managed Agents requests move to two modules with no
Node API, shared by the brain and the Worker: brain/src/prompt-core.ts
(buildRepoPrompt, languageRule, repoSystem) and brain/src/cloud-core.ts
(the client, the diff, agent/environment/session params, summarize,
looksLikeReport, withoutNotes). brain cloud try now uses them too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT