zrb 1.8.1__py3-none-any.whl → 1.8.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.py CHANGED
@@ -14,7 +14,7 @@ _DEFAULT_BANNER = """
14
14
  zzzzz rr bbbbbb {VERSION} Janggala
15
15
  _ _ . . . _ . _ . . .
16
16
  Your Automation Powerhouse
17
- ☕ Donate at: https://stalchmst.com/donation
17
+ ☕ Donate at: https://stalchmst.com
18
18
  🐙 Submit issues/PR at: https://github.com/state-alchemists/zrb
19
19
  🐤 Follow us at: https://twitter.com/zarubastalchmst
20
20
  """
@@ -229,10 +229,6 @@ class Config:
229
229
  def LLM_PERSONA(self) -> str | None:
230
230
  return os.getenv("ZRB_LLM_PERSONA", None)
231
231
 
232
- @property
233
- def LLM_CODE_REVIEW_INSTRUCTION_PROMPT(self) -> str | None:
234
- return os.getenv("ZRB_LLM_CODE_REVIEW_INSTRUCTION_PROMPT", None)
235
-
236
232
  @property
237
233
  def LLM_SPECIAL_INSTRUCTION_PROMPT(self) -> str | None:
238
234
  return os.getenv("ZRB_LLM_SPECIAL_INSTRUCTION_PROMPT", None)
zrb/llm_config.py CHANGED
@@ -51,9 +51,9 @@ another JSON object with these details (i.e., {"response": {"context_name": "val
51
51
  If no context can be extracted, return {"response": {}}.
52
52
  """.strip()
53
53
 
54
- DEFAULT_SPECIAL_INSTRUCTION_PROMPT = "" # Default to empty
55
- DEFAULT_CODE_REVIEW_INSTRUCTION_PROMPT = """
56
- Your goal is to review code provided by the user for correctness, readability,
54
+ DEFAULT_SPECIAL_INSTRUCTION_PROMPT = """
55
+ # Coding and Code Review
56
+ When asked to do coding/code review related task, you prioritize correctness, readability,
57
57
  performance, security, and maintainability.
58
58
  Follow these principles:
59
59
  1. **Correctness** Check whether the code performs the intended logic,
@@ -66,9 +66,10 @@ Follow these principles:
66
66
  that could lead to security issues.
67
67
  5. **Consistency** Ensure the code adheres to common language idioms,
68
68
  style guides, and project conventions.
69
- Provide clear, concise, and actionable feedback.
70
- Use inline code examples when helpful.
71
- Do not restate the code unnecessarily.
69
+
70
+ ## Code Review
71
+ When asked to do code review, you provide clear, concise, and actionable feedback.
72
+ Use inline code examples when helpful. Do not restate the code unnecessarily.
72
73
  Focus on meaningful insights that help the user improve the code quality.
73
74
  Avoid excessive nitpicking unless requested.
74
75
  """.strip()
@@ -84,7 +85,6 @@ class LLMConfig:
84
85
  default_persona: str | None = None,
85
86
  default_system_prompt: str | None = None,
86
87
  default_special_instruction_prompt: str | None = None,
87
- default_code_review_instruction_prompt: str | None = None,
88
88
  default_summarization_prompt: str | None = None,
89
89
  default_context_enrichment_prompt: str | None = None,
90
90
  default_summarize_history: bool | None = None,
@@ -101,9 +101,6 @@ class LLMConfig:
101
101
  self._default_persona = default_persona
102
102
  self._default_system_prompt = default_system_prompt
103
103
  self._default_special_instruction_prompt = default_special_instruction_prompt
104
- self._default_code_review_instruction_prompt = (
105
- default_code_review_instruction_prompt
106
- )
107
104
  self._default_summarization_prompt = default_summarization_prompt
108
105
  self._default_context_enrichment_prompt = default_context_enrichment_prompt
109
106
  self._default_summarize_history = default_summarize_history
@@ -175,14 +172,6 @@ class LLMConfig:
175
172
  return CFG.LLM_PERSONA
176
173
  return DEFAULT_PERSONA
177
174
 
178
- @property
179
- def default_code_review_instruction_prompt(self) -> str:
180
- if self._default_code_review_instruction_prompt is not None:
181
- return self._default_code_review_instruction_prompt
182
- if CFG.LLM_CODE_REVIEW_INSTRUCTION_PROMPT is not None:
183
- return CFG.LLM_CODE_REVIEW_INSTRUCTION_PROMPT
184
- return DEFAULT_CODE_REVIEW_INSTRUCTION_PROMPT
185
-
186
175
  @property
187
176
  def default_special_instruction_prompt(self) -> str:
188
177
  if self._default_special_instruction_prompt is not None:
zrb/task/llm/prompt.py CHANGED
@@ -52,19 +52,7 @@ def get_special_instruction_prompt(
52
52
  )
53
53
  if special_instruction is not None:
54
54
  return special_instruction
55
- aggregated_special_instruction = ""
56
- if llm_config.default_code_review_instruction_prompt:
57
- aggregated_special_instruction += "\n".join(
58
- [
59
- "# Code review instruction",
60
- llm_config.default_code_review_instruction_prompt,
61
- ]
62
- )
63
- if llm_config.default_special_instruction_prompt:
64
- aggregated_special_instruction += "\n" + "\n".join(
65
- ["# Code review instruction", llm_config.default_special_instruction_prompt]
66
- )
67
- return aggregated_special_instruction or ""
55
+ return llm_config.default_special_instruction_prompt
68
56
 
69
57
 
70
58
  def get_combined_system_prompt(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zrb
3
- Version: 1.8.1
3
+ Version: 1.8.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
@@ -194,6 +194,32 @@ Then open your browser and visit `http://localhost:21213`
194
194
  ![Zrb Web UI](https://raw.githubusercontent.com/state-alchemists/zrb/main/_images/zrb-web-ui.png)
195
195
 
196
196
 
197
+ # 🐋 As Container
198
+
199
+ Zrb has two version of container:
200
+ - The normal version
201
+ - The dind (Docker in Docker) version
202
+
203
+ The dind version has builtin docker command, and is suitable to access host's docker CLI command.
204
+
205
+ To run the normal version, you can execute:
206
+
207
+ ```bash
208
+ # docker run -v <host-path>:<container-path> -it stalchmst/zrb:<version> <command>
209
+ docker run -v ${HOME}:/zrb-home -it --rm stalchmst/zrb:1.8.1 zrb
210
+ ```
211
+
212
+ While to run the dind version, you can execute:
213
+
214
+ ```bash
215
+ # docker run -v <host-path>:<container-path> -it stalchmst/zrb:<version>-dind <command>
216
+ docker run \
217
+ -v ${HOME}:/zrb-home \
218
+ -v /var/run/docker.sock:/var/run/docker.sock \
219
+ -it --rm stalchmst/zrb:1.8.1-dind docker ps
220
+ ```
221
+
222
+
197
223
  # 🎥 Demo & Documentation
198
224
 
199
225
  - **Full documentation:** [Zrb Documentation](https://github.com/state-alchemists/zrb/blob/main/docs/README.md)
@@ -214,7 +240,7 @@ Then open your browser and visit `http://localhost:21213`
214
240
 
215
241
  If you find Zrb valuable, please consider donating:
216
242
 
217
- [![](https://raw.githubusercontent.com/state-alchemists/zrb/main/_images/donator.png)](https://stalchmst.com/donation)
243
+ [![](https://raw.githubusercontent.com/state-alchemists/zrb/main/_images/donator.png)](https://stalchmst.com)
218
244
 
219
245
  # 🎉 Fun Fact
220
246
 
@@ -216,7 +216,7 @@ zrb/callback/callback.py,sha256=mk_RIHuWi-oP5b81jfhzU6fruhsIjhRtKpwh2yYmsiM,3876
216
216
  zrb/cmd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
217
217
  zrb/cmd/cmd_result.py,sha256=L8bQJzWCpcYexIxHBNsXj2pT3BtLmWex0iJSMkvimOA,597
218
218
  zrb/cmd/cmd_val.py,sha256=7Doowyg6BK3ISSGBLt-PmlhzaEkBjWWm51cED6fAUOQ,1014
219
- zrb/config.py,sha256=rvCymdWpVKfwa1XlLNbFMxz2kkJyzqvqoqv5R8_zLDY,9584
219
+ zrb/config.py,sha256=lpJJv5ns-bNntEpScSLptPHv9gQYvEl4M8LP6rE7zfk,9423
220
220
  zrb/content_transformer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
221
221
  zrb/content_transformer/any_content_transformer.py,sha256=v8ZUbcix1GGeDQwB6OKX_1TjpY__ksxWVeqibwa_iZA,850
222
222
  zrb/content_transformer/content_transformer.py,sha256=STl77wW-I69QaGzCXjvkppngYFLufow8ybPLSyAvlHs,2404
@@ -245,7 +245,7 @@ zrb/input/option_input.py,sha256=TQB82ko5odgzkULEizBZi0e9TIHEbIgvdP0AR3RhA74,213
245
245
  zrb/input/password_input.py,sha256=szBojWxSP9QJecgsgA87OIYwQrY2AQ3USIKdDZY6snU,1465
246
246
  zrb/input/str_input.py,sha256=NevZHX9rf1g8eMatPyy-kUX3DglrVAQpzvVpKAzf7bA,81
247
247
  zrb/input/text_input.py,sha256=6T3MngWdUs0u0ZVs5Dl11w5KS7nN1RkgrIR_zKumzPM,3695
248
- zrb/llm_config.py,sha256=GtwPqBtKDq5_vazOZF8cMRZK_7dK0I5nnwnMWPuzrMA,12242
248
+ zrb/llm_config.py,sha256=w_GSyQiJ_Q2jupej8xvQULScqPaSYICdNcH9J54W1lE,11696
249
249
  zrb/runner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
250
250
  zrb/runner/cli.py,sha256=AbLTNqFy5FuyGQOWOjHZGaBC8e2yuE_Dx1sBdnisR18,6984
251
251
  zrb/runner/common_util.py,sha256=JDMcwvQ8cxnv9kQrAoKVLA40Q1omfv-u5_d5MvvwHeE,1373
@@ -343,7 +343,7 @@ zrb/task/llm/error.py,sha256=27DQXSG8SH1-XuvXFdZQKzP39wZDWmd_YnSTz6DJKKI,3690
343
343
  zrb/task/llm/history.py,sha256=3WMXoi7RquxosXQf3iv2_BCeF8iKtY1f407pR71xERs,7745
344
344
  zrb/task/llm/history_summarization.py,sha256=n3GbgwXlDIkgpJppMGfpqF_8Wpi9yAoZYh46O1pFQeU,6432
345
345
  zrb/task/llm/print_node.py,sha256=bpISOUxSH_JBLR-4Nq6-iLrzNWFagrKFX6u8ogYYMw8,4395
346
- zrb/task/llm/prompt.py,sha256=AUuyxjFgdK72yFNmNqsUDe55wjjxjK37vL7q7XPcgt8,4332
346
+ zrb/task/llm/prompt.py,sha256=zBo3xT3YPX_A4_t8Cd-QjNqQZl9dsoWMTt-NdytI2f4,3827
347
347
  zrb/task/llm/tool_wrapper.py,sha256=Xygd4VCY3ykjVv63pqlTI16ZG41ySkp683_5VTnL-Zo,6481
348
348
  zrb/task/llm/typing.py,sha256=c8VAuPBw_4A3DxfYdydkgedaP-LU61W9_wj3m3CAX1E,58
349
349
  zrb/task/llm_task.py,sha256=Yav1pmV26Eh4h9xTh16dN-DbTvhfYINI0EDp_ptJHLg,15643
@@ -388,7 +388,7 @@ zrb/util/string/name.py,sha256=SXEfxJ1-tDOzHqmSV8kvepRVyMqs2XdV_vyoh_9XUu0,1584
388
388
  zrb/util/todo.py,sha256=VGISej2KQZERpornK-8X7bysp4JydMrMUTnG8B0-liI,20708
389
389
  zrb/xcom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
390
390
  zrb/xcom/xcom.py,sha256=o79rxR9wphnShrcIushA0Qt71d_p3ZTxjNf7x9hJB78,1571
391
- zrb-1.8.1.dist-info/METADATA,sha256=L91yqIYnkr0gJ1x41_eMx5pbIlIXLuH-zvVIJCMb43E,8385
392
- zrb-1.8.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
393
- zrb-1.8.1.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
394
- zrb-1.8.1.dist-info/RECORD,,
391
+ zrb-1.8.2.dist-info/METADATA,sha256=NRlAG2IfE1oZDH9CDlAn9hAaQ8Arn5ytoXyZ6pdDZBA,9086
392
+ zrb-1.8.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
393
+ zrb-1.8.2.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
394
+ zrb-1.8.2.dist-info/RECORD,,
File without changes