zrb 1.14.3__py3-none-any.whl → 1.14.5__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.
@@ -3,7 +3,7 @@ import inspect
3
3
  import traceback
4
4
  import typing
5
5
  from collections.abc import Callable
6
- from typing import TYPE_CHECKING
6
+ from typing import TYPE_CHECKING, Any
7
7
 
8
8
  from zrb.context.any_context import AnyContext
9
9
  from zrb.task.llm.error import ToolExecutionError
@@ -106,7 +106,7 @@ def _create_wrapper(
106
106
  del kwargs["_dummy"]
107
107
  try:
108
108
  if not is_yolo_mode and not ctx.is_web_mode and ctx.is_tty:
109
- approval, reason = await _ask_for_approval(ctx, func, *args, **kwargs)
109
+ approval, reason = await _ask_for_approval(ctx, func, args, kwargs)
110
110
  if not approval:
111
111
  raise ValueError(f"User disapproving: {reason}")
112
112
  return await run_async(func(*args, **kwargs))
@@ -123,7 +123,7 @@ def _create_wrapper(
123
123
 
124
124
 
125
125
  async def _ask_for_approval(
126
- ctx: AnyContext, func: Callable, *args, **kwargs
126
+ ctx: AnyContext, func: Callable, args: list[Any], kwargs: dict[Any]
127
127
  ) -> tuple[bool, str]:
128
128
  func_name = get_callable_name(func)
129
129
  normalized_args = [stylize_green(_truncate_arg(arg)) for arg in args]
@@ -142,7 +142,7 @@ async def _ask_for_approval(
142
142
  f"✅ >> Allow to run tool: {func_call_str} (Yes | No, <reason>)", plain=True
143
143
  )
144
144
  user_input = await _read_line()
145
- user_responses = [val.strip() for val in user_input.split(",", maxsplit=2)]
145
+ user_responses = [val.strip() for val in user_input.split(",", maxsplit=1)]
146
146
  while len(user_responses) < 2:
147
147
  user_responses.append("")
148
148
  approval_str, reason = user_responses
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zrb
3
- Version: 1.14.3
3
+ Version: 1.14.5
4
4
  Summary: Your Automation Powerhouse
5
5
  Home-page: https://github.com/state-alchemists/zrb
6
6
  License: AGPL-3.0-or-later
@@ -357,7 +357,7 @@ zrb/task/llm/error.py,sha256=QR-nIohS6pBpC_16cWR-fw7Mevo1sNYAiXMBsh_CJDE,4157
357
357
  zrb/task/llm/history_summarization.py,sha256=_0RmzIeJdJA3KvtdTdKnd2Ga7_7x8C1J2PM0oSn-IYw,8000
358
358
  zrb/task/llm/print_node.py,sha256=mwdqsO2IVf5rDz-jdH9HXz6MFGCWrZ4Pv2xbUBtoNgc,4179
359
359
  zrb/task/llm/prompt.py,sha256=pHYuo4cLzuH9VYk2-PAyxng_l1ItXVZl0llZDQcbnWA,9748
360
- zrb/task/llm/tool_wrapper.py,sha256=7fBZU4uDmmwaeeEnR6fsbiELxXuYY8iHliW1HZ_xIv0,8236
360
+ zrb/task/llm/tool_wrapper.py,sha256=6PSxX466u4TraJgd9PdZBSOpo2Xjn_FPw-E-LT6V4DE,8257
361
361
  zrb/task/llm/typing.py,sha256=c8VAuPBw_4A3DxfYdydkgedaP-LU61W9_wj3m3CAX1E,58
362
362
  zrb/task/llm_task.py,sha256=88yc0SbU2ocWK6VBGoqBy-Lo49ebBTI_KKjsLxDp3sM,13945
363
363
  zrb/task/make_task.py,sha256=PD3b_aYazthS8LHeJsLAhwKDEgdurQZpymJDKeN60u0,2265
@@ -406,7 +406,7 @@ zrb/util/todo.py,sha256=r9_KYF2-hLKMNjsp6AFK9zivykMrywd-kJ4bCwfdafI,19323
406
406
  zrb/util/todo_model.py,sha256=hhzAX-uFl5rsg7iVX1ULlJOfBtblwQ_ieNUxBWfc-Os,1670
407
407
  zrb/xcom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
408
408
  zrb/xcom/xcom.py,sha256=o79rxR9wphnShrcIushA0Qt71d_p3ZTxjNf7x9hJB78,1571
409
- zrb-1.14.3.dist-info/METADATA,sha256=hgYWuKB29Cc1DcbaKxejldxDZwPWvnSCqQgugfa8OHs,9777
410
- zrb-1.14.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
411
- zrb-1.14.3.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
412
- zrb-1.14.3.dist-info/RECORD,,
409
+ zrb-1.14.5.dist-info/METADATA,sha256=ZzCGmwveGNaJZ5XMyWK4PlNGJK0hJrgHKkW6MhjUnSs,9777
410
+ zrb-1.14.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
411
+ zrb-1.14.5.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
412
+ zrb-1.14.5.dist-info/RECORD,,
File without changes