unique_toolkit 0.8.54__py3-none-any.whl → 0.8.56__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.
@@ -170,7 +170,7 @@ class HistoryManager:
170
170
  ) # it can be that the tool response does not have content chunks
171
171
 
172
172
  # Transform content chunks into sources to be appended to tool result
173
- sources = transform_chunks_to_string(
173
+ stringified_sources, sources = transform_chunks_to_string(
174
174
  content_chunks,
175
175
  self._source_enumerator,
176
176
  None, # Use None for SourceFormatConfig
@@ -183,7 +183,7 @@ class HistoryManager:
183
183
 
184
184
  # Append the result to the history
185
185
  return LanguageModelToolMessage(
186
- content=sources,
186
+ content=stringified_sources,
187
187
  tool_call_id=tool_response.id, # type: ignore
188
188
  name=tool_response.name,
189
189
  )
@@ -64,7 +64,7 @@ def transform_chunks_to_string(
64
64
  max_source_number: int,
65
65
  cfg: SourceFormatConfig | None,
66
66
  full_sources_serialize_dump: bool = False,
67
- ) -> str:
67
+ ) -> tuple[str, list[Source]]:
68
68
  """Transform content chunks into a string of sources.
69
69
 
70
70
  Args:
@@ -76,7 +76,7 @@ def transform_chunks_to_string(
76
76
  str: String for the tool call response
77
77
  """
78
78
  if not content_chunks:
79
- return "No relevant sources found."
79
+ return "No relevant sources found.", []
80
80
  if full_sources_serialize_dump:
81
81
  sources = [
82
82
  Source(
@@ -114,7 +114,7 @@ def transform_chunks_to_string(
114
114
  }
115
115
  for i, chunk in enumerate(content_chunks)
116
116
  ]
117
- return json.dumps(sources)
117
+ return json.dumps(sources), sources
118
118
 
119
119
 
120
120
  def load_sources_from_string(
@@ -0,0 +1 @@
1
+ """Tools module for the Unique Toolkit."""
@@ -122,7 +122,7 @@ class ToolManager:
122
122
  continue
123
123
  if t.name in self._disabled_tools:
124
124
  continue
125
- if len(tool_choices) > 0 and t.name not in tool_choices:
125
+ if len(self._tool_choices) > 0 and t.name not in self._tool_choices:
126
126
  continue
127
127
 
128
128
  self._tools.append(t)
@@ -0,0 +1 @@
1
+ """Utilities for tools."""
@@ -0,0 +1 @@
1
+ """Execution utilities for tools."""
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 0.8.54
3
+ Version: 0.8.56
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Cedric Klinkert
@@ -11,6 +11,8 @@ Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Programming Language :: Python :: 3.12
13
13
  Requires-Dist: jambo (>=0.1.2,<0.2.0)
14
+ Requires-Dist: mkdocs-mermaid2-plugin (>=1.2.2,<2.0.0)
15
+ Requires-Dist: mkdocs-multirepo-plugin (>=0.8.3,<0.9.0)
14
16
  Requires-Dist: numpy (>=1.26.4,<2.0.0)
15
17
  Requires-Dist: openai (>=1.99.9,<2.0.0)
16
18
  Requires-Dist: pillow (>=10.4.0,<11.0.0)
@@ -117,6 +119,12 @@ All notable changes to this project will be documented in this file.
117
119
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
118
120
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
119
121
 
122
+ ## [0.8.56] - 2025-09-12
123
+ - Fixed token counter in utils
124
+
125
+ ## [0.8.55] - 2025-09-10
126
+ - Update documentation with agentic managers
127
+
120
128
  ## [0.8.54] - 2025-09-10
121
129
  - HistoryManager: compute source numbering offset from prior serialized tool messages using `load_sources_from_string`
122
130
  - LoopTokenReducer: serialize reduced tool messages as JSON arrays to keep offsets parsable
@@ -70,9 +70,9 @@ unique_toolkit/framework_utilities/openai/client.py,sha256=ct1cqPcIK1wPl11G9sJV3
70
70
  unique_toolkit/framework_utilities/openai/message_builder.py,sha256=VU6mJm_upLcarJQKFft_t1RlLRncWDxDuLC5LIJ5lQQ,4339
71
71
  unique_toolkit/framework_utilities/utils.py,sha256=JK7g2yMfEx3eMprug26769xqNpS5WJcizf8n2zWMBng,789
72
72
  unique_toolkit/history_manager/history_construction_with_contents.py,sha256=c8Zy3erSbHGT8AdICRRlSK91T_FN6tNpTznvUzpLbWk,9023
73
- unique_toolkit/history_manager/history_manager.py,sha256=7mdT8li4Oo-t0d1q0pCwJksdal-Y0wLzZj-YnIlJ6xQ,8350
73
+ unique_toolkit/history_manager/history_manager.py,sha256=GVz6G_Ys_3_v7N4Ts4jNh7H1fYI8lKOlkyJfuBdhX04,8383
74
74
  unique_toolkit/history_manager/loop_token_reducer.py,sha256=PJlC2PQnKPMkyazN_wBsCjO3Bl0I-HJoJ_YRUCeolv0,18458
75
- unique_toolkit/history_manager/utils.py,sha256=iu4LsYOElx8HlZjcx3ZC75I-TmEYBiEP9q2J93Q63Mg,5606
75
+ unique_toolkit/history_manager/utils.py,sha256=pzIt8npHA3vhOe-wIBiiMPaKk6hQSjMRhkK0pkxwF1k,5640
76
76
  unique_toolkit/language_model/__init__.py,sha256=lRQyLlbwHbNFf4-0foBU13UGb09lwEeodbVsfsSgaCk,1971
77
77
  unique_toolkit/language_model/builder.py,sha256=4OKfwJfj3TrgO1ezc_ewIue6W7BCQ2ZYQXUckWVPPTA,3369
78
78
  unique_toolkit/language_model/constants.py,sha256=B-topqW0r83dkC_25DeQfnPk3n53qzIHUCBS7YJ0-1U,119
@@ -95,6 +95,7 @@ unique_toolkit/short_term_memory/service.py,sha256=5PeVBu1ZCAfyDb2HLVvlmqSbyzBBu
95
95
  unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
96
  unique_toolkit/smart_rules/compile.py,sha256=cxWjb2dxEI2HGsakKdVCkSNi7VK9mr08w5sDcFCQyWI,9553
97
97
  unique_toolkit/thinking_manager/thinking_manager.py,sha256=AJfmrTXTr-DxBnJ2_zYYpYo57kr5deqT0LiZb8UdaDQ,4175
98
+ unique_toolkit/tools/__init__.py,sha256=-ToY9-Xiz0K7qCUydH1h1yG6n4h1hQS8sBuSVPNEq2Y,43
98
99
  unique_toolkit/tools/a2a/__init__.py,sha256=BIPxaqnfTD9IywxrqTLbGnkqNQrfLnKbdzF5ELYzCxM,171
99
100
  unique_toolkit/tools/a2a/config.py,sha256=DKerB7gJ0oUFfqdvVN4I174EZYfYzt7ET2NYGkMLd0Q,864
100
101
  unique_toolkit/tools/a2a/manager.py,sha256=-Vt0pL886zMaaG4sGQhXmbwOhOL928WbZzm4FRZuZMM,1666
@@ -112,13 +113,16 @@ unique_toolkit/tools/schemas.py,sha256=rArQccbfIv7CWcozClAZ-BVlOwAsjpgL8KUab_WeO
112
113
  unique_toolkit/tools/test/test_mcp_manager.py,sha256=dySiytBUfRjTOzwY_oGKi_jT6BNVgzZuh1du-EvbcJ4,15627
113
114
  unique_toolkit/tools/test/test_tool_progress_reporter.py,sha256=GTtmBqOUo0-4fh_q0lRgxDhwKeankc3FHFD5ULZAm4Y,6299
114
115
  unique_toolkit/tools/tool.py,sha256=PN3YBmiWebWvuZeT_0voSI8pH_KO0sNoOxdSPNkVrXk,6307
115
- unique_toolkit/tools/tool_manager.py,sha256=sadEM2bnHAEFfwulVau4cYflL7ThOz7L51aI_w6Fl1k,10512
116
+ unique_toolkit/tools/tool_manager.py,sha256=DouB9kfKGcaCna3NVDfkn5IAqwlrf8lKamjX9HtcNkY,10524
116
117
  unique_toolkit/tools/tool_progress_reporter.py,sha256=ixud9VoHey1vlU1t86cW0-WTvyTwMxNSWBon8I11SUk,7955
118
+ unique_toolkit/tools/utils/__init__.py,sha256=iD1YYzf9LcJFv95Z8BqCAFSewNBabybZRZyvPKGfvro,27
119
+ unique_toolkit/tools/utils/execution/__init__.py,sha256=OHiKpqBnfhBiEQagKVWJsZlHv8smPp5OI4dFIexzibw,37
117
120
  unique_toolkit/tools/utils/execution/execution.py,sha256=vjG2Y6awsGNtlvyQAGCTthQ5thWHYnn-vzZXaYLb3QE,7922
121
+ unique_toolkit/tools/utils/source_handling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
118
122
  unique_toolkit/tools/utils/source_handling/schema.py,sha256=vzAyf6ZWNexjMO0OrnB8y2glGkvAilmGGQXd6zcDaKw,870
119
123
  unique_toolkit/tools/utils/source_handling/source_formatting.py,sha256=C7uayNbdkNVJdEARA5CENnHtNY1SU6etlaqbgHNyxaQ,9152
120
124
  unique_toolkit/tools/utils/source_handling/tests/test_source_formatting.py,sha256=oM5ZxEgzROrnX1229KViCAFjRxl9wCTzWZoinYSHleM,6979
121
- unique_toolkit-0.8.54.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
122
- unique_toolkit-0.8.54.dist-info/METADATA,sha256=8GIXo3YgAtLsWAF_h-ItBP1OgAsWDcBa1zhUuoUp7Xw,31638
123
- unique_toolkit-0.8.54.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
124
- unique_toolkit-0.8.54.dist-info/RECORD,,
125
+ unique_toolkit-0.8.56.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
126
+ unique_toolkit-0.8.56.dist-info/METADATA,sha256=nIXU9x2RXNQMyTHGhcb3awPM-H4Gq6eZdEOLexZRito,31877
127
+ unique_toolkit-0.8.56.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
128
+ unique_toolkit-0.8.56.dist-info/RECORD,,