use-computer 0.0.40__tar.gz → 0.0.41__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.
- {use_computer-0.0.40 → use_computer-0.0.41}/PKG-INFO +1 -1
- {use_computer-0.0.40 → use_computer-0.0.41}/pyproject.toml +1 -1
- {use_computer-0.0.40 → use_computer-0.0.41}/scripts/smoke_wheel.py +1 -1
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/base/actions.py +1 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/base/desktop.py +70 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/providers/openai.py +60 -23
- {use_computer-0.0.40 → use_computer-0.0.41}/.env.example +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/.gitignore +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/.pre-commit-config.yaml +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/README.md +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/accessibility.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/base/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/base/agent.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/base/artifacts.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/base/final_state.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/base/prompts.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/base/recordings.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/base/sandbox.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/base/screenshots.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/base/trajectory.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/core.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/debug/README.md +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/debug/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/debug/actions.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/debug/agent.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/debug/models.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/ios/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/ios/agent.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/ios/tools.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/prompts/anthropic.txt +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/prompts/gemini.txt +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/prompts/ios.txt +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/prompts/openai.txt +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/prompts/pyautogui.txt +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/providers/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/providers/anthropic.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/providers/gemini.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/providers/generic.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/providers/tinker_backend.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/agents/types.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/ax_transpile.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/client.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/display.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/errors.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/agents.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/gateway.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/platforms/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/platforms/ios.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/platforms/macos.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/platforms/ubuntu.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/platforms/windows.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/setup_files.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/use_computer.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/utils/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/utils/verifier.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/ios/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/ios/apps.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/ios/environment.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/ios/input.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/macos/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/macos/keyboard.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/macos/mouse.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/models.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/parsers.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/py.typed +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/recording.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/resources/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/resources/accessibility.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/resources/display.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/resources/recording.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/resources/screenshot.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/retry.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/sandbox.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/screenshot.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/simulators.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/pre_command.ps1 +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/pre_command.sh +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/task.toml +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_ios.sh +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_ios_nograder.sh +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_macos.sh +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_macos_check.sh +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_macos_nograder.sh +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_ubuntu.sh +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_ubuntu_check.sh +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_ubuntu_nograder.sh +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_windows.sh +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_windows_check.sh +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_windows_nograder.sh +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/windows/__init__.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/use_computer/windows/shell.py +0 -0
- {use_computer-0.0.40 → use_computer-0.0.41}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: use-computer
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.41
|
|
4
4
|
Summary: Python SDK for use.computer sandboxes across macOS, iOS simulators, Windows, and Ubuntu
|
|
5
5
|
Project-URL: Homepage, https://use.computer
|
|
6
6
|
Project-URL: Documentation, https://api.use.computer/docs
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "use-computer"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.41"
|
|
8
8
|
description = "Python SDK for use.computer sandboxes across macOS, iOS simulators, Windows, and Ubuntu"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -102,7 +102,7 @@ with tempfile.TemporaryDirectory() as tmp:
|
|
|
102
102
|
|
|
103
103
|
for agent_cls, model_name in [
|
|
104
104
|
(AnthropicComputerAgent, "anthropic/claude-sonnet-4-6"),
|
|
105
|
-
(OpenAIComputerAgent, "openai/
|
|
105
|
+
(OpenAIComputerAgent, "openai/gpt-5.5"),
|
|
106
106
|
(GeminiComputerAgent, "gemini/gemini-2.5-computer-use-preview-10-2025"),
|
|
107
107
|
(GenericComputerAgent, "openai/gpt-4o"),
|
|
108
108
|
(IOSComputerAgent, "anthropic/claude-sonnet-4-6"),
|
|
@@ -140,6 +140,7 @@ async def execute_action(
|
|
|
140
140
|
await sandbox.keyboard.type(command.text)
|
|
141
141
|
elif command.action is DesktopAction.KEY:
|
|
142
142
|
key = normalize_key(command.key or command.text, key_aliases)
|
|
143
|
+
action["key"] = key
|
|
143
144
|
if "+" in key:
|
|
144
145
|
await sandbox.keyboard.hotkey(key)
|
|
145
146
|
else:
|
|
@@ -12,32 +12,102 @@ from use_computer.agents.types import Platform
|
|
|
12
12
|
_KEY_ALIASES = {
|
|
13
13
|
"Escape": "esc",
|
|
14
14
|
"escape": "esc",
|
|
15
|
+
"ESCAPE": "esc",
|
|
16
|
+
"ESC": "esc",
|
|
15
17
|
"Return": "enter",
|
|
16
18
|
"return": "enter",
|
|
19
|
+
"RETURN": "enter",
|
|
20
|
+
"Enter": "enter",
|
|
21
|
+
"enter": "enter",
|
|
22
|
+
"ENTER": "enter",
|
|
23
|
+
"Command": "cmd",
|
|
24
|
+
"command": "cmd",
|
|
25
|
+
"COMMAND": "cmd",
|
|
26
|
+
"Cmd": "cmd",
|
|
27
|
+
"cmd": "cmd",
|
|
28
|
+
"CMD": "cmd",
|
|
17
29
|
"super": "cmd",
|
|
30
|
+
"SUPER": "cmd",
|
|
18
31
|
"meta": "cmd",
|
|
32
|
+
"META": "cmd",
|
|
19
33
|
"Super_L": "cmd",
|
|
20
34
|
"Meta_L": "cmd",
|
|
21
35
|
"Control": "ctrl",
|
|
36
|
+
"control": "ctrl",
|
|
37
|
+
"CONTROL": "ctrl",
|
|
38
|
+
"Ctrl": "ctrl",
|
|
39
|
+
"ctrl": "ctrl",
|
|
40
|
+
"CTRL": "ctrl",
|
|
22
41
|
"Shift": "shift",
|
|
42
|
+
"shift": "shift",
|
|
43
|
+
"SHIFT": "shift",
|
|
23
44
|
"Alt": "alt",
|
|
45
|
+
"alt": "alt",
|
|
46
|
+
"ALT": "alt",
|
|
47
|
+
"Option": "alt",
|
|
48
|
+
"option": "alt",
|
|
49
|
+
"OPTION": "alt",
|
|
24
50
|
"Backspace": "backspace",
|
|
51
|
+
"backspace": "backspace",
|
|
52
|
+
"BACKSPACE": "backspace",
|
|
25
53
|
"Delete": "delete",
|
|
54
|
+
"delete": "delete",
|
|
55
|
+
"DELETE": "delete",
|
|
56
|
+
"Tab": "tab",
|
|
57
|
+
"tab": "tab",
|
|
58
|
+
"TAB": "tab",
|
|
59
|
+
"Space": "space",
|
|
60
|
+
"space": "space",
|
|
61
|
+
"SPACE": "space",
|
|
26
62
|
"ArrowUp": "up",
|
|
63
|
+
"ARROWUP": "up",
|
|
64
|
+
"Up": "up",
|
|
65
|
+
"up": "up",
|
|
66
|
+
"UP": "up",
|
|
27
67
|
"ArrowDown": "down",
|
|
68
|
+
"ARROWDOWN": "down",
|
|
69
|
+
"Down": "down",
|
|
70
|
+
"down": "down",
|
|
71
|
+
"DOWN": "down",
|
|
28
72
|
"ArrowLeft": "left",
|
|
73
|
+
"ARROWLEFT": "left",
|
|
74
|
+
"Left": "left",
|
|
75
|
+
"left": "left",
|
|
76
|
+
"LEFT": "left",
|
|
29
77
|
"ArrowRight": "right",
|
|
78
|
+
"ARROWRIGHT": "right",
|
|
79
|
+
"Right": "right",
|
|
80
|
+
"right": "right",
|
|
81
|
+
"RIGHT": "right",
|
|
30
82
|
"Page_Up": "pageup",
|
|
83
|
+
"PAGE_UP": "pageup",
|
|
84
|
+
"PAGEUP": "pageup",
|
|
31
85
|
"Page_Down": "pagedown",
|
|
86
|
+
"PAGE_DOWN": "pagedown",
|
|
87
|
+
"PAGEDOWN": "pagedown",
|
|
32
88
|
}
|
|
33
89
|
|
|
34
90
|
# Windows: the modifier is the Windows key, not Cmd.
|
|
35
91
|
_WINDOWS_KEY_ALIASES = {
|
|
36
92
|
**_KEY_ALIASES,
|
|
93
|
+
"Command": "win",
|
|
94
|
+
"command": "win",
|
|
95
|
+
"COMMAND": "win",
|
|
96
|
+
"Cmd": "win",
|
|
97
|
+
"cmd": "win",
|
|
98
|
+
"CMD": "win",
|
|
37
99
|
"super": "win",
|
|
100
|
+
"SUPER": "win",
|
|
38
101
|
"meta": "win",
|
|
102
|
+
"META": "win",
|
|
39
103
|
"Super_L": "win",
|
|
40
104
|
"Meta_L": "win",
|
|
105
|
+
"Win": "win",
|
|
106
|
+
"win": "win",
|
|
107
|
+
"WIN": "win",
|
|
108
|
+
"Windows": "win",
|
|
109
|
+
"windows": "win",
|
|
110
|
+
"WINDOWS": "win",
|
|
41
111
|
}
|
|
42
112
|
|
|
43
113
|
|
|
@@ -19,6 +19,9 @@ from use_computer.agents.base import (
|
|
|
19
19
|
)
|
|
20
20
|
from use_computer.agents.types import DesktopAction, ScrollDirection
|
|
21
21
|
|
|
22
|
+
DEFAULT_OPENAI_COMPUTER_MODEL = "gpt-5.5"
|
|
23
|
+
LEGACY_OPENAI_COMPUTER_MODEL = "computer-use-preview"
|
|
24
|
+
|
|
22
25
|
|
|
23
26
|
class OpenAIToolType(str, Enum):
|
|
24
27
|
COMPUTER = "computer"
|
|
@@ -31,6 +34,7 @@ class OpenAIItemType(str, Enum):
|
|
|
31
34
|
COMPUTER_SCREENSHOT = "computer_screenshot"
|
|
32
35
|
INPUT_IMAGE = "input_image"
|
|
33
36
|
MESSAGE = "message"
|
|
37
|
+
OUTPUT_TEXT = "output_text"
|
|
34
38
|
|
|
35
39
|
|
|
36
40
|
@dataclass(frozen=True)
|
|
@@ -46,7 +50,6 @@ class OpenAIComputerObservation:
|
|
|
46
50
|
"output": {
|
|
47
51
|
"type": OpenAIItemType.COMPUTER_SCREENSHOT.value,
|
|
48
52
|
"image_url": f"data:image/png;base64,{self.screenshot_b64}",
|
|
49
|
-
"detail": "original",
|
|
50
53
|
},
|
|
51
54
|
}
|
|
52
55
|
if self.pending_safety_checks:
|
|
@@ -69,7 +72,7 @@ class OpenAICUAAgent(BaseCUAAgent):
|
|
|
69
72
|
self.steps[0]["message"] = instruction
|
|
70
73
|
|
|
71
74
|
client = openai.OpenAI()
|
|
72
|
-
model = self._parsed_model_name or
|
|
75
|
+
model = self._parsed_model_name or DEFAULT_OPENAI_COMPUTER_MODEL
|
|
73
76
|
|
|
74
77
|
system = build_system_prompt(
|
|
75
78
|
load_prompt("openai.txt"),
|
|
@@ -109,21 +112,14 @@ class OpenAICUAAgent(BaseCUAAgent):
|
|
|
109
112
|
|
|
110
113
|
for step_idx in range(self.max_steps):
|
|
111
114
|
await self._fire_in_process(environment, step_idx)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
model
|
|
115
|
-
tools=tools,
|
|
116
|
-
|
|
117
|
-
truncation="auto",
|
|
118
|
-
)
|
|
119
|
-
else:
|
|
120
|
-
response = client.responses.create(
|
|
121
|
-
model=model,
|
|
122
|
-
tools=tools, # type: ignore
|
|
123
|
-
input=input_items,
|
|
115
|
+
response = client.responses.create(
|
|
116
|
+
**_response_create_kwargs(
|
|
117
|
+
model,
|
|
118
|
+
tools=tools,
|
|
119
|
+
input_items=input_items,
|
|
124
120
|
previous_response_id=previous_response_id,
|
|
125
|
-
truncation="auto",
|
|
126
121
|
)
|
|
122
|
+
)
|
|
127
123
|
previous_response_id = response.id
|
|
128
124
|
|
|
129
125
|
self.total_in += response.usage.input_tokens if response.usage else 0
|
|
@@ -136,16 +132,11 @@ class OpenAICUAAgent(BaseCUAAgent):
|
|
|
136
132
|
]
|
|
137
133
|
|
|
138
134
|
if not computer_calls:
|
|
139
|
-
text_parts = [
|
|
140
|
-
getattr(item, "text", "")
|
|
141
|
-
for item in response.output
|
|
142
|
-
if getattr(item, "type", None) == OpenAIItemType.MESSAGE.value
|
|
143
|
-
]
|
|
144
135
|
self.steps.append(
|
|
145
136
|
{
|
|
146
137
|
"step_id": len(self.steps) + 1,
|
|
147
138
|
"source": "agent",
|
|
148
|
-
"message":
|
|
139
|
+
"message": _response_text(response) or "Task complete.",
|
|
149
140
|
}
|
|
150
141
|
)
|
|
151
142
|
break
|
|
@@ -222,7 +213,7 @@ def _openai_tools_for_model(
|
|
|
222
213
|
height: int,
|
|
223
214
|
environment: str,
|
|
224
215
|
) -> list[dict[str, Any]]:
|
|
225
|
-
if model
|
|
216
|
+
if _uses_legacy_preview_tool(model):
|
|
226
217
|
return [
|
|
227
218
|
{
|
|
228
219
|
"type": OpenAIToolType.COMPUTER_USE_PREVIEW.value,
|
|
@@ -234,6 +225,29 @@ def _openai_tools_for_model(
|
|
|
234
225
|
return [{"type": OpenAIToolType.COMPUTER.value}]
|
|
235
226
|
|
|
236
227
|
|
|
228
|
+
def _response_create_kwargs(
|
|
229
|
+
model: str,
|
|
230
|
+
*,
|
|
231
|
+
tools: list[dict[str, Any]],
|
|
232
|
+
input_items: list[Any],
|
|
233
|
+
previous_response_id: str | None,
|
|
234
|
+
) -> dict[str, Any]:
|
|
235
|
+
kwargs: dict[str, Any] = {
|
|
236
|
+
"model": model,
|
|
237
|
+
"tools": tools,
|
|
238
|
+
"input": input_items,
|
|
239
|
+
}
|
|
240
|
+
if previous_response_id is not None:
|
|
241
|
+
kwargs["previous_response_id"] = previous_response_id
|
|
242
|
+
if _uses_legacy_preview_tool(model):
|
|
243
|
+
kwargs["truncation"] = "auto"
|
|
244
|
+
return kwargs
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
def _uses_legacy_preview_tool(model: str) -> bool:
|
|
248
|
+
return model in {LEGACY_OPENAI_COMPUTER_MODEL, "computer-use-preview-2025-03-11"}
|
|
249
|
+
|
|
250
|
+
|
|
237
251
|
def _openai_actions(call: Any) -> list[Any]:
|
|
238
252
|
actions = getattr(call, "actions", None)
|
|
239
253
|
if isinstance(actions, Iterable) and not isinstance(actions, (str, bytes)):
|
|
@@ -255,8 +269,31 @@ def _pending_safety_checks(call: Any) -> tuple[dict[str, Any], ...]:
|
|
|
255
269
|
return tuple(normalized)
|
|
256
270
|
|
|
257
271
|
|
|
272
|
+
def _response_text(response: Any) -> str:
|
|
273
|
+
output_text = getattr(response, "output_text", "")
|
|
274
|
+
if isinstance(output_text, str) and output_text:
|
|
275
|
+
return output_text
|
|
276
|
+
|
|
277
|
+
text_parts = []
|
|
278
|
+
for item in getattr(response, "output", []):
|
|
279
|
+
if getattr(item, "type", None) != OpenAIItemType.MESSAGE.value:
|
|
280
|
+
continue
|
|
281
|
+
content = getattr(item, "content", None)
|
|
282
|
+
if isinstance(content, Iterable) and not isinstance(content, (str, bytes)):
|
|
283
|
+
for block in content:
|
|
284
|
+
if getattr(block, "type", None) == OpenAIItemType.OUTPUT_TEXT.value:
|
|
285
|
+
text = getattr(block, "text", "")
|
|
286
|
+
if text:
|
|
287
|
+
text_parts.append(text)
|
|
288
|
+
else:
|
|
289
|
+
text = getattr(item, "text", "")
|
|
290
|
+
if text:
|
|
291
|
+
text_parts.append(text)
|
|
292
|
+
return "\n".join(text_parts)
|
|
293
|
+
|
|
294
|
+
|
|
258
295
|
def _map_openai_action(action: Any) -> dict[str, Any]:
|
|
259
|
-
"""Map OpenAI
|
|
296
|
+
"""Map OpenAI computer actions to our standard format."""
|
|
260
297
|
action_type = action.type
|
|
261
298
|
|
|
262
299
|
type_map = {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/platforms/__init__.py
RENAMED
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/platforms/ios.py
RENAMED
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/platforms/macos.py
RENAMED
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/platforms/ubuntu.py
RENAMED
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/platforms/windows.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/utils/__init__.py
RENAMED
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/harbor/environment/utils/verifier.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_ios_nograder.sh
RENAMED
|
File without changes
|
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_macos_check.sh
RENAMED
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_macos_nograder.sh
RENAMED
|
File without changes
|
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_ubuntu_check.sh
RENAMED
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_ubuntu_nograder.sh
RENAMED
|
File without changes
|
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_windows_check.sh
RENAMED
|
File without changes
|
{use_computer-0.0.40 → use_computer-0.0.41}/use_computer/tasks/templates/test_windows_nograder.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|