Skip to content

Publish Sonny as its own Homebrew formula - #148

Merged
lydakis merged 53 commits into
mainfrom
claude/project-thread-45hlbm-homebrew
Oct 26, 2026
Merged

lydakis merged 53 commits into
mainfrom
claude/project-thread-45hlbm-homebrew

Conversation

@lydakis

@lydakis lydakis commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Last of five stacked PRs. It is based on #147.

What

Sonny ships as brew install lydakis/agent/sonny, a formula beside the Agent cask. It uses the same tag and release, so the app stays in the cask. A formula's download isn't quarantined, so Sonny needs no signing.

release.yml:

  • The version check now includes sonny/Cargo.toml.

  • Sonny is built for both architectures, then combined with lipo.

  • The packaging step builds sonny-X.Y.Z.tar.gz:

    • bin/sonny, the universal binary;
    • libexec/agent, the app's signed daemon.

    Sonny's daemon is the same version as Sonny. agent_bin() already looks in ../libexec/agent.

  • It checks the architectures and that both --version outputs match, then renders sonny.rb.

  • Both files go into the checksums, the attestation and the release.

publish-homebrew.yml:

  • Downloads and verifies the Sonny assets, and prepares the formula with prepare_homebrew_update.py --kind formula.
  • Validates it with brew style, brew audit --formula --strict --online, then install, test and uninstall.
  • Pushes Formula/sonny.rb to lydakis/homebrew-agent beside the cask. The cask path doesn't change.

app/release/homebrew_formula.py (new) renders the formula. The version is inferred from the URL.

Docs: docs/APP.md and sonny/README.md.

Nothing here is tagged or published. The first run happens at the next release, and only when George says so.

Tests

  • python3 -m unittest in app/release: 27 pass, including new formula tests and FormulaUpdateTest.
  • The workflow YAML parses.
  • The macOS steps (lipo, brew audit, install) only run on the release runner, so they haven't run yet.

No visible change, so no screenshots.

Stack

  1. Add configure: change a bot's model, effort, instructions and gate #144 configure
  2. Share the project file and ~/.agent/env reader in agent-client #145 shared project file and env reader
  3. Add Sonny, a terminal coordinator for a folder's agents #146 Sonny
  4. Draw SVG, Mermaid, math and HTML pages as pictures in Sonny #147 pictures
  5. This PR: Homebrew formula

claude added 10 commits October 26, 2026 00:31
Protocol 14. configure replaces what a bot's client chose when it made
it: its instructions, a model of the same family with an optional
effort, and a root bot's gate (approve: [] alone removes it; a bot
another bot made keeps the gates it descends from). It is refused
while a turn runs or waits parked, answers which fields changed, and
tells followers with a live configured event. ready.providers now
names the efforts each binding's family takes, and the client keeps
it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
The app's project file helpers and its ~/.agent/env reader move to
agent-client, so a terminal client composes a lead the app's way.
Finding a folder's project now stops at its repository's top, and the
home folder's project applies to home itself only, so a repo under
home is never claimed by it. The coordinator lists only its own
project's agents when it names or finds a task.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
Sonny opens a folder's lead in a Codex-style TUI, lays each task out as
a Rex window, and offers /model, /approvals, /status, /sound, /copy,
/open and /quit. Agents get a rex-windows skill, and an errand skill
when Errand is installed; Errand runs are drawn as calls, and detached
jobs open in their own Rex window. Pictures come in a follow-up.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
In a terminal that speaks the Kitty graphics protocol (Rex, Kitty,
Ghostty), Sonny draws a reply's SVG, Mermaid (through Pele), math
(through MathJax) and HTML pages as pictures, and agents get a
pictures skill saying so. Elsewhere they stay text.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
Each release also builds a universal sonny, packs it with the app's
signed agent daemon as sonny-X.Y.Z.tar.gz, and renders Formula/sonny.rb;
publish-homebrew validates and pushes the formula beside the Agent cask,
under the same tag. A formula's download is not quarantined, so sonny
needs no signing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
A steer restarts the demo script within a turn, and a turn keys its
calls by id, so each request now names its calls afresh.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T02:34:38.042714Z c2fcc8e New commits
🔒 Security Review ✅ Completed 2026-10-26T02:35:56.790508Z c2fcc8e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

claude added 15 commits October 26, 2026 00:55
Clearing the thinking binding makes the next request strip thinking
written under the old instructions. The docs now say a client-made
fork's gates can be replaced too, since that client could make an
ungated bot anyway.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…nect

- History and live results read Anthropic tool_use/tool_result blocks
  as calls and outputs, so Claude bots' calls show with their output.
- A history read the daemon cut at its byte limit asks for the rest.
- Calls still running when Sonny attaches finish live.
- After a reconnect the fleet reads the project's bots again, opening
  tasks that started meanwhile and marking stopped ones idle.
- An Errand listing that runs past three seconds is killed.
- A new lead takes the project file's model and effort first.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
A tool_started event carries a 2 KiB preview of a call's arguments, so
a truncated one is read from the bot's items. The bot is inspected
after the replay is skipped, so a turn that ended meanwhile is not
shown as running.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
- CSS variables are filled in inside tags only, so a Mermaid label
  that reads var(--x) stays as written.
- Image ids keep a 16-bit count, so pictures still in scrollback keep
  theirs for the first 65,535.
- A fence a reply never closed shows its lines as code when the reply
  ends, instead of vanishing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…figure

A turn that ran before configure moved the bot keeps the model and effort
it ran at, in its record and as the cache the next turn takes as held. A
keyed creation keeps a fingerprint of the instructions it was sent with,
so a resend still matches after they are replaced. Schema 49.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
A failed edit, write or read shows its error instead of the change it
asked for. A call denied before it started is read from the bot's items
and shown as denied. Sonny opened anywhere in a project attaches to the
lead working in the project's folder, makes it there when missing, and
refuses a same-named lead working elsewhere. Reconnecting pages back to
the last node drawn and matches results to calls kept from before. The
next page of approvals shows once the first is answered. An unclosed
$( and a backslash before a non-ASCII character no longer crash the
renderer.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
- Reconnecting reads the bot after the replay, so a turn that ends
  meanwhile is not lost, and starts the approver again in auto mode.
- A turn whose prompt history already drew still counts as running.
- Errand handles are read from the matching result, Anthropic too.
- `sonny show` finds a dotted project by its lead.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b49f9c560c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/release/homebrew_formula.py Resolved
claude added 16 commits October 26, 2026 01:46
The daemon outlives Sonny and gives agents its own path as AGENT_BIN.
Started from the versioned keg, that path is gone after an upgrade and
brew cleanup. The formula's sonny wrapper now names the opt path.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
- A hunk range that doesn't start with - or + is read as line 1 rather
  than sliced mid-character.
- While /status holds the screen, the newest 5,000 transcript lines wait
  for it and a note says how many earlier ones went by.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
- A call waiting on the person is written above the status row in full,
  every line of its command, before y can allow it.
- Bots Sonny makes get the default compaction instructions, as the CLI's
  and the app's do, so long conversations can compact.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…, unclosed fences

A call listed with cut arguments is shown whole, read from the node that
planned it; when that read fails, y is refused and n denies it. Errand runs
are keyed by bot and call, since call ids repeat across bots. Transcript
lines go into scrollback in chunks a u16 row count holds. A fence or $$
block still open when a reply ends shows as code instead of vanishing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LutDnsMA6fqW8Qwj2Wcoks
…-thread-45hlbm-pictures

# Conflicts:
#	sonny/src/main.rs
#	sonny/src/transcript.rs
@lydakis
lydakis changed the base branch from claude/project-thread-45hlbm-pictures to main October 26, 2026 02:32
# Conflicts:
#	sonny/README.md
#	sonny/src/main.rs
@lydakis
lydakis merged commit dd42c8e into main Oct 26, 2026
This was referenced Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants