jarvis-ai-assistant 0.1.99__py3-none-any.whl → 0.1.101__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.
Potentially problematic release.
This version of jarvis-ai-assistant might be problematic. Click here for more details.
- jarvis/__init__.py +1 -1
- jarvis/agent.py +12 -12
- jarvis/jarvis_code_agent/main.py +26 -27
- jarvis/jarvis_codebase/main.py +3 -3
- jarvis/jarvis_coder/git_utils.py +4 -4
- jarvis/jarvis_coder/main.py +2 -8
- jarvis/jarvis_coder/patch_handler.py +153 -75
- jarvis/jarvis_platform/main.py +2 -2
- jarvis/jarvis_rag/main.py +2 -2
- jarvis/jarvis_smart_shell/main.py +6 -4
- jarvis/models/kimi.py +2 -2
- jarvis/models/openai.py +1 -1
- jarvis/models/registry.py +35 -12
- jarvis/tools/ask_user.py +6 -3
- jarvis/tools/chdir.py +9 -5
- jarvis/tools/create_code_sub_agent.py +2 -1
- jarvis/tools/create_sub_agent.py +2 -1
- jarvis/tools/execute_code_modification.py +4 -6
- jarvis/tools/execute_shell.py +2 -2
- jarvis/tools/file_operation.py +10 -5
- jarvis/tools/find_files.py +119 -0
- jarvis/tools/generate_tool.py +27 -25
- jarvis/tools/methodology.py +13 -7
- jarvis/tools/rag.py +9 -5
- jarvis/tools/read_webpage.py +4 -2
- jarvis/tools/registry.py +25 -15
- jarvis/tools/search.py +18 -15
- jarvis/tools/select_code_files.py +2 -5
- jarvis/tools/thinker.py +7 -5
- jarvis/utils.py +53 -34
- {jarvis_ai_assistant-0.1.99.dist-info → jarvis_ai_assistant-0.1.101.dist-info}/METADATA +9 -8
- jarvis_ai_assistant-0.1.101.dist-info/RECORD +51 -0
- jarvis/tools/codebase_qa.py +0 -72
- jarvis/tools/find_related_files.py +0 -86
- jarvis_ai_assistant-0.1.99.dist-info/RECORD +0 -52
- {jarvis_ai_assistant-0.1.99.dist-info → jarvis_ai_assistant-0.1.101.dist-info}/LICENSE +0 -0
- {jarvis_ai_assistant-0.1.99.dist-info → jarvis_ai_assistant-0.1.101.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.1.99.dist-info → jarvis_ai_assistant-0.1.101.dist-info}/entry_points.txt +0 -0
- {jarvis_ai_assistant-0.1.99.dist-info → jarvis_ai_assistant-0.1.101.dist-info}/top_level.txt +0 -0
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from typing import Any, Dict
|
|
3
|
-
from jarvis.jarvis_codebase.main import CodeBase
|
|
4
|
-
from jarvis.utils import find_git_root, PrettyOutput, OutputType
|
|
5
|
-
|
|
6
|
-
class CodebaseSearchTool:
|
|
7
|
-
"""Codebase Search Tool"""
|
|
8
|
-
|
|
9
|
-
name = "find_related_files"
|
|
10
|
-
description = "Find code files related to the given requirement by searching the codebase using NLP-based semantic search. IMPORTANT: Requires complete sentence descriptions - keywords or phrases alone will not yield comprehensive results."
|
|
11
|
-
parameters = {
|
|
12
|
-
"type": "object",
|
|
13
|
-
"properties": {
|
|
14
|
-
"dir": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "Project root directory"
|
|
17
|
-
},
|
|
18
|
-
"query": {
|
|
19
|
-
"type": "string",
|
|
20
|
-
"description": """Requirement description to find related code files. Must be a complete sentence that clearly describes what you're looking for.
|
|
21
|
-
|
|
22
|
-
Good examples:
|
|
23
|
-
- 'Need to modify the user authentication process to add password validation'
|
|
24
|
-
- 'Want to update the database connection configuration to support multiple databases'
|
|
25
|
-
- 'Looking for the code that handles file upload functionality in the system'
|
|
26
|
-
|
|
27
|
-
Bad examples (will not work well):
|
|
28
|
-
- 'user auth'
|
|
29
|
-
- 'database config'
|
|
30
|
-
- 'upload'""",
|
|
31
|
-
"examples": [
|
|
32
|
-
"Need to modify the error handling in the authentication process",
|
|
33
|
-
"Want to update how the system processes user uploads",
|
|
34
|
-
"Looking for the code that manages database connections"
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
"top_k": {
|
|
38
|
-
"type": "integer",
|
|
39
|
-
"description": "Number of most relevant files to return",
|
|
40
|
-
"default": 5
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"required": ["query"]
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
def execute(self, params: Dict[str, Any]) -> Dict[str, Any]:
|
|
47
|
-
"""Execute codebase search"""
|
|
48
|
-
try:
|
|
49
|
-
dir = params.get("dir")
|
|
50
|
-
query = params["query"]
|
|
51
|
-
top_k = params.get("top_k", 5)
|
|
52
|
-
|
|
53
|
-
# Find the root directory of the codebase
|
|
54
|
-
current_dir = os.getcwd()
|
|
55
|
-
root_dir = find_git_root(dir or current_dir)
|
|
56
|
-
if not root_dir:
|
|
57
|
-
return {
|
|
58
|
-
"success": False,
|
|
59
|
-
"stdout": "",
|
|
60
|
-
"stderr": "Error: Current directory is not in a Git repository",
|
|
61
|
-
"error": "NotInGitRepository"
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
os.chdir(root_dir)
|
|
65
|
-
codebase = CodeBase(root_dir)
|
|
66
|
-
# Generate index
|
|
67
|
-
|
|
68
|
-
codebase.generate_codebase()
|
|
69
|
-
# Execute search
|
|
70
|
-
response = codebase.search_similar(query, top_k)
|
|
71
|
-
os.chdir(current_dir)
|
|
72
|
-
return {
|
|
73
|
-
"success": True,
|
|
74
|
-
"stdout": str(response),
|
|
75
|
-
"stderr": "",
|
|
76
|
-
"error": None
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
except Exception as e:
|
|
80
|
-
PrettyOutput.print(f"Codebase QA error: {str(e)}", output_type=OutputType.ERROR)
|
|
81
|
-
return {
|
|
82
|
-
"success": False,
|
|
83
|
-
"stdout": "",
|
|
84
|
-
"stderr": f"Error executing codebase QA: {str(e)}",
|
|
85
|
-
"error": str(type(e).__name__)
|
|
86
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
jarvis/__init__.py,sha256=U2J1Jkr2YHJwfc3OfDOe-JfIpiajjVBplRfsmc4xL8U,50
|
|
2
|
-
jarvis/agent.py,sha256=EwufsNRQPYLnQ5HsZkjsw9-tOtc3GCn9h73kuZoNg3k,20780
|
|
3
|
-
jarvis/utils.py,sha256=WtIZrwed5q0KvDWTxS6Y4K_m9svZROvOxyehJ7u1OSc,15495
|
|
4
|
-
jarvis/jarvis_code_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
jarvis/jarvis_code_agent/main.py,sha256=7mCwsvBDtnI-VohCy1ng6jEpSQL9G5Xztml11PgjRvs,6307
|
|
6
|
-
jarvis/jarvis_codebase/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
jarvis/jarvis_codebase/main.py,sha256=lvIWXmdl16WHVhroSFFxr00uHnpv5e9dEDOjz9ibH9A,36874
|
|
8
|
-
jarvis/jarvis_coder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
jarvis/jarvis_coder/file_select.py,sha256=BobNj5Kirr6jSwy59LOghC3o8Uff1CwTXNtlTO-idEo,8475
|
|
10
|
-
jarvis/jarvis_coder/git_utils.py,sha256=0xKgUzfKy8Pk4wEIBmTggPpRafiHWtPD1SfZOapZnj8,5029
|
|
11
|
-
jarvis/jarvis_coder/main.py,sha256=b8p-FrQe23bM2_H3sY3A3Y6J332DM6ojSi6yoi_K77E,8879
|
|
12
|
-
jarvis/jarvis_coder/patch_handler.py,sha256=pMKgwHOc7U0rFKj3-MZNlshzq_im4kZw4QV2yrvUr-s,13061
|
|
13
|
-
jarvis/jarvis_coder/plan_generator.py,sha256=x-FalwoRg79h-fvDgFQ8Cl-I8zJ7x2qcXsEUnRip9GA,6186
|
|
14
|
-
jarvis/jarvis_platform/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
jarvis/jarvis_platform/main.py,sha256=Hb40MmN4We9oY8BHzLyrNTm-p7Mg50s2nqLaLxflC48,4981
|
|
16
|
-
jarvis/jarvis_rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
jarvis/jarvis_rag/main.py,sha256=qi_JokG5ZZOFZ7R1V8aoIjst_knGyA1-lwJcRVvBX6A,33625
|
|
18
|
-
jarvis/jarvis_smart_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
jarvis/jarvis_smart_shell/main.py,sha256=pAtNXLDAubNRLXAVz5oDw0BVI4juk9PX4Jbuyl7omQQ,4014
|
|
20
|
-
jarvis/models/__init__.py,sha256=mrOt67nselz_H1gX9wdAO4y2DY5WPXzABqJbr5Des8k,63
|
|
21
|
-
jarvis/models/ai8.py,sha256=ZRNO3aRjmICRjCXl-_F9pTNQTY4j1tUd-WJoJpb9n4Y,11958
|
|
22
|
-
jarvis/models/base.py,sha256=nQ-rsJL1Z-gMev3TPoY7tYdwxhCJY8LG6_gtJ-maiW0,2181
|
|
23
|
-
jarvis/models/kimi.py,sha256=wLXEA-17yLVvMRn-SAMGwQ_gx6mBaGhlSsP8F5pfoL0,16391
|
|
24
|
-
jarvis/models/ollama.py,sha256=LzEA4kbkw1KflQ1T__hkmXu4--6xUPho2NTnj_ZQe6k,5761
|
|
25
|
-
jarvis/models/openai.py,sha256=tAvz2Pne7woDXUppD7Ina461mVQCxy0vG5cwv5MHpLg,4404
|
|
26
|
-
jarvis/models/oyi.py,sha256=iA8E5vzN9VIt-rlzpT5wmbyl7umVU1_y5yo_5gz3DXc,14534
|
|
27
|
-
jarvis/models/registry.py,sha256=5z75vdBoudH2oJRESHzV3SOFX0JZaefpcWsrUNpmaJM,8814
|
|
28
|
-
jarvis/tools/__init__.py,sha256=7Rqyj5hBAv5cWDVr5T9ZTZASO7ssBHeQNm2_4ZARdkA,72
|
|
29
|
-
jarvis/tools/ask_user.py,sha256=2hEaR-L7pjYLVXFC5-zAu2us7B7OHTLvwssfKX2i3co,2006
|
|
30
|
-
jarvis/tools/base.py,sha256=c0DMoDDPxmsqUYJR989zgUs7nIYRY6GWBrAdusIZKjc,656
|
|
31
|
-
jarvis/tools/chdir.py,sha256=YMrzj6V3JHxX94e8adz97x1_E5aWjUoEwkhDM4T2DEs,2793
|
|
32
|
-
jarvis/tools/codebase_qa.py,sha256=CpxL2RtPcdkrtaoKO5rU6YhWoZ6WdmGrD6P3pYDSkbA,2364
|
|
33
|
-
jarvis/tools/create_code_sub_agent.py,sha256=aWxeF-4PM_bKS9TYk3iqQOZbMRnG6E469XdRGHG0dNw,1687
|
|
34
|
-
jarvis/tools/create_sub_agent.py,sha256=4Uim7UGgStw7nhVz9i1S_nzSC__jUwxpCh80ZsLT2TA,2776
|
|
35
|
-
jarvis/tools/execute_code_modification.py,sha256=yRBoayavmnUCP1GKgiOI2NjZK3HMcufZ_ed4L9ecvKE,2572
|
|
36
|
-
jarvis/tools/execute_shell.py,sha256=6XIDzdTf67PDIObUZqLtHvhnlOLSyuV_GlfFwQJsSaU,2580
|
|
37
|
-
jarvis/tools/file_operation.py,sha256=e37kkZKop75hUMh9MJjYNz2MbLir6J5iDFiXA_VzVWg,3899
|
|
38
|
-
jarvis/tools/find_related_files.py,sha256=Q7O1qkNK1i7rGXrQjyJk2QIPPQNYUPFTHJTEbysntyw,3242
|
|
39
|
-
jarvis/tools/generate_tool.py,sha256=5iw8-uLwMcwSzQ2DouoWYa4WYm_7ZmYfdJBU50z9SUE,6040
|
|
40
|
-
jarvis/tools/methodology.py,sha256=wzkVbxetg_rvK_wDqPvgVQ9yeCwSkwEoQ5EsN0uB7G8,5377
|
|
41
|
-
jarvis/tools/rag.py,sha256=gzut7Yk6vhYeT94GFBE6YMwTj5tvKEzlU9McY6fOdK8,4742
|
|
42
|
-
jarvis/tools/read_webpage.py,sha256=_ts9ioSFR2wcMwjId_aV-jqSWpbiydU_beJQyn_aAv4,2405
|
|
43
|
-
jarvis/tools/registry.py,sha256=-JSgZ-6Tp0xmADRLiX-lrlh14uob_TCe0r3gN0mpGyo,10583
|
|
44
|
-
jarvis/tools/search.py,sha256=BIcp92A2iP0lj3EOh7RoIK2KsWIpd53txeM9x3IA8kg,9080
|
|
45
|
-
jarvis/tools/select_code_files.py,sha256=lHX93It0FjAonzIhpg5CO27Zx9O8v_zDoW3040qQsUA,2107
|
|
46
|
-
jarvis/tools/thinker.py,sha256=VFq0z9geAtGsRCbd8S73Rk7afAuGm3KQp6t5nayUJVg,4800
|
|
47
|
-
jarvis_ai_assistant-0.1.99.dist-info/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
|
|
48
|
-
jarvis_ai_assistant-0.1.99.dist-info/METADATA,sha256=o8sh7rX00sPwv35yMUB-hq5iSxB9nY8sfHj-i1cgBxM,12766
|
|
49
|
-
jarvis_ai_assistant-0.1.99.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
50
|
-
jarvis_ai_assistant-0.1.99.dist-info/entry_points.txt,sha256=x0jA_mYRc7hBVdLuOFQBYQjpXjf8NPrAn0C54DJ9t2I,387
|
|
51
|
-
jarvis_ai_assistant-0.1.99.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
|
|
52
|
-
jarvis_ai_assistant-0.1.99.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{jarvis_ai_assistant-0.1.99.dist-info → jarvis_ai_assistant-0.1.101.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{jarvis_ai_assistant-0.1.99.dist-info → jarvis_ai_assistant-0.1.101.dist-info}/top_level.txt
RENAMED
|
File without changes
|