zrb 1.10.1__py3-none-any.whl → 1.10.2__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.
zrb/config/llm_config.py CHANGED
@@ -83,7 +83,7 @@ _DEFAULT_SYSTEM_PROMPT = (
83
83
  ).strip()
84
84
 
85
85
  _DEFAULT_SPECIAL_INSTRUCTION_PROMPT = (
86
- "## Guiding Principles\n"
86
+ "# Guiding Principles\n"
87
87
  "- **Clarify and Scope First:** Before undertaking any complex task (like "
88
88
  "writing a new feature or a large test suite), you MUST ensure the request "
89
89
  "is not ambiguous. If it is, ask clarifying questions. Propose a concise "
@@ -97,7 +97,7 @@ _DEFAULT_SPECIAL_INSTRUCTION_PROMPT = (
97
97
  "conventions.\n"
98
98
  "- **Efficiency:** Use your tools to get the job done with the minimum "
99
99
  "number of steps. Combine commands where possible.\n\n"
100
- "## Critical Prohibitions\n"
100
+ "# Critical Prohibitions\n"
101
101
  "- **NEVER Assume Dependencies:** Do not use a library or framework unless "
102
102
  "you have first verified it is an existing project dependency (e.g., in "
103
103
  "`package.json`, `requirements.txt`).\n"
@@ -108,7 +108,7 @@ _DEFAULT_SPECIAL_INSTRUCTION_PROMPT = (
108
108
  "- **NEVER Commit Without Verification:** Do not use `git commit` until you "
109
109
  "have staged the changes and run the project's own verification steps "
110
110
  "(tests, linter, build).\n\n"
111
- "## Common Task Workflows\n\n"
111
+ "# Common Task Workflows\n\n"
112
112
  "**File System Operations:**\n"
113
113
  "1. **Analyze:** Before modifying, read the file or list the "
114
114
  "directory.\n"
@@ -160,7 +160,7 @@ _DEFAULT_SPECIAL_INSTRUCTION_PROMPT = (
160
160
  "reputable sources.\n"
161
161
  "3. **Synthesize & Cite:** Present the information clearly. For factual "
162
162
  "claims, cite the source URL.\n\n"
163
- "## Communicating with the User\n"
163
+ "# Communicating with the User\n"
164
164
  "- **Be Concise:** When reporting results, be brief. Focus on the outcome "
165
165
  "and the verification step.\n"
166
166
  "- **Explain 'Why,' Not Just 'What':** For complex changes or bug fixes, "
@@ -81,9 +81,11 @@ class ConversationHistory:
81
81
  return None
82
82
 
83
83
  def fetch_newest_notes(self):
84
+ self.long_term_note = ""
84
85
  long_term_note_path = self._get_long_term_note_path()
85
86
  if os.path.isfile(long_term_note_path):
86
87
  self.long_term_note = read_file(long_term_note_path)
88
+ self.contextual_note = ""
87
89
  contextual_note_path = self._get_contextual_note_path()
88
90
  if os.path.isfile(contextual_note_path):
89
91
  self.contextual_note = read_file(contextual_note_path)
zrb/task/llm/prompt.py CHANGED
@@ -153,16 +153,30 @@ def extract_conversation_context(user_message: str) -> tuple[str, str]:
153
153
  modified_user_message = modified_user_message.replace(f"@{ref}", ref, 1)
154
154
  conversation_context = "\n".join(
155
155
  [
156
- make_prompt_section(
157
- "Current Time", datetime.now(timezone.utc).astimezone().isoformat()
158
- ),
159
- make_prompt_section("Current Working Directory", os.getcwd()),
160
156
  make_prompt_section("Current OS", platform.system()),
161
157
  make_prompt_section("OS Version", platform.version()),
162
158
  make_prompt_section("Python Version", platform.python_version()),
163
159
  make_prompt_section("Apendixes", "\n".join(apendixes)),
164
160
  ]
165
161
  )
162
+ iso_date = datetime.now(timezone.utc).astimezone().isoformat()
163
+ current_directory = os.getcwd()
164
+ modified_user_message = "\n".join(
165
+ [
166
+ make_prompt_section("User Message", modified_user_message),
167
+ make_prompt_section(
168
+ "Context",
169
+ "\n".join(
170
+ [
171
+ make_prompt_section(
172
+ "Current working directory", current_directory
173
+ ),
174
+ make_prompt_section("Current time", iso_date),
175
+ ]
176
+ ),
177
+ ),
178
+ ]
179
+ )
166
180
  return conversation_context, modified_user_message
167
181
 
168
182
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zrb
3
- Version: 1.10.1
3
+ Version: 1.10.2
4
4
  Summary: Your Automation Powerhouse
5
5
  Home-page: https://github.com/state-alchemists/zrb
6
6
  License: AGPL-3.0-or-later
@@ -218,7 +218,7 @@ zrb/cmd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
218
218
  zrb/cmd/cmd_result.py,sha256=L8bQJzWCpcYexIxHBNsXj2pT3BtLmWex0iJSMkvimOA,597
219
219
  zrb/cmd/cmd_val.py,sha256=7Doowyg6BK3ISSGBLt-PmlhzaEkBjWWm51cED6fAUOQ,1014
220
220
  zrb/config/config.py,sha256=vUmJWQHRgmMVL1FmoukjQe9J6vCuyzqBIg4FncREGmw,15108
221
- zrb/config/llm_config.py,sha256=nsJWHToreHjJ84H-qR7qEbhTKsy0O_NhGbsb5kT1538,20818
221
+ zrb/config/llm_config.py,sha256=2UO6a9DxN-WkZ6rwZX8hNEhK_UZjjDeCNCFvADbQaws,20814
222
222
  zrb/config/llm_rate_limitter.py,sha256=P4vR7qxwiGwjlKx2kHcfdIxwGbJB98vdN-UQEH-Q2WU,4894
223
223
  zrb/config/web_auth_config.py,sha256=_PXatQTYh2mX9H3HSYSQKp13zm1RlLyVIoeIr6KYMQ8,6279
224
224
  zrb/content_transformer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -340,11 +340,11 @@ zrb/task/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
340
340
  zrb/task/llm/agent.py,sha256=BZHbz-YXgSdm1tTwGMR_maqcd3yMFGSdzLyDjuxT_XI,6702
341
341
  zrb/task/llm/config.py,sha256=TlyH925_fboIlK2Ixf34tynmenqs9s9rfsnPs4jff78,3490
342
342
  zrb/task/llm/conversation_history.py,sha256=B_PDWYL_q66s0xwWBzMSomqPN6u3gkXlIeXBD5A0Apg,4416
343
- zrb/task/llm/conversation_history_model.py,sha256=Zbz7w0M2FeOklWG4AVz8C2y2AZ87aNMZ5I0YbBanO0Y,16312
343
+ zrb/task/llm/conversation_history_model.py,sha256=xsKo2QtAie_1f7rVIQ6ruaClv1NdkhLbK4Fa9WUGtnM,16379
344
344
  zrb/task/llm/error.py,sha256=QR-nIohS6pBpC_16cWR-fw7Mevo1sNYAiXMBsh_CJDE,4157
345
345
  zrb/task/llm/history_summarization.py,sha256=vY2_iLULgSNTaqW1xJqOhI8oOH3vNEsZn_yNcx6jYX8,8104
346
346
  zrb/task/llm/print_node.py,sha256=zocTKi9gZDxl2I6KNu095TmMc13Yip6SNuWYnswS680,4060
347
- zrb/task/llm/prompt.py,sha256=ARyJ2Q0G6N7I2X2KZfLQW45yj9nmzl5SfX90rrY7TVU,7417
347
+ zrb/task/llm/prompt.py,sha256=TZYoI5MXddhHYnlVNsIjRLdhGwA9eEBVSeGz_Wi31JQ,7833
348
348
  zrb/task/llm/tool_wrapper.py,sha256=8_bL8m_WpRf-pVKSrvQIVqT-m2sUA87a1RBQG13lhp4,6457
349
349
  zrb/task/llm/typing.py,sha256=c8VAuPBw_4A3DxfYdydkgedaP-LU61W9_wj3m3CAX1E,58
350
350
  zrb/task/llm_task.py,sha256=TTYb9FYqZX_OIgDE6q5Z9IVuM6NcsKFeCVIi6ovQDE8,13712
@@ -393,7 +393,7 @@ zrb/util/todo.py,sha256=r9_KYF2-hLKMNjsp6AFK9zivykMrywd-kJ4bCwfdafI,19323
393
393
  zrb/util/todo_model.py,sha256=hhzAX-uFl5rsg7iVX1ULlJOfBtblwQ_ieNUxBWfc-Os,1670
394
394
  zrb/xcom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
395
395
  zrb/xcom/xcom.py,sha256=o79rxR9wphnShrcIushA0Qt71d_p3ZTxjNf7x9hJB78,1571
396
- zrb-1.10.1.dist-info/METADATA,sha256=ggHQjxCiRomL7Z9iErAHhnQF6Hf71MZi0wwukGvetME,9778
397
- zrb-1.10.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
398
- zrb-1.10.1.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
399
- zrb-1.10.1.dist-info/RECORD,,
396
+ zrb-1.10.2.dist-info/METADATA,sha256=0UVwKjfnakRF8kPcW_37rGPJ5sEZwCcEywEOrg5l_D4,9778
397
+ zrb-1.10.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
398
+ zrb-1.10.2.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
399
+ zrb-1.10.2.dist-info/RECORD,,
File without changes