+
    lHàjß!  ã                  ó  a € 0 t $ R t^ RIHt ^ RIHtHt / RRRR. RKORR/bR	RRR. RLORR
/bRRRRR/bRRRRR/bRRRRR/bRRRRR/bRRRRRR/R^R^RR/bRRRR. RMORR/bRRRRRRR. RNO/RR/bRRRRR/bR RRRR!/bR"RRRRR/R^R^RR#/bR$RRRRR/R^R^RR%/bR&RRR. ROORR'/bR(RRRR)/bR*RRRR+/bR,RRRR-/bR.RRRR//R0RR1RR2/R3RR4RR5/R6RRRR7R8.RR9/R:RR4RR;/R<RR4RR=//CtR>]R?&   R@RARRBRCRRDRE]RFR.//t	R>]RG&   RH RI lt
RJ# )Pu�  Schema for the generic `computer_use` tool (model-facing; value is byte-frozen â€”
the schema goes to the model every turn, so prompt-cache parity depends on it).

Model-agnostic: any tool-calling model can drive this. Vision-capable models
should prefer `capture(mode='som')` then `click(element=N)` â€” much more reliable
than pixel coordinates, which remain supported for models trained on them.
)Úannotations)ÚAnyÚDictÚactionÚtypeÚstringÚenumÚdescriptionu
  Which action to perform. `capture` is free (no side effects). All other actions require approval unless auto-approved. Use `set_value` for select/popup elements and sliders â€” it selects the matching option directly without opening the native menu (no focus steal).Úmodeu  Capture mode. `som` (default) is a screenshot with numbered overlays on every interactable element plus the AX tree â€” best for vision models, lets you click by element index. `vision` is a plain screenshot. `ax` is the accessibility tree only (no image; useful for text-only models).Úappa  Optional. Limit capture/action to one app (name e.g. 'Safari', or bundle ID). Omitted = frontmost window. app='screen' = composited full-screen grab (image only, no clickable elements); app='desktop' = the OS desktop/shell surface (wallpaper, icons, taskbar) with its elements.ÚpidÚintegerzqOptional exact process target for action='capture'. Pair with window_id when discovery cannot resolve an X11 app.Ú	window_idzšOptional exact native window target for action='capture'. Pair with pid when an external cua-driver list_windows lookup has already identified the window.ÚelementzoThe 1-based SOM index returned by the last `capture(mode='som')` call. Strongly preferred over raw coordinates.Ú
coordinateÚarrayÚitemsÚminItemsÚmaxItemsz†Pixel coordinates [x, y] relative to the captured window screenshot (top-left origin). Only use this if no element index is available.ÚbuttonzMouse button. Defaults to left.Ú	modifiersz%Modifier keys held during the action.Úfrom_elementzSource element index (drag).Ú
to_elementzTarget element index (drag).Úfrom_coordinatez3Source [x,y] (drag; use when no element available).Úto_coordinatez3Target [x,y] (drag; use when no element available).Ú	directionzScroll direction.ÚamountzScroll wheel ticks. Default 3.ÚvaluezàFor action='set_value': the value to set on the element. For AXPopUpButton / select dropdowns, pass the option's display label (e.g. 'Blue'). For sliders and other AXValue-settable elements, pass the numeric or string value.Útextz+Text to type (respects the current layout).ÚkeyszUKey combo, e.g. 'cmd+s', 'ctrl+alt+t', 'return', 'escape', 'tab'. Use '+' to combine.ÚsecondsÚnumberz wait: seconds to pause (max 30).Úraise_windowÚbooleanuº   Only for action='focus_app'. If true, brings the window to front (DISRUPTS the user). Default false â€” input is routed to the app without raising, matching the background co-work model.Údelivery_modeÚ
backgroundÚ
foregroundu{  For input actions (click, type, key, drag, scroll). `background` (DEFAULT) delivers without raising the window or stealing focus. `foreground` briefly fronts the window then restores focus â€” a visible change needing its own approval; use it only when a result's verdict tells you to escalate there. Each result's `verdict` carries the next step; follow it rather than guessing.Úbring_to_frontzýOptional and only valid with delivery_mode='foreground'. Explicitly invokes cua-driver's standalone bring_to_front tool before the input; it is never passed as an input property. This persistent focus change has a separate approval scope. Default false.Úcapture_afterz‘If true, take a follow-up capture after the action and include it in the response. Saves a round-trip when you need to verify an action's effect.údict[str, Any]Ú_PROPERTIESÚnameÚcomputer_useu¼  Drive the desktop via cua-driver â€” screenshots, mouse, keyboard, scroll, drag â€” on macOS, Windows, and Linux. Input is background-FIRST, not background-only: the default delivery routes to the target window without stealing the user's cursor or focus (works even on hidden/minimized windows), and when a result's `verdict` says to escalate you climb â€” pixel coordinates, or delivery_mode='foreground' (briefly fronts the window; separate approval). Each result carries a `verdict` with the next step; follow it â€” never repeat confirmed input, and re-capture to verify an unverifiable one before retrying. Workflow: action='capture' (mode='som' gives numbered element overlays), then click by `element` index; re-capture after state-changing actions (or pass capture_after=true). Image captures include a shareable `screenshot_path`; deliver it via the platform's MEDIA syntax when the user asks to see it â€” not for captures used only for control.Ú
parametersÚobjectÚ
propertiesÚrequiredÚCOMPUTER_USE_SCHEMAc               ó   € V ^8„  d   QhRR/# )é   Úreturnr)   © )Úformats   "Ú>/home/ubuntu/.hermes/hermes-agent/tools/computer_use/schema.pyÚ__annotate__r8   Î   s   € ÷ ñ  ñ ó    c                 ó   € \         # )z2Return the generic OpenAI function-calling schema.)r1   r5   r9   r7   Úget_computer_use_schemar;   Î   s   € äÐr9   N)ÚcaptureÚclickÚdouble_clickÚright_clickÚmiddle_clickÚdragÚscrollr   ÚkeyÚ	set_valueÚwaitÚ	list_appsÚlist_windowsÚ	focus_app)ÚsomÚvisionÚax)ÚleftÚrightÚmiddle)
ÚcmdÚshiftÚoptionÚaltÚctrlÚfnÚwinÚwindowsÚsuperÚmeta)ÚupÚdownrL   rM   )Ú__conditional_annotations__Ú__doc__Ú
__future__r   Útypingr   r   r*   Ú__annotations__r1   r;   )r[   s   @r7   Ú<module>r`      sE  øðôõ #ç ðiØØ�Øò 
ð  	ðð'ðið4 Ø�ØÒ'Øð7ð		ð5iðH 
Ø�Øð*ððIiðZ 
Ø�	Øð3ðð[iðh Ø�	ØðYððiiðv Ø�	Øð.ððwiðD Ø�Ø�&˜)Ð$Ø�AØ�AØðGð	ðEiðX Ø�ØÒ+ØÐ8ððYiðb Ø�ØØ�HØò ð
ð 	Ð>ð#ðciðH �V˜Y¨Ð7UÐVðIiðJ �6˜9 mÐ5SÐTðKiðL Ø�Ø�&˜)Ð$Ø�AØ�AØÐLððMiðZ Ø�Ø�&˜)Ð$Ø�AØ�AØÐLðð[iðh �&˜( FÒ,KÈ]Ð\oÐpðiiðj ˆv�y -Ð1QÐRðkiðl Ø�ØðKððmið| ˆV�X˜}Ð.[Ð\ð}ið~ Ø�ØØcðð �˜ -Ð1SÐTØØ�	Øððð Ø�Ø�˜|Ð,Øð9ð	
ð Ø�	Øððð Ø�	ØðMðñEi€ˆ^ó iðX ˆNØð
	Zð �6˜8 \°;À
ÈXÈJÐWð'Ð �^ó ÷$r9   