Skip to content

Releases: cominty/python-sdk

Release list

v0.4.0

Choose a tag to compare

@mous222 mous222 released this 30 Jun 00:34

Notes

Adds thread management and multi-turn conversations, and makes rate-limit errors
actually readable. Builds on the v1 redesign (0.3.0).

⚠️ Breaking changes

  • user_id moved to the client and is now mandatory. Set it once via
    AsyncCominty(user_id="user_...") or COMINTY_USER_ID; it's validated at
    construction and applied to every request. It's been removed from
    chat.start (and all other call signatures).
    # before (0.3.0)
    await client.chat.start(agent_id=..., message=..., user_id="user_...")
    # now (0.4.0)
    client = AsyncCominty(user_id="user_...")
    await client.chat.start(agent_id=..., message=...)

✨ New

  • client.threads : full thread management: list (scoped to the user, with
    terms/limit/page), get, update (partial), archive.
  • chat.send(thread_id, ...) : follow-up messages in an existing thread; same
    streamable run as start. Use it to answer an agent's clarifying questions.
  • AssistantRun.questions() : read the agent's clarifying questions
    (prompt + options) when it needs input instead of answering.
  • Clearer 429s. RateLimitError now renders a scope-aware, actionable message
    (organization quota vs. user quota vs. concurrency cap) and exposes
    .scope, .retry_after, and .reset_at.

🐛 Fixes

  • chat.send now correctly parses POST /chat/{id} as the assistant Message
    (it returns a message, not a thread).
  • threads.update now correctly returns a ThreadSummary (PUT /chat/{id}
    responds without the message history).
  • Removed a stray pdb.set_trace() from the transport layer.

📚 Docs & examples

  • Eight runnable examples under examples/:
    streaming, await-result, follow-up, answering questions, listing/managing
    threads, calling a custom managed agent, and pulling live context from an
    MCP server (Linear) with colored, aligned rich output.
  • New SDK & API reference at docs/sdk-reference.md; README rewritten to the
    real surface.

v0.3.0

Choose a tag to compare

@mous222 mous222 released this 29 Jun 16:56
5ffc798

What's Changed

The v1 redesign of the Cominty Python SDK: a cleaner public surface, a broader
supported-Python range, and typed streaming and error handling throughout.

⚠️ Breaking changes

  • Renamed public response models — dropped the Out suffix:
    • ThreadOutThread, ThreadSummaryOutThreadSummary
    • MessageOutMessage
    • AgentOutAgent
    • ConversationFileOutConversationFile
  • AsyncHTTPClientAsyncTransport
  • ThreadUpdateUpdateThreadParams
  • New module layout (models, streaming, and transport split into their own
    modules) — update your imports accordingly.

✨ Highlights

  • Wider Python support: 3.9+ (was 3.11+). Installs and runs on 3.9 through
    3.13, verified across the full matrix in CI.
  • StreamHandle[EventT] — typed, public primitive for consuming chat event
    streams.
  • Typed error bodiesAPIError.error now carries a structured
    APIErrorBody model instead of a raw dict.
  • Explicit __all__ across modules for a clean, intentional public API.
    APIErrorBody model instead of a raw dict.
  • Explicit __all__ across modules for a clean, intentional public API.
  • Fully typed (pyright strict) and py.typed shipped, so downstream type
    checkers see the SDK's types.

🛠 Tooling & internals

  • Toolchain standardized on uv + ruff + pyright (strict) + pytest-asyncio.
  • Added AGENTS.md — the coding playbook for typing and versioning conventions.
  • PyPI publishing via GitHub Releases using Trusted Publishing (OIDC) — no
    stored tokens — plus invoke release tasks.
  • Added eval-type-backport (Python < 3.10) so Pydantic resolves X | Y field
    annotations on the new 3.9 floor.