* refactor: define canvas UI as an SDK client tool
Send a JSON-defined canvas_ui_client tool on new, profile-based, and resumed conversation requests while retaining the legacy Python registration for persisted conversations. Normalize the new SDK event kinds to the existing Canvas UI rendering.
Co-authored-by: smolpaws <engel@enyst.org>
Co-authored-by: openhands <openhands@all-hands.dev>
* fix: omit canvas client tool from ACP launches
* refactor: rename canvas client tool
Use the semantic canvas_ui_control name and contain the SDK-generated action discriminator behind exported constants.
Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
---------
Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Debug Agent <157206163+simonrosenberg@users.noreply.github.com>
Stop clearing browser state when the Browser tab first mounts, and instead
reset it only when switching to a different conversation. This preserves the
URL and screenshot that were already emitted for the active conversation.
Also update the canvas_ui browser guidance so agents capture a screenshot with
browser_get_state(include_screenshot=true) before opening the Browser tab.
browser_navigate alone only updates the URL, which left the panel blank even
though navigation succeeded.
Add regression coverage for both behaviors:
- preloaded browser screenshots survive first Browser tab mount
- browser state still resets on conversation change
- canvas_ui browser instructions require screenshot capture before opening
the Browser tab
Co-authored-by: Tim O'Farrell <tofarr@gmail.com>
* feat: add canvas_ui tool so the agent can drive the UI
* refactor: update the code based on feedback
* fix: failing tests
* refactor: update the code based on feedback