terrarium-python 0.1.2__tar.gz → 0.2.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.
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/.gitignore +5 -0
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/PKG-INFO +1 -1
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/pyproject.toml +1 -1
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/terrarium/client.py +13 -0
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/LICENSE +0 -0
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/README.md +0 -0
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/terrarium/__init__.py +0 -0
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/terrarium/cli.py +0 -0
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/terrarium/errors.py +0 -0
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/terrarium/memory.py +0 -0
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/terrarium/messages.py +0 -0
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/terrarium/options.py +0 -0
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/terrarium/py.typed +0 -0
- {terrarium_python-0.1.2 → terrarium_python-0.2.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: terrarium-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Async Python client for the Terrarium orchestrator API — manage sandboxed Claude agents and sessions (Claude-Agent-SDK-aligned).
|
|
5
5
|
Project-URL: Homepage, https://oaisp.github.io/terrarium/
|
|
6
6
|
Project-URL: Documentation, https://oaisp.github.io/terrarium/sdk/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# [tool.hatch.build.targets.wheel] below — so code reads `from terrarium import ...`
|
|
4
4
|
# regardless. The bare `terrarium` name was not available on PyPI.
|
|
5
5
|
name = "terrarium-python"
|
|
6
|
-
version = "0.
|
|
6
|
+
version = "0.2.0"
|
|
7
7
|
description = "Async Python client for the Terrarium orchestrator API — manage sandboxed Claude agents and sessions (Claude-Agent-SDK-aligned)."
|
|
8
8
|
readme = "README.md"
|
|
9
9
|
requires-python = ">=3.10"
|
|
@@ -224,6 +224,19 @@ class SessionsResource:
|
|
|
224
224
|
body = {"content": content} if isinstance(content, list) else {"text": content}
|
|
225
225
|
await self._h.json("POST", f"/v1/sessions/{session_id}/messages", json=body)
|
|
226
226
|
|
|
227
|
+
async def recover(self, session_id: str) -> dict[str, Any]:
|
|
228
|
+
"""Reattach to a session marked terminated whose sandbox is still running.
|
|
229
|
+
|
|
230
|
+
The orchestrator's event stream is a client of the sandbox, not the sandbox itself, so
|
|
231
|
+
it can drop (a Docker daemon restart, a host suspend) while the agent is perfectly
|
|
232
|
+
alive. The orchestrator reattaches automatically now; this is the manual counterpart
|
|
233
|
+
for sessions stranded before that, or past the automatic retry budget.
|
|
234
|
+
|
|
235
|
+
Raises ConflictError (409) when the sandbox really is gone — the transcript remains
|
|
236
|
+
readable, but the conversation cannot be resumed.
|
|
237
|
+
"""
|
|
238
|
+
return await self._h.json("POST", f"/v1/sessions/{session_id}/recover")
|
|
239
|
+
|
|
227
240
|
async def interrupt(self, session_id: str) -> None:
|
|
228
241
|
await self._h.json("POST", f"/v1/sessions/{session_id}/interrupt")
|
|
229
242
|
|
|
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
|