soothe-client-python 1.1.0__tar.gz → 1.2.1__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.
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/PKG-INFO +2 -2
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/pyproject.toml +1 -1
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/thinking_step.py +11 -53
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/command_client.py +26 -6
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/core/events.py +2 -2
- soothe_client_python-1.2.1/src/soothe_client/display/__init__.py +75 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/intent_hints.py +1 -1
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/protocol_params.py +5 -1
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/tools/metadata.py +14 -111
- soothe_client_python-1.2.1/src/soothe_client/ux/__init__.py +20 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/websocket.py +6 -4
- soothe_client_python-1.1.0/src/soothe_client/display/__init__.py +0 -120
- soothe_client_python-1.1.0/src/soothe_client/display/card_binder.py +0 -787
- soothe_client_python-1.1.0/src/soothe_client/display/snapshot_collapser.py +0 -118
- soothe_client_python-1.1.0/src/soothe_client/display/text_extract.py +0 -127
- soothe_client_python-1.1.0/src/soothe_client/ux/__init__.py +0 -30
- soothe_client_python-1.1.0/src/soothe_client/ux/subagent_progress.py +0 -171
- soothe_client_python-1.1.0/src/soothe_client/ux/subagent_wire_display.py +0 -121
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/.gitignore +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/LICENSE +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/README.md +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/__init__.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/__init__.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/attachments.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/broadcaster.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/card_projection.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/chunk_filter.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/classifier.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/daemon_session.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/events.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/loop_session_store.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/managed_client.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/observability.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/pool.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/query_gate.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/turn.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/turn_boundary.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/turn_runner.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/core/__init__.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/core/subagent_wire.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/core/verbosity.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/display/_text_utils.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/display/card_ledger.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/display/card_wire.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/display/message_processing.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/display/snapshot_types.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/display/tool_message_format.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/display/tool_result.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/display/transcript_types.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/errors.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/helpers.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/paths.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/py.typed +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/schemas.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/session.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/stream_terminal.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/tools/__init__.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/turn_boundary.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/utils/__init__.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/utils/formatting.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/utils/logging.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/utils/parsing.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/utils/serde.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/utils/workspace.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/ux/classification.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/ux/execute_namespace.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/ux/loop_stream.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/ux/stream_tool_wire.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/ux/task_namespace.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/ux/types.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/wire/__init__.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/wire/codec.py +0 -0
- {soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/wire/protocol.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: soothe-client-python
|
|
3
|
-
Version: 1.1
|
|
3
|
+
Version: 1.2.1
|
|
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
|
|
@@ -20,7 +20,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
|
20
20
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
21
|
Requires-Python: <3.15,>=3.11
|
|
22
22
|
Requires-Dist: langchain-core<2.0.0,>=1.6.0
|
|
23
|
-
Requires-Dist: pillow<
|
|
23
|
+
Requires-Dist: pillow<13.0.0,>=10.0.0
|
|
24
24
|
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
|
25
25
|
Requires-Dist: websockets>=12.0
|
|
26
26
|
Provides-Extra: dev
|
{soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/appkit/thinking_step.py
RENAMED
|
@@ -12,16 +12,12 @@ MAX_THINKING_STEP_RUNES = 280
|
|
|
12
12
|
|
|
13
13
|
DEFAULT_THINKING_STEP_EVENTS: frozenset[str] = frozenset(
|
|
14
14
|
{
|
|
15
|
-
"soothe.cognition.
|
|
16
|
-
"soothe.cognition.
|
|
17
|
-
"soothe.cognition.plan.step.failed",
|
|
18
|
-
"soothe.lifecycle.iteration.started",
|
|
19
|
-
"soothe.agent.loop.step.started",
|
|
20
|
-
"soothe.agent.loop.started",
|
|
21
|
-
"soothe.cognition.plan.batch.started",
|
|
15
|
+
"soothe.cognition.strange_loop.step.started",
|
|
16
|
+
"soothe.cognition.strange_loop.step.completed",
|
|
22
17
|
"soothe.cognition.plan.created",
|
|
23
18
|
"soothe.cognition.goal.created",
|
|
24
|
-
"soothe.tool.
|
|
19
|
+
"soothe.tool.invocation.started",
|
|
20
|
+
"soothe.tool.invocation.completed",
|
|
25
21
|
}
|
|
26
22
|
)
|
|
27
23
|
|
|
@@ -52,26 +48,11 @@ def extract_thinking_step(
|
|
|
52
48
|
return "", False
|
|
53
49
|
|
|
54
50
|
line = ""
|
|
55
|
-
if et == "soothe.cognition.
|
|
56
|
-
line =
|
|
57
|
-
elif et == "soothe.cognition.
|
|
58
|
-
line =
|
|
59
|
-
elif et == "soothe.cognition.plan.
|
|
60
|
-
step_id = _str_field(data, "step_id")
|
|
61
|
-
err_msg = _str_field(data, "error")
|
|
62
|
-
if step_id and err_msg:
|
|
63
|
-
line = f"Step {step_id} failed: {err_msg}"
|
|
64
|
-
elif step_id:
|
|
65
|
-
line = f"Step {step_id} failed"
|
|
66
|
-
elif err_msg:
|
|
67
|
-
line = f"Step failed: {err_msg}"
|
|
68
|
-
elif et == "soothe.agent.loop.step.started":
|
|
69
|
-
line = _format_agent_step_line(data, "")
|
|
70
|
-
elif et == "soothe.cognition.plan.batch.started":
|
|
71
|
-
n = data.get("parallel_count")
|
|
72
|
-
if isinstance(n, (int, float)) and n > 0:
|
|
73
|
-
line = f"Running {int(n)} steps in parallel"
|
|
74
|
-
elif et in ("soothe.cognition.plan.created", "soothe.agent.loop.started"):
|
|
51
|
+
if et == "soothe.cognition.strange_loop.step.started":
|
|
52
|
+
line = _format_step_line(data, _str_field(data, "description"))
|
|
53
|
+
elif et == "soothe.cognition.strange_loop.step.completed":
|
|
54
|
+
line = _format_step_line(data, _str_field(data, "summary"))
|
|
55
|
+
elif et == "soothe.cognition.plan.created":
|
|
75
56
|
g = _str_field(data, "goal")
|
|
76
57
|
if g:
|
|
77
58
|
line = f"Goal: {g}"
|
|
@@ -79,11 +60,7 @@ def extract_thinking_step(
|
|
|
79
60
|
g = _str_field(data, "friendly_message", "description")
|
|
80
61
|
if g:
|
|
81
62
|
line = f"Goal: {g}"
|
|
82
|
-
elif et
|
|
83
|
-
g = _str_field(data, "goal_description")
|
|
84
|
-
if g:
|
|
85
|
-
line = f"Iteration: {g}"
|
|
86
|
-
elif et == "soothe.tool.execution.started":
|
|
63
|
+
elif et in ("soothe.tool.invocation.started", "soothe.tool.invocation.completed"):
|
|
87
64
|
name = _str_field(data, "tool_name", "name")
|
|
88
65
|
if name:
|
|
89
66
|
line = f"Tool: {name}"
|
|
@@ -99,33 +76,14 @@ def extract_thinking_step(
|
|
|
99
76
|
return line, True
|
|
100
77
|
|
|
101
78
|
|
|
102
|
-
def
|
|
79
|
+
def _format_step_line(data: Mapping[str, Any], desc: str) -> str:
|
|
103
80
|
step_id = _str_field(data, "step_id")
|
|
104
|
-
desc = _str_field(data, "description")
|
|
105
|
-
if step_id and suffix:
|
|
106
|
-
return f"Step {step_id}: {suffix}"
|
|
107
81
|
if step_id and desc:
|
|
108
82
|
return f"Step {step_id}: {desc}"
|
|
109
83
|
if step_id:
|
|
110
84
|
return f"Step {step_id}"
|
|
111
|
-
if desc and suffix:
|
|
112
|
-
return f"Step: {suffix}"
|
|
113
85
|
if desc:
|
|
114
86
|
return f"Step: {desc}"
|
|
115
|
-
if suffix:
|
|
116
|
-
return f"Step: {suffix}"
|
|
117
|
-
return ""
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
def _format_agent_step_line(data: Mapping[str, Any], suffix: str) -> str:
|
|
121
|
-
step_id = _str_field(data, "step_id")
|
|
122
|
-
desc = _str_field(data, "description")
|
|
123
|
-
if step_id and desc:
|
|
124
|
-
return f"Step {step_id}: {desc}"
|
|
125
|
-
if desc:
|
|
126
|
-
return f"Step: {suffix}" if suffix else f"Step: {desc}"
|
|
127
|
-
if step_id:
|
|
128
|
-
return f"Step {step_id}"
|
|
129
87
|
return ""
|
|
130
88
|
|
|
131
89
|
|
{soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/command_client.py
RENAMED
|
@@ -83,7 +83,7 @@ async def _perform_handshake(ws: Any, *, timeout: float) -> None:
|
|
|
83
83
|
init = ConnectionInitEnvelope(
|
|
84
84
|
params=ConnectionInitParams(
|
|
85
85
|
client_version=_client_version,
|
|
86
|
-
client_name="soothe-
|
|
86
|
+
client_name="soothe-client-python",
|
|
87
87
|
accept_proto=["1"],
|
|
88
88
|
capabilities=["streaming", "batch", "heartbeat"],
|
|
89
89
|
)
|
|
@@ -147,8 +147,8 @@ class AsyncCommandClient:
|
|
|
147
147
|
Example::
|
|
148
148
|
|
|
149
149
|
client = AsyncCommandClient("ws://127.0.0.1:8765")
|
|
150
|
-
created = await client.job_create("Summarize the README")
|
|
151
|
-
await client.job_cancel(created["
|
|
150
|
+
created = await client.job_create("Summarize the README", rail_id="auto")
|
|
151
|
+
await client.job_cancel(created["loop_id"])
|
|
152
152
|
|
|
153
153
|
Args:
|
|
154
154
|
ws_url: Daemon WebSocket URL.
|
|
@@ -336,11 +336,25 @@ class AsyncCommandClient:
|
|
|
336
336
|
self,
|
|
337
337
|
goal: str,
|
|
338
338
|
*,
|
|
339
|
+
rail_id: str,
|
|
339
340
|
workspace: str | None = None,
|
|
340
341
|
guidance: str | None = None,
|
|
341
342
|
) -> dict[str, Any]:
|
|
342
|
-
"""Create a background job (
|
|
343
|
-
|
|
343
|
+
"""Create a background job (rail-pinned loop submission).
|
|
344
|
+
|
|
345
|
+
`rail_id` is required (loop-native submission path). The daemon creates
|
|
346
|
+
a fresh loop, enqueues a `loop_input` carrying `autopilot_rail_id`, and
|
|
347
|
+
returns `{"loop_id": ..., "rail_id": ..., "status": "submitted"}`.
|
|
348
|
+
|
|
349
|
+
Args:
|
|
350
|
+
goal: Root goal description.
|
|
351
|
+
rail_id: Builtin rail id to bind (e.g. ``"auto"`` or a catalog id).
|
|
352
|
+
workspace: Optional client workspace hint.
|
|
353
|
+
guidance: Optional guidance text (forwarded when present).
|
|
354
|
+
"""
|
|
355
|
+
if not isinstance(rail_id, str) or not rail_id.strip():
|
|
356
|
+
raise ValueError("rail_id is required (loop-native submission path)")
|
|
357
|
+
payload: dict[str, Any] = {"goal": goal, "rail_id": rail_id.strip()}
|
|
344
358
|
if workspace:
|
|
345
359
|
payload["workspace"] = workspace
|
|
346
360
|
if guidance:
|
|
@@ -527,15 +541,21 @@ class CommandClient:
|
|
|
527
541
|
self,
|
|
528
542
|
goal: str,
|
|
529
543
|
*,
|
|
544
|
+
rail_id: str,
|
|
530
545
|
workspace: str | None = None,
|
|
531
546
|
guidance: str | None = None,
|
|
532
547
|
) -> dict[str, Any]:
|
|
533
|
-
"""Create a background job (
|
|
548
|
+
"""Create a background job (rail-pinned loop submission).
|
|
549
|
+
|
|
550
|
+
`rail_id` is required (loop-native submission path). Returns
|
|
551
|
+
`{"loop_id": ..., "rail_id": ..., "status": "submitted"}`.
|
|
552
|
+
"""
|
|
534
553
|
return cast(
|
|
535
554
|
dict[str, Any],
|
|
536
555
|
self._run_async(
|
|
537
556
|
self._client.job_create(
|
|
538
557
|
goal,
|
|
558
|
+
rail_id=rail_id,
|
|
539
559
|
workspace=workspace,
|
|
540
560
|
guidance=guidance,
|
|
541
561
|
)
|
|
@@ -106,7 +106,7 @@ CARD_REPLAY_WIRE_TYPES = frozenset({CARD_REPLAY_BEGIN, CARD_REPLAY_END})
|
|
|
106
106
|
# canonical home is the SDK as the protocol-contracts layer. nano and the
|
|
107
107
|
# host re-export these rather than redefine the literals.)
|
|
108
108
|
ERROR = "soothe.error.general.failed"
|
|
109
|
-
|
|
109
|
+
LLM_CALL_BOUNDARY = "soothe.cognition.llm.call.boundary"
|
|
110
110
|
MEMORY_RECALLED = "soothe.internal.memory.recalled"
|
|
111
111
|
MEMORY_STORED = "soothe.internal.memory.stored"
|
|
112
112
|
POLICY_CHECKED = "soothe.internal.policy.checked"
|
|
@@ -153,7 +153,7 @@ __all__ = [
|
|
|
153
153
|
"CARD_REPLAY_WIRE_TYPES",
|
|
154
154
|
# Protocol-primitive constants (canonical home; re-exported by nano + host)
|
|
155
155
|
"ERROR",
|
|
156
|
-
"
|
|
156
|
+
"LLM_CALL_BOUNDARY",
|
|
157
157
|
"MEMORY_RECALLED",
|
|
158
158
|
"MEMORY_STORED",
|
|
159
159
|
"POLICY_CHECKED",
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""Client-side display-layer contract parsing.
|
|
2
|
+
|
|
3
|
+
This package hosts the wire-protocol parse side shared by the transport,
|
|
4
|
+
appkit, and any Python front end:
|
|
5
|
+
|
|
6
|
+
* ``transcript_types`` — ``MessageData`` / ``MessageType`` / ``ToolStatus``
|
|
7
|
+
dataclasses travelling on the wire.
|
|
8
|
+
* ``card_ledger`` — pure-Python ``CardMutation`` + ``InMemoryCardLedger``
|
|
9
|
+
primitives backing the ``soothe.card.*`` wire schema.
|
|
10
|
+
* ``card_wire`` — parse/apply helpers for live ``soothe.card.*`` frames.
|
|
11
|
+
* ``snapshot_types`` — goal display snapshot wire payload types.
|
|
12
|
+
* ``message_processing`` / ``tool_result`` / ``tool_message_format`` —
|
|
13
|
+
stream-to-text parse helpers.
|
|
14
|
+
|
|
15
|
+
(TUI-owned ``card_binder`` / ``text_extract`` / ``snapshot_collapser`` moved
|
|
16
|
+
to `soothe_cli.display` / the host `soothe.display` in 1.2.0.)
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
from soothe_client.display.card_ledger import (
|
|
22
|
+
CARD_SCHEMA_VERSION,
|
|
23
|
+
CardMutation,
|
|
24
|
+
CardOp,
|
|
25
|
+
InMemoryCardLedger,
|
|
26
|
+
align_cards_preserving_ids,
|
|
27
|
+
build_header_mutation,
|
|
28
|
+
card_from_wire_dict,
|
|
29
|
+
card_to_wire_dict,
|
|
30
|
+
cards_to_mutations,
|
|
31
|
+
diff_card_snapshots,
|
|
32
|
+
utc_now_iso,
|
|
33
|
+
)
|
|
34
|
+
from soothe_client.display.card_wire import (
|
|
35
|
+
CardProjection,
|
|
36
|
+
parse_card_custom_payload,
|
|
37
|
+
)
|
|
38
|
+
from soothe_client.display.snapshot_types import (
|
|
39
|
+
GOAL_DISPLAY_SNAPSHOT_SCHEMA_VERSION,
|
|
40
|
+
GoalDisplaySnapshot,
|
|
41
|
+
snapshot_from_dataclass_dict,
|
|
42
|
+
)
|
|
43
|
+
from soothe_client.display.transcript_types import (
|
|
44
|
+
UPDATABLE_FIELDS,
|
|
45
|
+
MessageData,
|
|
46
|
+
MessageType,
|
|
47
|
+
ToolStatus,
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
__all__ = [
|
|
51
|
+
# Types
|
|
52
|
+
"MessageData",
|
|
53
|
+
"MessageType",
|
|
54
|
+
"ToolStatus",
|
|
55
|
+
"UPDATABLE_FIELDS",
|
|
56
|
+
# Ledger
|
|
57
|
+
"CARD_SCHEMA_VERSION",
|
|
58
|
+
"CardMutation",
|
|
59
|
+
"CardOp",
|
|
60
|
+
"InMemoryCardLedger",
|
|
61
|
+
"build_header_mutation",
|
|
62
|
+
"card_from_wire_dict",
|
|
63
|
+
"card_to_wire_dict",
|
|
64
|
+
"cards_to_mutations",
|
|
65
|
+
"diff_card_snapshots",
|
|
66
|
+
"align_cards_preserving_ids",
|
|
67
|
+
"utc_now_iso",
|
|
68
|
+
# Card wire
|
|
69
|
+
"CardProjection",
|
|
70
|
+
"parse_card_custom_payload",
|
|
71
|
+
# Goal display snapshots
|
|
72
|
+
"GOAL_DISPLAY_SNAPSHOT_SCHEMA_VERSION",
|
|
73
|
+
"GoalDisplaySnapshot",
|
|
74
|
+
"snapshot_from_dataclass_dict",
|
|
75
|
+
]
|
|
@@ -12,8 +12,8 @@ EMBED: Final = "embed"
|
|
|
12
12
|
# Default deliverable phases for turn-ending replies (excludes plan_direct narration).
|
|
13
13
|
DEFAULT_DELIVERABLE_PHASES: frozenset[str] = frozenset(
|
|
14
14
|
{
|
|
15
|
-
"quiz",
|
|
16
15
|
"goal_completion",
|
|
16
|
+
"goal_interrupted",
|
|
17
17
|
"chitchat",
|
|
18
18
|
"text_completion",
|
|
19
19
|
"image_to_text",
|
{soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/protocol_params.py
RENAMED
|
@@ -274,9 +274,13 @@ class AutopilotTopParams(ParamsBase):
|
|
|
274
274
|
|
|
275
275
|
|
|
276
276
|
class JobCreateParams(ParamsBase):
|
|
277
|
-
"""Params for `method=job_create`.
|
|
277
|
+
"""Params for `method=job_create`.
|
|
278
|
+
|
|
279
|
+
`rail_id` is required (loop-native submission path).
|
|
280
|
+
"""
|
|
278
281
|
|
|
279
282
|
goal: str = Field(..., min_length=1, description="Root goal text")
|
|
283
|
+
rail_id: str = Field(..., min_length=1, description="Builtin rail id to bind")
|
|
280
284
|
workspace: str | None = None
|
|
281
285
|
user_id: str | None = None
|
|
282
286
|
guidance: str | None = None
|
{soothe_client_python-1.1.0 → soothe_client_python-1.2.1}/src/soothe_client/tools/metadata.py
RENAMED
|
@@ -30,8 +30,8 @@ class ToolMeta:
|
|
|
30
30
|
aliases: Alternative names the model might emit for the same tool
|
|
31
31
|
(e.g., ``shell`` and ``bash`` are legacy aliases of ``run_command``).
|
|
32
32
|
category: Semantic category for display grouping
|
|
33
|
-
(``file_ops``, ``
|
|
34
|
-
``
|
|
33
|
+
(``file_ops``, ``shell``, ``web``, ``media``, ``subagent``,
|
|
34
|
+
``generic``).
|
|
35
35
|
outcome_type: Outcome classification for agent reasoning
|
|
36
36
|
(``file_read``, ``file_write``, ``web_search``, ``code_exec``,
|
|
37
37
|
``subagent``, ``generic``). If ``None``, derived from category.
|
|
@@ -39,6 +39,9 @@ class ToolMeta:
|
|
|
39
39
|
has_header_info: True when ``format_tool_display()`` already renders
|
|
40
40
|
the key information in the header line, so the args body
|
|
41
41
|
should be suppressed in ``ToolCallMessage``.
|
|
42
|
+
placement: Sandbox-mode tool placement (docs/arcbox-backend.md §7) — one of
|
|
43
|
+
``protocol`` / ``guest`` / ``shuttle`` / ``host`` / ``deny``.
|
|
44
|
+
``None`` derives from the default table by category/outcome_type.
|
|
42
45
|
"""
|
|
43
46
|
|
|
44
47
|
name: str
|
|
@@ -50,6 +53,7 @@ class ToolMeta:
|
|
|
50
53
|
outcome_type: str | None = None
|
|
51
54
|
source: str = "soothe"
|
|
52
55
|
has_header_info: bool = False
|
|
56
|
+
placement: str | None = None
|
|
53
57
|
|
|
54
58
|
def get_display_name(self) -> str:
|
|
55
59
|
"""Return the user-facing display name, with fallback."""
|
|
@@ -185,7 +189,7 @@ _register(
|
|
|
185
189
|
)
|
|
186
190
|
|
|
187
191
|
# ---------------------------------------------------------------------------
|
|
188
|
-
# soothe
|
|
192
|
+
# soothe shell tools
|
|
189
193
|
# ---------------------------------------------------------------------------
|
|
190
194
|
|
|
191
195
|
_register(
|
|
@@ -194,7 +198,7 @@ _register(
|
|
|
194
198
|
display_name="RunCommand",
|
|
195
199
|
arg_keys=("command", "cmd", "script"),
|
|
196
200
|
aliases=("shell", "bash"),
|
|
197
|
-
category="
|
|
201
|
+
category="shell",
|
|
198
202
|
outcome_type="code_exec",
|
|
199
203
|
source="soothe",
|
|
200
204
|
has_header_info=True,
|
|
@@ -316,7 +320,7 @@ _register(
|
|
|
316
320
|
)
|
|
317
321
|
|
|
318
322
|
# ---------------------------------------------------------------------------
|
|
319
|
-
# soothe
|
|
323
|
+
# soothe shell tools (continued)
|
|
320
324
|
# ---------------------------------------------------------------------------
|
|
321
325
|
|
|
322
326
|
_register(
|
|
@@ -324,7 +328,7 @@ _register(
|
|
|
324
328
|
name="run_python",
|
|
325
329
|
display_name="RunPython",
|
|
326
330
|
arg_keys=("code",),
|
|
327
|
-
category="
|
|
331
|
+
category="shell",
|
|
328
332
|
outcome_type="code_exec",
|
|
329
333
|
source="soothe",
|
|
330
334
|
)
|
|
@@ -335,7 +339,7 @@ _register(
|
|
|
335
339
|
name="run_background",
|
|
336
340
|
display_name="RunBackground",
|
|
337
341
|
arg_keys=("command",),
|
|
338
|
-
category="
|
|
342
|
+
category="shell",
|
|
339
343
|
outcome_type="code_exec",
|
|
340
344
|
source="soothe",
|
|
341
345
|
)
|
|
@@ -346,7 +350,7 @@ _register(
|
|
|
346
350
|
name="tail_background_log",
|
|
347
351
|
display_name="TailBackgroundLog",
|
|
348
352
|
arg_keys=("pid", "lines"),
|
|
349
|
-
category="
|
|
353
|
+
category="shell",
|
|
350
354
|
outcome_type="code_exec",
|
|
351
355
|
source="soothe",
|
|
352
356
|
)
|
|
@@ -357,7 +361,7 @@ _register(
|
|
|
357
361
|
name="kill_process",
|
|
358
362
|
display_name="KillProcess",
|
|
359
363
|
arg_keys=("pid",),
|
|
360
|
-
category="
|
|
364
|
+
category="shell",
|
|
361
365
|
outcome_type="code_exec",
|
|
362
366
|
source="soothe",
|
|
363
367
|
)
|
|
@@ -466,34 +470,10 @@ _register(
|
|
|
466
470
|
)
|
|
467
471
|
)
|
|
468
472
|
|
|
469
|
-
_register(
|
|
470
|
-
ToolMeta(
|
|
471
|
-
name="academic_research",
|
|
472
|
-
display_name="Academic Research",
|
|
473
|
-
arg_keys=("topic", "domain"),
|
|
474
|
-
category="subagent",
|
|
475
|
-
outcome_type="subagent",
|
|
476
|
-
source="soothe",
|
|
477
|
-
has_header_info=True,
|
|
478
|
-
)
|
|
479
|
-
)
|
|
480
|
-
|
|
481
473
|
# ---------------------------------------------------------------------------
|
|
482
474
|
# soothe media tools
|
|
483
475
|
# ---------------------------------------------------------------------------
|
|
484
476
|
|
|
485
|
-
_register(
|
|
486
|
-
ToolMeta(
|
|
487
|
-
name="analyze_image",
|
|
488
|
-
display_name="AnalyzeImage",
|
|
489
|
-
arg_keys=("image_path",),
|
|
490
|
-
path_arg_keys=("image_path",),
|
|
491
|
-
category="media",
|
|
492
|
-
outcome_type="file_read",
|
|
493
|
-
source="soothe",
|
|
494
|
-
)
|
|
495
|
-
)
|
|
496
|
-
|
|
497
477
|
_register(
|
|
498
478
|
ToolMeta(
|
|
499
479
|
name="extract_text_from_image",
|
|
@@ -554,82 +534,6 @@ _register(
|
|
|
554
534
|
)
|
|
555
535
|
)
|
|
556
536
|
|
|
557
|
-
# ---------------------------------------------------------------------------
|
|
558
|
-
# soothe data tools
|
|
559
|
-
# ---------------------------------------------------------------------------
|
|
560
|
-
|
|
561
|
-
_register(
|
|
562
|
-
ToolMeta(
|
|
563
|
-
name="inspect_data",
|
|
564
|
-
display_name="InspectData",
|
|
565
|
-
arg_keys=("file_path",),
|
|
566
|
-
path_arg_keys=("file_path",),
|
|
567
|
-
category="file_ops",
|
|
568
|
-
outcome_type="file_read",
|
|
569
|
-
source="soothe",
|
|
570
|
-
)
|
|
571
|
-
)
|
|
572
|
-
|
|
573
|
-
_register(
|
|
574
|
-
ToolMeta(
|
|
575
|
-
name="summarize_data",
|
|
576
|
-
display_name="SummarizeData",
|
|
577
|
-
arg_keys=("file_path",),
|
|
578
|
-
path_arg_keys=("file_path",),
|
|
579
|
-
category="file_ops",
|
|
580
|
-
outcome_type="file_read",
|
|
581
|
-
source="soothe",
|
|
582
|
-
)
|
|
583
|
-
)
|
|
584
|
-
|
|
585
|
-
_register(
|
|
586
|
-
ToolMeta(
|
|
587
|
-
name="check_data_quality",
|
|
588
|
-
display_name="CheckDataQuality",
|
|
589
|
-
arg_keys=("file_path",),
|
|
590
|
-
path_arg_keys=("file_path",),
|
|
591
|
-
category="file_ops",
|
|
592
|
-
outcome_type="file_read",
|
|
593
|
-
source="soothe",
|
|
594
|
-
)
|
|
595
|
-
)
|
|
596
|
-
|
|
597
|
-
_register(
|
|
598
|
-
ToolMeta(
|
|
599
|
-
name="extract_text",
|
|
600
|
-
display_name="ExtractText",
|
|
601
|
-
arg_keys=("file_path",),
|
|
602
|
-
path_arg_keys=("file_path",),
|
|
603
|
-
category="file_ops",
|
|
604
|
-
outcome_type="file_read",
|
|
605
|
-
source="soothe",
|
|
606
|
-
)
|
|
607
|
-
)
|
|
608
|
-
|
|
609
|
-
_register(
|
|
610
|
-
ToolMeta(
|
|
611
|
-
name="get_data_info",
|
|
612
|
-
display_name="GetDataInfo",
|
|
613
|
-
arg_keys=("file_path",),
|
|
614
|
-
path_arg_keys=("file_path",),
|
|
615
|
-
category="file_ops",
|
|
616
|
-
outcome_type="file_read",
|
|
617
|
-
source="soothe",
|
|
618
|
-
)
|
|
619
|
-
)
|
|
620
|
-
|
|
621
|
-
_register(
|
|
622
|
-
ToolMeta(
|
|
623
|
-
name="ask_about_file",
|
|
624
|
-
display_name="AskAboutFile",
|
|
625
|
-
arg_keys=("file_path",),
|
|
626
|
-
path_arg_keys=("file_path",),
|
|
627
|
-
category="file_ops",
|
|
628
|
-
outcome_type="file_read",
|
|
629
|
-
source="soothe",
|
|
630
|
-
)
|
|
631
|
-
)
|
|
632
|
-
|
|
633
537
|
# ---------------------------------------------------------------------------
|
|
634
538
|
# soothe datetime tool
|
|
635
539
|
# ---------------------------------------------------------------------------
|
|
@@ -822,11 +726,10 @@ def get_outcome_type(name: str) -> str:
|
|
|
822
726
|
# Fallback: categories with uniform outcome_type
|
|
823
727
|
if meta:
|
|
824
728
|
category_map = {
|
|
825
|
-
"
|
|
729
|
+
"shell": "code_exec",
|
|
826
730
|
"web": "web_search",
|
|
827
731
|
"subagent": "subagent",
|
|
828
732
|
"media": "file_read",
|
|
829
|
-
"goals": "generic",
|
|
830
733
|
"generic": "generic",
|
|
831
734
|
"file_ops": "file_read", # Default for ambiguous category
|
|
832
735
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Client-side UX event processing helpers.
|
|
2
|
+
|
|
3
|
+
Classification, loop-tagged assistant output phases, task/execute namespaces,
|
|
4
|
+
and stream tool wire constants. (TUI-owned subagent render helpers moved to
|
|
5
|
+
`soothe_cli.ux` in 1.2.0.)
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from soothe_client.ux.classification import classify_event_to_tier
|
|
9
|
+
from soothe_client.ux.loop_stream import LOOP_ASSISTANT_OUTPUT_PHASES, assistant_output_phase
|
|
10
|
+
from soothe_client.ux.types import ESSENTIAL_EVENT_TYPES
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
# Loop assistant output (``mode="messages"`` + ``phase``)
|
|
14
|
+
"LOOP_ASSISTANT_OUTPUT_PHASES",
|
|
15
|
+
"assistant_output_phase",
|
|
16
|
+
# Classification
|
|
17
|
+
"classify_event_to_tier",
|
|
18
|
+
# Essential types
|
|
19
|
+
"ESSENTIAL_EVENT_TYPES",
|
|
20
|
+
]
|
|
@@ -120,7 +120,7 @@ def _inbound_frame_drop_priority(event: dict[str, Any] | None) -> int:
|
|
|
120
120
|
if custom_type == "stream_degraded":
|
|
121
121
|
return _DROP_PRIORITY_CRITICAL
|
|
122
122
|
# Tool call updates batch - prefer keep
|
|
123
|
-
if custom_type == "
|
|
123
|
+
if custom_type == "tool_call_updates_batch":
|
|
124
124
|
return _DROP_PRIORITY_HIGH
|
|
125
125
|
|
|
126
126
|
# Messages mode - terminal or goal_completion phase
|
|
@@ -904,7 +904,8 @@ class WebSocketClient:
|
|
|
904
904
|
response_schema_name: Schema name for logging.
|
|
905
905
|
response_schema_strict: Enable strict schema validation.
|
|
906
906
|
clarification_mode: Relay mode (`auto` / `manual`). None = daemon default.
|
|
907
|
-
interaction_mode: CoreAgent mode (`agent` / `ask`
|
|
907
|
+
interaction_mode: CoreAgent mode (`agent` / `ask` / `plan` / `bypass`).
|
|
908
|
+
None = daemon default.
|
|
908
909
|
clarification_answer: Treat input as answer to pending clarification.
|
|
909
910
|
clarification_answers: Per-question answers for multi-question clarifications.
|
|
910
911
|
autopilot_rail_id: Optional builtin rail id. When set, the daemon
|
|
@@ -1255,7 +1256,8 @@ class WebSocketClient:
|
|
|
1255
1256
|
args: Free-form argument string.
|
|
1256
1257
|
timeout: RPC timeout in seconds.
|
|
1257
1258
|
clarification_mode: Relay mode for the synthetic turn. None = daemon default.
|
|
1258
|
-
interaction_mode: CoreAgent mode for the synthetic turn
|
|
1259
|
+
interaction_mode: CoreAgent mode for the synthetic turn
|
|
1260
|
+
(`agent` / `ask` / `plan` / `bypass`). None = daemon default.
|
|
1259
1261
|
"""
|
|
1260
1262
|
params: dict[str, Any] = {"skill": skill, "args": args}
|
|
1261
1263
|
if clarification_mode is not None:
|
|
@@ -1320,7 +1322,7 @@ class WebSocketClient:
|
|
|
1320
1322
|
envelope = ConnectionInitEnvelope(
|
|
1321
1323
|
params=ConnectionInitParams(
|
|
1322
1324
|
client_version=client_version,
|
|
1323
|
-
client_name="soothe-
|
|
1325
|
+
client_name="soothe-client-python",
|
|
1324
1326
|
accept_proto=["1"],
|
|
1325
1327
|
capabilities=["streaming", "batch", "heartbeat"],
|
|
1326
1328
|
)
|