soothe-client-python 0.10.0__tar.gz → 0.10.2__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 (32) hide show
  1. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/PKG-INFO +2 -2
  2. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/pyproject.toml +1 -1
  3. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/pool.py +17 -5
  4. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/.gitignore +0 -0
  5. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/LICENSE +0 -0
  6. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/README.md +0 -0
  7. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/__init__.py +0 -0
  8. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/__init__.py +0 -0
  9. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/attachments.py +0 -0
  10. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/broadcaster.py +0 -0
  11. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/chunk_filter.py +0 -0
  12. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/classifier.py +0 -0
  13. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/daemon_session.py +0 -0
  14. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/events.py +0 -0
  15. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/managed_client.py +0 -0
  16. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/observability.py +0 -0
  17. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/query_gate.py +0 -0
  18. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/session_store.py +0 -0
  19. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/thinking_step.py +0 -0
  20. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/turn.py +0 -0
  21. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/appkit/turn_runner.py +0 -0
  22. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/command_client.py +0 -0
  23. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/errors.py +0 -0
  24. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/helpers.py +0 -0
  25. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/intent_hints.py +0 -0
  26. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/protocol_params.py +0 -0
  27. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/py.typed +0 -0
  28. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/schemas.py +0 -0
  29. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/session.py +0 -0
  30. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/stream_terminal.py +0 -0
  31. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/turn_boundary.py +0 -0
  32. {soothe_client_python-0.10.0 → soothe_client_python-0.10.2}/src/soothe_client/websocket.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: soothe-client-python
3
- Version: 0.10.0
3
+ Version: 0.10.2
4
4
  Summary: WebSocket client + appkit for soothe-daemon (Python)
5
5
  Project-URL: Homepage, https://github.com/mirasoth/soothe-client-python
6
6
  Project-URL: Documentation, https://soothe.readthedocs.io
@@ -21,7 +21,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
21
  Requires-Python: <3.15,>=3.11
22
22
  Requires-Dist: pillow<12.0.0,>=10.0.0
23
23
  Requires-Dist: pydantic<3.0.0,>=2.0.0
24
- Requires-Dist: soothe-sdk<1.0.0,>=0.8.1
24
+ Requires-Dist: soothe-sdk<2.0.0,>=1.0.0
25
25
  Requires-Dist: websockets>=12.0
26
26
  Provides-Extra: dev
27
27
  Requires-Dist: mypy>=1.0.0; extra == 'dev'
@@ -23,7 +23,7 @@ classifiers = [
23
23
  "Topic :: Software Development :: Libraries :: Python Modules",
24
24
  ]
25
25
  dependencies = [
26
- "soothe-sdk>=0.8.1,<1.0.0",
26
+ "soothe-sdk>=1.0.0,<2.0.0",
27
27
  "pydantic>=2.0.0,<3.0.0",
28
28
  "websockets>=12.0",
29
29
  "pillow>=10.0.0,<12.0.0",
@@ -35,7 +35,11 @@ class ErrPoolExhausted(Exception): # noqa: N818 — match Go/TS name
35
35
 
36
36
  @dataclass(slots=True)
37
37
  class PoolConfig:
38
- """Configures a ``ConnectionPool``. Zero / negative sizes use defaults."""
38
+ """Configures a ``ConnectionPool``. Zero / negative sizes use defaults.
39
+
40
+ ``max_idle_time_s`` is enforced on ``acquire`` (idle sessions are released).
41
+ ``health_check_interval_s`` is reserved for future background sweeps.
42
+ """
39
43
 
40
44
  pool_size: int = 1000
41
45
  query_timeout_s: float = 30 * 60
@@ -151,10 +155,18 @@ class ConnectionPool:
151
155
  if existing.is_disconnected() or not existing.is_connected():
152
156
  await self._release_unlocked(session_id)
153
157
  else:
154
- existing.last_used = time.monotonic()
155
- with contextlib.suppress(Exception):
156
- await self._store.update_last_used(session_id)
157
- return existing
158
+ idle_too_long = (
159
+ self._cfg.max_idle_time_s > 0
160
+ and existing.last_used > 0
161
+ and (time.monotonic() - existing.last_used) > self._cfg.max_idle_time_s
162
+ )
163
+ if idle_too_long:
164
+ await self._release_unlocked(session_id)
165
+ else:
166
+ existing.last_used = time.monotonic()
167
+ with contextlib.suppress(Exception):
168
+ await self._store.update_last_used(session_id)
169
+ return existing
158
170
 
159
171
  if not self._pool:
160
172
  raise ErrPoolExhausted()