zrb 1.8.10__py3-none-any.whl → 1.8.11__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.
@@ -127,13 +127,13 @@ llm_group.add_task(
127
127
 
128
128
  if CFG.LLM_ALLOW_ACCESS_LOCAL_FILE:
129
129
  llm_ask.append_tool(
130
+ analyze_repo,
131
+ analyze_file,
132
+ search_files,
130
133
  list_files,
131
134
  read_from_file,
132
- write_to_file,
133
- search_files,
134
135
  apply_diff,
135
- analyze_file,
136
- analyze_repo,
136
+ write_to_file,
137
137
  )
138
138
 
139
139
  if CFG.LLM_ALLOW_ACCESS_SHELL:
@@ -86,8 +86,7 @@ async def analyze_repo(
86
86
  summarization_token_limit: int = 30000,
87
87
  ) -> str:
88
88
  """
89
- Extract and summarize information from a directory that probably
90
- contains a large resources.
89
+ Extract and summarize information from any directory.
91
90
  You should state the goal specifically so that the tool can return relevant informations.
92
91
  Use this tool for:
93
92
  - summarization
@@ -42,7 +42,7 @@ async def open_web_page(url: str) -> str:
42
42
  return {"content": content, "links_on_page": links}
43
43
  finally:
44
44
  await browser.close()
45
- except ImportError:
45
+ except BaseException:
46
46
  import requests
47
47
 
48
48
  response = requests.get(url, headers={"User-Agent": user_agent})
zrb/llm_config.py CHANGED
@@ -69,14 +69,8 @@ DEFAULT_SPECIAL_INSTRUCTION_PROMPT = (
69
69
  "is clean.\n"
70
70
  "2. **Halt if Dirty:** If the directory is not clean, STOP. Inform the "
71
71
  "user and wait for their instructions.\n"
72
- "3. **Propose and Confirm Branch:**\n"
73
- " - Tell the user you need to create a new branch and propose a "
74
- "name.\n"
75
- " - Example: 'I will create a branch named `feature/add-user-login`. "
76
- "Is this okay?'\n"
77
- " - **Wait for the user to say 'yes' or approve.**\n"
78
- "4. **Execute on Branch:** Once the user confirms, create the branch and "
79
- "perform all your work and commits there.\n\n"
72
+ "3. **Create a New Branch:** Create a new branch and inform the user.\n"
73
+ "4. **Execute on Branch:** Perform all your work and commits there.\n\n"
80
74
  "**4. Debugging Protocol**\n"
81
75
  "1. **Hypothesize:** State the most likely cause of the bug in one "
82
76
  "sentence.\n"
zrb/llm_rate_limitter.py CHANGED
@@ -88,6 +88,7 @@ class LLMRateLimiter:
88
88
  prompt_parts = prompt.split(" ")
89
89
  last_part_index = len(prompt_parts) - 2
90
90
  clipped_prompt = " ".join(prompt_parts[:last_part_index])
91
+ clipped_prompt += "(Content clipped...)"
91
92
  token_count = self.count_token(clipped_prompt)
92
93
  if token_count < limit:
93
94
  return clipped_prompt
zrb/task/llm_task.py CHANGED
@@ -357,7 +357,7 @@ class LLMTask(BaseTask):
357
357
  if xcom_usage_key not in ctx.xcom:
358
358
  ctx.xcom[xcom_usage_key] = Xcom([])
359
359
  usage = agent_run.result.usage()
360
- ctx.xcom.get(xcom_usage_key).push(usage)
360
+ ctx.xcom[xcom_usage_key].push(usage)
361
361
  ctx.print(stylize_faint(f"[Token Usage] {usage}"), plain=True)
362
362
  return agent_run.result.output
363
363
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zrb
3
- Version: 1.8.10
3
+ Version: 1.8.11
4
4
  Summary: Your Automation Powerhouse
5
5
  Home-page: https://github.com/state-alchemists/zrb
6
6
  License: AGPL-3.0-or-later
@@ -12,16 +12,16 @@ zrb/builtin/jwt.py,sha256=3M5uaQhJZbKQLjTUft1OwPz_JxtmK-xtkjxWjciOQho,2859
12
12
  zrb/builtin/llm/chat_session.py,sha256=ot2ss6yA4qIINg0nl3KJYnLag8H0eB9ggAgRGEUkZdE,6639
13
13
  zrb/builtin/llm/history.py,sha256=cnkOyO43uiMQ9cEvmqk-pPoCk1zCAH_fwAqSgBtsjzY,3079
14
14
  zrb/builtin/llm/input.py,sha256=Nw-26uTWp2QhUgKJcP_IMHmtk-b542CCSQ_vCOjhvhM,877
15
- zrb/builtin/llm/llm_ask.py,sha256=ltQlPEItcLW8pSZifUS5Ec9k8OvUo3__8W2MAG9J3IA,4438
15
+ zrb/builtin/llm/llm_ask.py,sha256=QUV29gOAFKiMfJlAKbY9YfGPoxYv-4RPv6p7cWogK4U,4438
16
16
  zrb/builtin/llm/previous-session.js,sha256=xMKZvJoAbrwiyHS0OoPrWuaKxWYLoyR5sguePIoCjTY,816
17
17
  zrb/builtin/llm/tool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  zrb/builtin/llm/tool/api.py,sha256=yR9I0ZsI96OeQl9pgwORMASVuXsAL0a89D_iPS4C8Dc,1699
19
19
  zrb/builtin/llm/tool/cli.py,sha256=_CNEmEc6K2Z0i9ppYeM7jGpqaEdT3uxaWQatmxP3jKE,858
20
- zrb/builtin/llm/tool/code.py,sha256=gvRnimUh5kWqmpiYtJvEm6KDZhQArqhwAAkKI1_UapY,8133
20
+ zrb/builtin/llm/tool/code.py,sha256=q6YrVJkRJg4AQpnK2KHE6AEMo8nMbRN4XUZ3QtMI_Og,8090
21
21
  zrb/builtin/llm/tool/file.py,sha256=ufLCAaHB0JkEAqQS4fbM9OaTfLluqlCuSyMmnYhI0rY,18491
22
22
  zrb/builtin/llm/tool/rag.py,sha256=yqx7vXXyrOCJjhQJl4s0TnLL-2uQUTuKRnkWlSQBW0M,7883
23
23
  zrb/builtin/llm/tool/sub_agent.py,sha256=GPHD8hLlIfme0h1Q0zzMUuAc2HiKl8CRqWGNcgE_H1Q,4764
24
- zrb/builtin/llm/tool/web.py,sha256=pXRLhcB_Y6z-2w4C4WezH8n-pg3PSMgt_bwn3aaqi6g,5479
24
+ zrb/builtin/llm/tool/web.py,sha256=GYp6e_eaw-dj7MDpB4CP1fplUbfguuJawem9lPJM9TY,5481
25
25
  zrb/builtin/md5.py,sha256=690RV2LbW7wQeTFxY-lmmqTSVEEZv3XZbjEUW1Q3XpE,1480
26
26
  zrb/builtin/project/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  zrb/builtin/project/add/fastapp/fastapp_input.py,sha256=MKlWR_LxWhM_DcULCtLfL_IjTxpDnDBkn9KIqNmajFs,310
@@ -246,8 +246,8 @@ zrb/input/option_input.py,sha256=TQB82ko5odgzkULEizBZi0e9TIHEbIgvdP0AR3RhA74,213
246
246
  zrb/input/password_input.py,sha256=szBojWxSP9QJecgsgA87OIYwQrY2AQ3USIKdDZY6snU,1465
247
247
  zrb/input/str_input.py,sha256=NevZHX9rf1g8eMatPyy-kUX3DglrVAQpzvVpKAzf7bA,81
248
248
  zrb/input/text_input.py,sha256=6T3MngWdUs0u0ZVs5Dl11w5KS7nN1RkgrIR_zKumzPM,3695
249
- zrb/llm_config.py,sha256=7xp4mhre3ULSzfyuqinXXMigNOYNcemVEgPIiWTNdMk,16875
250
- zrb/llm_rate_limitter.py,sha256=rFYJU2ngo1Hk3aSODsgFIpANI95qZydUvZ4WHOmdbHQ,4376
249
+ zrb/llm_config.py,sha256=pXWHp-7WcAF3s5Gec8IBqoC_l3aRvU3aGt2Yr96SxGo,16607
250
+ zrb/llm_rate_limitter.py,sha256=uM9zmSgV10fQq1dlaDGLDrv72uLj6ldBxMoGjO2Az14,4429
251
251
  zrb/runner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
252
252
  zrb/runner/cli.py,sha256=AbLTNqFy5FuyGQOWOjHZGaBC8e2yuE_Dx1sBdnisR18,6984
253
253
  zrb/runner/common_util.py,sha256=JDMcwvQ8cxnv9kQrAoKVLA40Q1omfv-u5_d5MvvwHeE,1373
@@ -348,7 +348,7 @@ zrb/task/llm/print_node.py,sha256=bpISOUxSH_JBLR-4Nq6-iLrzNWFagrKFX6u8ogYYMw8,43
348
348
  zrb/task/llm/prompt.py,sha256=zBo3xT3YPX_A4_t8Cd-QjNqQZl9dsoWMTt-NdytI2f4,3827
349
349
  zrb/task/llm/tool_wrapper.py,sha256=Xygd4VCY3ykjVv63pqlTI16ZG41ySkp683_5VTnL-Zo,6481
350
350
  zrb/task/llm/typing.py,sha256=c8VAuPBw_4A3DxfYdydkgedaP-LU61W9_wj3m3CAX1E,58
351
- zrb/task/llm_task.py,sha256=R-VBzESfuzo4RxbtvXd3XBhHoWe8PEDiuNmKe_93wEo,15934
351
+ zrb/task/llm_task.py,sha256=fRzvyso0OpDlwVVwRdib2Cq3dppEszOc9DIm50dDdhk,15930
352
352
  zrb/task/make_task.py,sha256=PD3b_aYazthS8LHeJsLAhwKDEgdurQZpymJDKeN60u0,2265
353
353
  zrb/task/rsync_task.py,sha256=GSL9144bmp6F0EckT6m-2a1xG25AzrrWYzH4k3SVUKM,6370
354
354
  zrb/task/scaffolder.py,sha256=rME18w1HJUHXgi9eTYXx_T2G4JdqDYzBoNOkdOOo5-o,6806
@@ -390,7 +390,7 @@ zrb/util/string/name.py,sha256=SXEfxJ1-tDOzHqmSV8kvepRVyMqs2XdV_vyoh_9XUu0,1584
390
390
  zrb/util/todo.py,sha256=VGISej2KQZERpornK-8X7bysp4JydMrMUTnG8B0-liI,20708
391
391
  zrb/xcom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
392
392
  zrb/xcom/xcom.py,sha256=o79rxR9wphnShrcIushA0Qt71d_p3ZTxjNf7x9hJB78,1571
393
- zrb-1.8.10.dist-info/METADATA,sha256=cFdiCmF4a4s7-jxcMZtXxhjG8L4hZO8-YBw_DecGSQQ,10108
394
- zrb-1.8.10.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
395
- zrb-1.8.10.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
396
- zrb-1.8.10.dist-info/RECORD,,
393
+ zrb-1.8.11.dist-info/METADATA,sha256=BxzTycMW2mrqcOCsi4k9Z_672xnzwp4IkYPpGrKrkn8,10108
394
+ zrb-1.8.11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
395
+ zrb-1.8.11.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
396
+ zrb-1.8.11.dist-info/RECORD,,
File without changes