zrb 1.13.1__py3-none-any.whl → 1.13.3__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.
@@ -2,7 +2,7 @@ import fnmatch
2
2
  import json
3
3
  import os
4
4
  import re
5
- from typing import Any, Dict, List, Optional
5
+ from typing import Any, Dict, List, Optional, Tuple
6
6
 
7
7
  from zrb.builtin.llm.tool.sub_agent import create_sub_agent_tool
8
8
  from zrb.config.config import CFG
@@ -507,7 +507,7 @@ def read_many_files(paths: List[str]) -> str:
507
507
  return json.dumps({"results": results})
508
508
 
509
509
 
510
- def write_many_files(files: Dict[str, str]) -> str:
510
+ def write_many_files(files: List[Tuple[str, str]]) -> str:
511
511
  """
512
512
  Writes content to multiple files in a single, atomic operation.
513
513
 
@@ -516,7 +516,7 @@ def write_many_files(files: Dict[str, str]) -> str:
516
516
  Each file's content is completely replaced. If a file does not exist, it will be created. If it exists, its current content will be entirely overwritten. Therefore, you must provide the full, intended content for each file.
517
517
 
518
518
  Args:
519
- files (Dict[str, str]): A dictionary where keys are the file paths and values are the complete contents to be written to those files.
519
+ files (List[Tuple[str, str]]): A list of tuples, where each tuple contains the file path and the complete content to be written to that file.
520
520
 
521
521
  Returns:
522
522
  str: A JSON object summarizing the operation, listing successfully written files and any files that failed, along with corresponding error messages.
@@ -524,7 +524,7 @@ def write_many_files(files: Dict[str, str]) -> str:
524
524
  """
525
525
  success = []
526
526
  errors = {}
527
- for path, content in files.items():
527
+ for path, content in files:
528
528
  try:
529
529
  abs_path = os.path.abspath(os.path.expanduser(path))
530
530
  directory = os.path.dirname(abs_path)
zrb/task/llm/prompt.py CHANGED
@@ -66,13 +66,13 @@ def get_special_instruction_prompt(
66
66
 
67
67
  def get_modes(
68
68
  ctx: AnyContext,
69
- modes_attr: StrAttr | None,
69
+ modes_attr: StrListAttr | None,
70
70
  render_modes: bool,
71
71
  ) -> str:
72
72
  """Gets the modes, prioritizing task-specific, then default."""
73
73
  raw_modes = get_str_list_attr(
74
74
  ctx,
75
- modes_attr,
75
+ [] if modes_attr is None else modes_attr,
76
76
  auto_render=render_modes,
77
77
  )
78
78
  if raw_modes is None:
@@ -85,7 +85,7 @@ def get_modes(
85
85
 
86
86
  def get_workflow_prompt(
87
87
  ctx: AnyContext,
88
- modes_attr: StrAttr | None,
88
+ modes_attr: StrListAttr | None,
89
89
  render_modes: bool,
90
90
  ) -> str:
91
91
  modes = get_modes(ctx, modes_attr, render_modes)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zrb
3
- Version: 1.13.1
3
+ Version: 1.13.3
4
4
  Summary: Your Automation Powerhouse
5
5
  Home-page: https://github.com/state-alchemists/zrb
6
6
  License: AGPL-3.0-or-later
@@ -18,7 +18,7 @@ zrb/builtin/llm/tool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
18
18
  zrb/builtin/llm/tool/api.py,sha256=OhmfLc2TwWKQYIMweGelqb5s4JF4nB-YynbSO4yb_Jk,2342
19
19
  zrb/builtin/llm/tool/cli.py,sha256=dUWZrW2X5J_lONuzR__6-SbewSdi28E3RRuksjd4mWo,1234
20
20
  zrb/builtin/llm/tool/code.py,sha256=GRP_IZAkeL6RIlUm407BQRF992ES57pdzPaQdC5UsJU,8218
21
- zrb/builtin/llm/tool/file.py,sha256=XfTuoQOHmgiAYkfi_1ew2voxOwad5vWTe_3Ww8IeVQY,22274
21
+ zrb/builtin/llm/tool/file.py,sha256=OLg8RfWZOypTxTtK7YzyoZp6O2ITszGTaqos-7c0V-c,22288
22
22
  zrb/builtin/llm/tool/rag.py,sha256=wB74JV7bxs0ec77b_09Z2lPjoR1WzPUvZbuXOdb9Q9g,9675
23
23
  zrb/builtin/llm/tool/sub_agent.py,sha256=9Su64FpNTVeE6O2qgNzo-eo4pcmv8qi_sd_QWLQBXYw,4870
24
24
  zrb/builtin/llm/tool/web.py,sha256=gQlUsmYCJOFJtNjwpjK-xk13LMvrMSpSaFHXUTnIayQ,7090
@@ -356,7 +356,7 @@ zrb/task/llm/default_workflow/researching.md,sha256=KD-aYHFHir6Ti-4FsBBtGwiI0seS
356
356
  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
- zrb/task/llm/prompt.py,sha256=I5gNyNADOcHiRVmqeVFBFL-m1ACTJ0eMv7hZ689UIbs,9710
359
+ zrb/task/llm/prompt.py,sha256=pHYuo4cLzuH9VYk2-PAyxng_l1ItXVZl0llZDQcbnWA,9748
360
360
  zrb/task/llm/tool_wrapper.py,sha256=jfKMAtTzm--HnF6TppOrbkDVsuTOIFRpowQqgwqd-7s,6756
361
361
  zrb/task/llm/typing.py,sha256=c8VAuPBw_4A3DxfYdydkgedaP-LU61W9_wj3m3CAX1E,58
362
362
  zrb/task/llm_task.py,sha256=jVuVeN2ylcPkycUiaTpavkkd1tBLbvcVsjMNN5FMHnk,13536
@@ -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.13.1.dist-info/METADATA,sha256=X6pXCfvT2sWSHLC7gryWYWCOejb9S2EMtiiJwmLzDx4,9777
410
- zrb-1.13.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
411
- zrb-1.13.1.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
412
- zrb-1.13.1.dist-info/RECORD,,
409
+ zrb-1.13.3.dist-info/METADATA,sha256=WhAGmkemQMrm0fxn88gq6bSWUv4KLgruOZTrC_cSmnM,9777
410
+ zrb-1.13.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
411
+ zrb-1.13.3.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
412
+ zrb-1.13.3.dist-info/RECORD,,
File without changes