boxd 0.3.2.dev1178__tar.gz → 0.3.2.dev1182__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.dev1178/src/boxd.egg-info → boxd-0.3.2.dev1182}/PKG-INFO +28 -1
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/README.md +27 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/pyproject.toml +1 -1
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/__init__.py +8 -0
- boxd-0.3.2.dev1182/src/boxd/_generated/api_pb2.py +816 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_generated/api_pb2_grpc.py +47 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_mappers.py +45 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_requests.py +12 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/models.py +55 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/agents.py +211 -12
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182/src/boxd.egg-info}/PKG-INFO +28 -1
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_agents.py +233 -22
- boxd-0.3.2.dev1178/src/boxd/_generated/api_pb2.py +0 -810
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/LICENSE +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/setup.cfg +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_client.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_credentials.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_generated/__init__.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_regions.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_streaming.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_transport.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_urls.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_version_check.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/computer_use.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/errors.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/py.typed +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/__init__.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/account.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/computer.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/credentials.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/disks.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/domains.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/fs.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/machines.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/orgs.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/regions.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/snapshots.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/teams.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/vars.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/spec.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd.egg-info/SOURCES.txt +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd.egg-info/dependency_links.txt +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd.egg-info/requires.txt +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd.egg-info/top_level.txt +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_computer.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_computer_use.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_create_in_one_call.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_credentials.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_delete_self.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_fs.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_mappers.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_namespaces.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_python_versions.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_raw_key.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_regions.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_requests.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_spec.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_streaming.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_transport.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_urls.py +0 -0
- {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/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.dev1182
|
|
4
4
|
Summary: Python SDK for the boxd cloud VM platform
|
|
5
5
|
Author: Azin
|
|
6
6
|
License-Expression: MIT
|
|
@@ -1073,6 +1073,12 @@ Claude Code, tool calls for Codex). `interrupt()` stops the running turn
|
|
|
1073
1073
|
session, and `list(machine, all=True)` also shows closed and failed sessions.
|
|
1074
1074
|
`harnesses()` lists the agents a machine can run.
|
|
1075
1075
|
|
|
1076
|
+
`start` and `send` are retried after a lost connection without running
|
|
1077
|
+
anything twice: each carries a `request_id`, and a repeat with the same one
|
|
1078
|
+
gets the first answer. The SDK makes up a new one for each call; pass
|
|
1079
|
+
`request_id=` yourself to retry from another process, such as an automation
|
|
1080
|
+
running a step again.
|
|
1081
|
+
|
|
1076
1082
|
The events are `AgentTurnStarted`, `AgentUserMessage`, `AgentMessageDelta`,
|
|
1077
1083
|
`AgentMessage`, `AgentThinkingDelta`, `AgentToolStarted`, `AgentToolOutput`,
|
|
1078
1084
|
`AgentToolFinished`, `AgentPlan`, `AgentUsage` and `AgentTurnFinished`, told
|
|
@@ -1082,6 +1088,27 @@ apart by `type`; every turn ends with `turn.finished` and its `reason`
|
|
|
1082
1088
|
Without `follow`, `events()` ends after the latest event; with it, it has no
|
|
1083
1089
|
deadline and stops when you stop iterating.
|
|
1084
1090
|
|
|
1091
|
+
`runs()` reads how finished turns went from the platform's run history, newest
|
|
1092
|
+
first, across the machines you can see:
|
|
1093
|
+
|
|
1094
|
+
```python
|
|
1095
|
+
from datetime import datetime, timedelta, timezone
|
|
1096
|
+
|
|
1097
|
+
page = agents.runs(machine="my-box", since=datetime.now(timezone.utc) - timedelta(days=1))
|
|
1098
|
+
for run in page.runs:
|
|
1099
|
+
print(run.session_id, run.turn, run.reason, run.error or "")
|
|
1100
|
+
# page.next_page_token, passed as page_token=, reads the next, older page;
|
|
1101
|
+
# iter_runs() reads every page for you.
|
|
1102
|
+
```
|
|
1103
|
+
|
|
1104
|
+
Each `AgentRun` has the machine, the session, the turn, the agent and its
|
|
1105
|
+
version, how the turn started and ended (`reason`, `error`), when, its steps and
|
|
1106
|
+
its tokens, but no prompts or output. Filter by `machine`, `session` and
|
|
1107
|
+
`since`; `limit` is 50 by default, at most 500. Reading the history never wakes
|
|
1108
|
+
a machine, and it keeps 30 days of runs, also after a machine is deleted. A
|
|
1109
|
+
cluster that doesn't keep run history (some self-hosted ones) answers with a
|
|
1110
|
+
`ConflictError`.
|
|
1111
|
+
|
|
1085
1112
|
The agent runs as the machine's user without asking before it acts, with the
|
|
1086
1113
|
machine's env vars and secrets (`env=` adds more). Give it a key as a secret
|
|
1087
1114
|
(`ANTHROPIC_API_KEY` or `OPENAI_API_KEY`, bound to its provider's host so the
|
|
@@ -1038,6 +1038,12 @@ Claude Code, tool calls for Codex). `interrupt()` stops the running turn
|
|
|
1038
1038
|
session, and `list(machine, all=True)` also shows closed and failed sessions.
|
|
1039
1039
|
`harnesses()` lists the agents a machine can run.
|
|
1040
1040
|
|
|
1041
|
+
`start` and `send` are retried after a lost connection without running
|
|
1042
|
+
anything twice: each carries a `request_id`, and a repeat with the same one
|
|
1043
|
+
gets the first answer. The SDK makes up a new one for each call; pass
|
|
1044
|
+
`request_id=` yourself to retry from another process, such as an automation
|
|
1045
|
+
running a step again.
|
|
1046
|
+
|
|
1041
1047
|
The events are `AgentTurnStarted`, `AgentUserMessage`, `AgentMessageDelta`,
|
|
1042
1048
|
`AgentMessage`, `AgentThinkingDelta`, `AgentToolStarted`, `AgentToolOutput`,
|
|
1043
1049
|
`AgentToolFinished`, `AgentPlan`, `AgentUsage` and `AgentTurnFinished`, told
|
|
@@ -1047,6 +1053,27 @@ apart by `type`; every turn ends with `turn.finished` and its `reason`
|
|
|
1047
1053
|
Without `follow`, `events()` ends after the latest event; with it, it has no
|
|
1048
1054
|
deadline and stops when you stop iterating.
|
|
1049
1055
|
|
|
1056
|
+
`runs()` reads how finished turns went from the platform's run history, newest
|
|
1057
|
+
first, across the machines you can see:
|
|
1058
|
+
|
|
1059
|
+
```python
|
|
1060
|
+
from datetime import datetime, timedelta, timezone
|
|
1061
|
+
|
|
1062
|
+
page = agents.runs(machine="my-box", since=datetime.now(timezone.utc) - timedelta(days=1))
|
|
1063
|
+
for run in page.runs:
|
|
1064
|
+
print(run.session_id, run.turn, run.reason, run.error or "")
|
|
1065
|
+
# page.next_page_token, passed as page_token=, reads the next, older page;
|
|
1066
|
+
# iter_runs() reads every page for you.
|
|
1067
|
+
```
|
|
1068
|
+
|
|
1069
|
+
Each `AgentRun` has the machine, the session, the turn, the agent and its
|
|
1070
|
+
version, how the turn started and ended (`reason`, `error`), when, its steps and
|
|
1071
|
+
its tokens, but no prompts or output. Filter by `machine`, `session` and
|
|
1072
|
+
`since`; `limit` is 50 by default, at most 500. Reading the history never wakes
|
|
1073
|
+
a machine, and it keeps 30 days of runs, also after a machine is deleted. A
|
|
1074
|
+
cluster that doesn't keep run history (some self-hosted ones) answers with a
|
|
1075
|
+
`ConflictError`.
|
|
1076
|
+
|
|
1050
1077
|
The agent runs as the machine's user without asking before it acts, with the
|
|
1051
1078
|
machine's env vars and secrets (`env=` adds more). Give it a key as a secret
|
|
1052
1079
|
(`ANTHROPIC_API_KEY` or `OPENAI_API_KEY`, bound to its provider's host so the
|
|
@@ -49,6 +49,10 @@ from .models import (
|
|
|
49
49
|
AgentMessageDelta,
|
|
50
50
|
AgentPlan,
|
|
51
51
|
AgentPlanItem,
|
|
52
|
+
AgentRun,
|
|
53
|
+
AgentRunStartedBy,
|
|
54
|
+
AgentRunUsage,
|
|
55
|
+
AgentRunsPage,
|
|
52
56
|
AgentSendResult,
|
|
53
57
|
AgentSendWhen,
|
|
54
58
|
AgentSession,
|
|
@@ -200,6 +204,10 @@ __all__ = [
|
|
|
200
204
|
"AgentMessageDelta",
|
|
201
205
|
"AgentPlan",
|
|
202
206
|
"AgentPlanItem",
|
|
207
|
+
"AgentRun",
|
|
208
|
+
"AgentRunStartedBy",
|
|
209
|
+
"AgentRunUsage",
|
|
210
|
+
"AgentRunsPage",
|
|
203
211
|
"AgentSendResult",
|
|
204
212
|
"AgentSendWhen",
|
|
205
213
|
"AgentSession",
|