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.
Files changed (61) hide show
  1. {boxd-0.3.2.dev1178/src/boxd.egg-info → boxd-0.3.2.dev1182}/PKG-INFO +28 -1
  2. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/README.md +27 -0
  3. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/pyproject.toml +1 -1
  4. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/__init__.py +8 -0
  5. boxd-0.3.2.dev1182/src/boxd/_generated/api_pb2.py +816 -0
  6. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_generated/api_pb2_grpc.py +47 -0
  7. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_mappers.py +45 -0
  8. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_requests.py +12 -0
  9. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/models.py +55 -0
  10. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/agents.py +211 -12
  11. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182/src/boxd.egg-info}/PKG-INFO +28 -1
  12. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_agents.py +233 -22
  13. boxd-0.3.2.dev1178/src/boxd/_generated/api_pb2.py +0 -810
  14. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/LICENSE +0 -0
  15. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/setup.cfg +0 -0
  16. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_client.py +0 -0
  17. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_credentials.py +0 -0
  18. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_generated/__init__.py +0 -0
  19. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_regions.py +0 -0
  20. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_streaming.py +0 -0
  21. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_transport.py +0 -0
  22. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_urls.py +0 -0
  23. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/_version_check.py +0 -0
  24. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/computer_use.py +0 -0
  25. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/errors.py +0 -0
  26. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/py.typed +0 -0
  27. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/__init__.py +0 -0
  28. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/account.py +0 -0
  29. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/computer.py +0 -0
  30. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/credentials.py +0 -0
  31. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/disks.py +0 -0
  32. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/domains.py +0 -0
  33. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/fs.py +0 -0
  34. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/machines.py +0 -0
  35. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/orgs.py +0 -0
  36. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/regions.py +0 -0
  37. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/snapshots.py +0 -0
  38. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/teams.py +0 -0
  39. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/resources/vars.py +0 -0
  40. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd/spec.py +0 -0
  41. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd.egg-info/SOURCES.txt +0 -0
  42. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd.egg-info/dependency_links.txt +0 -0
  43. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd.egg-info/requires.txt +0 -0
  44. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/src/boxd.egg-info/top_level.txt +0 -0
  45. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_computer.py +0 -0
  46. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_computer_use.py +0 -0
  47. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_create_in_one_call.py +0 -0
  48. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_credentials.py +0 -0
  49. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_delete_self.py +0 -0
  50. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_fs.py +0 -0
  51. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_mappers.py +0 -0
  52. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_namespaces.py +0 -0
  53. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_python_versions.py +0 -0
  54. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_raw_key.py +0 -0
  55. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_regions.py +0 -0
  56. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_requests.py +0 -0
  57. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_spec.py +0 -0
  58. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_streaming.py +0 -0
  59. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_transport.py +0 -0
  60. {boxd-0.3.2.dev1178 → boxd-0.3.2.dev1182}/tests/test_urls.py +0 -0
  61. {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.dev1178
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boxd"
3
- version = "0.3.2.dev1178"
3
+ version = "0.3.2.dev1182"
4
4
  description = "Python SDK for the boxd cloud VM platform"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -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",