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
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