zrb 1.15.14__py3-none-any.whl → 1.15.16__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.
@@ -1,17 +1,16 @@
1
- You are a memory management AI. Your goal is to curate the conversation history by calling the `update_conversation_memory` tool.
1
+ You are a memory management AI. Your only task is to process the provided conversation history and call the `update_conversation_memory` tool **once**.
2
2
 
3
- Follow these steps precisely:
3
+ Follow these instructions carefully:
4
4
 
5
- **Step 1: Consolidate Conversation Information**
5
+ 1. **Summarize:** Create a concise narrative summary that integrates the `Past Conversation Summary` with the `Recent Conversation`. **This summary must not be more than two paragraphs.**
6
+ 2. **Transcript:** Extract ONLY the last 4 (four) turns of the `Recent Conversation` to serve as the new transcript.
7
+ * **Do not change or shorten the content of these turns, with one exception:** If a tool call returns a very long output, do not include the full output. Instead, briefly summarize the result of the tool call.
8
+ * Ensure the timestamp format is `[YYYY-MM-DD HH:MM:SS UTC+Z] Role: Message/Tool name being called`.
9
+ 3. **Notes:** Review the `Notes` and `Recent Conversation` to identify new or updated facts.
10
+ * Update `long_term_note` with global facts about the user.
11
+ * Update `contextual_note` with facts specific to the current project/directory.
12
+ * **CRITICAL:** When updating `contextual_note`, you MUST determine the correct `context_path`. For example, if a fact was established when the working directory was `/app`, the `context_path` MUST be `/app`.
13
+ * **CRITICAL:** Note content must be **brief**, raw, unformatted text, not a log of events. Only update notes if information has changed.
14
+ 4. **Update Memory:** Call the `update_conversation_memory` tool with all the information you consolidated.
6
15
 
7
- 1. Create a concise narrative summary that integrates the `Past Conversation Summary` with the `Recent Conversation`.
8
- 2. Extract ONLY the last 4 (four) turns of the `Recent Conversation` to serve as the new transcript. Do not change or shorten the content of these turns. Ensure the timestamp format is `[YYYY-MM-DD HH:MM:SS UTC+Z] Role: Message/Tool name being called`.
9
- 3. Review the `Notes` and the `Recent Conversation` to identify any new or updated facts.
10
- * Update global facts about the user or their preferences for the `long_term_note`.
11
- * Update facts specific to the current project or directory for the `contextual_note`.
12
- * **CRITICAL:** When updating `contextual_note`, you MUST determine the correct `context_path` by analyzing the `Recent Conversation`. For example, if a fact was established when the working directory was `/app`, the `context_path` MUST be `/app`.
13
- * **CRITICAL:** The content for notes must be raw, unformatted text. Do not use Markdown. Notes should be timeless facts, not a log of events. Only update notes if the information has actually changed.
14
-
15
- **Step 2: Update Memory**
16
-
17
- 1. Call the `update_conversation_memory` tool ONCE, providing all the information you consolidated in Step 1 as arguments.
16
+ After you have called the tool, your task is complete. Your final output **MUST** be the single word `OK`. Do not add any other text, formatting, or tool calls.
zrb/input/base_input.py CHANGED
@@ -96,11 +96,19 @@ class BaseInput(AnyInput):
96
96
  if default_str != "":
97
97
  prompt_message = f"{prompt_message} [{default_str}]"
98
98
  print(f"{prompt_message}: ", end="")
99
- value = input()
99
+ value = self._read_line(shared_ctx)
100
100
  if value.strip() == "":
101
101
  value = default_str
102
102
  return value
103
103
 
104
+ def _read_line(self, shared_ctx: AnySharedContext) -> str:
105
+ if not shared_ctx.is_tty:
106
+ return input()
107
+ from prompt_toolkit import PromptSession
108
+
109
+ reader = PromptSession()
110
+ return reader.prompt()
111
+
104
112
  def get_default_str(self, shared_ctx: AnySharedContext) -> str:
105
113
  """Get default value as str"""
106
114
  default_value = get_attr(
zrb/task/llm/agent.py CHANGED
@@ -185,7 +185,7 @@ async def _run_single_agent_iteration(
185
185
  agent_payload = _estimate_request_payload(
186
186
  agent, user_prompt, attachments, history_list
187
187
  )
188
- callback = lambda: _print_throttle_notif(ctx)
188
+ callback = _create_print_throttle_notif(ctx)
189
189
  if rate_limitter:
190
190
  await rate_limitter.throttle(agent_payload, callback)
191
191
  else:
@@ -216,8 +216,11 @@ async def _run_single_agent_iteration(
216
216
  return agent_run
217
217
 
218
218
 
219
- def _print_throttle_notif(ctx: AnyContext):
220
- ctx.print(stylize_faint(" ⌛>> Request Throttled"), plain=True)
219
+ def _create_print_throttle_notif(ctx: AnyContext) -> Callable[[], None]:
220
+ def _print_throttle_notif(ctx: AnyContext):
221
+ ctx.print(stylize_faint(" ⌛>> Request Throttled"), plain=True)
222
+
223
+ return _print_throttle_notif
221
224
 
222
225
 
223
226
  def _estimate_request_payload(
@@ -48,6 +48,12 @@ async def print_node(
48
48
  _format_stream_content(content_delta, log_indent_level),
49
49
  end="",
50
50
  )
51
+ elif isinstance(event.delta, ThinkingPartDelta):
52
+ content_delta = event.delta.content_delta
53
+ print_func(
54
+ _format_stream_content(content_delta, log_indent_level),
55
+ end="",
56
+ )
51
57
  elif isinstance(event.delta, ToolCallPartDelta):
52
58
  args_delta = event.delta.args_delta
53
59
  print_func(
@@ -71,7 +77,10 @@ async def print_node(
71
77
  print_func("") # ensure newline consistency
72
78
  print_func(
73
79
  _format_content(
74
- f"⚠️ Unexpected Model Behavior: {e}. node_id={meta}",
80
+ (
81
+ f"⚠️ Unexpected Model Behavior: {e}. "
82
+ f"Cause: {e.__cause__}. Node.Id: {meta}"
83
+ ),
75
84
  log_indent_level,
76
85
  )
77
86
  )
@@ -102,7 +111,10 @@ async def print_node(
102
111
  print_func("") # ensure newline consistency
103
112
  print_func(
104
113
  _format_content(
105
- f"⚠️ Unexpected Model Behavior: {e}. node_id={meta}",
114
+ (
115
+ f"⚠️ Unexpected Model Behavior: {e}. "
116
+ f"Cause: {e.__cause__}. Node.Id: {meta}"
117
+ ),
106
118
  log_indent_level,
107
119
  )
108
120
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: zrb
3
- Version: 1.15.14
3
+ Version: 1.15.16
4
4
  Summary: Your Automation Powerhouse
5
5
  License: AGPL-3.0-or-later
6
6
  Keywords: Automation,Task Runner,Code Generator,Monorepo,Low Code
@@ -26,7 +26,7 @@ Requires-Dist: markdownify (>=1.2.0,<2.0.0)
26
26
  Requires-Dist: pdfplumber (>=0.11.7,<0.12.0)
27
27
  Requires-Dist: playwright (>=1.54.0,<2.0.0) ; extra == "playwright" or extra == "all"
28
28
  Requires-Dist: psutil (>=7.0.0,<8.0.0)
29
- Requires-Dist: pydantic-ai-slim[anthropic,bedrock,cli,cohere,google,groq,huggingface,mcp,mistral,openai,vertexai] (>=0.7.5,<0.8.0)
29
+ Requires-Dist: pydantic-ai-slim[anthropic,bedrock,cli,cohere,google,groq,huggingface,mcp,mistral,openai,vertexai] (>=0.8.0,<0.9.0)
30
30
  Requires-Dist: pyjwt (>=2.10.1,<3.0.0)
31
31
  Requires-Dist: python-dotenv (>=1.1.1,<2.0.0)
32
32
  Requires-Dist: python-jose[cryptography] (>=3.5.0,<4.0.0)
@@ -223,7 +223,7 @@ zrb/config/default_prompt/interactive_system_prompt.md,sha256=XvXI51dMpQmuuYah_L
223
223
  zrb/config/default_prompt/persona.md,sha256=GfUJ4-Mlf_Bm1YTzxFNkPkdVbAi06ZDVYh-iIma3NOs,253
224
224
  zrb/config/default_prompt/repo_extractor_system_prompt.md,sha256=EGZ-zj78RlMEg2jduRBs8WzO4VJTkXHR96IpBepZMsY,3881
225
225
  zrb/config/default_prompt/repo_summarizer_system_prompt.md,sha256=RNy37Wg7ibXj3DlsFKaYvgMpMS-lyXlM1LZlc59_4ic,2009
226
- zrb/config/default_prompt/summarization_prompt.md,sha256=GMqbw7mmDWQf7rhnJcJjXQFtGu7nVYIZfK6sStJ4coc,1472
226
+ zrb/config/default_prompt/summarization_prompt.md,sha256=vbxzJGeH7uCdgnfbVt3GYOjY-BygmeRfJ6tnzXmFdoY,1698
227
227
  zrb/config/default_prompt/system_prompt.md,sha256=gEb6N-cFg6VvOV-7ZffNwVt39DavAGesMqn9u0epbRc,2282
228
228
  zrb/config/llm_config.py,sha256=xt-Xf8ZuNoUT_GKCSFz5yy0BhbeHzxP-jrezB06WeiY,8857
229
229
  zrb/config/llm_context/config.py,sha256=TPQX_kU772r0AHmVFeo1WGLDAidacT-qDyuMWxY_avg,5878
@@ -250,7 +250,7 @@ zrb/group/any_group.py,sha256=sdUk82YRuJBMwDhD_b-vJ3v-Yxz8K7LFW52TM19k3HI,1242
250
250
  zrb/group/group.py,sha256=t5JnXlrLfthFfqmkVdRLKCIyms4JqsthcTODVncSmPk,4312
251
251
  zrb/input/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
252
252
  zrb/input/any_input.py,sha256=3EQgg2Qk_2t2Ege_4pHV2G95tV3XAIThLLuFZ6uV6oM,1051
253
- zrb/input/base_input.py,sha256=Rb2m9xLJgGDph2D8L9HnLFPtQZqmPAPKrSP2K4pK97A,3848
253
+ zrb/input/base_input.py,sha256=oK8lm2UsPe859I8TzmvIhN8a4GZR78BMZuhhVt_GqGI,4107
254
254
  zrb/input/bool_input.py,sha256=9ir8aTm8zaufrJ84_EerC5vOjyn4hHZ3BiLzFqPgPFM,1839
255
255
  zrb/input/float_input.py,sha256=8G9lJKLlb_Upk9m5pBF9JwqlAAiYJLrbIItLnyzPxpg,1475
256
256
  zrb/input/int_input.py,sha256=UhxCFYlZdJcgUSGGEkz301zOgRVpK0KDG_IxxWpQfMU,1457
@@ -346,7 +346,7 @@ zrb/task/base_trigger.py,sha256=WSGcmBcGAZw8EzUXfmCjqJQkz8GEmi1RzogpF6A1V4s,6902
346
346
  zrb/task/cmd_task.py,sha256=myM8WZm6NrUD-Wv0Vb5sTOrutrAVZLt5LVsSBKwX6SM,10860
347
347
  zrb/task/http_check.py,sha256=Gf5rOB2Se2EdizuN9rp65HpGmfZkGc-clIAlHmPVehs,2565
348
348
  zrb/task/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
349
- zrb/task/llm/agent.py,sha256=jfC90N8oER2z-fTmPEuWH3ASPgw5t8cZm8rk98HBBlw,8876
349
+ zrb/task/llm/agent.py,sha256=-DVECvW3nLQNmppkD9DStG6L_VUaUUAJb2iMmd-JB90,8990
350
350
  zrb/task/llm/config.py,sha256=n1SPmwab09K2i1sL_OCwrEOWHI0Owx_hvWelg3Dreus,3781
351
351
  zrb/task/llm/conversation_history.py,sha256=oMdKUV2__mBZ4znnA-prl-gfyoleKC8Nj5KNpmLQJ4o,6764
352
352
  zrb/task/llm/conversation_history_model.py,sha256=kk-7niTl29Rm2EUIhTHzPXgZ5tp4IThMnIB3dS-1OdU,3062
@@ -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=UIT8bpdT3hy1xn559waDLFWZlNtIqdIpIvRGcZEpHm0,8057
358
358
  zrb/task/llm/history_summarization_tool.py,sha256=Wazi4WMr3k1WJ1v7QgjAPbuY1JdBpHUsTWGt3DSTsLc,1706
359
- zrb/task/llm/print_node.py,sha256=fNTL0LtoZBQQPHYCAUaOFP97nNNfobPXvY2RlxewQCE,7556
359
+ zrb/task/llm/print_node.py,sha256=si619OvCUZJYTUSUpoOqVAgLSu1BGw-dlBq02MSD7FE,8096
360
360
  zrb/task/llm/prompt.py,sha256=FGXWYHecWtrNNkPnjg-uhnkqp7fYt8V91-AjFM_5fpA,11550
361
361
  zrb/task/llm/tool_wrapper.py,sha256=IavXwW9C0ojI3ivGDY8j7XbMJE_NTJeI86TVbHNRwJ0,9684
362
362
  zrb/task/llm/typing.py,sha256=c8VAuPBw_4A3DxfYdydkgedaP-LU61W9_wj3m3CAX1E,58
@@ -409,7 +409,7 @@ zrb/util/todo_model.py,sha256=hhzAX-uFl5rsg7iVX1ULlJOfBtblwQ_ieNUxBWfc-Os,1670
409
409
  zrb/util/truncate.py,sha256=eSzmjBpc1Qod3lM3M73snNbDOcARHukW_tq36dWdPvc,921
410
410
  zrb/xcom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
411
411
  zrb/xcom/xcom.py,sha256=o79rxR9wphnShrcIushA0Qt71d_p3ZTxjNf7x9hJB78,1571
412
- zrb-1.15.14.dist-info/METADATA,sha256=UzPUFFhPCo01R3K87PDAMkPGMi_0mGYliiKr0zPFDSs,9775
413
- zrb-1.15.14.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
414
- zrb-1.15.14.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
415
- zrb-1.15.14.dist-info/RECORD,,
412
+ zrb-1.15.16.dist-info/METADATA,sha256=7XfExXjX7pcW0SzAEoDwJQ1WXa02JfM6JyIddL9n96k,9775
413
+ zrb-1.15.16.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
414
+ zrb-1.15.16.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
415
+ zrb-1.15.16.dist-info/RECORD,,
File without changes