zrb 1.5.16__py3-none-any.whl → 1.6.0__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.
Files changed (46) hide show
  1. zrb/__init__.py +2 -2
  2. zrb/__main__.py +12 -12
  3. zrb/builtin/__init__.py +2 -2
  4. zrb/builtin/llm/chat_session.py +202 -0
  5. zrb/builtin/llm/history.py +6 -6
  6. zrb/builtin/llm/llm_ask.py +142 -0
  7. zrb/builtin/llm/tool/rag.py +39 -23
  8. zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/default/script.js +1 -1
  9. zrb/builtin/todo.py +21 -19
  10. zrb/callback/any_callback.py +1 -1
  11. zrb/callback/callback.py +69 -7
  12. zrb/config.py +261 -91
  13. zrb/context/shared_context.py +4 -2
  14. zrb/input/text_input.py +9 -6
  15. zrb/llm_config.py +65 -74
  16. zrb/runner/cli.py +13 -4
  17. zrb/runner/web_app.py +3 -3
  18. zrb/runner/web_config/config_factory.py +11 -22
  19. zrb/runner/web_route/error_page/show_error_page.py +16 -6
  20. zrb/runner/web_route/home_page/home_page_route.py +23 -7
  21. zrb/runner/web_route/home_page/view.html +19 -33
  22. zrb/runner/web_route/login_page/login_page_route.py +14 -4
  23. zrb/runner/web_route/login_page/view.html +33 -51
  24. zrb/runner/web_route/logout_page/logout_page_route.py +15 -5
  25. zrb/runner/web_route/logout_page/view.html +23 -41
  26. zrb/runner/web_route/node_page/group/show_group_page.py +26 -10
  27. zrb/runner/web_route/node_page/group/view.html +22 -37
  28. zrb/runner/web_route/node_page/task/show_task_page.py +34 -19
  29. zrb/runner/web_route/node_page/task/view.html +74 -88
  30. zrb/runner/web_route/static/global_template.html +27 -0
  31. zrb/runner/web_route/static/resources/common.css +21 -0
  32. zrb/runner/web_route/static/resources/common.js +28 -0
  33. zrb/runner/web_route/task_session_api_route.py +3 -1
  34. zrb/session_state_logger/session_state_logger_factory.py +2 -2
  35. zrb/task/base_task.py +4 -1
  36. zrb/task/base_trigger.py +47 -2
  37. zrb/task/cmd_task.py +3 -3
  38. zrb/task/llm/agent.py +10 -1
  39. zrb/task/llm/print_node.py +5 -6
  40. zrb/task/llm_task.py +1 -1
  41. zrb/util/git_subtree.py +1 -1
  42. {zrb-1.5.16.dist-info → zrb-1.6.0.dist-info}/METADATA +1 -1
  43. {zrb-1.5.16.dist-info → zrb-1.6.0.dist-info}/RECORD +45 -42
  44. zrb/builtin/llm/llm_chat.py +0 -124
  45. {zrb-1.5.16.dist-info → zrb-1.6.0.dist-info}/WHEEL +0 -0
  46. {zrb-1.5.16.dist-info → zrb-1.6.0.dist-info}/entry_points.txt +0 -0
zrb/task/llm/agent.py CHANGED
@@ -141,7 +141,7 @@ async def run_agent_iteration(
141
141
  # Each node represents a step in the agent's execution
142
142
  # Reference: https://ai.pydantic.dev/agents/#streaming
143
143
  try:
144
- await print_node(ctx.print, agent_run, node)
144
+ await print_node(_get_plain_printer(ctx), agent_run, node)
145
145
  except APIError as e:
146
146
  # Extract detailed error information from the response
147
147
  error_details = extract_api_error_details(e)
@@ -152,3 +152,12 @@ async def run_agent_iteration(
152
152
  ctx.log_error(f"Error type: {type(e).__name__}")
153
153
  raise
154
154
  return agent_run
155
+
156
+
157
+ def _get_plain_printer(ctx: AnyContext):
158
+ def printer(*args, **kwargs):
159
+ if "plain" not in kwargs:
160
+ kwargs["plain"] = True
161
+ return ctx.print(*args, **kwargs)
162
+
163
+ return printer
@@ -30,7 +30,7 @@ async def print_node(print_func: Callable, agent_run: Any, node: Any):
30
30
  async for event in request_stream:
31
31
  if isinstance(event, PartStartEvent):
32
32
  if is_streaming:
33
- print_func("", plain=True)
33
+ print_func("")
34
34
  print_func(
35
35
  stylize_faint(
36
36
  f"[Request] Starting part {event.index}: {event.part!r}"
@@ -42,24 +42,22 @@ async def print_node(print_func: Callable, agent_run: Any, node: Any):
42
42
  print_func(
43
43
  stylize_faint(f"{event.delta.content_delta}"),
44
44
  end="",
45
- plain=is_streaming,
46
45
  )
47
46
  elif isinstance(event.delta, ToolCallPartDelta):
48
47
  print_func(
49
48
  stylize_faint(f"{event.delta.args_delta}"),
50
49
  end="",
51
- plain=is_streaming,
52
50
  )
53
51
  is_streaming = True
54
52
  elif isinstance(event, FinalResultEvent):
55
53
  if is_streaming:
56
- print_func("", plain=True)
54
+ print_func("")
57
55
  print_func(
58
56
  stylize_faint(f"[Result] tool_name={event.tool_name}"),
59
57
  )
60
58
  is_streaming = False
61
59
  if is_streaming:
62
- print_func("", plain=True)
60
+ print_func("")
63
61
  elif Agent.is_call_tools_node(node):
64
62
  # A handle-response node => The model returned some data, potentially calls a tool
65
63
  print_func(
@@ -95,4 +93,5 @@ async def print_node(print_func: Callable, agent_run: Any, node: Any):
95
93
  )
96
94
  elif Agent.is_end_node(node):
97
95
  # Once an End node is reached, the agent run is complete
98
- print_func(stylize_faint(f"{agent_run.result.data}"))
96
+ print_func(stylize_faint("[End of Response]"))
97
+ # print_func(stylize_faint(f"{agent_run.result.data}"))
zrb/task/llm_task.py CHANGED
@@ -346,7 +346,7 @@ class LLMTask(BaseTask):
346
346
  ctx.xcom[xcom_usage_key] = Xcom([])
347
347
  usage = agent_run.result.usage()
348
348
  ctx.xcom.get(xcom_usage_key).push(usage)
349
- ctx.print(stylize_faint(f"[USAGE] {usage}"))
349
+ ctx.print(stylize_faint(f"[USAGE] {usage}"), plain=True)
350
350
  return agent_run.result.output
351
351
  else:
352
352
  ctx.log_warning("Agent run did not produce a result.")
zrb/util/git_subtree.py CHANGED
@@ -70,7 +70,7 @@ async def add_subtree(
70
70
  name already exists.
71
71
  Exception: If the git command returns a non-zero exit code.
72
72
  """
73
- config = load_config()
73
+ config = load_config(repo_dir)
74
74
  if os.path.isdir(prefix):
75
75
  raise ValueError(f"Directory exists: {prefix}")
76
76
  if name in config.data:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zrb
3
- Version: 1.5.16
3
+ Version: 1.6.0
4
4
  Summary: Your Automation Powerhouse
5
5
  Home-page: https://github.com/state-alchemists/zrb
6
6
  License: AGPL-3.0-or-later
@@ -1,23 +1,24 @@
1
- zrb/__init__.py,sha256=P_oc0u0y0ZVtwvG9wj8kbfcLW9ZUUlzdEtko6AneBN8,3108
2
- zrb/__main__.py,sha256=mV-XpuArhRQzUqTvRPQTnV0tfZlZuhioMjhHTGaqJK8,2796
1
+ zrb/__init__.py,sha256=JgYNwsKYVzYzpoFXRn_LwuNFreMffPEvoSehTZisp4M,3103
2
+ zrb/__main__.py,sha256=8LMzIvdKtOe7sIBfEhXYW8SM7dyTcd5JIySHFa6shbQ,2799
3
3
  zrb/attr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  zrb/attr/type.py,sha256=4TV5gPYMMrKh5V-yB6iRYKCbsXAH_AvGXMsjxKLHcUs,568
5
- zrb/builtin/__init__.py,sha256=Fbd-4rkqOcufzitziu99jdDc0r3sIgSG27fQMMhHXN8,2660
5
+ zrb/builtin/__init__.py,sha256=N-h-BoXWv0jYOldixXwgk6ekiWtrGZsGv57iqonsYdc,2657
6
6
  zrb/builtin/base64.py,sha256=UjaFttE2oRx0T7_RpKtKfgMtWfiQXfJBAJmA16ek8Ic,1507
7
7
  zrb/builtin/git.py,sha256=8_qVE_2lVQEVXQ9vhiw8Tn4Prj1VZB78ZjEJJS5Ab3M,5461
8
8
  zrb/builtin/git_subtree.py,sha256=7BKwOkVTWDrR0DXXQ4iJyHqeR6sV5VYRt8y_rEB0EHg,3505
9
9
  zrb/builtin/group.py,sha256=t008xLM4_fgbjfZrPoi_fQAnSHIo6MOiQSCHBO4GDYU,2379
10
10
  zrb/builtin/http.py,sha256=sLqEczuSxGYXWzyJR6frGOHkPTviu4BeyroUr3-ZuAI,4322
11
11
  zrb/builtin/jwt.py,sha256=kjCf8qt7tkW9BpBDRAVTMJaEPQGzCbO1wo9xt5JoM8A,2836
12
- zrb/builtin/llm/history.py,sha256=J_x1JMG-aUKlRUkrw2YTg-x7dJrbVABwCOl3A9IqAUc,3071
12
+ zrb/builtin/llm/chat_session.py,sha256=DFMTda6EwjuHboP9cAurNdF5cytsKmo9NBZgGknqsds,6386
13
+ zrb/builtin/llm/history.py,sha256=cnkOyO43uiMQ9cEvmqk-pPoCk1zCAH_fwAqSgBtsjzY,3079
13
14
  zrb/builtin/llm/input.py,sha256=Nw-26uTWp2QhUgKJcP_IMHmtk-b542CCSQ_vCOjhvhM,877
14
- zrb/builtin/llm/llm_chat.py,sha256=NcsFNrM9ygmFTB7lW0xaaikSmCOQZcaW3G8iQzQS5eo,4224
15
+ zrb/builtin/llm/llm_ask.py,sha256=bC4OtlYChhOlUIwstzPM4_LOfL_8NNhNpN60xpjzeNg,4375
15
16
  zrb/builtin/llm/previous-session.js,sha256=xMKZvJoAbrwiyHS0OoPrWuaKxWYLoyR5sguePIoCjTY,816
16
17
  zrb/builtin/llm/tool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
18
  zrb/builtin/llm/tool/api.py,sha256=yR9I0ZsI96OeQl9pgwORMASVuXsAL0a89D_iPS4C8Dc,1699
18
19
  zrb/builtin/llm/tool/cli.py,sha256=_CNEmEc6K2Z0i9ppYeM7jGpqaEdT3uxaWQatmxP3jKE,858
19
20
  zrb/builtin/llm/tool/file.py,sha256=ig4tZGYnGjE96U9KgOpbANmyAgFmTcQzym1wVAsZYRM,16620
20
- zrb/builtin/llm/tool/rag.py,sha256=45t0o88l7F62oq2P61NnC1hsZJ4h72dZsVQfcsOIUc8,7521
21
+ zrb/builtin/llm/tool/rag.py,sha256=VUyRBvnSeDf8T_lKY--c5HVTfccNgiEJU3QpwssJF8E,8182
21
22
  zrb/builtin/llm/tool/sub_agent.py,sha256=7KaxWfFcT-3_fyqQyd4qA2ipzmVFG71iPzRl7wISM5M,4885
22
23
  zrb/builtin/llm/tool/web.py,sha256=pXRLhcB_Y6z-2w4C4WezH8n-pg3PSMgt_bwn3aaqi6g,5479
23
24
  zrb/builtin/md5.py,sha256=690RV2LbW7wQeTFxY-lmmqTSVEEZv3XZbjEUW1Q3XpE,1480
@@ -142,7 +143,7 @@ zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view
142
143
  zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/crud/style.css,sha256=UzmYDiz4dlxKPPKXwTjybK1nrwkk-3DmFEmlpWnnqfo,206
143
144
  zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/crud/util.js,sha256=7TQftOjZGmx6POLCHzmh08m4q-sc01BRtmcZCQQ5JU8,4376
144
145
  zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/default/pico-style.css,sha256=7VEhpZWXz8pcKtTULorjQlWX1fMs7Bcbn1QBDJiJZfY,233
145
- zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/default/script.js,sha256=JhuxTn6Qs3AkHULEfnL8tG1UHU1YZTPY5gYRi5o1H9I,1357
146
+ zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/default/script.js,sha256=wysjwKbUnMyH9HWKXjOgOuUTDi9WTjQgWo0sjHe31ZI,1372
146
147
  zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/default/style.css,sha256=tS7UIUO1AcRgaRJpN7OCTrKvQqDNa3NyAVd7SGtfvJE,1813
147
148
  zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/images/android-chrome-192x192.png,sha256=4NN-TGVL3y3MVbms7kCgD-Udp5XmQ6cwmWqRFYib0qw,12463
148
149
  zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/gateway/view/static/images/android-chrome-512x512.png,sha256=PE5DCXqmMtNvwDWfHxVoRIy36mrTmq4IDv-YPgz4mvg,34025
@@ -207,15 +208,15 @@ zrb/builtin/shell/autocomplete/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
207
208
  zrb/builtin/shell/autocomplete/bash.py,sha256=-7YDVV7txgJH9mAYSYN0jmvUEeDIzWFvVNY-cY0myF8,1181
208
209
  zrb/builtin/shell/autocomplete/subcmd.py,sha256=WZI6cGWJcn80zSyxOHG7sCMO3Ucix3mZf4xm_xyB_Y0,606
209
210
  zrb/builtin/shell/autocomplete/zsh.py,sha256=9hlq0Wt3fhRz326mAQTypEd4_4lZdrbBx_3A-Ti3mvw,1022
210
- zrb/builtin/todo.py,sha256=S-H0Zqbh6KkliRmL4z_Edo9GsuKXgEf6XADE2W5A3m8,11471
211
+ zrb/builtin/todo.py,sha256=pDbDKp94VHy-JsOr1sFtY8K4nIpNr1v6siqs5ptypsg,11568
211
212
  zrb/builtin/uuid.py,sha256=lIdhSGzPQ1rixRzMXxQDcgFgV7W-gUduHIudZXlzZzg,5393
212
213
  zrb/callback/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
213
- zrb/callback/any_callback.py,sha256=apWvuQhak6Rxlpk0rmsvhLoE5OY-37JBHRsDIKULkqw,225
214
- zrb/callback/callback.py,sha256=hKefB_Jd1XGjPSLQdMKDsGLHPzEGO2dqrIArLl_EmD0,848
214
+ zrb/callback/any_callback.py,sha256=PqEJYX_RigXEmoPniSeZusZBZSLWEoVIHvHk8MZ0Mvg,253
215
+ zrb/callback/callback.py,sha256=yPVsbMqRkFH5kKIcFVg-U0VEKTP2VXVArhgQYwD-Jv8,3293
215
216
  zrb/cmd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
216
217
  zrb/cmd/cmd_result.py,sha256=L8bQJzWCpcYexIxHBNsXj2pT3BtLmWex0iJSMkvimOA,597
217
218
  zrb/cmd/cmd_val.py,sha256=7Doowyg6BK3ISSGBLt-PmlhzaEkBjWWm51cED6fAUOQ,1014
218
- zrb/config.py,sha256=zUgyrB5mTYchRFh6qwCeuoLjvz83PrNu-P6TGGZEwDI,3946
219
+ zrb/config.py,sha256=JHP1Mq7N3skyFscFNF2fgqUIzHVyn6nxjFzYAgDOaT0,8252
219
220
  zrb/content_transformer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
220
221
  zrb/content_transformer/any_content_transformer.py,sha256=v8ZUbcix1GGeDQwB6OKX_1TjpY__ksxWVeqibwa_iZA,850
221
222
  zrb/content_transformer/content_transformer.py,sha256=STl77wW-I69QaGzCXjvkppngYFLufow8ybPLSyAvlHs,2404
@@ -223,7 +224,7 @@ zrb/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
223
224
  zrb/context/any_context.py,sha256=2hgVKbbDwmwrEl1h1L1FaTUjuUYaDd_b7YRGkaorW6Q,6362
224
225
  zrb/context/any_shared_context.py,sha256=p1i9af_CUDz5Mf1h1kBZMAa2AEhf17I3O5IgAcjRLoY,1768
225
226
  zrb/context/context.py,sha256=VGoUwoWyL9d4QqJEhg41S-X8T2jlssGpiC9YSc3Gjqk,6601
226
- zrb/context/shared_context.py,sha256=47Tnnor1ttpwpe_N07rMNM1jgIYPY9abMe1Q5igkMtE,2735
227
+ zrb/context/shared_context.py,sha256=w6cJH41nmhTzYlUrquRMbOexXrXgadfTd5awLnKAq4Q,2801
227
228
  zrb/dot_dict/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
228
229
  zrb/dot_dict/dot_dict.py,sha256=ubw_x8I7AOJ59xxtFVJ00VGmq_IYdZP3mUhNlO4nEK0,556
229
230
  zrb/env/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -243,37 +244,39 @@ zrb/input/int_input.py,sha256=UhxCFYlZdJcgUSGGEkz301zOgRVpK0KDG_IxxWpQfMU,1457
243
244
  zrb/input/option_input.py,sha256=TQB82ko5odgzkULEizBZi0e9TIHEbIgvdP0AR3RhA74,2135
244
245
  zrb/input/password_input.py,sha256=szBojWxSP9QJecgsgA87OIYwQrY2AQ3USIKdDZY6snU,1465
245
246
  zrb/input/str_input.py,sha256=NevZHX9rf1g8eMatPyy-kUX3DglrVAQpzvVpKAzf7bA,81
246
- zrb/input/text_input.py,sha256=shvVbc2U8Is36h23M5lcW8IEwKc9FR-4uEPZZroj3rU,3377
247
- zrb/llm_config.py,sha256=alAdk23Hnd4JnEQsLcquBjz4PWn-QGaVG5NCrzF5XrI,9702
247
+ zrb/input/text_input.py,sha256=NdceGgtbFFZkAoWOBW4xarjM-N1oePTStBJb8RbOqLw,3499
248
+ zrb/llm_config.py,sha256=sFK4KCMSEDR4HLvutDLGdvG078llXvxop4F1qViE_Co,9269
248
249
  zrb/runner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
249
- zrb/runner/cli.py,sha256=8G-o12jrj-zCFtuEpnqA_9sU-3vPfa29cNFx1lHNV-M,6719
250
+ zrb/runner/cli.py,sha256=Fh1p5qwa8sK2IlHbPoBHWLBA7rplDMlQpZfmbMq6gy8,6835
250
251
  zrb/runner/common_util.py,sha256=JDMcwvQ8cxnv9kQrAoKVLA40Q1omfv-u5_d5MvvwHeE,1373
251
- zrb/runner/web_app.py,sha256=Ji2AWeFpJu5guXmur7mAAbjMToyjgmPDdfYu8047FFI,2616
252
+ zrb/runner/web_app.py,sha256=huY9SCvMC9akhEQDW6mUC0osr0b0H3EosD7GFClVt-A,2612
252
253
  zrb/runner/web_config/config.py,sha256=0wR58KreAmawGGfamm0GLZY344HaXs7qfDgHLavBDwo,3125
253
- zrb/runner/web_config/config_factory.py,sha256=GNByKviNhQF5qG2ypmC_mV2xglzWHLVQC0x2SQJjrbA,894
254
+ zrb/runner/web_config/config_factory.py,sha256=GIvAwQKY_jkAb_IVt179KvphqHPY7gfBiQrZmELVQdQ,636
254
255
  zrb/runner/web_route/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
255
256
  zrb/runner/web_route/docs_route.py,sha256=06QfDITvXTRphZWI0qlxbDfnB-44_eZpE-xotwKsvY8,514
256
257
  zrb/runner/web_route/error_page/serve_default_404.py,sha256=y2gVZPPjGp5J9uRH6JpoboaFI3DMP-WmCjH6fWx5UBM,1056
257
- zrb/runner/web_route/error_page/show_error_page.py,sha256=LRRLNF3fWgn33cMvMafmd0pDaC_XGrZWDHVLC4l3Bno,901
258
+ zrb/runner/web_route/error_page/show_error_page.py,sha256=8U3jbBYVJIdYjR1AVCBfrmfLQ4dE4MbHwA3AovtIab4,1275
258
259
  zrb/runner/web_route/error_page/view.html,sha256=h58zKnB170h2BTczBtD8CoECEEdXpojWMBbL_KwS4yU,1204
259
260
  zrb/runner/web_route/home_page/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
260
- zrb/runner/web_route/home_page/home_page_route.py,sha256=hMTziWF25RnKzrVNna2hOcOUpeOinvwBExMqdk4OqNc,1765
261
- zrb/runner/web_route/home_page/view.html,sha256=ee0O1bgoZO0qYVqaa67ad7wX_Zawqsy6F-ioxbjEQGk,1070
261
+ zrb/runner/web_route/home_page/home_page_route.py,sha256=r_Mfmz2I5MmhQRMQ_0hWoNNucXNhxH6dl8rlA7yRIYY,2556
262
+ zrb/runner/web_route/home_page/view.html,sha256=oWvirSGh74ABHHDPYboQueZI6_xMeMLDf5LZNLZO52k,422
262
263
  zrb/runner/web_route/login_api_route.py,sha256=AAK6DmQQrFi1Rg_Y5qF_ss11tzDMnziPXYILEb-vlb4,1125
263
- zrb/runner/web_route/login_page/login_page_route.py,sha256=mm2zM8Y0_uZYmmgbwNOzO319sJ9QXiWwzzx19MXMPso,1301
264
- zrb/runner/web_route/login_page/view.html,sha256=-MeHcSb3r0ouUhs-4aFgrlPjV_V7iz2a6PkobVpk77c,1761
264
+ zrb/runner/web_route/login_page/login_page_route.py,sha256=BZ3aeVT7mNY1MgBvSjGCO77Lfnh9yBcOIajSbjgOo30,1695
265
+ zrb/runner/web_route/login_page/view.html,sha256=KLHZWm5MxcGCOQjeq_JtXMTLvDX8JyphSBbK6DDrkg8,1139
265
266
  zrb/runner/web_route/logout_api_route.py,sha256=ZlP1fi1RoNajLrm5ojo2o905TaE8OCB2soGhbLJ-2OE,612
266
- zrb/runner/web_route/logout_page/logout_page_route.py,sha256=j8oW0PIKobyu1O8D1zCv6kybzRkbty1wlvAD0_87Icw,1338
267
- zrb/runner/web_route/logout_page/view.html,sha256=O17ow4-KMbxTkwaQgR880Rlt1B9pnHrRTlgu5nsM4LA,1324
268
- zrb/runner/web_route/node_page/group/show_group_page.py,sha256=98gp3UCmQhrvkLbO075x_Qy3_LGdxrDP2fFAf9UzAMQ,1316
269
- zrb/runner/web_route/node_page/group/view.html,sha256=wISun627ciFZcvGpxANG0pr1zgUtSd1m1rNhCAYjRQw,1280
267
+ zrb/runner/web_route/logout_page/logout_page_route.py,sha256=oAeNXkwKFSUUby8F-i3WN7BZgIsAv5Lp8HYdLXAlsxQ,1740
268
+ zrb/runner/web_route/logout_page/view.html,sha256=P1S9cv7eXMbwUZTPfP4sshBNI-m9nWhLP-mrmtoEHCs,742
269
+ zrb/runner/web_route/node_page/group/show_group_page.py,sha256=QL_AawyOdmMQLyhS3lIF5Ko0vhuDH02QN-93rjxCVTQ,1943
270
+ zrb/runner/web_route/node_page/group/view.html,sha256=3d1O2Vqc2PzxY-_xWt0Rsb2mG1yrvQ1TuaZXuYGolJw,566
270
271
  zrb/runner/web_route/node_page/node_page_route.py,sha256=LYi60eZ5ZGgykTIeSQk5Hn9OYjh3ocYgBIAue7Bznvw,2268
271
272
  zrb/runner/web_route/node_page/task/partial/input.html,sha256=X2jy0q7TLQGP853exZMed0lqPezL3gzn6mnhB5QKfkc,178
272
- zrb/runner/web_route/node_page/task/show_task_page.py,sha256=0HIFEuy5DLOKqff4Wib5WaMe5Om0B4C7BH63pPIA-OU,2639
273
- zrb/runner/web_route/node_page/task/view.html,sha256=T6kXNYKGhHsY5A74vQt_tj68WrULmPRaSuMqI1ygD1o,3605
273
+ zrb/runner/web_route/node_page/task/show_task_page.py,sha256=uZB7r5uQvG4OJwtGUu7DaTU-8qgSsVEf3nY8KaTE4TI,3344
274
+ zrb/runner/web_route/node_page/task/view.html,sha256=mp_DeoPXhWPypAbKSZ6iTIDVlTRUQzIuJfDExxOWBWc,2598
274
275
  zrb/runner/web_route/refresh_token_api_route.py,sha256=QGulCGN2vhDXuf-U4bPSJjbTcz40ixP8937hSOiy_Mo,1478
276
+ zrb/runner/web_route/static/global_template.html,sha256=M00b1F-Y31vx6xQVGMVGkSJzCrQHWHe9zI_WSffS6Ck,999
275
277
  zrb/runner/web_route/static/refresh-token.template.js,sha256=AWXhdxTMyuzBZoMftH7BjlU2CMIafwqWcbkZoiUEE50,1074
276
- zrb/runner/web_route/static/resources/common.css,sha256=u5rGLsPx2943z324iQ2X81krM3z-kc-8e1SkBdYAvKU,157
278
+ zrb/runner/web_route/static/resources/common.css,sha256=Kk8o0mcArKTOxPllR0ecaa0ZRVVig0CG0KvLXIqmGJo,517
279
+ zrb/runner/web_route/static/resources/common.js,sha256=e0OEhQBA1cMuGtj9yQQT2O053ysngcJTL-jW0b1gvoY,813
277
280
  zrb/runner/web_route/static/resources/favicon-32x32.png,sha256=yu9AIU4k_qD4YHpul6XwJgOxIbmu0thv9ymm2QOsrAk,1456
278
281
  zrb/runner/web_route/static/resources/login/event.js,sha256=1-NxaUwU-X7Tu2RAwVkzU7gngS0OdooH7Ple4_KDrh4,1135
279
282
  zrb/runner/web_route/static/resources/logout/event.js,sha256=MfZxrTa2yL49Lbh7cCZDdqsIcf9e1q3W8-WjmZXV5pA,692
@@ -284,7 +287,7 @@ zrb/runner/web_route/static/resources/session/event.js,sha256=X5OlSHefK0SDB9VkFC
284
287
  zrb/runner/web_route/static/resources/session/past-session.js,sha256=RwGJYKSp75K8NZ-iZP58XppWgdzkiKFaiC5wgcMLxDo,5470
285
288
  zrb/runner/web_route/static/static_route.py,sha256=BxFXIhKqkPtSBVkuf6Uho8yLph_EqDTLTVB0KG2-Pbo,1539
286
289
  zrb/runner/web_route/task_input_api_route.py,sha256=WgkqprftYrtyq9YK0TVr1lQNQF30kEeyEaT6lRGkGLY,1751
287
- zrb/runner/web_route/task_session_api_route.py,sha256=RJJ_GVH3RkGrVe906ZIMaucXI-eTPdn2blI9zgs2JR0,5945
290
+ zrb/runner/web_route/task_session_api_route.py,sha256=WbDK7-XgpEKftItBXhmVrJw7Nph7BFXlr5TrMr76f6s,6008
288
291
  zrb/runner/web_schema/session.py,sha256=NwbuS2Sv-CXO52nU-EZv8OMlD4vgCQWNeLC_dT0FK7I,92
289
292
  zrb/runner/web_schema/token.py,sha256=Y7XCPS4WzrxslTDtHeLcPTTUpmWhPOkRcl4b99zrC7c,185
290
293
  zrb/runner/web_schema/user.py,sha256=Kp10amg4i-f8Y-4czogv1YN7rwy0HdbePFiuovYu1ts,1018
@@ -300,7 +303,7 @@ zrb/session_state_log/session_state_log.py,sha256=VVghDMU72PbrvnzQ7MJuc-KTJ5P5fX
300
303
  zrb/session_state_logger/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
301
304
  zrb/session_state_logger/any_session_state_logger.py,sha256=OEP7RQD6sPSJP0OY8oDKRZcoqQ9oKMOjBswanMj6OaE,610
302
305
  zrb/session_state_logger/file_session_state_logger.py,sha256=1ue7-Bcwg4wlLn2G_7ARR4Rij2zUISj_Y56VBQsCaMQ,3666
303
- zrb/session_state_logger/session_state_logger_factory.py,sha256=wXf2DVmeRmx399MFYYty6uNcPZMcf7iayHBYCLGlhfc,189
306
+ zrb/session_state_logger/session_state_logger_factory.py,sha256=2Jvvp2zqK3qD0Gw-pm84LJ3d5uvkoBRh9MNHvw3r_DA,181
304
307
  zrb/task/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
305
308
  zrb/task/any_task.py,sha256=zklUjkLRQ62TEvfnOUUYfXChj8Zk4igee3w8V3_rN08,5846
306
309
  zrb/task/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -309,23 +312,23 @@ zrb/task/base/execution.py,sha256=lB6cfivk-EM6sZSaPjYs_ufb7jb-A2jLJNhBupwBFgI,11
309
312
  zrb/task/base/lifecycle.py,sha256=YIugyqRmEKMnc9MTCDEZr9jVhie3Kwt7LTMtAVAN9Ks,7278
310
313
  zrb/task/base/monitoring.py,sha256=UAOEcPiYNtZR4FFxzWCosuOEFE_P3c4GT5vAhQmohqI,5663
311
314
  zrb/task/base/operators.py,sha256=uAMFqpZJsPnCrojgOl1FUDXTS15mtOa_IqiAXltyYRU,1576
312
- zrb/task/base_task.py,sha256=HsFBPpagiyouRXzyxccYs1dO-dlBwBdcyqkgppZgnmw,10784
313
- zrb/task/base_trigger.py,sha256=jC722rDvodaBLeNaFghkTyv1u0QXrK6BLZUUqcmBJ7Q,4581
314
- zrb/task/cmd_task.py,sha256=xFAdOvLDK9Qaye40T_lG3K6AIKgbPAMHk_3GIAYeJAM,10750
315
+ zrb/task/base_task.py,sha256=Y5JNzU6Y1E8RKGdj16HTlhny0v8N2I98GCA4D8h6Kmw,10962
316
+ zrb/task/base_trigger.py,sha256=WSGcmBcGAZw8EzUXfmCjqJQkz8GEmi1RzogpF6A1V4s,6902
317
+ zrb/task/cmd_task.py,sha256=3JFkWZEhyrQAwbQJs2pgICBmkohUR9T-hjXw82JyNtA,10720
315
318
  zrb/task/http_check.py,sha256=Gf5rOB2Se2EdizuN9rp65HpGmfZkGc-clIAlHmPVehs,2565
316
319
  zrb/task/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
317
- zrb/task/llm/agent.py,sha256=pZAbn0vQOXFkJqnHBo8rfFq3OZD3yePr39jzcRqn43A,5248
320
+ zrb/task/llm/agent.py,sha256=6DxmhezQ6Y_LqXJ24DqfABVPjv_Spo3Vvz5TH5M3IoQ,5470
318
321
  zrb/task/llm/config.py,sha256=R6mkbm4d5ecN4KjjZaXbqNq9-8bXfdUGl_BML8hUWqY,3205
319
322
  zrb/task/llm/context.py,sha256=s313jXooOp8ht7j2sc3-d8xyW7oWs9bFv4KEyjicwys,3893
320
323
  zrb/task/llm/context_enrichment.py,sha256=lLPCtSSdB0jyReB3rk5taNvFPpXMmjDZ_Ro_Fz5GX68,5963
321
324
  zrb/task/llm/error.py,sha256=27DQXSG8SH1-XuvXFdZQKzP39wZDWmd_YnSTz6DJKKI,3690
322
325
  zrb/task/llm/history.py,sha256=LnrJdXLyo2qz-bNCwLorhoqGmgSiPTUU0bzY63w67-E,9257
323
326
  zrb/task/llm/history_summarization.py,sha256=0cWChp4OE_OiaNDhHRWi4rwHKTHsqWLYy3pS5IAIHpQ,6293
324
- zrb/task/llm/print_node.py,sha256=dxwSOZ_DAFdrVSRIAEaxUjgbXWRtju1H87AtC9AJRIM,4470
327
+ zrb/task/llm/print_node.py,sha256=bpISOUxSH_JBLR-4Nq6-iLrzNWFagrKFX6u8ogYYMw8,4395
325
328
  zrb/task/llm/prompt.py,sha256=0uN96mPiq5o28Bz_f7wWmOD6-DJYD-nc_N5RovYz3Js,4719
326
329
  zrb/task/llm/tool_wrapper.py,sha256=Xygd4VCY3ykjVv63pqlTI16ZG41ySkp683_5VTnL-Zo,6481
327
330
  zrb/task/llm/typing.py,sha256=c8VAuPBw_4A3DxfYdydkgedaP-LU61W9_wj3m3CAX1E,58
328
- zrb/task/llm_task.py,sha256=ABIhleg8n1d33FMJq2OqSigeXf8ROnEfUV4_9KmLoNQ,15220
331
+ zrb/task/llm_task.py,sha256=9r8SitsqBEOYGF92h_E8ROhofKXOh-BzrDIDyfg4-S8,15232
329
332
  zrb/task/make_task.py,sha256=PD3b_aYazthS8LHeJsLAhwKDEgdurQZpymJDKeN60u0,2265
330
333
  zrb/task/rsync_task.py,sha256=GSL9144bmp6F0EckT6m-2a1xG25AzrrWYzH4k3SVUKM,6370
331
334
  zrb/task/scaffolder.py,sha256=rME18w1HJUHXgi9eTYXx_T2G4JdqDYzBoNOkdOOo5-o,6806
@@ -355,7 +358,7 @@ zrb/util/codemod/modify_module.py,sha256=2mzi_NxJ-kNFo5G0U_Rqb3JoYQl1s6Izt7b_wAl
355
358
  zrb/util/cron.py,sha256=UWqqhhM7DDTPx6wjCIdBndnVh3NRu-sdKazp8aZkXh8,3833
356
359
  zrb/util/file.py,sha256=Y5pRJxkpshyELxsv8qw_gp1qM5OXgeDwYXqt7Y6Lqu8,2242
357
360
  zrb/util/git.py,sha256=gS_Y9sQgJbY0PfgSQiowLvV3Nf0y9C8nT3j6z6oEsG8,8186
358
- zrb/util/git_subtree.py,sha256=Dy12p0VxCdyepv0cvHwhYq9l8PneI7XG0vih0xZtGBE,4603
361
+ zrb/util/git_subtree.py,sha256=E_UB5OIgm8WkHL9beifRxpZ25_BB9p1H578OhLZTgRU,4611
359
362
  zrb/util/group.py,sha256=T82yr3qg9I5k10VPXkMyrIRIqyfzadSH813bqzwKEPI,4718
360
363
  zrb/util/load.py,sha256=DK0KYSlu48HCoGPqnW1IxnE3pHrZSPCstfz8Fjyqqv8,2140
361
364
  zrb/util/run.py,sha256=FPRCCvl5g6GuDvHTkaV95CFDlqxQ-5FZb2-F-Jz1fnI,485
@@ -366,7 +369,7 @@ zrb/util/string/name.py,sha256=SXEfxJ1-tDOzHqmSV8kvepRVyMqs2XdV_vyoh_9XUu0,1584
366
369
  zrb/util/todo.py,sha256=VGISej2KQZERpornK-8X7bysp4JydMrMUTnG8B0-liI,20708
367
370
  zrb/xcom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
368
371
  zrb/xcom/xcom.py,sha256=o79rxR9wphnShrcIushA0Qt71d_p3ZTxjNf7x9hJB78,1571
369
- zrb-1.5.16.dist-info/METADATA,sha256=BY-OgdZco37EJKwLBYKzpnPqOEbgY3_SUsR51kKQGvo,8386
370
- zrb-1.5.16.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
371
- zrb-1.5.16.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
372
- zrb-1.5.16.dist-info/RECORD,,
372
+ zrb-1.6.0.dist-info/METADATA,sha256=7Py3F2SacChvaWLjNETTyNNqcP0OtKpDDO-sXW9j20E,8385
373
+ zrb-1.6.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
374
+ zrb-1.6.0.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
375
+ zrb-1.6.0.dist-info/RECORD,,
@@ -1,124 +0,0 @@
1
- from zrb.builtin.group import llm_group
2
- from zrb.builtin.llm.history import read_chat_conversation, write_chat_conversation
3
- from zrb.builtin.llm.input import PreviousSessionInput
4
- from zrb.builtin.llm.tool.api import get_current_location, get_current_weather
5
- from zrb.builtin.llm.tool.cli import run_shell_command
6
- from zrb.builtin.llm.tool.file import (
7
- apply_diff,
8
- list_files,
9
- read_from_file,
10
- search_files,
11
- write_to_file,
12
- )
13
- from zrb.builtin.llm.tool.web import (
14
- create_search_internet_tool,
15
- open_web_page,
16
- search_arxiv,
17
- search_wikipedia,
18
- )
19
- from zrb.config import (
20
- LLM_ALLOW_ACCESS_INTERNET,
21
- LLM_ALLOW_ACCESS_LOCAL_FILE,
22
- LLM_ALLOW_ACCESS_SHELL,
23
- SERP_API_KEY,
24
- )
25
- from zrb.input.bool_input import BoolInput
26
- from zrb.input.str_input import StrInput
27
- from zrb.input.text_input import TextInput
28
- from zrb.task.llm_task import LLMTask
29
-
30
- llm_chat: LLMTask = llm_group.add_task(
31
- LLMTask(
32
- name="llm-chat",
33
- input=[
34
- StrInput(
35
- "model",
36
- description="LLM Model",
37
- prompt="LLM Model",
38
- default="",
39
- allow_positional_parsing=False,
40
- always_prompt=False,
41
- allow_empty=True,
42
- ),
43
- StrInput(
44
- "base-url",
45
- description="LLM API Base URL",
46
- prompt="LLM API Base URL",
47
- default="",
48
- allow_positional_parsing=False,
49
- always_prompt=False,
50
- allow_empty=True,
51
- ),
52
- StrInput(
53
- "api-key",
54
- description="LLM API Key",
55
- prompt="LLM API Key",
56
- default="",
57
- allow_positional_parsing=False,
58
- always_prompt=False,
59
- allow_empty=True,
60
- ),
61
- TextInput(
62
- "system-prompt",
63
- description="System prompt",
64
- prompt="System prompt",
65
- default="",
66
- allow_positional_parsing=False,
67
- always_prompt=False,
68
- ),
69
- BoolInput(
70
- "start-new",
71
- description="Start new conversation (LLM will forget everything)",
72
- prompt="Start new conversation (LLM will forget everything)",
73
- default=False,
74
- allow_positional_parsing=False,
75
- always_prompt=False,
76
- ),
77
- TextInput("message", description="User message", prompt="Your message"),
78
- PreviousSessionInput(
79
- "previous-session",
80
- description="Previous conversation session",
81
- prompt="Previous conversation session (can be empty)",
82
- allow_positional_parsing=False,
83
- allow_empty=True,
84
- always_prompt=False,
85
- ),
86
- ],
87
- model=lambda ctx: None if ctx.input.model.strip() == "" else ctx.input.model,
88
- model_base_url=lambda ctx: (
89
- None if ctx.input.base_url.strip() == "" else ctx.input.base_url
90
- ),
91
- model_api_key=lambda ctx: (
92
- None if ctx.input.api_key.strip() == "" else ctx.input.api_key
93
- ),
94
- conversation_history_reader=read_chat_conversation,
95
- conversation_history_writer=write_chat_conversation,
96
- description="💬 Chat with LLM",
97
- system_prompt=lambda ctx: (
98
- None if ctx.input.system_prompt.strip() == "" else ctx.input.system_prompt
99
- ),
100
- message="{ctx.input.message}",
101
- retries=0,
102
- ),
103
- alias="chat",
104
- )
105
-
106
-
107
- if LLM_ALLOW_ACCESS_LOCAL_FILE:
108
- llm_chat.add_tool(list_files)
109
- llm_chat.add_tool(read_from_file)
110
- llm_chat.add_tool(write_to_file)
111
- llm_chat.add_tool(search_files)
112
- llm_chat.add_tool(apply_diff)
113
-
114
- if LLM_ALLOW_ACCESS_SHELL:
115
- llm_chat.add_tool(run_shell_command)
116
-
117
- if LLM_ALLOW_ACCESS_INTERNET:
118
- llm_chat.add_tool(open_web_page)
119
- llm_chat.add_tool(search_wikipedia)
120
- llm_chat.add_tool(search_arxiv)
121
- if SERP_API_KEY != "":
122
- llm_chat.add_tool(create_search_internet_tool(SERP_API_KEY))
123
- llm_chat.add_tool(get_current_location)
124
- llm_chat.add_tool(get_current_weather)
File without changes