Repository navigation
In a MAWS session, name the in-app browser in js's search hint, js's rules and the host notes (#368) - #385
Merged
Conversation
…rules and the host notes (refs #368) With a MAWS backend configured (inAppBrowser), the texts an agent reads before it ever loads profiles_list now say that cua.getBrowser() with no id is this session's in-app browser: js's hint names it first, js's rules carry the MAWS rule (profiles_list's wording plus where no profiles_list call is needed), and the host notes gain that rule after their head on the browser surfaces. serve() passes the backend's presence to settingsFrom for the notes; a custom CUA_SHIM_HOST_NOTES is left alone. With no backend every text is byte for byte unchanged (pinned by digest). Sminos-Session: cursor235#b93055dd (cua on macbook)
…n, before the Chrome sentence (refs #368) The appended "no profiles_list call is needed for it" followed the Chrome-profile sentence, so a reader of js alone could take "it" to be the Chrome profile and skip profiles_list for Chrome. Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
What changes
In a MAWS session (a MAWS backend in
CUA_BROWSER_BACKENDS, with the browser surface on), the texts an agent reads beforeprofiles_listnow name the session's in-app browser:js's search hint: "control macos apps, this session's MAWS in-app browser and the user's chrome profiles: click, type, fill forms, read, screenshot". With the browser surface alone, the hint is "operate this session's MAWS in-app browser and the user's chrome browser profiles: …".js's rules gain a line before the Chrome pointer: "In MAWS: cua.getBrowser() with no id is this session's in-app browser (key maws), the pane the user watches; use it for any page, and it needs no profiles_list call. Use a Chrome profile only when the user names one, and then follow profiles_list's rules."MAWS_RULEverbatim after the head line. The worst-caseinitializeinstructions are now 1,496 characters, within the 2,048 limit.With no MAWS backend, every model-facing text is byte for byte as on main. A sha256 pin covers every host note, hint, rule and
jsdescription across platform × surface set × devices; it was computed on main's source before the change.Why
Under tool search,
profiles_listis deferred, so an agent could find and calljswithout ever readingMAWS_RULE, which lived only inprofiles_list's description. It then tested pages in a separate browser and asked the person to click (#368's "Seen").Not done
The ticket's optional item 4 (a line in the browser docs that the first
jscall returns) is skipped. That text is the vendor's, built in the runtime host's launch overrides, and that path is deliberately MAWS-neutral (serve-lazy's test). The new rule already sits injs's own description, above the vendor docs.Verification
node --test test/mcp-maws-hint.test.mjs test/mcp-browser-surface.test.mjs test/mcp-server.test.mjs test/serve-lazy.test.mjs test/serve-maws.test.mjs test/chrome-client-mode.test.mjs, 98/98 passing. The newserve()-level test fails if the MAWS re-read is removed.src/mcp/.Plugin 0.28.2.
Closes #368
Sminos-Session: cursor235#b93055dd (cua on macbook)