soothe-client-python 0.9.10__py3-none-any.whl → 0.10.0__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 CHANGED
@@ -1,23 +1,27 @@
1
1
  """Soothe WebSocket client for talking to a running soothe-daemon.
2
2
 
3
- Public surface (community apps)::
3
+ Public surface::
4
4
 
5
5
  from soothe_client import WebSocketClient, is_daemon_live
6
+ from soothe_client import AsyncCommandClient, CommandClient
6
7
  from soothe_client.appkit import DaemonSession
7
- from soothe_client import AsyncCommandClient, CommandClient # preferred aliases
8
8
 
9
- Advanced wire validation lives in ``soothe_client.protocol_params``.
10
- Higher-level session / multi-user helpers live in ``soothe_client.appkit``.
9
+ Wire request param models: ``soothe_client.protocol_params``.
10
+ Session / multi-user helpers: ``soothe_client.appkit``.
11
11
  """
12
12
 
13
13
  from __future__ import annotations
14
14
 
15
15
  import importlib.metadata
16
- import warnings
17
- from typing import Any
18
16
 
19
17
  from soothe_sdk.wire.codec import ProtocolError
20
18
 
19
+ from soothe_client.command_client import (
20
+ AsyncCommandClient,
21
+ CommandClient,
22
+ async_command_client_from_config,
23
+ command_client_from_config,
24
+ )
21
25
  from soothe_client.errors import (
22
26
  DaemonError,
23
27
  DisconnectCause,
@@ -52,78 +56,12 @@ from soothe_client.session import (
52
56
  connect_websocket_with_retries,
53
57
  )
54
58
  from soothe_client.websocket import WebSocketClient
55
- from soothe_client.ws_command_client import (
56
- AsyncCommandClient,
57
- CommandClient,
58
- SyncWsCommandClient,
59
- WsCommandClient,
60
- async_command_client_from_config,
61
- async_ws_command_client_from_config,
62
- command_client_from_config,
63
- ws_command_client_from_config,
64
- )
65
59
 
66
60
  try:
67
61
  __version__ = importlib.metadata.version("soothe-client-python")
68
62
  except importlib.metadata.PackageNotFoundError:
69
63
  __version__ = "0.0.0"
70
64
 
71
- # Legacy ``*Params`` names formerly re-exported at package root.
72
- _LEGACY_PARAM_NAMES = frozenset(
73
- {
74
- "AuthParams",
75
- "AuthRefreshParams",
76
- "AutopilotCancelAllParams",
77
- "AutopilotCancelGoalParams",
78
- "AutopilotDreamParams",
79
- "AutopilotGetGoalParams",
80
- "AutopilotGetJobParams",
81
- "AutopilotListGoalsParams",
82
- "AutopilotListJobsParams",
83
- "AutopilotResumeParams",
84
- "AutopilotStatusParams",
85
- "AutopilotSubmitParams",
86
- "AutopilotSubscribeParams",
87
- "AutopilotWakeParams",
88
- "ConfigGetParams",
89
- "ConfigReloadParams",
90
- "CronAddParams",
91
- "CronCancelParams",
92
- "CronListParams",
93
- "CronShowParams",
94
- "DaemonShutdownParams",
95
- "DaemonStatusParams",
96
- "DisconnectParams",
97
- "InvokeSkillParams",
98
- "JobCancelParams",
99
- "JobCreateParams",
100
- "JobDagParams",
101
- "JobGuidanceParams",
102
- "JobPauseParams",
103
- "JobResumeParams",
104
- "JobStatusParams",
105
- "LoopCardsFetchParams",
106
- "LoopDeleteParams",
107
- "LoopDetachParams",
108
- "LoopGetParams",
109
- "LoopInputParams",
110
- "LoopListParams",
111
- "LoopMessagesParams",
112
- "LoopNewParams",
113
- "LoopPruneParams",
114
- "LoopReattachParams",
115
- "LoopStateGetParams",
116
- "LoopStateUpdateParams",
117
- "LoopTreeParams",
118
- "McpStatusParams",
119
- "ModelsListParams",
120
- "RpcCommandParams",
121
- "SkillsListParams",
122
- "SlashCommandParams",
123
- "SubscribeParams",
124
- }
125
- )
126
-
127
65
  __all__ = [
128
66
  "__version__",
129
67
  # Transport
@@ -135,13 +73,9 @@ __all__ = [
135
73
  "ReconnectError",
136
74
  "StaleLoopError",
137
75
  "disconnect_cause_name",
138
- # Command clients (canonical + preferred aliases)
139
- "WsCommandClient",
140
- "SyncWsCommandClient",
76
+ # Command clients
141
77
  "AsyncCommandClient",
142
78
  "CommandClient",
143
- "ws_command_client_from_config",
144
- "async_ws_command_client_from_config",
145
79
  "command_client_from_config",
146
80
  "async_command_client_from_config",
147
81
  # Session bootstrap
@@ -168,22 +102,3 @@ __all__ = [
168
102
  "DEFAULT_DELIVERABLE_PHASES",
169
103
  "validate_loop_input_intent_hint",
170
104
  ]
171
-
172
-
173
- def __getattr__(name: str) -> Any:
174
- """Lazy-load legacy ``*Params`` with a deprecation warning.
175
-
176
- Prefer ``from soothe_client.protocol_params import LoopInputParams``.
177
- """
178
- if name in _LEGACY_PARAM_NAMES:
179
- warnings.warn(
180
- f"Importing {name!r} from soothe_client is deprecated; "
181
- f"use soothe_client.protocol_params.{name} instead.",
182
- DeprecationWarning,
183
- stacklevel=2,
184
- )
185
- from soothe_client import protocol_params as _params
186
-
187
- return getattr(_params, name)
188
- msg = f"module {__name__!r} has no attribute {name!r}"
189
- raise AttributeError(msg)
@@ -1,8 +1,6 @@
1
- """WebSocket command client for daemon command endpoints.
1
+ """Async and sync daemon command clients (jobs, autopilot, cron).
2
2
 
3
- Provides synchronous and async clients for sending commands over WebSocket
4
- and receiving responses. Replaces HTTP REST clients for autopilot, cron,
5
- and memory profiling operations.
3
+ ``AsyncCommandClient`` for asyncio; ``CommandClient`` for scripts/CLI.
6
4
  """
7
5
 
8
6
  from __future__ import annotations
@@ -162,14 +160,11 @@ _MEMORY_COMMANDS = {
162
160
  }
163
161
 
164
162
 
165
- class WsCommandClient:
163
+ class AsyncCommandClient:
166
164
  """Async client for one-shot daemon RPCs (jobs, autopilot, cron).
167
165
 
168
166
  Prefer this for asyncio apps. For scripts/CLI without an event loop, use
169
- ``SyncWsCommandClient`` (alias ``CommandClient``). For streaming agent
170
- turns, use ``DaemonSession`` instead.
171
-
172
- Preferred community alias: ``AsyncCommandClient``.
167
+ ``CommandClient``. For streaming agent turns, use ``DaemonSession`` instead.
173
168
 
174
169
  Job lifecycle uses ``job_*`` methods. Autopilot goal helpers use
175
170
  ``autopilot_*``. ``job_cancel`` cancels a root job and its descendants;
@@ -177,7 +172,7 @@ class WsCommandClient:
177
172
 
178
173
  Example::
179
174
 
180
- client = WsCommandClient("ws://127.0.0.1:8765")
175
+ client = AsyncCommandClient("ws://127.0.0.1:8765")
181
176
  created = await client.job_create("Summarize the README")
182
177
  await client.job_cancel(created["job_id"])
183
178
 
@@ -416,11 +411,10 @@ class WsCommandClient:
416
411
  return await self._send_command("memory_stats", {"mode": mode})
417
412
 
418
413
 
419
- class SyncWsCommandClient:
420
- """Synchronous wrapper around ``WsCommandClient`` for scripts and CLI.
414
+ class CommandClient:
415
+ """Synchronous wrapper around ``AsyncCommandClient`` for scripts and CLI.
421
416
 
422
- Preferred community alias: ``CommandClient``. Each method opens a short
423
- WebSocket RPC (same behavior as the async client).
417
+ Each method opens a short-lived WebSocket RPC (same behavior as async).
424
418
 
425
419
  Args:
426
420
  ws_url: Daemon WebSocket URL.
@@ -428,7 +422,7 @@ class SyncWsCommandClient:
428
422
  """
429
423
 
430
424
  def __init__(self, ws_url: str, *, timeout: float = 30.0) -> None:
431
- self._client = WsCommandClient(ws_url, timeout=timeout)
425
+ self._client = AsyncCommandClient(ws_url, timeout=timeout)
432
426
 
433
427
  def _run_async(self, coro: Any) -> Any:
434
428
  """Run an async coroutine from sync code."""
@@ -581,38 +575,21 @@ class SyncWsCommandClient:
581
575
  return cast(dict[str, Any], self._run_async(self._client.memory_stats(mode)))
582
576
 
583
577
 
584
- def ws_command_client_from_config(cfg: Any) -> SyncWsCommandClient:
585
- """Build a sync command client from soothe/CLI config (host/port).
586
-
587
- Preferred alias: ``command_client_from_config``.
588
- """
578
+ def command_client_from_config(cfg: Any) -> CommandClient:
579
+ """Build a sync command client from soothe/CLI config (host/port)."""
589
580
  ws_url = websocket_url_from_config(cfg)
590
- return SyncWsCommandClient(ws_url)
591
-
581
+ return CommandClient(ws_url)
592
582
 
593
- def async_ws_command_client_from_config(cfg: Any) -> WsCommandClient:
594
- """Build an async command client from soothe/CLI config (host/port).
595
583
 
596
- Preferred alias: ``async_command_client_from_config``.
597
- """
584
+ def async_command_client_from_config(cfg: Any) -> AsyncCommandClient:
585
+ """Build an async command client from soothe/CLI config (host/port)."""
598
586
  ws_url = websocket_url_from_config(cfg)
599
- return WsCommandClient(ws_url)
587
+ return AsyncCommandClient(ws_url)
600
588
 
601
589
 
602
590
  __all__ = [
603
- "WsCommandClient",
604
- "SyncWsCommandClient",
605
591
  "AsyncCommandClient",
606
592
  "CommandClient",
607
- "ws_command_client_from_config",
608
- "async_ws_command_client_from_config",
609
593
  "command_client_from_config",
610
594
  "async_command_client_from_config",
611
595
  ]
612
-
613
-
614
- # Preferred community names (aliases; wire method names unchanged).
615
- AsyncCommandClient = WsCommandClient
616
- CommandClient = SyncWsCommandClient
617
- command_client_from_config = ws_command_client_from_config
618
- async_command_client_from_config = async_ws_command_client_from_config
soothe_client/helpers.py CHANGED
@@ -1,7 +1,7 @@
1
1
  """Small WebSocket helpers for CLI and scripts (status, fetch, one-shot RPC).
2
2
 
3
3
  For interactive turns use ``DaemonSession``. For jobs/cron use
4
- ``WsCommandClient`` / ``CommandClient``.
4
+ ``AsyncCommandClient`` / ``CommandClient``.
5
5
  """
6
6
 
7
7
  from __future__ import annotations
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: soothe-client-python
3
- Version: 0.9.10
3
+ Version: 0.10.0
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
@@ -70,12 +70,12 @@ More patterns: [`examples/`](examples/) (hello → streaming → multi-turn →
70
70
  | Need | Use |
71
71
  |------|-----|
72
72
  | One conversation, stream replies | `DaemonSession` (`soothe_client.appkit`) |
73
- | Jobs / cron (async) | `AsyncCommandClient` (alias of `WsCommandClient`) |
74
- | Jobs / cron (scripts / sync) | `CommandClient` (alias of `SyncWsCommandClient`) |
73
+ | Jobs / cron (async) | `AsyncCommandClient` |
74
+ | Jobs / cron (scripts / sync) | `CommandClient` |
75
75
  | Raw WebSocket / custom RPCs | `WebSocketClient` |
76
76
  | Many users / HTTP backend | `ConnectionPool` + `TurnRunner` |
77
77
 
78
- Wire request param models live in `soothe_client.protocol_params` (not at package root).
78
+ Wire request param models: `soothe_client.protocol_params`.
79
79
 
80
80
  ## Develop
81
81
 
@@ -1,6 +1,7 @@
1
- soothe_client/__init__.py,sha256=U3UtyHs1UFrrT5RChrnzzOBQJsdqc9BVZ3oyeLKX0Vk,5181
1
+ soothe_client/__init__.py,sha256=zgcU3yRwDClFIQv-OYw9r4m99eUSx55cVpPva4wnd5s,2579
2
+ soothe_client/command_client.py,sha256=mqJx9iQgr9Rr_XD50dtW-FXcVkUya12nnIXCzFiXkpc,23341
2
3
  soothe_client/errors.py,sha256=gOWYqrZbWxBMhYgtICxl2Di3ndME13qKcXxz1bwPdoQ,1800
3
- soothe_client/helpers.py,sha256=jcGW1L2cfbTeaUOKK3RGmOrkhariL3jI6b9e-3wfxXo,16356
4
+ soothe_client/helpers.py,sha256=TBLENrHO_Z6Ck7tlk8FBjd_W6x-ub3OG_dP6h3mO7aU,16359
4
5
  soothe_client/intent_hints.py,sha256=KbOjV-8JKwpAcmdUesaow2fHnCujvhXEdPW0ff7CSUQ,1287
5
6
  soothe_client/protocol_params.py,sha256=gJo_t3-k_qpSuqe4ki7XJmUiRm8XbhaMzasU8FX62nM,18111
6
7
  soothe_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -9,7 +10,6 @@ soothe_client/session.py,sha256=kTcy4-PMPSrwcTgFTom1zub0fXVgZeTm7128rf4Zt08,7904
9
10
  soothe_client/stream_terminal.py,sha256=-g8TvVIbitdsvG2F6OIqH8sSHM19jBP72AijVGS0Rjs,3503
10
11
  soothe_client/turn_boundary.py,sha256=AqpiP-Jt2Zts44Iyyf8SgPbd94P60OYtMkeTW2s3-Nw,1960
11
12
  soothe_client/websocket.py,sha256=UmHRYNmx8brDYr983fO1tKQIFWHKfF7Wc6DbQRlYBTA,64716
12
- soothe_client/ws_command_client.py,sha256=QxX1QFkcbyX3Kh0t_HETUq5bGycIc2FsSmYNls7xXa0,24123
13
13
  soothe_client/appkit/__init__.py,sha256=z3F93ZAgzlJAWspTFRMz7sI_gW4bMbXwqMmLZmvII1I,2651
14
14
  soothe_client/appkit/attachments.py,sha256=hD2FsXeR8TqO3hzIYT49DUedsv9r2yFEuIYDBNhUy9M,3574
15
15
  soothe_client/appkit/broadcaster.py,sha256=wcWQUOy7HjFgNaXDk1Ec71CGi7mZmb-zXZZbuOon9OY,3529
@@ -25,7 +25,7 @@ soothe_client/appkit/session_store.py,sha256=uJNMZ33bq3F_qggdSD2ku4CN4aMxbMWywb5
25
25
  soothe_client/appkit/thinking_step.py,sha256=dB1L1ERPkisLh2y3KIgd4f6EmN8GmF5B0h6lae9tt18,4558
26
26
  soothe_client/appkit/turn.py,sha256=gtQyz3gGw8nkg8tfzpGZzNgRmJ48vJnj2Ll95W_BX4w,12479
27
27
  soothe_client/appkit/turn_runner.py,sha256=Svy-LAgy6p506zEHHnKKPay2rzxgLORoAawf6S66dKQ,20753
28
- soothe_client_python-0.9.10.dist-info/METADATA,sha256=hkjWnpySdLT8vKl_skjU3zAaXZytgIbLZ4A-3Ky9GHU,3085
29
- soothe_client_python-0.9.10.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
30
- soothe_client_python-0.9.10.dist-info/licenses/LICENSE,sha256=WbXjnHkSCPG_f4TfOdS_mGrbkQAYykAdfIqVDj9O-IY,1068
31
- soothe_client_python-0.9.10.dist-info/RECORD,,
28
+ soothe_client_python-0.10.0.dist-info/METADATA,sha256=7T1VonUmH4krrQKKExorvzbjqxuu6rai72P3Y0t_sHQ,2994
29
+ soothe_client_python-0.10.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
30
+ soothe_client_python-0.10.0.dist-info/licenses/LICENSE,sha256=WbXjnHkSCPG_f4TfOdS_mGrbkQAYykAdfIqVDj9O-IY,1068
31
+ soothe_client_python-0.10.0.dist-info/RECORD,,