quantalogic 0.2.20__tar.gz → 0.2.22__tar.gz
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-0.2.20 → quantalogic-0.2.22}/PKG-INFO +4 -2
- {quantalogic-0.2.20 → quantalogic-0.2.22}/README.md +3 -1
- {quantalogic-0.2.20 → quantalogic-0.2.22}/pyproject.toml +1 -1
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/agent_config.py +8 -4
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/main.py +9 -6
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/server/agent_server.py +1 -1
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/tool.py +0 -1
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/utils/get_coding_environment.py +7 -2
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/utils/git_ls.py +27 -6
- {quantalogic-0.2.20 → quantalogic-0.2.22}/LICENSE +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/__init__.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/agent.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/coding_agent.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/console_print_events.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/console_print_token.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/docs_cli.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/event_emitter.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/generative_model.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/interactive_text_editor.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/memory.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/model_names.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/prompts.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/search_agent.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/server/__init__.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/server/models.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/server/routes.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/server/state.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/server/static/js/event_visualizer.js +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/server/static/js/quantalogic.js +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/server/templates/index.html +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tool_manager.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/__init__.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/agent_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/download_http_file_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/duckduckgo_search_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/edit_whole_content_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/elixir_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/execute_bash_command_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/input_question_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/jinja_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/__init__.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/c_handler.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/cpp_handler.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/go_handler.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/java_handler.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/javascript_handler.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/python_handler.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/rust_handler.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/scala_handler.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/typescript_handler.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/list_directory_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/llm_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/llm_vision_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/markitdown_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/nodejs_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/python_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/read_file_block_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/read_file_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/replace_in_file_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/ripgrep_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/search_definition_names.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/serpapi_search_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/task_complete_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/unified_diff_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/wikipedia_search_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/write_file_tool.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/utils/__init__.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/utils/ask_user_validation.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/utils/check_version.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/utils/download_http_file.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/utils/get_environment.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/utils/get_quantalogic_rules_content.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/utils/read_file.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/utils/read_http_text_content.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/version.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/xml_parser.py +0 -0
- {quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/xml_tool_parser.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: quantalogic
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.22
|
4
4
|
Summary: QuantaLogic ReAct Agents
|
5
5
|
Author: Raphaël MANSUY
|
6
6
|
Author-email: raphael.mansuy@gmail.com
|
@@ -54,7 +54,7 @@ Description-Content-Type: text/markdown
|
|
54
54
|
[](https://opensource.org/licenses/Apache-2.0)
|
55
55
|
[](https://www.python.org/downloads/)
|
56
56
|
[](https://quantalogic.github.io/quantalogic/)
|
57
|
-
|
57
|
+
|
58
58
|
|
59
59
|
QuantaLogic is a ReAct (Reasoning & Action) framework for building advanced AI agents.
|
60
60
|
|
@@ -66,6 +66,8 @@ The `cli` version include coding capabilities comparable to Aider.
|
|
66
66
|
|
67
67
|

|
68
68
|
|
69
|
+
[HowTo Guide](./docs/howto/howto.md)
|
70
|
+
|
69
71
|
## Why QuantaLogic?
|
70
72
|
|
71
73
|
We created [QuantaLogic](https://www.quantalogic.app) because we saw a significant gap between the advanced AI models developed by companies like OpenAI, Anthropic, DeepSeek and their practical implementation in everyday business processes.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
[](https://opensource.org/licenses/Apache-2.0)
|
4
4
|
[](https://www.python.org/downloads/)
|
5
5
|
[](https://quantalogic.github.io/quantalogic/)
|
6
|
-
|
6
|
+
|
7
7
|
|
8
8
|
QuantaLogic is a ReAct (Reasoning & Action) framework for building advanced AI agents.
|
9
9
|
|
@@ -15,6 +15,8 @@ The `cli` version include coding capabilities comparable to Aider.
|
|
15
15
|
|
16
16
|

|
17
17
|
|
18
|
+
[HowTo Guide](./docs/howto/howto.md)
|
19
|
+
|
18
20
|
## Why QuantaLogic?
|
19
21
|
|
20
22
|
We created [QuantaLogic](https://www.quantalogic.app) because we saw a significant gap between the advanced AI models developed by companies like OpenAI, Anthropic, DeepSeek and their practical implementation in everyday business processes.
|
@@ -176,7 +176,7 @@ def create_full_agent(
|
|
176
176
|
)
|
177
177
|
|
178
178
|
|
179
|
-
def
|
179
|
+
def create_basic_agent(
|
180
180
|
model_name: str,
|
181
181
|
vision_model_name: str | None = None,
|
182
182
|
no_stream: bool = False,
|
@@ -198,16 +198,20 @@ def create_orchestrator_agent(
|
|
198
198
|
# Rebuild AgentTool to resolve forward references
|
199
199
|
AgentTool.model_rebuild()
|
200
200
|
|
201
|
-
coding_agent_instance = create_coding_agent(model_name)
|
202
201
|
|
203
202
|
tools = [
|
204
203
|
TaskCompleteTool(),
|
205
204
|
ListDirectoryTool(),
|
206
205
|
ReadFileBlockTool(),
|
207
|
-
RipgrepTool(),
|
208
206
|
SearchDefinitionNames(),
|
207
|
+
ReadFileTool(),
|
208
|
+
ReplaceInFileTool(),
|
209
|
+
WriteFileTool(),
|
210
|
+
EditWholeContentTool(),
|
211
|
+
ReplaceInFileTool(),
|
212
|
+
InputQuestionTool(),
|
213
|
+
ExecuteBashCommandTool(),
|
209
214
|
LLMTool(model_name=model_name, on_token=console_print_token if not no_stream else None),
|
210
|
-
AgentTool(agent=coding_agent_instance, agent_role="software expert", name="coder_agent_tool"),
|
211
215
|
]
|
212
216
|
|
213
217
|
if vision_model_name:
|
@@ -31,7 +31,7 @@ from quantalogic.agent_config import ( # noqa: E402
|
|
31
31
|
create_coding_agent,
|
32
32
|
create_full_agent,
|
33
33
|
create_interpreter_agent,
|
34
|
-
|
34
|
+
create_basic_agent,
|
35
35
|
)
|
36
36
|
from quantalogic.interactive_text_editor import get_multiline_input # noqa: E402
|
37
37
|
from quantalogic.search_agent import create_search_agent # noqa: E402
|
@@ -52,7 +52,7 @@ def create_agent_for_mode(mode: str, model_name: str, vision_model_name: str | N
|
|
52
52
|
if mode == "code-basic":
|
53
53
|
return create_coding_agent(model_name, vision_model_name, basic=True, no_stream=no_stream, compact_every_n_iteration=compact_every_n_iteration, max_tokens_working_memory=max_tokens_working_memory)
|
54
54
|
elif mode == "basic":
|
55
|
-
return
|
55
|
+
return create_basic_agent(model_name, vision_model_name, no_stream=no_stream, compact_every_n_iteration=compact_every_n_iteration, max_tokens_working_memory=max_tokens_working_memory)
|
56
56
|
elif mode == "full":
|
57
57
|
return create_full_agent(model_name, vision_model_name, no_stream=no_stream, compact_every_n_iteration=compact_every_n_iteration, max_tokens_working_memory=max_tokens_working_memory)
|
58
58
|
elif mode == "interpreter":
|
@@ -159,7 +159,8 @@ def display_welcome_message(
|
|
159
159
|
vision_model_name: str | None,
|
160
160
|
max_iterations: int = 50,
|
161
161
|
compact_every_n_iteration: int | None = None,
|
162
|
-
max_tokens_working_memory: int | None = None
|
162
|
+
max_tokens_working_memory: int | None = None,
|
163
|
+
mode: str = "basic"
|
163
164
|
) -> None:
|
164
165
|
"""Display the welcome message and instructions."""
|
165
166
|
version = get_version()
|
@@ -174,6 +175,7 @@ def display_welcome_message(
|
|
174
175
|
"\n"
|
175
176
|
f"- Model: {model_name}\n"
|
176
177
|
f"- Vision Model: {vision_model_name}\n"
|
178
|
+
f"- Mode: {mode}\n"
|
177
179
|
f"- Max Iterations: {max_iterations}\n"
|
178
180
|
f"- Memory Compact Frequency: {compact_every_n_iteration or 'Default (Max Iterations)'}\n"
|
179
181
|
f"- Max Working Memory Tokens: {max_tokens_working_memory or 'Default'}\n\n"
|
@@ -208,7 +210,7 @@ def display_welcome_message(
|
|
208
210
|
help="Set logging level (info/debug/warning).",
|
209
211
|
)
|
210
212
|
@click.option("--verbose", is_flag=True, help="Enable verbose output.")
|
211
|
-
@click.option("--mode", type=click.Choice(AGENT_MODES), default="
|
213
|
+
@click.option("--mode", type=click.Choice(AGENT_MODES), default="basic", help="Agent mode (code/search/full).")
|
212
214
|
@click.option(
|
213
215
|
"--vision-model-name",
|
214
216
|
default=None,
|
@@ -266,7 +268,7 @@ def cli(
|
|
266
268
|
help='Specify the model to use (litellm format, e.g. "openrouter/deepseek/deepseek-chat").',
|
267
269
|
)
|
268
270
|
@click.option("--verbose", is_flag=True, help="Enable verbose output.")
|
269
|
-
@click.option("--mode", type=click.Choice(AGENT_MODES), default="
|
271
|
+
@click.option("--mode", type=click.Choice(AGENT_MODES), default="basic", help="Agent mode (code/search/full).")
|
270
272
|
@click.option(
|
271
273
|
"--log",
|
272
274
|
type=click.Choice(["info", "debug", "warning"]),
|
@@ -333,7 +335,8 @@ def task(
|
|
333
335
|
vision_model_name,
|
334
336
|
max_iterations=max_iterations,
|
335
337
|
compact_every_n_iteration=compact_every_n_iteration,
|
336
|
-
max_tokens_working_memory=max_tokens_working_memory
|
338
|
+
max_tokens_working_memory=max_tokens_working_memory,
|
339
|
+
mode=mode
|
337
340
|
)
|
338
341
|
check_new_version()
|
339
342
|
logger.debug("Waiting for user input...")
|
@@ -28,7 +28,7 @@ from quantalogic.agent_config import (
|
|
28
28
|
MODEL_NAME,
|
29
29
|
create_agent,
|
30
30
|
create_coding_agent, # noqa: F401
|
31
|
-
|
31
|
+
create_basic_agent, # noqa: F401
|
32
32
|
)
|
33
33
|
from quantalogic.console_print_events import console_print_events
|
34
34
|
|
@@ -1,15 +1,20 @@
|
|
1
1
|
import os
|
2
2
|
|
3
|
+
from loguru import logger
|
4
|
+
|
3
5
|
from quantalogic.utils.get_environment import get_environment
|
4
6
|
from quantalogic.utils.git_ls import git_ls
|
5
7
|
|
6
8
|
|
7
9
|
def get_coding_environment() -> str:
|
8
10
|
"""Retrieve coding environment details."""
|
9
|
-
|
11
|
+
logger.debug("Retrieving coding environment details.")
|
12
|
+
result = (
|
10
13
|
f"{get_environment()}"
|
11
14
|
"\n\n"
|
12
15
|
"<codebase_first_level>\n"
|
13
|
-
f"{git_ls(directory_path=os.getcwd())}"
|
16
|
+
f"{git_ls(directory_path=os.getcwd(), recursive=False, max_depth=1)}"
|
14
17
|
"\n</codebase_first_level>\n"
|
15
18
|
)
|
19
|
+
logger.debug(f"Coding environment details:\n{result}")
|
20
|
+
return result
|
@@ -29,6 +29,10 @@ def git_ls(
|
|
29
29
|
|
30
30
|
# Expand paths and get absolute path
|
31
31
|
path = Path(os.path.expanduser(directory_path)).absolute()
|
32
|
+
|
33
|
+
# Verify access to base directory
|
34
|
+
if not os.access(path, os.R_OK):
|
35
|
+
return f"==== Error: No read access to directory {path} ====\n==== End of Block ===="
|
32
36
|
|
33
37
|
# Load .gitignore patterns
|
34
38
|
ignore_spec = load_gitignore_spec(path)
|
@@ -49,9 +53,13 @@ def load_gitignore_spec(path: Path) -> PathSpec:
|
|
49
53
|
while current != current.parent: # Stop at root
|
50
54
|
gitignore_path = current / ".gitignore"
|
51
55
|
if gitignore_path.exists():
|
52
|
-
|
53
|
-
|
54
|
-
|
56
|
+
try:
|
57
|
+
if os.access(gitignore_path, os.R_OK):
|
58
|
+
with open(gitignore_path) as f:
|
59
|
+
# Prepend parent patterns to maintain precedence
|
60
|
+
ignore_patterns = f.readlines() + ignore_patterns
|
61
|
+
except (PermissionError, OSError):
|
62
|
+
continue
|
55
63
|
current = current.parent
|
56
64
|
|
57
65
|
return PathSpec.from_lines(GitWildMatchPattern, ignore_patterns)
|
@@ -68,12 +76,25 @@ def generate_file_tree(
|
|
68
76
|
return {}
|
69
77
|
|
70
78
|
if path.is_file():
|
71
|
-
|
79
|
+
try:
|
80
|
+
if not os.access(path, os.R_OK):
|
81
|
+
return {"name": path.name, "type": "file", "size": "no access"}
|
82
|
+
return {"name": path.name, "type": "file", "size": f"{path.stat().st_size} bytes"}
|
83
|
+
except (PermissionError, OSError):
|
84
|
+
return {"name": path.name, "type": "file", "size": "no access"}
|
72
85
|
|
73
86
|
tree = {"name": path.name, "type": "directory", "children": []}
|
74
87
|
|
75
|
-
|
76
|
-
|
88
|
+
try:
|
89
|
+
if not os.access(path, os.R_OK | os.X_OK):
|
90
|
+
tree["children"].append({"name": "no access", "type": "error"})
|
91
|
+
return tree
|
92
|
+
|
93
|
+
# Always list direct children, but only recursively list if recursive is True
|
94
|
+
children = sorted(path.iterdir(), key=lambda x: x.name.lower())
|
95
|
+
except (PermissionError, OSError):
|
96
|
+
tree["children"].append({"name": "no access", "type": "error"})
|
97
|
+
return tree
|
77
98
|
for child in children:
|
78
99
|
if not ignore_spec.match_file(child):
|
79
100
|
if child.is_file():
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/cpp_handler.py
RENAMED
File without changes
|
File without changes
|
{quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/java_handler.py
RENAMED
File without changes
|
{quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/javascript_handler.py
RENAMED
File without changes
|
{quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/python_handler.py
RENAMED
File without changes
|
{quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/rust_handler.py
RENAMED
File without changes
|
{quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/scala_handler.py
RENAMED
File without changes
|
{quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/tools/language_handlers/typescript_handler.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{quantalogic-0.2.20 → quantalogic-0.2.22}/quantalogic/utils/get_quantalogic_rules_content.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|