boxd 0.3.2.dev1182__tar.gz → 0.3.2.dev1188__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.
- {boxd-0.3.2.dev1182/src/boxd.egg-info → boxd-0.3.2.dev1188}/PKG-INFO +20 -4
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/README.md +19 -3
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/pyproject.toml +1 -1
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/__init__.py +10 -0
- boxd-0.3.2.dev1188/src/boxd/_generated/api_pb2.py +834 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/_generated/api_pb2_grpc.py +183 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/_mappers.py +37 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/_regions.py +4 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/models.py +71 -0
- boxd-0.3.2.dev1188/src/boxd/resources/agents.py +1234 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188/src/boxd.egg-info}/PKG-INFO +20 -4
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_agents.py +699 -3
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_regions.py +21 -0
- boxd-0.3.2.dev1182/src/boxd/_generated/api_pb2.py +0 -816
- boxd-0.3.2.dev1182/src/boxd/resources/agents.py +0 -615
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/LICENSE +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/setup.cfg +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/_client.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/_credentials.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/_generated/__init__.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/_requests.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/_streaming.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/_transport.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/_urls.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/_version_check.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/computer_use.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/errors.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/py.typed +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/resources/__init__.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/resources/account.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/resources/computer.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/resources/credentials.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/resources/disks.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/resources/domains.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/resources/fs.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/resources/machines.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/resources/orgs.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/resources/regions.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/resources/snapshots.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/resources/teams.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/resources/vars.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd/spec.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd.egg-info/SOURCES.txt +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd.egg-info/dependency_links.txt +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd.egg-info/requires.txt +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/src/boxd.egg-info/top_level.txt +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_computer.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_computer_use.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_create_in_one_call.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_credentials.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_delete_self.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_fs.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_mappers.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_namespaces.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_python_versions.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_raw_key.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_requests.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_spec.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_streaming.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_transport.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_urls.py +0 -0
- {boxd-0.3.2.dev1182 → boxd-0.3.2.dev1188}/tests/test_version_check.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: boxd
|
|
3
|
-
Version: 0.3.2.
|
|
3
|
+
Version: 0.3.2.dev1188
|
|
4
4
|
Summary: Python SDK for the boxd cloud VM platform
|
|
5
5
|
Author: Azin
|
|
6
6
|
License-Expression: MIT
|
|
@@ -1088,6 +1088,22 @@ apart by `type`; every turn ends with `turn.finished` and its `reason`
|
|
|
1088
1088
|
Without `follow`, `events()` ends after the latest event; with it, it has no
|
|
1089
1089
|
deadline and stops when you stop iterating.
|
|
1090
1090
|
|
|
1091
|
+
`run()` does one task in one call: it starts a session, sends the task, waits
|
|
1092
|
+
for that turn to end and closes the session again:
|
|
1093
|
+
|
|
1094
|
+
```python
|
|
1095
|
+
result = agents.run("my-box", "claude-code", "Fix the failing test", cwd="/home/boxd/app")
|
|
1096
|
+
print(result.reply)
|
|
1097
|
+
if result.reason != "done":
|
|
1098
|
+
print(f"[{result.reason}] {result.error or ''}")
|
|
1099
|
+
```
|
|
1100
|
+
|
|
1101
|
+
`result.reply` is the agent's last reply in the turn, `result.reason` how the
|
|
1102
|
+
turn ended (a turn that doesn't end `"done"` is returned, not raised), and
|
|
1103
|
+
`result.usage` its tokens. `keep=True` leaves the session open, `session=` sends
|
|
1104
|
+
the task to an open session instead, `on_event=` sees each event as it happens,
|
|
1105
|
+
and Ctrl-C (or cancelling the task, with `AsyncBoxd`) interrupts the turn.
|
|
1106
|
+
|
|
1091
1107
|
`runs()` reads how finished turns went from the platform's run history, newest
|
|
1092
1108
|
first, across the machines you can see:
|
|
1093
1109
|
|
|
@@ -1114,9 +1130,9 @@ machine's env vars and secrets (`env=` adds more). Give it a key as a secret
|
|
|
1114
1130
|
(`ANTHROPIC_API_KEY` or `OPENAI_API_KEY`, bound to its provider's host so the
|
|
1115
1131
|
machine only holds a placeholder), or sign Claude Code or Codex in once and
|
|
1116
1132
|
boxd serves the login to your private machines. The machine stays awake while
|
|
1117
|
-
a turn runs. `start
|
|
1118
|
-
|
|
1119
|
-
twice. `AsyncBoxd` has the same methods, awaited, and `events()` there is an
|
|
1133
|
+
a turn runs. `start` and `send` are sent again after a lost connection with
|
|
1134
|
+
the same request id, so a repeat never starts a second session or delivers a
|
|
1135
|
+
message twice; `interrupt` is sent once. `AsyncBoxd` has the same methods, awaited, and `events()` there is an
|
|
1120
1136
|
async iterator. More: [Coding agent sessions](https://docs.boxd.sh/guides/coding-agents).
|
|
1121
1137
|
|
|
1122
1138
|
### Ports and proxies
|
|
@@ -1053,6 +1053,22 @@ apart by `type`; every turn ends with `turn.finished` and its `reason`
|
|
|
1053
1053
|
Without `follow`, `events()` ends after the latest event; with it, it has no
|
|
1054
1054
|
deadline and stops when you stop iterating.
|
|
1055
1055
|
|
|
1056
|
+
`run()` does one task in one call: it starts a session, sends the task, waits
|
|
1057
|
+
for that turn to end and closes the session again:
|
|
1058
|
+
|
|
1059
|
+
```python
|
|
1060
|
+
result = agents.run("my-box", "claude-code", "Fix the failing test", cwd="/home/boxd/app")
|
|
1061
|
+
print(result.reply)
|
|
1062
|
+
if result.reason != "done":
|
|
1063
|
+
print(f"[{result.reason}] {result.error or ''}")
|
|
1064
|
+
```
|
|
1065
|
+
|
|
1066
|
+
`result.reply` is the agent's last reply in the turn, `result.reason` how the
|
|
1067
|
+
turn ended (a turn that doesn't end `"done"` is returned, not raised), and
|
|
1068
|
+
`result.usage` its tokens. `keep=True` leaves the session open, `session=` sends
|
|
1069
|
+
the task to an open session instead, `on_event=` sees each event as it happens,
|
|
1070
|
+
and Ctrl-C (or cancelling the task, with `AsyncBoxd`) interrupts the turn.
|
|
1071
|
+
|
|
1056
1072
|
`runs()` reads how finished turns went from the platform's run history, newest
|
|
1057
1073
|
first, across the machines you can see:
|
|
1058
1074
|
|
|
@@ -1079,9 +1095,9 @@ machine's env vars and secrets (`env=` adds more). Give it a key as a secret
|
|
|
1079
1095
|
(`ANTHROPIC_API_KEY` or `OPENAI_API_KEY`, bound to its provider's host so the
|
|
1080
1096
|
machine only holds a placeholder), or sign Claude Code or Codex in once and
|
|
1081
1097
|
boxd serves the login to your private machines. The machine stays awake while
|
|
1082
|
-
a turn runs. `start
|
|
1083
|
-
|
|
1084
|
-
twice. `AsyncBoxd` has the same methods, awaited, and `events()` there is an
|
|
1098
|
+
a turn runs. `start` and `send` are sent again after a lost connection with
|
|
1099
|
+
the same request id, so a repeat never starts a second session or delivers a
|
|
1100
|
+
message twice; `interrupt` is sent once. `AsyncBoxd` has the same methods, awaited, and `events()` there is an
|
|
1085
1101
|
async iterator. More: [Coding agent sessions](https://docs.boxd.sh/guides/coding-agents).
|
|
1086
1102
|
|
|
1087
1103
|
### Ports and proxies
|
|
@@ -45,11 +45,16 @@ from .models import (
|
|
|
45
45
|
AgentEventBase,
|
|
46
46
|
AgentFinishReason,
|
|
47
47
|
AgentInterruptResult,
|
|
48
|
+
AgentLogin,
|
|
49
|
+
AgentLoginMethod,
|
|
50
|
+
AgentLoginResult,
|
|
51
|
+
AgentLoginStart,
|
|
48
52
|
AgentMessage,
|
|
49
53
|
AgentMessageDelta,
|
|
50
54
|
AgentPlan,
|
|
51
55
|
AgentPlanItem,
|
|
52
56
|
AgentRun,
|
|
57
|
+
AgentRunResult,
|
|
53
58
|
AgentRunStartedBy,
|
|
54
59
|
AgentRunUsage,
|
|
55
60
|
AgentRunsPage,
|
|
@@ -200,11 +205,16 @@ __all__ = [
|
|
|
200
205
|
"AgentEventBase",
|
|
201
206
|
"AgentFinishReason",
|
|
202
207
|
"AgentInterruptResult",
|
|
208
|
+
"AgentLogin",
|
|
209
|
+
"AgentLoginMethod",
|
|
210
|
+
"AgentLoginResult",
|
|
211
|
+
"AgentLoginStart",
|
|
203
212
|
"AgentMessage",
|
|
204
213
|
"AgentMessageDelta",
|
|
205
214
|
"AgentPlan",
|
|
206
215
|
"AgentPlanItem",
|
|
207
216
|
"AgentRun",
|
|
217
|
+
"AgentRunResult",
|
|
208
218
|
"AgentRunStartedBy",
|
|
209
219
|
"AgentRunUsage",
|
|
210
220
|
"AgentRunsPage",
|