Repository navigation
feat(buzz): an always-on agent type that your Sunport runs - #35
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hold until the Sunport side is released. Don't merge this before Sunports and
oocan 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, idhosted, sits beside theagenttype, which is unchanged. The new type has Buzz'sremote: { provision, activate, profile, remove, interrupt }and norun,modelsortimeoutMs, which is what Buzz requires of a hosted type. Each step:oo buzz hosted <step>withhost.spawn(notrunCommand, which has a 5 s deadline);oo buzz hosted <step>readsprovision{name, picture?, community, config?, signal}{community, name, picture?}{id, pubkey}{pubkey, picture?}, the picture it was made withactivate{pubkey, name, community, auth, config?, signal}{pubkey, community, name, auth}{state}profile{pubkey, community, name, picture?, signal}{pubkey, community, name, picture?}{}remove{pubkey, community, signal}{pubkey, community}{}interrupt{pubkey, community, channelId, threadRootId, signal}{pubkey, community, channel, root}{stopped}stopped === trueauthis the owner's proof that the agent is theirs. It's passed through exactly as Buzz hands it over.configisn't sent to oo, andpictureis 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 login, and try again."oo update, then try again."remove, Buzz shows its own message ("…its provider couldn't remove it…") and logs the reason.Deadlines and Stop:
signal. On abort, the plugin endsooand rejects with the abort reason.Manifest:
{ "id": "oo-buzz", "program": "oo", "args": ["buzz", "hosted"] }, besideoo acp.Packaging:
scripts/package.py checkallows exactly these two processes and nothing else.tests/test_package.pyadds four refusals: another program for the hosted steps, all ofoo buzz, a third process, and no hosted process.Tests (
tests/test_buzz_plugin.mjs, run by the existingBuzz pluginjob): three changes to the stand-in for Buzz's plugin context:end(data)writes and then closes stdin, as Buzz's does.tests/hosted_stub.mjsis a stuboo 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'sstopped.New cases:
run,modelsortimeoutMs, beside the local type, which still hasrunand its 30 min timeout;The 11 existing cases are unchanged and pass.
README (the root "Buzz Desktop" section and the package README) explains the always-on way:
oo buzz renew).Version: unchanged (0.6.35). The Buzz manifest carries no version.
package.py buildgives the sameSHA256SUMSasmain.Checks (local)
python scripts/package.py checkpassed.python -m unittest discover -s testsran 19 tests, OK.python scripts/package.py buildpassed. ItsSHA256SUMSis identical tomain's.claude plugin validate ./plugins/openorange --strictandclaude plugin validate . --strictboth passed.node --test --test-timeout=30000 tests/test_buzz_plugin.mjsran 19 tests (11 existing, 8 new), all passed, in about 7 s. The 6 s activate case takes most of that.plugin.js, each of these four breaks failed the test meant to catch it:check, the unit tests and the Buzz plugin test pass on a clean export of each commit.Risk
Low for anyone using the plugin today.
oo buzz hostedaccess.Once merged, the always-on type works only with a Sunport and
oothat haveoo buzz hosted. That's why it's held.https://claude.ai/code/session_01DvkuVrmRRHS8Tvc4JRv2pq