zrb 1.14.8__py3-none-any.whl → 1.15.0__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/builtin/http.py +7 -8
- zrb/builtin/llm/llm_ask.py +6 -2
- zrb/builtin/llm/tool/api.py +17 -9
- zrb/builtin/llm/tool/cli.py +7 -2
- zrb/builtin/llm/tool/code.py +33 -9
- zrb/builtin/llm/tool/file.py +126 -53
- zrb/builtin/llm/tool/rag.py +25 -11
- zrb/builtin/llm/tool/sub_agent.py +22 -9
- zrb/builtin/llm/tool/web.py +30 -12
- zrb/config/config.py +10 -2
- zrb/config/default_prompt/interactive_system_prompt.md +2 -2
- zrb/config/llm_config.py +2 -2
- zrb/group/any_group.py +11 -4
- zrb/group/group.py +64 -0
- zrb/task/llm/agent.py +2 -2
- zrb/task/llm/config.py +1 -1
- zrb/task/llm/tool_wrapper.py +1 -1
- zrb/task/llm_task.py +1 -0
- {zrb-1.14.8.dist-info → zrb-1.15.0.dist-info}/METADATA +4 -3
- {zrb-1.14.8.dist-info → zrb-1.15.0.dist-info}/RECORD +22 -22
- {zrb-1.14.8.dist-info → zrb-1.15.0.dist-info}/WHEEL +0 -0
- {zrb-1.14.8.dist-info → zrb-1.15.0.dist-info}/entry_points.txt +0 -0
zrb/builtin/http.py
CHANGED
@@ -2,6 +2,7 @@ from typing import Any
|
|
2
2
|
|
3
3
|
from zrb.builtin.group import http_group
|
4
4
|
from zrb.context.any_context import AnyContext
|
5
|
+
from zrb.input.bool_input import BoolInput
|
5
6
|
from zrb.input.option_input import OptionInput
|
6
7
|
from zrb.input.str_input import StrInput
|
7
8
|
from zrb.task.make_task import make_task
|
@@ -32,10 +33,9 @@ from zrb.task.make_task import make_task
|
|
32
33
|
prompt="Enter body as JSON",
|
33
34
|
default="{}",
|
34
35
|
),
|
35
|
-
|
36
|
+
BoolInput(
|
36
37
|
name="verify_ssl",
|
37
|
-
default=
|
38
|
-
options=["true", "false"],
|
38
|
+
default=True,
|
39
39
|
description="Verify SSL certificate",
|
40
40
|
),
|
41
41
|
],
|
@@ -55,7 +55,7 @@ def http_request(ctx: AnyContext) -> Any:
|
|
55
55
|
body = json.loads(ctx.input.body)
|
56
56
|
|
57
57
|
# Make request
|
58
|
-
verify = ctx.input.verify_ssl
|
58
|
+
verify = ctx.input.verify_ssl
|
59
59
|
response = requests.request(
|
60
60
|
method=ctx.input.method,
|
61
61
|
url=ctx.input.url,
|
@@ -107,10 +107,9 @@ def http_request(ctx: AnyContext) -> Any:
|
|
107
107
|
prompt="Enter body as JSON",
|
108
108
|
default="{}",
|
109
109
|
),
|
110
|
-
|
110
|
+
BoolInput(
|
111
111
|
name="verify_ssl",
|
112
|
-
default=
|
113
|
-
options=["true", "false"],
|
112
|
+
default=True,
|
114
113
|
description="Verify SSL certificate",
|
115
114
|
),
|
116
115
|
],
|
@@ -137,7 +136,7 @@ def generate_curl(ctx: AnyContext) -> str:
|
|
137
136
|
parts.extend(["--data-raw", shlex.quote(ctx.input.body)])
|
138
137
|
|
139
138
|
# Add SSL verification
|
140
|
-
if ctx.input.verify_ssl
|
139
|
+
if not ctx.input.verify_ssl:
|
141
140
|
parts.append("--insecure")
|
142
141
|
|
143
142
|
# Add URL
|
zrb/builtin/llm/llm_ask.py
CHANGED
@@ -148,10 +148,14 @@ llm_group.add_task(
|
|
148
148
|
alias="chat",
|
149
149
|
)
|
150
150
|
|
151
|
+
if CFG.LLM_ALLOW_ANALYZE_REPO:
|
152
|
+
llm_ask.append_tool(analyze_repo)
|
153
|
+
|
154
|
+
if CFG.LLM_ALLOW_ANALYZE_FILE:
|
155
|
+
llm_ask.append_tool(analyze_file)
|
156
|
+
|
151
157
|
if CFG.LLM_ALLOW_ACCESS_LOCAL_FILE:
|
152
158
|
llm_ask.append_tool(
|
153
|
-
analyze_repo,
|
154
|
-
analyze_file,
|
155
159
|
search_files,
|
156
160
|
list_files,
|
157
161
|
read_from_file,
|
zrb/builtin/llm/tool/api.py
CHANGED
@@ -4,15 +4,18 @@ from typing import Literal
|
|
4
4
|
|
5
5
|
def get_current_location() -> str:
|
6
6
|
"""
|
7
|
-
Fetches the user's current geographical location
|
7
|
+
Fetches the user's current geographical location based on their IP address.
|
8
8
|
|
9
|
-
Use this tool when the user asks "Where am I?", "What is my current
|
9
|
+
Use this tool when the user asks "Where am I?", "What is my current
|
10
|
+
location?", or has a query that requires knowing their location to be
|
11
|
+
answered.
|
10
12
|
|
11
13
|
Returns:
|
12
|
-
str: A JSON string containing the 'lat' and 'lon' of the current
|
13
|
-
|
14
|
+
str: A JSON string containing the 'lat' and 'lon' of the current
|
15
|
+
location. Example: '{"lat": 48.8584, "lon": 2.2945}'
|
14
16
|
Raises:
|
15
|
-
requests.RequestException: If the API request to the location service
|
17
|
+
requests.RequestException: If the API request to the location service
|
18
|
+
fails.
|
16
19
|
"""
|
17
20
|
import requests
|
18
21
|
|
@@ -32,17 +35,22 @@ def get_current_weather(
|
|
32
35
|
"""
|
33
36
|
Retrieves the current weather conditions for a given geographical location.
|
34
37
|
|
35
|
-
Use this tool when the user asks about the weather. If the user does not
|
38
|
+
Use this tool when the user asks about the weather. If the user does not
|
39
|
+
provide a location, first use the `get_current_location` tool to
|
40
|
+
determine their location.
|
36
41
|
|
37
42
|
Args:
|
38
43
|
latitude (float): The latitude of the location.
|
39
44
|
longitude (float): The longitude of the location.
|
40
|
-
temperature_unit (Literal["celsius", "fahrenheit"]): The desired unit
|
45
|
+
temperature_unit (Literal["celsius", "fahrenheit"]): The desired unit
|
46
|
+
for the temperature reading.
|
41
47
|
|
42
48
|
Returns:
|
43
|
-
str: A JSON string containing detailed weather data, including
|
49
|
+
str: A JSON string containing detailed weather data, including
|
50
|
+
temperature, wind speed, and weather code.
|
44
51
|
Raises:
|
45
|
-
requests.RequestException: If the API request to the weather service
|
52
|
+
requests.RequestException: If the API request to the weather service
|
53
|
+
fails.
|
46
54
|
"""
|
47
55
|
import requests
|
48
56
|
|
zrb/builtin/llm/tool/cli.py
CHANGED
@@ -6,9 +6,14 @@ def run_shell_command(command: str) -> str:
|
|
6
6
|
"""
|
7
7
|
Executes a shell command on the user's local machine and returns the output.
|
8
8
|
|
9
|
-
This tool is powerful and should be used for tasks that require interacting
|
9
|
+
This tool is powerful and should be used for tasks that require interacting
|
10
|
+
with the command line, such as running scripts, managing system processes,
|
11
|
+
or using command-line tools.
|
10
12
|
|
11
|
-
**Security Warning:** This tool executes commands with the same permissions
|
13
|
+
**Security Warning:** This tool executes commands with the same permissions
|
14
|
+
as the user running the assistant. Before executing any command that could
|
15
|
+
modify files or system state (e.g., `git`, `npm`, `pip`, `docker`), you
|
16
|
+
MUST explain what the command does and ask the user for confirmation.
|
12
17
|
|
13
18
|
Args:
|
14
19
|
command (str): The exact shell command to execute.
|
zrb/builtin/llm/tool/code.py
CHANGED
@@ -58,25 +58,49 @@ async def analyze_repo(
|
|
58
58
|
"""
|
59
59
|
Performs a deep, goal-oriented analysis of a code repository or directory.
|
60
60
|
|
61
|
-
This powerful tool recursively reads all relevant files in a directory,
|
61
|
+
This powerful tool recursively reads all relevant files in a directory,
|
62
|
+
extracts key information, and then summarizes that information in relation
|
63
|
+
to a specific goal. It uses intelligent sub-agents for extraction and
|
64
|
+
summarization, making it ideal for complex tasks that require a holistic
|
65
|
+
understanding of a codebase.
|
66
|
+
|
67
|
+
To ensure a focused and effective analysis, it is crucial to provide a
|
68
|
+
clear and specific goal. Vague goals will result in a vague analysis and
|
69
|
+
may cause the tool to run for a long time.
|
62
70
|
|
63
71
|
Use this tool for:
|
64
72
|
- Understanding a large or unfamiliar codebase.
|
65
73
|
- Generating high-level summaries of a project's architecture.
|
66
74
|
- Performing a preliminary code review.
|
67
|
-
- Creating documentation or diagrams (e.g., "Generate a Mermaid C4 diagram
|
68
|
-
|
75
|
+
- Creating documentation or diagrams (e.g., "Generate a Mermaid C4 diagram
|
76
|
+
for this service").
|
77
|
+
- Answering broad questions like "How does the authentication in this
|
78
|
+
project work?".
|
69
79
|
|
70
80
|
Args:
|
71
81
|
path (str): The path to the directory or repository to analyze.
|
72
|
-
goal (str): A clear and specific description of what you want to
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
82
|
+
goal (str): A clear and specific description of what you want to
|
83
|
+
achieve. A good goal is critical for getting a useful result.
|
84
|
+
- Good goal: "Understand the database schema by analyzing all the
|
85
|
+
.sql files"
|
86
|
+
- Good goal: "Create a summary of all the API endpoints defined in
|
87
|
+
the 'api' directory"
|
88
|
+
- Bad goal: "Analyze the repo"
|
89
|
+
- Bad goal: "Tell me about the code"
|
90
|
+
extensions (list[str], optional): A list of file extensions to include
|
91
|
+
in the analysis. Defaults to a comprehensive list of common code
|
92
|
+
and configuration files.
|
93
|
+
exclude_patterns (list[str], optional): A list of glob patterns for
|
94
|
+
files and directories to exclude from the analysis. Defaults to
|
95
|
+
common patterns like '.git', 'node_modules', and '.venv'.
|
96
|
+
extraction_token_threshold (int, optional): The maximum token
|
97
|
+
threshold for the extraction sub-agent.
|
98
|
+
summarization_token_threshold (int, optional): The maximum token
|
99
|
+
threshold for the summarization sub-agent.
|
77
100
|
|
78
101
|
Returns:
|
79
|
-
str: A detailed, markdown-formatted analysis and summary of the
|
102
|
+
str: A detailed, markdown-formatted analysis and summary of the
|
103
|
+
repository, tailored to the specified goal.
|
80
104
|
Raises:
|
81
105
|
Exception: If an error occurs during the analysis.
|
82
106
|
"""
|
zrb/builtin/llm/tool/file.py
CHANGED
@@ -102,17 +102,27 @@ def list_files(
|
|
102
102
|
"""
|
103
103
|
Lists the files and directories within a specified path.
|
104
104
|
|
105
|
-
This is a fundamental tool for exploring the file system. Use it to
|
105
|
+
This is a fundamental tool for exploring the file system. Use it to
|
106
|
+
discover the structure of a directory, find specific files, or get a
|
107
|
+
general overview of the project layout before performing other operations.
|
106
108
|
|
107
109
|
Args:
|
108
|
-
path (str, optional): The directory path to list. Defaults to the
|
109
|
-
|
110
|
-
|
111
|
-
|
110
|
+
path (str, optional): The directory path to list. Defaults to the
|
111
|
+
current directory (".").
|
112
|
+
recursive (bool, optional): If True, lists files and directories
|
113
|
+
recursively. If False, lists only the top-level contents.
|
114
|
+
Defaults to True.
|
115
|
+
include_hidden (bool, optional): If True, includes hidden files and
|
116
|
+
directories (those starting with a dot). Defaults to False.
|
117
|
+
excluded_patterns (list[str], optional): A list of glob patterns to
|
118
|
+
exclude from the listing. This is useful for ignoring irrelevant
|
119
|
+
files like build artifacts or virtual environments. Defaults to a
|
120
|
+
standard list of common exclusion patterns.
|
112
121
|
|
113
122
|
Returns:
|
114
|
-
str: A JSON string containing a list of file and directory paths
|
115
|
-
|
123
|
+
str: A JSON string containing a list of file and directory paths
|
124
|
+
relative to the input path.
|
125
|
+
Example: '{"files": ["src/main.py", "README.md"]}'
|
116
126
|
Raises:
|
117
127
|
FileNotFoundError: If the specified path does not exist.
|
118
128
|
"""
|
@@ -213,26 +223,37 @@ def read_from_file(
|
|
213
223
|
end_line: Optional[int] = None,
|
214
224
|
) -> str:
|
215
225
|
"""
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
226
|
+
Reads the content of a file, optionally from a specific start line to an
|
227
|
+
end line.
|
228
|
+
|
229
|
+
This tool is essential for inspecting file contents. It can read both text
|
230
|
+
and PDF files. The returned content is prefixed with line numbers, which is
|
231
|
+
crucial for providing context when you need to modify the file later with
|
232
|
+
the `apply_diff` tool.
|
233
|
+
|
234
|
+
Use this tool to:
|
235
|
+
- Examine the source code of a file.
|
236
|
+
- Read configuration files.
|
237
|
+
- Check the contents of a document.
|
238
|
+
|
239
|
+
Args:
|
240
|
+
path (str): The path to the file to read.
|
241
|
+
start_line (int, optional): The 1-based line number to start reading
|
242
|
+
from. If omitted, reading starts from the beginning of the file.
|
243
|
+
end_line (int, optional): The 1-based line number to stop reading at
|
244
|
+
(inclusive). If omitted, reads to the end of the file.
|
245
|
+
|
246
|
+
Returns:
|
247
|
+
str: A JSON object containing the file path, the requested content
|
248
|
+
with line numbers, the start and end lines, and the total number
|
249
|
+
of lines in the file.
|
250
|
+
Example: '{"path": "src/main.py", "content": "1| import os\n2|
|
251
|
+
3| print(\"Hello, World!\")", "start_line": 1, "end_line": 3,
|
252
|
+
"total_lines": 3}'
|
253
|
+
Raises:
|
254
|
+
FileNotFoundError: If the specified file does not exist.
|
235
255
|
"""
|
256
|
+
|
236
257
|
abs_path = os.path.abspath(os.path.expanduser(path))
|
237
258
|
# Check if file exists
|
238
259
|
if not os.path.exists(abs_path):
|
@@ -274,13 +295,18 @@ def write_to_file(
|
|
274
295
|
content: str,
|
275
296
|
) -> str:
|
276
297
|
"""
|
277
|
-
Writes content to a file, completely overwriting it if it exists or
|
298
|
+
Writes content to a file, completely overwriting it if it exists or
|
299
|
+
creating it if it doesn't.
|
278
300
|
|
279
|
-
Use this tool to create new files or to replace the entire content of
|
301
|
+
Use this tool to create new files or to replace the entire content of
|
302
|
+
existing files. This is a destructive operation, so be certain of your
|
303
|
+
actions. Always read the file first to understand its contents before
|
304
|
+
overwriting it, unless you are creating a new file.
|
280
305
|
|
281
306
|
Args:
|
282
307
|
path (str): The path to the file to write to.
|
283
|
-
content (str): The full, complete content to be written to the file.
|
308
|
+
content (str): The full, complete content to be written to the file.
|
309
|
+
Do not use partial content or omit any lines.
|
284
310
|
|
285
311
|
Returns:
|
286
312
|
str: A JSON object indicating success or failure.
|
@@ -308,18 +334,28 @@ def search_files(
|
|
308
334
|
include_hidden: bool = True,
|
309
335
|
) -> str:
|
310
336
|
"""
|
311
|
-
Searches for a regular expression (regex) pattern within files in a
|
337
|
+
Searches for a regular expression (regex) pattern within files in a
|
338
|
+
specified directory.
|
312
339
|
|
313
|
-
This tool is invaluable for finding specific code, configuration, or text
|
340
|
+
This tool is invaluable for finding specific code, configuration, or text
|
341
|
+
across multiple files. Use it to locate function definitions, variable
|
342
|
+
assignments, error messages, or any other text pattern.
|
314
343
|
|
315
344
|
Args:
|
316
345
|
path (str): The directory path to start the search from.
|
317
|
-
regex (str): The Python-compatible regular expression pattern to search
|
318
|
-
|
319
|
-
|
346
|
+
regex (str): The Python-compatible regular expression pattern to search
|
347
|
+
for.
|
348
|
+
file_pattern (str, optional): A glob pattern to filter which files get
|
349
|
+
searched (e.g., "*.py", "*.md"). If omitted, all files are
|
350
|
+
searched.
|
351
|
+
include_hidden (bool, optional): If True, the search will include
|
352
|
+
hidden files and directories. Defaults to True.
|
320
353
|
|
321
354
|
Returns:
|
322
|
-
str: A JSON object containing a summary of the search and a list of
|
355
|
+
str: A JSON object containing a summary of the search and a list of
|
356
|
+
results. Each result includes the file path and a list of matches,
|
357
|
+
with each match showing the line number, line content, and a few
|
358
|
+
lines of context from before and after the match.
|
323
359
|
Raises:
|
324
360
|
ValueError: If the provided `regex` pattern is invalid.
|
325
361
|
"""
|
@@ -416,13 +452,18 @@ def replace_in_file(
|
|
416
452
|
"""
|
417
453
|
Replaces the first occurrence of a string in a file.
|
418
454
|
|
419
|
-
This tool is for making targeted modifications to a file. It is a
|
455
|
+
This tool is for making targeted modifications to a file. It is a
|
456
|
+
single-step operation that is generally safer and more ergonomic than
|
457
|
+
`write_to_file` for small changes.
|
420
458
|
|
421
|
-
To ensure the replacement is applied correctly and to avoid ambiguity, the
|
459
|
+
To ensure the replacement is applied correctly and to avoid ambiguity, the
|
460
|
+
`old_string` parameter should be a unique, multi-line string that includes
|
461
|
+
context from before and after the code you want to change.
|
422
462
|
|
423
463
|
Args:
|
424
464
|
path (str): The path of the file to modify.
|
425
|
-
old_string (str): The exact, verbatim string to search for and replace.
|
465
|
+
old_string (str): The exact, verbatim string to search for and replace.
|
466
|
+
This should be a unique, multi-line block of text.
|
426
467
|
new_string (str): The new string that will replace the `old_string`.
|
427
468
|
|
428
469
|
Returns:
|
@@ -455,21 +496,37 @@ async def analyze_file(
|
|
455
496
|
"""
|
456
497
|
Performs a deep, goal-oriented analysis of a single file using a sub-agent.
|
457
498
|
|
458
|
-
This tool is ideal for complex questions about a single file that go beyond
|
499
|
+
This tool is ideal for complex questions about a single file that go beyond
|
500
|
+
simple reading or searching. It uses a specialized sub-agent to analyze the
|
501
|
+
file's content in relation to a specific query.
|
502
|
+
|
503
|
+
To ensure a focused and effective analysis, it is crucial to provide a
|
504
|
+
clear and specific query. Vague queries will result in a vague analysis
|
505
|
+
and may cause the tool to run for a long time.
|
459
506
|
|
460
507
|
Use this tool to:
|
461
508
|
- Summarize the purpose and functionality of a script or configuration file.
|
462
|
-
- Extract the structure of a file (e.g., "List all the function names in
|
509
|
+
- Extract the structure of a file (e.g., "List all the function names in
|
510
|
+
this Python file").
|
463
511
|
- Perform a detailed code review of a specific file.
|
464
|
-
- Answer complex questions like, "How is the 'User' class used in this
|
512
|
+
- Answer complex questions like, "How is the 'User' class used in this
|
513
|
+
file?".
|
465
514
|
|
466
515
|
Args:
|
467
516
|
path (str): The path to the file to be analyzed.
|
468
|
-
query (str): A clear and specific question or instruction about what to
|
469
|
-
|
517
|
+
query (str): A clear and specific question or instruction about what to
|
518
|
+
analyze in the file.
|
519
|
+
- Good query: "What is the purpose of the 'User' class in this
|
520
|
+
file?"
|
521
|
+
- Good query: "List all the function names in this Python file."
|
522
|
+
- Bad query: "Analyze this file."
|
523
|
+
- Bad query: "Tell me about this code."
|
524
|
+
token_limit (int, optional): The maximum token length of the file
|
525
|
+
content to be passed to the analysis sub-agent.
|
470
526
|
|
471
527
|
Returns:
|
472
|
-
str: A detailed, markdown-formatted analysis of the file, tailored to
|
528
|
+
str: A detailed, markdown-formatted analysis of the file, tailored to
|
529
|
+
the specified query.
|
473
530
|
Raises:
|
474
531
|
FileNotFoundError: If the specified file does not exist.
|
475
532
|
"""
|
@@ -496,14 +553,22 @@ def read_many_files(paths: list[str]) -> str:
|
|
496
553
|
"""
|
497
554
|
Reads and returns the full content of multiple files at once.
|
498
555
|
|
499
|
-
This tool is highly efficient for gathering context from several files
|
556
|
+
This tool is highly efficient for gathering context from several files
|
557
|
+
simultaneously. Use it when you need to understand how different files in a
|
558
|
+
project relate to each other, or when you need to inspect a set of related
|
559
|
+
configuration or source code files.
|
500
560
|
|
501
561
|
Args:
|
502
|
-
paths (list[str]): A list of paths to the files you want to read. It is
|
562
|
+
paths (list[str]): A list of paths to the files you want to read. It is
|
563
|
+
crucial to provide accurate paths. Use the `list_files` tool first
|
564
|
+
if you are unsure about the exact file locations.
|
503
565
|
|
504
566
|
Returns:
|
505
|
-
str: A JSON object where keys are the file paths and values are their
|
506
|
-
|
567
|
+
str: A JSON object where keys are the file paths and values are their
|
568
|
+
corresponding contents, prefixed with line numbers. If a file
|
569
|
+
cannot be read, its value will be an error message.
|
570
|
+
Example: '{"results": {"src/api.py": "1| import ...",
|
571
|
+
"config.yaml": "1| key: value"}}'
|
507
572
|
"""
|
508
573
|
results = {}
|
509
574
|
for path in paths:
|
@@ -522,16 +587,24 @@ def write_many_files(files: list[FileToWrite]) -> str:
|
|
522
587
|
"""
|
523
588
|
Writes content to multiple files in a single, atomic operation.
|
524
589
|
|
525
|
-
This tool is for applying widespread changes to a project, such as
|
590
|
+
This tool is for applying widespread changes to a project, such as
|
591
|
+
creating a set of new files from a template, updating multiple
|
592
|
+
configuration files, or performing a large-scale refactoring.
|
526
593
|
|
527
|
-
Each file's content is completely replaced. If a file does not exist, it
|
594
|
+
Each file's content is completely replaced. If a file does not exist, it
|
595
|
+
will be created. If it exists, its current content will be entirely
|
596
|
+
overwritten. Therefore, you must provide the full, intended content for
|
597
|
+
each file.
|
528
598
|
|
529
599
|
Args:
|
530
|
-
files: A list of file objects, where each object is a dictionary
|
600
|
+
files: A list of file objects, where each object is a dictionary
|
601
|
+
containing a 'path' and the complete 'content'.
|
531
602
|
|
532
603
|
Returns:
|
533
|
-
str: A JSON object summarizing the operation, listing successfully
|
534
|
-
|
604
|
+
str: A JSON object summarizing the operation, listing successfully
|
605
|
+
written files and any files that failed, along with corresponding
|
606
|
+
error messages.
|
607
|
+
Example: '{"success": ["file1.py", "file2.txt"], "errors": {}}'
|
535
608
|
"""
|
536
609
|
success = []
|
537
610
|
errors = {}
|
zrb/builtin/llm/tool/rag.py
CHANGED
@@ -44,26 +44,40 @@ def create_rag_from_directory(
|
|
44
44
|
openai_embedding_model: str | None = None,
|
45
45
|
):
|
46
46
|
"""
|
47
|
-
Creates a powerful
|
47
|
+
Creates a powerful RAG tool for querying a local knowledge base.
|
48
48
|
|
49
|
-
This factory function generates a tool that can perform semantic searches
|
49
|
+
This factory function generates a tool that can perform semantic searches
|
50
|
+
over a directory of documents. It automatically indexes the documents into
|
51
|
+
a vector database, keeping it updated as files change. The generated tool
|
52
|
+
is ideal for answering questions based on a specific set of documents,
|
53
|
+
such as project documentation, research papers, or internal wikis.
|
50
54
|
|
51
55
|
The created tool will:
|
52
56
|
1. Monitor a specified directory for file changes.
|
53
|
-
2. Automatically update a vector database (ChromaDB) with the latest
|
54
|
-
|
57
|
+
2. Automatically update a vector database (ChromaDB) with the latest
|
58
|
+
content.
|
59
|
+
3. Accept a user query, embed it, and perform a similarity search against
|
60
|
+
the document vectors.
|
55
61
|
4. Return the most relevant document chunks that match the query.
|
56
62
|
|
57
63
|
Args:
|
58
|
-
tool_name (str): The name for the generated RAG tool (e.g.,
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
64
|
+
tool_name (str): The name for the generated RAG tool (e.g.,
|
65
|
+
"search_project_docs").
|
66
|
+
tool_description (str): A clear description of what the generated tool
|
67
|
+
does and when to use it (e.g., "Searches the project's technical
|
68
|
+
documentation to answer questions.").
|
69
|
+
document_dir_path (str, optional): The path to the directory
|
70
|
+
containing the documents to be indexed.
|
71
|
+
vector_db_path (str, optional): The path to store the ChromaDB vector
|
72
|
+
database.
|
73
|
+
vector_db_collection (str, optional): The name of the collection within
|
74
|
+
the vector database.
|
63
75
|
chunk_size (int, optional): The size of text chunks for embedding.
|
64
76
|
overlap (int, optional): The overlap between text chunks.
|
65
|
-
max_result_count (int, optional): The maximum number of search results
|
66
|
-
|
77
|
+
max_result_count (int, optional): The maximum number of search results
|
78
|
+
to return.
|
79
|
+
file_reader (list[RAGFileReader], optional): Custom file readers for
|
80
|
+
specific file types.
|
67
81
|
openai_api_key (str, optional): OpenAI API key for embeddings.
|
68
82
|
openai_base_url (str, optional): OpenAI base URL for embeddings.
|
69
83
|
openai_embedding_model (str, optional): The embedding model to use.
|
@@ -28,23 +28,36 @@ def create_sub_agent_tool(
|
|
28
28
|
is_yolo_mode: bool | None = None,
|
29
29
|
) -> Callable[[AnyContext, str], Coroutine[Any, Any, str]]:
|
30
30
|
"""
|
31
|
-
Creates a "tool that is another AI agent," capable of handling complex,
|
31
|
+
Creates a "tool that is another AI agent," capable of handling complex,
|
32
|
+
multi-step sub-tasks.
|
32
33
|
|
33
|
-
This powerful factory function generates a tool that, when used, spins up
|
34
|
+
This powerful factory function generates a tool that, when used, spins up
|
35
|
+
a temporary, specialized AI agent. This "sub-agent" has its own system
|
36
|
+
prompt, tools, and context, allowing it to focus exclusively on
|
37
|
+
accomplishing the task it's given without being distracted by the main
|
38
|
+
conversation.
|
34
39
|
|
35
|
-
This is ideal for delegating complex tasks like analyzing a file or a
|
40
|
+
This is ideal for delegating complex tasks like analyzing a file or a
|
41
|
+
repository.
|
36
42
|
|
37
43
|
Args:
|
38
44
|
tool_name (str): The name for the generated sub-agent tool.
|
39
|
-
tool_description (str): A clear description of the sub-agent's purpose
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
45
|
+
tool_description (str): A clear description of the sub-agent's purpose
|
46
|
+
and when to use it.
|
47
|
+
system_prompt (str, optional): The system prompt that will guide the
|
48
|
+
sub-agent's behavior.
|
49
|
+
model (str | Model, optional): The language model the sub-agent will
|
50
|
+
use.
|
51
|
+
model_settings (ModelSettings, optional): Specific settings for the
|
52
|
+
sub-agent's model.
|
53
|
+
tools (list, optional): A list of tools that will be exclusively
|
54
|
+
available to the sub-agent.
|
44
55
|
toolsets (list, optional): A list of Toolset for the sub-agent.
|
45
56
|
|
46
57
|
Returns:
|
47
|
-
Callable: An asynchronous function that serves as the sub-agent tool.
|
58
|
+
Callable: An asynchronous function that serves as the sub-agent tool.
|
59
|
+
When called, it runs the sub-agent with a given query and returns
|
60
|
+
its final result.
|
48
61
|
"""
|
49
62
|
|
50
63
|
async def run_sub_agent(ctx: AnyContext, query: str) -> str:
|
zrb/builtin/llm/tool/web.py
CHANGED
@@ -7,13 +7,19 @@ async def open_web_page(url: str) -> str:
|
|
7
7
|
"""
|
8
8
|
Fetches, parses, and converts the content of a web page to Markdown.
|
9
9
|
|
10
|
-
This tool "reads" a web page by fetching its content, stripping away
|
10
|
+
This tool "reads" a web page by fetching its content, stripping away
|
11
|
+
non-essential elements like scripts and styles, and then converting the
|
12
|
+
cleaned HTML into Markdown format. This preserves the semantic structure
|
13
|
+
of the content (headings, lists, etc.) while removing clutter. It also
|
14
|
+
extracts all hyperlinks and resolves them to absolute URLs.
|
11
15
|
|
12
16
|
Args:
|
13
|
-
url (str): The full URL of the web page to open (e.g.,
|
17
|
+
url (str): The full URL of the web page to open (e.g.,
|
18
|
+
"https://example.com/article").
|
14
19
|
|
15
20
|
Returns:
|
16
|
-
str: A JSON object containing the page's content in Markdown format
|
21
|
+
str: A JSON object containing the page's content in Markdown format
|
22
|
+
and a list of all absolute links found on the page.
|
17
23
|
"""
|
18
24
|
html_content, links = await _fetch_page_content(url)
|
19
25
|
markdown_content = _convert_html_to_markdown(html_content)
|
@@ -22,15 +28,19 @@ async def open_web_page(url: str) -> str:
|
|
22
28
|
|
23
29
|
def create_search_internet_tool(serp_api_key: str) -> Callable[[str, int], str]:
|
24
30
|
"""
|
25
|
-
Creates a tool that searches the internet using the SerpAPI Google Search
|
31
|
+
Creates a tool that searches the internet using the SerpAPI Google Search
|
32
|
+
API.
|
26
33
|
|
27
|
-
This factory returns a function that can be used to find information on the
|
34
|
+
This factory returns a function that can be used to find information on the
|
35
|
+
web. The generated tool is the primary way to answer general knowledge
|
36
|
+
questions or to find information on topics you are unfamiliar with.
|
28
37
|
|
29
38
|
Args:
|
30
39
|
serp_api_key (str): The API key for SerpAPI.
|
31
40
|
|
32
41
|
Returns:
|
33
|
-
Callable: A function that takes a search query and returns a list of
|
42
|
+
Callable: A function that takes a search query and returns a list of
|
43
|
+
search results.
|
34
44
|
"""
|
35
45
|
|
36
46
|
def search_internet(query: str, num_results: int = 10) -> str:
|
@@ -74,13 +84,16 @@ def search_wikipedia(query: str) -> str:
|
|
74
84
|
"""
|
75
85
|
Searches for articles on Wikipedia.
|
76
86
|
|
77
|
-
This is a specialized search tool for querying Wikipedia. It's best for
|
87
|
+
This is a specialized search tool for querying Wikipedia. It's best for
|
88
|
+
when the user is asking for definitions, historical information, or
|
89
|
+
biographical details that are likely to be found on an encyclopedia.
|
78
90
|
|
79
91
|
Args:
|
80
92
|
query (str): The search term or question.
|
81
93
|
|
82
94
|
Returns:
|
83
|
-
str: The raw JSON response from the Wikipedia API, containing a list of
|
95
|
+
str: The raw JSON response from the Wikipedia API, containing a list of
|
96
|
+
search results.
|
84
97
|
"""
|
85
98
|
import requests
|
86
99
|
|
@@ -93,14 +106,19 @@ def search_arxiv(query: str, num_results: int = 10) -> str:
|
|
93
106
|
"""
|
94
107
|
Searches for academic papers and preprints on ArXiv.
|
95
108
|
|
96
|
-
Use this tool when the user's query is scientific or technical in nature
|
109
|
+
Use this tool when the user's query is scientific or technical in nature
|
110
|
+
and they are likely looking for research papers, articles, or academic
|
111
|
+
publications.
|
97
112
|
|
98
113
|
Args:
|
99
|
-
query (str): The search query, which can include keywords, author
|
100
|
-
|
114
|
+
query (str): The search query, which can include keywords, author
|
115
|
+
names, or titles.
|
116
|
+
num_results (int, optional): The maximum number of results to return.
|
117
|
+
Defaults to 10.
|
101
118
|
|
102
119
|
Returns:
|
103
|
-
str: The raw XML response from the ArXiv API, containing a list of
|
120
|
+
str: The raw XML response from the ArXiv API, containing a list of
|
121
|
+
matching papers.
|
104
122
|
"""
|
105
123
|
import requests
|
106
124
|
|
zrb/config/config.py
CHANGED
@@ -356,11 +356,19 @@ class Config:
|
|
356
356
|
|
357
357
|
@property
|
358
358
|
def LLM_ALLOW_ACCESS_LOCAL_FILE(self) -> bool:
|
359
|
-
return to_boolean(self._getenv("
|
359
|
+
return to_boolean(self._getenv("LLM_ALLOW_ACCESS_LOCAL_FILE", "1"))
|
360
|
+
|
361
|
+
@property
|
362
|
+
def LLM_ALLOW_ANALYZE_FILE(self) -> bool:
|
363
|
+
return to_boolean(self._getenv("LLM_ALLOW_ANALYZE_LOCAL_FILE", "1"))
|
364
|
+
|
365
|
+
@property
|
366
|
+
def LLM_ALLOW_ANALYZE_REPO(self) -> bool:
|
367
|
+
return to_boolean(self._getenv("LLM_ALLOW_ANALYZE_REPO", "1"))
|
360
368
|
|
361
369
|
@property
|
362
370
|
def LLM_ALLOW_ACCESS_SHELL(self) -> bool:
|
363
|
-
return to_boolean(self._getenv("
|
371
|
+
return to_boolean(self._getenv("LLM_ALLOW_ACCESS_SHELL", "1"))
|
364
372
|
|
365
373
|
@property
|
366
374
|
def LLM_ALLOW_OPEN_WEB_PAGE(self) -> bool:
|
@@ -1,4 +1,4 @@
|
|
1
|
-
You are an expert AI agent
|
1
|
+
You are an expert interactive AI agent. You MUST follow this workflow for this interactive session. Respond in GitHub-flavored Markdown.
|
2
2
|
|
3
3
|
# Core Principles
|
4
4
|
- **Be Tool-Centric:** Do not describe what you are about to do. When a decision is made, call the tool directly. Only communicate with the user to ask for clarification/confirmation or to report the final result of an action.
|
@@ -32,4 +32,4 @@ You are an expert AI agent in a CLI. You MUST follow this workflow for this inte
|
|
32
32
|
* **CRITICAL:** Do not ask the user for help or report the failure until you have exhausted all reasonable attempts to fix it yourself. If the user provides a vague follow-up like "try again," you MUST use the context of the previous failure to inform your next action, not just repeat the failed command.
|
33
33
|
|
34
34
|
5. **Report Results:**
|
35
|
-
* Provide a concise summary of the action taken and explicitly state how you verified it.
|
35
|
+
* Provide a concise summary of the action taken and explicitly state how you verified it.
|
zrb/config/llm_config.py
CHANGED
@@ -147,12 +147,12 @@ class LLMConfig:
|
|
147
147
|
)
|
148
148
|
|
149
149
|
@property
|
150
|
-
def default_model(self) -> "Model | str
|
150
|
+
def default_model(self) -> "Model | str":
|
151
151
|
if self._default_model is not None:
|
152
152
|
return self._default_model
|
153
153
|
model_name = self.default_model_name
|
154
154
|
if model_name is None:
|
155
|
-
return
|
155
|
+
return "openai:gpt-4o"
|
156
156
|
from pydantic_ai.models.openai import OpenAIModel
|
157
157
|
|
158
158
|
return OpenAIModel(
|
zrb/group/any_group.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
|
-
from typing import Optional, Union
|
3
2
|
|
4
3
|
from zrb.task.any_task import AnyTask
|
5
4
|
|
@@ -31,22 +30,30 @@ class AnyGroup(ABC):
|
|
31
30
|
|
32
31
|
@property
|
33
32
|
@abstractmethod
|
34
|
-
def subgroups(self) -> dict[str,
|
33
|
+
def subgroups(self) -> "dict[str, AnyGroup]":
|
35
34
|
"""Group subgroups"""
|
36
35
|
pass
|
37
36
|
|
38
37
|
@abstractmethod
|
39
|
-
def add_group(self, group:
|
38
|
+
def add_group(self, group: "AnyGroup | str") -> "AnyGroup":
|
40
39
|
pass
|
41
40
|
|
42
41
|
@abstractmethod
|
43
42
|
def add_task(self, task: AnyTask, alias: str | None = None) -> AnyTask:
|
44
43
|
pass
|
45
44
|
|
45
|
+
@abstractmethod
|
46
|
+
def remove_group(self, group: "AnyGroup | str"):
|
47
|
+
pass
|
48
|
+
|
49
|
+
@abstractmethod
|
50
|
+
def remove_task(self, task: "AnyTask | str"):
|
51
|
+
pass
|
52
|
+
|
46
53
|
@abstractmethod
|
47
54
|
def get_task_by_alias(self, alias: str) -> AnyTask | None:
|
48
55
|
pass
|
49
56
|
|
50
57
|
@abstractmethod
|
51
|
-
def get_group_by_alias(self, name: str) ->
|
58
|
+
def get_group_by_alias(self, name: str) -> "AnyGroup | None":
|
52
59
|
pass
|
zrb/group/group.py
CHANGED
@@ -52,6 +52,70 @@ class Group(AnyGroup):
|
|
52
52
|
self._tasks[alias] = task
|
53
53
|
return task
|
54
54
|
|
55
|
+
def remove_group(self, group: "AnyGroup | str"):
|
56
|
+
original_groups_len = len(self._groups)
|
57
|
+
if isinstance(group, AnyGroup):
|
58
|
+
new_groups = {
|
59
|
+
alias: existing_group
|
60
|
+
for alias, existing_group in self._groups.items()
|
61
|
+
if group != existing_group
|
62
|
+
}
|
63
|
+
if len(new_groups) == original_groups_len:
|
64
|
+
raise ValueError(f"Cannot remove group {group} from {self}")
|
65
|
+
self._groups = new_groups
|
66
|
+
return
|
67
|
+
# group is string, try to remove by alias
|
68
|
+
new_groups = {
|
69
|
+
alias: existing_group
|
70
|
+
for alias, existing_group in self._groups.items()
|
71
|
+
if alias != group
|
72
|
+
}
|
73
|
+
if len(new_groups) < original_groups_len:
|
74
|
+
self._groups = new_groups
|
75
|
+
return
|
76
|
+
# if alias removal didn't work, try to remove by name
|
77
|
+
new_groups = {
|
78
|
+
alias: existing_group
|
79
|
+
for alias, existing_group in self._groups.items()
|
80
|
+
if existing_group.name != group
|
81
|
+
}
|
82
|
+
if len(new_groups) < original_groups_len:
|
83
|
+
self._groups = new_groups
|
84
|
+
return
|
85
|
+
raise ValueError(f"Cannot remove group {group} from {self}")
|
86
|
+
|
87
|
+
def remove_task(self, task: "AnyTask | str"):
|
88
|
+
original_tasks_len = len(self._tasks)
|
89
|
+
if isinstance(task, AnyTask):
|
90
|
+
new_tasks = {
|
91
|
+
alias: existing_task
|
92
|
+
for alias, existing_task in self._tasks.items()
|
93
|
+
if task != existing_task
|
94
|
+
}
|
95
|
+
if len(new_tasks) == original_tasks_len:
|
96
|
+
raise ValueError(f"Cannot remove task {task} from {self}")
|
97
|
+
self._tasks = new_tasks
|
98
|
+
return
|
99
|
+
# task is string, try to remove by alias
|
100
|
+
new_tasks = {
|
101
|
+
alias: existing_task
|
102
|
+
for alias, existing_task in self._tasks.items()
|
103
|
+
if alias != task
|
104
|
+
}
|
105
|
+
if len(new_tasks) < original_tasks_len:
|
106
|
+
self._tasks = new_tasks
|
107
|
+
return
|
108
|
+
# if alias removal didn't work, try to remove by name
|
109
|
+
new_tasks = {
|
110
|
+
alias: existing_task
|
111
|
+
for alias, existing_task in self._tasks.items()
|
112
|
+
if existing_task.name != task
|
113
|
+
}
|
114
|
+
if len(new_tasks) < original_tasks_len:
|
115
|
+
self._tasks = new_tasks
|
116
|
+
return
|
117
|
+
raise ValueError(f"Cannot remove task {task} from {self}")
|
118
|
+
|
55
119
|
def get_task_by_alias(self, alias: str) -> AnyTask | None:
|
56
120
|
return self._tasks.get(alias)
|
57
121
|
|
zrb/task/llm/agent.py
CHANGED
@@ -23,7 +23,7 @@ if TYPE_CHECKING:
|
|
23
23
|
|
24
24
|
def create_agent_instance(
|
25
25
|
ctx: AnyContext,
|
26
|
-
model: "str | Model
|
26
|
+
model: "str | Model",
|
27
27
|
system_prompt: str = "",
|
28
28
|
model_settings: "ModelSettings | None" = None,
|
29
29
|
tools: "list[ToolOrCallable]" = [],
|
@@ -75,7 +75,7 @@ def create_agent_instance(
|
|
75
75
|
def get_agent(
|
76
76
|
ctx: AnyContext,
|
77
77
|
agent_attr: "Agent | Callable[[AnySharedContext], Agent] | None",
|
78
|
-
model: "str | Model
|
78
|
+
model: "str | Model",
|
79
79
|
system_prompt: str,
|
80
80
|
model_settings: "ModelSettings | None",
|
81
81
|
tools_attr: (
|
zrb/task/llm/config.py
CHANGED
@@ -75,7 +75,7 @@ def get_model(
|
|
75
75
|
render_model_base_url: bool = True,
|
76
76
|
model_api_key_attr: StrAttr | None = None,
|
77
77
|
render_model_api_key: bool = True,
|
78
|
-
) -> "str | Model
|
78
|
+
) -> "str | Model":
|
79
79
|
"""Gets the model instance or name, handling defaults and configuration."""
|
80
80
|
from pydantic_ai.models import Model
|
81
81
|
|
zrb/task/llm/tool_wrapper.py
CHANGED
@@ -147,7 +147,7 @@ async def _ask_for_approval(
|
|
147
147
|
user_responses.append("")
|
148
148
|
approval_str, reason = user_responses
|
149
149
|
try:
|
150
|
-
approved = to_boolean(approval_str)
|
150
|
+
approved = True if approval_str.strip() == "" else to_boolean(approval_str)
|
151
151
|
if not approved and reason == "":
|
152
152
|
ctx.print(
|
153
153
|
stylize_error(
|
zrb/task/llm_task.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: zrb
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.15.0
|
4
4
|
Summary: Your Automation Powerhouse
|
5
5
|
Home-page: https://github.com/state-alchemists/zrb
|
6
6
|
License: AGPL-3.0-or-later
|
@@ -22,11 +22,12 @@ Requires-Dist: chromadb (>=0.6.3,<0.7.0) ; extra == "rag" or extra == "all"
|
|
22
22
|
Requires-Dist: fastapi[standard] (>=0.116.1,<0.117.0)
|
23
23
|
Requires-Dist: isort (>=6.0.1,<6.1.0)
|
24
24
|
Requires-Dist: libcst (>=1.7.0,<2.0.0)
|
25
|
-
Requires-Dist:
|
25
|
+
Requires-Dist: markdownify (>=1.2.0,<2.0.0)
|
26
|
+
Requires-Dist: openai (>=1.99.7)
|
26
27
|
Requires-Dist: pdfplumber (>=0.11.6,<0.12.0)
|
27
28
|
Requires-Dist: playwright (>=1.53.0,<2.0.0) ; extra == "playwright" or extra == "all"
|
28
29
|
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.
|
30
|
+
Requires-Dist: pydantic-ai-slim[anthropic,bedrock,cli,cohere,google,groq,huggingface,mcp,mistral,openai,vertexai] (>=0.7.0,<0.8.0)
|
30
31
|
Requires-Dist: pyjwt (>=2.10.1,<3.0.0)
|
31
32
|
Requires-Dist: python-dotenv (>=1.1.1,<2.0.0)
|
32
33
|
Requires-Dist: python-jose[cryptography] (>=3.4.0,<4.0.0)
|
@@ -7,21 +7,21 @@ zrb/builtin/base64.py,sha256=UjaFttE2oRx0T7_RpKtKfgMtWfiQXfJBAJmA16ek8Ic,1507
|
|
7
7
|
zrb/builtin/git.py,sha256=8_qVE_2lVQEVXQ9vhiw8Tn4Prj1VZB78ZjEJJS5Ab3M,5461
|
8
8
|
zrb/builtin/git_subtree.py,sha256=7BKwOkVTWDrR0DXXQ4iJyHqeR6sV5VYRt8y_rEB0EHg,3505
|
9
9
|
zrb/builtin/group.py,sha256=t008xLM4_fgbjfZrPoi_fQAnSHIo6MOiQSCHBO4GDYU,2379
|
10
|
-
zrb/builtin/http.py,sha256=
|
10
|
+
zrb/builtin/http.py,sha256=L6RE73c65wWwG5iHFN-tpOhyh56KsrgVskDd3c3YXtk,4246
|
11
11
|
zrb/builtin/jwt.py,sha256=3M5uaQhJZbKQLjTUft1OwPz_JxtmK-xtkjxWjciOQho,2859
|
12
12
|
zrb/builtin/llm/chat_session.py,sha256=syMOQzAGcRmxs7ctrBkfvAZ7-IhxnywuxuyeoBMteEs,10464
|
13
13
|
zrb/builtin/llm/history.py,sha256=LDOrL0p7r_AHLa5L8Dp7bHNsOALugmJd7OguXRWGnm4,3087
|
14
14
|
zrb/builtin/llm/input.py,sha256=Nw-26uTWp2QhUgKJcP_IMHmtk-b542CCSQ_vCOjhvhM,877
|
15
|
-
zrb/builtin/llm/llm_ask.py,sha256=
|
15
|
+
zrb/builtin/llm/llm_ask.py,sha256=03d1-2jh7NS0VP3eNl9wCdrUzud98i6zFUXW5NNu3_o,5597
|
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
|
-
zrb/builtin/llm/tool/api.py,sha256=
|
19
|
-
zrb/builtin/llm/tool/cli.py,sha256=
|
20
|
-
zrb/builtin/llm/tool/code.py,sha256=
|
21
|
-
zrb/builtin/llm/tool/file.py,sha256=
|
22
|
-
zrb/builtin/llm/tool/rag.py,sha256=
|
23
|
-
zrb/builtin/llm/tool/sub_agent.py,sha256=
|
24
|
-
zrb/builtin/llm/tool/web.py,sha256=
|
18
|
+
zrb/builtin/llm/tool/api.py,sha256=vMEiZhhTZ3o2jRBxWcJ62b0M85wd_w4W0X4Hx23NXto,2380
|
19
|
+
zrb/builtin/llm/tool/cli.py,sha256=8rugrKaNPEatHjr7nN4OIRLRT2TcF-oylEZGbLI9Brs,1254
|
20
|
+
zrb/builtin/llm/tool/code.py,sha256=rK-QbuCIkJyZA1YwHwTkpN4-DdtVDXGHogLqWck2MBc,8695
|
21
|
+
zrb/builtin/llm/tool/file.py,sha256=eXFGGFxxpdpWGVw0svyQNQc03I5M7wotSsA_HjkXw7c,23670
|
22
|
+
zrb/builtin/llm/tool/rag.py,sha256=Ab8_ZljnG_zfkwxPezImvorshuz3Fi4CmSzNOtU1a-g,9770
|
23
|
+
zrb/builtin/llm/tool/sub_agent.py,sha256=R-GxcwjAixKboj5MKK3mHfZmGUQspuTMq498U6_ucQg,5008
|
24
|
+
zrb/builtin/llm/tool/web.py,sha256=zNQWDNOz_MyyzhncBeV5E_9XijQxTFVp6BSzz_e5tBI,7261
|
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
|
@@ -217,15 +217,15 @@ zrb/callback/callback.py,sha256=PFhCqzfxdk6IAthmXcZ13DokT62xtBzJr_ciLw6I8Zg,4030
|
|
217
217
|
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
|
-
zrb/config/config.py,sha256=
|
220
|
+
zrb/config/config.py,sha256=YhmXeD5FKlMXv924_iWA-k9eUBbuOKXphoW6V56NQa4,13871
|
221
221
|
zrb/config/default_prompt/file_extractor_system_prompt.md,sha256=tmeZMPzF9MGExsZZw7M2PZN6V0oFVRp1nIjiqUPvQ9M,1013
|
222
|
-
zrb/config/default_prompt/interactive_system_prompt.md,sha256=
|
222
|
+
zrb/config/default_prompt/interactive_system_prompt.md,sha256=sRFrwqnqudnXATkTwHnnQAhLKC0ep6lad8vKXaRAPzc,3505
|
223
223
|
zrb/config/default_prompt/persona.md,sha256=WU4JKp-p7qJePDA6NZ_CYdBggo2B3PEq8IEnNVblIHU,41
|
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=fpG5B416OK3oE41bWPrh1M6pdH5SSadCPte_NJ_79z0,858
|
226
226
|
zrb/config/default_prompt/summarization_prompt.md,sha256=hRXH5E78TugSze_Hgp-KTbIhCeyrMcJg-pSXvXH3C9E,1629
|
227
227
|
zrb/config/default_prompt/system_prompt.md,sha256=Jkne5n9HJcBCgfeENwxvqH-kbDO2CaiUzqR4VoWMRHY,3054
|
228
|
-
zrb/config/llm_config.py,sha256=
|
228
|
+
zrb/config/llm_config.py,sha256=xt-Xf8ZuNoUT_GKCSFz5yy0BhbeHzxP-jrezB06WeiY,8857
|
229
229
|
zrb/config/llm_context/config.py,sha256=zeqSVOKK5yyApvqTbcO3ayGxtyoag22qlWWaXp1nINs,4950
|
230
230
|
zrb/config/llm_context/config_parser.py,sha256=h95FbOjvVobhrsfGtG_BY3hxS-OLzQj-9F5vGZuehkY,1473
|
231
231
|
zrb/config/llm_rate_limitter.py,sha256=P4vR7qxwiGwjlKx2kHcfdIxwGbJB98vdN-UQEH-Q2WU,4894
|
@@ -246,8 +246,8 @@ zrb/env/env.py,sha256=zT-xj0l5G_lp_ginV_InuBr5qTqZMcGaMKE_p5FoqlU,1061
|
|
246
246
|
zrb/env/env_file.py,sha256=dccsR_cjXp1Q_qz692YPaZSny3Xa049V5NAZ-WLDDEQ,746
|
247
247
|
zrb/env/env_map.py,sha256=CKMmXUbuvf6h2rgFWj-WvW_xLZNgG3TtWdfrqHDe4qk,1253
|
248
248
|
zrb/group/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
249
|
-
zrb/group/any_group.py,sha256=
|
250
|
-
zrb/group/group.py,sha256=
|
249
|
+
zrb/group/any_group.py,sha256=sdUk82YRuJBMwDhD_b-vJ3v-Yxz8K7LFW52TM19k3HI,1242
|
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=mmkU7WsqIK-IK8B5rNkWdy6mKS47zasnXJWE60MTRWQ,984
|
253
253
|
zrb/input/base_input.py,sha256=2gwIcT9xLXjcrwF-4k6ghDs819E-DWIwijlzfQtauWs,3766
|
@@ -346,8 +346,8 @@ 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=
|
350
|
-
zrb/task/llm/config.py,sha256=
|
349
|
+
zrb/task/llm/agent.py,sha256=DyGPPndidemXkYWrfgsGW8uC26mghuqbAv2G1ETjqAA,8472
|
350
|
+
zrb/task/llm/config.py,sha256=n1SPmwab09K2i1sL_OCwrEOWHI0Owx_hvWelg3Dreus,3781
|
351
351
|
zrb/task/llm/conversation_history.py,sha256=B_PDWYL_q66s0xwWBzMSomqPN6u3gkXlIeXBD5A0Apg,4416
|
352
352
|
zrb/task/llm/conversation_history_model.py,sha256=DJ0KDBB0BriQuE5ugC_q0aSHhjNIBcfjUk1f0S_3I9U,9245
|
353
353
|
zrb/task/llm/default_workflow/coding.md,sha256=2uythvPsnBpYfIhiIH1cCinQXX0i0yUqsL474Zpemw0,2484
|
@@ -357,9 +357,9 @@ zrb/task/llm/error.py,sha256=QR-nIohS6pBpC_16cWR-fw7Mevo1sNYAiXMBsh_CJDE,4157
|
|
357
357
|
zrb/task/llm/history_summarization.py,sha256=YaK3BR7gJVi9f8G5loosNAaO4y7K3ck_4bJ9GuOChXk,8028
|
358
358
|
zrb/task/llm/print_node.py,sha256=Z6J1n024MkYIeO4xGnDHmUHk9yTjJRVZRxAC5schE7w,4242
|
359
359
|
zrb/task/llm/prompt.py,sha256=p_SWitTj6twftae0c_GM7mBdlF9kO9TpmmdKaXGJPAY,10460
|
360
|
-
zrb/task/llm/tool_wrapper.py,sha256=
|
360
|
+
zrb/task/llm/tool_wrapper.py,sha256=kmpixQUFq4Hxj9VMgaaoZd8juzTFou9hIGjU7gZENYs,8297
|
361
361
|
zrb/task/llm/typing.py,sha256=c8VAuPBw_4A3DxfYdydkgedaP-LU61W9_wj3m3CAX1E,58
|
362
|
-
zrb/task/llm_task.py,sha256=
|
362
|
+
zrb/task/llm_task.py,sha256=1yPs9z8nhA9txMJVQZf3N4e-n6wys0nZ9Qk1lOx8PLg,14448
|
363
363
|
zrb/task/make_task.py,sha256=PD3b_aYazthS8LHeJsLAhwKDEgdurQZpymJDKeN60u0,2265
|
364
364
|
zrb/task/rsync_task.py,sha256=WfqNSaicJgYWpunNU34eYxXDqHDHOftuDHyWJKjqwg0,6365
|
365
365
|
zrb/task/scaffolder.py,sha256=rME18w1HJUHXgi9eTYXx_T2G4JdqDYzBoNOkdOOo5-o,6806
|
@@ -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.
|
410
|
-
zrb-1.
|
411
|
-
zrb-1.
|
412
|
-
zrb-1.
|
409
|
+
zrb-1.15.0.dist-info/METADATA,sha256=U0BCFnN5tq5rylSBYonovK8vTUJfZ6SBeHAmH2FK6Ro,9744
|
410
|
+
zrb-1.15.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
411
|
+
zrb-1.15.0.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
|
412
|
+
zrb-1.15.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|