soothe-client-python 0.9.4__py3-none-any.whl
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.
- soothe_client/__init__.py +171 -0
- soothe_client/appkit/__init__.py +138 -0
- soothe_client/appkit/attachments.py +118 -0
- soothe_client/appkit/broadcaster.py +116 -0
- soothe_client/appkit/chunk_filter.py +99 -0
- soothe_client/appkit/classifier.py +498 -0
- soothe_client/appkit/daemon_session.py +657 -0
- soothe_client/appkit/events.py +63 -0
- soothe_client/appkit/managed_client.py +163 -0
- soothe_client/appkit/observability.py +29 -0
- soothe_client/appkit/pool.py +258 -0
- soothe_client/appkit/query_gate.py +93 -0
- soothe_client/appkit/session_store.py +100 -0
- soothe_client/appkit/thinking_step.py +147 -0
- soothe_client/appkit/turn.py +362 -0
- soothe_client/appkit/turn_runner.py +565 -0
- soothe_client/errors.py +65 -0
- soothe_client/helpers.py +404 -0
- soothe_client/intent_hints.py +43 -0
- soothe_client/protocol_params.py +604 -0
- soothe_client/schemas.py +55 -0
- soothe_client/session.py +199 -0
- soothe_client/websocket.py +1626 -0
- soothe_client/ws_command_client.py +633 -0
- soothe_client_python-0.9.4.dist-info/METADATA +131 -0
- soothe_client_python-0.9.4.dist-info/RECORD +28 -0
- soothe_client_python-0.9.4.dist-info/WHEEL +4 -0
- soothe_client_python-0.9.4.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: soothe-client-python
|
|
3
|
+
Version: 0.9.4
|
|
4
|
+
Summary: WebSocket client + appkit for soothe-daemon (Python)
|
|
5
|
+
Project-URL: Homepage, https://github.com/mirasoth/soothe-client-python
|
|
6
|
+
Project-URL: Documentation, https://soothe.readthedocs.io
|
|
7
|
+
Project-URL: Repository, https://github.com/mirasoth/soothe-client-python
|
|
8
|
+
License: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: agents,ai,client,soothe,websocket
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Requires-Python: <3.15,>=3.11
|
|
22
|
+
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
|
23
|
+
Requires-Dist: soothe-sdk<1.0.0,>=0.5.25
|
|
24
|
+
Requires-Dist: websockets>=12.0
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest-asyncio>=1.3.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
29
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: ruff>=0.12.0; extra == 'dev'
|
|
31
|
+
Provides-Extra: image
|
|
32
|
+
Requires-Dist: pillow>=10.0.0; extra == 'image'
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# soothe-client-python
|
|
36
|
+
|
|
37
|
+
WebSocket client in Python for [soothe-daemon](https://github.com/mirasoth/soothe).
|
|
38
|
+
|
|
39
|
+
Peer of [`soothe-client-go`](https://github.com/mirasoth/soothe-client-go) and
|
|
40
|
+
[`@mirasoth/soothe-client`](https://github.com/mirasoth/soothe-client-typescript).
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install soothe-client-python
|
|
46
|
+
# optional image compaction:
|
|
47
|
+
pip install 'soothe-client-python[image]'
|
|
48
|
+
# or, in the soothe monorepo workspace:
|
|
49
|
+
uv sync --all-packages
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Quick start
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
from soothe_client import WebSocketClient, bootstrap_loop_session, connect_websocket_with_retries
|
|
56
|
+
|
|
57
|
+
client = WebSocketClient(url="ws://127.0.0.1:8765")
|
|
58
|
+
await connect_websocket_with_retries(client)
|
|
59
|
+
status = await bootstrap_loop_session(client, resume_loop_id=None)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Layout (RFC-629)
|
|
63
|
+
|
|
64
|
+
### Layer 0 (transport)
|
|
65
|
+
|
|
66
|
+
| Module | Role |
|
|
67
|
+
|--------|------|
|
|
68
|
+
| `websocket` | Protocol-1 `WebSocketClient` |
|
|
69
|
+
| `session` | Connect retries + loop bootstrap |
|
|
70
|
+
| `helpers` | Daemon status / config / skills RPCs |
|
|
71
|
+
| `ws_command_client` | Sync/async command helpers |
|
|
72
|
+
| `protocol_params` | Client-side params models |
|
|
73
|
+
| `intent_hints` | Intent-hint validation + `DEFAULT_DELIVERABLE_PHASES` |
|
|
74
|
+
|
|
75
|
+
### Layer 1 (`soothe_client.appkit`)
|
|
76
|
+
|
|
77
|
+
| Symbol | Role |
|
|
78
|
+
|--------|------|
|
|
79
|
+
| `DaemonSession` | Dual-socket loop session + `iter_turn_chunks` (CLI-grade) |
|
|
80
|
+
| `QueryGate` | Single-flight cancel-before-context gating |
|
|
81
|
+
| `EventClassifier` / `extract_thinking_step` | Deliverable / thinking-step mapping |
|
|
82
|
+
| `SSEBroadcaster` | Drop-on-full SSE-style fan-out |
|
|
83
|
+
| `ConnectionPool` / `TurnRunner` | Pooled multi-session turn execution |
|
|
84
|
+
| Idle / soft-complete / `compact_*` | Turn lifecycle + optional Pillow compaction |
|
|
85
|
+
| `SessionStore` | Persistence seam (Protocol) |
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
from soothe_client.appkit import DaemonSession
|
|
89
|
+
|
|
90
|
+
session = DaemonSession("ws://127.0.0.1:8765")
|
|
91
|
+
await session.connect()
|
|
92
|
+
await session.send_turn("hello")
|
|
93
|
+
async for namespace, mode, data in session.iter_turn_chunks():
|
|
94
|
+
...
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Shared wire codec and path constants remain in **soothe-sdk**
|
|
98
|
+
(`soothe_sdk.wire`, `soothe_sdk.paths`).
|
|
99
|
+
|
|
100
|
+
## Development
|
|
101
|
+
|
|
102
|
+
From this repository (or the `client/python` submodule):
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
make sync-dev # uv sync --extra dev --extra image
|
|
106
|
+
make fix # ruff --fix + format
|
|
107
|
+
make check # format-check + lint + unit tests
|
|
108
|
+
make test # unit + examples
|
|
109
|
+
make verify # format-check + lint + test + build
|
|
110
|
+
make publish-dry # inspect upload without publishing
|
|
111
|
+
make publish # PyPI (trusted publisher in CI, or UV_PUBLISH_TOKEN locally)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
| Target | Purpose |
|
|
115
|
+
|--------|---------|
|
|
116
|
+
| `format` / `format-check` | Ruff format |
|
|
117
|
+
| `lint` / `lint-fix` / `fix` | Ruff lint (+ auto-fix) |
|
|
118
|
+
| `test` / `test-unit` / `test-examples` | Pytest |
|
|
119
|
+
| `test-coverage` | Coverage HTML under `htmlcov/` |
|
|
120
|
+
| `build` | `uv build` → `dist/` |
|
|
121
|
+
| `verify` | Full pre-publish gate |
|
|
122
|
+
| `version-patch` / `-minor` / `-major` | Bump `VERSION` |
|
|
123
|
+
|
|
124
|
+
Examples live under `examples/appkit/` (run with `make test-examples`).
|
|
125
|
+
|
|
126
|
+
## Release
|
|
127
|
+
|
|
128
|
+
GitHub Actions:
|
|
129
|
+
|
|
130
|
+
- **CI** (`.github/workflows/ci.yml`) — format, lint, tests on Python 3.11–3.13
|
|
131
|
+
- **Release** (`.github/workflows/release.yml`) — on GitHub Release publish, builds and uploads to PyPI via trusted publishing (skips if the `VERSION` already exists)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
soothe_client/__init__.py,sha256=ri6TjvFxo0faE8y-9JsCGCuP9ZSnO_z0UyOY8ON7JNM,4172
|
|
2
|
+
soothe_client/errors.py,sha256=gOWYqrZbWxBMhYgtICxl2Di3ndME13qKcXxz1bwPdoQ,1800
|
|
3
|
+
soothe_client/helpers.py,sha256=apmFfVzXrVeqxxHIwhjgSCpkLv42V2On40rsLX9437Q,13774
|
|
4
|
+
soothe_client/intent_hints.py,sha256=KbOjV-8JKwpAcmdUesaow2fHnCujvhXEdPW0ff7CSUQ,1287
|
|
5
|
+
soothe_client/protocol_params.py,sha256=ILY1jnbF_7NqfCjd7QPb4Fv5dY22py5pipkULouv1ng,17460
|
|
6
|
+
soothe_client/schemas.py,sha256=uMacG4BSPOURlgVzfNcs8BkcAmFBGCFYmmDVk8TtkA4,1952
|
|
7
|
+
soothe_client/session.py,sha256=NcXvs4okniCI4WjYe2R_DIL_wVx3bvoTujskXWhIY5w,7972
|
|
8
|
+
soothe_client/websocket.py,sha256=Nitfx3hyIAqkfjXFQ6caln4_q1Ih-RKHye371A49McQ,66471
|
|
9
|
+
soothe_client/ws_command_client.py,sha256=1tmzq5fC-ugVZ6CZt-ruoEv2Ivr30j6gnq2vFbdR4GI,22661
|
|
10
|
+
soothe_client/appkit/__init__.py,sha256=RE7fEgqY49Q6m-PZKEPb2bDYNtxU8mA2uE9KsPAQHqg,3902
|
|
11
|
+
soothe_client/appkit/attachments.py,sha256=NIUGqH_Be1iy50gCI5iDaZSWXbQq6Kchrid2vdq4KsI,3760
|
|
12
|
+
soothe_client/appkit/broadcaster.py,sha256=wLqqAVEE2lIfHRy6woaQ4_B4tRhUcMaW3jclLNPOSNs,3547
|
|
13
|
+
soothe_client/appkit/chunk_filter.py,sha256=UoC4kbS_65UNEJIjbyufqxGBLwvamwvQ26BqZ_gkDTg,3134
|
|
14
|
+
soothe_client/appkit/classifier.py,sha256=og6O4VIyP8lOUIHMn0t4-bCKVgE4DdCJlr_xMAKAtPw,18637
|
|
15
|
+
soothe_client/appkit/daemon_session.py,sha256=HRIunYPK6w89IcSlN4qXi_uNOxeQtfOOmKbf4H6j4Ag,26585
|
|
16
|
+
soothe_client/appkit/events.py,sha256=p7uZmSx_kYdiR7DQY84rvgyHE6RQ6Orbq2KT-WCNsiM,2290
|
|
17
|
+
soothe_client/appkit/managed_client.py,sha256=DLuOwSysSpRB0vj-M4_tAwLQM-qcN7VO9cjVTP9MajA,4952
|
|
18
|
+
soothe_client/appkit/observability.py,sha256=9maW5oyEK0PZBjU7x8tHupoRBvAxApkHFQavRzkr7SM,650
|
|
19
|
+
soothe_client/appkit/pool.py,sha256=auv1MIwRYpjLBnZB86at12xSIJj52J3TdZrfQpQFI_M,8742
|
|
20
|
+
soothe_client/appkit/query_gate.py,sha256=fn6QNUCDtO_95pdVZn_XRM-ylezl-U_2nH7YIEcg6zc,3149
|
|
21
|
+
soothe_client/appkit/session_store.py,sha256=uDWMZWYCIaRGmFNzhR2qCENeBOUE1tRtAiXGbqN830E,2739
|
|
22
|
+
soothe_client/appkit/thinking_step.py,sha256=RoEKDO2na8L-m_DyvyPPblf7G5HPCuqdSTxQDeWEapA,4576
|
|
23
|
+
soothe_client/appkit/turn.py,sha256=gtQyz3gGw8nkg8tfzpGZzNgRmJ48vJnj2Ll95W_BX4w,12479
|
|
24
|
+
soothe_client/appkit/turn_runner.py,sha256=cTLU6W8fvWRtI9s2Xg-JZp2Z2UWrOpi86dZKfF3TFXs,20594
|
|
25
|
+
soothe_client_python-0.9.4.dist-info/METADATA,sha256=cL9V7wqvQBuHu6kmwxSsCYXO9LD_fj32QhCCyX8Y_wU,4719
|
|
26
|
+
soothe_client_python-0.9.4.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
27
|
+
soothe_client_python-0.9.4.dist-info/licenses/LICENSE,sha256=WbXjnHkSCPG_f4TfOdS_mGrbkQAYykAdfIqVDj9O-IY,1068
|
|
28
|
+
soothe_client_python-0.9.4.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mirasoth-AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|