allternit-computer-driver 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (17) hide show
  1. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/PKG-INFO +1 -1
  2. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/allternit_computer_driver/_v2_types.py +3 -2
  3. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/allternit_computer_driver.egg-info/PKG-INFO +1 -1
  4. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/pyproject.toml +1 -1
  5. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/README.md +0 -0
  6. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/allternit_computer_driver/__init__.py +0 -0
  7. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/allternit_computer_driver/anthropic.py +0 -0
  8. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/allternit_computer_driver/client.py +0 -0
  9. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/allternit_computer_driver/gemini.py +0 -0
  10. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/allternit_computer_driver/openai.py +0 -0
  11. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/allternit_computer_driver/py.typed +0 -0
  12. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/allternit_computer_driver/v2.py +0 -0
  13. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/allternit_computer_driver.egg-info/SOURCES.txt +0 -0
  14. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/allternit_computer_driver.egg-info/dependency_links.txt +0 -0
  15. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/allternit_computer_driver.egg-info/requires.txt +0 -0
  16. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/allternit_computer_driver.egg-info/top_level.txt +0 -0
  17. {allternit_computer_driver-0.2.0 → allternit_computer_driver-0.3.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: allternit-computer-driver
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Drop-in drivers for Allternit hosted computers: a plain client, contract-v2 structured UI driving (read_ui, act, run_batch, verify, run_subtask, …) and Anthropic (computer/browser toolset), OpenAI computer-use and Gemini computer_use adapters.
5
5
  License: Apache-2.0
6
6
  Project-URL: Documentation, https://docs.allternit.com/api/platform/sdks/python
@@ -188,9 +188,10 @@ _ComputerV2RequestHumanInputRequired = TypedDict("_ComputerV2RequestHumanInputRe
188
188
 
189
189
 
190
190
  class ComputerV2RequestHumanInput(_ComputerV2RequestHumanInputRequired, total=False):
191
- """Pause and hand the computer to a person: the live view opens with input enabled and the agent's hold on control is released. The same session resumes when the person signals done, or when timeout_ms elapses. Use for CAPTCHAs, push/SMS 2FA and judgment calls."""
191
+ """Pause and hand the computer to a person: the live view opens with input enabled and the agent's hold on control is released. The same session resumes when the person signals done, or when timeout_ms elapses. Use for CAPTCHAs, push/SMS 2FA and judgment calls. Pass secret to ask for a one-off secret in a masked box instead of handing over control."""
192
192
  reason: Optional[str]
193
193
  timeout_ms: Optional[int]
194
+ secret: Optional[Dict[str, Any]]
194
195
 
195
196
  _ComputerV2UseCredentialInputRequired = TypedDict("_ComputerV2UseCredentialInputRequired", {"name": str})
196
197
 
@@ -251,7 +252,7 @@ class ComputerV2SkillsInput(_ComputerV2SkillsInputRequired, total=False):
251
252
  """List the saved skills (taught recordings) this person can run with run_skill: name, goal, app, input names, step count, last use. Pass forget to delete one first."""
252
253
  forget: Optional[str]
253
254
 
254
- COMPUTER_V2_CONTRACT: Dict[str, Any] = json.loads("{\"id\":\"allternit.computer.v2\",\"toolset\":\"computer\",\"version\":2,\"members\":[{\"name\":\"screenshot\",\"description\":\"Take a screenshot of the screen.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"screenshot\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{},\"required\":[],\"additionalProperties\":false}},{\"name\":\"zoom\",\"description\":\"Take a screenshot of a rectangular region. Region coordinates are in the full-screenshot space (not physical display pixels). The crop is scaled up to fill the image budget so fine details become legible.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"screenshot\",\"scale_fields\":{\"region\":\"rect\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"region\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":4,\"maxItems\":4,\"description\":\"(x0, y0, x1, y1): The region to capture.\"}},\"required\":[\"region\"],\"additionalProperties\":false}},{\"name\":\"left_click\",\"description\":\"Click the left mouse button at the specified (x, y) pixel coordinate, or the current cursor position if `coordinate` is omitted.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Clicked.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"right_click\",\"description\":\"Click the right mouse button at the specified (x, y) pixel coordinate, or the current cursor position if `coordinate` is omitted.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Right-clicked.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"middle_click\",\"description\":\"Click the middle mouse button at the specified (x, y) pixel coordinate, or the current cursor position if `coordinate` is omitted.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Middle-clicked.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"double_click\",\"description\":\"Double-click the left mouse button at the specified (x, y) pixel coordinate, or the current cursor position if `coordinate` is omitted.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Double-clicked.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"triple_click\",\"description\":\"Triple-click the left mouse button at the specified (x, y) pixel coordinate, or the current cursor position if `coordinate` is omitted.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Triple-clicked.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"mouse_move\",\"description\":\"Move the cursor to a specified (x, y) pixel coordinate. Use this ONLY to hover without clicking; otherwise use a click action directly.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Moved the mouse.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"}},\"required\":[\"coordinate\"],\"additionalProperties\":false}},{\"name\":\"left_click_drag\",\"description\":\"Click and drag the cursor from `start_coordinate` to `coordinate`.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Dragged.\",\"scale_fields\":{\"start_coordinate\":\"point\",\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"start_coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[\"coordinate\",\"start_coordinate\"],\"additionalProperties\":false}},{\"name\":\"left_mouse_down\",\"description\":\"Press and hold the left mouse button at the current cursor position.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Left mouse button pressed.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{},\"required\":[],\"additionalProperties\":false}},{\"name\":\"left_mouse_up\",\"description\":\"Release the left mouse button.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Left mouse button released.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{},\"required\":[],\"additionalProperties\":false}},{\"name\":\"scroll\",\"description\":\"Scroll the screen at the specified (x, y) pixel coordinate, or the current cursor position if `coordinate` is omitted. Do NOT use PageUp/PageDown to scroll.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Scrolled {scroll_direction}.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"scroll_amount\":{\"type\":\"number\",\"description\":\"Number of 'clicks' of the scroll wheel.\"},\"scroll_direction\":{\"type\":\"string\",\"enum\":[\"up\",\"down\",\"left\",\"right\"]},\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[\"scroll_amount\",\"scroll_direction\"],\"additionalProperties\":false}},{\"name\":\"type\",\"description\":\"Type a string of text on the keyboard.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Typed.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"text\":{\"type\":\"string\",\"description\":\"The text to type.\"}},\"required\":[\"text\"],\"additionalProperties\":false}},{\"name\":\"key\",\"description\":\"Press a key or key-combination on the keyboard. Use \\\"+\\\" to combine modifiers with a key (e.g. \\\"ctrl+s\\\", \\\"alt+Tab\\\", \\\"ctrl+shift+Escape\\\"). Key names are case-insensitive; common names like \\\"Return\\\", \\\"Tab\\\", \\\"Escape\\\", \\\"Up\\\", \\\"Down\\\", \\\"Left\\\", \\\"Right\\\", \\\"Home\\\", \\\"End\\\", \\\"Page_Up\\\", \\\"Page_Down\\\", \\\"Delete\\\", \\\"BackSpace\\\" are supported.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Pressed {text}.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"text\":{\"type\":\"string\",\"description\":\"The key or key-combination to press.\"},\"repeat\":{\"type\":\"number\",\"description\":\"Number of times to repeat the key press. Default is 1.\"}},\"required\":[\"text\"],\"additionalProperties\":false}},{\"name\":\"hold_key\",\"description\":\"Hold down a key or key-combination for a specified duration. Uses the same key syntax as `key`.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Held {text} for {duration}s.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"duration\":{\"type\":\"number\",\"description\":\"Duration to hold the key, in seconds.\"},\"text\":{\"type\":\"string\",\"description\":\"The key or key-combination to hold.\"}},\"required\":[\"duration\",\"text\"],\"additionalProperties\":false}},{\"name\":\"wait\",\"description\":\"Wait for a specified duration.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Waited {duration}s.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"duration\":{\"type\":\"number\",\"description\":\"Duration to wait, in seconds.\"}},\"required\":[\"duration\"],\"additionalProperties\":false}},{\"name\":\"cursor_position\",\"description\":\"Get the current (x, y) pixel coordinate of the cursor.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"point\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{},\"required\":[],\"additionalProperties\":false}},{\"name\":\"read_ui\",\"description\":\"Read the target window or app's UI as a structured element tree (roles, names, values, bounds) with NO screenshot. Returns stable element ids for act, run_batch and verify. Pass `since` (a version from an earlier read_ui) to get only the diff; `query` filters by text; `max_elements` caps the list (default 200). When the window has no usable accessibility tree (canvas apps, games, remote desktops, custom-drawn UIs) the read falls back to vision: numbered set-of-marks regions come back as elements with `source: \\\"vision\\\"` and a `mark` number, and act on their ids works the same way. `source` and `source_reason` say which was used. Pass `target` (a description such as 'the Export button') to ground it with the local grounder: `grounded.id` is the element to act on.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Read the UI of {app}.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"},\"query\":{\"type\":\"string\",\"description\":\"Only elements whose name or value contains this text.\"},\"max_elements\":{\"type\":\"integer\",\"description\":\"Cap the element list (default 200).\"},\"since\":{\"type\":\"integer\",\"description\":\"A map version from an earlier read_ui: answer only the changes since then.\"},\"paths\":{\"type\":\"boolean\",\"description\":\"Add each element's tree path (role:ordinal chain from the window). Replay locators use it; you rarely need it.\"},\"crops\":{\"type\":\"boolean\",\"description\":\"Add an 8x8 pixel hash per element (macOS). Slower: forces a fresh walk of the window. Replay's pixel fallback uses it.\"},\"vision\":{\"type\":\"string\",\"enum\":[\"auto\",\"off\",\"only\"],\"description\":\"The vision fallback: auto (default; used when the tree is empty or can't see into part of the window), off (tree only), only (vision only).\"},\"target\":{\"type\":\"string\",\"description\":\"Ground this description to one element with the local grounder; the answer's `grounded` has its id, point and confidence.\"},\"zoom\":{\"type\":\"string\",\"enum\":[\"auto\",\"always\",\"never\"],\"description\":\"target: zoom into a crop around a low-confidence answer and ground again (default auto).\"}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"act\",\"description\":\"Act on an element id from read_ui (tree ids and vision ids alike; a vision element is clicked or typed into at its centre after a pixel freshness check, and menu needs a window). op: click, set_value (clear and set the field's value), select (pick a child by name), press (a key), menu (choose a menu path such as 'File > Save'), focus. set_value/select/press on this Mac need the person's approval (the same rule as typing).\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"{op} on {id}.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"The element id from read_ui.\"},\"op\":{\"type\":\"string\",\"enum\":[\"click\",\"set_value\",\"select\",\"press\",\"menu\",\"focus\"],\"description\":\"What to do to the element.\"},\"value\":{\"type\":\"string\",\"description\":\"set_value: the text to type into the element; select: the child's name to pick.\"},\"key\":{\"type\":\"string\",\"description\":\"press: the key name (Return, Tab, Escape, ...).\"},\"path\":{\"anyOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}],\"description\":\"menu: the menu path, 'File > Save' or ['File', 'Save'].\"},\"version\":{\"type\":\"integer\",\"description\":\"The read_ui map version this action was planned on; a stale version is refused with the fresh map.\"},\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"}},\"required\":[\"id\",\"op\"],\"additionalProperties\":false}},{\"name\":\"run_batch\",\"description\":\"Run ordered steps in one window in a single call: act steps ({id, op, value?, key?}), menu steps (path), pixel steps ({tool, args}) and waits (ms). Each step may carry wait_for (checked before the step) and expect (checked after); a failed check stops the batch and one observe read returns the fresh map. This is the fast path: batch several steps instead of screenshot-per-action loops.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Ran {steps} batch steps.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"},\"version\":{\"type\":\"integer\",\"description\":\"Pin the read_ui map version the steps were planned on; stale is refused with the fresh map.\"},\"steps\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":50,\"items\":{\"type\":\"object\",\"properties\":{\"act\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"click\",\"set_value\",\"select\",\"press\",\"menu\",\"focus\"]},\"value\":{\"type\":\"string\"},\"key\":{\"type\":\"string\"}},\"required\":[\"id\",\"op\"],\"additionalProperties\":false},\"menu\":{\"anyOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"pixel\":{\"type\":\"object\",\"properties\":{\"tool\":{\"type\":\"string\"},\"args\":{\"type\":\"object\"}},\"required\":[\"tool\"],\"additionalProperties\":false},\"wait\":{\"type\":\"number\",\"description\":\"Wait this many milliseconds before the next step.\"},\"wait_for\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"An element id from read_ui.\"},\"role\":{\"type\":\"string\",\"description\":\"An accessibility role, e.g. button, textfield, checkbox.\"},\"name\":{\"type\":\"string\",\"description\":\"Substring match against the element's name/label.\"},\"text\":{\"type\":\"string\",\"description\":\"Substring match against the element's displayed text or value.\"},\"gone\":{\"type\":\"boolean\",\"description\":\"True: no element may match; false: at least one must.\"},\"value\":{\"type\":\"string\",\"description\":\"The element's value must equal this exactly.\"},\"enabled\":{\"type\":\"boolean\",\"description\":\"The element's enabled state must equal this.\"}},\"required\":[],\"additionalProperties\":false,\"description\":\"Precondition: checked before the step; failure stops the batch.\"},\"expect\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"An element id from read_ui.\"},\"role\":{\"type\":\"string\",\"description\":\"An accessibility role, e.g. button, textfield, checkbox.\"},\"name\":{\"type\":\"string\",\"description\":\"Substring match against the element's name/label.\"},\"text\":{\"type\":\"string\",\"description\":\"Substring match against the element's displayed text or value.\"},\"gone\":{\"type\":\"boolean\",\"description\":\"True: no element may match; false: at least one must.\"},\"value\":{\"type\":\"string\",\"description\":\"The element's value must equal this exactly.\"},\"enabled\":{\"type\":\"boolean\",\"description\":\"The element's enabled state must equal this.\"}},\"required\":[],\"additionalProperties\":false,\"description\":\"Postcondition: checked after the step; failure stops the batch.\"},\"timeout_ms\":{\"type\":\"integer\",\"description\":\"How long to wait for this step's checks (default 3000).\"}},\"required\":[],\"additionalProperties\":false}}},\"required\":[\"steps\"],\"additionalProperties\":false}},{\"name\":\"verify\",\"description\":\"Check bounded conditions on the current UI without acting: role, name, text, gone, value, enabled. Each check is {id?, role?, name?, text?, gone?, value?, enabled?}; all given parts must hold. Returns one ok per check. Use after act/run_batch, or to poll with timeout_ms.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Verified.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"},\"checks\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":20,\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"An element id from read_ui.\"},\"role\":{\"type\":\"string\",\"description\":\"An accessibility role, e.g. button, textfield, checkbox.\"},\"name\":{\"type\":\"string\",\"description\":\"Substring match against the element's name/label.\"},\"text\":{\"type\":\"string\",\"description\":\"Substring match against the element's displayed text or value.\"},\"gone\":{\"type\":\"boolean\",\"description\":\"True: no element may match; false: at least one must.\"},\"value\":{\"type\":\"string\",\"description\":\"The element's value must equal this exactly.\"},\"enabled\":{\"type\":\"boolean\",\"description\":\"The element's enabled state must equal this.\"}},\"required\":[],\"additionalProperties\":false}},\"timeout_ms\":{\"type\":\"integer\",\"description\":\"Wait up to this long for every check to hold (default 0: one fresh read).\"}},\"required\":[\"checks\"],\"additionalProperties\":false}},{\"name\":\"request_human\",\"description\":\"Pause and hand the computer to a person: the live view opens with input enabled and the agent's hold on control is released. The same session resumes when the person signals done, or when timeout_ms elapses. Use for CAPTCHAs, push/SMS 2FA and judgment calls.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Human window closed ({reason}).\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"reason\":{\"type\":\"string\",\"description\":\"What the person should do, shown in the live view (e.g. 'Complete the CAPTCHA').\"},\"timeout_ms\":{\"type\":\"integer\",\"description\":\"How long to wait for the person (default 300000, max 1800000).\"}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"use_credential\",\"description\":\"Type a vault credential into the FOCUSED field. The value never enters the model context, prompts or logs. kind: secret (the stored value) or totp (a fresh code from a stored TOTP seed). The credential is bound to an app or domain: pass `domain` (the app you are filling into); it must match the credential's binding. On this Mac a person approves each use, like typing.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Credential {name} typed.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The credential's name in the vault.\"},\"kind\":{\"type\":\"string\",\"enum\":[\"secret\",\"totp\"],\"description\":\"secret: type the stored value; totp: generate and type a fresh TOTP code.\"},\"source\":{\"type\":\"string\",\"enum\":[\"vault\",\"keychain\",\"bitwarden\",\"onepassword\"],\"description\":\"Where to resolve the credential from (default: the sealed vault, then this Mac's Keychain).\"},\"domain\":{\"type\":\"string\",\"description\":\"The app or domain the credential is being typed into; checked against the credential's binding.\"}},\"required\":[\"name\"],\"additionalProperties\":false}},{\"name\":\"run_subtask\",\"description\":\"Hand a bounded UI subtask (fill a form, search and pick a result, toggle settings) to the fast decision loop instead of driving each step yourself. Give the goal, the literal inputs it may type (it never invents text), success checks in verify syntax, and limits. Each step reads the element map, picks one action from the visible elements x allowed ops with a ~100 ms typed decision (POST /v1/decisions), runs it through the same lease/approval/audit path (predictable steps batched with expect checks), and checks success with verify. Returns a step trace and a status: done, escalated (with the reason and the current screen: continue from there yourself), or failed. One approval covers the whole subtask on this computer. Repeat subtasks replay from the cache with zero decisions (the result's cache block says hit, healed, recorded or miss); only subtasks with at least one exact (non-ask) success check are cached. Input values are never stored, only their names. With api_options, an MCP/API call you hold is offered ahead of GUI steps (status use_api hands it back to you). With best_of N and computers, N rollouts run on N sandbox computers and a judge picks one by step narratives.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Ran the subtask.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"goal\":{\"type\":\"string\",\"description\":\"What the subtask must achieve, in one or two sentences (e.g. 'Fill the sign-up form and submit it').\"},\"inputs\":{\"type\":\"array\",\"maxItems\":20,\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"What the value is (e.g. 'email', 'full name').\"},\"value\":{\"type\":\"string\",\"description\":\"The literal text to type.\"}},\"required\":[\"name\",\"value\"],\"additionalProperties\":false},\"description\":\"The only text the subtask may type. Not for secrets: use use_credential.\"},\"success\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":10,\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"An element id from read_ui.\"},\"role\":{\"type\":\"string\",\"description\":\"An accessibility role, e.g. button, textfield, checkbox.\"},\"name\":{\"type\":\"string\",\"description\":\"Substring match against the element's name/label.\"},\"text\":{\"type\":\"string\",\"description\":\"Substring match against the element's displayed text or value.\"},\"gone\":{\"type\":\"boolean\",\"description\":\"True: no element may match; false: at least one must.\"},\"value\":{\"type\":\"string\",\"description\":\"The element's value must equal this exactly.\"},\"enabled\":{\"type\":\"boolean\",\"description\":\"The element's enabled state must equal this.\"},\"ask\":{\"type\":\"string\",\"description\":\"A fuzzy yes/no check in plain words (\\\"Is the confirmation message showing?\\\"), answered by a typed verify decision over the screen. Use only when role/name/text/value checks can't express it.\"}},\"required\":[],\"additionalProperties\":false},\"description\":\"Checks that all hold when the goal is met, in verify syntax ({role?, name?, text?, value?, gone?, enabled?}) or {ask: '...'} for a fuzzy yes/no. Without checks the loop stops when a decision picks done.\"},\"constraints\":{\"type\":\"object\",\"properties\":{\"ops\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"click\",\"set_value\",\"select\",\"press\",\"focus\"]},\"description\":\"Ops the subtask may use (default click, set_value, select, press).\"},\"avoid\":{\"type\":\"array\",\"maxItems\":20,\"items\":{\"type\":\"string\"},\"description\":\"Never act on elements whose name contains any of these.\"},\"allow_irreversible\":{\"type\":\"boolean\",\"description\":\"Let the subtask click buttons named like send, pay, buy, delete, publish (default false: those hand back to you).\"}},\"required\":[],\"additionalProperties\":false},\"max_steps\":{\"type\":\"integer\",\"description\":\"Most actions the subtask may take (default 12, at most 40).\"},\"budget_ms\":{\"type\":\"integer\",\"description\":\"Wall-clock budget in milliseconds (default 60000, at most 300000).\"},\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"},\"query\":{\"type\":\"string\",\"description\":\"Only consider elements whose name or value contains this text.\"},\"max_elements\":{\"type\":\"integer\",\"description\":\"Cap the elements read per step (default 120).\"},\"cache\":{\"type\":\"string\",\"enum\":[\"auto\",\"off\",\"refresh\"],\"description\":\"Replay cache (default auto). auto: a subtask seen before (same goal, app and window, same input names) replays its recorded steps with no decisions, checking each with verify, and re-infers only a step whose element moved; a new one runs the decision loop and is recorded once its success checks hold. refresh: ignore the cached steps and record anew. off: neither read nor write the cache.\"},\"save_as\":{\"type\":\"string\",\"description\":\"Save this subtask's recording as a named skill once it succeeds (overwrites a skill of that name). Run it later with run_skill and new input values.\"},\"api_options\":{\"type\":\"array\",\"maxItems\":10,\"items\":{\"type\":\"object\",\"properties\":{\"tool\":{\"type\":\"string\",\"description\":\"The MCP tool or API action you can call yourself (e.g. 'github.create_issue').\"},\"description\":{\"type\":\"string\",\"description\":\"What it does, in one line.\"}},\"required\":[\"tool\"],\"additionalProperties\":false},\"description\":\"MCP tools or API actions you hold that could do this goal without the GUI. They are offered ahead of every GUI option on the first step; if the decision picks one, the subtask stops with status use_api and names it, and you make that call yourself. An API call beats GUI clicks when both exist.\"},\"best_of\":{\"type\":\"integer\",\"description\":\"Behavior Best-of-N for high-value subtasks: run N rollouts (2-5) at once on N sandbox computers listed in computers, then a judge decision picks one by the rollouts' step narratives. Sandbox/cloud computers only, never the person's own machine. Returns the chosen rollout, why, and every rollout's narrative.\"},\"computers\":{\"type\":\"array\",\"maxItems\":5,\"items\":{\"type\":\"string\"},\"description\":\"With best_of: the sandbox computer ids the rollouts run on, one rollout per computer (at least best_of distinct ids).\"},\"max_cost_usd\":{\"type\":\"number\",\"description\":\"With best_of: the cap on decision spend for the whole call in USD (default 0.25, at most 5). The judge may use the planner-class tier only while under it.\"}},\"required\":[\"goal\"],\"additionalProperties\":false}},{\"name\":\"run_parallel\",\"description\":\"Run independent bounded subtasks on separate computers at the same time (one run_subtask per computer, each under its own computer's control lease), and get every result back in order. Each subtask names its computer (default: this one) and takes run_subtask's fields. One computer never runs two subtasks at once: a repeated computer, or one another subtask is already driving, is refused. Limits: max_parallel subtasks at once, a total budget_ms, and max_cost_usd on decision spend; subtasks that can't start inside them come back skipped. One approval covers the whole call when any subtask targets a non-sandbox computer.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Ran the subtasks.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"subtasks\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":8,\"items\":{\"type\":\"object\",\"properties\":{\"computer\":{\"type\":\"string\",\"description\":\"The computer id this subtask runs on (default: the computer this call is made on).\"},\"goal\":{\"type\":\"string\",\"description\":\"What the subtask must achieve, in one or two sentences (e.g. 'Fill the sign-up form and submit it').\"},\"inputs\":{\"type\":\"array\",\"maxItems\":20,\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"What the value is (e.g. 'email', 'full name').\"},\"value\":{\"type\":\"string\",\"description\":\"The literal text to type.\"}},\"required\":[\"name\",\"value\"],\"additionalProperties\":false},\"description\":\"The only text the subtask may type. Not for secrets: use use_credential.\"},\"success\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":10,\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"An element id from read_ui.\"},\"role\":{\"type\":\"string\",\"description\":\"An accessibility role, e.g. button, textfield, checkbox.\"},\"name\":{\"type\":\"string\",\"description\":\"Substring match against the element's name/label.\"},\"text\":{\"type\":\"string\",\"description\":\"Substring match against the element's displayed text or value.\"},\"gone\":{\"type\":\"boolean\",\"description\":\"True: no element may match; false: at least one must.\"},\"value\":{\"type\":\"string\",\"description\":\"The element's value must equal this exactly.\"},\"enabled\":{\"type\":\"boolean\",\"description\":\"The element's enabled state must equal this.\"},\"ask\":{\"type\":\"string\",\"description\":\"A fuzzy yes/no check in plain words (\\\"Is the confirmation message showing?\\\"), answered by a typed verify decision over the screen. Use only when role/name/text/value checks can't express it.\"}},\"required\":[],\"additionalProperties\":false},\"description\":\"Checks that all hold when the goal is met, in verify syntax ({role?, name?, text?, value?, gone?, enabled?}) or {ask: '...'} for a fuzzy yes/no. Without checks the loop stops when a decision picks done.\"},\"constraints\":{\"type\":\"object\",\"properties\":{\"ops\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"click\",\"set_value\",\"select\",\"press\",\"focus\"]},\"description\":\"Ops the subtask may use (default click, set_value, select, press).\"},\"avoid\":{\"type\":\"array\",\"maxItems\":20,\"items\":{\"type\":\"string\"},\"description\":\"Never act on elements whose name contains any of these.\"},\"allow_irreversible\":{\"type\":\"boolean\",\"description\":\"Let the subtask click buttons named like send, pay, buy, delete, publish (default false: those hand back to you).\"}},\"required\":[],\"additionalProperties\":false},\"max_steps\":{\"type\":\"integer\",\"description\":\"Most actions the subtask may take (default 12, at most 40).\"},\"budget_ms\":{\"type\":\"integer\",\"description\":\"Wall-clock budget in milliseconds (default 60000, at most 300000).\"},\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"},\"query\":{\"type\":\"string\",\"description\":\"Only consider elements whose name or value contains this text.\"},\"max_elements\":{\"type\":\"integer\",\"description\":\"Cap the elements read per step (default 120).\"},\"api_options\":{\"type\":\"array\",\"maxItems\":10,\"items\":{\"type\":\"object\",\"properties\":{\"tool\":{\"type\":\"string\",\"description\":\"The MCP tool or API action you can call yourself (e.g. 'github.create_issue').\"},\"description\":{\"type\":\"string\",\"description\":\"What it does, in one line.\"}},\"required\":[\"tool\"],\"additionalProperties\":false},\"description\":\"MCP tools or API actions you hold that could do this goal without the GUI. They are offered ahead of every GUI option on the first step; if the decision picks one, the subtask stops with status use_api and names it, and you make that call yourself. An API call beats GUI clicks when both exist.\"}},\"required\":[\"goal\"],\"additionalProperties\":false},\"description\":\"Independent subtasks, one per computer. Same fields as run_subtask plus computer.\"},\"max_parallel\":{\"type\":\"integer\",\"description\":\"Most subtasks running at once (default 4, at most 8).\"},\"budget_ms\":{\"type\":\"integer\",\"description\":\"Wall-clock budget for the whole call in milliseconds (default 120000, at most 600000). Each subtask's own budget_ms is cut to what is left when it starts.\"},\"max_cost_usd\":{\"type\":\"number\",\"description\":\"Cap on decision spend for the whole call in USD (default 0.25, at most 5). Once reached, subtasks not yet started come back skipped.\"}},\"required\":[\"subtasks\"],\"additionalProperties\":false}},{\"name\":\"run_skill\",\"description\":\"Run a saved skill (a recording taught with run_subtask save_as) by name, with new values for its inputs. It replays the recorded steps with no decisions, checks each step and the skill's success checks with verify, re-infers a step whose element moved and rewrites the recording. Returns the same result as run_subtask. List skills with the skills member.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Ran the skill {name}.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The skill's name (from skills).\"},\"inputs\":{\"type\":\"array\",\"maxItems\":20,\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"What the value is (e.g. 'email', 'full name').\"},\"value\":{\"type\":\"string\",\"description\":\"The literal text to type.\"}},\"required\":[\"name\",\"value\"],\"additionalProperties\":false},\"description\":\"A value for each of the skill's inputs (skills lists their names). Not for secrets: use use_credential.\"},\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"},\"max_steps\":{\"type\":\"integer\",\"description\":\"Most actions the subtask may take (default 12, at most 40).\"},\"budget_ms\":{\"type\":\"integer\",\"description\":\"Wall-clock budget in milliseconds (default 60000, at most 300000).\"}},\"required\":[\"name\"],\"additionalProperties\":false}},{\"name\":\"skills\",\"description\":\"List the saved skills (taught recordings) this person can run with run_skill: name, goal, app, input names, step count, last use. Pass forget to delete one first.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Listed the saved skills.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"forget\":{\"type\":\"string\",\"description\":\"Delete the saved skill with this name before listing.\"}},\"required\":[],\"additionalProperties\":false}}]}")
255
+ COMPUTER_V2_CONTRACT: Dict[str, Any] = json.loads("{\"id\":\"allternit.computer.v2\",\"toolset\":\"computer\",\"version\":2,\"members\":[{\"name\":\"screenshot\",\"description\":\"Take a screenshot of the screen.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"screenshot\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{},\"required\":[],\"additionalProperties\":false}},{\"name\":\"zoom\",\"description\":\"Take a screenshot of a rectangular region. Region coordinates are in the full-screenshot space (not physical display pixels). The crop is scaled up to fill the image budget so fine details become legible.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"screenshot\",\"scale_fields\":{\"region\":\"rect\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"region\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":4,\"maxItems\":4,\"description\":\"(x0, y0, x1, y1): The region to capture.\"}},\"required\":[\"region\"],\"additionalProperties\":false}},{\"name\":\"left_click\",\"description\":\"Click the left mouse button at the specified (x, y) pixel coordinate, or the current cursor position if `coordinate` is omitted.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Clicked.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"right_click\",\"description\":\"Click the right mouse button at the specified (x, y) pixel coordinate, or the current cursor position if `coordinate` is omitted.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Right-clicked.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"middle_click\",\"description\":\"Click the middle mouse button at the specified (x, y) pixel coordinate, or the current cursor position if `coordinate` is omitted.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Middle-clicked.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"double_click\",\"description\":\"Double-click the left mouse button at the specified (x, y) pixel coordinate, or the current cursor position if `coordinate` is omitted.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Double-clicked.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"triple_click\",\"description\":\"Triple-click the left mouse button at the specified (x, y) pixel coordinate, or the current cursor position if `coordinate` is omitted.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Triple-clicked.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"mouse_move\",\"description\":\"Move the cursor to a specified (x, y) pixel coordinate. Use this ONLY to hover without clicking; otherwise use a click action directly.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Moved the mouse.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"}},\"required\":[\"coordinate\"],\"additionalProperties\":false}},{\"name\":\"left_click_drag\",\"description\":\"Click and drag the cursor from `start_coordinate` to `coordinate`.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Dragged.\",\"scale_fields\":{\"start_coordinate\":\"point\",\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"start_coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[\"coordinate\",\"start_coordinate\"],\"additionalProperties\":false}},{\"name\":\"left_mouse_down\",\"description\":\"Press and hold the left mouse button at the current cursor position.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Left mouse button pressed.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{},\"required\":[],\"additionalProperties\":false}},{\"name\":\"left_mouse_up\",\"description\":\"Release the left mouse button.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Left mouse button released.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{},\"required\":[],\"additionalProperties\":false}},{\"name\":\"scroll\",\"description\":\"Scroll the screen at the specified (x, y) pixel coordinate, or the current cursor position if `coordinate` is omitted. Do NOT use PageUp/PageDown to scroll.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Scrolled {scroll_direction}.\",\"scale_fields\":{\"coordinate\":\"point\"},\"input_schema\":{\"type\":\"object\",\"properties\":{\"scroll_amount\":{\"type\":\"number\",\"description\":\"Number of 'clicks' of the scroll wheel.\"},\"scroll_direction\":{\"type\":\"string\",\"enum\":[\"up\",\"down\",\"left\",\"right\"]},\"coordinate\":{\"type\":\"array\",\"items\":{\"type\":\"number\"},\"minItems\":2,\"maxItems\":2,\"description\":\"(x, y): x pixels from the left edge, y pixels from the top edge.\"},\"text\":{\"type\":\"string\",\"description\":\"Optional key combination to hold down during this action (e.g. \\\"ctrl\\\", \\\"shift\\\", \\\"ctrl+shift\\\").\"}},\"required\":[\"scroll_amount\",\"scroll_direction\"],\"additionalProperties\":false}},{\"name\":\"type\",\"description\":\"Type a string of text on the keyboard.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Typed.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"text\":{\"type\":\"string\",\"description\":\"The text to type.\"}},\"required\":[\"text\"],\"additionalProperties\":false}},{\"name\":\"key\",\"description\":\"Press a key or key-combination on the keyboard. Use \\\"+\\\" to combine modifiers with a key (e.g. \\\"ctrl+s\\\", \\\"alt+Tab\\\", \\\"ctrl+shift+Escape\\\"). Key names are case-insensitive; common names like \\\"Return\\\", \\\"Tab\\\", \\\"Escape\\\", \\\"Up\\\", \\\"Down\\\", \\\"Left\\\", \\\"Right\\\", \\\"Home\\\", \\\"End\\\", \\\"Page_Up\\\", \\\"Page_Down\\\", \\\"Delete\\\", \\\"BackSpace\\\" are supported.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Pressed {text}.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"text\":{\"type\":\"string\",\"description\":\"The key or key-combination to press.\"},\"repeat\":{\"type\":\"number\",\"description\":\"Number of times to repeat the key press. Default is 1.\"}},\"required\":[\"text\"],\"additionalProperties\":false}},{\"name\":\"hold_key\",\"description\":\"Hold down a key or key-combination for a specified duration. Uses the same key syntax as `key`.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Held {text} for {duration}s.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"duration\":{\"type\":\"number\",\"description\":\"Duration to hold the key, in seconds.\"},\"text\":{\"type\":\"string\",\"description\":\"The key or key-combination to hold.\"}},\"required\":[\"duration\",\"text\"],\"additionalProperties\":false}},{\"name\":\"wait\",\"description\":\"Wait for a specified duration.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Waited {duration}s.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"duration\":{\"type\":\"number\",\"description\":\"Duration to wait, in seconds.\"}},\"required\":[\"duration\"],\"additionalProperties\":false}},{\"name\":\"cursor_position\",\"description\":\"Get the current (x, y) pixel coordinate of the cursor.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"point\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{},\"required\":[],\"additionalProperties\":false}},{\"name\":\"read_ui\",\"description\":\"Read the target window or app's UI as a structured element tree (roles, names, values, bounds) with NO screenshot. Returns stable element ids for act, run_batch and verify. Pass `since` (a version from an earlier read_ui) to get only the diff; `query` filters by text; `max_elements` caps the list (default 200). When the window has no usable accessibility tree (canvas apps, games, remote desktops, custom-drawn UIs) the read falls back to vision: numbered set-of-marks regions come back as elements with `source: \\\"vision\\\"` and a `mark` number, and act on their ids works the same way. `source` and `source_reason` say which was used. Pass `target` (a description such as 'the Export button') to ground it with the local grounder: `grounded.id` is the element to act on.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Read the UI of {app}.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"},\"query\":{\"type\":\"string\",\"description\":\"Only elements whose name or value contains this text.\"},\"max_elements\":{\"type\":\"integer\",\"description\":\"Cap the element list (default 200).\"},\"since\":{\"type\":\"integer\",\"description\":\"A map version from an earlier read_ui: answer only the changes since then.\"},\"paths\":{\"type\":\"boolean\",\"description\":\"Add each element's tree path (role:ordinal chain from the window). Replay locators use it; you rarely need it.\"},\"crops\":{\"type\":\"boolean\",\"description\":\"Add an 8x8 pixel hash per element (macOS). Slower: forces a fresh walk of the window. Replay's pixel fallback uses it.\"},\"vision\":{\"type\":\"string\",\"enum\":[\"auto\",\"off\",\"only\"],\"description\":\"The vision fallback: auto (default; used when the tree is empty or can't see into part of the window), off (tree only), only (vision only).\"},\"target\":{\"type\":\"string\",\"description\":\"Ground this description to one element with the local grounder; the answer's `grounded` has its id, point and confidence.\"},\"zoom\":{\"type\":\"string\",\"enum\":[\"auto\",\"always\",\"never\"],\"description\":\"target: zoom into a crop around a low-confidence answer and ground again (default auto).\"}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"act\",\"description\":\"Act on an element id from read_ui (tree ids and vision ids alike; a vision element is clicked or typed into at its centre after a pixel freshness check, and menu needs a window). op: click, set_value (clear and set the field's value), select (pick a child by name), press (a key), menu (choose a menu path such as 'File > Save'), focus. set_value/select/press on this Mac need the person's approval (the same rule as typing).\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"{op} on {id}.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"The element id from read_ui.\"},\"op\":{\"type\":\"string\",\"enum\":[\"click\",\"set_value\",\"select\",\"press\",\"menu\",\"focus\"],\"description\":\"What to do to the element.\"},\"value\":{\"type\":\"string\",\"description\":\"set_value: the text to type into the element; select: the child's name to pick.\"},\"key\":{\"type\":\"string\",\"description\":\"press: the key name (Return, Tab, Escape, ...).\"},\"path\":{\"anyOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}],\"description\":\"menu: the menu path, 'File > Save' or ['File', 'Save'].\"},\"version\":{\"type\":\"integer\",\"description\":\"The read_ui map version this action was planned on; a stale version is refused with the fresh map.\"},\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"}},\"required\":[\"id\",\"op\"],\"additionalProperties\":false}},{\"name\":\"run_batch\",\"description\":\"Run ordered steps in one window in a single call: act steps ({id, op, value?, key?}), menu steps (path), pixel steps ({tool, args}) and waits (ms). Each step may carry wait_for (checked before the step) and expect (checked after); a failed check stops the batch and one observe read returns the fresh map. This is the fast path: batch several steps instead of screenshot-per-action loops.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Ran {steps} batch steps.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"},\"version\":{\"type\":\"integer\",\"description\":\"Pin the read_ui map version the steps were planned on; stale is refused with the fresh map.\"},\"steps\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":50,\"items\":{\"type\":\"object\",\"properties\":{\"act\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"click\",\"set_value\",\"select\",\"press\",\"menu\",\"focus\"]},\"value\":{\"type\":\"string\"},\"key\":{\"type\":\"string\"}},\"required\":[\"id\",\"op\"],\"additionalProperties\":false},\"menu\":{\"anyOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"pixel\":{\"type\":\"object\",\"properties\":{\"tool\":{\"type\":\"string\"},\"args\":{\"type\":\"object\"}},\"required\":[\"tool\"],\"additionalProperties\":false},\"wait\":{\"type\":\"number\",\"description\":\"Wait this many milliseconds before the next step.\"},\"wait_for\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"An element id from read_ui.\"},\"role\":{\"type\":\"string\",\"description\":\"An accessibility role, e.g. button, textfield, checkbox.\"},\"name\":{\"type\":\"string\",\"description\":\"Substring match against the element's name/label.\"},\"text\":{\"type\":\"string\",\"description\":\"Substring match against the element's displayed text or value.\"},\"gone\":{\"type\":\"boolean\",\"description\":\"True: no element may match; false: at least one must.\"},\"value\":{\"type\":\"string\",\"description\":\"The element's value must equal this exactly.\"},\"enabled\":{\"type\":\"boolean\",\"description\":\"The element's enabled state must equal this.\"}},\"required\":[],\"additionalProperties\":false,\"description\":\"Precondition: checked before the step; failure stops the batch.\"},\"expect\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"An element id from read_ui.\"},\"role\":{\"type\":\"string\",\"description\":\"An accessibility role, e.g. button, textfield, checkbox.\"},\"name\":{\"type\":\"string\",\"description\":\"Substring match against the element's name/label.\"},\"text\":{\"type\":\"string\",\"description\":\"Substring match against the element's displayed text or value.\"},\"gone\":{\"type\":\"boolean\",\"description\":\"True: no element may match; false: at least one must.\"},\"value\":{\"type\":\"string\",\"description\":\"The element's value must equal this exactly.\"},\"enabled\":{\"type\":\"boolean\",\"description\":\"The element's enabled state must equal this.\"}},\"required\":[],\"additionalProperties\":false,\"description\":\"Postcondition: checked after the step; failure stops the batch.\"},\"timeout_ms\":{\"type\":\"integer\",\"description\":\"How long to wait for this step's checks (default 3000).\"}},\"required\":[],\"additionalProperties\":false}}},\"required\":[\"steps\"],\"additionalProperties\":false}},{\"name\":\"verify\",\"description\":\"Check bounded conditions on the current UI without acting: role, name, text, gone, value, enabled. Each check is {id?, role?, name?, text?, gone?, value?, enabled?}; all given parts must hold. Returns one ok per check. Use after act/run_batch, or to poll with timeout_ms.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Verified.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"},\"checks\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":20,\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"An element id from read_ui.\"},\"role\":{\"type\":\"string\",\"description\":\"An accessibility role, e.g. button, textfield, checkbox.\"},\"name\":{\"type\":\"string\",\"description\":\"Substring match against the element's name/label.\"},\"text\":{\"type\":\"string\",\"description\":\"Substring match against the element's displayed text or value.\"},\"gone\":{\"type\":\"boolean\",\"description\":\"True: no element may match; false: at least one must.\"},\"value\":{\"type\":\"string\",\"description\":\"The element's value must equal this exactly.\"},\"enabled\":{\"type\":\"boolean\",\"description\":\"The element's enabled state must equal this.\"}},\"required\":[],\"additionalProperties\":false}},\"timeout_ms\":{\"type\":\"integer\",\"description\":\"Wait up to this long for every check to hold (default 0: one fresh read).\"}},\"required\":[\"checks\"],\"additionalProperties\":false}},{\"name\":\"request_human\",\"description\":\"Pause and hand the computer to a person: the live view opens with input enabled and the agent's hold on control is released. The same session resumes when the person signals done, or when timeout_ms elapses. Use for CAPTCHAs, push/SMS 2FA and judgment calls. Pass secret to ask for a one-off secret in a masked box instead of handing over control.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Human window closed ({reason}).\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"reason\":{\"type\":\"string\",\"description\":\"What the person should do, shown in the live view (e.g. 'Complete the CAPTCHA').\"},\"timeout_ms\":{\"type\":\"integer\",\"description\":\"How long to wait for the person (default 300000, max 1800000).\"},\"secret\":{\"type\":\"object\",\"description\":\"Ask the person for a one-off secret (password, 2FA code, card CVC) that is not saved in the vault. They type it into a masked box; it goes straight into the focused field and never reaches you, the logs or the transcript. Focus the field first. The result only says the field was filled.\",\"properties\":{\"label\":{\"type\":\"string\",\"description\":\"What to ask for, shown above the masked box (e.g. 'Password for acme.com' or '6-digit code').\"},\"field\":{\"type\":\"string\",\"description\":\"Optional name of the field it will fill, shown to the person.\"},\"domain\":{\"type\":\"string\",\"description\":\"Optional app or site domain the secret is for. If the person chooses to save it to the vault, it is bound there.\"}},\"required\":[\"label\"],\"additionalProperties\":false}},\"required\":[],\"additionalProperties\":false}},{\"name\":\"use_credential\",\"description\":\"Type a vault credential into the FOCUSED field. The value never enters the model context, prompts or logs. kind: secret (the stored value) or totp (a fresh code from a stored TOTP seed). The credential is bound to an app or domain: pass `domain` (the app you are filling into); it must match the credential's binding. On this Mac a person approves each use, like typing.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Credential {name} typed.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The credential's name in the vault.\"},\"kind\":{\"type\":\"string\",\"enum\":[\"secret\",\"totp\"],\"description\":\"secret: type the stored value; totp: generate and type a fresh TOTP code.\"},\"source\":{\"type\":\"string\",\"enum\":[\"vault\",\"keychain\",\"bitwarden\",\"onepassword\"],\"description\":\"Where to resolve the credential from (default: the sealed vault, then this Mac's Keychain).\"},\"domain\":{\"type\":\"string\",\"description\":\"The app or domain the credential is being typed into; checked against the credential's binding.\"}},\"required\":[\"name\"],\"additionalProperties\":false}},{\"name\":\"run_subtask\",\"description\":\"Hand a bounded UI subtask (fill a form, search and pick a result, toggle settings) to the fast decision loop instead of driving each step yourself. Give the goal, the literal inputs it may type (it never invents text), success checks in verify syntax, and limits. Each step reads the element map, picks one action from the visible elements x allowed ops with a ~100 ms typed decision (POST /v1/decisions), runs it through the same lease/approval/audit path (predictable steps batched with expect checks), and checks success with verify. Returns a step trace and a status: done, escalated (with the reason and the current screen: continue from there yourself), or failed. One approval covers the whole subtask on this computer. Repeat subtasks replay from the cache with zero decisions (the result's cache block says hit, healed, recorded or miss); only subtasks with at least one exact (non-ask) success check are cached. Input values are never stored, only their names. With api_options, an MCP/API call you hold is offered ahead of GUI steps (status use_api hands it back to you). With best_of N and computers, N rollouts run on N sandbox computers and a judge picks one by step narratives.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Ran the subtask.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"goal\":{\"type\":\"string\",\"description\":\"What the subtask must achieve, in one or two sentences (e.g. 'Fill the sign-up form and submit it').\"},\"inputs\":{\"type\":\"array\",\"maxItems\":20,\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"What the value is (e.g. 'email', 'full name').\"},\"value\":{\"type\":\"string\",\"description\":\"The literal text to type.\"}},\"required\":[\"name\",\"value\"],\"additionalProperties\":false},\"description\":\"The only text the subtask may type. Not for secrets: use use_credential.\"},\"success\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":10,\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"An element id from read_ui.\"},\"role\":{\"type\":\"string\",\"description\":\"An accessibility role, e.g. button, textfield, checkbox.\"},\"name\":{\"type\":\"string\",\"description\":\"Substring match against the element's name/label.\"},\"text\":{\"type\":\"string\",\"description\":\"Substring match against the element's displayed text or value.\"},\"gone\":{\"type\":\"boolean\",\"description\":\"True: no element may match; false: at least one must.\"},\"value\":{\"type\":\"string\",\"description\":\"The element's value must equal this exactly.\"},\"enabled\":{\"type\":\"boolean\",\"description\":\"The element's enabled state must equal this.\"},\"ask\":{\"type\":\"string\",\"description\":\"A fuzzy yes/no check in plain words (\\\"Is the confirmation message showing?\\\"), answered by a typed verify decision over the screen. Use only when role/name/text/value checks can't express it.\"}},\"required\":[],\"additionalProperties\":false},\"description\":\"Checks that all hold when the goal is met, in verify syntax ({role?, name?, text?, value?, gone?, enabled?}) or {ask: '...'} for a fuzzy yes/no. Without checks the loop stops when a decision picks done.\"},\"constraints\":{\"type\":\"object\",\"properties\":{\"ops\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"click\",\"set_value\",\"select\",\"press\",\"focus\"]},\"description\":\"Ops the subtask may use (default click, set_value, select, press).\"},\"avoid\":{\"type\":\"array\",\"maxItems\":20,\"items\":{\"type\":\"string\"},\"description\":\"Never act on elements whose name contains any of these.\"},\"allow_irreversible\":{\"type\":\"boolean\",\"description\":\"Let the subtask click buttons named like send, pay, buy, delete, publish (default false: those hand back to you).\"}},\"required\":[],\"additionalProperties\":false},\"max_steps\":{\"type\":\"integer\",\"description\":\"Most actions the subtask may take (default 12, at most 40).\"},\"budget_ms\":{\"type\":\"integer\",\"description\":\"Wall-clock budget in milliseconds (default 60000, at most 300000).\"},\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"},\"query\":{\"type\":\"string\",\"description\":\"Only consider elements whose name or value contains this text.\"},\"max_elements\":{\"type\":\"integer\",\"description\":\"Cap the elements read per step (default 120).\"},\"cache\":{\"type\":\"string\",\"enum\":[\"auto\",\"off\",\"refresh\"],\"description\":\"Replay cache (default auto). auto: a subtask seen before (same goal, app and window, same input names) replays its recorded steps with no decisions, checking each with verify, and re-infers only a step whose element moved; a new one runs the decision loop and is recorded once its success checks hold. refresh: ignore the cached steps and record anew. off: neither read nor write the cache.\"},\"save_as\":{\"type\":\"string\",\"description\":\"Save this subtask's recording as a named skill once it succeeds (overwrites a skill of that name). Run it later with run_skill and new input values.\"},\"api_options\":{\"type\":\"array\",\"maxItems\":10,\"items\":{\"type\":\"object\",\"properties\":{\"tool\":{\"type\":\"string\",\"description\":\"The MCP tool or API action you can call yourself (e.g. 'github.create_issue').\"},\"description\":{\"type\":\"string\",\"description\":\"What it does, in one line.\"}},\"required\":[\"tool\"],\"additionalProperties\":false},\"description\":\"MCP tools or API actions you hold that could do this goal without the GUI. They are offered ahead of every GUI option on the first step; if the decision picks one, the subtask stops with status use_api and names it, and you make that call yourself. An API call beats GUI clicks when both exist.\"},\"best_of\":{\"type\":\"integer\",\"description\":\"Behavior Best-of-N for high-value subtasks: run N rollouts (2-5) at once on N sandbox computers listed in computers, then a judge decision picks one by the rollouts' step narratives. Sandbox/cloud computers only, never the person's own machine. Returns the chosen rollout, why, and every rollout's narrative.\"},\"computers\":{\"type\":\"array\",\"maxItems\":5,\"items\":{\"type\":\"string\"},\"description\":\"With best_of: the sandbox computer ids the rollouts run on, one rollout per computer (at least best_of distinct ids).\"},\"max_cost_usd\":{\"type\":\"number\",\"description\":\"With best_of: the cap on decision spend for the whole call in USD (default 0.25, at most 5). The judge may use the planner-class tier only while under it.\"}},\"required\":[\"goal\"],\"additionalProperties\":false}},{\"name\":\"run_parallel\",\"description\":\"Run independent bounded subtasks on separate computers at the same time (one run_subtask per computer, each under its own computer's control lease), and get every result back in order. Each subtask names its computer (default: this one) and takes run_subtask's fields. One computer never runs two subtasks at once: a repeated computer, or one another subtask is already driving, is refused. Limits: max_parallel subtasks at once, a total budget_ms, and max_cost_usd on decision spend; subtasks that can't start inside them come back skipped. One approval covers the whole call when any subtask targets a non-sandbox computer.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Ran the subtasks.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"subtasks\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":8,\"items\":{\"type\":\"object\",\"properties\":{\"computer\":{\"type\":\"string\",\"description\":\"The computer id this subtask runs on (default: the computer this call is made on).\"},\"goal\":{\"type\":\"string\",\"description\":\"What the subtask must achieve, in one or two sentences (e.g. 'Fill the sign-up form and submit it').\"},\"inputs\":{\"type\":\"array\",\"maxItems\":20,\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"What the value is (e.g. 'email', 'full name').\"},\"value\":{\"type\":\"string\",\"description\":\"The literal text to type.\"}},\"required\":[\"name\",\"value\"],\"additionalProperties\":false},\"description\":\"The only text the subtask may type. Not for secrets: use use_credential.\"},\"success\":{\"type\":\"array\",\"minItems\":1,\"maxItems\":10,\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"An element id from read_ui.\"},\"role\":{\"type\":\"string\",\"description\":\"An accessibility role, e.g. button, textfield, checkbox.\"},\"name\":{\"type\":\"string\",\"description\":\"Substring match against the element's name/label.\"},\"text\":{\"type\":\"string\",\"description\":\"Substring match against the element's displayed text or value.\"},\"gone\":{\"type\":\"boolean\",\"description\":\"True: no element may match; false: at least one must.\"},\"value\":{\"type\":\"string\",\"description\":\"The element's value must equal this exactly.\"},\"enabled\":{\"type\":\"boolean\",\"description\":\"The element's enabled state must equal this.\"},\"ask\":{\"type\":\"string\",\"description\":\"A fuzzy yes/no check in plain words (\\\"Is the confirmation message showing?\\\"), answered by a typed verify decision over the screen. Use only when role/name/text/value checks can't express it.\"}},\"required\":[],\"additionalProperties\":false},\"description\":\"Checks that all hold when the goal is met, in verify syntax ({role?, name?, text?, value?, gone?, enabled?}) or {ask: '...'} for a fuzzy yes/no. Without checks the loop stops when a decision picks done.\"},\"constraints\":{\"type\":\"object\",\"properties\":{\"ops\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"click\",\"set_value\",\"select\",\"press\",\"focus\"]},\"description\":\"Ops the subtask may use (default click, set_value, select, press).\"},\"avoid\":{\"type\":\"array\",\"maxItems\":20,\"items\":{\"type\":\"string\"},\"description\":\"Never act on elements whose name contains any of these.\"},\"allow_irreversible\":{\"type\":\"boolean\",\"description\":\"Let the subtask click buttons named like send, pay, buy, delete, publish (default false: those hand back to you).\"}},\"required\":[],\"additionalProperties\":false},\"max_steps\":{\"type\":\"integer\",\"description\":\"Most actions the subtask may take (default 12, at most 40).\"},\"budget_ms\":{\"type\":\"integer\",\"description\":\"Wall-clock budget in milliseconds (default 60000, at most 300000).\"},\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"},\"query\":{\"type\":\"string\",\"description\":\"Only consider elements whose name or value contains this text.\"},\"max_elements\":{\"type\":\"integer\",\"description\":\"Cap the elements read per step (default 120).\"},\"api_options\":{\"type\":\"array\",\"maxItems\":10,\"items\":{\"type\":\"object\",\"properties\":{\"tool\":{\"type\":\"string\",\"description\":\"The MCP tool or API action you can call yourself (e.g. 'github.create_issue').\"},\"description\":{\"type\":\"string\",\"description\":\"What it does, in one line.\"}},\"required\":[\"tool\"],\"additionalProperties\":false},\"description\":\"MCP tools or API actions you hold that could do this goal without the GUI. They are offered ahead of every GUI option on the first step; if the decision picks one, the subtask stops with status use_api and names it, and you make that call yourself. An API call beats GUI clicks when both exist.\"}},\"required\":[\"goal\"],\"additionalProperties\":false},\"description\":\"Independent subtasks, one per computer. Same fields as run_subtask plus computer.\"},\"max_parallel\":{\"type\":\"integer\",\"description\":\"Most subtasks running at once (default 4, at most 8).\"},\"budget_ms\":{\"type\":\"integer\",\"description\":\"Wall-clock budget for the whole call in milliseconds (default 120000, at most 600000). Each subtask's own budget_ms is cut to what is left when it starts.\"},\"max_cost_usd\":{\"type\":\"number\",\"description\":\"Cap on decision spend for the whole call in USD (default 0.25, at most 5). Once reached, subtasks not yet started come back skipped.\"}},\"required\":[\"subtasks\"],\"additionalProperties\":false}},{\"name\":\"run_skill\",\"description\":\"Run a saved skill (a recording taught with run_subtask save_as) by name, with new values for its inputs. It replays the recorded steps with no decisions, checks each step and the skill's success checks with verify, re-infers a step whose element moved and rewrites the recording. Returns the same result as run_subtask. List skills with the skills member.\",\"risk\":\"risky\",\"default_enabled\":true,\"needs_confirm\":true,\"confirm\":\"non_sandbox\",\"result_kind\":\"none\",\"ack_text\":\"Ran the skill {name}.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The skill's name (from skills).\"},\"inputs\":{\"type\":\"array\",\"maxItems\":20,\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"What the value is (e.g. 'email', 'full name').\"},\"value\":{\"type\":\"string\",\"description\":\"The literal text to type.\"}},\"required\":[\"name\",\"value\"],\"additionalProperties\":false},\"description\":\"A value for each of the skill's inputs (skills lists their names). Not for secrets: use use_credential.\"},\"app\":{\"type\":\"string\",\"description\":\"App name or bundle id (macOS); default: the frontmost app.\"},\"pid\":{\"type\":\"integer\"},\"window_id\":{\"type\":\"integer\"},\"max_steps\":{\"type\":\"integer\",\"description\":\"Most actions the subtask may take (default 12, at most 40).\"},\"budget_ms\":{\"type\":\"integer\",\"description\":\"Wall-clock budget in milliseconds (default 60000, at most 300000).\"}},\"required\":[\"name\"],\"additionalProperties\":false}},{\"name\":\"skills\",\"description\":\"List the saved skills (taught recordings) this person can run with run_skill: name, goal, app, input names, step count, last use. Pass forget to delete one first.\",\"risk\":\"reversible\",\"default_enabled\":true,\"needs_confirm\":false,\"confirm\":\"never\",\"result_kind\":\"none\",\"ack_text\":\"Listed the saved skills.\",\"scale_fields\":{},\"input_schema\":{\"type\":\"object\",\"properties\":{\"forget\":{\"type\":\"string\",\"description\":\"Delete the saved skill with this name before listing.\"}},\"required\":[],\"additionalProperties\":false}}]}")
255
256
 
256
257
 
257
258
  def member_schema(member: str) -> Optional[Dict[str, Any]]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: allternit-computer-driver
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Drop-in drivers for Allternit hosted computers: a plain client, contract-v2 structured UI driving (read_ui, act, run_batch, verify, run_subtask, …) and Anthropic (computer/browser toolset), OpenAI computer-use and Gemini computer_use adapters.
5
5
  License: Apache-2.0
6
6
  Project-URL: Documentation, https://docs.allternit.com/api/platform/sdks/python
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "allternit-computer-driver"
7
- version = "0.2.0"
7
+ version = "0.3.0"
8
8
  description = "Drop-in drivers for Allternit hosted computers: a plain client, contract-v2 structured UI driving (read_ui, act, run_batch, verify, run_subtask, …) and Anthropic (computer/browser toolset), OpenAI computer-use and Gemini computer_use adapters."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"