|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project are documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this |
| 6 | +project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +## [Unreleased] |
| 9 | + |
| 10 | +Nothing yet. |
| 11 | + |
| 12 | +## [0.1.0] - 2026-09-02 |
| 13 | + |
| 14 | +Initial release, targeting tensic.ai server 1.6 and newer. |
| 15 | + |
| 16 | +### Added |
| 17 | + |
| 18 | +- `Tensic` / `AsyncTensic` clients with identical APIs: env-based configuration |
| 19 | + (`TENSIC_URL`, `TENSIC_API_KEY`), API-key or username/password (`Tensic.login`, TOTP aware) |
| 20 | + authentication, `Tensic.ldap_login()` / `AsyncTensic.ldap_login()` for instances with LDAP |
| 21 | + authentication enabled (`POST /ldap`, the same cookie session as `login()`, no TOTP step), |
| 22 | + timeouts, retries with back-off and `Retry-After` support, `with_options()`, |
| 23 | + bring-your-own `httpx` client, `TENSIC_LOG=debug` logging. |
| 24 | +- `client.chat`: `send`, `stream` (typed SSE events, resume via `last_event_id`, error frames |
| 25 | + raised as `ChatStreamError`), `stop`, `upload_attachment`, `get_asset`, `conversation()` |
| 26 | + helper with turn history, automatic `Idempotency-Key` on non-streaming turns. |
| 27 | +- `client.knowledge`: text/URL/file/bulk ingestion, semantic search, source listing, chunk |
| 28 | + inspection, deletion, reset, sync and re-embed jobs. |
| 29 | +- `client.projects` with sub-resources: prompts, secrets, routines, widgets, logs, |
| 30 | + conversations, analytics, evals, memory, comments, guards, custom tools, webhooks, |
| 31 | + integrations; plus `iter()` auto-paging and `find(name)`. |
| 32 | +- `client.teams`, `client.users` (with `api_keys`), `client.llms`, `client.embeddings`, |
| 33 | + `client.tools`, `client.statistics`, `client.templates`, `client.image`, `client.audio`, |
| 34 | + `client.settings`, `client.classifiers`, `client.image_generators`, |
| 35 | + `client.speech_to_text`, `client.invitations`, `client.examples`, `client.news`, |
| 36 | + `client.search()`, `client.whoami()`, `client.version()`, and |
| 37 | + `client.health(probe="ready"|"live")` addressing either container probe route |
| 38 | + (`GET /health/ready`, `GET /health/live`). |
| 39 | +- `client.direct`: OpenAI-compatible chat completions (sync/async, streaming |
| 40 | + `ChatCompletionStream`), completions, embeddings, models, image generation, audio |
| 41 | + transcription/translation, moderations, plus `client.openai_base_url` for the official |
| 42 | + `openai` package. |
| 43 | +- `WidgetClient` / `AsyncWidgetClient` for widget-key access (`config`, `chat`, `stream`). |
| 44 | +- Typed exception hierarchy (`tensicai.errors`) parsing the tensic error envelope, legacy |
| 45 | + `detail` shapes and the OpenAI error shape, exposing `request_id`, `retry_after` and rate |
| 46 | + limit headers. |
| 47 | +- Lenient dataclass models under `tensicai.types` (unknown fields kept in `.extra`), |
| 48 | + `Page` / `ProjectsPage` pagination helpers, `py.typed`. |
| 49 | +- The request-side type aliases used by the SDK's own signatures are public, so typed wrapper |
| 50 | + code never reaches into a private module: `FileInput`, `FileContent`, `AttachmentInput`, |
| 51 | + `Timeout`, `TimeoutOrNotGiven`, `NotGiven`, `NotGivenOr` and `Probe` are exported from |
| 52 | + `tensicai` and `tensicai.types`, and the wire-value literal aliases (`Splitter`, |
| 53 | + `IngestMethod`, `Privacy`, `TemplateVisibility`) each live in exactly one domain type module. |
| 54 | +- `image=` is validated client-side: a `str` is a base64 payload or an `http(s)`/`data:` URL |
| 55 | + and is never read from disk, so a filename raises `ValueError` pointing at `Path(...)` |
| 56 | + before any request rather than sending the model a name it cannot see. `bytes` and a |
| 57 | + `pathlib.Path` are base64-encoded for you. `client.image.generate(image=...)` is stricter |
| 58 | + still — that endpoint decodes rather than fetches, so it takes base64, a `data:` URL, |
| 59 | + `bytes` or a `Path`, but not an `http(s)` URL. |
| 60 | +- Runnable examples under `examples/`, GitHub Actions CI (Python 3.10–3.14) and a PyPI |
| 61 | + Trusted Publishing release workflow. |
| 62 | + |
| 63 | +### Packaging |
| 64 | + |
| 65 | +- Two declared runtime dependencies: `httpx>=0.25,<1` and `anyio>=3.5`. `anyio` is imported |
| 66 | + directly by the async client (retry back-off sleeps, threaded file reads for `Path`/file-object |
| 67 | + uploads) and is declared in its own right rather than relied on transitively through |
| 68 | + httpx/httpcore. |
| 69 | +- PyPI metadata: `authors` names team.blue (`pedro.dias@team.blue`) with the individual under |
| 70 | + `maintainers`; the license is the PEP 639 expression `Apache-2.0` with no deprecated |
| 71 | + `License ::` classifier; `Programming Language :: Python :: 3 :: Only` is declared. The |
| 72 | + project URLs are `Documentation` (the README), `Repository`, `Issues`, `Architecture` |
| 73 | + (docs/INTERNALS.md, the contributor guide) and `Changelog` — every link points at a host we |
| 74 | + control, never at the parked `tensic.cloud` domain. |
| 75 | +- The sdist ships `.github/` and `Makefile` alongside `tests/`, so the test suite it carries |
| 76 | + passes from an extracted sdist and the `make` targets CONTRIBUTING.md documents run there. |
| 77 | +- CI and the release workflow install with `uv sync --locked`, so a `uv.lock` that no longer |
| 78 | + matches `pyproject.toml` fails the run instead of being silently re-resolved. |
| 79 | +- `publish.yml` runs ruff, mypy and the full test suite before building, so a tag push cannot |
| 80 | + upload to PyPI ahead of (or despite) a red CI run. |
| 81 | + |
| 82 | +[Unreleased]: https://github.com/tensicai/python-sdk/compare/v0.1.0...HEAD |
| 83 | +[0.1.0]: https://github.com/tensicai/python-sdk/releases/tag/v0.1.0 |
0 commit comments