unique_toolkit 2026.30.0.dev5__py3-none-any.whl → 2026.30.0.dev6__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.
@@ -1,9 +1,12 @@
1
1
  """Subscriber that persists assistant messages in response to stream events.
2
2
 
3
- Single responsibility: owns every ``unique_sdk.Message.modify_async`` call
4
- related to a streaming response (``startedStreamingAt``, incremental text
5
- + references, and ``stoppedStreamingAt``), plus the ``content_chunks`` used
6
- to filter references down to what was actually cited.
3
+ Single responsibility: owns every SDK write related to a streaming
4
+ response. Stream boundaries go through ``unique_sdk.Message.modify_async``
5
+ (``startedStreamingAt`` on start, final text + ``stoppedStreamingAt`` on
6
+ end); incremental text deltas go through
7
+ ``unique_sdk.Message.create_event_async`` on the hot path. It also owns
8
+ the ``content_chunks`` used to filter references down to what was actually
9
+ cited.
7
10
 
8
11
  The same message is streamed into once per agent round, and this subscriber
9
12
  only sees per-request boundaries (never end-of-turn). It therefore stamps
@@ -66,7 +69,10 @@ def _now_utc_iso() -> str:
66
69
 
67
70
 
68
71
  class MessagePersistingSubscriber:
69
- """Translates text lifecycle events into ``unique_sdk.Message.modify_async`` calls.
72
+ """Translates text lifecycle events into ``unique_sdk.Message`` SDK writes.
73
+
74
+ Stream start/end are persisted via ``Message.modify_async``; incremental
75
+ :class:`TextUpdate` deltas are persisted via ``Message.create_event_async``.
70
76
 
71
77
  Holds the retrieved chunks for the currently active stream (keyed by
72
78
  ``message_id``) so reference filtering on :class:`TextUpdate` and
@@ -139,8 +145,8 @@ class MessagePersistingSubscriber:
139
145
  # written again in :meth:`on_ended`, so a dropped delta degrades
140
146
  # to a slightly coarser UI update rather than data loss.
141
147
  try:
142
- await unique_sdk.Message.modify_async(
143
- id=event.message_id,
148
+ await unique_sdk.Message.create_event_async(
149
+ messageId=event.message_id,
144
150
  chatId=event.chat_id,
145
151
  user_id=self._settings.context.auth.user_id.get_secret_value(),
146
152
  company_id=self._settings.context.auth.company_id.get_secret_value(),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: unique-toolkit
3
- Version: 2026.30.0.dev5
3
+ Version: 2026.30.0.dev6
4
4
  Summary:
5
5
  Author: Cedric Klinkert, Martin Fadler, Sadique Sheik, Fabian Schläpfer, Pascal Hauri, Ejiroghene Oki-Peter, Rami Azouz, Ricardo Visini, Sanzio Monti
6
6
  Author-email: Cedric Klinkert <cedric.klinkert@unique.ch>, Martin Fadler <martin.fadler@unique.ch>, Sadique Sheik <sadique@unique.ch>, Fabian Schläpfer <fabian@unique.ch>, Pascal Hauri <pascal@unique.ch>, Ejiroghene Oki-Peter <oki-peter.ejiroghene@unique.ai>, Rami Azouz <rami.ext@unique.ch>, Ricardo Visini <ricardo.visini@unique.ch>, Sanzio Monti <sanzio.monti@unique.ai>
@@ -336,7 +336,7 @@ unique_toolkit/experimental/integrations/openai/streaming/event_routing/response
336
336
  unique_toolkit/experimental/integrations/openai/streaming/event_routing/responses/text_delta_event_handler.py,sha256=JB-7W89K4pT6K8A9Z_f_Pow5p-EIGwLoLUSb9BI3qW4,3634
337
337
  unique_toolkit/experimental/integrations/openai/streaming/event_routing/responses/tool_call_event_handler.py,sha256=iELT-H3-u6eG3D3X9Qz0QfTlDj-IfHBAq7bWYR7Dd5U,3198
338
338
  unique_toolkit/experimental/integrations/openai/streaming/event_routing/subscribers/__init__.py,sha256=4wpUt9kzfPzncO9tlKcvOQUzQG5e6kVp5AKZI5grxOk,276
339
- unique_toolkit/experimental/integrations/openai/streaming/event_routing/subscribers/message_persister.py,sha256=cqwDI6PLLiocaBUBL6VPLqgucH_Y_wKTdN3HdadFq6k,8635
339
+ unique_toolkit/experimental/integrations/openai/streaming/event_routing/subscribers/message_persister.py,sha256=JVA0lcF3_WCYEUgWqX53gO5Lj7zR1iFCCuNXuWDPGbo,8930
340
340
  unique_toolkit/experimental/integrations/openai/streaming/event_routing/subscribers/progress_log_persister.py,sha256=VCYGZY3WSpI7mvVs2gO89-M0JenakW01BGfBfFkPDrw,3499
341
341
  unique_toolkit/experimental/resources/__init__.py,sha256=KdMPaaneY0twZ-JBfwImRjXZaWT68NVuOIeqdNXFh_Y,3377
342
342
  unique_toolkit/experimental/resources/content_folder/__init__.py,sha256=c5MUj1xIP10L7tcM4-hG2m1_yUMVfKr_jHAncUXVNvo,2492
@@ -406,6 +406,6 @@ unique_toolkit/short_term_memory/service.py,sha256=2JMBEBn6GoyK-a0xvdcWpPft-3C74
406
406
  unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
407
407
  unique_toolkit/smart_rules/compile.py,sha256=vRe0aMJWuVIK-VsqomgxQImzke7MDmwgSxxJfYCa7zw,1386
408
408
  unique_toolkit/test_utilities/events.py,sha256=FLrhMh0A_mQutAUjoD0FdMcVQ4Gq31r35OVGzRjvLro,6760
409
- unique_toolkit-2026.30.0.dev5.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
410
- unique_toolkit-2026.30.0.dev5.dist-info/METADATA,sha256=4UB6dPpbvtoQdDASGwf3Ld_iqYFiLTy98BnyqmU3wOg,7426
411
- unique_toolkit-2026.30.0.dev5.dist-info/RECORD,,
409
+ unique_toolkit-2026.30.0.dev6.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
410
+ unique_toolkit-2026.30.0.dev6.dist-info/METADATA,sha256=mEqu4--XWmzlsENu8qaH8Hcg_TyeP6Rfc0fblZI0cpQ,7426
411
+ unique_toolkit-2026.30.0.dev6.dist-info/RECORD,,