Skip to content

feat(buzz): an always-on agent type that your Sunport runs - #35

Merged
ztsalexey merged 3 commits into
mainfrom
feat/buzz-always-on
Nov 26, 2026
Merged

ztsalexey merged 3 commits into
mainfrom
feat/buzz-always-on

Conversation

@ztsalexey

Copy link
Copy Markdown
Contributor

Hold until the Sunport side is released. Don't merge this before Sunports and oo can run always-on agents (oo buzz hosted). Until then, people would see an agent type that can't work.

Buzz Desktop lets a plugin bring a hosted agent type, whose agents run somewhere else. This PR adds one to the OpenOrange plugin, called "OpenOrange (always on)". The owner's Sunport keeps the agent's key and answers in Buzz itself, so the agent answers the owner's mentions even when Buzz Desktop is closed and the computer is off. This computer only makes, sets up, renames and removes the agent, through oo buzz hosted.

What changes

Plugin (plugin.js): a second type, id hosted, sits beside the agent type, which is unchanged. The new type has Buzz's remote: { provision, activate, profile, remove, interrupt } and no run, models or timeoutMs, which is what Buzz requires of a hosted type. Each step:

  • starts the declared process oo buzz hosted <step> with host.spawn (not runCommand, which has a 5 s deadline);
  • writes the step's input to its stdin as one JSON object, then closes stdin;
  • reads one JSON object from its stdout.
Step Buzz calls it with oo buzz hosted <step> reads oo answers Buzz gets back
provision {name, picture?, community, config?, signal} {community, name, picture?} {id, pubkey} {pubkey, picture?}, the picture it was made with
activate {pubkey, name, community, auth, config?, signal} {pubkey, community, name, auth} {state} nothing
profile {pubkey, community, name, picture?, signal} {pubkey, community, name, picture?} {} nothing
remove {pubkey, community, signal} {pubkey, community} {} nothing
interrupt {pubkey, community, channelId, threadRootId, signal} {pubkey, community, channel, root} {stopped} stopped === true

auth is the owner's proof that the agent is theirs. It's passed through exactly as Buzz hands it over. config isn't sent to oo, and picture is sent only when Buzz gives one.

What the owner sees when a step fails. Buzz shows the error in the New agent dialog or on the agent. After a failed activate, it also offers Finish setup.

  • oo exits non-zero: the owner sees its last line on stderr, so oo can print progress first. If stderr is empty: "oo stopped without saying why."
  • oo isn't installed: "The oo command was not found on this computer. Install it from your Sunport (Connect, then Command line), run oo login, and try again."
  • oo exits 0, but its stdout isn't a JSON object: "oo's answer could not be read. Update oo with oo update, then try again."
  • For remove, Buzz shows its own message ("…its provider couldn't remove it…") and logs the reason.

Deadlines and Stop:

  • No step has a deadline. Activate waits while the owner signs in to Buzz in the browser.
  • Each step follows Buzz's signal. On abort, the plugin ends oo and rejects with the abort reason.
  • A step called with a signal that has already aborted starts nothing, so activate doesn't open the browser.
  • Buzz runs one step at a time for each agent and asks a failed step again. The Sunport side makes each step safe to repeat; for example, a repeated provision returns the same agent.

Manifest:

  • A second process, { "id": "oo-buzz", "program": "oo", "args": ["buzz", "hosted"] }, beside oo acp.
  • The description covers both ways.

Packaging: scripts/package.py check allows exactly these two processes and nothing else. tests/test_package.py adds four refusals: another program for the hosted steps, all of oo buzz, a third process, and no hosted process.

Tests (tests/test_buzz_plugin.mjs, run by the existing Buzz plugin job): three changes to the stand-in for Buzz's plugin context:

  • it keeps every registered type;
  • it starts the stub named for each declared process;
  • its end(data) writes and then closes stdin, as Buzz's does.

tests/hosted_stub.mjs is a stub oo buzz hosted. It records each call's arguments and stdin, and answers according to a scenario in its environment: wait, hang, fail with a reason, exit silently, a raw answer, or interrupt's stopped.

New cases:

  • the type is registered as hosted, with its five steps and no run, models or timeoutMs, beside the local type, which still has run and its 30 min timeout;
  • provision sends the community, name and picture, and returns the key and that picture; without a picture, neither side has one;
  • a repeated provision returns the same agent;
  • activate passes the owner's proof through and waits for an oo that takes 6 s, longer than the 5 s Buzz gives a declared command;
  • a failing step shows oo's last stderr line; the silent-exit and unreadable-answer messages are covered too;
  • an abort ends oo, leaving no process, and rejects; a step that was already aborted starts nothing;
  • profile, remove and interrupt map their arguments, and interrupt returns false when oo stopped nothing;
  • a missing oo gives the install message.

The 11 existing cases are unchanged and pass.

README (the root "Buzz Desktop" section and the package README) explains the always-on way:

  • what it is, and that it needs a current Sunport;
  • the steps: Agents › New agent › Custom › Harness › OpenOrange (always on) (under Remote), one sign-in in the browser, then add the agent to a channel and mention it;
  • that it answers only your own mentions;
  • that Buzz asks for a new sign-in from time to time (oo buzz renew).

Version: unchanged (0.6.35). The Buzz manifest carries no version. package.py build gives the same SHA256SUMS as main.

Checks (local)

  • Package (Python 3.14.8; CI pins 3.14.7):
    • python scripts/package.py check passed.
    • python -m unittest discover -s tests ran 19 tests, OK.
    • python scripts/package.py build passed. Its SHA256SUMS is identical to main's.
  • Claude validation (Claude Code 2.1.291): claude plugin validate ./plugins/openorange --strict and claude plugin validate . --strict both passed.
  • Buzz plugin (Node 24.22.1): node --test --test-timeout=30000 tests/test_buzz_plugin.mjs ran 19 tests (11 existing, 8 new), all passed, in about 7 s. The 6 s activate case takes most of that.
  • The tests catch regressions. On scratch copies of plugin.js, each of these four breaks failed the test meant to catch it:
    • a 5 s deadline on steps: the activate case fails;
    • an ignored abort: the abort case runs into its 30 s timeout;
    • interrupt passing Buzz's names unmapped: the interrupt case fails;
    • the first stderr line shown instead of the last: the failure case fails.
  • Each commit on its own: check, the unit tests and the Buzz plugin test pass on a clean export of each commit.
  • Live tools: not run. Nothing here changes what that job reads.

Risk

Low for anyone using the plugin today.

  • The local type is unchanged.
  • An installed copy keeps its files and access until its owner installs this update. Buzz shows that update for review, including the new oo buzz hosted access.
  • Nobody has to reconnect or sign in again. Only creating an always-on agent asks for its one sign-in to Buzz.

Once merged, the always-on type works only with a Sunport and oo that have oo buzz hosted. That's why it's held.

https://claude.ai/code/session_01DvkuVrmRRHS8Tvc4JRv2pq

The Buzz manifest declares a second process, `oo buzz hosted`, beside
`oo acp`, for the always-on agent type's steps. `package.py check`
allows exactly these two processes and nothing else; its test covers a
changed program, all of `oo buzz`, a third process and a missing one.

Claude-Session: https://claude.ai/code/session_01DvkuVrmRRHS8Tvc4JRv2pq
`openorange.agents` registers a second agent type beside the local one:
`hosted`, "OpenOrange (always on)", a type Buzz calls hosted, with
provision, activate, profile, remove and interrupt and no run, models or
timeoutMs. The owner's Sunport keeps the agent's key and answers in Buzz
itself, so the agent answers while this computer is off.

Each step runs `oo buzz hosted <step>` through the declared process: its
input as a JSON object on stdin, its answer as one on stdout, and on a
non-zero exit the last stderr line is the reason the owner sees. No step
has a deadline (activate waits for the owner's browser sign-in); each
honours Buzz's signal by ending oo and rejecting, and a call Buzz no
longer waits for starts nothing. A missing oo gets the install message.
Buzz's `channelId` and `threadRootId` reach oo as `channel` and `root`;
provision gives Buzz the key with the picture it was made with.

The local type is unchanged and its tests pass as they were. A stub
`oo buzz hosted` (tests/hosted_stub.mjs) records each call's arguments
and input; the Buzz plugin job runs the new cases with the old ones.

Claude-Session: https://claude.ai/code/session_01DvkuVrmRRHS8Tvc4JRv2pq
What an always-on agent is, that it needs a current Sunport, the steps
(the harness "OpenOrange (always on)", one sign-in in the browser, then
add it to a channel and mention it), that it answers only the owner's
own mentions, and `oo buzz renew` when Buzz asks for a new sign-in.

Claude-Session: https://claude.ai/code/session_01DvkuVrmRRHS8Tvc4JRv2pq
@ztsalexey ztsalexey changed the title feat(buzz): an always-on agent type that your Sunport runs (hold until the Sunport side is released) feat(buzz): an always-on agent type that your Sunport runs Nov 26, 2026
@ztsalexey
ztsalexey merged commit e1b4c4b into main Nov 26, 2026
7 checks passed
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.

1 participant