unique_toolkit 0.8.44__py3-none-any.whl → 0.8.45__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.
@@ -49,6 +49,14 @@ class Tool(ABC, Generic[ConfigType]):
49
49
  """Whether the tool is enabled or not."""
50
50
  return self.settings.is_enabled
51
51
 
52
+ def takes_control(self):
53
+ """
54
+ Some tools require to take control of the conversation with the user and do not want the orchestrator to intervene.
55
+ this function indicates whether the tool takes control or not. It yanks the control away from the orchestrator.
56
+ A typical use-case is deep-research.
57
+ """
58
+ return False
59
+
52
60
  @abstractmethod
53
61
  def tool_description(self) -> LanguageModelToolDescription:
54
62
  raise NotImplementedError
@@ -164,6 +164,13 @@ class ToolManager:
164
164
  def get_tool_prompts(self) -> list[ToolPrompts]:
165
165
  return [tool.get_tool_prompts() for tool in self._tools]
166
166
 
167
+ def does_a_tool_take_control(self, tool_calls: list[LanguageModelFunction]) -> bool:
168
+ for tool_call in tool_calls:
169
+ tool_instance = self.get_tool_by_name(tool_call.name)
170
+ if tool_instance and tool_instance.takes_control():
171
+ return True
172
+ return False
173
+
167
174
  async def execute_selected_tools(
168
175
  self,
169
176
  tool_calls: list[LanguageModelFunction],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 0.8.44
3
+ Version: 0.8.45
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Cedric Klinkert
@@ -117,6 +117,9 @@ All notable changes to this project will be documented in this file.
117
117
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
118
118
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
119
119
 
120
+ ## [0.8.45] - 2025-09-04
121
+ - Introduce handoff capability to tools. with the `takes_control()` function.
122
+
120
123
  ## [0.8.44] - 2025-09-03
121
124
  - Refine `EndpointClass` and create `EndpointRequestor`
122
125
 
@@ -125,14 +125,14 @@ unique_toolkit/tools/mcp/tool_wrapper.py,sha256=w7Fbo4FSMYvtgSq7Sqt1dmAPvqHjoBQS
125
125
  unique_toolkit/tools/schemas.py,sha256=rArQccbfIv7CWcozClAZ-BVlOwAsjpgL8KUab_WeO3k,4817
126
126
  unique_toolkit/tools/test/test_mcp_manager.py,sha256=dySiytBUfRjTOzwY_oGKi_jT6BNVgzZuh1du-EvbcJ4,15627
127
127
  unique_toolkit/tools/test/test_tool_progress_reporter.py,sha256=GTtmBqOUo0-4fh_q0lRgxDhwKeankc3FHFD5ULZAm4Y,6299
128
- unique_toolkit/tools/tool.py,sha256=6kw8oadYfFlV0LEPDTHWiz0l5q_8gM-hLpLjmUn_VNs,5943
129
- unique_toolkit/tools/tool_manager.py,sha256=uW1uf8mYvbnBN_TVa4L79p_8Sf9HyY4V_nXZqrh3fPM,10206
128
+ unique_toolkit/tools/tool.py,sha256=PN3YBmiWebWvuZeT_0voSI8pH_KO0sNoOxdSPNkVrXk,6307
129
+ unique_toolkit/tools/tool_manager.py,sha256=sadEM2bnHAEFfwulVau4cYflL7ThOz7L51aI_w6Fl1k,10512
130
130
  unique_toolkit/tools/tool_progress_reporter.py,sha256=ixud9VoHey1vlU1t86cW0-WTvyTwMxNSWBon8I11SUk,7955
131
131
  unique_toolkit/tools/utils/execution/execution.py,sha256=vjG2Y6awsGNtlvyQAGCTthQ5thWHYnn-vzZXaYLb3QE,7922
132
132
  unique_toolkit/tools/utils/source_handling/schema.py,sha256=vzAyf6ZWNexjMO0OrnB8y2glGkvAilmGGQXd6zcDaKw,870
133
133
  unique_toolkit/tools/utils/source_handling/source_formatting.py,sha256=C7uayNbdkNVJdEARA5CENnHtNY1SU6etlaqbgHNyxaQ,9152
134
134
  unique_toolkit/tools/utils/source_handling/tests/test_source_formatting.py,sha256=oM5ZxEgzROrnX1229KViCAFjRxl9wCTzWZoinYSHleM,6979
135
- unique_toolkit-0.8.44.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
136
- unique_toolkit-0.8.44.dist-info/METADATA,sha256=qgsVibZKJU2Colr_5lqRIr2glNjV_48wFO_xqjnskF0,30583
137
- unique_toolkit-0.8.44.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
138
- unique_toolkit-0.8.44.dist-info/RECORD,,
135
+ unique_toolkit-0.8.45.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
136
+ unique_toolkit-0.8.45.dist-info/METADATA,sha256=XvXW7ImDi9kJeLwGGM64V6bg-VayuERtOKLDjFWxhqQ,30687
137
+ unique_toolkit-0.8.45.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
138
+ unique_toolkit-0.8.45.dist-info/RECORD,,