ya-agent-stream-protocol 2.3.2__tar.gz → 2.4.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.
Files changed (16) hide show
  1. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/PKG-INFO +6 -2
  2. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/README.md +4 -0
  3. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/tests/test_agui_adapter.py +17 -0
  4. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/ya_agent_stream_protocol/agui/replay.py +0 -1
  5. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/.gitignore +0 -0
  6. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/pyproject.toml +0 -0
  7. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/tests/test_agui_validation_sse.py +0 -0
  8. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/tests/test_replay_completeness.py +0 -0
  9. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/ya_agent_stream_protocol/__init__.py +0 -0
  10. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/ya_agent_stream_protocol/agui/__init__.py +0 -0
  11. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/ya_agent_stream_protocol/agui/events.py +0 -0
  12. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/ya_agent_stream_protocol/agui/sse.py +0 -0
  13. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/ya_agent_stream_protocol/agui/validation.py +0 -0
  14. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/ya_agent_stream_protocol/json_types.py +0 -0
  15. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/ya_agent_stream_protocol/sdk/__init__.py +0 -0
  16. {ya_agent_stream_protocol-2.3.2 → ya_agent_stream_protocol-2.4.1}/ya_agent_stream_protocol/sdk/agui_adapter.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ya-agent-stream-protocol
3
- Version: 2.3.2
3
+ Version: 2.4.1
4
4
  Summary: Shared stream protocol adapters between ya-agent-sdk and applications
5
5
  Project-URL: Repository, https://github.com/wh1isper/ya-mono
6
6
  Author-email: wh1isper <jizhongsheng957@gmail.com>
@@ -16,7 +16,7 @@ Requires-Python: <3.14,>=3.11
16
16
  Requires-Dist: ag-ui-protocol>=0.1.18
17
17
  Requires-Dist: pydantic-ai<3,>=2.33.0
18
18
  Requires-Dist: pydantic>=2.0.0
19
- Requires-Dist: ya-agent-sdk==2.3.2
19
+ Requires-Dist: ya-agent-sdk==2.4.1
20
20
  Description-Content-Type: text/markdown
21
21
 
22
22
  # ya-agent-stream-protocol
@@ -25,6 +25,10 @@ Shared stream protocol adapters between `ya-agent-sdk` and applications.
25
25
 
26
26
  The Python import package is `ya_agent_stream_protocol`.
27
27
 
28
+ Compact AGUI replay drops redundant text/reasoning and tool-end scaffolding, but retains
29
+ `TOOL_CALL_START` as an observed execution fact. A run interrupted before its first tool
30
+ argument chunk must still be able to reconstruct the visible invocation.
31
+
28
32
  The package owns the shared protocol boundary between `ya-agent-sdk` and applications:
29
33
 
30
34
  - AGUI event adaptation
@@ -4,6 +4,10 @@ Shared stream protocol adapters between `ya-agent-sdk` and applications.
4
4
 
5
5
  The Python import package is `ya_agent_stream_protocol`.
6
6
 
7
+ Compact AGUI replay drops redundant text/reasoning and tool-end scaffolding, but retains
8
+ `TOOL_CALL_START` as an observed execution fact. A run interrupted before its first tool
9
+ argument chunk must still be able to reconstruct the visible invocation.
10
+
7
11
  The package owns the shared protocol boundary between `ya-agent-sdk` and applications:
8
12
 
9
13
  - AGUI event adaptation
@@ -287,6 +287,23 @@ def test_agui_replay_buffer_keeps_runs_separate() -> None:
287
287
  assert [event["delta"] for event in text_chunks] == ["first", "second"]
288
288
 
289
289
 
290
+ def test_agui_replay_buffer_retains_tool_start_without_a_chunk() -> None:
291
+ replay = AguiReplayBuffer()
292
+ replay.append({
293
+ "type": "TOOL_CALL_START",
294
+ "toolCallId": "tool-1",
295
+ "toolCallName": "delegate",
296
+ })
297
+
298
+ assert replay.snapshot() == [
299
+ {
300
+ "type": "TOOL_CALL_START",
301
+ "toolCallId": "tool-1",
302
+ "toolCallName": "delegate",
303
+ }
304
+ ]
305
+
306
+
290
307
  def test_agui_replay_buffer_merges_tool_call_chunks() -> None:
291
308
  replay = AguiReplayBuffer()
292
309
  replay.append({
@@ -10,7 +10,6 @@ _REPLAY_DROP_EVENT_TYPES = frozenset({
10
10
  "TEXT_MESSAGE_END",
11
11
  "REASONING_MESSAGE_START",
12
12
  "REASONING_MESSAGE_END",
13
- "TOOL_CALL_START",
14
13
  "TOOL_CALL_END",
15
14
  })
16
15
  _SUBAGENT_DETAIL_EVENT_TYPES = frozenset({