quantalogic 0.61.1__py3-none-any.whl → 0.61.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.
- quantalogic/agent_config.py +4 -4
- quantalogic/coding_agent.py +1 -1
- quantalogic/tools/write_file_tool.py +43 -36
- {quantalogic-0.61.1.dist-info → quantalogic-0.61.2.dist-info}/METADATA +3 -3
- {quantalogic-0.61.1.dist-info → quantalogic-0.61.2.dist-info}/RECORD +8 -8
- {quantalogic-0.61.1.dist-info → quantalogic-0.61.2.dist-info}/LICENSE +0 -0
- {quantalogic-0.61.1.dist-info → quantalogic-0.61.2.dist-info}/WHEEL +0 -0
- {quantalogic-0.61.1.dist-info → quantalogic-0.61.2.dist-info}/entry_points.txt +0 -0
quantalogic/agent_config.py
CHANGED
@@ -75,7 +75,7 @@ def create_agent(
|
|
75
75
|
TaskCompleteTool(),
|
76
76
|
ReadFileTool(),
|
77
77
|
ReadFileBlockTool(),
|
78
|
-
WriteFileTool(),
|
78
|
+
WriteFileTool(disable_ensure_tmp_path=True),
|
79
79
|
EditWholeContentTool(),
|
80
80
|
InputQuestionTool(),
|
81
81
|
ListDirectoryTool(),
|
@@ -129,7 +129,7 @@ def create_interpreter_agent(
|
|
129
129
|
TaskCompleteTool(),
|
130
130
|
ReadFileTool(),
|
131
131
|
ReadFileBlockTool(),
|
132
|
-
WriteFileTool(),
|
132
|
+
WriteFileTool(disable_ensure_tmp_path=True),
|
133
133
|
EditWholeContentTool(),
|
134
134
|
InputQuestionTool(),
|
135
135
|
ListDirectoryTool(),
|
@@ -176,7 +176,7 @@ def create_full_agent(
|
|
176
176
|
TaskCompleteTool(),
|
177
177
|
ReadFileTool(),
|
178
178
|
ReadFileBlockTool(),
|
179
|
-
WriteFileTool(),
|
179
|
+
WriteFileTool(disable_ensure_tmp_path=True),
|
180
180
|
EditWholeContentTool(),
|
181
181
|
InputQuestionTool(),
|
182
182
|
ListDirectoryTool(),
|
@@ -237,7 +237,7 @@ def create_basic_agent(
|
|
237
237
|
SearchDefinitionNamesTool(),
|
238
238
|
ReadFileTool(),
|
239
239
|
ReplaceInFileTool(),
|
240
|
-
WriteFileTool(),
|
240
|
+
WriteFileTool(disable_ensure_tmp_path=True),
|
241
241
|
EditWholeContentTool(),
|
242
242
|
ReplaceInFileTool(),
|
243
243
|
InputQuestionTool(),
|
quantalogic/coding_agent.py
CHANGED
@@ -65,7 +65,7 @@ def create_coding_agent(
|
|
65
65
|
# Core file manipulation tools
|
66
66
|
TaskCompleteTool(), # Marks task completion
|
67
67
|
ReadFileBlockTool(), # Reads specific file sections
|
68
|
-
WriteFileTool(), # Creates new files
|
68
|
+
WriteFileTool(disable_ensure_tmp_path=True), # Creates new files
|
69
69
|
ReplaceInFileTool(), # Updates file sections
|
70
70
|
EditWholeContentTool(), # Modifies entire files
|
71
71
|
# Code navigation and search tools
|
@@ -4,6 +4,8 @@ import os
|
|
4
4
|
from pathlib import Path
|
5
5
|
|
6
6
|
from loguru import logger
|
7
|
+
from pydantic import Field
|
8
|
+
|
7
9
|
from quantalogic.tools.tool import Tool, ToolArgument
|
8
10
|
|
9
11
|
|
@@ -13,41 +15,45 @@ class WriteFileTool(Tool):
|
|
13
15
|
name: str = "write_file_tool"
|
14
16
|
description: str = "Writes a file with the given content in /tmp directory. The tool will fail if the file already exists when not used in append mode."
|
15
17
|
need_validation: bool = True
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
18
|
+
|
19
|
+
disable_ensure_tmp_path: bool = Field(default=False)
|
20
|
+
|
21
|
+
arguments: list = Field(
|
22
|
+
default=[
|
23
|
+
ToolArgument(
|
24
|
+
name="file_path",
|
25
|
+
arg_type="string",
|
26
|
+
description="The path to the file to write. By default, paths will be forced to /tmp directory unless disable_ensure_tmp_path is enabled. Can include subdirectories.",
|
27
|
+
required=True,
|
28
|
+
example="/tmp/myfile.txt or myfile.txt",
|
29
|
+
),
|
30
|
+
ToolArgument(
|
31
|
+
name="content",
|
32
|
+
arg_type="string",
|
33
|
+
description="""The content to write to the file. Use CDATA to escape special characters.
|
34
|
+
Don't add newlines at the beginning or end of the content.
|
35
|
+
""",
|
36
|
+
required=True,
|
37
|
+
example="Hello, world!",
|
38
|
+
),
|
39
|
+
ToolArgument(
|
40
|
+
name="append_mode",
|
41
|
+
arg_type="string",
|
42
|
+
description="""Append mode. If true, the content will be appended to the end of the file.
|
43
|
+
""",
|
44
|
+
required=False,
|
45
|
+
example="False",
|
46
|
+
),
|
47
|
+
ToolArgument(
|
48
|
+
name="overwrite",
|
49
|
+
arg_type="string",
|
50
|
+
description="Overwrite mode. If true, existing files can be overwritten. Defaults to False.",
|
51
|
+
required=False,
|
52
|
+
example="False",
|
53
|
+
default="False",
|
54
|
+
),
|
55
|
+
],
|
56
|
+
)
|
51
57
|
|
52
58
|
def _ensure_tmp_path(self, file_path: str) -> str:
|
53
59
|
"""Ensures the file path is within /tmp directory.
|
@@ -99,7 +105,8 @@ class WriteFileTool(Tool):
|
|
99
105
|
overwrite_bool = overwrite.lower() in ["true", "1", "yes"]
|
100
106
|
|
101
107
|
# Ensure path is in /tmp and normalize it
|
102
|
-
|
108
|
+
if not self.disable_ensure_tmp_path:
|
109
|
+
file_path = self._ensure_tmp_path(file_path)
|
103
110
|
|
104
111
|
# Ensure parent directory exists (only within /tmp)
|
105
112
|
parent_dir = os.path.dirname(file_path)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: quantalogic
|
3
|
-
Version: 0.61.
|
3
|
+
Version: 0.61.2
|
4
4
|
Summary: QuantaLogic ReAct Agents
|
5
5
|
Author: Raphaël MANSUY
|
6
6
|
Author-email: raphael.mansuy@gmail.com
|
@@ -22,7 +22,7 @@ Requires-Dist: google-search-results (>=2.4.2,<3.0.0)
|
|
22
22
|
Requires-Dist: html2text (>=2024.2.26,<2025.0.0)
|
23
23
|
Requires-Dist: instructor (>=1.7.2,<2.0.0)
|
24
24
|
Requires-Dist: jinja2 (>=3.1.5,<4.0.0)
|
25
|
-
Requires-Dist: litellm (>=1.
|
25
|
+
Requires-Dist: litellm (>=1.63.14,<2.0.0)
|
26
26
|
Requires-Dist: loguru (>=0.7.3,<0.8.0)
|
27
27
|
Requires-Dist: markdownify (>=0.14.1,<0.15.0)
|
28
28
|
Requires-Dist: markitdown (>=0.0.1a3,<0.0.2)
|
@@ -388,7 +388,7 @@ The **Flow module** is your architect—building workflows that hum with precisi
|
|
388
388
|
|
389
389
|
🔍 **Want to dive deeper?** Check out our comprehensive [Workflow YAML DSL Specification](./quantalogic/flow/flow_yaml.md), a detailed guide that walks you through defining powerful, structured workflows. From basic node configurations to complex transition logic, this documentation is your roadmap to mastering workflow design with QuantaLogic.
|
390
390
|
|
391
|
-
📚 **For a deeper understanding of Flow YAML and its applications, please refer to the official [Flow
|
391
|
+
📚 **For a deeper understanding of Flow YAML and its applications, please refer to the official [Flow YAMAL Documentation](./quantalogic/flow/flow_yaml.md).**
|
392
392
|
|
393
393
|
The Flow YAML documentation provides a comprehensive overview of the Flow YAML language, including its syntax, features, and best practices. It's a valuable resource for anyone looking to create complex workflows with QuantaLogic.
|
394
394
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
quantalogic/__init__.py,sha256=qFbvfHOd_chAu536pH816E3uo6CdyAgXCpQOwMXXVnY,1076
|
2
2
|
quantalogic/agent.py,sha256=VChZXFLEsIIrBtXVQZ-FGZ72GCUXDL3g9br8Vo1t5V8,75072
|
3
|
-
quantalogic/agent_config.py,sha256=
|
3
|
+
quantalogic/agent_config.py,sha256=HNXHmu3BiT4q9i-L2wJKUh6PuiZ_ryTNaB7ga24kaJo,8334
|
4
4
|
quantalogic/agent_factory.py,sha256=soActorasOqs5g6NmlyeEjRYbJceIGGg7wuUS-vA898,6878
|
5
5
|
quantalogic/codeact/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
quantalogic/codeact/agent.py,sha256=oajib7OsfBp230sg_IjmknqYsFz_lSURC39fj5brsP4,22454
|
@@ -14,7 +14,7 @@ quantalogic/codeact/prompts/generate_program.j2,sha256=05_1bAwIJLLBKt4o9c7sRWLHI
|
|
14
14
|
quantalogic/codeact/prompts/response_format.j2,sha256=TwO43dEG-3justNigpX4yyzGR1TGS3YDlpJQq8Z5Vf4,355
|
15
15
|
quantalogic/codeact/tools_manager.py,sha256=l2cpHLuQP-MW0uP8d2e6IdMToeveaIOdilwDGPjPciY,4464
|
16
16
|
quantalogic/codeact/utils.py,sha256=B7Xowk4id6Sgoyl0eBJsi6JiKa-BAwnj0a5z70vrV1M,5308
|
17
|
-
quantalogic/coding_agent.py,sha256=
|
17
|
+
quantalogic/coding_agent.py,sha256=WFfabRwwPZFV3Pw3seLKpSrFE9Li4pz8Z8mCdsUIDi8,5532
|
18
18
|
quantalogic/config.py,sha256=bmPI2rvQ9M8Zdl1H7K588JgJdnkxSE0L5_i5aBqsagA,564
|
19
19
|
quantalogic/console_print_events.py,sha256=yDtfOr7s5r_gLTgwkl_XoKSkUqNRZhqqq4hwR_oJsUw,2050
|
20
20
|
quantalogic/console_print_token.py,sha256=5IRVoPhwWZtSc4LpNoAsCQhCB_RnAW9chycGgyD3_5U,437
|
@@ -188,7 +188,7 @@ quantalogic/tools/utils/generate_database_report.py,sha256=IU_XGTDNXfJXxzpHR1F4c
|
|
188
188
|
quantalogic/tools/web_navigation/__init__.py,sha256=O7SkVqbGwN4zt8Sm3H8AHF9451FSgI5h0J3fDj1rFS4,142
|
189
189
|
quantalogic/tools/web_navigation/web_tool.py,sha256=AxAxQLUNwCElqxP2ceOOjHVY80ck-Md-uNsjHdR9ErA,4721
|
190
190
|
quantalogic/tools/wikipedia_search_tool.py,sha256=LXQSPH8961Efw2QNxKe-cD5ZiIYD3ufEgrxH4y5uB74,5180
|
191
|
-
quantalogic/tools/write_file_tool.py,sha256=
|
191
|
+
quantalogic/tools/write_file_tool.py,sha256=aevO9koB1Gz96PJCu-hQuW014qTzrnoSpcMc6eke5mI,5583
|
192
192
|
quantalogic/utils/__init__.py,sha256=E442CJQuTohKzgI0Wrd4NZEpKascFjz6F4Vy8Y1c_0Y,634
|
193
193
|
quantalogic/utils/ask_user_validation.py,sha256=kSr7TXPTpsLR9zgwpGWgvffx8-cKAC_rdFRdLqwC22A,1176
|
194
194
|
quantalogic/utils/async_utils.py,sha256=FOizWRbHdsZwoD36dNErzunfwPlE7zDprS6RXcWuWSo,963
|
@@ -209,8 +209,8 @@ quantalogic/version_check.py,sha256=JyQFTNMDWtpHCLnN-BiakzB2cyXf6kUFsTjvmSruZi4,
|
|
209
209
|
quantalogic/welcome_message.py,sha256=o4tHdgabNuIV9kbIDPgS3_2yzJhayK30oKad2UouYDc,3020
|
210
210
|
quantalogic/xml_parser.py,sha256=bLLwIwO-VEHWF3heNS7nuPC8wgdYw9F_fVZZNW1figY,11728
|
211
211
|
quantalogic/xml_tool_parser.py,sha256=hGHA1q20JUoTNTbZYmi4FTdA5I25-AGEIP8DwZgQCNA,3897
|
212
|
-
quantalogic-0.61.
|
213
|
-
quantalogic-0.61.
|
214
|
-
quantalogic-0.61.
|
215
|
-
quantalogic-0.61.
|
216
|
-
quantalogic-0.61.
|
212
|
+
quantalogic-0.61.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
213
|
+
quantalogic-0.61.2.dist-info/METADATA,sha256=38TzrZH-h5sMLtIgRGcMlOdTBXtGh-tSndq7AeFmJxA,32975
|
214
|
+
quantalogic-0.61.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
215
|
+
quantalogic-0.61.2.dist-info/entry_points.txt,sha256=h74O_Q3qBRCrDR99qvwB4BpBGzASPUIjCfxHq6Qnups,183
|
216
|
+
quantalogic-0.61.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|