tars-sdk 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.
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/CHANGELOG.md +14 -0
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/PKG-INFO +1 -1
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/pyproject.toml +1 -1
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/src/tars_sdk/client.py +2 -1
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/src/tars_sdk/errors.py +4 -3
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/.gitignore +0 -0
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/README.md +0 -0
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/src/tars_sdk/__init__.py +0 -0
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/src/tars_sdk/_sse.py +0 -0
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/src/tars_sdk/_wire.py +0 -0
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/src/tars_sdk/events.py +0 -0
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/src/tars_sdk/models.py +0 -0
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/src/tars_sdk/py.typed +0 -0
- {tars_sdk-0.1.2 → tars_sdk-0.2.0}/src/tars_sdk/session.py +0 -0
|
@@ -5,6 +5,20 @@ minimum TARS backend it needs. The version lives in `pyproject.toml`; bump
|
|
|
5
5
|
it in the same PR as the entry, and label that PR `release-approved` once
|
|
6
6
|
prd runs that backend — merging it publishes.
|
|
7
7
|
|
|
8
|
+
## 0.2.0
|
|
9
|
+
|
|
10
|
+
Needs TARS backend ≥ `prd-20261109-0302-sha-d0739d47` (the error-envelope change, TAR-11).
|
|
11
|
+
|
|
12
|
+
- Every error response now carries the `{"error": {"code", "message"}}`
|
|
13
|
+
envelope, so `TarsApiError.code` is no longer `None` on the `401`s, the
|
|
14
|
+
agent / file `404`s, the upload `400`, the archived-agent `409`, the
|
|
15
|
+
`400` / `404` from deleting an MCP credential, and an unknown route's `404`
|
|
16
|
+
(`unauthorized`, `not_found`, `validation_error`, `agent_archived`). Code
|
|
17
|
+
that read `body["error"]` as a string on those responses now finds a dict.
|
|
18
|
+
- Fastify's own client errors (a malformed JSON body, a bad content-type) now
|
|
19
|
+
answer `validation_error` instead of `internal_error`.
|
|
20
|
+
- `sessions.rename(id, None)` clears the title (the API already accepted it).
|
|
21
|
+
|
|
8
22
|
## 0.1.2
|
|
9
23
|
|
|
10
24
|
Needs TARS backend ≥ `prd-20261108-2059-sha-918f00a7` (unchanged).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: tars-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Client SDK for TARS — the self-hosted managed-agents platform (agents, durable sessions, streaming turns, client-executed tools, files).
|
|
5
5
|
Project-URL: Homepage, https://github.com/LegendariTech/tars
|
|
6
6
|
Project-URL: Repository, https://github.com/LegendariTech/tars
|
|
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
|
|
|
6
6
|
name = "tars-sdk"
|
|
7
7
|
# Bumped by hand in the PR that adds the CHANGELOG entry; Verify refuses the
|
|
8
8
|
# bump without the `release-approved` label; merging publishes to PyPI.
|
|
9
|
-
version = "0.
|
|
9
|
+
version = "0.2.0"
|
|
10
10
|
description = "Client SDK for TARS — the self-hosted managed-agents platform (agents, durable sessions, streaming turns, client-executed tools, files)."
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
license = "MIT"
|
|
@@ -410,7 +410,8 @@ class SessionsClient:
|
|
|
410
410
|
"""The session with its journal inlined in ``events``."""
|
|
411
411
|
return SessionInfo.from_dict(await self._c._request("GET", f"/v1/sessions/{id}"))
|
|
412
412
|
|
|
413
|
-
async def rename(self, id: str, title: str) -> OkResult:
|
|
413
|
+
async def rename(self, id: str, title: str | None) -> OkResult:
|
|
414
|
+
"""Set the session's title; ``None`` clears it (``display_title`` falls back to the agent's name)."""
|
|
414
415
|
return OkResult.from_dict(await self._c._request("PATCH", f"/v1/sessions/{id}", {"title": title}))
|
|
415
416
|
|
|
416
417
|
async def events(self, id: str, *, after_seq: int | None = None, limit: int | None = None) -> SessionEventsPage:
|
|
@@ -10,9 +10,10 @@ class TarsApiError(Exception):
|
|
|
10
10
|
"""A non-2xx answer from TARS.
|
|
11
11
|
|
|
12
12
|
``code`` is the stable error code clients classify on (``validation_error``,
|
|
13
|
-
``not_found``, ``
|
|
14
|
-
``
|
|
15
|
-
|
|
13
|
+
``not_found``, ``unauthorized``, ``turn_in_progress``,
|
|
14
|
+
``provider_not_configured``, …), read from the ``{"error": {"code": …}}``
|
|
15
|
+
envelope every TARS error response carries; it is ``None`` only when the
|
|
16
|
+
body was not that envelope (a proxy's own error page). ``body`` is the parsed
|
|
16
17
|
JSON body, or the raw text when it was not JSON, or ``None`` when empty.
|
|
17
18
|
"""
|
|
18
19
|
|
|
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
|