Rename the flags to browser-*, and take browser config as one JSON object - #84
Merged
Conversation
--cua-tools becomes --browser-tools, and the commands are /browser and /browser-tools: someone selecting browser tools should not have to learn what CUA stood for. The four browser-configuration flags collapse into one --browser-options JSON object forwarded verbatim to Kernel's create call. A flag per field grows every time the SDK does; JSON tracks it for free. The only default is timeout_seconds: 600, because the failure it prevents is a browser vanishing mid-task -- which also means stealth is no longer forced on and has to be asked for.
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.
First slice of 5c: the user-facing vocabulary. Nothing here is a rename of internals — that's the next slice — but flags and commands are what people type, so they're worth getting right before the sweep.
Flags name the domain, not the acronym
--cua-tools→--browser-tools,--cua-coordinates→--browser-coordinates, and the commands become/browserand/browser-tools. Someone selecting browser tools shouldn't have to learn what CUA stood for.Four browser flags become one JSON object
Before, one flag per field of Kernel's browser-create call:
That surface grows every time the SDK does. Now:
--browser-optionsis forwarded verbatim, so a field the SDK adds tomorrow needs no change here — a test pins that by passing an invented field through.The only default is
timeout_seconds: 600, since the failure it prevents is a browser vanishing mid-task.One behavior change worth flagging:
stealth: trueused to be hardcoded and unconditional — the earlier hands-on QA pass got stealth seven times without ever asking for it. It's now opt-in via the JSON. That's the right default for a library (don't silently pick a mode for the caller), but it does mean an existing invocation that relied on implicit stealth has to say so.--browser-sessionstill attaches an existing browser and is rejected in combination with--browser-options, since attaching and configuring-a-new-one are contradictory.Verification
typecheck 0, cua-ai 99, cua-agent 283, cua-pi-extension 33— two new tests cover the JSON parsing, including the failure modes that would otherwise silently do nothing (invalid JSON, a JSON array, and the attach/configure conflict).Still ahead in 5c
The big mechanical slice: collapse
cua-ai+cua-agent+cua-pi-extensioninto one@onkernel/loopwithcore/andpi/subpaths and api.extensionsentry, renameCua*→Loop*(domain concepts toComputerUse*), move tool identities to thekloop.prefix, and drop thepi-ai/pi-agent-corere-exports so consumers import pi from pi.Note
Medium Risk
Breaking CLI renames and stealth becoming opt-in can change real browser sessions for existing invocations; JSON passthrough is flexible but misconfiguration now fails at parse time rather than via typed flags.
Overview
User-facing CLI and commands now use browser naming instead of CUA:
--browser-tools,--browser-coordinates,/browser, and/browser-toolsreplace the oldcua-*equivalents. Status lines, stderr warnings, and error text follow the same vocabulary.Browser provisioning config is collapsed into
--browser-session(attach) plus--browser-options, a JSON object passed through to Kernel’sbrowsers.create. The removed flags (--cua-profile-id, save-changes, proxy, timeout) are expressible in that JSON.--browser-sessioncannot be combined with--browser-options.Behavior changes: owned browsers default to
timeout_seconds: 600(was 300 via flag).stealthis no longer forced on create—callers must set it in JSON if they want it. Create payloads are built as default timeout plus spread of parsed JSON.Docs, changelog, and tests are updated for the new flags and for
parseBrowserOptionsvalidation (invalid JSON, non-object, attach+configure conflict).Reviewed by Cursor Bugbot for commit aadf8ce. Bugbot is set up for automated code reviews on this repo. Configure here.